From 6416b40cf242340eaa163c498bd49d8103e73610 Mon Sep 17 00:00:00 2001
From: linwe <872216996@qq.com>
Date: Mon, 29 Jul 2024 17:01:52 +0800
Subject: [PATCH] 代码优化
---
src/views/street/houseHoldList.vue | 1177 ++
vue.config.js | 2
src/views/property/articleCategory.vue | 405 +
src/views/cGovernance/punchCard.vue | 446
src/views/property/article.vue | 820 ++
src/views/publicSecurity/keynotePersonnelManageTwo.vue | 466 +
src/views/street/index.vue | 1133 ++
src/components/offce/word.vue | 32
src/views/backblask/BackblastWarnHanRec.vue | 41
src/views/grid/index.vue | 1
src/views/task/reportForRepairs.vue | 1732 ++--
src/views/publicSecurity/tenanthold.vue | 885 ++
src/views/userHouse/components/baseAllInfo.vue | 1194 ++
src/views/publicSecurity/placeIndex.vue | 1141 ++
src/views/userHouse/houseListTwo.vue | 911 ++
src/views/cGovernance/punchCardTwo.vue | 269
src/page/index/top/components/messageContent.vue | 103
src/views/system/menu.vue | 849 +-
src/views/user/dept.vue | 390
src/views/place/practitionerTwo.vue | 677 +
src/views/street/components/auditBase.vue | 112
src/views/street/components/baseAllInfo.vue | 1194 ++
src/views/property/articleComment.vue | 234
src/views/grid/gridman.vue | 764
src/views/patrolList/patrolRecord.vue | 300
src/views/cGovernance/taskECallTwo/index.vue | 7
src/views/backblask/BackblastPubRecord.vue | 4
src/views/publicSecurity/keynotePersonnelManageTree.vue | 429 +
src/views/place/practitioner.vue | 9
dist.zip | 0
src/views/cGovernance/gridPatrolRecord.vue | 870 +
package-lock.json | 387
src/api/userHouse/list/userHouseList.js | 39
src/views/publicSecurity/keynotePersonnelManageFour.vue | 543 +
src/views/publicSecurity/bailReporting.vue | 3
src/views/userHouse/practitioner.vue | 675 +
src/views/publicSecurity/noExplosionManage.vue | 29
src/views/publicSecurity/policeAlarmRecords.vue | 4
src/views/publicSecurity/SchoolCheckManage.vue | 6
src/views/property/inviteTenders.vue | 27
src/views/task/reportForRepairsTwo.vue | 946 ++
src/views/publicSecurity/hireInfoList.vue | 936 ++
src/views/publicSecurity/components/retalInfo.vue | 810 ++
src/views/publicSecurity/keynotePersonnelManage.vue | 6
src/views/publicSecurity/keynotePlaceManage.vue | 27
src/views/street/components/boxTitle.vue | 483 +
src/views/userHouse/components/auditBase.vue | 112
package.json | 3
src/views/property/ownersCommittee.vue | 11
src/views/user/user.vue | 1013 ++
src/views/publicSecurity/ninePlaceManage/hiddenDangerStatistics.vue | 1321 +-
src/views/publicSecurity/components/userHouseList.vue | 37
52 files changed, 20,689 insertions(+), 3,326 deletions(-)
diff --git a/dist.zip b/dist.zip
new file mode 100644
index 0000000..ced4079
--- /dev/null
+++ b/dist.zip
Binary files differ
diff --git a/package-lock.json b/package-lock.json
index 0e879de..6e93084 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -8,6 +8,8 @@
"name": "saber-admin",
"version": "3.2.0",
"dependencies": {
+ "@vue-office/docx": "^1.6.2",
+ "@vue/composition-api": "^1.7.2",
"avue-plugin-map": "^1.0.1",
"avue-plugin-ueditor": "^0.1.4",
"axios": "^0.18.0",
@@ -29,6 +31,7 @@
"vue": "^2.6.10",
"vue-axios": "^2.1.2",
"vue-cron": "^1.0.9",
+ "vue-demi": "^0.14.10",
"vue-i18n": "^8.7.0",
"vue-router": "^3.0.1",
"vuex": "^3.1.1",
@@ -458,6 +461,7 @@
"version": "7.23.0",
"resolved": "https://registry.npmmirror.com/@babel/parser/-/parser-7.23.0.tgz",
"integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==",
+ "dev": true,
"bin": {
"parser": "bin/babel-parser.js"
},
@@ -1550,6 +1554,22 @@
"integrity": "sha512-HBPgtzp44867rkL+IzQ3560/E/BlobwCjeXsuKqogrcE99SKgZR4tvBBCuNJZMhUFMz26M7cjKWZg785lllwpA==",
"dev": true
},
+ "node_modules/@vue-office/docx": {
+ "version": "1.6.2",
+ "resolved": "https://registry.npmmirror.com/@vue-office/docx/-/docx-1.6.2.tgz",
+ "integrity": "sha512-OHAoUHeY8nHjhWvwDhlPx+/rmRkxmqLpvPgtfCEOZ4H1c1LCdJ6eDbdV3152ww8dcdZ7fgGQu3fmSSaI7JwdpQ==",
+ "hasInstallScript": true,
+ "peerDependencies": {
+ "@vue/composition-api": "^1.7.1",
+ "vue": "^2.0.0 || >=3.0.0",
+ "vue-demi": "^0.14.6"
+ },
+ "peerDependenciesMeta": {
+ "@vue/composition-api": {
+ "optional": true
+ }
+ }
+ },
"node_modules/@vue/babel-helper-vue-jsx-merge-props": {
"version": "1.4.0",
"resolved": "https://registry.npmmirror.com/@vue/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-1.4.0.tgz",
@@ -1808,6 +1828,60 @@
"vue-template-compiler": "^2.0.0"
}
},
+ "node_modules/@vue/cli-service/node_modules/json5": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmmirror.com/json5/-/json5-1.0.2.tgz",
+ "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==",
+ "dev": true,
+ "dependencies": {
+ "minimist": "^1.2.0"
+ },
+ "bin": {
+ "json5": "lib/cli.js"
+ }
+ },
+ "node_modules/@vue/cli-service/node_modules/loader-utils": {
+ "version": "1.4.2",
+ "resolved": "https://registry.npmmirror.com/loader-utils/-/loader-utils-1.4.2.tgz",
+ "integrity": "sha512-I5d00Pd/jwMD2QCduo657+YM/6L3KZu++pmX9VFncxaxvHcru9jx1lBaFft+r4Mt2jK0Yhp41XlRAihzPxHNCg==",
+ "dev": true,
+ "dependencies": {
+ "big.js": "^5.2.2",
+ "emojis-list": "^3.0.0",
+ "json5": "^1.0.1"
+ },
+ "engines": {
+ "node": ">=4.0.0"
+ }
+ },
+ "node_modules/@vue/cli-service/node_modules/vue-loader": {
+ "version": "15.11.1",
+ "resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-15.11.1.tgz",
+ "integrity": "sha512-0iw4VchYLePqJfJu9s62ACWUXeSqM30SQqlIftbYWM3C+jpPcEHKSPUZBLjSF9au4HTHQ/naF6OGnO3Q/qGR3Q==",
+ "dev": true,
+ "dependencies": {
+ "@vue/component-compiler-utils": "^3.1.0",
+ "hash-sum": "^1.0.2",
+ "loader-utils": "^1.1.0",
+ "vue-hot-reload-api": "^2.3.0",
+ "vue-style-loader": "^4.1.0"
+ },
+ "peerDependencies": {
+ "css-loader": "*",
+ "webpack": "^3.0.0 || ^4.1.0 || ^5.0.0-0"
+ },
+ "peerDependenciesMeta": {
+ "cache-loader": {
+ "optional": true
+ },
+ "prettier": {
+ "optional": true
+ },
+ "vue-template-compiler": {
+ "optional": true
+ }
+ }
+ },
"node_modules/@vue/cli-shared-utils": {
"version": "3.12.1",
"resolved": "https://registry.npmmirror.com/@vue/cli-shared-utils/-/cli-shared-utils-3.12.1.tgz",
@@ -1826,34 +1900,6 @@
"request-promise-native": "^1.0.7",
"semver": "^6.0.0",
"string.prototype.padstart": "^3.0.0"
- }
- },
- "node_modules/@vue/compiler-sfc": {
- "version": "2.7.15",
- "resolved": "https://registry.npmmirror.com/@vue/compiler-sfc/-/compiler-sfc-2.7.15.tgz",
- "integrity": "sha512-FCvIEevPmgCgqFBH7wD+3B97y7u7oj/Wr69zADBf403Tui377bThTjBvekaZvlRr4IwUAu3M6hYZeULZFJbdYg==",
- "dependencies": {
- "@babel/parser": "^7.18.4",
- "postcss": "^8.4.14",
- "source-map": "^0.6.1"
- }
- },
- "node_modules/@vue/compiler-sfc/node_modules/picocolors": {
- "version": "1.0.0",
- "resolved": "https://registry.npmmirror.com/picocolors/-/picocolors-1.0.0.tgz",
- "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ=="
- },
- "node_modules/@vue/compiler-sfc/node_modules/postcss": {
- "version": "8.4.31",
- "resolved": "https://registry.npmmirror.com/postcss/-/postcss-8.4.31.tgz",
- "integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==",
- "dependencies": {
- "nanoid": "^3.3.6",
- "picocolors": "^1.0.0",
- "source-map-js": "^1.0.2"
- },
- "engines": {
- "node": "^10 || ^12 || >=14"
}
},
"node_modules/@vue/component-compiler-utils": {
@@ -1890,6 +1936,14 @@
"resolved": "https://registry.npmmirror.com/yallist/-/yallist-2.1.2.tgz",
"integrity": "sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==",
"dev": true
+ },
+ "node_modules/@vue/composition-api": {
+ "version": "1.7.2",
+ "resolved": "https://registry.npmmirror.com/@vue/composition-api/-/composition-api-1.7.2.tgz",
+ "integrity": "sha512-M8jm9J/laYrYT02665HkZ5l2fWTK4dcVg3BsDHm/pfz+MjDYwX+9FUaZyGwEyXEDonQYRCo0H7aLgdklcIELjw==",
+ "peerDependencies": {
+ "vue": ">= 2.5 < 2.7"
+ }
},
"node_modules/@vue/preload-webpack-plugin": {
"version": "1.1.2",
@@ -5162,11 +5216,6 @@
"resolved": "https://registry.npmmirror.com/mdn-data/-/mdn-data-2.0.14.tgz",
"integrity": "sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==",
"dev": true
- },
- "node_modules/csstype": {
- "version": "3.1.2",
- "resolved": "https://registry.npmmirror.com/csstype/-/csstype-3.1.2.tgz",
- "integrity": "sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ=="
},
"node_modules/current-script-polyfill": {
"version": "1.0.0",
@@ -9989,17 +10038,6 @@
"integrity": "sha512-W7tfG7vMOGtD30sHoZSSc/JVYiyDPEyQVso/Zz+/uQd0B0L46gtC+pHha5FFMRpil6fm/AoEcRWyOVi4+E/f8w==",
"dev": true
},
- "node_modules/nanoid": {
- "version": "3.3.6",
- "resolved": "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.6.tgz",
- "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==",
- "bin": {
- "nanoid": "bin/nanoid.cjs"
- },
- "engines": {
- "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
- }
- },
"node_modules/nanomatch": {
"version": "1.2.13",
"resolved": "https://registry.npmmirror.com/nanomatch/-/nanomatch-1.2.13.tgz",
@@ -14407,14 +14445,7 @@
"version": "0.6.1",
"resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/source-map-js": {
- "version": "1.0.2",
- "resolved": "https://registry.npmmirror.com/source-map-js/-/source-map-js-1.0.2.tgz",
- "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==",
+ "dev": true,
"engines": {
"node": ">=0.10.0"
}
@@ -16293,13 +16324,10 @@
"dev": true
},
"node_modules/vue": {
- "version": "2.7.15",
- "resolved": "https://registry.npmmirror.com/vue/-/vue-2.7.15.tgz",
- "integrity": "sha512-a29fsXd2G0KMRqIFTpRgpSbWaNBK3lpCTOLuGLEDnlHWdjB8fwl6zyYZ8xCrqkJdatwZb4mGHiEfJjnw0Q6AwQ==",
- "dependencies": {
- "@vue/compiler-sfc": "2.7.15",
- "csstype": "^3.1.0"
- }
+ "version": "2.6.14",
+ "resolved": "https://registry.npmmirror.com/vue/-/vue-2.6.14.tgz",
+ "integrity": "sha512-x2284lgYvjOMj3Za7kqzRcUSxBboHqtgRE2zlos1qWaOye5yUmHn42LB1250NJBLRwEcdrB0JRwyPTEPhfQjiQ==",
+ "deprecated": "Vue 2 has reached EOL and is no longer actively maintained. See https://v2.vuejs.org/eol/ for more details."
},
"node_modules/vue-axios": {
"version": "2.1.5",
@@ -16318,6 +16346,31 @@
"babel-runtime": "^6.26.0",
"element-ui": "^2.0.7",
"vue": "^2.5.9"
+ }
+ },
+ "node_modules/vue-demi": {
+ "version": "0.14.10",
+ "resolved": "https://registry.npmmirror.com/vue-demi/-/vue-demi-0.14.10.tgz",
+ "integrity": "sha512-nMZBOwuzabUO0nLgIcc6rycZEebF6eeUfaiQx9+WSk8e29IbLvPU9feI6tqW4kTo3hvoYAJkMh8n8D0fuISphg==",
+ "hasInstallScript": true,
+ "bin": {
+ "vue-demi-fix": "bin/vue-demi-fix.js",
+ "vue-demi-switch": "bin/vue-demi-switch.js"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/antfu"
+ },
+ "peerDependencies": {
+ "@vue/composition-api": "^1.0.0-rc.1",
+ "vue": "^3.0.0-0 || ^2.6.0"
+ },
+ "peerDependenciesMeta": {
+ "@vue/composition-api": {
+ "optional": true
+ }
}
},
"node_modules/vue-eslint-parser": {
@@ -16362,60 +16415,6 @@
"resolved": "https://registry.npmmirror.com/vue-i18n/-/vue-i18n-8.28.2.tgz",
"integrity": "sha512-C5GZjs1tYlAqjwymaaCPDjCyGo10ajUphiwA922jKt9n7KPpqR7oM1PCwYzhB/E7+nT3wfdG3oRre5raIT1rKA=="
},
- "node_modules/vue-loader": {
- "version": "15.11.1",
- "resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-15.11.1.tgz",
- "integrity": "sha512-0iw4VchYLePqJfJu9s62ACWUXeSqM30SQqlIftbYWM3C+jpPcEHKSPUZBLjSF9au4HTHQ/naF6OGnO3Q/qGR3Q==",
- "dev": true,
- "dependencies": {
- "@vue/component-compiler-utils": "^3.1.0",
- "hash-sum": "^1.0.2",
- "loader-utils": "^1.1.0",
- "vue-hot-reload-api": "^2.3.0",
- "vue-style-loader": "^4.1.0"
- },
- "peerDependencies": {
- "css-loader": "*",
- "webpack": "^3.0.0 || ^4.1.0 || ^5.0.0-0"
- },
- "peerDependenciesMeta": {
- "cache-loader": {
- "optional": true
- },
- "prettier": {
- "optional": true
- },
- "vue-template-compiler": {
- "optional": true
- }
- }
- },
- "node_modules/vue-loader/node_modules/json5": {
- "version": "1.0.2",
- "resolved": "https://registry.npmmirror.com/json5/-/json5-1.0.2.tgz",
- "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==",
- "dev": true,
- "dependencies": {
- "minimist": "^1.2.0"
- },
- "bin": {
- "json5": "lib/cli.js"
- }
- },
- "node_modules/vue-loader/node_modules/loader-utils": {
- "version": "1.4.2",
- "resolved": "https://registry.npmmirror.com/loader-utils/-/loader-utils-1.4.2.tgz",
- "integrity": "sha512-I5d00Pd/jwMD2QCduo657+YM/6L3KZu++pmX9VFncxaxvHcru9jx1lBaFft+r4Mt2jK0Yhp41XlRAihzPxHNCg==",
- "dev": true,
- "dependencies": {
- "big.js": "^5.2.2",
- "emojis-list": "^3.0.0",
- "json5": "^1.0.1"
- },
- "engines": {
- "node": ">=4.0.0"
- }
- },
"node_modules/vue-router": {
"version": "3.6.5",
"resolved": "https://registry.npmmirror.com/vue-router/-/vue-router-3.6.5.tgz",
@@ -16458,13 +16457,13 @@
}
},
"node_modules/vue-template-compiler": {
- "version": "2.7.15",
- "resolved": "https://registry.npmmirror.com/vue-template-compiler/-/vue-template-compiler-2.7.15.tgz",
- "integrity": "sha512-yQxjxMptBL7UAog00O8sANud99C6wJF+7kgbcwqkvA38vCGF7HWE66w0ZFnS/kX5gSoJr/PQ4/oS3Ne2pW37Og==",
+ "version": "2.6.14",
+ "resolved": "https://registry.npmmirror.com/vue-template-compiler/-/vue-template-compiler-2.6.14.tgz",
+ "integrity": "sha512-ODQS1SyMbjKoO1JBJZojSw6FE4qnh9rIpUZn2EUT86FKizx9uH5z6uXiIrm4/Nb/gwxTi/o17ZDEGWAXHvtC7g==",
"dev": true,
"dependencies": {
"de-indent": "^1.0.2",
- "he": "^1.2.0"
+ "he": "^1.1.0"
}
},
"node_modules/vue-template-es2015-compiler": {
@@ -18031,7 +18030,8 @@
"@babel/parser": {
"version": "7.23.0",
"resolved": "https://registry.npmmirror.com/@babel/parser/-/parser-7.23.0.tgz",
- "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw=="
+ "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==",
+ "dev": true
},
"@babel/plugin-proposal-async-generator-functions": {
"version": "7.20.7",
@@ -18808,6 +18808,12 @@
"integrity": "sha512-HBPgtzp44867rkL+IzQ3560/E/BlobwCjeXsuKqogrcE99SKgZR4tvBBCuNJZMhUFMz26M7cjKWZg785lllwpA==",
"dev": true
},
+ "@vue-office/docx": {
+ "version": "1.6.2",
+ "resolved": "https://registry.npmmirror.com/@vue-office/docx/-/docx-1.6.2.tgz",
+ "integrity": "sha512-OHAoUHeY8nHjhWvwDhlPx+/rmRkxmqLpvPgtfCEOZ4H1c1LCdJ6eDbdV3152ww8dcdZ7fgGQu3fmSSaI7JwdpQ==",
+ "requires": {}
+ },
"@vue/babel-helper-vue-jsx-merge-props": {
"version": "1.4.0",
"resolved": "https://registry.npmmirror.com/@vue/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-1.4.0.tgz",
@@ -19023,6 +19029,41 @@
"webpack-chain": "^4.11.0",
"webpack-dev-server": "^3.4.1",
"webpack-merge": "^4.2.1"
+ },
+ "dependencies": {
+ "json5": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmmirror.com/json5/-/json5-1.0.2.tgz",
+ "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==",
+ "dev": true,
+ "requires": {
+ "minimist": "^1.2.0"
+ }
+ },
+ "loader-utils": {
+ "version": "1.4.2",
+ "resolved": "https://registry.npmmirror.com/loader-utils/-/loader-utils-1.4.2.tgz",
+ "integrity": "sha512-I5d00Pd/jwMD2QCduo657+YM/6L3KZu++pmX9VFncxaxvHcru9jx1lBaFft+r4Mt2jK0Yhp41XlRAihzPxHNCg==",
+ "dev": true,
+ "requires": {
+ "big.js": "^5.2.2",
+ "emojis-list": "^3.0.0",
+ "json5": "^1.0.1"
+ }
+ },
+ "vue-loader": {
+ "version": "15.11.1",
+ "resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-15.11.1.tgz",
+ "integrity": "sha512-0iw4VchYLePqJfJu9s62ACWUXeSqM30SQqlIftbYWM3C+jpPcEHKSPUZBLjSF9au4HTHQ/naF6OGnO3Q/qGR3Q==",
+ "dev": true,
+ "requires": {
+ "@vue/component-compiler-utils": "^3.1.0",
+ "hash-sum": "^1.0.2",
+ "loader-utils": "^1.1.0",
+ "vue-hot-reload-api": "^2.3.0",
+ "vue-style-loader": "^4.1.0"
+ }
+ }
}
},
"@vue/cli-shared-utils": {
@@ -19043,33 +19084,6 @@
"request-promise-native": "^1.0.7",
"semver": "^6.0.0",
"string.prototype.padstart": "^3.0.0"
- }
- },
- "@vue/compiler-sfc": {
- "version": "2.7.15",
- "resolved": "https://registry.npmmirror.com/@vue/compiler-sfc/-/compiler-sfc-2.7.15.tgz",
- "integrity": "sha512-FCvIEevPmgCgqFBH7wD+3B97y7u7oj/Wr69zADBf403Tui377bThTjBvekaZvlRr4IwUAu3M6hYZeULZFJbdYg==",
- "requires": {
- "@babel/parser": "^7.18.4",
- "postcss": "^8.4.14",
- "source-map": "^0.6.1"
- },
- "dependencies": {
- "picocolors": {
- "version": "1.0.0",
- "resolved": "https://registry.npmmirror.com/picocolors/-/picocolors-1.0.0.tgz",
- "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ=="
- },
- "postcss": {
- "version": "8.4.31",
- "resolved": "https://registry.npmmirror.com/postcss/-/postcss-8.4.31.tgz",
- "integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==",
- "requires": {
- "nanoid": "^3.3.6",
- "picocolors": "^1.0.0",
- "source-map-js": "^1.0.2"
- }
- }
}
},
"@vue/component-compiler-utils": {
@@ -19106,6 +19120,12 @@
"dev": true
}
}
+ },
+ "@vue/composition-api": {
+ "version": "1.7.2",
+ "resolved": "https://registry.npmmirror.com/@vue/composition-api/-/composition-api-1.7.2.tgz",
+ "integrity": "sha512-M8jm9J/laYrYT02665HkZ5l2fWTK4dcVg3BsDHm/pfz+MjDYwX+9FUaZyGwEyXEDonQYRCo0H7aLgdklcIELjw==",
+ "requires": {}
},
"@vue/preload-webpack-plugin": {
"version": "1.1.2",
@@ -21841,11 +21861,6 @@
"dev": true
}
}
- },
- "csstype": {
- "version": "3.1.2",
- "resolved": "https://registry.npmmirror.com/csstype/-/csstype-3.1.2.tgz",
- "integrity": "sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ=="
},
"current-script-polyfill": {
"version": "1.0.0",
@@ -25832,11 +25847,6 @@
"integrity": "sha512-W7tfG7vMOGtD30sHoZSSc/JVYiyDPEyQVso/Zz+/uQd0B0L46gtC+pHha5FFMRpil6fm/AoEcRWyOVi4+E/f8w==",
"dev": true
},
- "nanoid": {
- "version": "3.3.6",
- "resolved": "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.6.tgz",
- "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA=="
- },
"nanomatch": {
"version": "1.2.13",
"resolved": "https://registry.npmmirror.com/nanomatch/-/nanomatch-1.2.13.tgz",
@@ -29475,12 +29485,8 @@
"source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz",
- "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="
- },
- "source-map-js": {
- "version": "1.0.2",
- "resolved": "https://registry.npmmirror.com/source-map-js/-/source-map-js-1.0.2.tgz",
- "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw=="
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+ "dev": true
},
"source-map-resolve": {
"version": "0.5.3",
@@ -31066,13 +31072,9 @@
"dev": true
},
"vue": {
- "version": "2.7.15",
- "resolved": "https://registry.npmmirror.com/vue/-/vue-2.7.15.tgz",
- "integrity": "sha512-a29fsXd2G0KMRqIFTpRgpSbWaNBK3lpCTOLuGLEDnlHWdjB8fwl6zyYZ8xCrqkJdatwZb4mGHiEfJjnw0Q6AwQ==",
- "requires": {
- "@vue/compiler-sfc": "2.7.15",
- "csstype": "^3.1.0"
- }
+ "version": "2.6.14",
+ "resolved": "https://registry.npmmirror.com/vue/-/vue-2.6.14.tgz",
+ "integrity": "sha512-x2284lgYvjOMj3Za7kqzRcUSxBboHqtgRE2zlos1qWaOye5yUmHn42LB1250NJBLRwEcdrB0JRwyPTEPhfQjiQ=="
},
"vue-axios": {
"version": "2.1.5",
@@ -31090,6 +31092,12 @@
"element-ui": "^2.0.7",
"vue": "^2.5.9"
}
+ },
+ "vue-demi": {
+ "version": "0.14.10",
+ "resolved": "https://registry.npmmirror.com/vue-demi/-/vue-demi-0.14.10.tgz",
+ "integrity": "sha512-nMZBOwuzabUO0nLgIcc6rycZEebF6eeUfaiQx9+WSk8e29IbLvPU9feI6tqW4kTo3hvoYAJkMh8n8D0fuISphg==",
+ "requires": {}
},
"vue-eslint-parser": {
"version": "2.0.3",
@@ -31129,41 +31137,6 @@
"resolved": "https://registry.npmmirror.com/vue-i18n/-/vue-i18n-8.28.2.tgz",
"integrity": "sha512-C5GZjs1tYlAqjwymaaCPDjCyGo10ajUphiwA922jKt9n7KPpqR7oM1PCwYzhB/E7+nT3wfdG3oRre5raIT1rKA=="
},
- "vue-loader": {
- "version": "15.11.1",
- "resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-15.11.1.tgz",
- "integrity": "sha512-0iw4VchYLePqJfJu9s62ACWUXeSqM30SQqlIftbYWM3C+jpPcEHKSPUZBLjSF9au4HTHQ/naF6OGnO3Q/qGR3Q==",
- "dev": true,
- "requires": {
- "@vue/component-compiler-utils": "^3.1.0",
- "hash-sum": "^1.0.2",
- "loader-utils": "^1.1.0",
- "vue-hot-reload-api": "^2.3.0",
- "vue-style-loader": "^4.1.0"
- },
- "dependencies": {
- "json5": {
- "version": "1.0.2",
- "resolved": "https://registry.npmmirror.com/json5/-/json5-1.0.2.tgz",
- "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==",
- "dev": true,
- "requires": {
- "minimist": "^1.2.0"
- }
- },
- "loader-utils": {
- "version": "1.4.2",
- "resolved": "https://registry.npmmirror.com/loader-utils/-/loader-utils-1.4.2.tgz",
- "integrity": "sha512-I5d00Pd/jwMD2QCduo657+YM/6L3KZu++pmX9VFncxaxvHcru9jx1lBaFft+r4Mt2jK0Yhp41XlRAihzPxHNCg==",
- "dev": true,
- "requires": {
- "big.js": "^5.2.2",
- "emojis-list": "^3.0.0",
- "json5": "^1.0.1"
- }
- }
- }
- },
"vue-router": {
"version": "3.6.5",
"resolved": "https://registry.npmmirror.com/vue-router/-/vue-router-3.6.5.tgz",
@@ -31202,13 +31175,13 @@
}
},
"vue-template-compiler": {
- "version": "2.7.15",
- "resolved": "https://registry.npmmirror.com/vue-template-compiler/-/vue-template-compiler-2.7.15.tgz",
- "integrity": "sha512-yQxjxMptBL7UAog00O8sANud99C6wJF+7kgbcwqkvA38vCGF7HWE66w0ZFnS/kX5gSoJr/PQ4/oS3Ne2pW37Og==",
+ "version": "2.6.14",
+ "resolved": "https://registry.npmmirror.com/vue-template-compiler/-/vue-template-compiler-2.6.14.tgz",
+ "integrity": "sha512-ODQS1SyMbjKoO1JBJZojSw6FE4qnh9rIpUZn2EUT86FKizx9uH5z6uXiIrm4/Nb/gwxTi/o17ZDEGWAXHvtC7g==",
"dev": true,
"requires": {
"de-indent": "^1.0.2",
- "he": "^1.2.0"
+ "he": "^1.1.0"
}
},
"vue-template-es2015-compiler": {
diff --git a/package.json b/package.json
index d5ed29f..89c578f 100644
--- a/package.json
+++ b/package.json
@@ -11,6 +11,8 @@
"test:e2e": "vue-cli-service test:e2e"
},
"dependencies": {
+ "@vue-office/docx": "^1.6.2",
+ "@vue/composition-api": "^1.7.2",
"avue-plugin-map": "^1.0.1",
"avue-plugin-ueditor": "^0.1.4",
"axios": "^0.18.0",
@@ -32,6 +34,7 @@
"vue": "^2.6.10",
"vue-axios": "^2.1.2",
"vue-cron": "^1.0.9",
+ "vue-demi": "^0.14.10",
"vue-i18n": "^8.7.0",
"vue-router": "^3.0.1",
"vuex": "^3.1.1",
diff --git a/src/api/userHouse/list/userHouseList.js b/src/api/userHouse/list/userHouseList.js
index 4445984..2b8649a 100644
--- a/src/api/userHouse/list/userHouseList.js
+++ b/src/api/userHouse/list/userHouseList.js
@@ -104,6 +104,45 @@
}
})
}
+
+export const getOrgStatisticalLabels = (current, size, params) => {
+ return request({
+ url: '/api/blade-householdLabel/householdLabel/getOrgStatisticalLabels',
+ method: 'get',
+ params: {
+ ...params,
+ current,
+ size,
+ }
+ })
+}
+
+
+export const getUnitedFrontStatisticalLabels = (current, size, params) => {
+ return request({
+ url: '/api/blade-householdLabel/householdLabel/getUnitedFrontStatisticalLabels',
+ method: 'get',
+ params: {
+ ...params,
+ current,
+ size,
+ }
+ })
+}
+
+
+export const getFollowStatisticalLabels = (current, size, params) => {
+ return request({
+ url: '/api/blade-householdLabel/householdLabel/getFollowStatisticalLabels',
+ method: 'get',
+ params: {
+ ...params,
+ current,
+ size,
+ }
+ })
+}
+
export const getCommunityStatisticalLabels = (current, size, params) => {
return request({
url: '/api/blade-householdLabel/householdLabel/getCommunityStatisticalLabels',
diff --git a/src/components/offce/word.vue b/src/components/offce/word.vue
new file mode 100644
index 0000000..965b593
--- /dev/null
+++ b/src/components/offce/word.vue
@@ -0,0 +1,32 @@
+<template>
+ <vue-office-docx :src="docx" style="height: 100vh;" @rendered="renderedHandler" @error="errorHandler" />
+</template>
+
+<script>
+ //引入VueOfficeDocx组件
+ import VueOfficeDocx from '@vue-office/docx'
+ //引入相关样式
+ import '@vue-office/docx/lib/index.css'
+
+ export default {
+ components: {
+ VueOfficeDocx
+ },
+ data() {
+ return {
+ docx: 'http://static.shanhuxueyuan.com/test6.docx' //设置文档网络地址,可以是相对地址
+ }
+ },
+ methods: {
+ initWord(url) {
+ this.docx = url
+ },
+ renderedHandler() {
+ console.log("渲染完成")
+ },
+ errorHandler() {
+ console.log("渲染失败")
+ }
+ }
+ }
+</script>
\ No newline at end of file
diff --git a/src/page/index/top/components/messageContent.vue b/src/page/index/top/components/messageContent.vue
index 2b9f58f..c5e429a 100644
--- a/src/page/index/top/components/messageContent.vue
+++ b/src/page/index/top/components/messageContent.vue
@@ -1,70 +1,67 @@
<template>
- <el-dialog
- :title="title"
- append-to-body
- :visible.sync="box"
- width="60%"
- >
+ <el-dialog :title="title" append-to-body :visible.sync="box" width="60%">
<avue-form :option="option" v-model="form"> </avue-form>
<!-- <sapn>{{ form.content }}</sapn> -->
</el-dialog>
</template>
<script>
-import {updateIsRead} from "@/api/messageRecord/messageUser";
+ import {
+ updateIsRead
+ } from "@/api/messageRecord/messageUser";
-export default {
- name: "messsageContent",
- data() {
- return {
- title:"",
- box: false,
- form: {},
- option: {
- submitBtn: false,
- emptyBtn: false,
- column: [
- // {
- // label: "主題",
- // prop: "theme",
- // disabled:true,
- // span:24
- // },
- {
- label: "",
- labelWidth:1,
- prop: "content",
- type: "textarea",
- // disabled:true,
- span:24
- },
- ],
- }
- };
- },
- created(){
+ export default {
+ name: "messsageContent",
+ data() {
+ return {
+ title: "",
+ box: false,
+ form: {},
+ option: {
+ submitBtn: false,
+ emptyBtn: false,
+ column: [
+ // {
+ // label: "主題",
+ // prop: "theme",
+ // disabled:true,
+ // span:24
+ // },
+ {
+ label: "",
+ labelWidth: 1,
+ prop: "content",
+ type: "textarea",
+ // disabled:true,
+ span: 24
+ },
+ ],
+ }
+ };
+ },
+ created() {
- },
- methods:{
- // 初始化
- init(data){
+ },
+ methods: {
+ // 初始化
+ init(data) {
this.title = data.title
this.box = true
this.form = data;
- if(data.isRead ==2){
- this.updateMessage(data)
+ if (data.isRead == 2) {
+ this.updateMessage(data)
}
- },
- updateMessage(data){
+ },
+ updateMessage(data) {
// 设置为已读
- updateIsRead(data.id,'1');
+ updateIsRead(data.id, '1');
// 刷新列表
- this.$emit('reflushList','')
+ this.$emit('reflushList', '')
+ }
}
- }
-};
+ };
</script>
<style scoped lang="scss">
-::v-deep(.avue-form__menu--center){
- display: none !important;
-}
-</style>
+ ::v-deep .avue-form__menu--center {
+ display: none !important;
+ }
+</style>
\ No newline at end of file
diff --git a/src/views/backblask/BackblastPubRecord.vue b/src/views/backblask/BackblastPubRecord.vue
index 5c04c6b..41ddb8f 100644
--- a/src/views/backblask/BackblastPubRecord.vue
+++ b/src/views/backblask/BackblastPubRecord.vue
@@ -98,6 +98,7 @@
columnBtn: false,
dialogClickModal: false,
column: [{
+ searchLabelWidth: 60,
label: "地址",
prop: "address",
minWidth: 100,
@@ -108,7 +109,7 @@
row: true,
span: 24,
}, {
- label: "社区",
+ label: "所属社区",
prop: "communityName",
align: 'center',
labelWidth: 120,
@@ -228,6 +229,7 @@
}, ],
},
{
+ searchLabelWidth: 40,
label: "宣防单位",
prop: "deptName",
align: 'center',
diff --git a/src/views/backblask/BackblastWarnHanRec.vue b/src/views/backblask/BackblastWarnHanRec.vue
index e096135..61e0208 100644
--- a/src/views/backblask/BackblastWarnHanRec.vue
+++ b/src/views/backblask/BackblastWarnHanRec.vue
@@ -62,15 +62,15 @@
height: "auto",
calcHeight: 54,
dialogWidth: 950,
- menuWidth: 100,
+ menuWidth: 220,
tip: false,
searchShow: true,
searchMenuSpan: 3,
// menu: false,
border: true,
index: true,
- editBtn: false,
- delBtn: false,
+ editBtn: true,
+ delBtn: true,
addBtn: false,
viewBtn: true,
refreshBtn: false,
@@ -173,7 +173,7 @@
// labelWidth: 120,
// searchLabelWidth: 96,
// searchPlaceholder: '请输入辖区派出所'
- // },
+ // },
{
searchLabelWidth: 90,
label: "辖区派出所",
@@ -279,13 +279,13 @@
row.imageUrls = urls.join(",")
}
- let label = row.label
+ // let label = row.label
- if (row.smallLabel != '') {
- label = label + ',' + row.smallLabel
- }
+ // if (row.smallLabel != '') {
+ // label = label + ',' + row.smallLabel
+ // }
- delete row.smallLabel
+ // delete row.smallLabel
add({
...row,
@@ -307,28 +307,25 @@
},
rowUpdate(row, index, done, loading) {
- if (row.imageUrls.length > 0) {
+ if (row.sceUrls.length > 0) {
var urls = []
- var split = row.imageUrls.split(",").filter(item => item != '')
+ var split = row.sceUrls.split(",").filter(item => item != '')
split.forEach(url => {
var names = url.split("jczz/")
urls.push(names[1])
})
- row.imageUrls = urls.join(",")
+ row.sceUrls = urls.join(",")
}
- let label = row.label
+ // let label = row.label
- if (row.smallLabel != '') {
- label = label + ',' + row.smallLabel
- }
+ // if (row.smallLabel != '') {
+ // label = label + ',' + row.smallLabel
+ // }
- delete row.smallLabel
+ // delete row.smallLabel
- update({
- ...row,
- label
- }).then(
+ update(row).then(
() => {
this.onLoad(this.page)
this.$message({
@@ -352,7 +349,7 @@
})
.then(() => {
row.isDeleted = 1
- return removeTask(row)
+ return update(row)
})
.then(() => {
this.onLoad(this.page)
diff --git a/src/views/cGovernance/gridPatrolRecord.vue b/src/views/cGovernance/gridPatrolRecord.vue
index 8243539..5fd5a96 100644
--- a/src/views/cGovernance/gridPatrolRecord.vue
+++ b/src/views/cGovernance/gridPatrolRecord.vue
@@ -1,409 +1,507 @@
<!-- 巡查记录 -->
<template>
- <basic-container>
- <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" ref="crud" @row-del="rowDel"
- v-model="form" :permission="permissionList" @row-update="rowUpdate" @row-save="rowSave"
- :before-open="beforeOpen" @search-change="searchChange" @search-reset="searchReset"
- @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
- @refresh-change="refreshChange" @on-load="onLoad">
- <template slot="menuLeft">
- <el-button size="small" icon="el-icon-delete" plain v-if="permission.article_delete" @click="handleDelete">删
- 除
- </el-button>
- </template>
+ <basic-container>
+ <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" ref="crud" @row-del="rowDel"
+ v-model="form" :permission="permissionList" @row-update="rowUpdate" @row-save="rowSave" :before-open="beforeOpen"
+ @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"
+ @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
+ <template slot="menuLeft">
+ <el-button size="small" icon="el-icon-delete" plain v-if="permission.article_delete" @click="handleDelete">删
+ 除
+ </el-button>
+ </template>
- <template slot-scope="{row}" slot="location">
- <span v-text="showLocation(row.location)"></span>
- </template>
+ <template slot="menuLeft">
+ <el-button type="warning" size="small" plain v-if="permission.household_export" icon="el-icon-download"
+ @click="handleExport">导出
+ </el-button>
+ </template>
- <template slot-scope="{row}" slot="longitude">
- <span v-text="decimalProcessing(row.longitude)"></span>
- </template>
+ <template slot-scope="{row}" slot="location">
+ <span v-text="showLocation(row.location)"></span>
+ </template>
- <template slot-scope="{row}" slot="latitude">
- <span v-text="decimalProcessing(row.latitude)"></span>
- </template>
- </avue-crud>
- </basic-container>
+ <template slot-scope="{row}" slot="longitude">
+ <span v-text="decimalProcessing(row.longitude)"></span>
+ </template>
+
+ <template slot-scope="{row}" slot="latitude">
+ <span v-text="decimalProcessing(row.latitude)"></span>
+ </template>
+ </avue-crud>
+ </basic-container>
</template>
<script>
-import { getList, remove, update, add, getGridPatrolRecord } from "@/api/grid/gridPatrolRecord"
-import { mapGetters } from "vuex"
-import website from '@/config/website'
+ import {
+ getList,
+ remove,
+ update,
+ add,
+ getGridPatrolRecord
+ } from "@/api/grid/gridPatrolRecord"
+ import {
+ mapGetters
+ } from "vuex"
+ import website from '@/config/website'
+ import {
+ exportBlob
+ } from "@/api/common"
+ import NProgress from 'nprogress'
+ import 'nprogress/nprogress.css'
+ import Qs from "qs"
+ import {
+ getToken
+ } from '@/util/auth'
+ import {
+ downloadXls
+ } from "@/util/util"
+ import {
+ dateNow
+ } from "@/util/date"
+ export default {
+ data() {
+ return {
+ form: {},
+ query: {},
+ loading: true,
+ page: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0,
+ },
+ datetime: "",
+ selectionList: [],
+ option: {
+ labelWidth: 96,
+ searchLabelWidth: 96,
+ searchShow: true,
+ searchMenuSpan: 3,
+ menuWidth: 210,
-export default {
- data () {
- return {
- form: {},
- query: {},
- loading: true,
- page: {
- pageSize: 10,
- currentPage: 1,
- total: 0,
+ height: "auto",
+ calcHeight: 54,
+ dialogWidth: 950,
+ tip: false,
+ border: true,
+ //stripe:true,
+ index: true,
+ viewBtn: true,
+ selection: true,
+ excelBtn: true,
+ dialogClickModal: false,
+ column: [{
+ width: 96,
+ searchLabelWidth: 80,
+ searchSpan: 4,
+ addDisplay: false,
+ editDisplay: false,
+ viewDisplay: false,
+ label: "所属街道",
+ prop: "townStreetName",
+ search: true,
+ type: "tree",
+ dicUrl: "/api/blade-system/region/getTownTree",
+ props: {
+ label: "name",
+ value: "name"
+ },
+ rules: [{
+ required: true,
+ message: "请选择所属街道",
+ trigger: "blur",
+ }, ],
},
- datetime: "",
- selectionList: [],
- option: {
- labelWidth: 96,
- searchLabelWidth: 96,
- searchShow: true,
- searchMenuSpan: 3,
- menuWidth: 210,
-
- height: "auto",
- calcHeight: 54,
- dialogWidth: 950,
- tip: false,
- border: true,
- //stripe:true,
- index: true,
- viewBtn: true,
- selection: true,
- excelBtn: true,
- dialogClickModal: false,
- column: [
- {
- label: "巡查标题",
- prop: "name",
- span: 24,
- row: true,
- searchSpan: 4,
- search: true,
- searchLabelWidth: 76,
- rules: [
- {
- required: true,
- message: "请输入巡查标题",
- trigger: "blur",
- },
- ],
- },
- {
- label: "巡查内容",
- prop: "context",
- type: "textarea",
- span: 24,
- },
-
- {
- overHidden: true,
- slot: true,
- label: "巡查地址",
- prop: "location",
- type: 'map',
- dataType: "string",
- span: 24,
- value: [117.966460, 28.431002, ""],
- rules: [
- {
- required: true,
- message: "请选择巡查地址",
- trigger: "blur",
- },
- ],
- },
-
- {
- width: 96,
- slot: true,
- addDisplay: false,
- editDisplay: false,
- viewDisplay: false,
- label: "经度",
- prop: "longitude",
- },
-
- {
- width: 96,
- slot: true,
- addDisplay: false,
- editDisplay: false,
- viewDisplay: false,
- label: "纬度",
- prop: "latitude",
- },
-
- {
- width: 110,
- label: "巡查图片",
- prop: "url",
- type: "upload",
- listType: "picture-img",
- action: "/api/blade-resource/oss/endpoint/put-file",
- propsHttp: {
- res: "data",
- name: 'name',
- url: "link",
- },
- span: 24,
- },
- {
- width: 144,
- label: "巡查时间",
- prop: "patrolTime",
- type: "date",
- format: "yyyy-MM-dd HH:mm:ss",
- valueFormat: "yyyy-MM-dd HH:mm:ss",
- rules: [
- {
- required: true,
- message: "请输入巡查时间",
- trigger: "blur",
- },
- ],
- }
- ],
+ {
+ width: 160,
+ searchLabelWidth: 80,
+ searchSpan: 4,
+ parent: false,
+ label: "所属社区",
+ prop: "neiName",
+ search: true,
+ type: "tree",
+ dicUrl: "/api/blade-system/region/treeToCommunity",
+ props: {
+ label: "name",
+ value: "name",
+ },
+ rules: [{
+ required: true,
+ message: "请选择所属社区",
+ trigger: "blur",
+ }, ],
},
- data: [],
- }
+ {
+ width: 96,
+ searchSpan: 4,
+ searchLabelWidth: 100,
+ addDisplay: false,
+ editDisplay: false,
+ viewDisplay: false,
+ label: "巡查人名称",
+ prop: "userName",
+ search: true,
+ },
+ {
+ label: "巡查标题",
+ prop: "name",
+ span: 24,
+ row: true,
+ searchSpan: 4,
+ search: true,
+ searchLabelWidth: 76,
+ rules: [{
+ required: true,
+ message: "请输入巡查标题",
+ trigger: "blur",
+ }, ],
+ },
+ {
+ label: "巡查内容",
+ prop: "context",
+ type: "textarea",
+ span: 24,
+ },
+
+ {
+ overHidden: true,
+ slot: true,
+ label: "巡查地址",
+ prop: "location",
+ type: 'map',
+ dataType: "string",
+ span: 24,
+ value: [117.966460, 28.431002, ""],
+ rules: [{
+ required: true,
+ message: "请选择巡查地址",
+ trigger: "blur",
+ }, ],
+ },
+
+ {
+ width: 96,
+ slot: true,
+ addDisplay: false,
+ editDisplay: false,
+ viewDisplay: false,
+ label: "经度",
+ prop: "longitude",
+ },
+
+ {
+ width: 96,
+ slot: true,
+ addDisplay: false,
+ editDisplay: false,
+ viewDisplay: false,
+ label: "纬度",
+ prop: "latitude",
+ },
+
+ {
+ width: 110,
+ label: "巡查图片",
+ prop: "url",
+ type: "upload",
+ listType: "picture-img",
+ action: "/api/blade-resource/oss/endpoint/put-file",
+ propsHttp: {
+ res: "data",
+ name: 'name',
+ url: "link",
+ },
+ span: 24,
+ },
+ {
+ width: 144,
+ label: "巡查时间",
+ prop: "patrolTime",
+ type: "date",
+ format: "yyyy-MM-dd HH:mm:ss",
+ valueFormat: "yyyy-MM-dd HH:mm:ss",
+ rules: [{
+ required: true,
+ message: "请输入巡查时间",
+ trigger: "blur",
+ }, ],
+ }
+ ],
+ },
+ data: [],
+ }
},
- watch: {
- },
+ watch: {},
computed: {
- ...mapGetters(["permission", "userInfo"]),
+ ...mapGetters(["permission", "userInfo"]),
- permissionList () {
- return {
- addBtn: this.vaildData(this.permission.gridPatrolRecord_add, true),
- viewBtn: this.vaildData(this.permission.gridPatrolRecord_view, true),
- delBtn: this.vaildData(this.permission.gridPatrolRecord_delete, true),
- editBtn: this.vaildData(this.permission.gridPatrolRecord_edit, true),
- }
- },
-
- ids () {
- let ids = []
- this.selectionList.forEach((ele) => {
- ids.push(ele.id)
- })
- return ids.join(",")
- },
-
- showLocation () {
- return (data) => {
- if (data != null && data.indexOf(',') != -1) {
- data = data.split(',')
-
- return data[2]
- } else {
- return data || ''
- }
- }
- },
-
- decimalProcessing () {
- return (data) => {
- if (data != null) {
- return Number(data).toFixed(6)
- } else {
- return ''
- }
- }
+ permissionList() {
+ return {
+ addBtn: this.vaildData(this.permission.gridPatrolRecord_add, true),
+ viewBtn: this.vaildData(this.permission.gridPatrolRecord_view, true),
+ delBtn: this.vaildData(this.permission.gridPatrolRecord_delete, true),
+ editBtn: this.vaildData(this.permission.gridPatrolRecord_edit, true),
}
- },
- methods: {
- locationDispose (data) {
+ },
+
+ ids() {
+ let ids = []
+ this.selectionList.forEach((ele) => {
+ ids.push(ele.id)
+ })
+ return ids.join(",")
+ },
+
+ showLocation() {
+ return (data) => {
+ if (data != null && data.indexOf(',') != -1) {
data = data.split(',')
- return {
- longitude: data[0],
- latitude: data[1],
- location: data[2]
- }
- },
-
- rowSave (row, done, loading) {
- if (row.url.length > 0) {
- var urls = []
- var split = row.url.split(",")
- split.forEach(url => {
- var names = url.split("jczz/")
- urls.push(names[1])
- })
- row.url = urls.join(",")
- }
-
- add({
- ...row,
- ...this.locationDispose(row.location)
- }).then(
- () => {
- this.onLoad(this.page)
- this.$message({
- type: "success",
- message: "操作成功!",
- })
- done()
- },
- (error) => {
- window.console.log(error)
- loading()
- }
- )
- },
-
- rowUpdate (row, index, done, loading) {
- if (row.url.length > 0) {
- var urls = []
- var split = row.url.split(",")
- split.forEach(url => {
- var names = url.split("jczz/")
- urls.push(names[1])
- })
- row.url = urls.join(",")
- }
-
- update({
- ...row,
- ...this.locationDispose(row.location)
- }).then(
- () => {
- this.onLoad(this.page)
- this.$message({
- type: "success",
- message: "操作成功!",
- })
- done()
- },
- (error) => {
- window.console.log(error)
- loading()
- }
- )
- },
-
- rowDel (row) {
- this.$confirm("确定将选择数据删除?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- })
- .then(() => {
- return remove(row.id)
- })
- .then(() => {
- this.onLoad(this.page)
- this.$message({
- type: "success",
- message: "操作成功!",
- })
- })
- },
-
- searchReset () {
- this.query = {}
- this.onLoad(this.page)
- },
-
- searchChange (params, done) {
- this.query = params
- this.page.currentPage = 1
- this.onLoad(this.page, params)
- done()
- },
- selectionChange (list) {
- this.selectionList = list
- },
- selectionClear () {
- this.selectionList = []
- this.$refs.crud.toggleSelection()
- },
- handleDelete () {
- if (this.selectionList.length === 0) {
- this.$message.warning("请选择至少一条数据")
- return
- }
- this.$confirm("确定将选择数据删除?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- })
- .then(() => {
- return remove(this.ids)
- })
- .then(() => {
- this.onLoad(this.page)
- this.$message({
- type: "success",
- message: "操作成功!",
- })
- this.$refs.crud.toggleSelection()
- })
- },
- beforeOpen (done, type) {
- if (["edit", "view"].includes(type)) {
- getGridPatrolRecord(this.form.id).then((res) => {
- this.form = res.data.data
-
- this.form.location = [this.form.longitude, this.form.latitude, this.form.location].join(',')
-
- if (this.form.url.length > 0) {
- var urls = []
- var names = this.form.url.split(",")
- names.forEach(name => {
- urls.push(website.minioUrl + name)
- })
- this.form.url = urls.join(",")
- }
- })
- }
- // con
- done()
- },
- currentChange (currentPage) {
- this.page.currentPage = currentPage
- },
- sizeChange (pageSize) {
- this.page.pageSize = pageSize
- },
- refreshChange () {
- this.onLoad(this.page, this.query)
- },
- onLoad (page, params = {}) {
- const { dateTime } = this.query
- let values = {
- ...params,
- }
- if (dateTime) {
- values = {
- ...params,
- startTime: dateTime[0],
- endTime: dateTime[1],
- ...this.query,
- }
- values.dateTime = null
- }
- this.loading = true
- getList(page.currentPage, page.pageSize, values).then((res) => {
- const data = res.data.data
- this.page.total = data.total
- this.data = data.records
- this.data.forEach(item => {
- if (item.url.length > 0) {
- var urls = []
- var names = item.url.split(",")
- names.forEach(name => {
- urls.push(website.minioUrl + name)
- })
- item.url = urls.join(",")
- }
- })
- this.loading = false
- this.selectionClear()
- }).catch(err => {
- setTimeout(() => {
- this.loading = false
- }, 1000)
- })
+ return data[2]
+ } else {
+ return data || ''
+ }
}
+ },
+
+ decimalProcessing() {
+ return (data) => {
+ if (data != null) {
+ return Number(data).toFixed(6)
+ } else {
+ return ''
+ }
+ }
+ }
},
-}
+ methods: {
+
+ handleExport() {
+ this.$confirm("是否导出网格巡查记录数据?", "提示", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning"
+ }).then(() => {
+ NProgress.start()
+ var data = {
+ ...this.query
+ }
+ data.isNine = 1
+ data = Qs.stringify(data)
+ exportBlob(
+ `/api/blade-gridPatrolRecord/gridPatrolRecord/export?${this.website.tokenHeader}=${getToken()}&` +
+ data
+ ).then(res => {
+ console.log('exportBlob', res)
+ downloadXls(res.data, `网格巡查记录${dateNow()}.xlsx`)
+ NProgress.done()
+ })
+ })
+ },
+
+ locationDispose(data) {
+ data = data.split(',')
+
+ return {
+ longitude: data[0],
+ latitude: data[1],
+ location: data[2]
+ }
+ },
+
+ rowSave(row, done, loading) {
+ if (row.url.length > 0) {
+ var urls = []
+ var split = row.url.split(",")
+ split.forEach(url => {
+ var names = url.split("jczz/")
+ urls.push(names[1])
+ })
+ row.url = urls.join(",")
+ }
+
+ add({
+ ...row,
+ ...this.locationDispose(row.location)
+ }).then(
+ () => {
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ done()
+ },
+ (error) => {
+ window.console.log(error)
+ loading()
+ }
+ )
+ },
+
+ rowUpdate(row, index, done, loading) {
+ if (row.url.length > 0) {
+ var urls = []
+ var split = row.url.split(",")
+ split.forEach(url => {
+ var names = url.split("jczz/")
+ urls.push(names[1])
+ })
+ row.url = urls.join(",")
+ }
+
+ update({
+ ...row,
+ ...this.locationDispose(row.location)
+ }).then(
+ () => {
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ done()
+ },
+ (error) => {
+ window.console.log(error)
+ loading()
+ }
+ )
+ },
+
+ rowDel(row) {
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ return remove(row.id)
+ })
+ .then(() => {
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ })
+ },
+
+ searchReset() {
+ this.query = {}
+ this.onLoad(this.page)
+ },
+
+ searchChange(params, done) {
+ this.query = params
+ this.page.currentPage = 1
+ this.onLoad(this.page, params)
+ done()
+ },
+ selectionChange(list) {
+ this.selectionList = list
+ },
+ selectionClear() {
+ this.selectionList = []
+ this.$refs.crud.toggleSelection()
+ },
+ handleDelete() {
+ if (this.selectionList.length === 0) {
+ this.$message.warning("请选择至少一条数据")
+ return
+ }
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ return remove(this.ids)
+ })
+ .then(() => {
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ this.$refs.crud.toggleSelection()
+ })
+ },
+ beforeOpen(done, type) {
+ if (["edit", "view"].includes(type)) {
+ getGridPatrolRecord(this.form.id).then((res) => {
+ this.form = res.data.data
+
+ this.form.location = [this.form.longitude, this.form.latitude, this.form.location].join(',')
+
+ if (this.form.url.length > 0) {
+ var urls = []
+ var names = this.form.url.split(",")
+ names.forEach(name => {
+ urls.push(website.minioUrl + name)
+ })
+ this.form.url = urls.join(",")
+ }
+ })
+ }
+ // con
+ done()
+ },
+ currentChange(currentPage) {
+ this.page.currentPage = currentPage
+ },
+ sizeChange(pageSize) {
+ this.page.pageSize = pageSize
+ },
+ refreshChange() {
+ this.onLoad(this.page, this.query)
+ },
+ onLoad(page, params = {}) {
+ const {
+ dateTime
+ } = this.query
+ let values = {
+ ...params,
+ }
+ if (dateTime) {
+ values = {
+ ...params,
+ startTime: dateTime[0],
+ endTime: dateTime[1],
+ ...this.query,
+ }
+ values.dateTime = null
+ }
+ this.loading = true
+ getList(page.currentPage, page.pageSize, values).then((res) => {
+ const data = res.data.data
+ this.page.total = data.total
+ this.data = data.records
+ this.data.forEach(item => {
+ if (item.url.length > 0) {
+ var urls = []
+ var names = item.url.split(",")
+ names.forEach(name => {
+ urls.push(website.minioUrl + name)
+ })
+ item.url = urls.join(",")
+ }
+ })
+ this.loading = false
+ this.selectionClear()
+ }).catch(err => {
+ setTimeout(() => {
+ this.loading = false
+ }, 1000)
+ })
+ }
+ },
+ }
</script>
<style>
-.avue-upload__icon {
+ .avue-upload__icon {
line-height: 6;
-}
-</style>
+ }
+</style>
\ No newline at end of file
diff --git a/src/views/cGovernance/punchCard.vue b/src/views/cGovernance/punchCard.vue
index 1471279..6a5cf31 100644
--- a/src/views/cGovernance/punchCard.vue
+++ b/src/views/cGovernance/punchCard.vue
@@ -1,225 +1,269 @@
<!-- 走访日志 -->
<template>
- <basic-container>
- <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" ref="crud" v-model="form"
- :permission="permissionList" @search-change="searchChange" @search-reset="searchReset"
- @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
- @refresh-change="refreshChange" @on-load="onLoad">
- </avue-crud>
- </basic-container>
+ <basic-container>
+ <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" ref="crud" v-model="form"
+ :permission="permissionList" @search-change="searchChange" @search-reset="searchReset"
+ @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
+ @refresh-change="refreshChange" @on-load="onLoad">
+ </avue-crud>
+ </basic-container>
</template>
<script>
-import { getList } from "@/api/punch_card"
-import { mapGetters } from "vuex"
-import website from '@/config/website'
+ import {
+ getList
+ } from "@/api/punch_card"
+ import {
+ mapGetters
+ } from "vuex"
+ import website from '@/config/website'
-export default {
- data () {
- return {
- form: {},
- query: {},
- loading: true,
- page: {
- pageSize: 10,
- currentPage: 1,
- total: 0,
+ export default {
+ data() {
+ return {
+ form: {},
+ query: {},
+ loading: true,
+ page: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0,
+ },
+ datetime: "",
+ selectionList: [],
+ option: {
+ labelWidth: 120,
+ searchLabelWidth: 96,
+ searchShow: true,
+ searchMenuSpan: 3,
+ menuWidth: 280,
+
+ menu: false,
+ addBtn: false,
+ border: true,
+ index: true,
+ selection: false,
+ height: "auto",
+ calcHeight: 54,
+ dialogWidth: 950,
+ tip: false,
+ //stripe:true,
+ viewBtn: true,
+ excelBtn: true,
+ dialogClickModal: false,
+ header: false,
+ column: [{
+ width: 96,
+ searchLabelWidth: 80,
+ searchSpan: 4,
+ addDisplay: false,
+ editDisplay: false,
+ viewDisplay: false,
+ label: "所属街道",
+ prop: "townStreetName",
+ search: true,
+ type: "tree",
+ dicUrl: "/api/blade-system/region/getTownTree",
+ props: {
+ label: "name",
+ value: "name"
+ },
+ rules: [{
+ required: true,
+ message: "请选择所属街道",
+ trigger: "blur",
+ }, ],
},
- datetime: "",
- selectionList: [],
- option: {
- labelWidth: 120,
- searchLabelWidth: 96,
- searchShow: true,
- searchMenuSpan: 3,
- menuWidth: 280,
-
- menu: false,
- addBtn: false,
- border: true,
- index: true,
- selection: false,
- height: "auto",
- calcHeight: 54,
- dialogWidth: 950,
- tip: false,
- //stripe:true,
- viewBtn: true,
- excelBtn: true,
- dialogClickModal: false,
- header:false,
- column: [
- {
- width: 110,
- label: "打卡人员",
- prop: "name",
- search: true,
- searchSpan: 4,
- searchLabelWidth: 76,
- },
- {
- label: "打卡时间",
- prop: "dateTime",
- type: "daterange",
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd",
- searchSpan: 5,
- searchRange: true,
- hide: true,
- addDisplay: false,
- editDisplay: false,
- viewDisplay: false,
- search: true,
- rules: [{
- required: true,
- message: "请选择打卡时间",
- trigger: "blur",
- },],
- },
- {
- width: 144,
- label: "打卡时间",
- prop: "createTime",
- type: "date",
- format: "yyyy-MM-dd HH:mm:ss",
- valueFormat: "yyyy-MM-dd HH:mm:ss",
- rules: [
- {
- required: true,
- message: "请输入走访时间",
- trigger: "blur",
- },
- ],
- },
- {
- label: "工作内容",
- prop: "workContent",
- },
- {
- width: 96,
- label: "经度",
- prop: "lng",
- },
- {
- width: 96,
- label: "纬度",
- prop: "lat",
- },
- {
- overHidden: true,
- label: "打卡地址",
- prop: "address",
- },
- {
- width: 110,
- label: "打卡图片",
- prop: "img",
- type: "upload",
- labelWidth: 120,
- listType: "picture-img",
- action: "/api/blade-resource/oss/endpoint/put-file",
- propsHttp: {
- res: "data",
- name: 'name',
- url: "link",
- },
- span: 24,
- },
-
- ],
+ {
+ width: 160,
+ searchLabelWidth: 80,
+ searchSpan: 4,
+ parent: false,
+ label: "所属社区",
+ prop: "neiName",
+ search: true,
+ type: "tree",
+ dicUrl: "/api/blade-system/region/treeToCommunity",
+ props: {
+ label: "name",
+ value: "name",
+ },
+ rules: [{
+ required: true,
+ message: "请选择所属社区",
+ trigger: "blur",
+ }, ],
},
- data: [],
- }
+ {
+ width: 110,
+ label: "打卡人员",
+ prop: "name",
+ search: true,
+ searchSpan: 4,
+ searchLabelWidth: 76,
+ },
+ {
+ label: "打卡时间",
+ prop: "dateTime",
+ type: "daterange",
+ format: "yyyy-MM-dd",
+ valueFormat: "yyyy-MM-dd",
+ searchSpan: 5,
+ searchRange: true,
+ hide: true,
+ addDisplay: false,
+ editDisplay: false,
+ viewDisplay: false,
+ search: true,
+ rules: [{
+ required: true,
+ message: "请选择打卡时间",
+ trigger: "blur",
+ }, ],
+ },
+ {
+ width: 144,
+ label: "打卡时间",
+ prop: "createTime",
+ type: "date",
+ format: "yyyy-MM-dd HH:mm:ss",
+ valueFormat: "yyyy-MM-dd HH:mm:ss",
+ rules: [{
+ required: true,
+ message: "请输入走访时间",
+ trigger: "blur",
+ }, ],
+ },
+ {
+ label: "工作内容",
+ prop: "workContent",
+ },
+ {
+ width: 96,
+ label: "经度",
+ prop: "lng",
+ },
+ {
+ width: 96,
+ label: "纬度",
+ prop: "lat",
+ },
+ {
+ overHidden: true,
+ label: "打卡地址",
+ prop: "address",
+ },
+ {
+ width: 110,
+ label: "打卡图片",
+ prop: "img",
+ type: "upload",
+ labelWidth: 120,
+ listType: "picture-img",
+ action: "/api/blade-resource/oss/endpoint/put-file",
+ propsHttp: {
+ res: "data",
+ name: 'name',
+ url: "link",
+ },
+ span: 24,
+ },
+
+ ],
+ },
+ data: [],
+ }
},
- watch: {
- },
+ watch: {},
computed: {
- ...mapGetters(["permission", "userInfo"]),
- permissionList () {
- return {
- addBtn: this.vaildData(this.permission.gridWorkLog_add, true),
- viewBtn: this.vaildData(this.permission.gridWorkLog_view, true),
- delBtn: this.vaildData(this.permission.gridWorkLog_delete, true),
- editBtn: this.vaildData(this.permission.gridWorkLog_edit, true),
- }
- },
- ids () {
- let ids = []
- this.selectionList.forEach((ele) => {
- ids.push(ele.id)
- })
- return ids.join(",")
- },
+ ...mapGetters(["permission", "userInfo"]),
+ permissionList() {
+ return {
+ addBtn: this.vaildData(this.permission.gridWorkLog_add, true),
+ viewBtn: this.vaildData(this.permission.gridWorkLog_view, true),
+ delBtn: this.vaildData(this.permission.gridWorkLog_delete, true),
+ editBtn: this.vaildData(this.permission.gridWorkLog_edit, true),
+ }
+ },
+ ids() {
+ let ids = []
+ this.selectionList.forEach((ele) => {
+ ids.push(ele.id)
+ })
+ return ids.join(",")
+ },
},
methods: {
- searchReset () {
- this.query = {}
- this.onLoad(this.page)
- },
- searchChange (params, done) {
- this.query = params
- this.page.currentPage = 1
- this.onLoad(this.page, params)
- done()
- },
- selectionChange (list) {
- this.selectionList = list
- },
- selectionClear () {
- this.selectionList = []
- this.$refs.crud.toggleSelection()
- },
+ searchReset() {
+ this.query = {}
+ this.onLoad(this.page)
+ },
+ searchChange(params, done) {
+ this.query = params
+ this.page.currentPage = 1
+ this.onLoad(this.page, params)
+ done()
+ },
+ selectionChange(list) {
+ this.selectionList = list
+ },
+ selectionClear() {
+ this.selectionList = []
+ this.$refs.crud.toggleSelection()
+ },
- currentChange (currentPage) {
- this.page.currentPage = currentPage
- },
- sizeChange (pageSize) {
- this.page.pageSize = pageSize
- },
- refreshChange () {
- this.onLoad(this.page, this.query)
- },
- onLoad (page, params = {}) {
- this.loading = true
+ currentChange(currentPage) {
+ this.page.currentPage = currentPage
+ },
+ sizeChange(pageSize) {
+ this.page.pageSize = pageSize
+ },
+ refreshChange() {
+ this.onLoad(this.page, this.query)
+ },
+ onLoad(page, params = {}) {
+ this.loading = true
- const { dateTime } = this.query
+ const {
+ dateTime
+ } = this.query
- if (dateTime) {
- this.query = {
- startTime: dateTime[0],
- endTime: dateTime[1],
- }
+ if (dateTime) {
+ this.query = {
+ startTime: dateTime[0],
+ endTime: dateTime[1],
+ }
+ }
+
+ getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+ const data = res.data.data
+ this.page.total = data.total
+ this.data = data.records.map(item => {
+ if (item.img && item.img.length > 0) {
+ var urls = []
+ var names = item.img.split(",")
+ names.forEach(name => {
+ urls.push(website.minioUrl + name)
+ })
+ item.img = urls.join(",")
}
- getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
- const data = res.data.data
- this.page.total = data.total
- this.data = data.records.map(item => {
- if (item.img && item.img.length > 0) {
- var urls = []
- var names = item.img.split(",")
- names.forEach(name => {
- urls.push(website.minioUrl + name)
- })
- item.img = urls.join(",")
- }
+ item.lat = Number(item.lat).toFixed(6)
+ item.lng = Number(item.lng).toFixed(6)
- item.lat = Number(item.lat).toFixed(6)
- item.lng = Number(item.lng).toFixed(6)
+ return item
+ })
- return item
- })
-
- this.loading = false
- this.selectionClear()
- })
- }
+ this.loading = false
+ this.selectionClear()
+ })
+ }
},
-}
+ }
</script>
<style>
-.avue-upload__icon {
+ .avue-upload__icon {
line-height: 6;
-}
-</style>
+ }
+</style>
\ No newline at end of file
diff --git a/src/views/cGovernance/punchCardTwo.vue b/src/views/cGovernance/punchCardTwo.vue
new file mode 100644
index 0000000..6a5cf31
--- /dev/null
+++ b/src/views/cGovernance/punchCardTwo.vue
@@ -0,0 +1,269 @@
+<!-- 走访日志 -->
+<template>
+ <basic-container>
+ <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" ref="crud" v-model="form"
+ :permission="permissionList" @search-change="searchChange" @search-reset="searchReset"
+ @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
+ @refresh-change="refreshChange" @on-load="onLoad">
+ </avue-crud>
+ </basic-container>
+</template>
+
+<script>
+ import {
+ getList
+ } from "@/api/punch_card"
+ import {
+ mapGetters
+ } from "vuex"
+ import website from '@/config/website'
+
+ export default {
+ data() {
+ return {
+ form: {},
+ query: {},
+ loading: true,
+ page: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0,
+ },
+ datetime: "",
+ selectionList: [],
+ option: {
+ labelWidth: 120,
+ searchLabelWidth: 96,
+ searchShow: true,
+ searchMenuSpan: 3,
+ menuWidth: 280,
+
+ menu: false,
+ addBtn: false,
+ border: true,
+ index: true,
+ selection: false,
+ height: "auto",
+ calcHeight: 54,
+ dialogWidth: 950,
+ tip: false,
+ //stripe:true,
+ viewBtn: true,
+ excelBtn: true,
+ dialogClickModal: false,
+ header: false,
+ column: [{
+ width: 96,
+ searchLabelWidth: 80,
+ searchSpan: 4,
+ addDisplay: false,
+ editDisplay: false,
+ viewDisplay: false,
+ label: "所属街道",
+ prop: "townStreetName",
+ search: true,
+ type: "tree",
+ dicUrl: "/api/blade-system/region/getTownTree",
+ props: {
+ label: "name",
+ value: "name"
+ },
+ rules: [{
+ required: true,
+ message: "请选择所属街道",
+ trigger: "blur",
+ }, ],
+ },
+ {
+ width: 160,
+ searchLabelWidth: 80,
+ searchSpan: 4,
+ parent: false,
+ label: "所属社区",
+ prop: "neiName",
+ search: true,
+ type: "tree",
+ dicUrl: "/api/blade-system/region/treeToCommunity",
+ props: {
+ label: "name",
+ value: "name",
+ },
+ rules: [{
+ required: true,
+ message: "请选择所属社区",
+ trigger: "blur",
+ }, ],
+ },
+ {
+ width: 110,
+ label: "打卡人员",
+ prop: "name",
+ search: true,
+ searchSpan: 4,
+ searchLabelWidth: 76,
+ },
+ {
+ label: "打卡时间",
+ prop: "dateTime",
+ type: "daterange",
+ format: "yyyy-MM-dd",
+ valueFormat: "yyyy-MM-dd",
+ searchSpan: 5,
+ searchRange: true,
+ hide: true,
+ addDisplay: false,
+ editDisplay: false,
+ viewDisplay: false,
+ search: true,
+ rules: [{
+ required: true,
+ message: "请选择打卡时间",
+ trigger: "blur",
+ }, ],
+ },
+ {
+ width: 144,
+ label: "打卡时间",
+ prop: "createTime",
+ type: "date",
+ format: "yyyy-MM-dd HH:mm:ss",
+ valueFormat: "yyyy-MM-dd HH:mm:ss",
+ rules: [{
+ required: true,
+ message: "请输入走访时间",
+ trigger: "blur",
+ }, ],
+ },
+ {
+ label: "工作内容",
+ prop: "workContent",
+ },
+ {
+ width: 96,
+ label: "经度",
+ prop: "lng",
+ },
+ {
+ width: 96,
+ label: "纬度",
+ prop: "lat",
+ },
+ {
+ overHidden: true,
+ label: "打卡地址",
+ prop: "address",
+ },
+ {
+ width: 110,
+ label: "打卡图片",
+ prop: "img",
+ type: "upload",
+ labelWidth: 120,
+ listType: "picture-img",
+ action: "/api/blade-resource/oss/endpoint/put-file",
+ propsHttp: {
+ res: "data",
+ name: 'name',
+ url: "link",
+ },
+ span: 24,
+ },
+
+ ],
+ },
+ data: [],
+ }
+ },
+ watch: {},
+ computed: {
+ ...mapGetters(["permission", "userInfo"]),
+ permissionList() {
+ return {
+ addBtn: this.vaildData(this.permission.gridWorkLog_add, true),
+ viewBtn: this.vaildData(this.permission.gridWorkLog_view, true),
+ delBtn: this.vaildData(this.permission.gridWorkLog_delete, true),
+ editBtn: this.vaildData(this.permission.gridWorkLog_edit, true),
+ }
+ },
+ ids() {
+ let ids = []
+ this.selectionList.forEach((ele) => {
+ ids.push(ele.id)
+ })
+ return ids.join(",")
+ },
+ },
+ methods: {
+ searchReset() {
+ this.query = {}
+ this.onLoad(this.page)
+ },
+ searchChange(params, done) {
+ this.query = params
+ this.page.currentPage = 1
+ this.onLoad(this.page, params)
+ done()
+ },
+ selectionChange(list) {
+ this.selectionList = list
+ },
+ selectionClear() {
+ this.selectionList = []
+ this.$refs.crud.toggleSelection()
+ },
+
+ currentChange(currentPage) {
+ this.page.currentPage = currentPage
+ },
+ sizeChange(pageSize) {
+ this.page.pageSize = pageSize
+ },
+ refreshChange() {
+ this.onLoad(this.page, this.query)
+ },
+ onLoad(page, params = {}) {
+ this.loading = true
+
+ const {
+ dateTime
+ } = this.query
+
+ if (dateTime) {
+ this.query = {
+ startTime: dateTime[0],
+ endTime: dateTime[1],
+ }
+ }
+
+ getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+ const data = res.data.data
+ this.page.total = data.total
+ this.data = data.records.map(item => {
+ if (item.img && item.img.length > 0) {
+ var urls = []
+ var names = item.img.split(",")
+ names.forEach(name => {
+ urls.push(website.minioUrl + name)
+ })
+ item.img = urls.join(",")
+ }
+
+ item.lat = Number(item.lat).toFixed(6)
+ item.lng = Number(item.lng).toFixed(6)
+
+ return item
+ })
+
+ this.loading = false
+ this.selectionClear()
+ })
+ }
+ },
+ }
+</script>
+
+<style>
+ .avue-upload__icon {
+ line-height: 6;
+ }
+</style>
\ No newline at end of file
diff --git a/src/views/cGovernance/taskECallTwo/index.vue b/src/views/cGovernance/taskECallTwo/index.vue
index 05b063a..63571ff 100644
--- a/src/views/cGovernance/taskECallTwo/index.vue
+++ b/src/views/cGovernance/taskECallTwo/index.vue
@@ -194,7 +194,7 @@
slot: true
},
{
- width: 100,
+ width: 120,
label: "诉求人联系电话",
prop: "applicantPhone",
rules: [{
@@ -305,10 +305,10 @@
// value: [117.966460, 28.431002, ""]
},
{
+ width: 100,
label: "事发地点-经度",
prop: "sceneGeoLng",
disabled: true,
- width: 100,
rules: [{
required: true,
message: "请输入事发地点-经度",
@@ -316,6 +316,7 @@
}, ],
},
{
+ width: 100,
label: "事发地点-纬度",
prop: "sceneGeoLat",
disabled: true,
@@ -797,7 +798,7 @@
values.dateTime = null
}
this.loading = true
- this.getDeptInfo();
+ // this.getDeptInfo();
getList(page.currentPage, page.pageSize, values).then((res) => {
const data = res.data.data
diff --git a/src/views/grid/gridman.vue b/src/views/grid/gridman.vue
index e9216df..7b357f9 100644
--- a/src/views/grid/gridman.vue
+++ b/src/views/grid/gridman.vue
@@ -1,389 +1,415 @@
<template>
- <basic-container>
- <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" ref="crud" @row-del="rowDel"
- v-model="form" :permission="permissionList" @row-update="rowUpdate" @row-save="rowSave"
- :before-open="beforeOpen" @search-change="searchChange" @search-reset="searchReset"
- @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
- @refresh-change="refreshChange" @on-load="onLoad">
- <template slot="menuLeft">
- <el-button size="small" icon="el-icon-delete" plain v-if="permission.gridman_delete" @click="handleDelete">删
- 除
- </el-button>
- </template>
- <template slot-scope="{row, size}" slot="mobile">
- <el-button :size="size" type="text" @click="showStringDispose(row, 'mobileflag')"
- v-text="textDispose(row, 'mobileflag', 'mobile')">
- </el-button>
- </template>
- </avue-crud>
- </basic-container>
+ <basic-container>
+ <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" ref="crud" @row-del="rowDel"
+ v-model="form" :permission="permissionList" @row-update="rowUpdate" @row-save="rowSave" :before-open="beforeOpen"
+ @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"
+ @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
+ <template slot="menuLeft">
+ <el-button size="small" icon="el-icon-delete" plain v-if="permission.gridman_delete" @click="handleDelete">删
+ 除
+ </el-button>
+ </template>
+ <template slot-scope="{row, size}" slot="mobile">
+ <el-button :size="size" type="text" @click="showStringDispose(row, 'mobileflag')"
+ v-text="textDispose(row, 'mobileflag', 'mobile')">
+ </el-button>
+ </template>
+ </avue-crud>
+ </basic-container>
</template>
<script>
-import { getList, remove, update, add, getGridman } from "@/api/grid/gridman"
-import { mapGetters } from "vuex"
-import website from '@/config/website'
-export default {
- data () {
- return {
- form: {},
- query: {},
- loading: true,
- page: {
- pageSize: 10,
- currentPage: 1,
- total: 0,
+ import {
+ getList,
+ remove,
+ update,
+ add,
+ getGridman
+ } from "@/api/grid/gridman"
+ import {
+ mapGetters
+ } from "vuex"
+ import website from '@/config/website'
+ export default {
+ data() {
+ return {
+ form: {},
+ query: {},
+ loading: true,
+ page: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0,
+ },
+ datetime: "",
+ selectionList: [],
+ option: {
+ labelWidth: 96,
+ searchLabelWidth: 96,
+ searchShow: true,
+ searchMenuSpan: 3,
+ menuWidth: 210,
+
+ height: "auto",
+ calcHeight: 54,
+ dialogWidth: 950,
+ tip: false,
+ border: true,
+ //stripe:true,
+ index: true,
+ viewBtn: true,
+ selection: true,
+ dialogClickModal: false,
+ column: [
+ // {
+ // hide: true,
+ // parent: false,
+ // label: "所属社区",
+ // prop: "communityCode",
+ // search: false,
+ // type: "tree",
+ // dataType: 'string',
+ // dicUrl: "/api/blade-system/region/tree",
+ // props: {
+ // label: "name",
+ // value: "id",
+ // },
+ // cascader: ["gridCode"],
+ // rules: [{
+ // required: true,
+ // message: "请选择所属社区",
+ // trigger: "blur",
+ // }, ],
+ // },
+
+ {
+ hide: true,
+ parent: false,
+ label: "所属社区",
+ prop: "communityCode",
+ search: false,
+ type: "tree",
+ dicUrl: "/api/blade-system/region/treeToCommunity",
+ cascader: ['gridCode'],
+ props: {
+ label: "name",
+ value: "id",
+ },
+ rules: [{
+ required: true,
+ message: "请选择所属社区",
+ trigger: "blur",
+ }, ],
},
- datetime: "",
- selectionList: [],
- option: {
- labelWidth: 96,
- searchLabelWidth: 96,
- searchShow: true,
- searchMenuSpan: 3,
- menuWidth: 210,
- height: "auto",
- calcHeight: 54,
- dialogWidth: 950,
- tip: false,
- border: true,
- //stripe:true,
- index: true,
- viewBtn: true,
- selection: true,
- dialogClickModal: false,
- column: [
- {
- hide: true,
- parent: false,
- label: "所属社区",
- prop: "communityCode",
- search: false,
- type: "tree",
- dataType: 'string',
- dicUrl: "/api/blade-system/region/tree",
- props: {
- label: "name",
- value: "id",
- },
- cascader: ["gridCode"],
- rules: [
- {
- required: true,
- message: "请选择所属社区",
- trigger: "blur",
- },
- ],
- },
- {
- label: "所属网格",
- prop: "gridCode",
- hide: true,
- type: "tree",
- cell: true,
- props: {
- label: "gridName",
- value: "gridCode",
- },
- dicUrl:
- "/api/blade-grid/grid/getGridList?communityCode={{communityCode}}",
- rules: [
- {
- required: true,
- message: "请输入网格名称",
- trigger: "blur",
- },
- ],
- },
-
- {
- width: 110,
- label: "网格员",
- prop: "gridmanName",
- searchSpan: 4,
- search: true,
- searchLabelWidth: 60,
- rules: [
- {
- required: true,
- message: "请输入网格员",
- trigger: "blur",
- },
- ],
- },
-
- {
- width: 120,
- label: "联系电话",
- prop: "mobile",
- searchSpan: 4,
- search: true,
- rules: [
- {
- required: true,
- message: "请输入联系电话",
- trigger: "blur",
- },
- ],
- slot: true
- },
-
- {
- overHidden: true,
- label: "所属社区",
- display: false,
- prop: "communityName",
- search: true,
- searchSpan: 4,
- rules: [{
- required: true,
- message: "请选择所属社区",
- trigger: "blur",
- }],
- },
-
- {
- overHidden: true,
- label: "所属网格",
- addDisplay: false,
- editDisplay: false,
- viewDisplay: false,
- prop: "gridName",
- rules: [{
- required: true,
- message: "请选择所属网格",
- trigger: "blur",
- }],
- },
-
- {
- width: 110,
- label: "形象照",
- prop: "picUrl",
- type: "upload",
- listType: "picture-img",
- action: "/api/blade-resource/oss/endpoint/put-file-attach",
- propsHttp: {
- res: "data",
- url: "link",
- },
- span: 24,
- },
- {
- label: "备注",
- prop: "remark",
- type: "textarea",
- hide: true,
- minRows: 6,
- span: 24,
- },
- ],
+ {
+ label: "所属网格",
+ prop: "gridCode",
+ hide: true,
+ type: "tree",
+ cell: true,
+ props: {
+ label: "gridName",
+ value: "gridCode",
+ },
+ dicUrl: "/api/blade-grid/grid/getGridList?communityCode={{communityCode}}",
+ rules: [{
+ required: true,
+ message: "请输入网格名称",
+ trigger: "blur",
+ }, ],
},
- data: [],
- }
+
+ {
+ width: 110,
+ label: "网格员",
+ prop: "gridmanName",
+ searchSpan: 4,
+ search: true,
+ searchLabelWidth: 60,
+ rules: [{
+ required: true,
+ message: "请输入网格员",
+ trigger: "blur",
+ }, ],
+ },
+
+ {
+ width: 120,
+ label: "联系电话",
+ prop: "mobile",
+ searchSpan: 4,
+ search: true,
+ rules: [{
+ required: true,
+ message: "请输入联系电话",
+ trigger: "blur",
+ }, ],
+ slot: true
+ },
+
+ {
+ overHidden: true,
+ label: "所属社区",
+ display: false,
+ prop: "communityName",
+ search: true,
+ type: "tree",
+ searchSpan: 4,
+ dicUrl: "/api/blade-system/region/treeToCommunity",
+ props: {
+ label: "name",
+ value: "name",
+ },
+ rules: [{
+ required: true,
+ message: "请选择所属社区",
+ trigger: "blur",
+ }],
+ },
+
+ {
+ overHidden: true,
+ label: "所属网格",
+ addDisplay: false,
+ editDisplay: false,
+ viewDisplay: false,
+ prop: "gridName",
+ rules: [{
+ required: true,
+ message: "请选择所属网格",
+ trigger: "blur",
+ }],
+ },
+
+ {
+ width: 110,
+ label: "形象照",
+ prop: "picUrl",
+ type: "upload",
+ listType: "picture-img",
+ action: "/api/blade-resource/oss/endpoint/put-file-attach",
+ propsHttp: {
+ res: "data",
+ url: "link",
+ },
+ span: 24,
+ },
+ {
+ label: "备注",
+ prop: "remark",
+ type: "textarea",
+ hide: true,
+ minRows: 6,
+ span: 24,
+ },
+ ],
+ },
+ data: [],
+ }
},
- watch: {
- },
+ watch: {},
computed: {
- ...mapGetters(["permission", "userInfo"]),
- permissionList () {
- return {
- addBtn: this.vaildData(this.permission.gridman_add, true),
- viewBtn: this.vaildData(this.permission.gridman_view, true),
- delBtn: this.vaildData(this.permission.gridman_delete, true),
- editBtn: this.vaildData(this.permission.gridman_edit, true),
- }
- },
- ids () {
- let ids = []
- this.selectionList.forEach((ele) => {
- ids.push(ele.id)
- })
- return ids.join(",")
- },
- textDispose () {
- return (row, flag, type) => {
- if (row[flag] || row[type] == null) {
- return row[type]
- } else {
- if (type == 'principalIdCard') {
- return row[type].replace(/^(.{6})(?:\d+)(.{4})$/, "$1******$2")
- } else {
- return row[type].replace(/^(.{3})(?:\d+)(.{4})$/, "$1****$2")
- }
- }
- }
+ ...mapGetters(["permission", "userInfo"]),
+ permissionList() {
+ return {
+ addBtn: this.vaildData(this.permission.gridman_add, true),
+ viewBtn: this.vaildData(this.permission.gridman_view, true),
+ delBtn: this.vaildData(this.permission.gridman_delete, true),
+ editBtn: this.vaildData(this.permission.gridman_edit, true),
}
+ },
+ ids() {
+ let ids = []
+ this.selectionList.forEach((ele) => {
+ ids.push(ele.id)
+ })
+ return ids.join(",")
+ },
+ textDispose() {
+ return (row, flag, type) => {
+ if (row[flag] || row[type] == null) {
+ return row[type]
+ } else {
+ if (type == 'principalIdCard') {
+ return row[type].replace(/^(.{6})(?:\d+)(.{4})$/, "$1******$2")
+ } else {
+ return row[type].replace(/^(.{3})(?:\d+)(.{4})$/, "$1****$2")
+ }
+ }
+ }
+ }
},
methods: {
- showStringDispose (row, type) {
- row[type] = !row[type]
- },
+ showStringDispose(row, type) {
+ row[type] = !row[type]
+ },
- rowSave (row, done, loading) {
- if (row.picUrl) {
- var names = row.picUrl.split("jczz/")
- row.picUrl = names[1]
- }
- add(row).then(
- () => {
- this.onLoad(this.page)
- this.$message({
- type: "success",
- message: "操作成功!",
- })
- done()
- },
- (error) => {
- window.console.log(error)
- loading()
- }
- )
- },
- rowUpdate (row, index, done, loading) {
- if (row.picUrl) {
- var names = row.picUrl.split("jczz/")
- row.picUrl = names[1]
- }
- update(row).then(
- () => {
- this.onLoad(this.page)
- this.$message({
- type: "success",
- message: "操作成功!",
- })
- done()
- },
- (error) => {
- window.console.log(error)
- loading()
- }
- )
- },
- rowDel (row) {
- this.$confirm("确定将选择数据删除?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- })
- .then(() => {
- return remove(row.id)
- })
- .then(() => {
- this.onLoad(this.page)
- this.$message({
- type: "success",
- message: "操作成功!",
- })
- })
- },
- searchReset () {
- this.query = {}
- this.onLoad(this.page)
- },
- searchChange (params, done) {
- this.query = params
- this.page.currentPage = 1
- this.onLoad(this.page, params)
- done()
- },
- selectionChange (list) {
- this.selectionList = list
- },
- selectionClear () {
- this.selectionList = []
- this.$refs.crud.toggleSelection()
- },
- handleDelete () {
- if (this.selectionList.length === 0) {
- this.$message.warning("请选择至少一条数据")
- return
- }
- this.$confirm("确定将选择数据删除?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- })
- .then(() => {
- return remove(this.ids)
- })
- .then(() => {
- this.onLoad(this.page)
- this.$message({
- type: "success",
- message: "操作成功!",
- })
- this.$refs.crud.toggleSelection()
- })
- },
- beforeOpen (done, type) {
- if (["edit", "view"].includes(type)) {
- const param = {
- id: this.form.id
- }
- getGridman(param).then((res) => {
- this.form = res.data.data
- if (this.form.picUrl) {
- this.form.picUrl = website.minioUrl + this.form.picUrl
- }
- })
- }
- // con
- done()
- },
- currentChange (currentPage) {
- this.page.currentPage = currentPage
- },
- sizeChange (pageSize) {
- this.page.pageSize = pageSize
- },
- refreshChange () {
- this.onLoad(this.page, this.query)
- },
- onLoad (page, params = {}) {
- const { dateTime } = this.query
- let values = {
- ...params,
- }
- if (dateTime) {
- values = {
- ...params,
- startTime: dateTime[0],
- endTime: dateTime[1],
- ...this.query,
- }
- values.dateTime = null
- }
- this.loading = true
- getList(page.currentPage, page.pageSize, values).then((res) => {
- const data = {
- ...res.data.data,
- records: res.data.data.records.map(item => {
- return {
- ...item,
- 'mobileflag': false
- }
- })
- }
- this.page.total = data.total
- this.data = data.records
- this.data.forEach(item => {
- if (item.picUrl) {
- item.picUrl = website.minioUrl + item.picUrl
- }
- })
- this.loading = false
- this.selectionClear()
- })
+ rowSave(row, done, loading) {
+ if (row.picUrl) {
+ var names = row.picUrl.split("jczz/")
+ row.picUrl = names[1]
}
+ add(row).then(
+ () => {
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ done()
+ },
+ (error) => {
+ window.console.log(error)
+ loading()
+ }
+ )
+ },
+ rowUpdate(row, index, done, loading) {
+ if (row.picUrl) {
+ var names = row.picUrl.split("jczz/")
+ row.picUrl = names[1]
+ }
+ update(row).then(
+ () => {
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ done()
+ },
+ (error) => {
+ window.console.log(error)
+ loading()
+ }
+ )
+ },
+ rowDel(row) {
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ return remove(row.id)
+ })
+ .then(() => {
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ })
+ },
+ searchReset() {
+ this.query = {}
+ this.onLoad(this.page)
+ },
+ searchChange(params, done) {
+ this.query = params
+ this.page.currentPage = 1
+ this.onLoad(this.page, params)
+ done()
+ },
+ selectionChange(list) {
+ this.selectionList = list
+ },
+ selectionClear() {
+ this.selectionList = []
+ this.$refs.crud.toggleSelection()
+ },
+ handleDelete() {
+ if (this.selectionList.length === 0) {
+ this.$message.warning("请选择至少一条数据")
+ return
+ }
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ return remove(this.ids)
+ })
+ .then(() => {
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ this.$refs.crud.toggleSelection()
+ })
+ },
+ beforeOpen(done, type) {
+ if (["edit", "view"].includes(type)) {
+ const param = {
+ id: this.form.id
+ }
+ getGridman(param).then((res) => {
+ this.form = res.data.data
+ if (this.form.picUrl) {
+ this.form.picUrl = website.minioUrl + this.form.picUrl
+ }
+ })
+ }
+ // con
+ done()
+ },
+ currentChange(currentPage) {
+ this.page.currentPage = currentPage
+ },
+ sizeChange(pageSize) {
+ this.page.pageSize = pageSize
+ },
+ refreshChange() {
+ this.onLoad(this.page, this.query)
+ },
+ onLoad(page, params = {}) {
+ const {
+ dateTime
+ } = this.query
+ let values = {
+ ...params,
+ }
+ if (dateTime) {
+ values = {
+ ...params,
+ startTime: dateTime[0],
+ endTime: dateTime[1],
+ ...this.query,
+ }
+ values.dateTime = null
+ }
+ this.loading = true
+ getList(page.currentPage, page.pageSize, values).then((res) => {
+ const data = {
+ ...res.data.data,
+ records: res.data.data.records.map(item => {
+ return {
+ ...item,
+ 'mobileflag': false
+ }
+ })
+ }
+ this.page.total = data.total
+ this.data = data.records
+ this.data.forEach(item => {
+ if (item.picUrl) {
+ item.picUrl = website.minioUrl + item.picUrl
+ }
+ })
+ this.loading = false
+ this.selectionClear()
+ })
+ }
}
-}
+ }
</script>
<style>
-.avue-upload__icon {
+ .avue-upload__icon {
line-height: 6;
-}
-</style>
+ }
+</style>
\ No newline at end of file
diff --git a/src/views/grid/index.vue b/src/views/grid/index.vue
index 5ca1eac..22ee3ad 100644
--- a/src/views/grid/index.vue
+++ b/src/views/grid/index.vue
@@ -109,6 +109,7 @@
trigger: "blur",
}, ],
},
+
{
overHidden: true,
label: "网格名称",
diff --git a/src/views/patrolList/patrolRecord.vue b/src/views/patrolList/patrolRecord.vue
index e1d2332..b599ccd 100644
--- a/src/views/patrolList/patrolRecord.vue
+++ b/src/views/patrolList/patrolRecord.vue
@@ -23,15 +23,12 @@
</avue-crud>
- <el-drawer title="巡查详情" :visible.sync="isDetail" :append-to-body="true" size="60%" direction="rtl">
-
+ <!-- <el-drawer title="巡查详情" :visible.sync="isDetail" :append-to-body="true" size="60%" direction="rtl">
<el-card class="trackClass" style="overflow-y: auto">
-
<el-collapse v-model="activeNames" @change="handleChange">
- <div v-for="(item, index) in 10" :key="index">
- <el-collapse-item title="一致性 Consistency" name="1">
+ <div v-for="(item, index) in patrolTree" :key="index">
+ <el-collapse-item :title="item.title" name="1">
<div>{{ index }}
-
<el-collapse v-model="activeNames" @change="handleChange">
<div v-for="(item, index) in 3" :key="index">
<el-collapse-item title="er致性 Consistency" name="1">
@@ -43,38 +40,64 @@
</el-collapse-item>
</div>
</el-collapse>
-
- <!-- <el-form :model="form" label-position="right" size="mini" class="taskinfoForm" label-width="70px">
- <el-row>
- <el-col :span="24">
- <el-form-item label="巡查内容">
- <el-input :disabled="true" v-model="form.content" autocomplete="off"></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="24">
- <el-form-item label="巡检状态">
- <el-input :disabled="true" v-model="form.$status" autocomplete="off"></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="24">
- <el-form-item label="巡查图片">
- <el-upload action="" :disabled="true" list-type="picture-card" :file-list="form.elUploadImageArr">
- </el-upload>
- </el-form-item>
-
- </el-col>
- </el-row>
- </el-form> -->
-
</el-card>
+ </el-drawer> -->
- <!-- <DcMap v-if="isDetail" :is-detail="isDetail" :range="form.taskRoute" :patrolRoute="form.patrolRoute">
- </DcMap> -->
-
+ <el-drawer title="消防自查详情" :visible.sync="isDetail" :append-to-body="true" size="40%" direction="rtl">
+ <div class="question-list" v-for="(item, index) in patrolTree" :key='tIndex' v-loading="drawerLoading">
+ <div class="question-type">
+ <div class="type-name">
+ {{ item.title }}
+ </div>
+ <!-- <div class="icon-box"><i class="el-icon-arrow-down" v-show="tItem.isShowQList"></i><i class="el-icon-arrow-up"
+ v-show="!tItem.isShowQList"></i></div> -->
+ </div>
+ <div class="question-item" v-for="(item2, index2) in item.children" :key='index2' v-show="item.hasChildren">
+ <div class="question-name">
+ <div class="key">{{ index2 + 1 }}、{{ item2.title }}</div>
+ <div class="value">
+ <el-radio v-model="item2.radio" label="1">存在</el-radio>
+ <el-radio v-model="item2.radio" label="2">不存在</el-radio>
+ </div>
+ </div>
+ <div class="yh-pic-box">
+ <div class="yh-pic-name">
+ 隐患图片
+ </div>
+ <div class="yh-pic-list">
+ <div class="pic-item" v-for="pic in item2.imageUrlsList">
+ <el-image style="width: 100px; height: 100px" :src="pic" :fit="fit"></el-image>
+ </div>
+ </div>
+ </div>
+ <div class="yh-remark">
+ <div class="yh-remark-name">
+ 隐患描述
+ </div>
+ <div class="yh-remark-value">
+ {{ item2.remark }}
+ </div>
+ </div>
+ <div class="yh-pic-box">
+ <div class="yh-pic-name">
+ 整改后图片
+ </div>
+ <div class="yh-pic-list">
+ <div class="pic-item" v-for="pic in item2.rectificationImageUrlsList">
+ <el-image style="width: 100px; height: 100px" :src="pic" :fit="fit"></el-image>
+ </div>
+ </div>
+ </div>
+ <div class="yh-remark">
+ <div class="yh-remark-name">
+ 整改后描述
+ </div>
+ <div class="yh-remark-value">
+ {{ item2.rectificationRemark }}
+ </div>
+ </div>
+ </div>
+ </div>
</el-drawer>
</basic-container>
@@ -195,10 +218,12 @@
slot: true
},
{
+ width: 140,
label: "场所地址",
prop: "location",
span: 24,
row: true,
+ overHidden: true,
searchSpan: 4,
searchLabelWidth: 46,
},
@@ -211,12 +236,32 @@
span: 24,
},
{
+ width: 140,
label: "创建时间",
prop: "createTime",
span: 24,
row: true,
searchSpan: 4,
searchLabelWidth: 46,
+ },
+ {
+ width: 140,
+ label: "是否存在隐患",
+ prop: "hiddenDangerNumber",
+ type: 'select',
+ span: 24,
+ hide: true,
+ searchSpan: 3,
+ searchLabelWidth: 110,
+ search: true,
+ dicData: [{
+ label: '不存在',
+ value: 0
+ }, {
+ label: '存在',
+ value: 1
+ }]
+
},
],
},
@@ -281,6 +326,53 @@
getDetail(row) {
this.isDetail = true
+ getDetail(row.id).then(res => {
+ // console.log("****1245****", res.data)
+ let recordInfo = res.data
+ getPatrolGroupTree({
+ type: 1,
+ childType: 1
+ }).then((res) => {
+ const dataResult = res.data.data
+ dataResult.forEach(item => {
+ if (item.hasChildren) {
+ item.children.forEach(item2 => {
+ recordInfo.data.patrolRecordVOList.forEach(item3 => {
+ if (item2.id == item3.itemId) {
+ item2.rectificationRemark = item3.rectificationRemark
+ // item2.rectificationImageUrls = item3.rectificationImageUrls
+ // item2.rectificationTime = item3.rectificationTime
+ // item2.imageUrls = item3.imageUrls
+
+ item2.imageUrlsList = []
+ item2.rectificationImageUrlsList = []
+ if (item3.imageUrls) {
+ item2.imageUrlsList = item3.imageUrls.split(',').map(ele => {
+ return website.minioUrl + ele
+ })
+ }
+ if (item3.rectificationImageUrls) {
+ item2.rectificationImageUrlsList = item3.rectificationImageUrls.split(',')
+ .map(ele => {
+ return website.minioUrl + ele
+ })
+ }
+
+ item2.radio = "1"
+ } else {
+ item2.radio = '2'
+ }
+ })
+
+ })
+ }
+ })
+
+
+ this.patrolTree = dataResult
+ console.log("****1245****", dataResult)
+ })
+ })
},
searchReset() {
this.query = {}
@@ -370,16 +462,14 @@
this.loading = false
this.selectionClear()
})
- getPatrolGroupTree({
- type: 1,
- childType: 1
- }).then((res) => {
- const data = res.data.data
- this.patrolTree = data
- // const column = this.findObject(this.option.column, "articleList")
- // column.dicData = res.data.data
- this.loading = false
- })
+ // getPatrolGroupTree({
+ // type: 1,
+ // childType: 1
+ // }).then((res) => {
+ // const data = res.data.data
+ // this.patrolTree = data
+ // this.loading = false
+ // })
},
updateFb(row) {
if (row.publish == "0") {
@@ -420,4 +510,120 @@
.avue-upload__icon {
line-height: 6;
}
-</style>
+
+ .title {
+ margin: 10px;
+ height: 40px;
+ background-color: #eee;
+ display: flex;
+ align-items: center;
+
+ .icon {
+ width: 4px;
+ height: 18px;
+ background-color: #409dfe;
+ margin: 0 10px;
+ color: transparent;
+ }
+ }
+
+ .basic-info {
+ padding: 0 20px;
+ font-size: 14px;
+
+ .info-item {
+ display: flex;
+ padding: 10px;
+
+ .info-name {
+ width: 100px;
+ display: flex;
+ align-items: center;
+ }
+
+ .info-value {
+ display: flex;
+ align-items: center;
+ }
+ }
+ }
+
+ .question-list {
+ padding: 0 20px;
+ font-size: 14px;
+
+ .question-type {
+ height: 60px;
+ display: flex;
+ align-items: center;
+ cursor: pointer;
+ justify-content: space-between;
+ padding-right: 20px;
+
+ .type-name {}
+
+ .icon-box {}
+ }
+
+ .question-item {
+ margin-bottom: 20px;
+ padding: 10px;
+ background: #f5f7fa;
+ border-radius: 8px;
+
+ &>div {
+ margin: 14px 0;
+ }
+
+ .question-name {
+ display: flex;
+
+ .key {
+ width: 80%;
+ padding-right: 20px;
+ word-break: break-all;
+ }
+
+ .value {
+ width: 20%;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ }
+ }
+
+ .yh-pic-box {
+ display: flex;
+ height: 100px;
+
+ .yh-pic-name {
+ width: 100px;
+ display: flex;
+ align-items: center;
+ justify-content: left;
+ }
+
+ .yh-pic-list {
+ width: 0;
+ flex: 1;
+ display: flex;
+ }
+ }
+
+ .yh-remark {
+ display: flex;
+
+ .yh-remark-name {
+ width: 100px;
+ display: flex;
+ align-items: center;
+ justify-content: left;
+ }
+
+ .yh-remark-value {
+ word-break: break-all;
+ }
+ }
+ }
+ }
+</style>
\ No newline at end of file
diff --git a/src/views/place/practitioner.vue b/src/views/place/practitioner.vue
index db0871b..8a95b6a 100644
--- a/src/views/place/practitioner.vue
+++ b/src/views/place/practitioner.vue
@@ -33,14 +33,7 @@
</el-button>
</template>
- <template slot="menuLeft">
- <!-- <el-button size="small" icon="el-icon-delete" plain v-if="permission.place_delete" @click="handleDelete">删 除
- </el-button> -->
- <el-button type="primary" size="small" @click="handleQueryAlarm(1)">未成年人 ({{ countInfo.minors }}) 人
- </el-button>
- <el-button type="primary" size="small" @click="handleQueryAlarm(2)">少数民族 ({{ countInfo.nationalMinority }}) 人
- </el-button>
- </template>
+ <!-- -->
<template slot-scope="{row, size}" slot="menu">
<!-- <el-button :size="size" type="text" icon="el-icon-s-check" v-if="permission.place_audit_cur"
diff --git a/src/views/place/practitionerTwo.vue b/src/views/place/practitionerTwo.vue
new file mode 100644
index 0000000..db0871b
--- /dev/null
+++ b/src/views/place/practitionerTwo.vue
@@ -0,0 +1,677 @@
+<template>
+ <basic-container>
+ <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" ref="crud" v-model="form"
+ :permission="permissionList" @row-save="rowSave" @row-del="rowDel" :before-open="beforeOpen"
+ @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"
+ @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
+ <template slot-scope="{row, size}" slot="age">
+ <el-tag :size="size">{{
+ row.age
+ }}</el-tag>
+ </template>
+
+ <template slot-scope="{row, size}" slot="gender">
+ <el-tag :size="size" :type="showGender(row.gender).type">{{
+ showGender(row.gender).text
+ }}</el-tag>
+ </template>
+
+ <template slot-scope="{row, size}" slot="resignationFlag">
+ <el-tag :size="size" :type="showResignationFlag(row.resignationFlag).type">{{
+ showResignationFlag(row.resignationFlag).text
+ }}</el-tag>
+ </template>
+
+ <template slot-scope="{row, size}" slot="telephone">
+ <el-button :size="size" type="text" @click="showStringDispose(row, 'telephoneflag')"
+ v-text="textDispose(row, 'telephoneflag', 'telephone')">
+ </el-button>
+ </template>
+ <template slot-scope="{row, size}" slot="idCard">
+ <el-button :size="size" type="text" @click="showStringDispose(row, 'idCardflag')"
+ v-text="textDispose(row, 'idCardflag', 'idCard')">
+ </el-button>
+ </template>
+
+ <template slot="menuLeft">
+ <!-- <el-button size="small" icon="el-icon-delete" plain v-if="permission.place_delete" @click="handleDelete">删 除
+ </el-button> -->
+ <el-button type="primary" size="small" @click="handleQueryAlarm(1)">未成年人 ({{ countInfo.minors }}) 人
+ </el-button>
+ <el-button type="primary" size="small" @click="handleQueryAlarm(2)">少数民族 ({{ countInfo.nationalMinority }}) 人
+ </el-button>
+ </template>
+
+ <template slot-scope="{row, size}" slot="menu">
+ <!-- <el-button :size="size" type="text" icon="el-icon-s-check" v-if="permission.place_audit_cur"
+ @click="auditCur({ ...row, confirmFlag: 1 })">审核
+ </el-button>
+
+ <el-button :size="size" type="text" icon="el-icon-edit" v-if="permission.place_manage_tenants"
+ @click="ManageTenants(row)">场所维护
+ </el-button> -->
+ </template>
+
+ <template slot-scope="{row, size}" slot="principalPhone">
+ <el-button :size="size" type="text" @click="showStringDispose(row, 'principalPhoneflag')"
+ v-text="textDispose(row, 'principalPhoneflag', 'principalPhone')">
+ </el-button>
+ </template>
+ <template slot-scope="{row, size}" slot="principalIdCard">
+ <el-button :size="size" type="text" @click="showStringDispose(row, 'principalIdCardflag')"
+ v-text="textDispose(row, 'principalIdCardflag', 'principalIdCard')">
+ </el-button>
+ </template>
+ </avue-crud>
+
+ <baseAllInfo ref="BaseAllInfo"></baseAllInfo>
+
+ <el-dialog class="place-info-box audit-info-box" title="审核" append-to-body :visible.sync="auditBasePopup"
+ width="30%">
+ <auditBase></auditBase>
+ </el-dialog>
+ </basic-container>
+</template>
+
+<script>
+ import {
+ getPractitionerList as getList,
+ add,
+ getWarningPersonnelCount as getCount
+ } from "@/api/place/place"
+ import {
+ remove
+ } from "@/api/place/practitioner"
+ import {
+ mapGetters
+ } from "vuex"
+
+ import website from '@/config/website'
+
+ import auditBase from './components/auditBase'
+ import baseAllInfo from './components/baseAllInfo'
+
+ export default {
+ data() {
+ //手机号格式校验
+ let validatorPhone = function(rule, value, callback) {
+ if (value) {
+ if (!/^1[3456789]\d{9}$/.test(value)) {
+ callback(new Error('手机号格式有误!'))
+ } else {
+ callback()
+ }
+ }
+ callback()
+ }
+
+ return {
+ form: {},
+ query: {},
+ loading: true,
+
+ page: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0,
+ },
+ datetime: "",
+ selectionList: [],
+ option: {
+ labelWidth: 120,
+ searchLabelWidth: 96,
+ searchShow: true,
+ searchMenuSpan: 3,
+ menuWidth: 160,
+ height: "auto",
+ calcHeight: 54,
+ dialogWidth: 950,
+ tip: false,
+ border: true,
+ addBtn: false,
+ index: true,
+ viewBtn: true,
+ editBtn: false,
+ delBtn: true,
+ dialogClickModal: false,
+ column: [{
+ label: "所属街道",
+ parent: false,
+ search: true,
+ searchSpan: 4,
+ prop: "townStreetName",
+ type: "tree",
+ dicUrl: "/api/blade-system/region/getTownTree",
+ props: {
+ label: "name",
+ value: "name"
+ },
+ rules: [{
+ required: true,
+ message: "请选择所属街道",
+ trigger: "blur",
+ }, ],
+ },
+
+ {
+ parent: false,
+ label: "所属社区",
+ prop: "neiName",
+ width: 150,
+ search: true,
+ type: "tree",
+ searchSpan: 4,
+ dicUrl: "/api/blade-system/region/treeToCommunity",
+ props: {
+ label: "name",
+ value: "name",
+ },
+ cascader: ["gridCode"],
+ rules: [{
+ required: true,
+ message: "请选择所属社区",
+ trigger: "blur",
+ }, ],
+ },
+ {
+ overHidden: true,
+ label: "姓名",
+ span: 12,
+ prop: "name",
+ searchSpan: 3,
+ search: true,
+ searchLabelWidth: 76,
+
+ },
+ {
+ label: "性别",
+ prop: "gender",
+ width: 80,
+ align: "center",
+ type: "select",
+ dicData: [{
+ label: "男",
+ value: 1
+ },
+ {
+ label: "女",
+ value: 0
+ }
+ ]
+ },
+ {
+ label: "民族",
+ width: 80,
+ dicUrl: "/api/blade-system/dict-biz/tree?code=nationType",
+ props: {
+ label: "title",
+ value: "key",
+ },
+ prop: "ethnicity",
+ type: "select",
+ dataType: "number"
+ },
+ {
+ overHidden: true,
+ label: "身份证号",
+ prop: "idCard",
+ // search: true,
+ width: 160,
+ searchSpan: 4,
+ slot: true,
+ },
+ {
+ label: "电话号码",
+ prop: "telephone",
+ searchSpan: 4,
+ searchLabelWidth: 110,
+ search: true,
+ },
+ {
+ width: 80,
+ label: "年龄",
+ prop: "age",
+ align: "center"
+ },
+ {
+ minWidth: 160,
+ label: "现居住地",
+ prop: "tempAddress",
+ },
+ {
+ label: "岗位",
+ prop: "jobNature",
+ }, {
+ width: 110,
+ label: '从业人员照片',
+ prop: 'employerImg',
+ fileType: 'img',
+ type: "upload",
+ listType: "picture-card",
+ dataType: "string",
+ disabled: true,
+ row: true,
+ span: 12,
+ }, {
+ label: "工作单位",
+ prop: "employer",
+ searchSpan: 4
+ },
+ {
+ width: 160,
+ label: "标签",
+ addDisplay: false,
+ editDisplay: false,
+ viewDisplay: false,
+ prop: "categoryName",
+ searchSpan: 4
+ },
+ {
+ label: "状态",
+ searchLabelWidth: 60,
+ prop: "resignationFlag",
+ align: 'center',
+ searchSpan: 3,
+ search: true,
+ type: "select",
+ dicData: [{
+ label: "在职",
+ value: "1"
+ },
+ {
+ label: "已离职",
+ value: "2"
+ }
+ ]
+ },
+ {
+ label: "入职时间",
+ prop: "employmentTime",
+ hide: true,
+ },
+ {
+ label: "离职时间",
+ prop: "resignationTime",
+ hide: true,
+ },
+ {
+ label: "预警人员",
+ addDisplay: false,
+ editDisplay: false,
+ viewDisplay: false,
+ prop: "type",
+ searchSpan: 3,
+ hide: true,
+ type: "select",
+ search: true,
+ dicData: [{
+ label: "未成年人",
+ value: 1
+ },
+ {
+ label: "少数民族",
+ value: 2
+ },
+ {
+ label: "以上都有",
+ value: 3
+ }
+ ],
+ },
+ ],
+ },
+ data: [],
+
+ auditBasePopup: false,
+
+ countInfo: {}
+ }
+ },
+
+ provide() {
+ return {
+ placeElement: this,
+ }
+ },
+
+ components: {
+ auditBase,
+ baseAllInfo
+ },
+
+
+ computed: {
+ ...mapGetters(["permission", "userInfo"]),
+ permissionList() {
+ return {
+ // addBtn: this.vaildData(this.permission.place_add, true),
+ viewBtn: this.vaildData(this.permission.place_practitioner_view, true),
+ delBtn: this.vaildData(this.permission.place_practitioner_delete, true),
+ // editBtn: this.vaildData(this.permission.place_edit, true),
+ }
+ },
+ ids() {
+ let ids = []
+ this.selectionList.forEach((ele) => {
+ ids.push(ele.id)
+ })
+ return ids.join(",")
+ },
+
+ showConfirmFlag() {
+ return (data) => {
+ let tags = {
+ text: '',
+ type: ''
+ }
+ if (data == 1) {
+ tags = {
+ text: '待审核',
+ type: 'warning'
+ }
+ } else if (data == 2) {
+ tags = {
+ text: '已审核',
+ type: 'success'
+ }
+ } else if (data == 3) {
+ tags = {
+ text: '未通过',
+ type: 'danger'
+ }
+ } else if (data == 4) {
+ tags = {
+ text: '待完善',
+ type: 'info'
+ }
+ }
+
+ return tags
+ }
+ },
+
+ showResignationFlag() {
+ return (data) => {
+ let tags = {
+ text: '',
+ type: ''
+ }
+
+ if (data == 1) {
+ tags = {
+ text: '在职',
+ type: 'success'
+ }
+ } else if (data == 2) {
+ tags = {
+ text: '已离职',
+ type: 'danger'
+ }
+ }
+
+ return tags
+ }
+ },
+
+ showGender() {
+ return (data) => {
+ let tags = {
+ text: '',
+ type: ''
+ }
+
+ if (data == 1) {
+ tags = {
+ text: '男',
+ type: 'primary'
+ }
+ } else if (data == 0) {
+ tags = {
+ text: '女',
+ type: 'primary'
+ }
+ }
+
+ return tags
+ }
+ },
+
+ decimalProcessing() {
+ return (data) => {
+ if (data != null) {
+ return Number(data).toFixed(6)
+ } else {
+ return ''
+ }
+ }
+ },
+
+ textDispose() {
+ return (row, flag, type) => {
+ if (row[flag] || row[type] == null) {
+ return row[type]
+ } else {
+ if (type == 'principalIdCard') {
+ return row[type].replace(/^(.{6})(?:\d+)(.{4})$/, "$1******$2")
+ } else {
+ return row[type].replace(/^(.{3})(?:\d+)(.{4})$/, "$1****$2")
+ }
+ }
+ }
+ }
+ },
+ methods: {
+ handleQueryAlarm(type) {
+ this.query.type = type
+ this.onLoad(this.page)
+ },
+ showStringDispose(row, type) {
+ row[type] = !row[type]
+ },
+
+ locationDispose(data) {
+ data = data.split(',')
+
+ return {
+ longitude: data[0],
+ latitude: data[1],
+ location: data[2]
+ }
+ },
+ rowDel(row) {
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning"
+ })
+ .then(() => {
+ return remove(row.id)
+ })
+ .then(() => {
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!"
+ })
+ })
+ },
+
+ auditCur(row) {
+ this.curAuditRow = row
+ this.auditBasePopup = true
+ },
+
+ ManageTenants(item) {
+ this.$refs.BaseAllInfo.initOpen(item)
+ },
+
+ rowSave(row, done, loading) {
+ if (row.imageUrls.length > 0) {
+ var urls = []
+ var split = row.imageUrls.split(",").filter(item => item != '')
+ split.forEach(url => {
+ var names = url.split("jczz/")
+ urls.push(names[1])
+ })
+ row.imageUrls = urls.join(",")
+ }
+
+ let label = row.label
+
+ if (row.smallLabel != '') {
+ label = label + ',' + row.smallLabel
+ }
+
+ delete row.smallLabel
+
+ add({
+ ...row,
+ label,
+ ...this.locationDispose(row.location)
+ }).then(
+ () => {
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ done()
+ },
+ (error) => {
+ window.console.log(error)
+ loading()
+ }
+ )
+ },
+
+ searchReset() {
+ this.query = {}
+ this.onLoad(this.page)
+ },
+ searchChange(params, done) {
+ this.query = params
+ this.page.currentPage = 1
+ this.onLoad(this.page, params)
+ done()
+ },
+ selectionChange(list) {
+ this.selectionList = list
+ },
+ selectionClear() {
+ this.selectionList = []
+ this.$nextTick(() => {
+ this.$refs.crud && this.$refs.crud.toggleSelection()
+ })
+ },
+ handleDelete() {
+ if (this.selectionList.length === 0) {
+ this.$message.warning("请选择至少一条数据")
+ return
+ }
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ return remove(this.ids)
+ })
+ .then(() => {
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ this.$refs.crud.toggleSelection()
+ })
+ },
+
+ beforeOpen(done, type) {
+ if (["edit", "view"].includes(type)) {
+ if (this.form.resignationFlag) {
+ if (this.form.resignationFlag == 1) {
+ this.form.resignationFlag = '在职'
+ }
+ if (this.form.resignationFlag == 2) {
+ this.form.resignationFlag = '已离职'
+ }
+ // this.form.employerImg = this.form.employerImg.split(",").filter(item => item != '').map(item => website.minioUrl + item).join(',')
+ }
+ done()
+ }
+ },
+
+ currentChange(currentPage) {
+ this.page.currentPage = currentPage
+ },
+ sizeChange(pageSize) {
+ this.page.pageSize = pageSize
+ },
+ refreshChange() {
+ this.onLoad(this.page, this.query)
+ },
+ onLoad(page, params = {}) {
+ this.loading = true
+
+ getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then((res) => {
+ const data = res.data.data
+
+ this.page.total = data.total
+
+ this.data = data.records
+ this.getPeopleCount();
+
+ this.data.forEach(item => {
+ this.$set(item, 'telephoneflag', false)
+ this.$set(item, 'idCardflag', false)
+ if (item.employerImg && item.employerImg != '' && item.employerImg != null && item.employerImg
+ .length) {
+ var urls = []
+ var names = item.employerImg.split(",").filter(item => item != '')
+ names.forEach(name => {
+ urls.push(website.minioUrl + name)
+ })
+ item.employerImg = urls.join(",")
+ }
+ })
+
+ this.loading = false
+ this.selectionClear()
+ })
+ },
+
+
+ getPeopleCount(params = {}) {
+ // 在职的
+ // params = {
+ // resignationFlag:1
+ // }
+ getCount(params).then(res => {
+ this.countInfo = res.data.data;
+ })
+ }
+
+ }
+ }
+</script>
+
+<style>
+ .avue-upload__icon {
+ line-height: 6;
+ }
+
+ .type-row {
+ display: flex;
+ padding: 0 0 20px;
+ }
+
+ .type-item {
+ padding: 12px 12px;
+ background-color: #429FFF;
+ color: #fff;
+ font-size: 14px;
+ margin-right: 30px;
+ border-radius: 6px;
+ text-align: center;
+ }
+</style>
\ No newline at end of file
diff --git a/src/views/property/article.vue b/src/views/property/article.vue
new file mode 100644
index 0000000..9e7ae0f
--- /dev/null
+++ b/src/views/property/article.vue
@@ -0,0 +1,820 @@
+<template>
+ <basic-container>
+ <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" ref="crud" @row-del="rowDel"
+ v-model="form" :permission="permissionList" @row-update="rowUpdate" @row-save="rowSave" :before-open="beforeOpen"
+ @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"
+ @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
+ <template slot="menuLeft">
+ <el-button size="small" icon="el-icon-delete" plain v-if="permission.article_delete" @click="handleDelete">删
+ 除
+ </el-button>
+ <!-- <el-button size="small" icon="el-icon-s-order" plain @click="kqcomment">开启评论
+ </el-button>
+ <el-button size="small" icon="el-icon-s-release" plain @click="gbcomment">关闭评论
+ </el-button> -->
+ </template>
+
+ <template slot-scope="{type,size,row }" slot="menu">
+ <!-- <el-button icon="el-icon-circle-plus-outline" :size="size" :type="type" @click.stop="openDilog(row, 0)">
+ 公益报名
+ </el-button>
+ <el-button icon="el-icon-circle-plus-outline" :size="size" :type="type" @click.stop="openDilog(row, 1)">
+ 创建议题
+ </el-button> -->
+ <el-button v-if="row.publish == '1'" icon="el-icon-close" :size="size" :type="type" @click.stop="updateFb(row)">
+ 撤销
+ </el-button>
+ <el-button v-if="row.publish == '0'" icon="el-icon-check" :size="size" :type="type" @click.stop="updateFb(row)">
+ 发布
+ </el-button>
+ </template>
+
+ <template slot-scope="{ row, size }" slot="publish">
+ <el-tag :size="size" :type="showPublish(row.publish).type" v-text="showPublish(row.publish).text">
+ </el-tag>
+ </template>
+
+ <template slot-scope="{ row }" slot="iscomment">
+ <el-switch @change="iscommentInput($event, row)" v-model="row.iscomment" :active-value="'1'"
+ :inactive-value="'0'" active-color="#13ce66" inactive-color="#ccc">
+ </el-switch>
+ </template>
+ </avue-crud>
+
+ <el-dialog title="" append-to-body :visible.sync="dialogVisibles" width="50%" :before-close="handleClose">
+ <span slot="title" class="dialog-footer">
+ {{ discussForm.ontitle }}
+ </span>
+ <div id="" v-if="discussForm.eventType == 1">
+ <avue-form @submit="handleSubmit" :option="optionDiscuss" v-model="discussForm"></avue-form>
+ </div>
+
+ <div id="" v-else>
+ <avue-form @submit="handleSubmit" :option="optionEnroll" v-model="discussForm">
+ </avue-form>
+ </div>
+ </el-dialog>
+ </basic-container>
+</template>
+
+<script>
+ import {
+ getList,
+ remove,
+ update,
+ add,
+ getNotice,
+ upcomment
+ } from "@/api/article/article"
+
+ import {
+ getListPd,
+ removePd,
+ updatePd,
+ addPd,
+ getNoticePd,
+ upcommentPd
+ } from "@/api/discuss/publicDiscuss"
+
+ import website from '@/config/website'
+
+
+ import {
+ getDistrictTree
+ } from "@/api/district/index"
+
+ import {
+ mapGetters
+ } from "vuex"
+
+ export default {
+ data() {
+ return {
+ discussForm: {
+ ontitle: '',
+ title: '',
+ openFlag: 0,
+ numberRestrictions: 0,
+ voteRestrictions: 0,
+ userRestrictions: 0,
+ endTime: '',
+ articleId: '',
+ createTime: '',
+ updateTime: '',
+ deleteFlag: '',
+ repeatVote: 0,
+ voteNumberPublic: 0,
+ appointUser: '',
+ userIds: '',
+ eventType: 1,
+ },
+ dialogVisibles: false,
+ form: {},
+ query: {},
+ loading: true,
+ page: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0,
+ },
+ datetime: "",
+ selectionList: [],
+ option: {
+ labelWidth: 96,
+ searchLabelWidth: 96,
+ searchShow: true,
+ searchMenuSpan: 3,
+ menuWidth: 280,
+
+ height: "auto",
+ calcHeight: 54,
+ dialogWidth: 950,
+ tip: false,
+ border: true,
+ //stripe:true,
+ index: true,
+ viewBtn: true,
+ selection: true,
+ excelBtn: true,
+ dialogClickModal: false,
+ column: [{
+ overHidden: true,
+ label: "文章标题",
+ prop: "title",
+ span: 24,
+ row: true,
+ searchSpan: 4,
+ search: true,
+ searchLabelWidth: 76,
+ rules: [{
+ required: true,
+ message: "请输入文章标题",
+ trigger: "blur",
+ }, ],
+ },
+ {
+ width: 110,
+ label: "文章封面",
+ prop: "url",
+ // align:'center',
+ type: "upload",
+ listType: "picture-img",
+ action: "/api/blade-resource/oss/endpoint/put-file",
+ propsHttp: {
+ res: "data",
+ url: "link",
+ },
+ // hide: true,
+ span: 24,
+ },
+ {
+ width: 100,
+ label: "文章来源",
+ prop: "sourceName",
+ search: true,
+ searchSpan: 4,
+ span: 24,
+ rules: [{
+ required: true,
+ message: "请输入文章类型",
+ trigger: "blur",
+ }, ],
+ },
+ {
+ label: "文章范围",
+ prop: "articleList",
+ span: 12,
+ minRows: 2,
+ type: "tree",
+ dataType: "string",
+ multiple: true,
+ tags: true,
+ // search: true,
+ dicData: [],
+ props: {
+ label: "name",
+ value: 'id'
+ },
+ hide: true,
+ },
+ {
+ width: 100,
+ label: "文章类型",
+ prop: "articleType",
+ addDisplay: true,
+ editDisplay: true,
+ viewDisplay: true,
+ searchSpan: 4,
+ checkStrictly: true,
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=articleType",
+ props: {
+ label: "dictValue",
+ value: "dictKey",
+ },
+ search: true,
+ type: "tree",
+ rules: [{
+ required: true,
+ message: "请选择文章类型",
+ trigger: "blur",
+ }, ],
+ },
+ // {
+ // label: "发布时间",
+ // prop: "dateTime",
+ // type: "daterange",
+ // format: "yyyy-MM-dd",
+ // valueFormat: "yyyy-MM-dd",
+ // searchSpan: 6,
+ // searchRange: true,
+ // hide: true,
+ // addDisplay: false,
+ // editDisplay: false,
+ // viewDisplay: false,
+ // search: true,
+ // rules: [{
+ // required: true,
+ // message: "请选择发布时间",
+ // trigger: "blur",
+ // }, ],
+ // },
+ {
+ width: 100,
+ label: "发布时间",
+ prop: "createTime",
+ type: "date",
+ format: "yyyy-MM-dd",
+ valueFormat: "yyyy-MM-dd HH:mm:ss",
+ search: true,
+ addDisplay: false,
+ editDisplay: false,
+ viewDisplay: false,
+ },
+ {
+ width: 100,
+ label: "发布状态",
+ prop: "publish",
+ searchSpan: 4,
+ value: "0",
+ slot: true,
+ search: true,
+ type: "select",
+ rules: [{
+ required: true,
+ message: "请选择发布状态",
+ trigger: "blur",
+ }, ],
+ dicData: [{
+ label: "未发布",
+ value: "0",
+ },
+ {
+ label: "已发布",
+ value: "1",
+ }
+ ],
+ },
+ {
+ width: 100,
+ label: "评论区",
+ prop: "iscomment",
+ slot: true,
+ type: "switch",
+ activeColor: "#13ce66",
+ inactiveColor: "#ccc",
+ value: '1',
+ dicData: [{
+ label: "关闭",
+ value: "0",
+ },
+ {
+ label: "开启",
+ value: "1",
+ }
+ ],
+ },
+ {
+ label: "视频",
+ prop: "videoUrl",
+ type: "upload",
+ accept: "video/mp4",
+ display: false,
+ hide: true,
+ span: 24,
+ listType: "picture-img",
+ action: "/api/depl/put-depl",
+ propsHttp: {
+ url: "data",
+ },
+ },
+ {
+ label: "文章内容",
+ prop: "content",
+ component: "AvueUeditor",
+ options: {
+ action: "/api/blade-resource/oss/endpoint/put-file",
+ // customConfig: {
+ // lineHeights: ['1', '1.15', '1.6', '2', '2.5', '3']
+ // },//wangEditor编辑的配置
+ props: {
+ res: "data",
+ url: "link",
+ },
+ },
+ hide: true,
+ minRows: 6,
+ span: 24,
+ },
+ ],
+ },
+ data: [],
+ optionEnroll: {
+ column: [{
+ label: "",
+ type: 'title',
+ prop: "title",
+ span: 24,
+ row: true,
+ offset: 2,
+ styles: {
+ fontSize: '24px'
+ }
+ }, {
+ labelWidth: 100,
+ label: '开启',
+ prop: 'openFlag',
+ type: 'radio',
+ button: true,
+ row: true,
+ offset: 6,
+ dicData: [{
+ label: '开启',
+ value: 0
+ }, {
+ label: '不开启',
+ value: 1
+ }]
+ },
+ {
+ labelWidth: 100,
+ label: '开启投票',
+ prop: 'openFlag',
+ type: 'radio',
+ button: true,
+ row: true,
+ offset: 6,
+ dicData: [{
+ label: '开启',
+ value: 0
+ }, {
+ label: '不开启',
+ value: 1
+ }]
+ },
+ {
+ label: "截止时间",
+ row: true,
+ offset: 6,
+ prop: "endTime",
+ type: "datetime",
+ format: "yyyy-MM-dd hh:mm:ss",
+ valueFormat: "timestamp",
+ },
+ ]
+ },
+ optionDiscuss: {
+ column: [{
+ label: "",
+ type: 'title',
+ prop: "title",
+ span: 24,
+ row: true,
+ offset: 2,
+ styles: {
+ fontSize: '24px'
+ }
+ }, {
+ labelWidth: 100,
+ label: '开启投票',
+ prop: 'openFlag',
+ type: 'radio',
+ button: true,
+ row: true,
+ offset: 6,
+ dicData: [{
+ label: '开启',
+ value: 0
+ }, {
+ label: '不开启',
+ value: 1
+ }]
+ }, {
+ labelWidth: 100,
+ label: '开启签名',
+ prop: 'signatureFlag',
+ type: 'radio',
+ button: true,
+ row: true,
+ offset: 6,
+ dicData: [{
+ label: '开启',
+ value: 0
+ }, {
+ label: '不开启',
+ value: 1
+ }]
+ },
+ {
+ label: "截止时间",
+ row: true,
+ offset: 6,
+ prop: "endTime",
+ type: "datetime",
+ format: "yyyy-MM-dd hh:mm:ss",
+ valueFormat: "timestamp",
+ },
+ ]
+ },
+ districtTree: [],
+ }
+ },
+ watch: {
+ "form.articleType": {
+ handler(val) {
+ if (val) {
+ var videoUrl = this.findObject(this.option.column, "videoUrl")
+ var content = this.findObject(this.option.column, "content")
+ if (val.indexOf('ksp') != -1) {
+ videoUrl.display = true
+ content.display = false
+ videoUrl.rules = [{
+ required: false,
+ message: "请选择视频",
+ trigger: "blur",
+ }, ]
+ } else {
+ videoUrl.display = false
+ content.display = true
+ videoUrl.rules = ""
+ }
+ }
+ },
+ immediate: true,
+ }
+ },
+ computed: {
+ ...mapGetters(["permission", "userInfo"]),
+ permissionList() {
+ return {
+ addBtn: this.vaildData(this.permission.article_add, true),
+ viewBtn: this.vaildData(this.permission.article_view, true),
+ delBtn: this.vaildData(this.permission.article_delete, true),
+ editBtn: this.vaildData(this.permission.article_edit, true),
+ }
+ },
+ ids() {
+ let ids = []
+ this.selectionList.forEach((ele) => {
+ ids.push(ele.id)
+ })
+ return ids.join(",")
+ },
+
+ showPublish() {
+ return (data) => {
+ if (data == 0) {
+ return {
+ text: '未发布',
+ type: 'info'
+ }
+ } else if (data == 1) {
+ return {
+ text: '已发布',
+ type: 'success'
+ }
+ }
+ }
+ }
+ },
+ methods: {
+ iscommentInput(e, data) {
+ upcomment(data.id, e).then(() => {
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ })
+ },
+
+ openDilog(row, type) {
+ this.dialogVisibles = true
+ this.discussForm.eventType = type
+ this.discussForm.articleId = row.id
+ this.discussForm.title = row.title
+ if (type == 0) {
+ this.discussForm.ontitle = '公益报名'
+ } else {
+ this.discussForm.ontitle = '创建议题'
+ }
+ },
+
+ handleSubmit(form, done) {
+ done()
+ addPd(form).then(
+ () => {
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ this.dialogVisibles = false
+ done()
+ },
+ (error) => {
+ window.console.log(error)
+ // loading();
+ }
+ )
+ },
+
+ handleClose(done) {
+ done()
+ // this.$confirm('确认关闭?')
+ // .then(_ => {
+ // done();
+ // })
+ // .catch(_ => {});
+ },
+ rowSave(row, done, loading) {
+ if (row.videoUrl.length == 0) {
+ row.videoUrl = ""
+ }
+ row.userid = this.userInfo.user_id
+ row.articleRange = JSON.stringify(row.articleList)
+ if (row.url.length > 0) {
+ var urls = []
+ var split = row.url.split(",")
+ split.forEach(url => {
+ var names = url.split("jczz/")
+ urls.push(names[1])
+ })
+ row.url = urls.join(",")
+ }
+ add(row).then(
+ () => {
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ done()
+ },
+ (error) => {
+ window.console.log(error)
+ loading()
+ }
+ )
+ },
+ rowUpdate(row, index, done, loading) {
+ row.articleRange = JSON.stringify(row.articleList)
+ if (row.url.length > 0) {
+ var urls = []
+ var split = row.url.split(",")
+ split.forEach(url => {
+ var names = url.split("jczz/")
+ urls.push(names[1])
+ })
+ row.url = urls.join(",")
+ }
+
+ update(row).then(
+ () => {
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ done()
+ },
+ (error) => {
+ window.console.log(error)
+ loading()
+ }
+ )
+ },
+ rowDel(row) {
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ return remove(row.id)
+ })
+ .then(() => {
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ })
+ },
+ searchReset() {
+ this.query = {}
+ this.onLoad(this.page)
+ },
+ searchChange(params, done) {
+ this.query = params
+ this.page.currentPage = 1
+ this.onLoad(this.page, params)
+ done()
+ },
+ selectionChange(list) {
+ this.selectionList = list
+ },
+ selectionClear() {
+ this.selectionList = []
+ this.$refs.crud.toggleSelection()
+ },
+ handleDelete() {
+ if (this.selectionList.length === 0) {
+ this.$message.warning("请选择至少一条数据")
+ return
+ }
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ return remove(this.ids)
+ })
+ .then(() => {
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ this.$refs.crud.toggleSelection()
+ })
+ },
+ beforeOpen(done, type) {
+ if (["edit", "view"].includes(type)) {
+ getNotice(this.form.id).then((res) => {
+ let data = res.data.data
+ if (data.url.length > 0) {
+ var urls = []
+ var names = data.url.split(",")
+ names.forEach(name => {
+ urls.push(website.minioUrl + name)
+ })
+ data.url = urls.join(",")
+ }
+ data.articleList = JSON.parse(data.articleRange)
+ this.form = data
+ })
+ }
+ done()
+ },
+ currentChange(currentPage) {
+ this.page.currentPage = currentPage
+ },
+ sizeChange(pageSize) {
+ this.page.pageSize = pageSize
+ },
+ refreshChange() {
+ this.onLoad(this.page, this.query)
+ },
+ onLoad(page, params = {}) {
+ const {
+ dateTime
+ } = this.query
+ let values = {
+ ...params,
+ }
+ if (dateTime) {
+ values = {
+ ...params,
+ startTime: dateTime[0],
+ endTime: dateTime[1],
+ ...this.query,
+ }
+ values.dateTime = null
+ }
+ values.type = 0
+ this.loading = true
+ getList(page.currentPage, page.pageSize, values).then((res) => {
+ const data = res.data.data
+ this.page.total = data.total
+ this.data = data.records
+ this.data.forEach(item => {
+ if (item.url.length > 0) {
+ var urls = []
+ var names = item.url.split(",")
+ names.forEach(name => {
+ urls.push(website.minioUrl + name)
+ })
+ item.url = urls.join(",")
+ }
+ })
+ this.loading = false
+ this.selectionClear()
+ })
+ getDistrictTree(params = {}).then((res) => {
+ const data = res.data.data
+ this.districtTree = data
+ const column = this.findObject(this.option.column, "articleList")
+ column.dicData = res.data.data
+ this.loading = false
+ })
+ },
+ updateFb(row) {
+ if (row.publish == "0") {
+ row.publish = "1"
+ } else {
+ row.publish = "0"
+ }
+
+ if (row.url.length > 0) {
+ var urls = []
+ var split = row.url.split(",")
+ split.forEach(url => {
+ var names = url.split("jczz/")
+ urls.push(names[1])
+ })
+ row.url = urls.join(",")
+ }
+
+ update(row).then(
+ () => {
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ done()
+ },
+ (error) => {
+ window.console.log(error)
+ loading()
+ }
+ )
+ },
+ kqcomment() {
+ if (this.selectionList.length === 0) {
+ this.$message.warning("请选择至少一条数据")
+ return
+ }
+ this.$confirm("确定将选择数据开启评论?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ }).then(() => {
+ return upcomment(this.ids, "1")
+ })
+ .then(() => {
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ this.$refs.crud.toggleSelection()
+ })
+ },
+ gbcomment() {
+ if (this.selectionList.length === 0) {
+ this.$message.warning("请选择至少一条数据")
+ return
+ }
+ this.$confirm("确定将选择数据开启评论?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ }).then(() => {
+ return upcomment(this.ids, "0")
+ })
+ .then(() => {
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ this.$refs.crud.toggleSelection()
+ })
+ }
+ },
+ }
+</script>
+
+<style lang="scss" scoped>
+ .avue-upload__icon {
+ line-height: 6;
+ }
+
+ :deep(.avue-form__menu--center) {
+ text-align: left;
+ }
+
+ :deep(.avue-form__menu--center .el-button) {
+ margin: 0 5px 0 0;
+ }
+</style>
\ No newline at end of file
diff --git a/src/views/property/articleCategory.vue b/src/views/property/articleCategory.vue
new file mode 100644
index 0000000..b1c94f1
--- /dev/null
+++ b/src/views/property/articleCategory.vue
@@ -0,0 +1,405 @@
+<template>
+ <basic-container>
+ <!-- <avue-crud :option="optionParent" :table-loading="loading" :data="dataParent" :page="pageParent" ref="crud"
+ v-model="formParent" :permission="permissionList" :before-open="beforeOpen" @row-del="rowDel"
+ @row-update="rowUpdate" @row-save="rowSave" @row-click="handleRowClick" @search-change="searchChange"
+ @search-reset="searchReset" @selection-change="selectionChange" @current-change="currentChange"
+ @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoadParent">
+ <template slot="menuLeft">
+ <el-button type="danger" size="small" icon="el-icon-delete" v-if="permission.dictbiz_delete" plain
+ @click="handleDelete">删 除
+ </el-button>
+ </template>
+ <template slot-scope="scope" slot="menu">
+ <el-button type="text" icon="el-icon-setting" size="small" @click.stop="handleRowClick(scope.row)"
+ v-if="userInfo.role_name.includes('admin')">字典配置
+ </el-button>
+ </template>
+ <template slot-scope="{row}" slot="code">
+ <el-tag @click="handleRowClick(row)" style="cursor:pointer">{{ row.code }}</el-tag>
+ </template>
+ <template slot-scope="{row}" slot="isSealed">
+ <el-tag>{{ row.isSealed === 0 ? '否' : '是' }}</el-tag>
+ </template>
+ </avue-crud> -->
+
+
+ <!-- <el-dialog :title="`[${dictValue}]字典配置`" append-to-body :visible.sync="box" width="1000px"> -->
+ <avue-crud :option="optionChild" :table-loading="loadingChild" :page="pageChild" :data="dataChild" ref="crudChild"
+ v-model="formChild" :permission="permissionList" :before-open="beforeOpenChild" :before-close="beforeCloseChild"
+ @row-del="rowDelChild" @row-update="rowUpdateChild" @row-save="rowSaveChild" @search-change="searchChangeChild"
+ @search-reset="searchResetChild" @selection-change="selectionChangeChild" @current-change="currentChangeChild"
+ @size-change="sizeChangeChild" @refresh-change="refreshChangeChild" @on-load="onLoadChild">
+ <template slot="menuLeft">
+ <el-button type="danger" size="small" icon="el-icon-delete" v-if="permission.dict_delete" plain
+ @click="handleDelete">删 除
+ </el-button>
+ </template>
+ <!-- <template slot-scope="scope" slot="menu">
+ <el-button type="text" icon="el-icon-circle-plus-outline" size="small"
+ @click.stop="handleAdd(scope.row,scope.index)" v-if="userInfo.role_name.includes('admin')">新增子项
+ </el-button>
+ </template> -->
+ <template slot-scope="{row, size}" slot="isSealed">
+ <el-tag :size="size">{{ row.isSealed === 0 ? '否' : '是' }}</el-tag>
+ </template>
+ </avue-crud>
+ <!-- </el-dialog> -->
+ </basic-container>
+</template>
+
+<script>
+import {
+ getParentList,
+ getChildList,
+ remove,
+ update,
+ add,
+ getDict,
+ getDictTree
+} from "@/api/system/dictbiz"
+import {
+ optionParent,
+ optionChild
+} from "@/option/system/dictCategory"
+import {
+ mapGetters
+} from "vuex"
+
+export default {
+ data () {
+ return {
+ dictValue: '暂无',
+ parentId: '1722966265111248897',
+ formParent: {},
+ formChild: {},
+ selectionList: [],
+ query: {},
+ box: false,
+ loading: true,
+ loadingChild: true,
+ pageParent: {
+ pageSize: 10,
+ pageSizes: [10, 30, 50, 100, 200],
+ currentPage: 1,
+ total: 0
+ },
+ pageChild: {
+ pageSize: 10,
+ pageSizes: [10, 30, 50, 100, 200],
+ currentPage: 1,
+ total: 0
+ },
+ dataParent: [],
+ dataChild: [],
+ optionParent: optionParent,
+ optionChild: {
+ ...optionChild,
+ labelWidth: 120,
+ searchLabelWidth: 96,
+ searchShow: true,
+ searchMenuSpan: 3,
+ menuWidth: 160,
+ },
+ }
+ },
+ computed: {
+ ...mapGetters(["userInfo", "permission"]),
+ permissionList () {
+ return {
+ addBtn: this.vaildData(this.permission.dictbiz_add, false),
+ delBtn: this.vaildData(this.permission.dictbiz_delete, false),
+ editBtn: this.vaildData(this.permission.dictbiz_edit, false),
+ viewBtn: false,
+ }
+ },
+ ids () {
+ let ids = []
+ this.selectionList.forEach(ele => {
+ ids.push(ele.id)
+ })
+ return ids.join(",")
+ }
+ },
+ mounted () {
+ // this.initData();
+ },
+ methods: {
+ initData () {
+ getDictTree().then(res => {
+ const column = this.findObject(this.optionChild.column, "parentId")
+ column.dicData = res.data.data
+ })
+ },
+ handleAdd (row) {
+ this.formChild.dictValue = ""
+ this.formChild.dictKey = ""
+ this.formChild.sort = 0
+ this.formChild.isSealed = 0
+ this.formChild.remark = ""
+ this.formChild.parentId = row.id
+ this.$refs.crudChild.rowAdd()
+ },
+ rowSave (row, done, loading) {
+ const form = {
+ ...row,
+ dictKey: -1,
+ }
+ add(form).then(() => {
+ this.onLoadParent(this.pageParent)
+ this.$message({
+ type: "success",
+ message: "操作成功!"
+ })
+ done()
+ }, error => {
+ window.console.log(error)
+ loading()
+ })
+ },
+ rowUpdate (row, index, done, loading) {
+ update(row).then(() => {
+ this.onLoadParent(this.pageParent)
+ this.$message({
+ type: "success",
+ message: "操作成功!"
+ })
+ this.onLoadChild(this.pageChild)
+ done()
+ }, error => {
+ window.console.log(error)
+ loading()
+ })
+ },
+ rowDel (row) {
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning"
+ })
+ .then(() => {
+ return remove(row.id)
+ })
+ .then(() => {
+ this.onLoadParent(this.pageParent)
+ this.$message({
+ type: "success",
+ message: "操作成功!"
+ })
+ })
+ },
+ handleRowClick (row) {
+ this.query = {}
+ this.parentId = row.id
+ this.dictValue = row.dictValue
+
+ const code = this.findObject(this.optionChild.column, "code")
+ code.value = row.code
+ const parentId = this.findObject(this.optionChild.column, "parentId")
+ parentId.value = row.id
+
+ this.formChild.code = row.code
+ this.formChild.parentId = row.id
+
+ this.box = true
+ this.onLoadChild(this.pageChild)
+ },
+ searchReset () {
+ this.query = {}
+ this.onLoadParent(this.pageParent)
+ },
+ searchChange (params, done) {
+ this.query = params
+ this.pageParent.currentPage = 1
+ this.onLoadParent(this.pageParent, params)
+ done()
+ },
+ selectionChange (list) {
+ this.selectionList = list
+ },
+ selectionClear () {
+ this.selectionList = []
+ this.$refs.crud.toggleSelection()
+ },
+ handleDelete () {
+ if (this.selectionList.length === 0) {
+ this.$message.warning("请选择至少一条数据")
+ return
+ }
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning"
+ })
+ .then(() => {
+ return remove(this.ids)
+ })
+ .then(() => {
+ this.onLoadParent(this.pageParent)
+ this.$message({
+ type: "success",
+ message: "操作成功!"
+ })
+ this.$refs.crud.toggleSelection()
+ })
+ },
+ beforeOpen (done, type) {
+ if (["edit", "view"].includes(type)) {
+ getDict(this.formParent.id).then(res => {
+ this.formParent = res.data.data
+ })
+ }
+ done()
+ },
+ currentChange (currentPage) {
+ this.pageParent.currentPage = currentPage
+ },
+ sizeChange (pageSize) {
+ this.pageParent.pageSize = pageSize
+ },
+ refreshChange () {
+ this.onLoadParent(this.pageParent, this.query)
+ },
+ rowSaveChild (row, done, loading) {
+ row.code = "articleType"
+ row.parentId = "1722966265111248897"
+ add(row).then(() => {
+ this.onLoadChild(this.pageChild)
+ this.$message({
+ type: "success",
+ message: "操作成功!"
+ })
+ done()
+ }, error => {
+ window.console.log(error)
+ loading()
+ })
+ },
+ rowUpdateChild (row, index, done, loading) {
+ update(row).then(() => {
+ this.onLoadChild(this.pageChild)
+ this.$message({
+ type: "success",
+ message: "操作成功!"
+ })
+ done()
+ }, error => {
+ window.console.log(error)
+ loading()
+ })
+ },
+ rowDelChild (row) {
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning"
+ })
+ .then(() => {
+ return remove(row.id)
+ })
+ .then(() => {
+ this.onLoadChild(this.pageChild)
+ this.$message({
+ type: "success",
+ message: "操作成功!"
+ })
+ })
+ },
+ searchResetChild () {
+ this.query = {}
+ this.onLoadChild(this.pageChild)
+ },
+ searchChangeChild (params, done) {
+ this.query = params
+ this.pageChild.currentPage = 1
+ this.onLoadChild(this.pageChild, params)
+ done()
+ },
+ selectionChangeChild (list) {
+ this.selectionList = list
+ },
+ selectionClearChild () {
+ this.selectionList = []
+ this.$refs.crudChild.toggleSelection()
+ },
+ handleDeleteChild () {
+ if (this.selectionList.length === 0) {
+ this.$message.warning("请选择至少一条数据")
+ return
+ }
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning"
+ })
+ .then(() => {
+ return remove(this.ids)
+ })
+ .then(() => {
+ this.onLoadChild(this.pageChild)
+ this.$message({
+ type: "success",
+ message: "操作成功!"
+ })
+ this.$refs.crudChild.toggleSelection()
+ })
+ },
+ beforeOpenChild (done, type) {
+ if (["add", "edit"].includes(type)) {
+ this.initData()
+ }
+ if (["edit", "view"].includes(type)) {
+ getDict(this.formChild.id).then(res => {
+ this.formChild = res.data.data
+ })
+ }
+ done()
+ },
+ beforeCloseChild (done) {
+ this.$refs.crudChild.value.parentId = this.parentId
+ this.$refs.crudChild.option.column.filter(item => {
+ if (item.prop === "parentId") {
+ item.value = this.parentId
+ }
+ })
+ done()
+ },
+ currentChangeChild (currentPage) {
+ this.pageChild.currentPage = currentPage
+ },
+ sizeChangeChild (pageSize) {
+ this.pageChild.pageSize = pageSize
+ },
+ refreshChangeChild () {
+ this.onLoadChild(this.pageChild, this.query)
+ },
+ onLoadParent (page, params = {}) {
+ this.loading = true
+ getParentList(
+ page.currentPage,
+ page.pageSize,
+ Object.assign(params, this.query)
+ ).then(res => {
+ const data = res.data.data
+ this.pageParent.total = data.total
+ this.dataParent = data.records
+ this.loading = false
+ this.selectionClear()
+ })
+ },
+ onLoadChild (page, params = {}) {
+ this.loadingChild = true
+ getChildList(
+ page.currentPage,
+ page.pageSize,
+ this.parentId,
+ Object.assign(params, this.query)
+ ).then(res => {
+ this.dataChild = res.data.data
+ this.loadingChild = false
+ this.selectionClear()
+ })
+ }
+ }
+}
+</script>
diff --git a/src/views/property/articleComment.vue b/src/views/property/articleComment.vue
new file mode 100644
index 0000000..d42b9f9
--- /dev/null
+++ b/src/views/property/articleComment.vue
@@ -0,0 +1,234 @@
+<template>
+ <basicContainer>
+ <avue-crud :data="dataList" ref="crud" :table-loading="loading" @current-change="currentChange"
+ @search-change="searchChange" @search-reset="searchReset" @size-change="sizeChange" :option="option"
+ v-model="data" :page="page" @selection-change="selectionChange" @row-del="rowDel"
+ @refresh-change="refreshChange" @on-load="onLoad">
+ <template slot="menuLeft">
+ <!-- <el-button size="small" icon="el-icon-delete" plain v-if="permission.article_delete" @click="handleDelete">删 除
+ </el-button> -->
+ <el-button type="danger" size="small" plain icon="el-icon-delete" v-if="permission.user_delete"
+ @click="handleDelete">批量删除
+ </el-button>
+ </template>
+
+ <template slot-scope="{row, size}" slot="phone">
+ <el-button :size="size" type="text" @click="showStringDispose(row, 'phoneflag')"
+ v-text="textDispose(row, 'phoneflag', 'phone')">
+ </el-button>
+ </template>
+ </avue-crud>
+ </basicContainer>
+</template>
+<script>
+import {
+ getPageList,
+ remove,
+ update,
+ add,
+ getNotice,
+ upcomment
+} from "@/api/article/articleComment"
+import {
+ mapGetters
+} from "vuex"
+
+import website from '@/config/website'
+
+export default {
+ data () {
+ return {
+ page: {
+ pageSize: 10,
+ pageSizes: [10, 20, 30, 50, 100],
+ currentPage: 1,
+ total: 0
+ },
+ dataList: [],
+ loading: true,
+ selectionList: [],
+ option: {
+ labelWidth: 96,
+ searchLabelWidth: 66,
+ searchShow: true,
+ searchMenuSpan: 3,
+ menuWidth: 80,
+
+ selection: true,
+ height: "auto",
+ calcHeight: 54,
+ align: 'center',
+ menuAlign: 'center',
+ addBtn: false,
+ editBtn: false,
+ searchBtn: true,
+ column: [
+ {
+ width: 110,
+ label: '头像',
+ prop: 'avatar',
+ dataType: 'string',
+ type: 'img',
+ },
+ {
+ width: 120,
+ label: '电话',
+ prop: 'phone',
+ searchSpan: 4,
+ search: true,
+ searchLabelWidth: 46,
+ slot: true
+ },
+ {
+ width: 110,
+ label: '昵称',
+ prop: 'name',
+ searchSpan: 4,
+ search: true,
+ },
+ {
+ label: '标题',
+ prop: 'title',
+ searchSpan: 4,
+ search: true,
+ },
+ {
+ label: '评论',
+ prop: 'content'
+ }
+ ]
+ }
+ }
+ },
+ computed: {
+ ...mapGetters(["permission", "userInfo"]),
+ permissionList () {
+ return {
+ addBtn: this.vaildData(this.permission.article_add, true),
+ viewBtn: this.vaildData(this.permission.article_view, true),
+ delBtn: this.vaildData(this.permission.article_delete, true),
+ editBtn: this.vaildData(this.permission.article_edit, true),
+ }
+ },
+ ids () {
+ let ids = []
+ this.selectionList.forEach((ele) => {
+ ids.push(ele.id)
+ })
+ return ids.join(",")
+ },
+
+ textDispose () {
+ return (row, flag, type) => {
+ if (row[flag] || row[type] == null) {
+ return row[type]
+ } else {
+ if (type == 'principalIdCard') {
+ return row[type].replace(/^(.{6})(?:\d+)(.{4})$/, "$1******$2")
+ } else {
+ return row[type].replace(/^(.{3})(?:\d+)(.{4})$/, "$1****$2")
+ }
+ }
+ }
+ }
+ },
+ methods: {
+ showStringDispose (row, type) {
+ row[type] = !row[type]
+ },
+
+ selectionChange (list) {
+ this.selectionList = list
+ },
+ rowDel (row) {
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ return remove(row.id)
+ })
+ .then(() => {
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ })
+ },
+ refreshChange () {
+ this.onLoad(this.page, this.query)
+ },
+ handleDelete () {
+ if (this.selectionList.length === 0) {
+ this.$message.warning("请选择至少一条数据")
+ return
+ }
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ return remove(this.ids)
+ })
+ .then(() => {
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ this.$refs.crud.toggleSelection()
+ })
+ },
+ searchReset () {
+ this.query = {}
+ this.onLoad(this.page)
+ },
+ searchChange (params, done) {
+ this.query = params
+ this.page.currentPage = 1
+ this.onLoad(this.page, params)
+ done()
+ },
+ currentChange (currentPage) {
+ console.log(currentPage)
+ this.page.currentPage = currentPage
+ },
+ sizeChange (pageSize) {
+ console.log(pageSize)
+ this.page.pageSize = pageSize
+ },
+ onLoad (page, params = {}) {
+ let values = {
+ ...params,
+ }
+ this.loading = true
+ getPageList(page.currentPage, page.pageSize, values).then((res) => {
+ const data = res.data.data
+ this.page.total = data.total
+ this.dataList = data.records
+ this.dataList.forEach(item => {
+ this.$set(item, 'phoneflag', false)
+ if (item.avatar) {
+ // var urls = []
+ // var names = item.avatar.split(",")
+ // names.forEach(name => {
+ // urls.push(website.minioUrl + name)
+ // })
+ item.avatar = website.minioUrl + item.avatar
+ }
+ })
+ this.loading = false
+ })
+ },
+ selectionClear () {
+ this.selectionList = []
+ this.$refs.crud.toggleSelection()
+ },
+ }
+}
+</script>
+
+<style></style>
\ No newline at end of file
diff --git a/src/views/property/inviteTenders.vue b/src/views/property/inviteTenders.vue
index 13e8cc6..e446d0f 100644
--- a/src/views/property/inviteTenders.vue
+++ b/src/views/property/inviteTenders.vue
@@ -115,14 +115,15 @@
searchLabelWidth: 96,
searchShow: true,
searchMenuSpan: 3,
- menuWidth: 450,
+ searchGutter: 15,
+ menuWidth: 350,
dialogMenuPosition: 'center',
height: "auto",
calcHeight: 54,
dialogWidth: 950,
tip: false,
border: true,
- //stripe:true,
+ // stripe: true,
index: true,
viewBtn: true,
selection: true,
@@ -133,7 +134,7 @@
prop: "title",
span: 24,
row: true,
- searchSpan: 4,
+ searchSpan: 3,
search: true,
searchLabelWidth: 76,
rules: [{
@@ -146,7 +147,6 @@
width: 110,
label: "招标封面",
prop: "url",
- // align:'center',
type: "upload",
listType: "picture-img",
action: "/api/blade-resource/oss/endpoint/put-file",
@@ -154,21 +154,8 @@
res: "data",
url: "link",
},
- // hide: true,
span: 24,
},
- // {
- // label: "招标来源",
- // prop: "sourceName",
- // search: true,
- // searchSpan: 4,
- // span: 24,
- // rules: [{
- // required: true,
- // message: "请输入招标类型",
- // trigger: "blur",
- // }, ],
- // },
{
hide: true,
parent: false,
@@ -207,6 +194,7 @@
}],
},
{
+ searchLabelWidth: 80,
label: "发布时间",
prop: "dateTime",
type: "daterange",
@@ -236,6 +224,7 @@
{
width: 110,
+ searchLabelWidth: 80,
label: "所属街道",
addDisplay: false,
editDisplay: false,
@@ -246,6 +235,7 @@
},
{
width: 156,
+ searchLabelWidth: 80,
overHidden: true,
label: "所属社区",
addDisplay: false,
@@ -257,11 +247,12 @@
},
{
width: 100,
+ searchLabelWidth: 80,
label: "发布状态",
prop: "publish",
value: "0",
slot: true,
- searchSpan: 4,
+ searchSpan: 3,
search: true,
type: "select",
rules: [{
diff --git a/src/views/property/ownersCommittee.vue b/src/views/property/ownersCommittee.vue
index 4fe3b89..bf95dbe 100644
--- a/src/views/property/ownersCommittee.vue
+++ b/src/views/property/ownersCommittee.vue
@@ -98,6 +98,7 @@
searchMenuSpan: 3,
menuWidth: 450,
addBtn: false,
+ searchGutter: 15,
menu: false,
height: "auto",
calcHeight: 54,
@@ -117,7 +118,7 @@
prop: "title",
span: 24,
row: true,
- searchSpan: 4,
+ searchSpan: 3,
search: true,
searchLabelWidth: 46,
rules: [{
@@ -179,6 +180,7 @@
}],
},
{
+ searchLabelWidth: 80,
label: "发布时间",
prop: "dateTime",
type: "daterange",
@@ -215,6 +217,7 @@
},
{
width: 110,
+ searchLabelWidth: 80,
label: "所属街道",
addDisplay: false,
editDisplay: false,
@@ -225,7 +228,7 @@
},
{
- width: 156,
+ searchLabelWidth: 80,
overHidden: true,
label: "所属社区",
addDisplay: false,
@@ -245,12 +248,12 @@
},
{
- width: 100,
+ searchLabelWidth: 80,
label: "发布状态",
prop: "publish",
value: "0",
slot: true,
- searchSpan: 4,
+ searchSpan: 3,
search: true,
type: "select",
display: false,
diff --git a/src/views/publicSecurity/SchoolCheckManage.vue b/src/views/publicSecurity/SchoolCheckManage.vue
index df74d9f..253bea5 100644
--- a/src/views/publicSecurity/SchoolCheckManage.vue
+++ b/src/views/publicSecurity/SchoolCheckManage.vue
@@ -97,7 +97,7 @@
整改后图片
</div>
<div class="yh-pic-list">
- <div class="pic-item" v-for="pic in item.rectificationImageUrlsList">
+ <div class="pic-item" v-for="(pic, index) in item.rectificationImageUrlsList" :key='index'>
<el-image style="width: 100px; height: 100px" :src="pic" :fit="fit"></el-image>
</div>
</div>
@@ -779,7 +779,7 @@
type: "warning",
})
.then(() => {
- return remove(this.ids)
+ // return remove(this.ids)
})
.then(() => {
this.onLoad(this.page)
@@ -829,7 +829,7 @@
this.onLoad(this.page, this.query)
},
onLoad(page, params = {}) {
- const {} = this.query
+ // const {} = this.query
let values = {
...params,
}
diff --git a/src/views/publicSecurity/bailReporting.vue b/src/views/publicSecurity/bailReporting.vue
index 5456fe8..320caaf 100644
--- a/src/views/publicSecurity/bailReporting.vue
+++ b/src/views/publicSecurity/bailReporting.vue
@@ -178,12 +178,13 @@
}, ],
},
{
+ searchLabelWidth: 80,
parent: false,
label: "所属社区",
prop: "neiCode",
search: true,
searchSpan: 4,
- width: 150,
+ width: 120,
type: "tree",
dicUrl: "/api/blade-system/region/treeToCommunity",
props: {
diff --git a/src/views/publicSecurity/components/retalInfo.vue b/src/views/publicSecurity/components/retalInfo.vue
new file mode 100644
index 0000000..b297345
--- /dev/null
+++ b/src/views/publicSecurity/components/retalInfo.vue
@@ -0,0 +1,810 @@
+<template>
+ <el-dialog class="place-info-box" title="编辑" append-to-body :visible.sync="roleBox" center @close="roleBoxClose">
+ <div class="cur-container-box">
+ <div class="content-box">
+ <box-title class="m10" :classVal="9" :title="'基本信息'"></box-title>
+ <avue-form v-if="baseShow" ref="baseForm" :option="option" v-model="form">
+ </avue-form>
+
+
+ <box-title class="m10" :classVal="9" :title="'租客信息'"></box-title>
+ <avue-crud :option="placeOption" :data="houseRental" ref="tenantForm" v-model="houseHoldForm"
+ :permission="permissionList" @row-del="houseHoldRowDel" @row-update="houseHoldRowUpdate"
+ @row-save="houseHoldRowSave" :page.sync="holdPage" @current-change="holdCurrentChange"
+ @size-change="holdSizeChange" @refresh-change="refreshHoldChange">
+ </avue-crud>
+ </div>
+
+ <div class="footer-btn-box">
+ <el-button size="small" type="primary" @click="dataUpdate">保 存</el-button>
+
+ <el-button size="small" @click="roleBoxClose">关 闭</el-button>
+ </div>
+ </div>
+ </el-dialog>
+</template>
+
+<script>
+import {
+ getPlace,
+ getPlaceExt,
+ holdRemove,
+ holdAdd,
+ holdUpdate,
+ getHoldList,
+ updatePlaceExt,
+} from "@/api/place/place"
+import {
+ getPlaceList
+} from "@/api/doorplateAddress/doorplateAddress"
+import website from "@/config/website"
+
+
+
+import {
+ getList as getHouseList,
+ getDetatil as getHouseDetail
+} from "@/api/userHouse/list/house.js"
+
+import {
+ getDetatil,
+ updateInfo,
+ add as addHouseRental
+} from "@/api/userHouse/list/houseRental.js"
+
+
+import {
+ getList as getHouseholdList,
+} from "@/api/userHouse/list/houseHold.js"
+
+
+
+import boxTitle from "./boxTitle"
+
+export default {
+ data() {
+ //手机号格式校验
+ let validatorPhone = function (rule, value, callback) {
+ if (value) {
+ if (!/^1[3456789]\d{9}$/.test(value)) {
+ callback(new Error("手机号格式有误!"))
+ } else {
+ callback()
+ }
+ }
+ callback()
+ }
+
+ return {
+ roleBox: false,
+ baseShow: false,
+ restShow: false,
+
+ placeExt: [],
+
+ form: {},
+ option: {
+ submitBtn: false,
+ emptyBtn: false,
+
+ column: [
+ {
+ label: "房屋",
+ prop: "houseName",
+ display: false
+ },
+ {
+ label: "房屋",
+ prop: "houseCode",
+ hide: true,
+ type: "table",
+ children: {
+ border: true,
+ height: 400,
+ searchShow: true,
+ searchMenuSpan: 6,
+ submitText: "确定",
+ column: [
+ // {
+ // width: 220,
+ // overHidden: true,
+ // label: '小区名称',
+ // prop: "districtName",
+ // search: true,
+ // searchSpan: 4,
+ // rules: [{
+ // required: true,
+ // message: "请输入小区名称",
+ // trigger: "blur",
+ // },],
+ // },
+ {
+ label: "地址",
+ prop: "address",
+ minWidth: 180,
+ display: false
+ },
+ ],
+ },
+ page: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0
+ },
+ formatter: (row) => {
+ return row.houseName
+ },
+ onLoad: ({
+ page,
+ value,
+ data
+ }, callback) => {
+ //首次加载去查询对应的值
+ if (value && this.isEdit) {
+ getHouseDetail({
+ houseCode: value
+ }).then(res => {
+ var resData = res.data.data
+ // 查询对应行数据
+ callback(resData)
+ return
+ })
+ }
+ if (page && this.isEdit) {
+ this.loading = true
+ getHouseList(page.currentPage, page.pageSize, Object.assign(data)).then(res => {
+ const resData = res.data.data
+ var total = resData.total
+ var data = resData.records
+ this.loading = false
+ this.selectionClear()
+ //分页查询信息
+ callback({
+ total: total,
+ data: data
+ })
+ })
+ }
+ },
+ props: {
+ label: 'address',
+ value: 'houseCode'
+ }
+ },
+ {
+ label: "关系",
+ prop: "tenantRelationship",
+ search: true,
+ searchSpan: 3,
+ searchLabelWidth: 46,
+ width: 100,
+ type: "select",
+ dicData: [{
+ label: "同一户",
+ value: 1
+ },
+ {
+ label: "不同一户",
+ value: 2
+ }
+ ],
+ rules: [{
+ required: true,
+ message: "请选择关系",
+ trigger: "blur",
+ },],
+ },
+ {
+ label: "房屋状态",
+ prop: "houseStatus",
+ search: true,
+ searchSpan: 4,
+ width: 100,
+ type: "select",
+ dicData: [{
+ label: "部分出租",
+ value: 1
+ },
+ {
+ label: "全部出租",
+ value: 2
+ }
+ ],
+ rules: [{
+ required: true,
+ message: "请选择房屋状态",
+ trigger: "blur",
+ },],
+ },
+ {
+ label: "用途",
+ prop: "rentalUse",
+ type: "select",
+ searchSpan: 3,
+ searchLabelWidth: 66,
+ search: true,
+ dataType: "number",
+ width: 100,
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=rentalUseType",
+ props: {
+ label: "dictValue",
+ value: "dictKey",
+ },
+ rules: [{
+ required: true,
+ message: "请选择用途",
+ trigger: "blur",
+ },],
+ },
+ {
+ width: 100,
+ label: "租房时间",
+ prop: "rentalTime",
+ type: "date",
+ format: "yyyy-MM-dd",
+ valueFormat: "yyyy-MM-dd",
+ rules: [{
+ required: true,
+ message: "请选择租房时间",
+ trigger: "blur",
+ },],
+ },
+ {
+ label: "到期时间",
+ prop: "dueTime",
+ type: "date",
+ format: "yyyy-MM-dd",
+ valueFormat: "yyyy-MM-dd",
+ width: 100,
+ rules: [{
+ required: true,
+ message: "请选择到期时间",
+ trigger: "blur",
+ },],
+ },
+
+ {
+ label: "租赁期限",
+ prop: "dldType",
+ width: 100,
+ display: false,
+ search: true,
+ searchSpan: 4,
+ type: "select",
+ dicData: [{
+ label: "长期",
+ value: 1
+ },
+ {
+ label: "中期",
+ value: 2
+ },
+ {
+ label: "短期",
+ value: 3
+ }
+ ],
+ },
+ {
+ width: 80,
+ label: "审核状态",
+ prop: "auditStatus",
+ type: "select",
+ search: true,
+ searchSpan: 4,
+ display: false,
+ slot: true,
+ dicData: [
+ {
+ label: "已确认",
+ value: 1
+ },
+ {
+ label: "待确认",
+ value: 0
+ }
+ ],
+ },
+ {
+ width: 144,
+ label: "创建时间",
+ prop: "createTime",
+ display: false,
+ },
+ {
+ label: "合同",
+ prop: "fileUrls",
+ // align:'center',
+ width: 80,
+ type: "upload",
+ listType: "picture-img",
+ action: "/api/blade-resource/oss/endpoint/put-file",
+ propsHttp: {
+ res: "data",
+ url: "link",
+ },
+ hide: true,
+ span: 24,
+ },
+ ]
+ },
+
+ placeForm: {},
+ optionDetail: {
+ submitBtn: false,
+ emptyBtn: false,
+ column: [{
+ label: "法人信息",
+ prop: "legalPerson",
+ },
+
+ {
+ width: 96,
+ label: "法人电话",
+ prop: "legalTel",
+ search: true,
+ searchSpan: 4,
+ slot: true,
+ overHidden: true,
+ rules: [{
+ validator: validatorPhone,
+ trigger: "blur",
+ },],
+ },
+
+ {
+ label: "营业执照",
+ prop: "imageUrls",
+ width: 80,
+ type: "upload",
+ listType: "picture-card",
+ dataType: "string",
+ multiple: true,
+ action: "/api/blade-resource/oss/endpoint/put-file",
+ propsHttp: {
+ res: "data",
+ name: "name",
+ url: "link",
+ },
+ span: 24,
+ },
+
+ {
+ label: "场所平面图",
+ prop: "planImageUrls",
+ width: 80,
+ type: "upload",
+ listType: "picture-card",
+ dataType: "string",
+ multiple: true,
+ action: "/api/blade-resource/oss/endpoint/put-file",
+ propsHttp: {
+ res: "data",
+ name: "name",
+ url: "link",
+ },
+ span: 24,
+ },
+ ],
+ },
+
+ loading: true,
+ placeOption: {
+ menu: true,
+ height: 300,
+ calcHeight: 54,
+ dialogWidth: 950,
+ tip: false,
+ searchShow: false,
+ addBtn: true,
+ delBtn: true,
+ editBtn: true,
+ border: true,
+ index: true,
+ dialogClickModal: false,
+ column: [{
+ label: "姓名",
+ prop: "name",
+ // search: true,
+ searchSpan: 4,
+ rules: [{
+ required: true,
+ message: "请输入姓名",
+ trigger: "blur",
+ },],
+ },
+ {
+ label: "电话",
+ prop: "phoneNumber",
+ width: 100,
+ // search: true,
+ searchSpan: 4,
+ },
+ {
+ label: "身份证号",
+ prop: "idCard",
+ width: 160,
+ // search: true,
+ searchSpan: 4,
+ rules: [
+ {
+ required: true,
+ message: "请输身份证号",
+ trigger: "blur",
+ }
+ ],
+ },
+ // {
+ // label: "性别",
+ // prop: "gender",
+ // type: "select",
+ // dicData: [{
+ // label: "男",
+ // value: 1
+ // },
+ // {
+ // label: "女",
+ // value: 0
+ // },
+ // {
+ // label: "未知",
+ // value: 1
+ // }
+ // ],
+ // },
+ // {
+ // label: "关系",
+ // prop: "relationship",
+ // type: "select",
+ // dicUrl: "/api/blade-system/dict-biz/dictionary?code=roleRelation",
+ // dataType: "number",
+ // props: {
+ // label: "dictValue",
+ // value: "dictKey",
+ // },
+ // display: false
+ // },
+ {
+ width: 220,
+ // overHidden: true,
+ label: '工作单位',
+ prop: "employer",
+ // search: true,
+ searchSpan: 4,
+
+ },
+ {
+ label: "户籍地址",
+ prop: "hukouRegistration",
+ minWidth: 160,
+ // overHidden: true,
+
+ },
+ ]
+ },
+ holdPage: {
+ pageSize: 20,
+ currentPage: 1,
+ total: 0,
+ },
+ houseHoldForm: {},
+ houseRental: [],
+ holdPage: {
+ pageSize: 100,
+ currentPage: 1,
+ total: 0,
+ },
+ idEdit: false
+ }
+ },
+
+ components: {
+ boxTitle
+ },
+
+ inject: ["placeElement"],
+
+ methods: {
+ initOpen(type, newData) {
+ if (type == 2) {
+ this.isEdit = true;
+ this.getInfo(newData);
+ this.onLoadHouseHold(newData);
+ } else {
+ this.houseRental = [];
+ this.houseHoldForm = {};
+ }
+
+ this.roleBox = true
+ this.baseShow = true
+ this.restShow = false
+ return;
+
+ this.curRow = newData
+ this.roleBox = true
+ this.baseShow = false
+ this.restShow = false
+ this.form = {}
+ this.placeForm = {}
+
+
+ },
+
+ getInfo(id) {
+ getDetatil(id).then(res => {
+ this.form = res.data.data
+ if (this.form.fileUrls.length > 0) {
+ var urls = []
+ var names = this.form.fileUrls.split(",")
+ names.forEach(name => {
+ urls.push(website.minioUrl + name)
+ })
+ this.form.fileUrls = urls.join(",")
+ }
+ })
+ },
+
+ onLoadHouseHold(id) {
+ let params = {
+ housingRentalId: id
+ }
+ getHouseholdList(this.holdPage.currentPage, this.holdPage.pageSize, Object.assign(params)).then(res => {
+ const data = res.data.data
+ this.houseRental = data.records
+ this.loading = false
+ })
+ },
+
+
+
+ locationDispose(data) {
+ data = data.split(",")
+
+ return {
+ longitude: data[0],
+ latitude: data[1],
+ location: data[2],
+ }
+ },
+
+ selectionClear() {
+ this.$nextTick(() => {
+ this.$refs.crud && this.$refs.crud.toggleSelection()
+ })
+ },
+
+ houseHoldRowUpdate(row, index, done, loading) {
+ let item = this.houseRental[index];
+ item = row
+ this.$set(this.houseRental, index, item)
+ // this.houseRental[index] = row
+ done();
+ return;
+ holdUpdate(row).then(
+ () => {
+ this.holdOnLoad(this.holdPage)
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ done()
+ },
+ (error) => {
+ window.console.log(error)
+ loading()
+ }
+ )
+ },
+
+ houseHoldRowDel(row, index) {
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ // return holdRemove(row.id)
+ this.houseRental.splice(index, 1);
+ })
+
+
+
+ // .then(() => {
+ // this.holdOnLoad(this.holdPage)
+
+ // this.$message({
+ // type: "success",
+ // message: "操作成功!",
+ // })
+ // })
+ },
+
+ houseHoldRowSave(row) {
+ console.log("===>", row)
+
+ this.$refs.tenantForm.validate((valid, done, msg) => {
+ if (valid) {
+ this.houseRental.push(row);
+ done();
+ }
+ })
+ return;
+ holdAdd({
+ ...row,
+ placeId: this.curRow.id,
+ }).then(
+ () => {
+ this.holdOnLoad(this.holdPage)
+
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ done()
+ },
+ (error) => {
+ window.console.log(error)
+ loading()
+ }
+ )
+ },
+
+ refreshHoldChange() {
+ this.holdOnLoad(this.holdPage)
+ },
+
+ holdOnLoad(holdPage, params = {}) {
+ if (!this.curRow.id) return
+
+ let values = {
+ ...params,
+ placeId: this.curRow.id,
+ }
+
+ getHoldList(holdPage.currentPage, holdPage.pageSize, values).then(
+ (res) => {
+ const data = res.data.data
+
+ this.holdPage.total = data.total
+ this.placeExt = data.records
+
+ this.loading = false
+ this.selectionClear()
+ }
+ )
+ },
+
+ holdCurrentChange(currentPage) {
+ this.holdPage.currentPage = currentPage
+ },
+
+ holdSizeChange(pageSize) {
+ this.holdPage.pageSize = pageSize
+ },
+
+ desposeImage(data) {
+ if (data) {
+ if (data.length > 0) {
+ var urls = []
+ var split = data.split(",").filter((item) => item != "")
+ split.forEach((url) => {
+ var names = url.split("jczz/")
+ urls.push(names[1])
+ })
+ data = urls.join(",")
+ }
+ }
+ return data
+ },
+
+ dataUpdate() {
+
+
+ this.$refs.baseForm.validate((valid, done, msg) => {
+ if (valid) {
+ if (this.form.fileUrls.length > 0) {
+ var urls = []
+ var split = this.form.fileUrls.split(",")
+ split.forEach(url => {
+ var names = url.split("jczz/")
+ urls.push(names[1])
+ })
+ this.form.fileUrls = urls.join(",")
+ }
+ this.form.householdVOList = this.houseRental;
+ console.log("=====>", this.form);
+
+ updateInfo(this.form).then(() => {
+ this.$message({
+ type: "success",
+ message: "操作成功!"
+ })
+ this.getInfo(this.form.id);
+
+ done()
+ this.roleBoxClose()
+
+ }, error => {
+ window.console.log(error)
+ loading()
+ })
+ } else {
+ console.log("error submit!!")
+ return false
+ }
+ })
+ },
+
+ addRequest() {
+ addHouseRental(this.form).then(() => {
+ this.$message({
+ type: "success",
+ message: "操作成功!"
+ })
+ this.getInfo(this.form.id);
+
+ done()
+ this.roleBoxClose()
+
+ }, error => {
+ window.console.log(error)
+ loading()
+ })
+ },
+
+ updateRequest() {
+ update(this.form).then(() => {
+ this.$message({
+ type: "success",
+ message: "操作成功!"
+ })
+ this.getInfo(this.form.id);
+
+ done()
+ this.roleBoxClose()
+
+ }, error => {
+ window.console.log(error)
+ loading()
+ })
+ },
+
+
+
+ roleBoxClose() {
+ this.form = {}
+ this.houseHoldForm = {}
+ this.$refs.baseForm && this.$refs.baseForm.resetForm()
+ this.$refs.tenantForm && this.$refs.tenantForm.resetForm()
+ this.baseShow = false
+ this.restShow = false
+ this.roleBox = false
+ },
+ },
+}
+</script>
+
+<style lang="scss" scoped>
+.cur-container-box {
+ display: flex;
+ flex-direction: column;
+ width: 100%;
+ height: 100%;
+ overflow: hidden;
+
+ .content-box {
+ margin: 0 4px;
+ padding: 0 10px;
+ height: 0;
+ flex: 1;
+ overflow: hidden;
+ overflow-y: auto;
+ }
+
+ .footer-btn-box {
+ margin-top: 10px;
+ display: flex;
+ justify-content: center;
+ }
+}
+</style>
\ No newline at end of file
diff --git a/src/views/publicSecurity/components/userHouseList.vue b/src/views/publicSecurity/components/userHouseList.vue
index 778dab7..18e5980 100644
--- a/src/views/publicSecurity/components/userHouseList.vue
+++ b/src/views/publicSecurity/components/userHouseList.vue
@@ -41,8 +41,8 @@
<el-dialog title="标签管理" append-to-body :visible.sync="labelFlag" center width="600px">
<div>
<div class="grid-container2">
- <div class="grid-item" :style="{ backgroundColor: item2.color }" v-for="(item2, index2) in labelData"
- @click="changLabel(item2)" :key="index2">
+ <div class="grid-item" :style="{ backgroundColor: item2.color,color: item2.fontColor}"
+ v-for="(item2, index2) in labelData" @click="changLabel(item2)" :key="index2">
{{ item2.name }}
</div>
</div>
@@ -845,8 +845,12 @@
if (row.communityCode) {
this.query.regionCode = row.communityCode
}
+ if (row.parentId) {
+ this.query.parentId = row.parentId
+ } else {
+ this.query.parentId = 103
+ }
this.query.labelId = row.labelId
- this.query.parentId = 103
this.onLoad(this.page, this.query)
},
onsubmit() {
@@ -899,7 +903,7 @@
this.currentRow = item
this.labelFlag = true
let params = {
- parentId: 103
+ parentId: this.query.parentId
}
// 查询标签
getLabelList(Object.assign(params)).then(res => {
@@ -909,19 +913,20 @@
getDetatils(item.id).then(res => {
this.householdLabelList = res.data.data.householdLabelList
// 将细类放到一起
- data.forEach(e => {
- e.children.forEach(f => {
- if (this.householdLabelList.length > 0) {
- this.householdLabelList.forEach(h => {
- if (Number(f.id) == h.labelId) {
- f['color'] = h.color
- f['remark'] = h.remark
- }
- })
- }
- })
+ console.log("*********123*********", res.data.data.householdLabelList)
+ data.forEach(f => {
+ if (this.householdLabelList.length > 0) {
+ this.householdLabelList.forEach(h => {
+ if (f.id == h.labelId) {
+ f.color = h.color
+ f.fontColor = '#080808'
+ // f['remark'] = h.remark
+ }
+ })
+ }
})
this.labelData = data
+ console.log("******************", data)
this.loading = false
})
})
@@ -1126,4 +1131,4 @@
.box .el-scrollbar__wrap {
overflow: scroll;
}
-</style>
+</style>
\ No newline at end of file
diff --git a/src/views/publicSecurity/hireInfoList.vue b/src/views/publicSecurity/hireInfoList.vue
new file mode 100644
index 0000000..5af0779
--- /dev/null
+++ b/src/views/publicSecurity/hireInfoList.vue
@@ -0,0 +1,936 @@
+<template>
+ <el-row>
+ <el-col :span="24">
+ <basic-container>
+ <avue-crud :option="option" :search.sync="search" :table-loading="loading" :data="data" ref="crud"
+ v-model="form" :permission="permissionList" @row-del="rowDel" @row-update="rowUpdate" @row-save="rowSave"
+ :before-open="beforeOpen" :page.sync="page" @search-change="searchChange" @search-reset="searchReset"
+ @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
+ @refresh-change="refreshChange" @on-load="onLoad">
+ <template slot-scope="{row, size}" slot="auditStatus">
+ <el-tag :size="size" :type="showConfirmFlag(row.auditStatus).type">
+ {{ showConfirmFlag(row.auditStatus).text }}
+ </el-tag>
+ </template>
+
+ <template slot="menuLeft">
+ <el-button type="primary" size="small" plain icon="el-icon-plus" v-if="permission.houseRental_add"
+ @click="showEditMoel(1)">新 增
+ </el-button>
+ <el-button type="danger" size="small" plain icon="el-icon-delete" v-if="permission.houseRental_delete"
+ @click="handleDelete">删 除
+ </el-button>
+
+ </template>
+
+ <template slot-scope="{row, size}" slot="menu">
+ <el-button type="text" :size="size" icon="el-icon-edit" v-if="permission.houseRental_edit"
+ @click="showEditMoel(2, row)">编 辑
+ </el-button>
+
+
+ <el-button :size="size" type="text" icon="el-icon-circle-plus-outline" v-if="permission.househould_manager"
+ @click="ManageTenants(row)">管理租户
+ </el-button>
+
+ <!-- <el-button :size="size" type="text" icon="el-icon-circle-plus-outline"
+ @click="ManageTenants(row)">管理租户
+ </el-button> -->
+
+
+ <!-- <el-button type="success" size="small" plain icon="el-icon-upload2" @click="handleImport">导入
+ </el-button>
+ <el-button type="warning" size="small" plain icon="el-icon-download" @click="handleExport">导出
+ </el-button> -->
+ </template>
+ </avue-crud>
+
+ <el-dialog title="租户管理" append-to-body :visible.sync="roleBox">
+ <avue-crud :option="houseHoldOption" :search.sync="search" :table-loading="loading" :data="houseHold"
+ ref="crud" v-model="houseHoldForm" :permission="permissionList" @row-del="houseHoldRowDel"
+ @row-update="houseHoldRowUpdate" @row-save="houseHoldRowSave" :page.sync="holdPage"
+ @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"
+ @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange"></avue-crud>
+ </el-dialog>
+
+ <el-dialog title="用户数据导入" append-to-body :visible.sync="excelBox" width="555px">
+ <avue-form :option="excelOption" v-model="excelForm" :upload-after="uploadAfter">
+
+ <template slot="excelTemplate">
+ <el-button type="primary" @click="handleTemplate">
+ 点击下载<i class="el-icon-download el-icon--right"></i>
+ </el-button>
+ </template>
+ </avue-form>
+ </el-dialog>
+
+
+ <retalInfo ref="RetalInfo"></retalInfo>
+
+ </basic-container>
+ </el-col>
+ </el-row>
+</template>
+
+<script>
+ import {
+ getList as getHouseholdList,
+ remove as householdDel,
+ add as householdAdd,
+ update as householdUpdate,
+ getDetatil as getHouseholdDetatil
+ } from "@/api/userHouse/list/houseHold.js"
+ import {
+ getList,
+ getPageList,
+ remove,
+ add,
+ update,
+ getDetatil
+ } from "@/api/userHouse/list/houseRental.js"
+ import {
+ getList as getHouseList,
+ getDetatil as getHouseDetail
+ } from "@/api/userHouse/list/house.js"
+ import {
+ exportBlob
+ } from "@/api/common"
+ import {
+ mapGetters
+ } from "vuex"
+ import {
+ getToken
+ } from '@/util/auth'
+ import {
+ downloadXls
+ } from "@/util/util"
+ import {
+ dateNow
+ } from "@/util/date"
+ import NProgress from 'nprogress'
+ import 'nprogress/nprogress.css'
+ import func from "@/util/func"
+ import Qs from "qs"
+ import website from '@/config/website'
+
+ import retalInfo from './components/retalInfo'
+ export default {
+ components: {
+ retalInfo
+ },
+ data() {
+ return {
+ roleBox: false,
+ form: {},
+ search: {},
+ excelBox: false,
+ selectionList: [],
+ query: {},
+ loading: true,
+ page: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0
+ },
+ rowHouseHold: {},
+ houseHoldForm: {
+ relationship: 18,
+ roleType: 2,
+ },
+ houseHold: [],
+ holdPage: {
+ pageSize: 100,
+ currentPage: 1,
+ total: 0
+ },
+ houseHoldOption: {
+ height: '500',
+ calcHeight: 80,
+ tip: false,
+ searchShow: true,
+ searchMenuSpan: 6,
+ border: true,
+ index: true,
+ // selection: true,
+ viewBtn: true,
+ addBtn: true,
+ dialogType: 'drawer',
+ dialogClickModal: false,
+ column: [{
+ width: 110,
+ label: "所属街道",
+ addDisplay: false,
+ editDisplay: false,
+ viewDisplay: false,
+ prop: "townStreetName",
+ search: true,
+ searchSpan: 4
+ },
+
+ {
+ width: 156,
+ overHidden: true,
+ label: "所属社区",
+ addDisplay: false,
+ editDisplay: false,
+ viewDisplay: false,
+ prop: "neiName",
+ search: true,
+ searchSpan: 4,
+ rules: [{
+ required: true,
+ message: "请选择所属社区",
+ trigger: "blur",
+ }],
+ },
+ {
+ label: "姓名",
+ prop: "name",
+ // search: true,
+ searchSpan: 4,
+ },
+ {
+ label: "电话",
+ prop: "phoneNumber",
+ width: 100,
+ // search: true,
+ searchSpan: 4,
+ },
+ {
+ label: "身份证号",
+ prop: "idCard",
+ width: 160,
+ // search: true,
+ searchSpan: 4,
+ },
+ {
+ label: "性别",
+ prop: "gender",
+ type: "select",
+ dicData: [{
+ label: "男",
+ value: 1
+ },
+ {
+ label: "女",
+ value: 0
+ },
+ {
+ label: "未知",
+ value: 1
+ }
+ ],
+ },
+ // {
+ // label: "关系",
+ // prop: "relationship",
+ // type: "select",
+ // dicUrl: "/api/blade-system/dict-biz/dictionary?code=roleRelation",
+ // dataType: "number",
+ // props: {
+ // label: "dictValue",
+ // value: "dictKey",
+ // },
+ // display: false
+ // },
+ {
+ label: "民族",
+ prop: "ethnicity",
+ type: "select",
+ // hide: true,
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=nationType",
+ dataType: "number",
+ props: {
+ label: "dictValue",
+ value: "dictKey",
+ },
+ },
+ {
+ width: 220,
+ overHidden: true,
+ label: '小区名称',
+ prop: "aoiName",
+ // search: true,
+ searchSpan: 4,
+ display: false
+ },
+ // {
+ // label: "地址",
+ // prop: "address",
+ // minWidth: 160,
+ // overHidden: true,
+ // display: false
+ // },
+
+ {
+ label: "户籍地址",
+ prop: "hukouRegistration",
+ // hide: true,
+ minWidth: 150,
+ overHidden: true,
+ },
+ {
+ label: "工作单位",
+ prop: "employer",
+ // editDisplay:false,
+ // hide: true,
+ },
+ ]
+ },
+ option: {
+ labelWidth: 120,
+ searchLabelWidth: 96,
+ searchShow: true,
+ searchMenuSpan: 3,
+ menuWidth: 280,
+ height: 'auto',
+ calcHeight: 80,
+ tip: false,
+ border: true,
+ index: true,
+ selection: true,
+ viewBtn: true,
+ addBtn: false,
+ editBtn: false,
+ dialogType: 'drawer',
+ dialogClickModal: false,
+ column: [{
+ width: 110,
+ label: "所属街道",
+ addDisplay: false,
+ editDisplay: false,
+ viewDisplay: false,
+ prop: "townStreetName",
+ search: true,
+ searchSpan: 4
+ },
+
+ {
+ width: 156,
+ overHidden: true,
+ label: "所属社区",
+ addDisplay: false,
+ editDisplay: false,
+ viewDisplay: false,
+ prop: "neiName",
+ search: true,
+ searchSpan: 4,
+ rules: [{
+ required: true,
+ message: "请选择所属社区",
+ trigger: "blur",
+ }],
+ },
+ {
+ label: "房屋",
+ prop: "houseName",
+ display: false,
+ minWidth: 150,
+ overHidden: true,
+ },
+ {
+ label: "房屋",
+ prop: "houseCode",
+ hide: true,
+ type: "table",
+
+ children: {
+ border: true,
+ height: 400,
+ searchShow: true,
+ searchMenuSpan: 6,
+ submitText: "确定",
+ column: [
+ // {
+ // width: 220,
+ // overHidden: true,
+ // label: '小区名称',
+ // prop: "districtName",
+ // search: true,
+ // searchSpan: 4,
+ // rules: [{
+ // required: true,
+ // message: "请输入小区名称",
+ // trigger: "blur",
+ // },],
+ // },
+ {
+ label: "地址",
+ prop: "address",
+ minWidth: 180,
+ display: false
+ },
+ ],
+ },
+ page: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0
+ },
+ formatter: (row) => {
+ return row.houseName
+ },
+ onLoad: ({
+ page,
+ value,
+ data
+ }, callback) => {
+ //首次加载去查询对应的值
+ if (value) {
+ getHouseDetail({
+ houseCode: value
+ }).then(res => {
+ var resData = res.data.data
+ // 查询对应行数据
+ callback(resData)
+ return
+ })
+ }
+ if (page) {
+ this.loading = true
+ getHouseList(page.currentPage, page.pageSize, Object.assign(data)).then(res => {
+ const resData = res.data.data
+ var total = resData.total
+ var data = resData.records
+ this.loading = false
+ this.selectionClear()
+ //分页查询信息
+ callback({
+ total: total,
+ data: data
+ })
+ })
+ }
+ },
+ props: {
+ label: 'address',
+ value: 'houseCode'
+ }
+ },
+ {
+ label: "关系",
+ prop: "tenantRelationship",
+ search: true,
+ searchSpan: 3,
+ searchLabelWidth: 46,
+ width: 100,
+ type: "select",
+ dicData: [{
+ label: "同一户",
+ value: 1
+ },
+ {
+ label: "不同一户",
+ value: 2
+ }
+ ],
+ rules: [{
+ required: true,
+ message: "请选择关系",
+ trigger: "blur",
+ }, ],
+ },
+ {
+ label: "房屋状态",
+ prop: "houseStatus",
+ search: true,
+ searchSpan: 4,
+ width: 100,
+ type: "select",
+ dicData: [{
+ label: "部分出租",
+ value: 1
+ },
+ {
+ label: "全部出租",
+ value: 2
+ }
+ ],
+ rules: [{
+ required: true,
+ message: "请选择房屋状态",
+ trigger: "blur",
+ }, ],
+ },
+ {
+ label: "用途",
+ prop: "rentalUse",
+ type: "select",
+ searchSpan: 3,
+ searchLabelWidth: 66,
+ search: true,
+ dataType: "number",
+ width: 100,
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=rentalUseType",
+ props: {
+ label: "dictValue",
+ value: "dictKey",
+ },
+ rules: [{
+ required: true,
+ message: "请选择用途",
+ trigger: "blur",
+ }, ],
+ },
+ {
+ width: 100,
+ label: "租房时间",
+ prop: "rentalTime",
+ type: "date",
+ format: "yyyy-MM-dd",
+ valueFormat: "yyyy-MM-dd",
+ rules: [{
+ required: true,
+ message: "请选择租房时间",
+ trigger: "blur",
+ }, ],
+ },
+ {
+ label: "到期时间",
+ prop: "dueTime",
+ type: "date",
+ format: "yyyy-MM-dd",
+ valueFormat: "yyyy-MM-dd",
+ width: 100,
+ rules: [{
+ required: true,
+ message: "请选择到期时间",
+ trigger: "blur",
+ }, ],
+ },
+
+ {
+ label: "租赁期限",
+ prop: "dldType",
+ width: 100,
+ display: false,
+ search: true,
+ searchSpan: 4,
+ type: "select",
+ dicData: [{
+ label: "长期",
+ value: 1
+ },
+ {
+ label: "中期",
+ value: 2
+ },
+ {
+ label: "短期",
+ value: 3
+ }
+ ],
+ },
+ {
+ width: 80,
+ label: "审核状态",
+ prop: "auditStatus",
+ type: "select",
+ search: true,
+ searchSpan: 4,
+ display: false,
+ slot: true,
+ dicData: [{
+ label: "已确认",
+ value: 1
+ },
+ {
+ label: "待确认",
+ value: 0
+ }
+ ],
+ },
+ {
+ width: 144,
+ label: "创建时间",
+ prop: "createTime",
+ display: false,
+ },
+ {
+ label: "合同",
+ prop: "fileUrls",
+ // align:'center',
+ width: 80,
+ type: "upload",
+ listType: "picture-img",
+ action: "/api/blade-resource/oss/endpoint/put-file",
+ propsHttp: {
+ res: "data",
+ url: "link",
+ },
+ hide: true,
+ span: 24,
+ },
+ ]
+ },
+ data: [],
+
+ excelForm: {},
+ excelOption: {
+ submitBtn: false,
+ emptyBtn: false,
+ column: [{
+ label: '模板上传',
+ prop: 'excelFile',
+ type: 'upload',
+ drag: true,
+ loadText: '模板上传中,请稍等',
+ span: 24,
+ propsHttp: {
+ res: 'data'
+ },
+ tip: '请上传 .xls,.xlsx 标准格式文件',
+ action: "/api/blade-system/user/import-user"
+ },
+ {
+ label: "数据覆盖",
+ prop: "isCovered",
+ type: "switch",
+ align: "center",
+ width: 80,
+ dicData: [{
+ label: "否",
+ value: 0
+ },
+ {
+ label: "是",
+ value: 1
+ }
+ ],
+ value: 0,
+ slot: true,
+ rules: [{
+ required: true,
+ message: "请选择是否覆盖",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: '模板下载',
+ prop: 'excelTemplate',
+ formslot: true,
+ span: 24,
+ }
+ ]
+ }
+ }
+ },
+ watch: {},
+ computed: {
+ ...mapGetters(["userInfo", "permission"]),
+ permissionList() {
+ return {
+ addBtn: this.vaildData(this.permission.houseRental_add, true),
+ viewBtn: this.vaildData(this.permission.houseRental_view, true),
+ delBtn: this.vaildData(this.permission.houseRental_delete, true),
+ editBtn: this.vaildData(this.permission.houseRental_edit, true)
+ }
+ },
+ showConfirmFlag() {
+ return (data) => {
+ let tags = {}
+
+ if (data == 0) {
+ tags = {
+ type: 'warning',
+ text: '待处理'
+ }
+ } else if (data == 1) {
+ tags = {
+ type: 'success',
+ text: '已处理'
+ }
+ }
+
+ return tags
+ }
+ }
+ },
+ mounted() {},
+ methods: {
+
+ ManageTenants(item) {
+ this.roleBox = true
+ this.rowHouseHold = item
+ this.onLoadHouseHold()
+ },
+
+ onLoadHouseHold() {
+ let params = {
+ housingRentalId: this.rowHouseHold.id,
+ }
+ getHouseholdList(this.holdPage.currentPage, this.holdPage.pageSize, Object.assign(params)).then(res => {
+ const data = res.data.data
+ this.houseHold = data.records
+ this.loading = false
+ this.selectionClear()
+ })
+ },
+
+ houseHoldRowSave(row, done, loading) {
+ row.aoiName = this.rowHouseHold.aoiName
+ row.address = this.rowHouseHold.address
+ row.housingRentalId = this.rowHouseHold.id
+ row.houseCode = this.rowHouseHold.houseCode
+ if (row.idCard) {
+ row.cardType = 111
+ }
+ householdAdd(row).then(() => {
+ this.initFlag = false
+ this.onLoadHouseHold()
+ this.$message({
+ type: "success",
+ message: "操作成功!"
+ })
+ done()
+ }, error => {
+ window.console.log(error)
+ loading()
+ })
+ },
+ rowSave(row, done, loading) {
+ if (row.fileUrls.length > 0) {
+ var urls = []
+ var split = row.fileUrls.split(",")
+ split.forEach(url => {
+ var names = url.split("jczz/")
+ urls.push(names[1])
+ })
+ row.fileUrls = urls.join(",")
+ }
+ add(row).then(() => {
+ this.initFlag = false
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!"
+ })
+ done()
+ }, error => {
+ window.console.log(error)
+ loading()
+ })
+ },
+ rowUpdate(row, index, done, loading) {
+ if (row.fileUrls.length > 0) {
+ var urls = []
+ var split = row.fileUrls.split(",")
+ split.forEach(url => {
+ var names = url.split("jczz/")
+ urls.push(names[1])
+ })
+ row.fileUrls = urls.join(",")
+ }
+ update(row).then(() => {
+ this.initFlag = false
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!"
+ })
+ done()
+ }, error => {
+ window.console.log(error)
+ loading()
+ })
+ },
+ houseHoldRowUpdate(row, index, done, loading) {
+ if (row.idCard) {
+ row.cardType = 111
+ }
+ householdUpdate(row).then(() => {
+ this.initFlag = false
+ this.onLoadHouseHold()
+ this.$message({
+ type: "success",
+ message: "操作成功!"
+ })
+ done()
+ }, error => {
+ window.console.log(error)
+ loading()
+ })
+ },
+ houseHoldRowDel(row) {
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning"
+ })
+ .then(() => {
+ return householdDel(row.id)
+ })
+ .then(() => {
+ this.onLoadHouseHold()
+ this.$message({
+ type: "success",
+ message: "操作成功!"
+ })
+ })
+ },
+ rowDel(row) {
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning"
+ })
+ .then(() => {
+ return remove(row.id)
+ })
+ .then(() => {
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!"
+ })
+ })
+ },
+ searchReset() {
+ this.query = {}
+ this.treeDeptId = ''
+ this.onLoad(this.page)
+ },
+ searchChange(params, done) {
+ this.query = params
+ this.page.currentPage = 1
+ this.onLoad(this.page, params)
+ done()
+ },
+ selectionChange(list) {
+ this.selectionList = list
+ },
+ selectionClear() {
+ this.selectionList = []
+ // this.$refs.crud.toggleSelection();
+ },
+ handleDelete() {
+ if (this.selectionList.length === 0) {
+ this.$message.warning("请选择至少一条数据")
+ return
+ }
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning"
+ })
+ .then(() => {
+ return remove(this.ids)
+ })
+ .then(() => {
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!"
+ })
+ this.$refs.crud.toggleSelection()
+ })
+ },
+ handleImport() {
+ this.excelBox = true
+ },
+ uploadAfter(res, done, loading, column) {
+ window.console.log(column)
+ this.excelBox = false
+ this.refreshChange()
+ done()
+ },
+ handleExport() {
+ const account = func.toStr(this.search.account)
+ const realName = func.toStr(this.search.realName)
+ this.$confirm("是否导出出租信息数据?", "提示", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning"
+ }).then(() => {
+ NProgress.start()
+ var data = {
+ ...this.query
+ }
+ data = Qs.stringify(data)
+ exportBlob(
+ `/api/blade-houseRental/houseRental/export-houseRental?${this.website.tokenHeader}=${getToken()}&` +
+ data
+ ).then(res => {
+ downloadXls(res.data, `出租信息数据表${dateNow()}.xlsx`)
+ NProgress.done()
+ })
+ })
+ },
+ handleTemplate() {
+ exportBlob(`/api/blade-system/user/export-template?${this.website.tokenHeader}=${getToken()}`).then(res => {
+ downloadXls(res.data, "出租信息数据模板.xlsx")
+ })
+ },
+ beforeOpen(done, type) {
+ if (["edit", "view"].includes(type)) {
+ getDetatil(this.form.id).then(res => {
+ this.form = res.data.data
+ if (this.form.fileUrls.length > 0) {
+ var urls = []
+ var names = this.form.fileUrls.split(",")
+ names.forEach(name => {
+ urls.push(website.minioUrl + name)
+ })
+ this.form.fileUrls = urls.join(",")
+ }
+ })
+ }
+ this.initFlag = true
+ done()
+ },
+ currentChange(currentPage) {
+ this.page.currentPage = currentPage
+ },
+ sizeChange(pageSize) {
+ this.page.pageSize = pageSize
+ },
+ refreshChange() {
+ this.onLoad(this.page, this.query)
+ },
+ onLoad(page, params = {}) {
+ this.loading = true
+ params.tenantInfoFlag = 0
+ getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+ const data = res.data.data
+ this.page.total = data.total
+ this.data = data.records
+ this.data.forEach(item => {
+ if (item.fileUrls && item.fileUrls.length > 0) {
+ var urls = []
+ var names = item.fileUrls.split(",")
+ names.forEach(name => {
+ urls.push(website.minioUrl + name)
+ })
+ item.fileUrls = urls.join(",")
+ }
+ })
+ this.loading = false
+ this.selectionClear()
+ })
+ },
+
+ showEditMoel(type, item) {
+ if (type == 1) {
+ this.$refs.RetalInfo.initOpen(type)
+ } else {
+ this.$refs.RetalInfo.initOpen(type, item.id)
+ }
+
+ },
+ }
+ }
+</script>
+
+<style>
+ .box {
+ height: 800px;
+ }
+
+ .el-scrollbar {
+ height: 100%;
+ }
+
+ .box .el-scrollbar__wrap {
+ overflow: scroll;
+ }
+</style>
\ No newline at end of file
diff --git a/src/views/publicSecurity/keynotePersonnelManage.vue b/src/views/publicSecurity/keynotePersonnelManage.vue
index 0e55d65..e9c6cfc 100644
--- a/src/views/publicSecurity/keynotePersonnelManage.vue
+++ b/src/views/publicSecurity/keynotePersonnelManage.vue
@@ -95,7 +95,9 @@
roleBox: false,
form: {},
- query: {},
+ query: {
+ labelId: 103,
+ },
loading: true,
page: {
@@ -446,7 +448,7 @@
...params,
}
this.loading = true
- statisticalLabels(page.currentPage, page.pageSize, values).then((res) => {
+ statisticalLabels(page.currentPage, page.pageSize, this.query).then((res) => {
const data = res.data.data
this.page.total = data.total
this.data = data.records
diff --git a/src/views/publicSecurity/keynotePersonnelManageFour.vue b/src/views/publicSecurity/keynotePersonnelManageFour.vue
new file mode 100644
index 0000000..8d20bd1
--- /dev/null
+++ b/src/views/publicSecurity/keynotePersonnelManageFour.vue
@@ -0,0 +1,543 @@
+<template>
+ <basic-container>
+ <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" ref="crud" @row-del="rowDel"
+ v-model="form" :permission="permissionList" @row-update="rowUpdate" @row-save="rowSave" :before-open="beforeOpen"
+ @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"
+ @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
+
+ <template slot-scope="scope" slot="menu">
+ <el-button type="text" size="small" icon="el-icon-view" plain @click="lookDetail(scope.row)">查 看
+ </el-button>
+ </template>
+
+ <template slot-scope="{row, size}" slot="regionName">
+ <el-button :size="size" type="text" @click="lookDetail(row)">
+ {{ row.regionName }}
+ </el-button>
+ </template>
+
+ <template slot-scope="{row, size}" slot="number1">
+ <el-button :size="size" type="text" @click="showStringDispose(row, '1041')">
+ {{ row.number1 }}
+ </el-button>
+ </template>
+
+ <template slot-scope="{row, size}" slot="number2">
+ <el-button :size="size" type="text" @click="showStringDispose(row, '1042')">
+ {{ row.number2 }}
+ </el-button>
+ </template>
+
+ <template slot-scope="{row, size}" slot="number3">
+ <el-button :size="size" type="text" @click="showStringDispose(row, '1043')">
+ {{ row.number3 }}
+ </el-button>
+ </template>
+ <template slot-scope="{row, size}" slot="number4">
+ <el-button :size="size" type="text" @click="showStringDispose(row, '1044')">
+ {{ row.number4 }}
+ </el-button>
+ </template>
+ <template slot-scope="{row, size}" slot="number5">
+ <el-button :size="size" type="text" @click="showStringDispose(row, '1045')">
+ {{ row.number5 }}
+ </el-button>
+ </template>
+ <template slot-scope="{row, size}" slot="number6">
+ <el-button :size="size" type="text" @click="showStringDispose(row, '1046')">
+ {{ row.number6 }}
+ </el-button>
+ </template>
+ <template slot-scope="{row, size}" slot="number7">
+ <el-button :size="size" type="text" @click="showStringDispose(row, '1047')">
+ {{ row.number7 }}
+ </el-button>
+ </template>
+ <template slot-scope="{row, size}" slot="number8">
+ <el-button :size="size" type="text" @click="showStringDispose(row, '1048')">
+ {{ row.number8 }}
+ </el-button>
+ </template><template slot-scope="{row, size}" slot="number9">
+ <el-button :size="size" type="text" @click="showStringDispose(row, '1049')">
+ {{ row.number9 }}
+ </el-button>
+ </template><template slot-scope="{row, size}" slot="number10">
+ <el-button :size="size" type="text" @click="showStringDispose(row, '1050')">
+ {{ row.number10 }}
+ </el-button>
+ </template><template slot-scope="{row, size}" slot="number11">
+ <el-button :size="size" type="text" @click="showStringDispose(row, '1051')">
+ {{ row.number11 }}
+ </el-button>
+ </template><template slot-scope="{row, size}" slot="number12">
+ <el-button :size="size" type="text" @click="showStringDispose(row, '1052')">
+ {{ row.number12 }}
+ </el-button>
+ </template>
+ </avue-crud>
+
+ <el-dialog title="" append-to-body :visible.sync="auditBasePopup" width="80%">
+ <communityKeyNotePersonnel ref="communityKeyNotePersonnel"></communityKeyNotePersonnel>
+ </el-dialog>
+
+ <el-dialog title="" append-to-body :visible.sync="userPopup" width="80%">
+ <userHouseList ref="userHouseList"></userHouseList>
+ </el-dialog>
+
+ </basic-container>
+</template>
+
+<script>
+ import {
+ getUnitedFrontStatisticalLabels
+ } from "@/api/userHouse/list/userHouseList"
+
+
+ import {
+ mapGetters
+ } from "vuex"
+
+ import userHouseList from './components/userHouseList.vue'
+
+ import communityKeyNotePersonnel from './components/communityKeyNotePersonnel.vue'
+
+ import website from '@/config/website'
+
+ export default {
+ data() {
+ return {
+ taskType: 0,
+ curRow: {},
+ roleBox: false,
+
+ form: {},
+ query: {
+ labelId: 103,
+ },
+ loading: true,
+
+ page: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0,
+ },
+ datetime: "",
+ selectionList: [],
+ option: {
+ height: "auto",
+ calcHeight: 54,
+ dialogWidth: 950,
+ tip: false,
+ searchShow: true,
+ searchMenuSpan: 3,
+ // menuWidth: 280,
+ menu: false,
+ border: true,
+ //stripe:true,
+ index: true,
+ // viewBtn: true,
+ editBtn: false,
+ delBtn: false,
+ addBtn: false,
+ // selection: true,
+ header: false,
+ dialogClickModal: false,
+ column: [{
+ width: 120,
+ span: 12,
+ label: "行政区域",
+ prop: "regionName",
+ align: 'center',
+ },
+ {
+ width: 120,
+ span: 12,
+ label: "民主党派成员",
+ prop: "number1",
+ align: 'center',
+ },
+ {
+ width: 120,
+ span: 12,
+ label: "无党派人士",
+ prop: "number2",
+ align: 'center',
+ },
+ {
+ width: 120,
+ span: 12,
+ label: "党外知识分子",
+ prop: "number3",
+ align: 'center',
+ },
+ {
+ width: 120,
+ span: 12,
+ label: "少数民族人士",
+ prop: "number4",
+ align: 'center',
+ },
+ {
+ width: 120,
+ span: 12,
+ label: "宗教界人士",
+ prop: "number5",
+ align: 'center',
+ }, {
+ width: 120,
+ span: 12,
+ label: "非公有制经济人士",
+ prop: "number6",
+ align: 'center',
+
+ }, {
+ width: 120,
+ span: 12,
+ label: "新的社会阶层人士",
+ prop: "number7",
+ align: 'center',
+
+ }, {
+ width: 140,
+ span: 12,
+ label: "出国和归国留学人员",
+ prop: "number8",
+ align: 'center',
+
+ }, {
+ width: 140,
+ span: 12,
+ label: "香港同胞、澳门同胞",
+ prop: "number9",
+ align: 'center',
+
+ }, {
+ width: 170,
+ span: 12,
+ label: "台湾同胞及其在大陆的亲属",
+ prop: "number10",
+ align: 'center',
+ }, {
+ width: 120,
+ span: 12,
+ label: "华侨、归侨及侨眷",
+ prop: "number11",
+ align: 'center',
+ }, {
+ width: 170,
+ span: 12,
+ label: "其他需要联系和团结的人员",
+ prop: "number12",
+ align: 'center',
+ }
+ ],
+ },
+ data: [],
+
+ auditBasePopup: false,
+ userPopup: false,
+ }
+ },
+
+ provide() {
+ return {
+ placeElement: this,
+ }
+ },
+
+ components: {
+ communityKeyNotePersonnel,
+ userHouseList,
+ // labelReporting,
+ },
+
+ watch: {},
+
+ computed: {
+ ...mapGetters(["permission", "userInfo"]),
+ permissionList() {
+ return {
+ addBtn: this.vaildData(this.permission.place_add, true),
+ viewBtn: this.vaildData(this.permission.place_view, true),
+ delBtn: this.vaildData(this.permission.place_delete, true),
+ editBtn: this.vaildData(this.permission.place_edit, true),
+ }
+ },
+ ids() {
+ let ids = []
+ this.selectionList.forEach((ele) => {
+ ids.push(ele.id)
+ })
+ return ids.join(",")
+ },
+
+ },
+ methods: {
+
+ colseDetail() {
+ this.auditBasePopup = false
+ this.onLoad(this.page)
+ },
+
+ showStringDispose(row, type) {
+ row.labelId = type
+ row.parentId = 1040
+ this.userPopup = true
+ var that = this
+ this.$nextTick(() => {
+ that.$refs.userHouseList.init(row)
+ })
+ },
+
+ lookDetail(row) {
+ this.auditBasePopup = true
+ var that = this
+ this.$nextTick(() => {
+ that.$refs.communityKeyNotePersonnel.init(row)
+ })
+ },
+
+
+ auditCur(row) {
+ this.curAuditRow = row
+ this.auditBasePopup = true
+ },
+
+ roleBoxClose() {
+ this.curRow = {}
+ },
+
+ ManageTenants(item) {
+ this.curRow = item
+ this.roleBox = true
+ },
+
+ rowSave(row, done, loading) {
+ if (row.imageUrls.length > 0) {
+ var urls = []
+ var split = row.imageUrls.split(",").filter(item => item != '')
+ split.forEach(url => {
+ var names = url.split("jczz/")
+ urls.push(names[1])
+ })
+ row.imageUrls = urls.join(",")
+ }
+
+ let label = row.label
+
+ if (row.smallLabel != '') {
+ label = label + ',' + row.smallLabel
+ }
+
+ delete row.smallLabel
+
+ add({
+ ...row,
+ label
+ }).then(
+ () => {
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ done()
+ },
+ (error) => {
+ window.console.log(error)
+ loading()
+ }
+ )
+ },
+
+ rowUpdate(row, index, done, loading) {
+ if (row.imageUrls.length > 0) {
+ var urls = []
+ var split = row.imageUrls.split(",").filter(item => item != '')
+ split.forEach(url => {
+ var names = url.split("jczz/")
+ urls.push(names[1])
+ })
+ row.imageUrls = urls.join(",")
+ }
+
+ let label = row.label
+
+ if (row.smallLabel != '') {
+ label = label + ',' + row.smallLabel
+ }
+
+ delete row.smallLabel
+
+ update({
+ ...row,
+ label
+ }).then(
+ () => {
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ done()
+ },
+ (error) => {
+ window.console.log(error)
+ loading()
+ }
+ )
+ },
+
+ rowDel(row) {
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ row.isDeleted = 1
+ return removeTask(row)
+ })
+ .then(() => {
+ this.onLoad(this.page)
+
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ })
+ },
+ searchReset() {
+ this.query = {}
+ this.onLoad(this.page)
+ },
+ searchChange(params, done) {
+ this.query = params
+ this.page.currentPage = 1
+ this.onLoad(this.page, params)
+ done()
+ },
+ selectionChange(list) {
+ this.selectionList = list
+ },
+ selectionClear() {
+ this.selectionList = []
+ this.$nextTick(() => {
+ this.$refs.crud && this.$refs.crud.toggleSelection()
+ })
+ },
+ handleDelete() {
+ if (this.selectionList.length === 0) {
+ this.$message.warning("请选择至少一条数据")
+ return
+ }
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ return remove(this.ids)
+ })
+ .then(() => {
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ this.$refs.crud.toggleSelection()
+ })
+ },
+
+ beforeOpen(done, type) {
+ if (["edit", "view"].includes(type)) {
+ // getPlace(this.form.id).then((res) => {
+ // this.form = res.data.data
+ // if (this.form.imageUrls.length) {
+ // this.form.imageUrls = this.form.imageUrls.split(",").filter(item => item != '').map(item => website
+ // .minioUrl + item).join(',')
+ // }
+ // if (this.form.placePoiLabelVOList.length) {
+ // let lebelTwo = this.form.placePoiLabelVOList.find(item => {
+ // return item.type == 2
+ // })
+ // if (lebelTwo) this.form.label = String(lebelTwo.poiCode)
+ // let lebelThree = this.form.placePoiLabelVOList.find(item => {
+ // return item.type == 3
+ // })
+ // if (lebelThree) this.form.smallLabel = String(lebelThree.poiCode)
+ // }
+ // done()
+ // })
+ } else {
+ done()
+ }
+ },
+
+ currentChange(currentPage) {
+ this.page.currentPage = currentPage
+ },
+ sizeChange(pageSize) {
+ this.page.pageSize = pageSize
+ },
+ refreshChange() {
+ this.onLoad(this.page, this.query)
+ },
+ onLoad(page, params = {}) {
+ const {
+ dateTime
+ } = this.query
+ let values = {
+ ...params,
+ }
+ this.loading = true
+ getUnitedFrontStatisticalLabels(page.currentPage, page.pageSize, this.query).then((res) => {
+ const data = res.data.data
+ this.page.total = data.total
+ this.data = data.records
+ this.data.forEach(item => {
+ if (item.imageUrls && item.imageUrls != '' && item.imageUrls != null && item.imageUrls.length) {
+ var urls = []
+ var names = item.imageUrls.split(",").filter(item => item != '')
+ names.forEach(name => {
+ urls.push(website.minioUrl + name)
+ })
+ item.imageUrls = urls.join(",")
+ }
+ })
+ this.loading = false
+ this.selectionClear()
+ })
+ }
+ }
+ }
+</script>
+
+<style lang="scss" scoped>
+ .avue-upload__icon {
+ line-height: 6;
+ }
+
+ .cur-container-box {
+ display: flex;
+ flex-direction: column;
+ width: 100%;
+ height: 100%;
+ overflow: hidden;
+
+ .content-box {
+ margin: 0 4px;
+ padding: 0 16px;
+ height: 0;
+ flex: 1;
+ overflow: hidden;
+ overflow-y: auto;
+ }
+
+ .footer-btn-box {
+ margin-top: 10px;
+ display: flex;
+ justify-content: center;
+ }
+ }
+</style>
\ No newline at end of file
diff --git a/src/views/publicSecurity/keynotePersonnelManageTree.vue b/src/views/publicSecurity/keynotePersonnelManageTree.vue
new file mode 100644
index 0000000..4e099f9
--- /dev/null
+++ b/src/views/publicSecurity/keynotePersonnelManageTree.vue
@@ -0,0 +1,429 @@
+<template>
+ <basic-container>
+ <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" ref="crud" @row-del="rowDel"
+ v-model="form" :permission="permissionList" @row-update="rowUpdate" @row-save="rowSave" :before-open="beforeOpen"
+ @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"
+ @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
+
+ <template slot-scope="scope" slot="menu">
+ <el-button type="text" size="small" icon="el-icon-view" plain @click="lookDetail(scope.row)">查 看
+ </el-button>
+ </template>
+
+ <template slot-scope="{row, size}" slot="regionName">
+ <el-button :size="size" type="text" @click="lookDetail(row)">
+ {{ row.regionName }}
+ </el-button>
+ </template>
+
+ <template slot-scope="{row, size}" slot="number1">
+ <el-button :size="size" type="text" @click="showStringDispose(row, '1033')">
+ {{ row.number1 }}
+ </el-button>
+ </template>
+
+ <template slot-scope="{row, size}" slot="number2">
+ <el-button :size="size" type="text" @click="showStringDispose(row, '15')">
+ {{ row.number2 }}
+ </el-button>
+ </template>
+ </avue-crud>
+
+ <el-dialog title="" append-to-body :visible.sync="auditBasePopup" width="80%">
+ <communityKeyNotePersonnel ref="communityKeyNotePersonnel"></communityKeyNotePersonnel>
+ </el-dialog>
+
+ <el-dialog title="" append-to-body :visible.sync="userPopup" width="80%">
+ <userHouseList ref="userHouseList"></userHouseList>
+ </el-dialog>
+
+ </basic-container>
+</template>
+
+<script>
+ import {
+ getFollowStatisticalLabels
+ } from "@/api/userHouse/list/userHouseList"
+
+
+ import {
+ mapGetters
+ } from "vuex"
+
+ import userHouseList from './components/userHouseList.vue'
+
+ import communityKeyNotePersonnel from './components/communityKeyNotePersonnel.vue'
+
+ import website from '@/config/website'
+
+ export default {
+ data() {
+ return {
+ taskType: 0,
+ curRow: {},
+ roleBox: false,
+
+ form: {},
+ query: {},
+ loading: true,
+
+ page: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0,
+ },
+ datetime: "",
+ selectionList: [],
+ option: {
+ height: "auto",
+ calcHeight: 54,
+ dialogWidth: 950,
+ tip: false,
+ searchShow: true,
+ searchMenuSpan: 3,
+ // menuWidth: 280,
+ menu: false,
+ border: true,
+ //stripe:true,
+ index: true,
+ // viewBtn: true,
+ editBtn: false,
+ delBtn: false,
+ addBtn: false,
+ // selection: true,
+ header: false,
+ dialogClickModal: false,
+ column: [{
+ span: 12,
+ label: "行政区域",
+ prop: "regionName",
+ searchSpan: 4,
+ align: 'center',
+ // search: true,
+ // hide: true,
+ },
+ {
+ span: 12,
+ label: "孤寡老人",
+ prop: "number1",
+ align: 'center',
+ searchSpan: 4,
+ },
+ {
+ span: 12,
+ label: "留守儿童",
+ prop: "number2",
+ align: 'center',
+ searchSpan: 4,
+ }
+ ],
+ },
+ data: [],
+
+ auditBasePopup: false,
+ userPopup: false,
+ }
+ },
+
+ provide() {
+ return {
+ placeElement: this,
+ }
+ },
+
+ components: {
+ communityKeyNotePersonnel,
+ userHouseList,
+ // labelReporting,
+ },
+
+ watch: {},
+
+ computed: {
+ ...mapGetters(["permission", "userInfo"]),
+ permissionList() {
+ return {
+ addBtn: this.vaildData(this.permission.place_add, true),
+ viewBtn: this.vaildData(this.permission.place_view, true),
+ delBtn: this.vaildData(this.permission.place_delete, true),
+ editBtn: this.vaildData(this.permission.place_edit, true),
+ }
+ },
+ ids() {
+ let ids = []
+ this.selectionList.forEach((ele) => {
+ ids.push(ele.id)
+ })
+ return ids.join(",")
+ },
+
+ },
+ methods: {
+
+ colseDetail() {
+ this.auditBasePopup = false
+ this.onLoad(this.page)
+ },
+
+ showStringDispose(row, type) {
+ row.labelId = type
+ row.parentId = 1032
+ this.userPopup = true
+ var that = this
+ this.$nextTick(() => {
+ that.$refs.userHouseList.init(row)
+ })
+ },
+
+ lookDetail(row) {
+ this.auditBasePopup = true
+ var that = this
+ this.$nextTick(() => {
+ that.$refs.communityKeyNotePersonnel.init(row)
+ })
+ },
+
+
+ auditCur(row) {
+ this.curAuditRow = row
+ this.auditBasePopup = true
+ },
+
+ roleBoxClose() {
+ this.curRow = {}
+ },
+
+ ManageTenants(item) {
+ this.curRow = item
+ this.roleBox = true
+ },
+
+ rowSave(row, done, loading) {
+ if (row.imageUrls.length > 0) {
+ var urls = []
+ var split = row.imageUrls.split(",").filter(item => item != '')
+ split.forEach(url => {
+ var names = url.split("jczz/")
+ urls.push(names[1])
+ })
+ row.imageUrls = urls.join(",")
+ }
+
+ let label = row.label
+
+ if (row.smallLabel != '') {
+ label = label + ',' + row.smallLabel
+ }
+
+ delete row.smallLabel
+
+ add({
+ ...row,
+ label
+ }).then(
+ () => {
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ done()
+ },
+ (error) => {
+ window.console.log(error)
+ loading()
+ }
+ )
+ },
+
+ rowUpdate(row, index, done, loading) {
+ if (row.imageUrls.length > 0) {
+ var urls = []
+ var split = row.imageUrls.split(",").filter(item => item != '')
+ split.forEach(url => {
+ var names = url.split("jczz/")
+ urls.push(names[1])
+ })
+ row.imageUrls = urls.join(",")
+ }
+
+ let label = row.label
+
+ if (row.smallLabel != '') {
+ label = label + ',' + row.smallLabel
+ }
+
+ delete row.smallLabel
+
+ update({
+ ...row,
+ label
+ }).then(
+ () => {
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ done()
+ },
+ (error) => {
+ window.console.log(error)
+ loading()
+ }
+ )
+ },
+
+ rowDel(row) {
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ row.isDeleted = 1
+ return removeTask(row)
+ })
+ .then(() => {
+ this.onLoad(this.page)
+
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ })
+ },
+ searchReset() {
+ this.query = {}
+ this.onLoad(this.page)
+ },
+ searchChange(params, done) {
+ this.query = params
+ this.page.currentPage = 1
+ this.onLoad(this.page, params)
+ done()
+ },
+ selectionChange(list) {
+ this.selectionList = list
+ },
+ selectionClear() {
+ this.selectionList = []
+ this.$nextTick(() => {
+ this.$refs.crud && this.$refs.crud.toggleSelection()
+ })
+ },
+ handleDelete() {
+ if (this.selectionList.length === 0) {
+ this.$message.warning("请选择至少一条数据")
+ return
+ }
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ return remove(this.ids)
+ })
+ .then(() => {
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ this.$refs.crud.toggleSelection()
+ })
+ },
+
+ beforeOpen(done, type) {
+ if (["edit", "view"].includes(type)) {
+ // getPlace(this.form.id).then((res) => {
+ // this.form = res.data.data
+ // if (this.form.imageUrls.length) {
+ // this.form.imageUrls = this.form.imageUrls.split(",").filter(item => item != '').map(item => website
+ // .minioUrl + item).join(',')
+ // }
+ // if (this.form.placePoiLabelVOList.length) {
+ // let lebelTwo = this.form.placePoiLabelVOList.find(item => {
+ // return item.type == 2
+ // })
+ // if (lebelTwo) this.form.label = String(lebelTwo.poiCode)
+ // let lebelThree = this.form.placePoiLabelVOList.find(item => {
+ // return item.type == 3
+ // })
+ // if (lebelThree) this.form.smallLabel = String(lebelThree.poiCode)
+ // }
+ // done()
+ // })
+ } else {
+ done()
+ }
+ },
+
+ currentChange(currentPage) {
+ this.page.currentPage = currentPage
+ },
+ sizeChange(pageSize) {
+ this.page.pageSize = pageSize
+ },
+ refreshChange() {
+ this.onLoad(this.page, this.query)
+ },
+ onLoad(page, params = {}) {
+ const {
+ dateTime
+ } = this.query
+ let values = {
+ ...params,
+ }
+ this.loading = true
+ getFollowStatisticalLabels(page.currentPage, page.pageSize, values).then((res) => {
+ const data = res.data.data
+ this.page.total = data.total
+ this.data = data.records
+ this.data.forEach(item => {
+ if (item.imageUrls && item.imageUrls != '' && item.imageUrls != null && item.imageUrls.length) {
+ var urls = []
+ var names = item.imageUrls.split(",").filter(item => item != '')
+ names.forEach(name => {
+ urls.push(website.minioUrl + name)
+ })
+ item.imageUrls = urls.join(",")
+ }
+ })
+ this.loading = false
+ this.selectionClear()
+ })
+ }
+ }
+ }
+</script>
+
+<style lang="scss" scoped>
+ .avue-upload__icon {
+ line-height: 6;
+ }
+
+ .cur-container-box {
+ display: flex;
+ flex-direction: column;
+ width: 100%;
+ height: 100%;
+ overflow: hidden;
+
+ .content-box {
+ margin: 0 4px;
+ padding: 0 16px;
+ height: 0;
+ flex: 1;
+ overflow: hidden;
+ overflow-y: auto;
+ }
+
+ .footer-btn-box {
+ margin-top: 10px;
+ display: flex;
+ justify-content: center;
+ }
+ }
+</style>
\ No newline at end of file
diff --git a/src/views/publicSecurity/keynotePersonnelManageTwo.vue b/src/views/publicSecurity/keynotePersonnelManageTwo.vue
new file mode 100644
index 0000000..0b0918e
--- /dev/null
+++ b/src/views/publicSecurity/keynotePersonnelManageTwo.vue
@@ -0,0 +1,466 @@
+<template>
+ <basic-container>
+ <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" ref="crud" @row-del="rowDel"
+ v-model="form" :permission="permissionList" @row-update="rowUpdate" @row-save="rowSave" :before-open="beforeOpen"
+ @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"
+ @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
+
+ <template slot-scope="scope" slot="menu">
+ <el-button type="text" size="small" icon="el-icon-view" plain @click="lookDetail(scope.row)">查 看
+ </el-button>
+ </template>
+
+ <template slot-scope="{row, size}" slot="regionName">
+ <el-button :size="size" type="text" @click="lookDetail(row)">
+ {{ row.regionName }}
+ </el-button>
+ </template>
+
+ <template slot-scope="{row, size}" slot="number1">
+ <el-button :size="size" type="text" @click="showStringDispose(row, '24')">
+ {{ row.number1 }}
+ </el-button>
+ </template>
+
+ <template slot-scope="{row, size}" slot="number2">
+ <el-button :size="size" type="text" @click="showStringDispose(row, '25')">
+ {{ row.number2 }}
+ </el-button>
+ </template>
+
+ <template slot-scope="{row, size}" slot="number3">
+ <el-button :size="size" type="text" @click="showStringDispose(row, '26')">
+ {{ row.number3 }}
+ </el-button>
+ </template>
+ <template slot-scope="{row, size}" slot="number4">
+ <el-button :size="size" type="text" @click="showStringDispose(row, '27')">
+ {{ row.number4 }}
+ </el-button>
+ </template>
+ <template slot-scope="{row, size}" slot="number5">
+ <el-button :size="size" type="text" @click="showStringDispose(row, '28')">
+ {{ row.number5 }}
+ </el-button>
+ </template>
+ </avue-crud>
+
+ <el-dialog title="" append-to-body :visible.sync="auditBasePopup" width="80%">
+ <communityKeyNotePersonnel ref="communityKeyNotePersonnel"></communityKeyNotePersonnel>
+ </el-dialog>
+
+ <el-dialog title="" append-to-body :visible.sync="userPopup" width="80%">
+ <userHouseList ref="userHouseList"></userHouseList>
+ </el-dialog>
+
+ </basic-container>
+</template>
+
+<script>
+ import {
+ getOrgStatisticalLabels
+ } from "@/api/userHouse/list/userHouseList"
+
+
+ import {
+ mapGetters
+ } from "vuex"
+
+ import userHouseList from './components/userHouseList.vue'
+
+ import communityKeyNotePersonnel from './components/communityKeyNotePersonnel.vue'
+
+ import website from '@/config/website'
+
+ export default {
+ data() {
+ return {
+ taskType: 0,
+ curRow: {},
+ roleBox: false,
+
+ form: {},
+ query: {},
+ loading: true,
+
+ page: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0,
+ },
+ datetime: "",
+ selectionList: [],
+ option: {
+ height: "auto",
+ calcHeight: 54,
+ dialogWidth: 950,
+ tip: false,
+ searchShow: true,
+ searchMenuSpan: 3,
+ // menuWidth: 280,
+ menu: false,
+ border: true,
+ //stripe:true,
+ index: true,
+ // viewBtn: true,
+ editBtn: false,
+ delBtn: false,
+ addBtn: false,
+ // selection: true,
+ header: false,
+ dialogClickModal: false,
+ column: [{
+ span: 12,
+ label: "行政区域",
+ prop: "regionName",
+ searchSpan: 4,
+ align: 'center',
+ // search: true,
+ // hide: true,
+ },
+ {
+ span: 12,
+ label: "在职党员",
+ prop: "number1",
+ align: 'center',
+ searchSpan: 4,
+ },
+ {
+ span: 12,
+ label: "在册党员",
+ prop: "number2",
+ align: 'center',
+ searchSpan: 4,
+ },
+ {
+ span: 12,
+ label: "退休党员",
+ prop: "number3",
+ align: 'center',
+ searchSpan: 4,
+ },
+ {
+ span: 12,
+ label: "流动党员",
+ prop: "number4",
+ align: 'center',
+ searchSpan: 4,
+ },
+ {
+ span: 12,
+ label: "困难党员",
+ prop: "number5",
+ align: 'center',
+ searchSpan: 4,
+ }
+ ],
+ },
+ data: [],
+
+ auditBasePopup: false,
+ userPopup: false,
+ }
+ },
+
+ provide() {
+ return {
+ placeElement: this,
+ }
+ },
+
+ components: {
+ communityKeyNotePersonnel,
+ userHouseList,
+ // labelReporting,
+ },
+
+ watch: {},
+
+ computed: {
+ ...mapGetters(["permission", "userInfo"]),
+ permissionList() {
+ return {
+ addBtn: this.vaildData(this.permission.place_add, true),
+ viewBtn: this.vaildData(this.permission.place_view, true),
+ delBtn: this.vaildData(this.permission.place_delete, true),
+ editBtn: this.vaildData(this.permission.place_edit, true),
+ }
+ },
+ ids() {
+ let ids = []
+ this.selectionList.forEach((ele) => {
+ ids.push(ele.id)
+ })
+ return ids.join(",")
+ },
+
+ },
+ methods: {
+
+ colseDetail() {
+ this.auditBasePopup = false
+ this.onLoad(this.page)
+ },
+
+ showStringDispose(row, type) {
+ row.labelId = type
+ row.parentId = 104
+ this.userPopup = true
+ var that = this
+ this.$nextTick(() => {
+ that.$refs.userHouseList.init(row)
+ })
+ },
+
+ lookDetail(row) {
+ this.auditBasePopup = true
+ var that = this
+ this.$nextTick(() => {
+ that.$refs.communityKeyNotePersonnel.init(row)
+ })
+ },
+
+
+ auditCur(row) {
+ this.curAuditRow = row
+ this.auditBasePopup = true
+ },
+
+ roleBoxClose() {
+ this.curRow = {}
+ },
+
+ ManageTenants(item) {
+ this.curRow = item
+ this.roleBox = true
+ },
+
+ rowSave(row, done, loading) {
+ if (row.imageUrls.length > 0) {
+ var urls = []
+ var split = row.imageUrls.split(",").filter(item => item != '')
+ split.forEach(url => {
+ var names = url.split("jczz/")
+ urls.push(names[1])
+ })
+ row.imageUrls = urls.join(",")
+ }
+
+ let label = row.label
+
+ if (row.smallLabel != '') {
+ label = label + ',' + row.smallLabel
+ }
+
+ delete row.smallLabel
+
+ add({
+ ...row,
+ label
+ }).then(
+ () => {
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ done()
+ },
+ (error) => {
+ window.console.log(error)
+ loading()
+ }
+ )
+ },
+
+ rowUpdate(row, index, done, loading) {
+ if (row.imageUrls.length > 0) {
+ var urls = []
+ var split = row.imageUrls.split(",").filter(item => item != '')
+ split.forEach(url => {
+ var names = url.split("jczz/")
+ urls.push(names[1])
+ })
+ row.imageUrls = urls.join(",")
+ }
+
+ let label = row.label
+
+ if (row.smallLabel != '') {
+ label = label + ',' + row.smallLabel
+ }
+
+ delete row.smallLabel
+
+ update({
+ ...row,
+ label
+ }).then(
+ () => {
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ done()
+ },
+ (error) => {
+ window.console.log(error)
+ loading()
+ }
+ )
+ },
+
+ rowDel(row) {
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ row.isDeleted = 1
+ return removeTask(row)
+ })
+ .then(() => {
+ this.onLoad(this.page)
+
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ })
+ },
+ searchReset() {
+ this.query = {}
+ this.onLoad(this.page)
+ },
+ searchChange(params, done) {
+ this.query = params
+ this.page.currentPage = 1
+ this.onLoad(this.page, params)
+ done()
+ },
+ selectionChange(list) {
+ this.selectionList = list
+ },
+ selectionClear() {
+ this.selectionList = []
+ this.$nextTick(() => {
+ this.$refs.crud && this.$refs.crud.toggleSelection()
+ })
+ },
+ handleDelete() {
+ if (this.selectionList.length === 0) {
+ this.$message.warning("请选择至少一条数据")
+ return
+ }
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ return remove(this.ids)
+ })
+ .then(() => {
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ this.$refs.crud.toggleSelection()
+ })
+ },
+
+ beforeOpen(done, type) {
+ if (["edit", "view"].includes(type)) {
+ // getPlace(this.form.id).then((res) => {
+ // this.form = res.data.data
+ // if (this.form.imageUrls.length) {
+ // this.form.imageUrls = this.form.imageUrls.split(",").filter(item => item != '').map(item => website
+ // .minioUrl + item).join(',')
+ // }
+ // if (this.form.placePoiLabelVOList.length) {
+ // let lebelTwo = this.form.placePoiLabelVOList.find(item => {
+ // return item.type == 2
+ // })
+ // if (lebelTwo) this.form.label = String(lebelTwo.poiCode)
+ // let lebelThree = this.form.placePoiLabelVOList.find(item => {
+ // return item.type == 3
+ // })
+ // if (lebelThree) this.form.smallLabel = String(lebelThree.poiCode)
+ // }
+ // done()
+ // })
+ } else {
+ done()
+ }
+ },
+
+ currentChange(currentPage) {
+ this.page.currentPage = currentPage
+ },
+ sizeChange(pageSize) {
+ this.page.pageSize = pageSize
+ },
+ refreshChange() {
+ this.onLoad(this.page, this.query)
+ },
+ onLoad(page, params = {}) {
+ const {
+ dateTime
+ } = this.query
+ let values = {
+ ...params,
+ }
+ this.loading = true
+ getOrgStatisticalLabels(page.currentPage, page.pageSize, values).then((res) => {
+ const data = res.data.data
+ this.page.total = data.total
+ this.data = data.records
+ this.data.forEach(item => {
+ if (item.imageUrls && item.imageUrls != '' && item.imageUrls != null && item.imageUrls.length) {
+ var urls = []
+ var names = item.imageUrls.split(",").filter(item => item != '')
+ names.forEach(name => {
+ urls.push(website.minioUrl + name)
+ })
+ item.imageUrls = urls.join(",")
+ }
+ })
+ this.loading = false
+ this.selectionClear()
+ })
+ }
+ }
+ }
+</script>
+
+<style lang="scss" scoped>
+ .avue-upload__icon {
+ line-height: 6;
+ }
+
+ .cur-container-box {
+ display: flex;
+ flex-direction: column;
+ width: 100%;
+ height: 100%;
+ overflow: hidden;
+
+ .content-box {
+ margin: 0 4px;
+ padding: 0 16px;
+ height: 0;
+ flex: 1;
+ overflow: hidden;
+ overflow-y: auto;
+ }
+
+ .footer-btn-box {
+ margin-top: 10px;
+ display: flex;
+ justify-content: center;
+ }
+ }
+</style>
\ No newline at end of file
diff --git a/src/views/publicSecurity/keynotePlaceManage.vue b/src/views/publicSecurity/keynotePlaceManage.vue
index a6ada47..a0cdeea 100644
--- a/src/views/publicSecurity/keynotePlaceManage.vue
+++ b/src/views/publicSecurity/keynotePlaceManage.vue
@@ -48,6 +48,7 @@
custom-class="flow-design-dialog" :before-close="handleClose">
<audit-base @handleSubmit="submitAudit"></audit-base>
</el-dialog>
+
<el-drawer title="消防自查详情" :visible.sync="isDetail" :append-to-body="true" size="40%" direction="rtl">
<div class="title">
<div class="icon">{{ refreshNum }}</div>
@@ -58,10 +59,6 @@
<div class="info-name">场所名称</div>
<div class="info-value">{{ rowDetail.placeName }}</div>
</div>
- <!-- <div class="info-item">
- <div class="info-name">场所类别</div>
- <div class="info-value">{{ rowDetail.nineTypeName }}</div>
- </div> -->
<div class="info-item">
<div class="info-name">检查人</div>
<div class="info-value">{{ rowDetail.name }}</div>
@@ -532,7 +529,6 @@
item.imageUrlsList = item.imageUrls.split(',').map(ele => {
return website.minioUrl + ele
})
-
}
if (item.rectificationImageUrls) {
item.rectificationImageUrlsList = item.rectificationImageUrls.split(',').map(ele => {
@@ -821,26 +817,7 @@
},
beforeOpen(done, type) {
- if (["edit", "view"].includes(type)) {
- // getPlace(this.form.id).then((res) => {
- // this.form = res.data.data
- // if (this.form.imageUrls.length) {
- // this.form.imageUrls = this.form.imageUrls.split(",").filter(item => item != '').map(item => website
- // .minioUrl + item).join(',')
- // }
- // if (this.form.placePoiLabelVOList.length) {
- // let lebelTwo = this.form.placePoiLabelVOList.find(item => {
- // return item.type == 2
- // })
- // if (lebelTwo) this.form.label = String(lebelTwo.poiCode)
- // let lebelThree = this.form.placePoiLabelVOList.find(item => {
- // return item.type == 3
- // })
- // if (lebelThree) this.form.smallLabel = String(lebelThree.poiCode)
- // }
- // done()
- // })
- } else {
+ if (["edit", "view"].includes(type)) {} else {
done()
}
},
diff --git a/src/views/publicSecurity/ninePlaceManage/hiddenDangerStatistics.vue b/src/views/publicSecurity/ninePlaceManage/hiddenDangerStatistics.vue
index eea0eca..00f2ee4 100644
--- a/src/views/publicSecurity/ninePlaceManage/hiddenDangerStatistics.vue
+++ b/src/views/publicSecurity/ninePlaceManage/hiddenDangerStatistics.vue
@@ -1,711 +1,716 @@
<template>
- <basic-container>
- <div class="search-box">
- <div class="date-box">
- <div class="name">检查时间:</div>
- <el-date-picker v-model="dateTime" type="daterange" range-separator="至" start-placeholder="开始日期"
- end-placeholder="结束日期" value-format="yyyy-MM-dd" format="yyyy-MM-dd">
- </el-date-picker>
- </div>
- <div class="btn-box">
- <el-button type="primary" icon="el-icon-search" @click="searchChange">搜索</el-button>
- <el-button icon="el-icon-refresh" @click="searchReset">重置</el-button>
- <!-- <el-button type="primary" icon="el-icon-download" @click="exportAvue">导出</el-button> -->
- </div>
- </div>
+ <basic-container>
+ <div class="search-box">
+ <div class="date-box">
+ <div class="name">检查时间:</div>
+ <el-date-picker v-model="dateTime" type="daterange" range-separator="至" start-placeholder="开始日期"
+ end-placeholder="结束日期" value-format="yyyy-MM-dd" format="yyyy-MM-dd">
+ </el-date-picker>
+ </div>
+ <div class="btn-box">
+ <el-button type="primary" icon="el-icon-search" @click="searchChange">搜索</el-button>
+ <el-button icon="el-icon-refresh" @click="searchReset">重置</el-button>
+ <!-- <el-button type="primary" icon="el-icon-download" @click="exportAvue">导出</el-button> -->
+ </div>
+ </div>
- <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" ref="crud" @row-del="rowDel"
- v-model="form" :permission="permissionList" @row-update="rowUpdate" @row-save="rowSave"
- :before-open="beforeOpen" @search-change="searchChange" @search-reset="searchReset"
- @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
- @refresh-change="refreshChange" @on-load="onLoad">
- <template slot="menuLeft">
- <el-button type="warning" size="small" plain icon="el-icon-download" @click="exportAvue">导出
- </el-button>
- </template>
- </avue-crud>
- </basic-container>
+ <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" ref="crud" @row-del="rowDel"
+ v-model="form" :permission="permissionList" @row-update="rowUpdate" @row-save="rowSave" :before-open="beforeOpen"
+ @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"
+ @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
+ <template slot="menuLeft">
+ <el-button type="warning" size="small" plain icon="el-icon-download" @click="exportAvue">导出
+ </el-button>
+ </template>
+ </avue-crud>
+ </basic-container>
</template>
<script>
-import {
+ import {
mapGetters
-} from "vuex"
-import {
+ } from "vuex"
+ import {
getYHTJList
-} from "@/api/publicSecurity/ninePlaceManage"
-import { export_json_to_excels } from "@/util/Export2Excel"
-import { timestampToTime } from "@/util/timeStamp"
+ } from "@/api/publicSecurity/ninePlaceManage"
+ import {
+ export_json_to_excels
+ } from "@/util/Export2Excel"
+ import {
+ timestampToTime
+ } from "@/util/timeStamp"
-export default {
- data () {
- return {
- form: {},
- query: {},
- loading: true,
+ export default {
+ data() {
+ return {
+ form: {},
+ query: {},
+ loading: true,
- page: {
- pageSize: 10,
- currentPage: 1,
- total: 0,
+ page: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0,
+ },
+ dateTime: "",
+ selectionList: [],
+ option: {
+ height: "auto",
+ calcHeight: 54,
+ dialogWidth: 950,
+ tip: false,
+ searchShow: true,
+ searchMenuSpan: 3,
+ menu: false,
+ border: true,
+ index: true,
+ editBtn: false,
+ delBtn: false,
+ addBtn: false,
+ excelBtn: false,
+ columnBtn: false,
+ refreshBtn: false,
+ dialogClickModal: false,
+ column: [{
+ label: "地区",
+ prop: "name",
+ align: 'center',
+ }, {
+ label: "小商店",
+ prop: "xsd",
+ align: 'center',
},
- dateTime: "",
- selectionList: [],
- option: {
- height: "auto",
- calcHeight: 54,
- dialogWidth: 950,
- tip: false,
- searchShow: true,
- searchMenuSpan: 3,
- menu: false,
- border: true,
- index: true,
- editBtn: false,
- delBtn: false,
- addBtn: false,
- excelBtn: false,
- columnBtn: false,
- refreshBtn: false,
- dialogClickModal: false,
- column: [
- {
- label: "地区",
- prop: "name",
- align: 'center',
- }, {
- label: "小商店",
- prop: "xsd",
- align: 'center',
- },
- {
- label: "小旅馆",
- prop: "xlg",
- align: 'center',
- },
- {
- label: "小学校(幼儿园、校外培训机构)",
- align: 'center',
- children: [
- {
- label: "学校",
- prop: "xxx",
- align: 'center',
- },
- {
- label: "幼儿园",
- prop: "yey",
- align: 'center',
- },
- {
- label: "校外培训机构",
- prop: "xwpxjg",
- align: 'center',
- }
- ]
- },
- {
- label: "小医院(诊所、养老院)",
- align: 'center',
- children: [
- {
- label: "医院",
- prop: "yy",
- align: 'center',
- },
- {
- label: "诊所",
- prop: "zs",
- align: 'center',
- },
- {
- label: "养老院",
- prop: "yly",
- align: 'center',
- }
- ]
- },
- {
- label: "小网吧",
- prop: "xwb",
- align: 'center',
- },
- {
- label: "小餐饮场所",
- prop: "xcycs",
- align: 'center',
- },
- {
- label: "小歌舞娱乐场所",
- prop: "xgwylcs",
- align: 'center',
- },
- {
- label: "小美容洗浴场所",
- prop: "xmrxycs",
- align: 'center',
- },
- {
- label: "小生产加工企业",
- prop: "xscjgqy",
- align: 'center',
- },
- {
- label: "总数",
- prop: "count",
- align: 'center',
- },
- // {
- // label: "检查时间",
- // prop: "dateTime",
- // type: "daterange",
- // format: 'yyyy-MM-DD',
- // valueFormat: 'yyyy-MM-DD',
- // isAdmin: true,//自定义属性
- // startPlaceholder: '日期开始范围',
- // endPlaceholder: '日期结束范围',
- // hide: true,
- // addDisplay: false,
- // editDisplay: false,
- // viewDisplay: false,
- // search: true,
- // searchSpan: 6,
- // searchRange: true,
- // }
- ],
+ {
+ label: "小旅馆",
+ prop: "xlg",
+ align: 'center',
},
- data: []
- }
+ {
+ label: "小学校(幼儿园、校外培训机构)",
+ align: 'center',
+ children: [{
+ label: "学校",
+ prop: "xxx",
+ align: 'center',
+ },
+ {
+ label: "幼儿园",
+ prop: "yey",
+ align: 'center',
+ },
+ {
+ label: "校外培训机构",
+ prop: "xwpxjg",
+ align: 'center',
+ }
+ ]
+ },
+ {
+ label: "小医院(诊所、养老院)",
+ align: 'center',
+ children: [{
+ label: "医院",
+ prop: "yy",
+ align: 'center',
+ },
+ {
+ label: "诊所",
+ prop: "zs",
+ align: 'center',
+ },
+ {
+ label: "养老院",
+ prop: "yly",
+ align: 'center',
+ }
+ ]
+ },
+ {
+ label: "小网吧",
+ prop: "xwb",
+ align: 'center',
+ },
+ {
+ label: "小餐饮场所",
+ prop: "xcycs",
+ align: 'center',
+ },
+ {
+ width: 120,
+ label: "小歌舞娱乐场所",
+ prop: "xgwylcs",
+ align: 'center',
+ },
+ {
+ width: 120,
+ label: "小美容洗浴场所",
+ prop: "xmrxycs",
+ align: 'center',
+ },
+ {
+ width: 120,
+ label: "小生产加工企业",
+ prop: "xscjgqy",
+ align: 'center',
+ },
+ {
+ label: "总数",
+ prop: "count",
+ align: 'center',
+ },
+ // {
+ // label: "检查时间",
+ // prop: "dateTime",
+ // type: "daterange",
+ // format: 'yyyy-MM-DD',
+ // valueFormat: 'yyyy-MM-DD',
+ // isAdmin: true,//自定义属性
+ // startPlaceholder: '日期开始范围',
+ // endPlaceholder: '日期结束范围',
+ // hide: true,
+ // addDisplay: false,
+ // editDisplay: false,
+ // viewDisplay: false,
+ // search: true,
+ // searchSpan: 6,
+ // searchRange: true,
+ // }
+ ],
+ },
+ data: []
+ }
},
computed: {
- ...mapGetters(["permission", "userInfo"]),
- permissionList () {
- return {
- addBtn: this.vaildData(this.permission.place_add, true),
- viewBtn: this.vaildData(this.permission.place_view, true),
- delBtn: this.vaildData(this.permission.place_delete, true),
- editBtn: this.vaildData(this.permission.place_edit, true),
- }
- },
- ids () {
- let ids = []
- this.selectionList.forEach((ele) => {
- ids.push(ele.id)
- })
- return ids.join(",")
- },
+ ...mapGetters(["permission", "userInfo"]),
+ permissionList() {
+ return {
+ addBtn: this.vaildData(this.permission.place_add, true),
+ viewBtn: this.vaildData(this.permission.place_view, true),
+ delBtn: this.vaildData(this.permission.place_delete, true),
+ editBtn: this.vaildData(this.permission.place_edit, true),
+ }
+ },
+ ids() {
+ let ids = []
+ this.selectionList.forEach((ele) => {
+ ids.push(ele.id)
+ })
+ return ids.join(",")
+ },
},
- created () {
- this.dateTime = this.getLastMouth()
+ created() {
+ this.dateTime = this.getLastMouth()
},
methods: {
- exportAvue () {
- this.$confirm("是否导出隐患统计数据?", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- // this.$refs.crud.rowExcel()
- this.exportBtn()
- })
- },
+ exportAvue() {
+ this.$confirm("是否导出隐患统计数据?", "提示", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning"
+ }).then(() => {
+ // this.$refs.crud.rowExcel()
+ this.exportBtn()
+ })
+ },
- //json格式化
- formatJson (filterVal, tableData) {
- return tableData.map((v) => {
- return filterVal.map((j) => {
- return v[j]
- })
- })
- },
+ //json格式化
+ formatJson(filterVal, tableData) {
+ return tableData.map((v) => {
+ return filterVal.map((j) => {
+ return v[j]
+ })
+ })
+ },
- // 导出
- exportBtn () {
- const multiHeader = ["序号", "地区", "小商店", "小旅馆", "小学校(幼儿园、校外培训机构)", "", "", "小医院(诊所、养老院)", "", "", "小网吧", "小餐饮场所", "小歌舞娱乐场所", "小美容洗浴场所", "小生产加工企业", "总数"]//第一行表头
- const tHeader = ["", "", "", "", "学校", "幼儿园", "校外培训机构", "医院", "诊所", "养老院", "", "", "", "", "", "",]//最后一行的表头
- const filterVal = [
- "index",
- "name",
- "xsd",
- "xlg",
- "xxx",
- "yey",
- "xwpxjg",
- "yy",
- "zs",
- "yly",
- "xwb",
- "xcycs",
- "xgwylcs",
- "xmrxycs",
- "xscjgqy",
- "count"
- ]
+ // 导出
+ exportBtn() {
+ const multiHeader = ["序号", "地区", "小商店", "小旅馆", "小学校(幼儿园、校外培训机构)", "", "", "小医院(诊所、养老院)", "", "", "小网吧", "小餐饮场所",
+ "小歌舞娱乐场所", "小美容洗浴场所", "小生产加工企业", "总数"
+ ] //第一行表头
+ const tHeader = ["", "", "", "", "学校", "幼儿园", "校外培训机构", "医院", "诊所", "养老院", "", "", "", "", "", "", ] //最后一行的表头
+ const filterVal = [
+ "index",
+ "name",
+ "xsd",
+ "xlg",
+ "xxx",
+ "yey",
+ "xwpxjg",
+ "yy",
+ "zs",
+ "yly",
+ "xwb",
+ "xcycs",
+ "xgwylcs",
+ "xmrxycs",
+ "xscjgqy",
+ "count"
+ ]
- var time = timestampToTime((new Date()).getTime())
- var filename = '隐患统计' + time
+ var time = timestampToTime((new Date()).getTime())
+ var filename = '隐患统计' + time
- this.data.forEach((item, index) => {
- item.index = index + 1
- })
- var data = this.formatJson(filterVal, this.data)
- const merges = [//合并单元格
- {
- s: {//开始单元格
- r: 0,//纵轴坐标(1=0,以此类推)
- c: 0//横轴坐标(A=0,以此类推)
- },
- e: {//结束单元格
- r: 1,
- c: 0
- }
- },
- {
- s: {
- r: 0,
- c: 1
- },
- e: {
- r: 1,
- c: 1
- }
- },
- {
- s: {
- r: 0,
- c: 2
- },
- e: {
- r: 1,
- c: 2
- }
- },
- {
- s: {
- r: 0,
- c: 3
- },
- e: {
- r: 1,
- c: 3
- }
- },
- {
- s: {
- r: 0,
- c: 4
- },
- e: {
- r: 0,
- c: 6
- }
- },
- {
- s: {
- r: 0,
- c: 7
- },
- e: {
- r: 0,
- c: 9
- }
- },
- {
- s: {
- r: 0,
- c: 10
- },
- e: {
- r: 1,
- c: 10
- }
- },
- {
- s: {
- r: 0,
- c: 11
- },
- e: {
- r: 1,
- c: 11
- }
- },
- {
- s: {
- r: 0,
- c: 12
- },
- e: {
- r: 1,
- c: 12
- }
- },
- {
- s: {
- r: 0,
- c: 13
- },
- e: {
- r: 1,
- c: 13
- }
- },
- {
- s: {
- r: 0,
- c: 14
- },
- e: {
- r: 1,
- c: 14
- }
- },
- {
- s: {
- r: 0,
- c: 15
- },
- e: {
- r: 1,
- c: 15
- }
- }
- ]
- export_json_to_excels({
- headerOne: multiHeader,
- headerTwo: tHeader,
- merges,
- data,
- filename
- })
- },
-
- getLastMouth (str = '-') {
- let today = new Date()
- let lastMouth = new Date()
- let nowTime = today.getTime()
- let ms = 24 * 3600 * 1000 * -30
- today.setTime(parseInt(nowTime))
- lastMouth.setTime(parseInt(nowTime + ms))
- let oYear = today.getFullYear()
- let oMoth = (today.getMonth() + 1).toString()
- if (oMoth.length <= 1) oMoth = "0" + oMoth
- let oDay = today.getDate().toString()
- if (oDay.length <= 1) oDay = "0" + oDay
- let mYear = lastMouth.getFullYear()
- let mMoth = (lastMouth.getMonth() + 1).toString()
- if (mMoth.length <= 1) mMoth = "0" + mMoth
- let mDay = lastMouth.getDate().toString()
- if (mDay.length <= 1) mDay = "0" + mDay
- let todayDate = oYear + str + oMoth + str + oDay
- let lastMouthDate = mYear + str + mMoth + str + mDay//暂时改成2024-01-01
- return ['2024-01-01', todayDate]
- },
-
- rowSave (row, done, loading) {
- if (row.imageUrls.length > 0) {
- var urls = []
- var split = row.imageUrls.split(",").filter(item => item != '')
- split.forEach(url => {
- var names = url.split("jczz/")
- urls.push(names[1])
- })
- row.imageUrls = urls.join(",")
+ this.data.forEach((item, index) => {
+ item.index = index + 1
+ })
+ var data = this.formatJson(filterVal, this.data)
+ const merges = [ //合并单元格
+ {
+ s: { //开始单元格
+ r: 0, //纵轴坐标(1=0,以此类推)
+ c: 0 //横轴坐标(A=0,以此类推)
+ },
+ e: { //结束单元格
+ r: 1,
+ c: 0
}
-
- let label = row.label
-
- if (row.smallLabel != '') {
- label = label + ',' + row.smallLabel
+ },
+ {
+ s: {
+ r: 0,
+ c: 1
+ },
+ e: {
+ r: 1,
+ c: 1
}
-
- delete row.smallLabel
-
- add({
- ...row,
- label
- }).then(
- () => {
- this.onLoad()
- this.$message({
- type: "success",
- message: "操作成功!",
- })
- done()
- },
- (error) => {
- window.console.log(error)
- loading()
- }
- )
- },
-
- rowUpdate (row, index, done, loading) {
- if (row.imageUrls.length > 0) {
- var urls = []
- var split = row.imageUrls.split(",").filter(item => item != '')
- split.forEach(url => {
- var names = url.split("jczz/")
- urls.push(names[1])
- })
- row.imageUrls = urls.join(",")
+ },
+ {
+ s: {
+ r: 0,
+ c: 2
+ },
+ e: {
+ r: 1,
+ c: 2
}
-
- let label = row.label
-
- if (row.smallLabel != '') {
- label = label + ',' + row.smallLabel
+ },
+ {
+ s: {
+ r: 0,
+ c: 3
+ },
+ e: {
+ r: 1,
+ c: 3
}
-
- delete row.smallLabel
-
- update({
- ...row,
- label
- }).then(
- () => {
- this.onLoad()
- this.$message({
- type: "success",
- message: "操作成功!",
- })
- done()
- },
- (error) => {
- window.console.log(error)
- loading()
- }
- )
- },
-
- rowDel (row) {
- this.$confirm("确定将选择数据删除?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- })
- .then(() => {
- row.isDeleted = 1
- return removeTask(row)
- })
- .then(() => {
- this.onLoad()
-
- this.$message({
- type: "success",
- message: "操作成功!",
- })
- })
- },
-
- searchReset () {
- this.query = {}
- this.dateTime = this.getLastMouth()
- this.onLoad()
- },
-
- searchChange (params) {
- this.query = this.dateTime ? {
- startTime: this.dateTime[0],
- endTime: this.dateTime[1],
- } : {}
- this.page.currentPage = 1
- this.onLoad()
- },
-
- selectionChange (list) {
- this.selectionList = list
- },
-
- selectionClear () {
- this.selectionList = []
- this.$nextTick(() => {
- this.$refs.crud && this.$refs.crud.toggleSelection()
- })
- },
-
- handleDelete () {
- if (this.selectionList.length === 0) {
- this.$message.warning("请选择至少一条数据")
- return
+ },
+ {
+ s: {
+ r: 0,
+ c: 4
+ },
+ e: {
+ r: 0,
+ c: 6
}
- this.$confirm("确定将选择数据删除?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- })
- .then(() => {
- return remove(this.ids)
- })
- .then(() => {
- this.onLoad()
- this.$message({
- type: "success",
- message: "操作成功!",
- })
- this.$refs.crud.toggleSelection()
- })
- },
-
- beforeOpen (done, type) {
- // if (["edit", "view"].includes(type)) {
-
- // } else {
- // done()
- // }
- },
-
- currentChange (currentPage) {
- this.page.currentPage = currentPage
- },
-
- sizeChange (pageSize) {
- this.page.pageSize = pageSize
- },
-
- refreshChange () {
- // this.onLoad(this.page, this.query)
- },
-
- onLoad () {
- this.loading = true
- if (!this.query.startTime) {
- this.query = {
- startTime: this.getLastMouth()[0],
- endTime: this.getLastMouth()[1],
- }
+ },
+ {
+ s: {
+ r: 0,
+ c: 7
+ },
+ e: {
+ r: 0,
+ c: 9
}
- if ('startTime' in this.query) {
- this.query.startTime += ' 00:00:00'
+ },
+ {
+ s: {
+ r: 0,
+ c: 10
+ },
+ e: {
+ r: 1,
+ c: 10
}
- if ('endTime' in this.query) {
- this.query.endTime += ' 23:59:59'
+ },
+ {
+ s: {
+ r: 0,
+ c: 11
+ },
+ e: {
+ r: 1,
+ c: 11
}
- getYHTJList(this.query).then(res => {
- console.log('getZGQKList', res.data.data)
- const data = res.data.data
- // 总合计行
- let countItem = {
- name: '信州区',
- xscjgqy: 0,
- xmrxycs: 0,
- xgwylcs: 0,
- xcycs: 0,
- xwb: 0,
- xlg: 0,
- xsd: 0,
- yey: 0,
- yly: 0,
- xwpxjg: 0,
- xxx: 0,
- zs: 0,
- xxx: 0,
- yy: 0,
- count: 0
- }
- data.forEach(item => {
- // 统计总数
- item.count = 0
- // 检查时间
- item.dateTime = ''
+ },
+ {
+ s: {
+ r: 0,
+ c: 12
+ },
+ e: {
+ r: 1,
+ c: 12
+ }
+ },
+ {
+ s: {
+ r: 0,
+ c: 13
+ },
+ e: {
+ r: 1,
+ c: 13
+ }
+ },
+ {
+ s: {
+ r: 0,
+ c: 14
+ },
+ e: {
+ r: 1,
+ c: 14
+ }
+ },
+ {
+ s: {
+ r: 0,
+ c: 15
+ },
+ e: {
+ r: 1,
+ c: 15
+ }
+ }
+ ]
+ export_json_to_excels({
+ headerOne: multiHeader,
+ headerTwo: tHeader,
+ merges,
+ data,
+ filename
+ })
+ },
- item.nineTypeStatistics.forEach(element => {
- item.count += Number(element.number)
- if (element.dict_value == '小生产加工企业') {
- item.xscjgqy = element.number
- countItem.xscjgqy += Number(item.xscjgqy)
- } else if (element.dict_value == '小美容洗浴场所') {
- item.xmrxycs = element.number
- countItem.xmrxycs += Number(item.xmrxycs)
- } else if (element.dict_value == '小歌舞娱乐场所') {
- item.xgwylcs = element.number
- countItem.xgwylcs += Number(item.xgwylcs)
- } else if (element.dict_value == '小餐饮场所') {
- item.xcycs = element.number
- countItem.xcycs += Number(item.xcycs)
- } else if (element.dict_value == '小网吧') {
- item.xwb = element.number
- countItem.xwb += Number(item.xwb)
- } else if (element.dict_value == '小旅馆') {
- item.xlg = element.number
- countItem.xlg += Number(item.xlg)
- } else if (element.dict_value == '小商店') {
- item.xsd = element.number
- countItem.xsd += Number(item.xsd)
- } else if (element.dict_value == '幼儿园') {
- item.yey = element.number
- countItem.yey += Number(item.yey)
- } else if (element.dict_value == '养老院') {
- item.yly = element.number
- countItem.yly += Number(item.yly)
- } else if (element.dict_value == '校外培训机构') {
- item.xwpxjg = element.number
- countItem.xwpxjg += Number(item.xwpxjg)
- } else if (element.dict_value == '学校') {
- item.xxx = element.number
- countItem.xxx += Number(item.xxx)
- } else if (element.dict_value == '诊所') {
- item.zs = element.number
- countItem.zs += Number(item.zs)
- } else if (element.dict_value == '医院') {
- item.yy = element.number
- countItem.yy += Number(item.yy)
- }
- })
- countItem.count += Number(item.count)
- })
- data.push(countItem)
- this.data = data
- this.loading = false
- this.selectionClear()
- })
+ getLastMouth(str = '-') {
+ let today = new Date()
+ let lastMouth = new Date()
+ let nowTime = today.getTime()
+ let ms = 24 * 3600 * 1000 * -30
+ today.setTime(parseInt(nowTime))
+ lastMouth.setTime(parseInt(nowTime + ms))
+ let oYear = today.getFullYear()
+ let oMoth = (today.getMonth() + 1).toString()
+ if (oMoth.length <= 1) oMoth = "0" + oMoth
+ let oDay = today.getDate().toString()
+ if (oDay.length <= 1) oDay = "0" + oDay
+ let mYear = lastMouth.getFullYear()
+ let mMoth = (lastMouth.getMonth() + 1).toString()
+ if (mMoth.length <= 1) mMoth = "0" + mMoth
+ let mDay = lastMouth.getDate().toString()
+ if (mDay.length <= 1) mDay = "0" + mDay
+ let todayDate = oYear + str + oMoth + str + oDay
+ let lastMouthDate = mYear + str + mMoth + str + mDay //暂时改成2024-01-01
+ return ['2024-01-01', todayDate]
+ },
+
+ rowSave(row, done, loading) {
+ if (row.imageUrls.length > 0) {
+ var urls = []
+ var split = row.imageUrls.split(",").filter(item => item != '')
+ split.forEach(url => {
+ var names = url.split("jczz/")
+ urls.push(names[1])
+ })
+ row.imageUrls = urls.join(",")
}
+
+ let label = row.label
+
+ if (row.smallLabel != '') {
+ label = label + ',' + row.smallLabel
+ }
+
+ delete row.smallLabel
+
+ add({
+ ...row,
+ label
+ }).then(
+ () => {
+ this.onLoad()
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ done()
+ },
+ (error) => {
+ window.console.log(error)
+ loading()
+ }
+ )
+ },
+
+ rowUpdate(row, index, done, loading) {
+ if (row.imageUrls.length > 0) {
+ var urls = []
+ var split = row.imageUrls.split(",").filter(item => item != '')
+ split.forEach(url => {
+ var names = url.split("jczz/")
+ urls.push(names[1])
+ })
+ row.imageUrls = urls.join(",")
+ }
+
+ let label = row.label
+
+ if (row.smallLabel != '') {
+ label = label + ',' + row.smallLabel
+ }
+
+ delete row.smallLabel
+
+ update({
+ ...row,
+ label
+ }).then(
+ () => {
+ this.onLoad()
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ done()
+ },
+ (error) => {
+ window.console.log(error)
+ loading()
+ }
+ )
+ },
+
+ rowDel(row) {
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ row.isDeleted = 1
+ return removeTask(row)
+ })
+ .then(() => {
+ this.onLoad()
+
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ })
+ },
+
+ searchReset() {
+ this.query = {}
+ this.dateTime = this.getLastMouth()
+ this.onLoad()
+ },
+
+ searchChange(params) {
+ this.query = this.dateTime ? {
+ startTime: this.dateTime[0],
+ endTime: this.dateTime[1],
+ } : {}
+ this.page.currentPage = 1
+ this.onLoad()
+ },
+
+ selectionChange(list) {
+ this.selectionList = list
+ },
+
+ selectionClear() {
+ this.selectionList = []
+ this.$nextTick(() => {
+ this.$refs.crud && this.$refs.crud.toggleSelection()
+ })
+ },
+
+ handleDelete() {
+ if (this.selectionList.length === 0) {
+ this.$message.warning("请选择至少一条数据")
+ return
+ }
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ return remove(this.ids)
+ })
+ .then(() => {
+ this.onLoad()
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ this.$refs.crud.toggleSelection()
+ })
+ },
+
+ beforeOpen(done, type) {
+ // if (["edit", "view"].includes(type)) {
+
+ // } else {
+ // done()
+ // }
+ },
+
+ currentChange(currentPage) {
+ this.page.currentPage = currentPage
+ },
+
+ sizeChange(pageSize) {
+ this.page.pageSize = pageSize
+ },
+
+ refreshChange() {
+ // this.onLoad(this.page, this.query)
+ },
+
+ onLoad() {
+ this.loading = true
+ if (!this.query.startTime) {
+ this.query = {
+ startTime: this.getLastMouth()[0],
+ endTime: this.getLastMouth()[1],
+ }
+ }
+ if ('startTime' in this.query) {
+ this.query.startTime += ' 00:00:00'
+ }
+ if ('endTime' in this.query) {
+ this.query.endTime += ' 23:59:59'
+ }
+ getYHTJList(this.query).then(res => {
+ console.log('getZGQKList', res.data.data)
+ const data = res.data.data
+ // 总合计行
+ let countItem = {
+ name: '信州区',
+ xscjgqy: 0,
+ xmrxycs: 0,
+ xgwylcs: 0,
+ xcycs: 0,
+ xwb: 0,
+ xlg: 0,
+ xsd: 0,
+ yey: 0,
+ yly: 0,
+ xwpxjg: 0,
+ xxx: 0,
+ zs: 0,
+ xxx: 0,
+ yy: 0,
+ count: 0
+ }
+ data.forEach(item => {
+ // 统计总数
+ item.count = 0
+ // 检查时间
+ item.dateTime = ''
+
+ item.nineTypeStatistics.forEach(element => {
+ item.count += Number(element.number)
+ if (element.dict_value == '小生产加工企业') {
+ item.xscjgqy = element.number
+ countItem.xscjgqy += Number(item.xscjgqy)
+ } else if (element.dict_value == '小美容洗浴场所') {
+ item.xmrxycs = element.number
+ countItem.xmrxycs += Number(item.xmrxycs)
+ } else if (element.dict_value == '小歌舞娱乐场所') {
+ item.xgwylcs = element.number
+ countItem.xgwylcs += Number(item.xgwylcs)
+ } else if (element.dict_value == '小餐饮场所') {
+ item.xcycs = element.number
+ countItem.xcycs += Number(item.xcycs)
+ } else if (element.dict_value == '小网吧') {
+ item.xwb = element.number
+ countItem.xwb += Number(item.xwb)
+ } else if (element.dict_value == '小旅馆') {
+ item.xlg = element.number
+ countItem.xlg += Number(item.xlg)
+ } else if (element.dict_value == '小商店') {
+ item.xsd = element.number
+ countItem.xsd += Number(item.xsd)
+ } else if (element.dict_value == '幼儿园') {
+ item.yey = element.number
+ countItem.yey += Number(item.yey)
+ } else if (element.dict_value == '养老院') {
+ item.yly = element.number
+ countItem.yly += Number(item.yly)
+ } else if (element.dict_value == '校外培训机构') {
+ item.xwpxjg = element.number
+ countItem.xwpxjg += Number(item.xwpxjg)
+ } else if (element.dict_value == '学校') {
+ item.xxx = element.number
+ countItem.xxx += Number(item.xxx)
+ } else if (element.dict_value == '诊所') {
+ item.zs = element.number
+ countItem.zs += Number(item.zs)
+ } else if (element.dict_value == '医院') {
+ item.yy = element.number
+ countItem.yy += Number(item.yy)
+ }
+ })
+ countItem.count += Number(item.count)
+ })
+ data.push(countItem)
+ this.data = data
+ this.loading = false
+ this.selectionClear()
+ })
+ }
}
-}
+ }
</script>
<style lang="scss" scoped>
-.avue-upload__icon {
+ .avue-upload__icon {
line-height: 6;
-}
+ }
-.search-box {
+ .search-box {
display: flex;
margin-bottom: 20px;
.date-box {
+ display: flex;
+
+ .name {
+ margin-right: 10px;
display: flex;
+ align-items: center;
+ font-size: 14px;
+ }
- .name {
- margin-right: 10px;
- display: flex;
- align-items: center;
- font-size: 14px;
- }
+ :deep(.el-input__inner) {
+ height: 32px;
+ }
- :deep(.el-input__inner) {
- height: 32px;
- }
-
- :deep(.el-date-editor .el-range__icon),
- :deep(.el-date-editor .el-range__close-icon) {
- line-height: 26px;
- }
+ :deep(.el-date-editor .el-range__icon),
+ :deep(.el-date-editor .el-range__close-icon) {
+ line-height: 26px;
+ }
}
.btn-box {
- margin-left: 20px;
+ margin-left: 20px;
- :deep(.el-button) {
- width: 76px;
- height: 32px;
- padding: 0;
- }
+ :deep(.el-button) {
+ width: 76px;
+ height: 32px;
+ padding: 0;
+ }
}
-}
-</style>
+ }
+</style>
\ No newline at end of file
diff --git a/src/views/publicSecurity/noExplosionManage.vue b/src/views/publicSecurity/noExplosionManage.vue
index c629f2e..9857a15 100644
--- a/src/views/publicSecurity/noExplosionManage.vue
+++ b/src/views/publicSecurity/noExplosionManage.vue
@@ -43,6 +43,11 @@
<audit-base ref="auditBase" @handleSubmit="submitAudit"></audit-base>
</el-dialog>
+ <el-dialog :visible.sync="visibleWord" append-to-body destroy-on-close title="审核" width="50%"
+ custom-class="flow-design-dialog" :before-close="handleCloseWord">
+ <word ref="word"></word>
+ </el-dialog>
+
<el-drawer title="无诈申请" :visible.sync="isDetail" :append-to-body="true" size="40%" direction="rtl">
<div class="title">
@@ -108,7 +113,11 @@
</div>
<div v-if="type === 2" style="line-height: 100px;" v-for="pic in item.imageUrlsList">
- <el-button @click="downloadFile(item.imageUrls)" type="primary">下载</el-button>
+ <el-button @click="lookFile(item.imageUrls)" type="primary">查看附件</el-button>
+ </div>
+
+ <div v-if="type === 2" style="line-height: 100px;" v-for="pic in item.imageUrlsList">
+ <el-button @click="downloadFile(item.imageUrls)" type="primary">下载附件</el-button>
</div>
</div>
@@ -129,6 +138,7 @@
} from "@/api/task/task"
import auditBase from './components/auditBase'
+ import word from '../../components/offce/word'
import {
mapGetters
} from "vuex"
@@ -189,6 +199,7 @@
}],
},
visible: false,
+ visibleWord: false,
taskType: 0,
curRow: {},
roleBox: false,
@@ -391,6 +402,7 @@
components: {
auditBase,
+ word,
campusReporting,
hotelReporting,
labelReporting,
@@ -471,14 +483,13 @@
this.srcList.push(img)
},
+ lookFile(url) {
+ this.visibleWord = true
+ this.$refs.word.initWord(url)
+ },
+
downloadFile(url) {
window.location.href = url
- // window.open(url);
- // const link = document.createElement('a');
- // link.href = url;
- // link.download = "";
- // link.target = "_blank"; // 可选,如果希望在新窗口中下载文件,请取消注释此行
- // link.click();
},
// 点击展开收缩
flodQL(index) {
@@ -610,6 +621,10 @@
this.cancelAudit()
},
+ handleCloseWord() {
+ this.visibleWord = false
+ },
+
// 取消审核
cancelAudit() {
this.visible = false
diff --git a/src/views/publicSecurity/placeIndex.vue b/src/views/publicSecurity/placeIndex.vue
new file mode 100644
index 0000000..0ae0370
--- /dev/null
+++ b/src/views/publicSecurity/placeIndex.vue
@@ -0,0 +1,1141 @@
+<template>
+ <basic-container>
+ <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" ref="crud" @row-del="rowDel"
+ v-model="form" :permission="permissionList" @row-update="rowUpdate" @row-save="rowSave" :before-open="beforeOpen"
+ @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"
+ @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
+
+ <template slot="menuLeft">
+ <el-button type="danger" size="small" plain icon="el-icon-delete" v-if="permission.place_delete"
+ @click="handleDelete">删 除
+ </el-button>
+ <!-- <el-button type="success" size="small" plain v-if="permission.place_import" icon="el-icon-upload2"
+ @click="handleImport">导入
+ </el-button>
+ <el-button type="warning" size="small" plain v-if="permission.place_export" icon="el-icon-download"
+ @click="handleExport">导出
+ </el-button>
+
+ <el-button type="success" size="small" plain v-if="permission.place_import" icon="el-icon-upload2"
+ @click="handlePractitionerImport">从业人员导入
+ </el-button> -->
+
+ </template>
+ <template slot-scope="{row}" slot="location">
+ <span v-text="showLocation(row.location)"></span>
+ </template>
+
+ <template slot-scope="{row}" slot="lng">
+ <span v-text="decimalProcessing(row.lng)"></span>
+ </template>
+
+ <template slot-scope="{row}" slot="lat">
+ <span v-text="decimalProcessing(row.lat)"></span>
+ </template>
+
+ <template slot-scope="{row, size}" slot="confirmFlag">
+ <el-tag :size="size" :type="showConfirmFlag(row.confirmFlag).type">{{
+ showConfirmFlag(row.confirmFlag).text
+ }}</el-tag>
+ </template>
+
+ <template slot-scope="{row, size}" slot="source">
+ <el-tag :size="size" :type="showSource(row.source).type">{{ showSource(row.source).text
+ }}</el-tag>
+ </template>
+
+ <template slot-scope="{row, size}" slot="menu">
+ <el-button :size="size" type="text" icon="el-icon-s-check" v-if="permission.place_audit_cur"
+ @click="auditCur({ ...row, confirmFlag: 1 })">审核
+ </el-button>
+
+ <el-button :size="size" type="text" icon="el-icon-edit" v-if="permission.place_manage_tenants"
+ @click="ManageTenants(row)">场所维护
+ </el-button>
+ </template>
+
+ <template slot-scope="{row, size}" slot="principalPhone">
+ <el-button :size="size" type="text" @click="showStringDispose(row, 'principalPhoneflag')"
+ v-text="textDispose(row, 'principalPhoneflag', 'principalPhone')">
+ </el-button>
+ </template>
+ <template slot-scope="{row, size}" slot="principalIdCard">
+ <el-button :size="size" type="text" @click="showStringDispose(row, 'principalIdCardflag')"
+ v-text="textDispose(row, 'principalIdCardflag', 'principalIdCard')">
+ </el-button>
+ </template>
+ </avue-crud>
+
+ <baseAllInfo ref="BaseAllInfo"></baseAllInfo>
+
+ <el-dialog class="place-info-box audit-info-box" title="审核" append-to-body :visible.sync="auditBasePopup"
+ width="30%">
+ <auditBase></auditBase>
+ </el-dialog>
+ <el-dialog title="场所数据导入" append-to-body :visible.sync="excelBox" width="555px">
+ <avue-form :option="excelOption" v-model="excelForm" :upload-after="uploadAfter">
+ <template slot="excelTemplate">
+ <el-button size="small" type="primary" @click="handleTemplate">
+ 点击下载<i class="el-icon-download el-icon--right"></i>
+ </el-button>
+ </template>
+ </avue-form>
+ </el-dialog>
+
+ <el-dialog title="从业人员数据导入" append-to-body :visible.sync="excelBoxPractitioner" width="555px">
+ <avue-form :option="excelPractitionerOption" v-model="excelPractitionerForm"
+ :upload-after="uploadPractitionerAfter">
+ <template slot="excelTemplate">
+ <el-button size="small" type="primary" @click="handlePractitionerTemplate">
+ 点击下载<i class="el-icon-download el-icon--right"></i>
+ </el-button>
+ </template>
+ </avue-form>
+ </el-dialog>
+ </basic-container>
+</template>
+
+<script>
+ import {
+ getList,
+ remove,
+ update,
+ add,
+ getPlace,
+ } from "@/api/place/place"
+
+ import {
+ mapGetters
+ } from "vuex"
+ import {
+ exportBlob
+ } from "@/api/common"
+
+ import {
+ getToken
+ } from '@/util/auth'
+ import {
+ downloadXls,
+ } from "@/util/util"
+ import {
+ dateNow
+ } from "@/util/date"
+ import NProgress from 'nprogress'
+ import 'nprogress/nprogress.css'
+ import Qs from "qs"
+ import website from '@/config/website'
+
+ import auditBase from './components/auditBase'
+ import baseAllInfo from './components/baseAllInfo'
+
+ export default {
+ data() {
+
+ //手机号格式校验
+ let validatorPhone = function(rule, value, callback) {
+ if (value) {
+ if (!/^1[3456789]\d{9}$/.test(value)) {
+ callback(new Error('手机号格式有误!'))
+ } else {
+ callback()
+ }
+ }
+ callback()
+ }
+
+ return {
+ excelPractitionerOption: {
+ submitBtn: false,
+ emptyBtn: false,
+ column: [{
+ label: '模板上传',
+ prop: 'excelFile',
+ type: 'upload',
+ drag: true,
+ loadText: '模板上传中,请稍等',
+ span: 24,
+ propsHttp: {
+ res: 'data'
+ },
+ tip: '请上传 .xls,.xlsx 标准格式文件',
+ action: "/api/blade-placePractitioner/placePractitioner/import-practitioner"
+ },
+ {
+ label: "数据覆盖",
+ prop: "isCovered",
+ type: "switch",
+ align: "center",
+ width: 80,
+ dicData: [{
+ label: "否",
+ value: 0
+ },
+ {
+ label: "是",
+ value: 1
+ }
+ ],
+ value: 0,
+ slot: true,
+ rules: [{
+ required: true,
+ message: "请选择是否覆盖",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: '模板下载',
+ prop: 'excelTemplate',
+ formslot: true,
+ span: 24,
+ }
+ ]
+ },
+ excelPractitionerForm: {},
+ excelOption: {
+ submitBtn: false,
+ emptyBtn: false,
+ column: [{
+ label: '模板上传',
+ prop: 'excelFile',
+ type: 'upload',
+ drag: true,
+ loadText: '模板上传中,请稍等',
+ span: 24,
+ propsHttp: {
+ res: 'data'
+ },
+ tip: '请上传 .xls,.xlsx 标准格式文件',
+ action: "/api/blade-place/place/import-place"
+ },
+ {
+ label: "数据覆盖",
+ prop: "isCovered",
+ type: "switch",
+ align: "center",
+ width: 80,
+ dicData: [{
+ label: "否",
+ value: 0
+ },
+ {
+ label: "是",
+ value: 1
+ }
+ ],
+ value: 0,
+ slot: true,
+ rules: [{
+ required: true,
+ message: "请选择是否覆盖",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: '模板下载',
+ prop: 'excelTemplate',
+ formslot: true,
+ span: 24,
+ }
+ ]
+ },
+ excelForm: {},
+ excelBox: false,
+ excelBoxPractitioner: false,
+ form: {},
+ query: {
+ noExplosionCategory: 0,
+ },
+ loading: true,
+
+ page: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0,
+ },
+ datetime: "",
+ selectionList: [],
+ option: {
+ labelWidth: 120,
+ searchLabelWidth: 96,
+ searchShow: true,
+ searchMenuSpan: 3,
+ menuWidth: 280,
+
+ height: "auto",
+ calcHeight: 54,
+ dialogWidth: 950,
+ tip: false,
+ border: true,
+ //stripe:true,
+ index: true,
+ viewBtn: true,
+ editBtn: false,
+ selection: true,
+ dialogClickModal: false,
+ menuFixed: 'right',
+ column: [{
+ width: 156,
+ overHidden: true,
+ label: "场所名称",
+ span: 12,
+ prop: "placeName",
+ searchSpan: 5,
+ search: true,
+ searchLabelWidth: 76,
+ rules: [{
+ required: true,
+ message: "请输入场所名称",
+ trigger: "blur",
+ }, ],
+ },
+ {
+ width: 110,
+ label: "场所负责人",
+ prop: "principal",
+ searchSpan: 5,
+ searchLabelWidth: 110,
+ search: true,
+ rules: [{
+ required: false,
+ message: "请输入负责人",
+ trigger: "blur",
+ }, ],
+ },
+ {
+ width: 120,
+ overHidden: true,
+ label: "手机号码",
+ prop: "principalPhone",
+ search: true,
+ searchSpan: 4,
+ slot: true,
+ rules: [{
+ validator: validatorPhone,
+ trigger: 'blur'
+ }],
+ },
+ {
+ width: 120,
+ overHidden: true,
+ label: "身份证号",
+ prop: "principalIdCard",
+ // search: true,
+ searchSpan: 4,
+ slot: true,
+ rules: [{
+ required: false,
+ message: "请输身份证号",
+ trigger: "blur",
+ }],
+ },
+ {
+ width: 110,
+ label: "所属街道",
+ addDisplay: false,
+ editDisplay: false,
+ viewDisplay: false,
+ prop: "townStreetName",
+ search: true,
+ searchSpan: 4
+ },
+ {
+ width: 156,
+ overHidden: true,
+ label: "所属社区",
+ addDisplay: false,
+ editDisplay: false,
+ viewDisplay: false,
+ prop: "neiName",
+ search: true,
+ searchSpan: 4,
+ rules: [{
+ required: true,
+ message: "请选择所属社区",
+ trigger: "blur",
+ }, ],
+ },
+ {
+ hide: true,
+ parent: false,
+ label: "所属社区",
+ prop: "neiCode",
+ search: false,
+ width: 150,
+ type: "tree",
+ dicUrl: "/api/blade-system/region/treeToCommunity",
+ props: {
+ label: "name",
+ value: "id",
+ },
+ cascader: ["gridCode"],
+ rules: [{
+ required: true,
+ message: "请选择所属社区",
+ trigger: "blur",
+ }, ],
+ },
+ {
+ width: 110,
+ overHidden: true,
+ label: "所属网格",
+ addDisplay: false,
+ editDisplay: false,
+ viewDisplay: false,
+ prop: "gridName",
+ rules: [{
+ required: true,
+ message: "请选择所属网格",
+ trigger: "blur",
+ }, ],
+ },
+ {
+ hide: true,
+ label: "所属网格",
+ prop: "gridCode",
+ type: "tree",
+ cell: true,
+ props: {
+ label: "gridName",
+ value: "gridCode",
+ },
+ dicUrl: "/api/blade-grid/grid/getGridList?communityCode={{neiCode}}",
+ rules: [{
+ required: true,
+ message: "请选择所属网格",
+ trigger: "blur",
+ }, ],
+ },
+ {
+ span: 7,
+ label: "场所标签",
+ prop: "label",
+ type: "select",
+ dicUrl: "/api/blade-category/category/getCategory?level=2",
+ cascader: ["smallLabel"],
+ props: {
+ label: "categoryName",
+ value: "categoryNo"
+ },
+ dataType: "string",
+ hide: true,
+ rules: [{
+ required: true,
+ message: "请输入场所标签",
+ trigger: "blur",
+ }, ],
+ },
+ {
+ span: 5,
+ label: "",
+ labelWidth: 20,
+ prop: "smallLabel",
+ type: "select",
+ dicUrl: "/api/blade-category/category/getCategory?parentNo={{label}}",
+ props: {
+ label: "categoryName",
+ value: "categoryNo"
+ },
+ dataType: "string",
+ hide: true,
+ },
+ {
+ span: 12,
+ label: "标签颜色",
+ prop: "color",
+ type: "select",
+ dicData: [{
+ label: '绿',
+ value: 'green'
+ }, {
+ label: '黄',
+ value: 'yellow'
+ }, {
+ label: '红',
+ value: 'red'
+ }],
+ props: {
+ label: "label",
+ value: "value"
+ },
+ hide: true,
+ },
+ {
+ span: 12,
+ label: "九小场所",
+ prop: "isNine",
+ type: "select",
+ dicData: [{
+ label: "是",
+ value: 1,
+ },
+ {
+ label: "否",
+ value: 2,
+ }
+ ],
+ hide: true,
+ rules: [{
+ required: true,
+ message: "请选择九小场所",
+ trigger: "blur",
+ }, ],
+ },
+ {
+ searchSpan: 4,
+ searchLabelWidth: 80,
+ width: 150,
+ label: "无诈分类",
+ prop: "noExplosionCategory",
+ type: "select",
+ // display: false,
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=noExplosionCategory",
+ dataType: "number",
+ value: 1,
+ // hide: true,
+ search: true,
+ props: {
+ label: "dictValue",
+ value: "dictKey",
+ },
+ },
+ {
+ span: 12,
+ label: "阵地",
+ prop: "isFront",
+ type: "select",
+ dicData: [{
+ label: "是",
+ value: 1,
+ },
+ {
+ label: "否",
+ value: 2,
+ }
+ ],
+ hide: true,
+ rules: [{
+ required: true,
+ message: "请选择阵地",
+ trigger: "blur",
+ }, ],
+ },
+ {
+ span: 12,
+ label: "阵地类型",
+ prop: "frontType",
+ type: "select",
+ display: false,
+ row: true,
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=frontType",
+ dataType: "number",
+ hide: true,
+ props: {
+ label: "dictValue",
+ value: "dictKey",
+ },
+ },
+ {
+ span: 12,
+ label: "三级消防单位",
+ prop: "threeFireProtection",
+ labelWidth: 120,
+ type: "select",
+ dicData: [{
+ label: "是",
+ value: 1,
+ },
+ {
+ label: "否",
+ value: 2,
+ }
+ ],
+ hide: true,
+ rules: [{
+ required: false,
+ message: "请选择三级消防单位",
+ trigger: "blur",
+ }, ],
+ },
+ {
+ width: 110,
+ label: "场所照片",
+ prop: "imageUrls",
+ type: "upload",
+ listType: "picture-card",
+ dataType: "string",
+ multiple: true,
+ action: "/api/blade-resource/oss/endpoint/put-file",
+ propsHttp: {
+ res: "data",
+ name: 'name',
+ url: "link",
+ },
+ span: 24,
+ },
+ {
+ width: 156,
+ overHidden: true,
+ slot: true,
+ label: "地址",
+ prop: "location",
+ type: 'map',
+ dataType: "string",
+ minWidth: 250,
+ span: 24,
+ value: [117.966460, 28.431002, ""],
+ rules: [{
+ required: true,
+ message: "请选择地址",
+ trigger: "blur",
+ }, ],
+ },
+ {
+ label: "备注",
+ prop: "remark",
+ type: 'textarea',
+ hide: true,
+ span: 24,
+ rules: [{
+ required: false,
+ message: "请输入场所备注",
+ trigger: "blur",
+ }, ],
+ },
+ {
+ width: 96,
+ slot: true,
+ addDisplay: false,
+ editDisplay: false,
+ viewDisplay: false,
+ label: "经度",
+ hide: true,
+ prop: "lng",
+ },
+ {
+ width: 96,
+ slot: true,
+ addDisplay: false,
+ editDisplay: false,
+ viewDisplay: false,
+ label: "纬度",
+ hide: true,
+ prop: "lat",
+ },
+ {
+ width: 100,
+ addDisplay: false,
+ editDisplay: false,
+ viewDisplay: false,
+ label: '审核状态',
+ prop: 'confirmFlag',
+ type: 'radio',
+ slot: true,
+ dicData: [{
+ label: '待审核',
+ value: 1
+ }, {
+ label: '已审核',
+ value: 2
+ }, {
+ label: '未通过',
+ value: 3
+ }]
+ },
+ {
+ // width: 120,
+ display: false,
+ label: '是否有二维码',
+ searchLabelWidth: 120,
+ prop: 'source',
+ type: "select",
+ search: true,
+ searchSpan: 4,
+ slot: true,
+ dicData: [{
+ label: '是',
+ value: 1
+ }, {
+ label: '否',
+ value: 2
+ }]
+ }
+ ],
+ },
+ data: [],
+
+ auditBasePopup: false,
+ }
+ },
+
+ provide() {
+ return {
+ placeElement: this,
+ }
+ },
+
+ components: {
+ auditBase,
+ baseAllInfo
+ },
+
+ watch: {
+ 'form.isNine': {
+ handler(newData) {
+ if (newData) {
+ let nineTypeColumn = this.findObject(
+ this.option.column,
+ 'nineType'
+ )
+
+ if (newData == 1) {
+ nineTypeColumn.display = true
+ } else {
+ nineTypeColumn.display = false
+ }
+ }
+ },
+ },
+ 'form.isFront': {
+ handler(newData) {
+ if (newData) {
+ let frontTypeColumn = this.findObject(
+ this.option.column,
+ 'frontType'
+ )
+
+ if (newData == 1) {
+ frontTypeColumn.display = true
+ } else {
+ frontTypeColumn.display = false
+ }
+ }
+ },
+ },
+ 'excelForm.isCovered'() {
+ if (this.excelForm.isCovered !== '') {
+ const column = this.findObject(this.excelOption.column, "excelFile")
+ column.action = `/api/blade-place/place/import-place?isCovered=${this.excelForm.isCovered}`
+ }
+ },
+
+ 'excelPractitionerForm.isCovered'() {
+ if (this.excelForm.isCovered !== '') {
+ const column = this.findObject(this.excelPractitionerForm.column, "excelFile")
+ column.action =
+ `/api/blade-placePractitioner/placePractitioner/import-practitioner?isCovered=${this.excelPractitionerForm.isCovered}`
+ }
+ }
+ },
+
+ computed: {
+ ...mapGetters(["permission", "userInfo"]),
+ permissionList() {
+ return {
+ addBtn: this.vaildData(this.permission.place_add, true),
+ viewBtn: this.vaildData(this.permission.place_view, true),
+ delBtn: this.vaildData(this.permission.place_delete, true),
+ editBtn: this.vaildData(this.permission.place_edit, true),
+ }
+ },
+ ids() {
+ let ids = []
+ this.selectionList.forEach((ele) => {
+ ids.push(ele.id)
+ })
+ return ids.join(",")
+ },
+
+ showConfirmFlag() {
+ return (data) => {
+ let tags = {
+ text: '',
+ type: ''
+ }
+ if (data == 1) {
+ tags = {
+ text: '待审核',
+ type: 'warning'
+ }
+ } else if (data == 2) {
+ tags = {
+ text: '已审核',
+ type: 'success'
+ }
+ } else if (data == 3) {
+ tags = {
+ text: '未通过',
+ type: 'danger'
+ }
+ } else if (data == 4) {
+ tags = {
+ text: '待完善',
+ type: 'info'
+ }
+ }
+
+ return tags
+ }
+ },
+
+ showSource() {
+ return (data) => {
+ let tags = {
+ text: '',
+ type: ''
+ }
+
+ if (data == 1) {
+ tags = {
+ text: '是',
+ type: 'success'
+ }
+ } else if (data == 2) {
+ tags = {
+ text: '否',
+ type: 'info'
+ }
+ }
+
+ return tags
+ }
+ },
+
+ showLocation() {
+ return (data) => {
+ if (data != null && data.indexOf(',') != -1) {
+ data = data.split(',')
+
+ return data[2]
+ } else {
+ return data || ''
+ }
+ }
+ },
+
+ decimalProcessing() {
+ return (data) => {
+ if (data != null) {
+ return Number(data).toFixed(6)
+ } else {
+ return ''
+ }
+ }
+ },
+
+ textDispose() {
+ return (row, flag, type) => {
+ if (row[flag] || row[type] == null) {
+ return row[type]
+ } else {
+ if (type == 'principalIdCard') {
+ return row[type].replace(/^(.{6})(?:\d+)(.{4})$/, "$1******$2")
+ } else {
+ return row[type].replace(/^(.{3})(?:\d+)(.{4})$/, "$1****$2")
+ }
+ }
+ }
+ }
+ },
+ methods: {
+ showStringDispose(row, type) {
+ row[type] = !row[type]
+ },
+
+ locationDispose(data) {
+ data = data.split(',')
+
+ return {
+ longitude: data[0],
+ latitude: data[1],
+ location: data[2]
+ }
+ },
+
+ auditCur(row) {
+ this.curAuditRow = row
+ this.auditBasePopup = true
+ },
+
+ ManageTenants(item) {
+ this.$refs.BaseAllInfo.initOpen(item)
+ },
+
+ rowSave(row, done, loading) {
+ if (row.imageUrls.length > 0) {
+ var urls = []
+ var split = row.imageUrls.split(",").filter(item => item != '')
+ split.forEach(url => {
+ var names = url.split("jczz/")
+ urls.push(names[1])
+ })
+ row.imageUrls = urls.join(",")
+ }
+
+ let label = row.label
+
+ if (row.smallLabel != '') {
+ label = label + ',' + row.smallLabel
+ }
+
+ delete row.smallLabel
+
+ add({
+ ...row,
+ label,
+ ...this.locationDispose(row.location)
+ }).then(
+ () => {
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ done()
+ },
+ (error) => {
+ window.console.log(error)
+ loading()
+ }
+ )
+ },
+
+ rowUpdate(row, index, done, loading) {
+ if (row.imageUrls.length > 0) {
+ var urls = []
+ var split = row.imageUrls.split(",").filter(item => item != '')
+ split.forEach(url => {
+ var names = url.split("jczz/")
+ urls.push(names[1])
+ })
+ row.imageUrls = urls.join(",")
+ }
+
+ let label = row.label
+
+ if (row.smallLabel != '') {
+ label = label + ',' + row.smallLabel
+ }
+
+ delete row.smallLabel
+
+ update({
+ ...row,
+ label,
+ ...this.locationDispose(row.location)
+ }).then(
+ () => {
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ done()
+ },
+ (error) => {
+ window.console.log(error)
+ loading()
+ }
+ )
+ },
+
+ rowDel(row) {
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ return remove(row.id)
+ })
+ .then(() => {
+ this.onLoad(this.page)
+
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ })
+ },
+
+ searchReset() {
+ this.query = {}
+ this.onLoad(this.page)
+ },
+ searchChange(params, done) {
+ this.query = params
+ this.page.currentPage = 1
+ this.onLoad(this.page, params)
+ done()
+ },
+ selectionChange(list) {
+ this.selectionList = list
+ },
+ selectionClear() {
+ this.selectionList = []
+ this.$nextTick(() => {
+ this.$refs.crud && this.$refs.crud.toggleSelection()
+ })
+ },
+
+ handlePractitionerImport() {
+ this.excelBoxPractitioner = true
+ },
+ handleImport() {
+ this.excelBox = true
+ },
+ uploadAfter(res, done, loading, column) {
+ this.excelBox = false
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: res
+ })
+ this.$refs.crud.toggleSelection()
+ done()
+ },
+ uploadPractitionerAfter(res, done, loading, column) {
+ this.excelBoxPractitioner = false
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: res
+ })
+ this.$refs.crud.toggleSelection()
+ done()
+ },
+ handleExport() {
+ this.$confirm("是否导出场所数据?", "提示", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning"
+ }).then(() => {
+ NProgress.start()
+ var data = {
+ ...this.query
+ }
+ data = Qs.stringify(data)
+ exportBlob(
+ `/api/blade-place/place/export-place?${this.website.tokenHeader}=${getToken()}&` + data
+ ).then(res => {
+ downloadXls(res.data, `场所数据表${dateNow()}.xlsx`)
+ NProgress.done()
+ })
+ })
+ },
+ handleTemplate() {
+ exportBlob(`/api/blade-place/place/export-template?${this.website.tokenHeader}=${getToken()}`).then(res => {
+ downloadXls(res.data, "场所数据模板.xlsx")
+ })
+ },
+ handlePractitionerTemplate() {
+ exportBlob(
+ `/api/blade-placePractitioner/placePractitioner/export-practitioner-template?${this.website.tokenHeader}=${getToken()}`
+ )
+ .then(res => {
+ downloadXls(res.data, "从业人员数据模板.xlsx")
+ })
+ },
+ handleDelete() {
+ if (this.selectionList.length === 0) {
+ this.$message.warning("请选择至少一条数据")
+ return
+ }
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ return remove(this.ids)
+ })
+ .then(() => {
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ this.$refs.crud.toggleSelection()
+ })
+ },
+
+ beforeOpen(done, type) {
+ if (["edit", "view"].includes(type)) {
+ getPlace(this.form.id).then((res) => {
+ this.form = res.data.data
+
+ this.form.location = [this.form.lng, this.form.lat, this.form.location].join(',')
+
+ if (this.form.imageUrls.length) {
+ this.form.imageUrls = this.form.imageUrls.split(",").filter(item => item != '').map(item => website
+ .minioUrl + item).join(',')
+ }
+
+ if (this.form.placePoiLabelVOList.length) {
+ let lebelTwo = this.form.placePoiLabelVOList.find(item => {
+ return item.type == 2
+ })
+
+ if (lebelTwo) this.form.label = String(lebelTwo.poiCode)
+
+ let lebelThree = this.form.placePoiLabelVOList.find(item => {
+ return item.type == 3
+ })
+
+ if (lebelThree) this.form.smallLabel = String(lebelThree.poiCode)
+ }
+
+ done()
+ })
+ } else {
+ done()
+ }
+ },
+
+ currentChange(currentPage) {
+ this.page.currentPage = currentPage
+ },
+ sizeChange(pageSize) {
+ this.page.pageSize = pageSize
+ },
+ refreshChange() {
+ this.onLoad(this.page, this.query)
+ },
+ onLoad(page, params = {}) {
+ this.loading = true
+ if (!this.query.noExplosionCategory) {
+ this.query.noExplosionCategory = 0
+ }
+ getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then((res) => {
+ const data = res.data.data
+
+ this.page.total = data.total
+
+ this.data = data.records
+
+ this.data.forEach(item => {
+ this.$set(item, 'principalPhoneflag', false)
+ this.$set(item, 'principalIdCardflag', false)
+ if (item.imageUrls && item.imageUrls != '' && item.imageUrls != null && item.imageUrls.length) {
+ var urls = []
+ var names = item.imageUrls.split(",").filter(item => item != '')
+ names.forEach(name => {
+ urls.push(website.minioUrl + name)
+ })
+ item.imageUrls = urls.join(",")
+ }
+ })
+
+ this.loading = false
+ this.selectionClear()
+ })
+ }
+ }
+ }
+</script>
+
+<style>
+ .avue-upload__icon {
+ line-height: 6;
+ }
+</style>
\ No newline at end of file
diff --git a/src/views/publicSecurity/policeAlarmRecords.vue b/src/views/publicSecurity/policeAlarmRecords.vue
index d36b1e7..18be0be 100644
--- a/src/views/publicSecurity/policeAlarmRecords.vue
+++ b/src/views/publicSecurity/policeAlarmRecords.vue
@@ -729,7 +729,7 @@
type: "warning",
})
.then(() => {
- return remove(this.ids)
+ // return remove(this.ids)
})
.then(() => {
this.onLoad(this.page)
@@ -779,7 +779,7 @@
this.onLoad(this.page, this.query)
},
onLoad(page, params = {}) {
- const {} = this.query
+ // const {} = this.query
let values = {
...params,
}
diff --git a/src/views/publicSecurity/tenanthold.vue b/src/views/publicSecurity/tenanthold.vue
new file mode 100644
index 0000000..696c66f
--- /dev/null
+++ b/src/views/publicSecurity/tenanthold.vue
@@ -0,0 +1,885 @@
+<template>
+ <basic-container>
+ <avue-crud :option="option" :search.sync="search" :table-loading="loading" :data="data" ref="crud" v-model="form"
+ :permission="permissionList" @row-del="rowDel" @row-update="rowUpdate" @row-save="rowSave"
+ :before-open="beforeOpen" :page.sync="page" @search-change="searchChange" @search-reset="searchReset"
+ @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
+ @refresh-change="refreshChange" @on-load="onLoad">
+
+ <!-- <template slot-scope="{row, size}" slot="menu">
+ <el-button :size="size" type="text" icon="el-icon-circle-plus-outline" v-if="permission.household_manager"
+ @click="manageLabel(row)">标签
+ </el-button>
+ </template> -->
+ <template slot-scope="{row, size}" slot="phoneNumber">
+ <el-button :size="size" type="text" @click="showStringDispose(row, 'phoneNumberflag')">
+ {{ textDispose(row, 'phoneNumberflag', 'phoneNumber') }}
+ </el-button>
+ </template>
+ <template slot-scope="{row, size}" slot="minors">
+ <el-tag :size="size">{{
+ row.minors == 2?'是':row.minors==1?'否':''
+ }}</el-tag>
+ </template>
+ <template slot-scope="{row, size}" slot="idCard">
+ <el-button :size="size" type="text" @click="showStringDispose(row, 'idCardflag')"
+ v-text="textDispose(row, 'idCardflag', 'idCard')"></el-button>
+ </template>
+ <template slot-scope="{row, size}" slot="householdLabelList">
+ {{ labelDispose(row.householdLabelList) }}
+ </template>
+
+ <template slot="menuLeft">
+ <el-button type="success" size="small" plain icon="el-icon-upload2" @click="handleImport">导入
+ </el-button>
+ <el-button type="warning" size="small" plain icon="el-icon-download" @click="handleExport">导出
+ </el-button>
+ </template>
+
+ </avue-crud>
+ <el-dialog title="用户角色配置" append-to-body :visible.sync="roleBox" width="345px" center>
+
+ <el-tree :data="roleGrantList" show-checkbox check-strictly default-expand-all node-key="id" ref="treeRole"
+ :default-checked-keys="roleTreeObj" :props="props">
+ </el-tree>
+
+ <span slot="footer" class="dialog-footer">
+ <el-button size="small" @click="roleBox = false">取 消</el-button>
+ <el-button size="small" type="primary" @click="submitRole">确 定</el-button>
+ </span>
+ </el-dialog>
+
+ <el-dialog title="租客数据导入" append-to-body :visible.sync="excelBox" width="555px">
+ <avue-form :option="excelOption" v-model="excelForm" :upload-after="uploadAfter">
+ <template slot="excelTemplate">
+ <el-button size="small" type="primary" @click="handleTemplate">
+ 点击下载<i class="el-icon-download el-icon--right"></i>
+ </el-button>
+ </template>
+ </avue-form>
+ </el-dialog>
+
+ </basic-container>
+</template>
+
+<script>
+ import {
+ setLabelColor
+ } from '@/util/util'
+ import {
+ getList,
+ remove,
+ add,
+ update,
+ getDetatil,
+ getDetatils
+ } from "@/api/userHouse/list/houseHold.js"
+ import {
+ removeHouseholdLabel,
+ saveOrUpdateHouseholdLabel
+ } from "@/api/userHouse/list/userHouseList.js"
+ import {
+ getLabelList,
+ } from '@/api/label/label'
+ import {
+ exportBlob
+ } from "@/api/common"
+ import {
+ mapGetters
+ } from "vuex"
+ import {
+ getToken
+ } from '@/util/auth'
+ import {
+ downloadXls,
+ findParentOrCur,
+ } from "@/util/util"
+ import {
+ dateNow
+ } from "@/util/date"
+ import NProgress from 'nprogress'
+ import 'nprogress/nprogress.css'
+ import Qs from "qs"
+ import {
+ lintOnSave
+ } from "../../../vue.config"
+
+ export default {
+ data() {
+ let isCardId = function(rule, value, callback) {
+ // 15位和18位身份证号码的正则表达式
+ var regIdCard =
+ /^(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[Xx])$)$/
+
+ // 如果通过该验证,说明身份证格式正确,但准确性还需计算
+ if (regIdCard.test(value) || value == '') {
+ if (value.length == 18) {
+ var idCardWi = new Array(7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10,
+ 5, 8, 4, 2) // 将前17位加权因子保存在数组里
+ var idCardY = new Array(1, 0, 10, 9, 8, 7, 6, 5, 4, 3, 2) // 这是除以11后,可能产生的11位余数、验证码,也保存成数组
+ var idCardWiSum = 0 // 用来保存前17位各自乖以加权因子后的总和
+ for (var i = 0; i < 17; i++) {
+ idCardWiSum += value.substring(i, i + 1) * idCardWi[i]
+ }
+
+ var idCardMod = idCardWiSum % 11 // 计算出校验码所在数组的位置
+ var idCardLast = value.substring(17) // 得到最后一位身份证号码
+
+ // 如果等于2,则说明校验码是10,身份证号码最后一位应该是X
+ if (idCardMod == 2) {
+ if (idCardLast == "X" || idCardLast == "x") {
+ callback()
+ } else {
+ callback(new Error("身份证号格式有误!"))
+ }
+ } else {
+ // 用计算出的验证码与最后一位身份证号码匹配,如果一致,说明通过,否则是无效的身份证号码
+ if (idCardLast == idCardY[idCardMod]) {
+ callback()
+ } else {
+ callback(new Error("身份证号格式有误!"))
+ }
+ }
+ } else {
+ callback()
+ }
+ } else {
+ //alert("身份证格式不正确!");
+ callback(new Error("身份证号格式有误!"))
+ }
+
+ callback()
+ }
+
+ //手机号格式校验
+ let validatorPhone = function(rule, value, callback) {
+ if (value) {
+ if (!/^1[3456789]\d{9}$/.test(value)) {
+ callback(new Error('手机号格式有误!'))
+ } else {
+ callback()
+ }
+ }
+ callback()
+ }
+
+ return {
+ labelData: [],
+ form: {},
+ search: {},
+ excelBox: false,
+ selectionList: [],
+ labelFlag: false,
+ editLabelFlge: false,
+ query: {
+ relationship: 18
+ },
+ loading: true,
+ page: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0
+ },
+ option: {
+ labelWidth: 144,
+ searchLabelWidth: 96,
+ searchShow: true,
+ searchMenuSpan: 3,
+ menuWidth: 240,
+ height: 'auto',
+ calcHeight: 80,
+ tip: false,
+ border: true,
+ index: true,
+ selection: true,
+ viewBtn: true,
+ addBtn: true,
+ dialogType: 'dialog',
+ dialogClickModal: false,
+ menuFixed: 'right',
+ column: [{
+ width: 110,
+ label: "姓名",
+ prop: "name",
+ searchSpan: 3,
+ searchLabelWidth: 46,
+ search: true,
+ rules: [{
+ required: true,
+ message: "请输入姓名",
+ trigger: "blur",
+ }],
+ },
+ {
+ width: 160,
+ display: true,
+ label: "身份证号",
+ prop: "idCard",
+ search: true,
+ searchSpan: 4,
+ slot: true,
+ rules: [{
+ validator: isCardId,
+ trigger: 'blur'
+ }],
+ },
+ {
+ hide: true,
+ display: false,
+ width: 160,
+ label: "证件号码",
+ prop: "cardNo",
+ },
+ {
+ label: "民族",
+ prop: "ethnicity",
+ type: "select",
+ hide: true,
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=nationType",
+ dataType: "number",
+ props: {
+ label: "dictValue",
+ value: "dictKey",
+ },
+ },
+ {
+ hide: false,
+ // display: false,
+ width: 60,
+ align: "center",
+ label: "性别",
+ prop: "gender",
+ type: "select",
+ dicData: [{
+ label: "男",
+ value: 1
+ },
+ {
+ label: "女",
+ value: 0
+ },
+ {
+ label: "未知",
+ value: "3"
+ }
+ ],
+ },
+ {
+ width: 120,
+ label: "手机号码",
+ prop: "phoneNumber",
+ search: true,
+ searchSpan: 4,
+ slot: true,
+ rules: [{
+ required: true,
+ message: "请输入手机号码",
+ trigger: "blur",
+ },
+ {
+ validator: validatorPhone,
+ trigger: 'blur'
+ }
+ ],
+ },
+
+ {
+ minWidth: 150,
+ overHidden: true,
+ label: '小区名称',
+ prop: "aoiName",
+ search: true,
+ searchSpan: 4,
+ overHidden: true,
+ display: false
+ },
+
+ {
+ width: 110,
+ label: "所属街道",
+ addDisplay: false,
+ editDisplay: false,
+ viewDisplay: false,
+ prop: "townStreetName",
+ search: true,
+ searchSpan: 4
+ },
+
+ {
+ width: 156,
+ overHidden: true,
+ label: "所属社区",
+ addDisplay: false,
+ editDisplay: false,
+ viewDisplay: false,
+ prop: "neiName",
+ search: true,
+ searchSpan: 4
+ },
+
+ {
+ width: 110,
+ overHidden: true,
+ label: "所属网格",
+ addDisplay: false,
+ editDisplay: false,
+ viewDisplay: false,
+ prop: "gridName",
+ },
+ {
+ label: "户籍地址",
+ prop: "hukouRegistration",
+ // hide: true,
+ minWidth: 150,
+ overHidden: true,
+ },
+
+ {
+ label: "工作单位",
+ prop: "employer",
+ // editDisplay:false,
+ hide: true,
+ },
+ {
+ label: "房东名称",
+ prop: "houseName",
+ width: 110,
+ // editDisplay:false,
+ // hide: true,
+ },
+ {
+ label: "房东电话",
+ prop: "housePhone",
+ width: 110,
+ // editDisplay:false,
+ // hide: true,
+ },
+ {
+ label: "房东身份证",
+ prop: "houseIdCard",
+ width: 110,
+ // editDisplay:false,
+ // hide: true,
+ },
+ {
+ label: "创建时间",
+ prop: "createTime",
+ hide: true,
+ },
+ {
+ width: 80,
+ // labelWidth: 110,
+ searchSpan: 3,
+ searchLabelWidth: 60,
+ editDisplay: false,
+ label: "未成年",
+ search: true,
+ prop: "minors",
+ type: "select",
+ align: "center",
+ dicData: [{
+ label: "全部",
+ value: ""
+ }, {
+ label: "是",
+ value: 2
+ },
+ {
+ label: "否",
+ value: 1
+ },
+ ],
+ },
+ ]
+ },
+ data: [],
+
+ excelForm: {},
+ labelForm: {},
+ labelOption: {
+ submitBtn: false,
+ emptyBtn: false,
+ column: [{
+ label: '级别',
+ prop: 'color',
+ type: 'radio',
+ button: true,
+ row: true,
+ dicData: [{
+ label: '撤销',
+ value: '#999'
+ }, {
+ label: '绿',
+ value: 'green'
+ }, {
+ label: '黄',
+ value: 'yellow'
+ }, {
+ label: '红',
+ value: 'red'
+ }],
+ rules: [{
+ required: true,
+ message: "请选择",
+ trigger: "blur"
+ }]
+ }, {
+ row: true,
+ label: '备注',
+ prop: 'remark',
+ type: 'input'
+ }]
+ },
+ excelOption: {
+ submitBtn: false,
+ emptyBtn: false,
+ column: [{
+ label: '模板上传',
+ prop: 'excelFile',
+ type: 'upload',
+ drag: true,
+ loadText: '模板上传中,请稍等',
+ span: 24,
+ propsHttp: {
+ res: 'data'
+ },
+ tip: '请上传 .xls,.xlsx 标准格式文件',
+ action: "/api/blade-household/household/import-household?isTenant=1&isCovered=0"
+ },
+ {
+ label: "数据覆盖",
+ prop: "isCovered",
+ type: "switch",
+ align: "center",
+ width: 80,
+ dicData: [{
+ label: "否",
+ value: 0
+ },
+ {
+ label: "是",
+ value: 1
+ }
+ ],
+ value: 0,
+ slot: true,
+ rules: [{
+ required: true,
+ message: "请选择是否覆盖",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: '模板下载',
+ prop: 'excelTemplate',
+ formslot: true,
+ span: 24,
+ }
+ ]
+ },
+ currentLabel: {},
+ currentRow: {},
+ householdLabelList: [],
+ }
+ },
+ watch: {
+ 'form.source': {
+ handler(newData) {
+ let currentAddressColumn = this.findObject(
+ this.option.column,
+ 'currentAddress'
+ )
+
+ let homeAdcodeColumn = this.findObject(
+ this.option.column,
+ 'homeAdcode'
+ )
+
+ if (newData == 1) {
+ currentAddressColumn.disabled = true
+ homeAdcodeColumn.disabled = true
+ } else {
+ currentAddressColumn.disabled = false
+ homeAdcodeColumn.disabled = false
+ }
+ },
+ },
+
+ 'form.cardType': {
+ handler(newData) {
+ let idCardColumn = this.findObject(
+ this.option.column,
+ 'idCard'
+ )
+
+ let cardNoColumn = this.findObject(
+ this.option.column,
+ 'cardNo'
+ )
+
+ if (newData == 111) {
+ idCardColumn.display = true
+ cardNoColumn.display = false
+ } else {
+ idCardColumn.display = false
+ cardNoColumn.display = true
+ }
+ },
+ },
+
+ 'form.healthStatus': {
+ handler(newData) {
+ let diseaseNameColumn = this.findObject(
+ this.option.column,
+ 'diseaseName'
+ )
+
+ if (newData == 3) {
+ diseaseNameColumn.disabled = false
+ } else {
+ diseaseNameColumn.disabled = true
+ }
+ },
+ },
+ 'excelForm.isCovered'() {
+ if (this.excelForm.isCovered !== '') {
+ const column = this.findObject(this.excelOption.column, "excelFile")
+ column.action =
+ `/api/blade-household/household/import-household?isTenant=1&isCovered=${this.excelForm.isCovered}`
+ }
+ }
+ },
+ computed: {
+ ...mapGetters(["userInfo", "permission"]),
+ permissionList() {
+ console.log("permission===>", this.permission)
+ return {
+ addBtn: this.vaildData(this.permission.household_add, false),
+ viewBtn: this.vaildData(this.permission.household_view, true),
+ delBtn: this.vaildData(this.permission.household_delete, true),
+ editBtn: this.vaildData(this.permission.household_edit, true),
+ // tagBtn: this.vaildData(this.permission.household_manager, true)
+ }
+ },
+
+ textDispose() {
+ return (row, flag, type) => {
+ if (row[flag] || row[type] == null) {
+ return row[type]
+ } else {
+ if (type == 'idCard') {
+ return row[type].replace(/^(.{6})(?:\d+)(.{4})$/, "$1******$2")
+ } else {
+ return row[type].replace(/^(.{3})(?:\d+)(.{4})$/, "$1****$2")
+ }
+ }
+ }
+ },
+
+ labelDispose() {
+ return (list) => {
+ return list.map(item => item.labelName).join(',')
+ }
+ },
+
+ getColor() {
+ return (data) => {
+ return setLabelColor(data)
+ }
+ }
+ },
+ mounted() {},
+ methods: {
+ onsubmit() {
+ if (this.labelForm.color === '#EBEDF0') {
+ let params = {
+ householdId: this.currentRow.id,
+ labelId: this.currentLabel.id,
+ // userId: this.currentLabel.id
+ }
+ removeHouseholdLabel(params).then(res => {
+ this.onLoad(this.page)
+
+ this.$message({
+ type: "success",
+ message: "操作成功!"
+ })
+ this.editLabelFlge = false
+ this.manageLabel(this.currentRow)
+ this.loading = false
+ })
+ } else {
+ this.labelForm.houseCode = this.currentRow.houseCode
+ this.labelForm.householdId = this.currentRow.id
+ this.labelForm.labelId = this.currentLabel.id
+ this.labelForm.userId = this.currentRow.associatedUserId
+ this.labelForm.lableType = 1
+
+ saveOrUpdateHouseholdLabel(this.labelForm).then(res => {
+ this.onLoad(this.page)
+
+ this.$message({
+ type: "success",
+ message: "操作成功!"
+ })
+ this.editLabelFlge = false
+ this.manageLabel(this.currentRow)
+ this.loading = false
+ })
+ }
+ },
+
+ changLabel(item) {
+ this.editLabelFlge = true
+ this.currentLabel = item
+ this.labelForm.color = item.color
+ this.labelForm.remark = item.remark
+ },
+
+ manageLabel(item) {
+ this.loading = true
+ this.currentRow = item
+ this.labelFlag = true
+ let params = {
+ parentId: 1000
+ }
+ // 查询标签
+ getLabelList(Object.assign(params)).then(res => {
+ const data = res.data.data
+ // this.labelData = data;
+ // 查询详情
+ getDetatils(item.id).then(res => {
+ this.householdLabelList = res.data.data.householdLabelList
+ // 将细类放到一起
+ data.forEach(e => {
+ e.children.forEach(f => {
+ if (this.householdLabelList.length > 0) {
+ this.householdLabelList.forEach(h => {
+ if (Number(f.id) == h.labelId) {
+ f['color'] = h.color
+ f['remark'] = h.remark
+ }
+ })
+ }
+ })
+ })
+ this.labelData = data
+ this.loading = false
+ })
+ })
+ },
+ rowSave(row, done, loading) {
+ add(row).then(() => {
+ this.initFlag = false
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!"
+ })
+ done()
+ }, error => {
+ window.console.log(error)
+ loading()
+ })
+ },
+ rowUpdate(row, index, done, loading) {
+ update(row).then(() => {
+ this.initFlag = false
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!"
+ })
+ done()
+ }, error => {
+ window.console.log(error)
+ loading()
+ })
+ },
+ rowDel(row) {
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning"
+ })
+ .then(() => {
+ return remove(row.id)
+ })
+ .then(() => {
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!"
+ })
+ })
+ },
+ searchReset() {
+ this.query = {}
+ this.treeDeptId = ''
+ this.onLoad(this.page)
+ },
+ searchChange(params, done) {
+ params.relationship = 18
+ this.query = params
+ this.page.currentPage = 1
+ this.onLoad(this.page, params)
+ done()
+ },
+ selectionChange(list) {
+ this.selectionList = list
+ },
+ selectionClear() {
+ this.selectionList = []
+ // this.$refs.crud.toggleSelection();
+ },
+ handleDelete() {
+ if (this.selectionList.length === 0) {
+ this.$message.warning("请选择至少一条数据")
+ return
+ }
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning"
+ })
+ .then(() => {
+ return remove(this.ids)
+ })
+ .then(() => {
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!"
+ })
+ this.$refs.crud.toggleSelection()
+ })
+ },
+ handleImport() {
+ this.excelBox = true
+ },
+ uploadAfter(res, done, loading, column) {
+ this.excelBox = false
+ this.$alert(res)
+ this.refreshChange()
+ done()
+ },
+ handleExport() {
+ this.$confirm("是否导出租客数据?", "提示", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning"
+ }).then(() => {
+ NProgress.start()
+ var data = {
+ ...this.query
+ }
+ data = Qs.stringify(data)
+ exportBlob(
+ `/api/blade-household/household/export-tenant-household?${this.website.tokenHeader}=${getToken()}&` +
+ data
+ ).then(res => {
+ downloadXls(res.data, `租客数据表${dateNow()}.xlsx`)
+ NProgress.done()
+ })
+ })
+ },
+ handleTemplate() {
+ exportBlob(
+ `/api/blade-household/household/export-tenant-template?isTenant=1&${this.website.tokenHeader}=${getToken()}`
+ ).then(
+ res => {
+ downloadXls(res.data, "租客数据模板.xlsx")
+ })
+ },
+ beforeOpen(done, type) {
+ if (["edit", "view"].includes(type)) {
+ // getDetatils(this.form.id).then(res => {
+ // this.form = res.data.data
+ done()
+ // })
+ }
+ this.initFlag = true
+ },
+ currentChange(currentPage) {
+ this.page.currentPage = currentPage
+ },
+ sizeChange(pageSize) {
+ this.page.pageSize = pageSize
+ },
+ refreshChange() {
+ this.onLoad(this.page, this.query)
+ },
+
+ onLoad(page, params = {}) {
+ params['relationship'] = 18
+ this.loading = true
+ getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+ const data = {
+ ...res.data.data,
+ records: res.data.data.records.map(item => {
+ return {
+ ...item,
+ 'phoneNumberflag': false,
+ 'idCardflag': false
+ }
+ })
+ }
+
+ this.page.total = data.total
+ this.data = data.records
+ this.loading = false
+ this.selectionClear()
+ })
+ },
+
+ showStringDispose(row, type) {
+ row[type] = !row[type]
+ }
+ }
+ }
+</script>
+
+<style lang="scss" scoped>
+ .box {
+ height: 800px;
+ }
+
+ .grid-container2 {
+ /* display: grid;
+ grid-template-columns: auto auto auto auto;
+ grid-gap: 10px; */
+ display: flex;
+ flex-wrap: wrap;
+ padding-bottom: 20px;
+ }
+
+ .grid-item {
+ padding: 8px 14px;
+ border: 1px solid #dcdfe6;
+ margin-right: 10px;
+ margin-bottom: 10px;
+ border-radius: 20px;
+ }
+
+ .grid-item:hover {
+ background-color: #e8f4ff;
+ color: #017BFC;
+ cursor: pointer;
+ }
+
+ .el-scrollbar {
+ height: 100%;
+ }
+
+ .box .el-scrollbar__wrap {
+ overflow: scroll;
+ }
+
+ :deep(.el-form-item__content) {
+ text-align: left !important;
+ }
+
+ :deep(.avue-form__menu--center .el-button) {
+ margin: 0 5px 0 0;
+ }
+</style>
\ No newline at end of file
diff --git a/src/views/street/components/auditBase.vue b/src/views/street/components/auditBase.vue
new file mode 100644
index 0000000..c70f425
--- /dev/null
+++ b/src/views/street/components/auditBase.vue
@@ -0,0 +1,112 @@
+<template>
+ <div class="cur-container-box">
+ <avue-form ref="replyForm" :option="option" v-model="form" :close-on-click-modal="false">
+
+ <template slot-scope="{size}" slot="menuForm">
+ <el-button type="primary" :size="size" @click="handleSubmit">通 过</el-button>
+ <el-button :size="size" @click="handleReset">驳 回</el-button>
+ </template>
+
+ </avue-form>
+ </div>
+</template>
+
+<script>
+ import {
+ setCheckPlaceExt
+ } from "@/api/place/place"
+
+ export default {
+ inject: ["placeElement"],
+
+ data() {
+ return {
+ form: {},
+ option: {
+ submitBtn: false,
+ emptyBtn: false,
+ column: [{
+ span: 23,
+ row: true,
+ label: "审批意见",
+ prop: "confirmNotion",
+ type: 'textarea',
+ minRows: 3,
+ maxRows: 5,
+ rules: [],
+ }]
+ },
+ }
+ },
+
+ methods: {
+ handleSubmit() {
+ setCheckPlaceExt({
+ confirmFlag: 2,
+ id: this.placeElement.curAuditRow.placeExtId,
+ confirmNotion: this.form.confirmNotion
+ }).then(() => {
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ this.$refs.replyForm && this.$refs.replyForm.resetForm()
+ this.placeElement.auditBasePopup = false
+
+ this.placeElement.onLoad(this.placeElement.page)
+ })
+ },
+
+ handleReset() {
+ if ('confirmNotion' in this.form && this.form.confirmNotion.trim() == '' || !this.form.confirmNotion) {
+ this.$message({
+ type: 'warning',
+ message: "请输入审批意见!",
+ })
+
+ return
+ }
+
+ setCheckPlaceExt({
+ confirmFlag: 3,
+ id: this.placeElement.curAuditRow.placeExtId,
+ confirmNotion: this.form.confirmNotion
+ }).then(() => {
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ this.$refs.replyForm && this.$refs.replyForm.resetForm()
+ this.placeElement.auditBasePopup = false
+
+ this.placeElement.onLoad(this.placeElement.page)
+ })
+ },
+ }
+ }
+</script>
+
+<style lang="scss" scoped>
+ .cur-container-box {
+ display: flex;
+ flex-direction: column;
+ width: 100%;
+ height: 100%;
+ overflow: hidden;
+
+ .content-box {
+ margin: 0 4px;
+ padding: 0 16px;
+ height: 0;
+ flex: 1;
+ overflow: hidden;
+ overflow-y: auto;
+ }
+
+ .footer-btn-box {
+ margin-top: 10px;
+ display: flex;
+ justify-content: center;
+ }
+ }
+</style>
\ No newline at end of file
diff --git a/src/views/street/components/baseAllInfo.vue b/src/views/street/components/baseAllInfo.vue
new file mode 100644
index 0000000..100aa41
--- /dev/null
+++ b/src/views/street/components/baseAllInfo.vue
@@ -0,0 +1,1194 @@
+<template>
+ <el-dialog class="place-info-box" title="场所维护" append-to-body :visible.sync="roleBox" center @close="roleBoxClose">
+ <div class="cur-container-box">
+ <div class="content-box">
+ <box-title class="m10" :classVal="9" :title="'基本信息'"></box-title>
+ <avue-form v-if="baseShow" ref="baseForm" :option="option" v-model="form">
+ <template slot-scope="{ row, size, index }" slot="houseCodeBinds">
+ <el-select v-model="form.houseCodeBinds" filterable remote multiple :remote-method="onRemoteMethod"
+ @change="onSelectChange" placeholder="请选择标准地址" reserve-keyword>
+ <el-option v-for="item in standardAddressList" :key="item.addressCode" :label="item.addressName"
+ :value="item.addressCode">
+ </el-option>
+ </el-select>
+ </template>
+ </avue-form>
+
+
+ <box-title class="m10" :classVal="9" :title="'房东信息'"></box-title>
+ <avue-form v-if="restShow" ref="restForm" :option="houseOwnerOption" v-model="placeForm"></avue-form>
+
+ <box-title class="m10" :classVal="9" :title="'其他信息'"></box-title>
+ <avue-form v-if="restShow" ref="restForm" :option="optionDetail" v-model="placeForm"></avue-form>
+
+ <box-title class="m10" :classVal="9" :title="'从业人员'"></box-title>
+ <avue-crud :option="placeOption" :table-loading="loading" :data="placeExt" ref="crud" v-model="houseHoldForm"
+ :permission="permissionList" @row-del="houseHoldRowDel" @row-update="houseHoldRowUpdate"
+ @row-save="houseHoldRowSave" :page.sync="holdPage" @current-change="holdCurrentChange"
+ @size-change="holdSizeChange" @refresh-change="refreshHoldChange" @on-load="holdOnLoad">
+ </avue-crud>
+ </div>
+
+ <div class="footer-btn-box">
+ <el-button size="small" :disabled="disabled" type="primary" @click="dataUpdate">保 存</el-button>
+
+ <el-button size="small" @click="roleBoxClose">关 闭</el-button>
+ </div>
+ </div>
+ </el-dialog>
+</template>
+
+<script>
+ import {
+ getPlaceDetaill,
+ getPlaceExt,
+ holdRemove,
+ holdAdd,
+ holdUpdate,
+ getHoldList,
+ update,
+ updatePlaceExt,
+ getPlaceAddressList
+ } from "@/api/place/place"
+ import {
+ getPlaceList
+ } from "@/api/doorplateAddress/doorplateAddress"
+ import website from "@/config/website"
+
+ import boxTitle from "./boxTitle"
+
+ export default {
+ data() {
+ //手机号格式校验
+ let validatorPhone = function(rule, value, callback) {
+ if (value) {
+ if (!/^1[3456789]\d{9}$/.test(value)) {
+ callback(new Error("手机号格式有误!"))
+ } else {
+ callback()
+ }
+ }
+ callback()
+ }
+
+ return {
+ disabled: false,
+ roleBox: false,
+ baseShow: false,
+ restShow: false,
+
+ placeExt: [],
+
+ form: {},
+ option: {
+ submitBtn: false,
+ emptyBtn: false,
+ dialogMenuPosition: 'right',
+ column: [{
+ span: 12,
+ label: "场所名称",
+ prop: "placeName",
+ labelWidth: 120,
+ rules: [{
+ required: true,
+ message: "请输入场所名称",
+ trigger: "blur",
+ }, ],
+ },
+
+
+
+ {
+ label: "负责人",
+ prop: "principal",
+ labelWidth: 120,
+ rules: [{
+ required: false,
+ message: "请输入负责人",
+ trigger: "blur",
+ }, ],
+ },
+
+ {
+ width: 96,
+ label: "手机号码",
+ prop: "principalPhone",
+ labelWidth: 120,
+ search: true,
+ searchSpan: 4,
+ slot: true,
+ overHidden: true,
+ rules: [{
+ validator: validatorPhone,
+ trigger: "blur",
+ }, ],
+ },
+ {
+ width: 120,
+ overHidden: true,
+ label: "身份证号",
+ labelWidth: 120,
+ prop: "principalIdCard",
+ search: true,
+ searchSpan: 4,
+ slot: true,
+ rules: [{
+ required: false,
+ message: "请输身份证号",
+ trigger: "blur",
+ }],
+ },
+
+ {
+ hide: true,
+ parent: false,
+ label: "所属社区",
+ labelWidth: 120,
+ prop: "neiCode",
+ search: false,
+ type: "tree",
+ dicUrl: "/api/blade-system/region/treeToCommunity",
+ props: {
+ label: "name",
+ value: "id",
+ },
+ cascader: ["gridCode"],
+ // dicFormatter: (res) => {
+ // return dsposeData(res.data)
+ // },
+ rules: [{
+ required: true,
+ message: "请选择所属社区",
+ trigger: "blur",
+ }, ],
+ },
+ {
+ hide: true,
+ label: "所属网格",
+ prop: "gridCode",
+ type: "tree",
+ labelWidth: 120,
+ cell: true,
+ props: {
+ label: "gridName",
+ value: "gridCode",
+ },
+ // dataType: 'string',
+ dicUrl: "/api/blade-grid/grid/getGridList?communityCode={{neiCode}}",
+ rules: [{
+ required: true,
+ message: "请选择所属网格",
+ trigger: "blur",
+ }, ],
+ },
+
+ {
+ span: 7,
+ label: "场所标签",
+ prop: "label",
+ labelWidth: 120,
+ type: "select",
+ dicUrl: "/api/blade-category/category/getCategory?level=2",
+ cascader: ["smallLabel"],
+ props: {
+ label: "categoryName",
+ value: "categoryNo",
+ },
+ dataType: "string",
+ hide: true,
+ rules: [{
+ required: true,
+ message: "请输入场所标签",
+ trigger: "blur",
+ }, ],
+ },
+ {
+ span: 5,
+ label: "",
+ labelWidth: 20,
+ prop: "smallLabel",
+ type: "select",
+ dicUrl: "/api/blade-category/category/getCategory?parentNo={{label}}",
+ props: {
+ label: "categoryName",
+ value: "categoryNo",
+ },
+ dataType: "string",
+ hide: true,
+ },
+
+ {
+ span: 12,
+ label: "标签颜色",
+ prop: "color",
+ type: "select",
+ labelWidth: 120,
+ dicData: [{
+ label: "绿",
+ value: "green",
+ },
+ {
+ label: "黄",
+ value: "yellow",
+ },
+ {
+ label: "红",
+ value: "red",
+ },
+ ],
+ props: {
+ label: "label",
+ value: "value",
+ },
+ hide: true,
+ },
+ {
+ span: 12,
+ label: "九小场所",
+ prop: "isNine",
+ labelWidth: 120,
+ type: "select",
+ dicData: [{
+ label: "是",
+ value: 1,
+ },
+ {
+ label: "否",
+ value: 2,
+ }
+ ],
+ rules: [{
+ required: true,
+ message: "请选择九小分类",
+ trigger: "blur",
+ }, ],
+ hide: true,
+ },
+ {
+ span: 12,
+ label: "九小分类",
+ prop: "nineType",
+ labelWidth: 120,
+ type: "select",
+ display: false,
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=nineType",
+ dataType: "number",
+ hide: true,
+ props: {
+ label: "dictValue",
+ value: "dictKey",
+ },
+ },
+ {
+ span: 12,
+ label: "阵地",
+ prop: "isFront",
+ labelWidth: 120,
+ type: "select",
+ dicData: [{
+ label: "是",
+ value: 1,
+ },
+ {
+ label: "否",
+ value: 2,
+ }
+ ],
+ hide: true,
+ rules: [{
+ required: true,
+ message: "请选择阵地",
+ trigger: "blur",
+ }, ],
+ },
+ {
+ span: 12,
+ label: "阵地类型",
+ prop: "frontType",
+ type: "select",
+ labelWidth: 120,
+ display: false,
+ row: true,
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=frontType",
+ dataType: "number",
+ hide: true,
+ props: {
+ label: "dictValue",
+ value: "dictKey",
+ },
+ },
+ {
+ span: 12,
+ label: "三级消防单位",
+ prop: "threeFireProtection",
+ labelWidth: 120,
+ type: "select",
+ dicData: [{
+ label: "是",
+ value: 1,
+ },
+ {
+ label: "否",
+ value: 2,
+ }
+ ],
+ hide: true,
+ rules: [{
+ required: false,
+ message: "请选择三级消防单位",
+ trigger: "blur",
+ }],
+ },
+
+ {
+ span: 12,
+ label: "无炸类型",
+ prop: "noExplosionCategory",
+ type: "select",
+ labelWidth: 120,
+ display: true,
+ row: true,
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=noExplosionCategory",
+ dataType: "number",
+ hide: true,
+ props: {
+ label: "dictValue",
+ value: "dictKey",
+ },
+ },
+
+ {
+ label: "场所照片",
+ prop: "imageUrls",
+ width: 80,
+ type: "upload",
+ labelWidth: 120,
+ listType: "picture-card",
+ dataType: "string",
+ multiple: true,
+ action: "/api/blade-resource/oss/endpoint/put-file",
+ propsHttp: {
+ res: "data",
+ name: "name",
+ url: "link",
+ },
+ span: 24,
+ },
+ {
+ width: 160,
+ overHidden: true,
+ slot: true,
+ label: "地址",
+ prop: "location",
+ type: "map",
+ dataType: "string",
+ labelWidth: 120,
+ span: 24,
+ value: [117.96646, 28.431002, ""],
+ cascader: ['houseCodeBinds'],
+ rules: [{
+ required: true,
+ message: "请选择地址",
+ trigger: "blur",
+ }, ],
+ },
+ {
+ width: 160,
+ overHidden: true,
+ display: false,
+ labelWidth: 120,
+ hide: true,
+ label: "地址",
+ prop: "addressName",
+ span: 12
+ },
+
+ // {
+ // width: 160,
+ // overHidden: true,
+ // slot: true,
+ // label: "标准地址",
+ // prop: "houseCodeBinds",
+ // span: 24,
+ // type: 'select',
+ // labelWidth:120,
+ // dataType: "object",
+ // remote: true,
+ // multiple: true,
+ // hide: true,
+ // display: false,
+ // filterable:true,
+ // dicUrl: `/api/blade-doorplateAddress/doorplateAddress/getPlaceList`,
+ // props: {
+ // label: 'addressName',
+ // value: 'addressCode',
+ // },
+ // dicData: [],
+ // rules: [{
+ // required: false,
+ // message: "请选择标准地址",
+ // trigger: "blur",
+ // }, ]
+ // },
+ {
+ span: 24,
+ hide: true,
+ prop: "houseCodeBinds",
+ slot: true,
+ label: "标准地址",
+ labelWidth: 120,
+
+ },
+ {
+ label: "备注",
+ prop: "remark",
+ type: 'textarea',
+ labelWidth: 120,
+ hide: true,
+ span: 24,
+ rules: [{
+ required: false,
+ message: "请输入场所备注",
+ trigger: "blur",
+ }, ],
+ },
+ ],
+ },
+
+ placeForm: {},
+ optionDetail: {
+ submitBtn: false,
+ emptyBtn: false,
+ column: [{
+ label: "学生人数",
+ prop: "studentNumber",
+ },
+ {
+ label: "教职工人数",
+ prop: "workersNumber",
+ },
+ {
+ label: "专职保安",
+ prop: "securityNumber",
+ },
+ {
+ label: "专职门卫",
+ prop: "guardNumber",
+ },
+ {
+ label: "专兼职保卫人员",
+ prop: "temporarySecurityNumber",
+ },
+ {
+ label: "走读/寄宿",
+ prop: "dayStudentsNumber",
+ },
+ {
+ label: "住校生人数",
+ prop: "residentialStudentsNumber",
+ },
+ {
+ label: "宿舍管理人员",
+ prop: "housemasterNumber",
+ }, {
+ labelWidth: 100,
+ label: "法人信息",
+ prop: "legalPerson",
+ },
+ {
+ labelWidth: 100,
+ label: "法人电话",
+ prop: "legalTel",
+ search: true,
+ searchSpan: 4,
+ slot: true,
+ overHidden: true,
+ rules: [{
+ validator: validatorPhone,
+ trigger: "blur",
+ }, ],
+ },
+
+
+ {
+ label: "营业执照",
+ prop: "imageUrls",
+ width: 80,
+ type: "upload",
+ listType: "picture-card",
+ dataType: "string",
+ multiple: true,
+ action: "/api/blade-resource/oss/endpoint/put-file",
+ propsHttp: {
+ res: "data",
+ name: "name",
+ url: "link",
+ },
+ span: 24,
+ },
+
+ {
+ label: "场所平面图",
+ prop: "planImageUrls",
+ width: 80,
+ type: "upload",
+ listType: "picture-card",
+ dataType: "string",
+ multiple: true,
+ action: "/api/blade-resource/oss/endpoint/put-file",
+ propsHttp: {
+ res: "data",
+ name: "name",
+ url: "link",
+ },
+ span: 24,
+ },
+ ],
+ },
+
+ loading: true,
+ placeOption: {
+ menu: true,
+ height: 300,
+ calcHeight: 54,
+ dialogWidth: 950,
+ tip: false,
+ searchShow: false,
+ addBtn: true,
+ delBtn: true,
+ editBtn: true,
+ border: true,
+ index: true,
+ dialogClickModal: false,
+ column: [{
+ labelWidth: 100,
+ label: "姓名",
+ prop: "name",
+ searchSpan: 4,
+ search: true,
+ },
+ {
+ labelWidth: 100,
+ label: "性别",
+ prop: "gender",
+ type: "select",
+ dicData: [{
+ label: "男",
+ value: 1
+ },
+ {
+ label: "女",
+ value: 0
+ },
+ {
+ label: "未知",
+ value: "3"
+ }
+ ],
+ },
+ {
+ labelWidth: 100,
+ span: 12,
+ label: "民族",
+ prop: "ethnicity",
+ type: "select",
+ row: true,
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=nationType",
+ dataType: "number",
+ props: {
+ label: "dictValue",
+ value: "dictKey",
+ },
+ },
+ {
+ labelWidth: 100,
+ label: "身份证号",
+ prop: "idCard",
+ },
+
+ {
+ labelWidth: 100,
+ label: "电话号码",
+ prop: "telephone",
+ search: true,
+ searchSpan: 4,
+ slot: true,
+ overHidden: true,
+ rules: [{
+ validator: validatorPhone,
+ trigger: "blur",
+ }, ],
+ },
+
+ {
+ labelWidth: 100,
+ label: "现居住地",
+ prop: "tempAddress",
+ searchSpan: 4,
+ search: true,
+ },
+ {
+ labelWidth: 100,
+ label: "岗位",
+ prop: "jobNature",
+ // hide: true
+ },
+
+ {
+ label: "从业人员照片",
+ prop: "employerImg",
+ labelWidth: 100,
+ type: "upload",
+ listType: "picture-card",
+ dataType: "string",
+ multiple: true,
+ action: "/api/blade-resource/oss/endpoint/put-file",
+ propsHttp: {
+ res: "data",
+ name: "name",
+ url: "link",
+ },
+ span: 24,
+ hide: true
+ },
+ {
+ label: "入职时间",
+ labelWidth: 100,
+ hide: true,
+ row: true,
+ prop: "resignationTime",
+ type: "datetime",
+ format: "yyyy-MM-dd",
+ valueFormat: "yyyy-MM-dd",
+ // format: "yyyy-MM-dd hh:mm:ss",
+ // valueFormat: "yyyy-MM-dd hh:mm:ss",
+ rules: [{
+ required: false,
+ message: "请选择入职时间",
+ trigger: "blur",
+ }]
+ },
+ {
+ label: "离职时间",
+ labelWidth: 100,
+ hide: true,
+ row: true,
+ prop: "employmentTime",
+ type: "datetime",
+ format: "yyyy-MM-dd",
+ valueFormat: "yyyy-MM-dd",
+ // format: "yyyy-MM-dd hh:mm:ss",
+ // valueFormat: "yyyy-MM-dd hh:mm:ss",
+ rules: [{
+ required: false,
+ message: "请选择离职时间",
+ trigger: "blur",
+ }]
+ },
+ {
+ labelWidth: 100,
+ label: "状态",
+ prop: "resignationFlag",
+ // hide: true
+ type: "select",
+ display: false,
+ dicData: [{
+ label: "在职",
+ value: 1
+ },
+ {
+ label: "离职",
+ value: 2
+ }
+ ],
+ },
+
+ ]
+ },
+ holdPage: {
+ pageSize: 20,
+ currentPage: 1,
+ total: 0,
+ },
+ houseHoldForm: {},
+ houseOwnerOption: {
+ submitBtn: false,
+ emptyBtn: false,
+ column: [
+
+ {
+ width: 96,
+ label: "姓名",
+ prop: "landlordName",
+ search: true,
+ searchSpan: 4,
+ slot: true,
+ overHidden: true
+ },
+ {
+ width: 96,
+ label: "身份证号",
+ prop: "landlordIdCard",
+ search: true,
+ searchSpan: 4,
+ slot: true,
+ overHidden: true,
+ rules: [{
+ // validator: validatorPhone,
+ trigger: "blur",
+ }, ],
+ },
+ {
+ width: 96,
+ label: "手机号",
+ prop: "landlordPhone",
+ search: true,
+ searchSpan: 4,
+ slot: true,
+ overHidden: true,
+ rules: [{
+ validator: validatorPhone,
+ trigger: "blur",
+ }, ],
+ },
+ ],
+ },
+ userOption: {
+ submitBtn: false,
+ emptyBtn: false,
+ column: [
+
+ {
+ width: 96,
+ label: "电话",
+ prop: "legalTel",
+ search: true,
+ searchSpan: 4,
+ slot: true,
+ overHidden: true,
+ rules: [{
+ validator: validatorPhone,
+ trigger: "blur",
+ }, ],
+ },
+ {
+ width: 96,
+ label: "微信号",
+ prop: "legalTel",
+ search: true,
+ searchSpan: 4,
+ slot: true,
+ overHidden: true,
+ rules: [{
+ validator: validatorPhone,
+ trigger: "blur",
+ }, ],
+ },
+
+
+
+ ],
+ },
+
+ standardAddressList: [], //标准地址数据
+ standardAddress: "",
+ standardAddressSearchKey: ""
+ }
+ },
+
+ components: {
+ boxTitle
+ },
+
+ inject: ["placeElement"],
+
+ watch: {
+
+ 'form.houseBindList': {
+ handler(newData) {
+ console.log("=======>", newData)
+ }
+ },
+
+ 'form.isNine': {
+ handler(newData) {
+ if (newData) {
+ let nineTypeColumn = this.findObject(
+ this.option.column,
+ 'nineType'
+ )
+
+ if (newData == 1) {
+ nineTypeColumn.display = true
+ } else {
+ nineTypeColumn.display = false
+ }
+ }
+ },
+ },
+ 'form.isFront': {
+ handler(newData) {
+ if (newData) {
+ let frontTypeColumn = this.findObject(
+ this.option.column,
+ 'frontType'
+ )
+
+ if (newData == 1) {
+ frontTypeColumn.display = true
+ } else {
+ frontTypeColumn.display = false
+ }
+ }
+ }
+ },
+ 'form.addressName': {
+ handler(newData) {
+ console.log("111111")
+ const column = this.findObject(this.option.column, "houseCodeBinds")
+ if (newData) {
+ column.display = true;
+ } else {
+ column.display = false
+ }
+ }
+ }
+ },
+ methods: {
+ initOpen(newData) {
+ console.log("item==>", newData);
+ this.curRow = newData
+ this.roleBox = true
+ this.baseShow = false
+ this.restShow = false
+ this.form = {}
+ this.placeForm = {}
+
+ const that = this
+
+ that.$axios
+ .all([getPlaceDetaill(newData["houseCode"]), getPlaceExt({
+ placeId: newData["id"]
+ }), getPlaceList()])
+ .then(
+ that.$axios.spread(function(baseInfo, restInfo) {
+ console.log("houseCodeBinds===>", baseInfo.data.data.houseCodeBinds)
+ that.form = baseInfo.data.data
+ that.form.addressName = that.form.location;
+ that.form.location = [
+ that.form.lng,
+ that.form.lat,
+ that.form.location,
+ ].join(",")
+ if (baseInfo.data.data.houseCodeBinds) {
+ that.standardAddressList = baseInfo.data.data.houseBindList;
+ that.form.houseCodeBinds = baseInfo.data.data.houseCodeBinds.split(",")
+ }
+
+ if (that.form.imageUrls && that.form.imageUrls.length) {
+ that.form.imageUrls = that.form.imageUrls
+ .split(",")
+ .filter((item) => item != "")
+ .map((item) => website.minioUrl + item)
+ .join(",")
+ }
+
+ if (
+ that.form.placePoiLabelVOList &&
+ that.form.placePoiLabelVOList.length
+ ) {
+ let lebelTwo = that.form.placePoiLabelVOList.find((item) => {
+ return item.type == 2
+ })
+
+ if (lebelTwo) that.form.label = String(lebelTwo.poiCode)
+
+ let lebelThree = that.form.placePoiLabelVOList.find((item) => {
+ return item.type == 3
+ })
+
+ if (lebelThree) that.form.smallLabel = String(lebelThree.poiCode)
+ }
+
+ that.baseShow = true
+ const data = restInfo.data.data
+
+
+
+
+ if (data) {
+ let imageUrls = data.imageUrls
+ let planImageUrls = data.planImageUrls
+
+ if (imageUrls && imageUrls.length) {
+ imageUrls = imageUrls
+ .split(",")
+ .filter((item) => item != "")
+ .map((item) => website.minioUrl + item)
+ .join(",")
+ }
+
+ if (planImageUrls && planImageUrls.length) {
+ planImageUrls = planImageUrls
+ .split(",")
+ .filter((item) => item != "")
+ .map((item) => website.minioUrl + item)
+ .join(",")
+ }
+
+ that.placeForm = {
+ ...data,
+ imageUrls,
+ planImageUrls,
+
+
+ }
+ }
+
+ that.restShow = true
+ })
+ )
+
+ that.getPlaceAddressListRequest()
+ },
+
+ locationDispose(data) {
+ data = data.split(",")
+
+ return {
+ longitude: data[0],
+ latitude: data[1],
+ location: data[2],
+ }
+ },
+
+ selectionClear() {
+ this.$nextTick(() => {
+ this.$refs.crud && this.$refs.crud.toggleSelection()
+ })
+ },
+
+ houseHoldRowUpdate(row, index, done, loading) {
+ holdUpdate(row).then(
+ () => {
+ this.holdOnLoad(this.holdPage)
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ done()
+ },
+ (error) => {
+ window.console.log(error)
+ loading()
+ }
+ )
+ },
+
+ houseHoldRowDel(row) {
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ return holdRemove(row.id)
+ })
+ .then(() => {
+ this.holdOnLoad(this.holdPage)
+
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ })
+ },
+
+ houseHoldRowSave(row, done, loading) {
+ holdAdd({
+ ...row,
+ placeId: this.curRow.id,
+ }).then(
+ () => {
+ this.holdOnLoad(this.holdPage)
+
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ done()
+ },
+ (error) => {
+ window.console.log(error)
+ loading()
+ }
+ )
+ },
+
+ refreshHoldChange() {
+ this.holdOnLoad(this.holdPage)
+ },
+
+ holdOnLoad(holdPage, params = {}) {
+ if (!this.curRow.id) return
+
+ let values = {
+ ...params,
+ placeId: this.curRow.id,
+ }
+
+ getHoldList(holdPage.currentPage, holdPage.pageSize, values).then(
+ (res) => {
+ const data = res.data.data
+
+ this.holdPage.total = data.total
+ this.placeExt = data.records
+
+ this.loading = false
+ this.selectionClear()
+ }
+ )
+ },
+
+ holdCurrentChange(currentPage) {
+ this.holdPage.currentPage = currentPage
+ },
+
+ holdSizeChange(pageSize) {
+ this.holdPage.pageSize = pageSize
+ },
+
+ desposeImage(data) {
+ if (data) {
+ if (data.length > 0) {
+ var urls = []
+ var split = data.split(",").filter((item) => item != "")
+ split.forEach((url) => {
+ var names = url.split("jczz/")
+ urls.push(names[1])
+ })
+ data = urls.join(",")
+ }
+ }
+ return data
+ },
+
+ dataUpdate() {
+ const that = this
+ that.disabled = true;
+ let imageUrls = this.desposeImage(this.form.imageUrls)
+ let placeImages = this.desposeImage(this.placeForm.imageUrls)
+ let placePlanImageUrls = this.desposeImage(this.placeForm.planImageUrls)
+
+ let label = this.form.label
+
+ if (this.form.smallLabel != "") {
+ label = label + "," + this.form.smallLabel
+ }
+
+ delete this.form.smallLabel
+ if (Array.isArray(this.form.houseCodeBinds)) {
+ this.form.houseCodeBinds = this.form.houseCodeBinds.join(",")
+ }
+
+ this.form.placeExtEntity = null
+ this.$refs.baseForm.validate((valid, done, msg) => {
+ if (valid) {
+ that.$axios
+ .all([
+ update({
+ // ...this.placeElement.curRow,
+ ...this.form,
+ imageUrls,
+ label,
+ ...this.locationDispose(this.form.location),
+ }),
+ updatePlaceExt({
+ ...this.placeForm,
+ imageUrls: placeImages,
+ planImageUrls: placePlanImageUrls,
+ }),
+ ])
+ .then(
+ that.$axios.spread(function() {
+ that.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+
+ that.roleBoxClose()
+
+ that.placeElement.onLoad(
+ that.placeElement.page,
+ that.placeElement.query
+ )
+ done()
+ })
+ )
+ } else {
+ console.log("error submit!!")
+ that.disabled = false;
+ return false
+ }
+ })
+ },
+
+ roleBoxClose() {
+ this.form = {}
+ this.placeForm = {}
+ this.disabled = false
+ this.$refs.baseForm && this.$refs.baseForm.resetForm()
+ this.$refs.restForm && this.$refs.restForm.resetForm()
+ this.baseShow = false
+ this.restShow = false
+ this.roleBox = false
+ },
+
+ getPlaceAddressListRequest(query) {
+ getPlaceAddressList({
+ addressName: query
+ }).then(res => {
+ this.standardAddressList = res.data.data;
+ })
+ },
+
+ onSelectChange(e) {
+ console.log("selectChange===>", e);
+ // this.getPlaceAddressListRequest()
+ },
+
+ onRemoteMethod(query) {
+ console.log("remote===>", query)
+ this.getPlaceAddressListRequest(query)
+ },
+
+
+
+ },
+ }
+</script>
+
+<style lang="scss" scoped>
+ .cur-container-box {
+ display: flex;
+ flex-direction: column;
+ width: 100%;
+ height: 100%;
+ overflow: hidden;
+
+ .content-box {
+ margin: 0 4px;
+ padding: 0 10px;
+ height: 0;
+ flex: 1;
+ overflow: hidden;
+ overflow-y: auto;
+ }
+
+ .footer-btn-box {
+ margin-top: 10px;
+ display: flex;
+ justify-content: center;
+ }
+ }
+</style>
\ No newline at end of file
diff --git a/src/views/street/components/boxTitle.vue b/src/views/street/components/boxTitle.vue
new file mode 100644
index 0000000..2995eb8
--- /dev/null
+++ b/src/views/street/components/boxTitle.vue
@@ -0,0 +1,483 @@
+<!--
+ * @name: name
+ * @description: Description
+ * @lastEditors: Francis
+ * @date: Do not edit
+ * @lastEditTime: Do not edit
+ * @filePath: Do not edit
+-->
+<template>
+ <div class="titleContent">
+ <!-- <div class="title1" data-color="red"></div> -->
+
+ <div :class="`title title${classVal} ${classStyle}`">
+ {{ title }}</div>
+ </div>
+</template>
+
+<script>
+export default {
+ name: 'boxTitle',
+ props: {
+ title: {
+ type: String,
+ default: ''
+ },
+
+ classVal: {
+ type: Number,
+ },
+
+ classStyle: {
+ type: String,
+ default: ''
+ },
+ }
+}
+</script>
+
+<style lang="scss" scoped>
+.titleContent {
+ >div {
+ margin: 10px 0;
+ }
+}
+
+.title {
+ height: 32px;
+ font-size: 20px;
+ font-weight: 600;
+ line-height: 32px;
+ margin-left: 5px;
+ padding-left: 5px;
+ position: relative;
+ color: #444;
+ z-index: 0;
+}
+
+.echarts-title {
+ margin: 0 !important;
+}
+
+.title1 {
+ padding-left: 15px;
+
+ &:after {
+ content: " ";
+ width: 4px;
+ height: 20px;
+ background: #12a3f5;
+ position: absolute;
+ left: 0;
+ top: 6px;
+ border-radius: 2px;
+ }
+}
+
+.title2 {
+ padding-left: 15px;
+
+ &:after {
+ content: " ";
+ width: 8px;
+ height: 8px;
+ border-radius: 50%;
+ background: #12a3f5;
+ position: absolute;
+ left: 0;
+ top: 12px;
+ }
+}
+
+
+.title3 {
+ &:after {
+ content: " ";
+ position: absolute;
+ bottom: 0;
+ left: 0;
+ position: absolute;
+ height: 2px;
+ width: 100%;
+ background: linear-gradient(to right, #01DFE3, rgba(255, 255, 255, 0));
+
+ }
+}
+
+
+.title4 {
+ &:after {
+ content: attr(data-text);
+ position: absolute;
+ display: inline-block;
+ bottom: -8px;
+ left: 5px;
+ opacity: 0.2;
+ z-index: 0;
+ text-align: right;
+ transform: rotateY(30deg);
+ transform: scaleY(30deg);
+
+ }
+}
+
+
+.title5 {
+ color: #10faf8;
+ padding-left: 80px;
+ line-height: 22px;
+ position: relative;
+ border-bottom: 2px solid linear-gradient(to right, #01DFE3, rgba(255, 255, 255, 0));
+
+ &:after {
+ content: "";
+ position: absolute;
+ bottom: 0;
+ top: 0;
+ left: 18px;
+ width: 50px;
+ height: 18px;
+ transform: skewX(35deg);
+ background: linear-gradient(to right,
+ #2d83fa,
+ #10faf8);
+ }
+
+ &:before {
+ content: "|||";
+ display: inline-block;
+ font-weight: 900;
+ color: #FFF;
+ line-height: 30px;
+ font-size: 18px;
+ position: absolute;
+ position: absolute;
+ top: -8px;
+ left: 0;
+ color: #2d83fa;
+ transform: skewX(35deg);
+ }
+}
+
+.title6 {
+ color: #C6D039;
+ padding-left: 80px;
+ line-height: 22px;
+ position: relative;
+ border-bottom: 2px solid linear-gradient(to right, #01DFE3, rgba(255, 255, 255, 0));
+
+ &:after {
+ content: "";
+ position: absolute;
+ bottom: 0;
+ top: 0;
+ left: 18px;
+ width: 50px;
+ height: 18px;
+ transform: skewX(35deg);
+ background: linear-gradient(to right,
+ #4BF15A,
+ #C6D039);
+ }
+
+ &:before {
+ content: "|||";
+ display: inline-block;
+ font-weight: 900;
+ color: #FFF;
+ line-height: 30px;
+ font-size: 18px;
+ position: absolute;
+ position: absolute;
+ top: -8px;
+ left: 0;
+ color: #4BF15A;
+ transform: skewX(35deg);
+ }
+}
+
+.title7 {
+
+ &:after {
+ content: "";
+ position: absolute;
+ bottom: 0;
+ top: 0;
+ left: 0;
+ width: 180px;
+ height: 100%;
+ opacity: 0.3;
+ background: linear-gradient(to right,
+ #4BF15A,
+ #4bf15900);
+ }
+
+ &:before {
+ content: " ";
+ position: absolute;
+ bottom: 0;
+ left: 0;
+ position: absolute;
+ height: 2px;
+ width: 100%;
+ background: linear-gradient(to right, #4BF15A, rgba(255, 255, 255, 0));
+ }
+}
+
+.title8 {
+ border-radius: 16px;
+ border: 1px solid #e8e9fb;
+ box-shadow: 0 0 10px #e8e9fb;
+ text-align: center;
+ width: 160px;
+ color: #12a3f5;
+
+ &:before {
+ content: "";
+ width: 300%;
+ height: 2px;
+ background: #e8e9fb;
+ position: absolute;
+ top: 15px;
+ left: 100%;
+ background: linear-gradient(to right, #e8e9fb, rgba(255, 255, 255, 0));
+ }
+}
+
+.title9 {
+ background: #ECF8FF;
+ border-top-left-radius: 5px;
+ padding-left: 20px;
+
+ &:before {
+ content: "";
+ border-top-left-radius: 5px;
+ border-bottom-left-radius: 5px;
+ width: 4px;
+ height: 100%;
+ background: #50BFFF;
+ position: absolute;
+ top: 0;
+ left: 0;
+ }
+}
+
+.title10 {
+ background: #FFF6F7;
+ border-top-left-radius: 5px;
+ padding-left: 20px;
+
+ &:before {
+ content: "";
+ border-top-left-radius: 5px;
+ border-bottom-left-radius: 5px;
+ width: 4px;
+ height: 100%;
+ background: #FE6C6F;
+ position: absolute;
+ top: 0;
+ left: 0;
+ }
+}
+
+
+
+.title11 {
+ display: inline-block;
+ position: relative;
+ width: 150px;
+ height: 32px;
+ line-height: 32px;
+ padding-left: 15px;
+ background: #50BFFF;
+ left: -8px;
+ color: #FFF;
+
+ &:before {
+ content: "";
+ position: absolute;
+ height: 0;
+ width: 0;
+ border-bottom: 8px solid #4396c5;
+ border-left: 8px solid transparent;
+ top: -8px;
+ left: 0;
+ }
+
+ &:after {
+ content: "";
+ position: absolute;
+ height: 0;
+ width: 0;
+ border-top: 15px solid transparent;
+ border-bottom: 15px solid transparent;
+ border-left: 8px solid #50BFFF;
+ right: -8px;
+ }
+}
+
+.title12 {
+ position: relative;
+ width: 160px;
+ padding-left: 10px;
+ // top: 15px;
+ // padding: 8px 10px;
+ background: #00B3ED;
+ box-shadow: -1px 2px 4px rgba(0, 0, 0, 0.5);
+ color: #FFF;
+ // height: 40px;
+
+ &:before {
+ position: absolute;
+ content: "";
+ display: block;
+ width: 7px;
+ height: 100%;
+ padding: 0 0 7px;
+ top: 0;
+ left: -7px;
+ background: inherit;
+ border-radius: 5px 0 0 5px;
+ }
+
+ &:before {
+ position: absolute;
+ content: "";
+ display: block;
+ width: 5px;
+ height: 5px;
+ background: rgba(0, 0, 0, 0.35);
+ bottom: -5px;
+ left: -5px;
+ border-radius: 5px 0 0 5px;
+ }
+
+}
+
+.title13 {
+ border-left: 2px solid #FE6C6F;
+
+ &:after {
+ content: " ";
+ position: absolute;
+ bottom: 0;
+ left: 0;
+ position: absolute;
+ height: 2px;
+ width: 60%;
+ background: linear-gradient(to right, #FE6C6F, rgba(255, 255, 255, 0));
+ }
+
+ &::before {
+ content: " ";
+ position: absolute;
+ top: 0;
+ left: 0;
+ position: absolute;
+ height: 2px;
+ width: 30%;
+ background: linear-gradient(to right, #FE6C6F, rgba(255, 255, 255, 0));
+ }
+}
+
+.title14 {
+ border-left: 2px solid #01DFE3;
+
+ &:after {
+ content: " ";
+ position: absolute;
+ bottom: 0;
+ left: 0;
+ position: absolute;
+ height: 2px;
+ width: 60%;
+ background: linear-gradient(to right, #01DFE3, rgba(255, 255, 255, 0));
+ }
+
+ &::before {
+ content: " ";
+ position: absolute;
+ top: 0;
+ left: 0;
+ position: absolute;
+ height: 2px;
+ width: 30%;
+ background: linear-gradient(to right, #01DFE3, rgba(255, 255, 255, 0));
+ }
+}
+
+.title15 {
+ color: #FFF;
+ padding-left: 50px;
+ background: linear-gradient(-210deg, transparent 1.5em, #01DFE3 0);
+
+ &::before {
+ content: '';
+ display: block;
+ width: 1.73em;
+ height: 3em;
+ position: absolute;
+ background: linear-gradient(-60deg, #577b98 50%, transparent 0);
+ left: -3px;
+ top: 0;
+ border-bottom-left-radius: inherit;
+ transform: translateY(-0.5em) rotate(30deg);
+ transform-origin: bottom right;
+ box-shadow: .2em .2em .3em -.1em rgba(0, 0, 0, .15);
+ }
+}
+
+.title16 {
+ color: #FFF;
+ padding-left: 50px;
+ background: linear-gradient(-210deg, transparent 1.5em, #FE6C6F 0);
+
+ &::before {
+ content: '';
+ display: block;
+ width: 1.73em;
+ height: 3em;
+ position: absolute;
+ background: linear-gradient(-60deg, #f18384 50%, transparent 0);
+ left: -3px;
+ top: 0;
+ border-bottom-left-radius: inherit;
+ transform: translateY(-0.5em) rotate(30deg);
+ transform-origin: bottom right;
+ box-shadow: .2em .2em .3em -.1em rgba(0, 0, 0, .15);
+ }
+}
+
+.title17 {
+ &:after {
+ content: " ";
+ position: absolute;
+ bottom: 0;
+ left: 0;
+ position: absolute;
+ height: 100%;
+ width: 100%;
+ animation: animation3 1s linear infinite;
+ background: linear-gradient(135deg, #01DFE3 0.25em, transparent 0.25em) -0.5em 0, linear-gradient(225deg, #01DFE3 0.25em, transparent 0.25em) -0.5em 0, linear-gradient(315deg, rgba(238, 161, 99, 0.25) 0.25em, transparent 0.25em) 0 0, linear-gradient(45deg, rgba(238, 161, 99, 0.25) 0.25em, transparent 0.25em) 0 0;
+ background-size: 0.75em 0.75em;
+ opacity: 0.3;
+
+ }
+}
+
+.title18 {
+ &:after {
+ content: " ";
+ position: absolute;
+ bottom: 0;
+ left: 0;
+ position: absolute;
+ height: 100%;
+ width: 100%;
+ opacity: 0.3;
+ animation: animation2 1s linear infinite;
+ background: repeating-linear-gradient(45deg, #01DFE3 0, #01DFE3 0.25em, transparent 0.25em, transparent 0.5em);
+ background-size: 0.75em 0.75em;
+ }
+}
+</style>
\ No newline at end of file
diff --git a/src/views/street/houseHoldList.vue b/src/views/street/houseHoldList.vue
new file mode 100644
index 0000000..d8195d9
--- /dev/null
+++ b/src/views/street/houseHoldList.vue
@@ -0,0 +1,1177 @@
+<template>
+ <!-- <el-row>
+ <el-col :span="24"> -->
+ <basic-container>
+ <avue-crud :option="option" :search.sync="search" :table-loading="loading" :data="data" ref="crud" v-model="form"
+ :permission="permissionList" @row-del="rowDel" @row-update="rowUpdate" @row-save="rowSave"
+ :before-open="beforeOpen" :page.sync="page" @search-change="searchChange" @search-reset="searchReset"
+ @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
+ @refresh-change="refreshChange" @on-load="onLoad">
+ <template slot="menuLeft">
+ <el-button type="danger" size="small" plain icon="el-icon-delete" v-if="permission.household_delete"
+ @click="handleDelete">删 除
+ </el-button>
+ <el-button type="success" size="small" plain v-if="permission.household_import" icon="el-icon-upload2"
+ @click="handleImport">导入
+ </el-button>
+ <el-button type="warning" size="small" plain v-if="permission.household_export" icon="el-icon-download"
+ @click="handleExport">导出
+ </el-button>
+ </template>
+
+ <template slot-scope="{row, size}" slot="menu">
+ <el-button :size="size" type="text" icon="el-icon-circle-plus-outline" v-if="permission.household_manager"
+ @click="manageLabel(row)">标签
+ </el-button>
+ </template>
+ <template slot-scope="{row, size}" slot="phoneNumber">
+ <el-button :size="size" type="text" @click="showStringDispose(row, 'phoneNumberflag')">
+ {{ textDispose(row, 'phoneNumberflag', 'phoneNumber') }}
+ </el-button>
+ </template>
+ <template slot-scope="{row, size}" slot="idCard">
+ <el-button :size="size" type="text" @click="showStringDispose(row, 'idCardflag')"
+ v-text="textDispose(row, 'idCardflag', 'idCard')"></el-button>
+ </template>
+ <template slot-scope="{row, size}" slot="householdLabelList">
+ {{ labelDispose(row.householdLabelList) }}
+ </template>
+ </avue-crud>
+ <el-dialog title="标签管理" append-to-body :visible.sync="labelFlag" center width="600px">
+ <div v-for="(item, index) in labelData " :key="index">
+ <el-row>
+ <el-col :span="24">
+ <div>
+ <el-divider content-position="left">{{ item.name }}</el-divider>
+ </div>
+ </el-col>
+ </el-row>
+
+ <el-collapse accordion @change="handleChange" v-if="item.children[0].children.length">
+ <el-collapse-item :title="item2.name" :name="index2" v-for="(item2, index2) in item.children" :key="index2">
+ <div class="grid-container2">
+ <div class="grid-item" :style="{ backgroundColor: getColor(i.color) }" v-for="(i, k) in item2.children"
+ @click="changLabel(i)" :key="k">
+ {{ i.name }}
+ </div>
+ </div>
+ </el-collapse-item>
+ </el-collapse>
+ <div class="grid-container2" v-else>
+ <div class="grid-item" :style="{ backgroundColor: getColor(item2.color) }"
+ v-for="( item2, index2 ) in item.children " @click="changLabel(item2)" :key="index2">
+ {{ item2.name }}
+ </div>
+ </div>
+ </div>
+
+ <!-- <span slot="footer" class="dialog-footer">
+ <el-button @click="labelFlag = false">取 消</el-button>
+ <el-button type="primary" @click="submitRole">确 定</el-button>
+ </span> -->
+ </el-dialog>
+
+ <el-dialog :title="'编辑标签 ' + currentLabel.name" append-to-body :visible.sync="editLabelFlge" width="655px">
+ <avue-form :option="labelOption" v-model="labelForm" :submit="onsubmit">
+ </avue-form>
+ <span slot="footer" class="dialog-footer">
+ <el-button size="small" @click="editLabelFlge = false">取 消</el-button>
+ <el-button size="small" type="primary" @click="onsubmit">确 定</el-button>
+ </span>
+ </el-dialog>
+
+ <el-dialog title="住户数据导入" append-to-body :visible.sync="excelBox" width="555px">
+ <avue-form :option="excelOption" v-model="excelForm" :upload-after="uploadAfter">
+ <template slot="excelTemplate">
+ <el-button size="small" type="primary" @click="handleTemplate">
+ 点击下载<i class="el-icon-download el-icon--right"></i>
+ </el-button>
+ </template>
+ </avue-form>
+ </el-dialog>
+ </basic-container>
+ <!-- </el-col>
+ </el-row> -->
+</template>
+
+<script>
+ import {
+ setLabelColor
+ } from '@/util/util'
+ import {
+ getList,
+ remove,
+ add,
+ update,
+ getDetatil,
+ getDetatils
+ } from "@/api/userHouse/list/houseHold.js"
+ import {
+ removeHouseholdLabel,
+ saveOrUpdateHouseholdLabel
+ } from "@/api/userHouse/list/userHouseList.js"
+ import {
+ getLabelList,
+ } from '@/api/label/label'
+ import {
+ exportBlob
+ } from "@/api/common"
+ import {
+ mapGetters
+ } from "vuex"
+ import {
+ getToken
+ } from '@/util/auth'
+ import {
+ downloadXls,
+ findParentOrCur,
+ } from "@/util/util"
+ import {
+ dateNow
+ } from "@/util/date"
+ import NProgress from 'nprogress'
+ import 'nprogress/nprogress.css'
+ import Qs from "qs"
+ import {
+ lintOnSave
+ } from "../../../vue.config"
+
+ export default {
+ data() {
+ let isCardId = function(rule, value, callback) {
+ // 15位和18位身份证号码的正则表达式
+ var regIdCard =
+ /^(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[Xx])$)$/
+
+ // 如果通过该验证,说明身份证格式正确,但准确性还需计算
+ if (regIdCard.test(value) || value == '') {
+ if (value.length == 18) {
+ var idCardWi = new Array(7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10,
+ 5, 8, 4, 2) // 将前17位加权因子保存在数组里
+ var idCardY = new Array(1, 0, 10, 9, 8, 7, 6, 5, 4, 3, 2) // 这是除以11后,可能产生的11位余数、验证码,也保存成数组
+ var idCardWiSum = 0 // 用来保存前17位各自乖以加权因子后的总和
+ for (var i = 0; i < 17; i++) {
+ idCardWiSum += value.substring(i, i + 1) * idCardWi[i]
+ }
+
+ var idCardMod = idCardWiSum % 11 // 计算出校验码所在数组的位置
+ var idCardLast = value.substring(17) // 得到最后一位身份证号码
+
+ // 如果等于2,则说明校验码是10,身份证号码最后一位应该是X
+ if (idCardMod == 2) {
+ if (idCardLast == "X" || idCardLast == "x") {
+ callback()
+ } else {
+ callback(new Error("身份证号格式有误!"))
+ }
+ } else {
+ // 用计算出的验证码与最后一位身份证号码匹配,如果一致,说明通过,否则是无效的身份证号码
+ if (idCardLast == idCardY[idCardMod]) {
+ callback()
+ } else {
+ callback(new Error("身份证号格式有误!"))
+ }
+ }
+ } else {
+ callback()
+ }
+ } else {
+ //alert("身份证格式不正确!");
+ callback(new Error("身份证号格式有误!"))
+ }
+
+ callback()
+ }
+
+ //手机号格式校验
+ let validatorPhone = function(rule, value, callback) {
+ if (value) {
+ if (!/^1[3456789]\d{9}$/.test(value)) {
+ callback(new Error('手机号格式有误!'))
+ } else {
+ callback()
+ }
+ }
+ callback()
+ }
+
+ return {
+ labelData: [],
+ form: {},
+ search: {},
+ excelBox: false,
+ selectionList: [],
+ labelFlag: false,
+ editLabelFlge: false,
+ query: {
+ relationship: 1
+ },
+ loading: true,
+ page: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0
+ },
+ option: {
+ labelWidth: 144,
+ searchLabelWidth: 96,
+ searchShow: true,
+ searchMenuSpan: 3,
+ menuWidth: 280,
+
+ height: 'auto',
+ calcHeight: 80,
+ tip: false,
+ border: true,
+ index: true,
+ selection: true,
+ viewBtn: true,
+ addBtn: true,
+ dialogType: 'drawer',
+ dialogClickModal: false,
+ menuFixed: 'right',
+ column: [
+
+ {
+ width: 110,
+ label: "姓名",
+ prop: "name",
+ searchSpan: 3,
+ searchLabelWidth: 46,
+ search: true,
+ rules: [{
+ required: true,
+ message: "请输入姓名",
+ trigger: "blur",
+ }],
+ },
+
+ {
+ hide: true,
+ label: "证件类型",
+ prop: "cardType",
+ type: "select",
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=cardType",
+ dataType: "number",
+ props: {
+ label: "dictValue",
+ value: "dictKey",
+ },
+ },
+
+ {
+ width: 160,
+ display: true,
+ label: "身份证号",
+ prop: "idCard",
+ search: true,
+ searchSpan: 4,
+ slot: true,
+ rules: [{
+ validator: isCardId,
+ trigger: 'blur'
+ }],
+ },
+
+ {
+ hide: true,
+ display: false,
+ width: 160,
+ label: "证件号码",
+ prop: "cardNo",
+ },
+
+ {
+ label: "出生日期",
+ prop: "birthday",
+ type: "date",
+ format: "yyyy-MM-dd",
+ valueFormat: "yyyy-MM-dd",
+ hide: true,
+ },
+
+
+ {
+ width: 60,
+ label: "性别",
+ prop: "gender",
+ type: "select",
+ dicData: [{
+ label: "男",
+ value: 1
+ },
+ {
+ label: "女",
+ value: 0
+ },
+ {
+ label: "未知",
+ value: "3"
+ }
+ ],
+ },
+
+ {
+ width: 120,
+ label: "手机号码",
+ prop: "phoneNumber",
+ search: true,
+ searchSpan: 4,
+ slot: true,
+ rules: [{
+ required: true,
+ message: "请输入手机号码",
+ trigger: "blur",
+ },
+ {
+ validator: validatorPhone,
+ trigger: 'blur'
+ }
+ ],
+ },
+
+ {
+ label: "居住情况",
+ prop: "residentialStatus",
+ type: "select",
+ hide: true,
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=residentialStatusType",
+ dataType: "number",
+ props: {
+ label: "dictValue",
+ value: "dictKey",
+ },
+ },
+
+ {
+ label: "其他联系方式",
+ prop: "otherContact",
+ hide: true,
+ rules: [{
+ validator: validatorPhone,
+ trigger: 'blur'
+ }],
+ },
+
+ {
+ label: "是否主要联系人",
+ prop: "isPrimaryContact",
+ type: "select",
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=primaryContactType",
+ dataType: "number",
+ hide: true,
+ props: {
+ label: "dictValue",
+ value: "dictKey",
+ },
+ },
+ {
+ label: "与业主关系",
+ prop: "relationship",
+ type: "select",
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=roleRelation",
+ dataType: "number",
+ // hide: true,
+ width: 100,
+ props: {
+ label: "dictValue",
+ value: "dictKey",
+ },
+ rules: [{
+ required: true,
+ message: "请选择与业主关系",
+ trigger: "blur",
+ }],
+ },
+ {
+ label: "民族",
+ prop: "ethnicity",
+ type: "select",
+ // hide: true,
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=nationType",
+ dataType: "number",
+ props: {
+ label: "dictValue",
+ value: "dictKey",
+ },
+ },
+ {
+ width: 110,
+ label: "所属街道",
+ addDisplay: false,
+ editDisplay: false,
+ viewDisplay: false,
+ prop: "townStreetName",
+ search: true,
+ searchSpan: 4
+ },
+ {
+ width: 156,
+ overHidden: true,
+ label: "所属社区",
+ addDisplay: false,
+ editDisplay: false,
+ viewDisplay: false,
+ prop: "neiName",
+ search: true,
+ searchSpan: 4
+ },
+ {
+ width: 110,
+ overHidden: true,
+ label: "所属网格",
+ addDisplay: false,
+ editDisplay: false,
+ viewDisplay: false,
+ prop: "gridName",
+ },
+
+ {
+ width: 220,
+ overHidden: true,
+ label: '小区名称',
+ prop: "aoiName",
+ search: true,
+ searchSpan: 4,
+ display: false
+ },
+ {
+ hide: true,
+ parent: false,
+ width: 160,
+ label: "籍贯地区",
+ prop: "nativePlaceAdcode",
+ type: "tree",
+ typeformat(item, label, value) {
+ return item.addressDetail
+ },
+ change: ({
+ value,
+ column,
+ item,
+ dic
+ }) => {
+ item.addressDetail = findParentOrCur(dic, item.id)
+ },
+ props: {
+ label: 'name',
+ value: 'id'
+ },
+ dicUrl: `/api/blade-system/region/getBaseTree`,
+ },
+
+ {
+ hide: true,
+ label: "户籍类型",
+ prop: "residentType",
+ type: "select",
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=residentType",
+ dataType: "number",
+ props: {
+ label: "dictValue",
+ value: "dictKey",
+ },
+ },
+
+ {
+ hide: true,
+ parent: false,
+ width: 160,
+ label: "户籍地区",
+ prop: "residentAdcode",
+ type: "tree",
+ typeformat(item, label, value) {
+ return item.addressDetail
+ },
+ change: ({
+ value,
+ column,
+ item,
+ dic
+ }) => {
+ item.addressDetail = findParentOrCur(dic, item.id)
+ },
+ props: {
+ label: 'name',
+ value: 'id'
+ },
+ dicUrl: `/api/blade-system/region/getBaseTree`,
+ },
+
+ {
+ label: "户籍地址",
+ prop: "hukouRegistration",
+ hide: true,
+ },
+
+ {
+ disabled: false,
+ label: "居住地区",
+ prop: "homeAdcode",
+ hide: true,
+ type: 'select',
+ props: {
+ label: 'name',
+ value: 'code'
+ },
+ dicUrl: `/api/blade-system/region/select?code=361102`,
+ },
+
+ {
+ disabled: false,
+ label: "现居住地",
+ prop: "currentAddress",
+ minWidth: 150,
+ overHidden: true
+ // hide: true,
+ },
+ {
+ minWidth: 180,
+ overHidden: true,
+ label: "标签",
+ prop: "householdLabelList",
+ display: false,
+ overHidden: true
+ },
+ {
+ label: "学历",
+ prop: "education",
+ type: "select",
+ hide: true,
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=educationType",
+ dataType: "number",
+ props: {
+ label: "dictValue",
+ value: "dictKey",
+ },
+ },
+
+ {
+ hide: true,
+ width: 160,
+ label: "职业类别",
+ prop: "occupation"
+ },
+
+ {
+ label: "工作单位",
+ prop: "employer",
+ hide: true,
+ },
+
+ {
+ hide: true,
+ width: 160,
+ label: "工作单位地址",
+ prop: "cmpyRegAddr"
+ },
+
+ {
+ label: "工作状态",
+ prop: "workStatus",
+ type: "select",
+ hide: true,
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=workStatusType",
+ dataType: "number",
+ props: {
+ label: "dictValue",
+ value: "dictKey",
+ },
+ },
+
+ {
+ label: "婚姻状态",
+ prop: "maritalStatus",
+ type: "select",
+ hide: true,
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=marriageStatusType",
+ dataType: "number",
+ props: {
+ label: "dictValue",
+ value: "dictKey",
+ },
+ },
+
+ {
+ hide: true,
+ width: 160,
+ label: "宗教信仰",
+ prop: "religiousBelief",
+ },
+
+ {
+ hide: true,
+ label: "健康状态",
+ prop: "healthStatus",
+ type: "select",
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=healthStatus",
+ dataType: "number",
+ props: {
+ label: "dictValue",
+ value: "dictKey",
+ },
+ },
+
+ {
+ disabled: true,
+ hide: true,
+ width: 160,
+ label: "疾病名称",
+ prop: "diseaseName"
+ },
+
+ {
+ hide: true,
+ width: 160,
+ label: "外出去向",
+ prop: "goOutWhere"
+ },
+
+ {
+ hide: true,
+ width: 160,
+ label: "外出原因",
+ prop: "goOutReason"
+ },
+
+ {
+ hide: true,
+ label: "外出时间",
+ prop: "goOutTime",
+ type: "date",
+ format: "yyyy-MM-dd",
+ valueFormat: "yyyy-MM-dd",
+ width: 160,
+ },
+
+ {
+ hide: true,
+ width: 160,
+ label: "外出详址",
+ prop: "goOutAddr"
+ },
+
+ {
+ label: "车牌号",
+ prop: "cardNumber",
+ hide: true,
+ },
+ {
+ label: "自愿者组织",
+ prop: "volunteerOrg",
+ hide: true,
+ },
+
+ {
+ label: "备注",
+ prop: "remark",
+ hide: true,
+ },
+ ]
+ },
+ data: [],
+
+ excelForm: {},
+ labelForm: {},
+ labelOption: {
+ submitBtn: false,
+ emptyBtn: false,
+ column: [{
+ label: '级别',
+ prop: 'color',
+ type: 'radio',
+ button: true,
+ row: true,
+ dicData: [{
+ label: '撤销',
+ value: '#999'
+ }, {
+ label: '绿',
+ value: 'green'
+ }, {
+ label: '黄',
+ value: 'yellow'
+ }, {
+ label: '红',
+ value: 'red'
+ }],
+ rules: [{
+ required: true,
+ message: "请选择",
+ trigger: "blur"
+ }]
+ }, {
+ row: true,
+ label: '备注',
+ prop: 'remark',
+ type: 'input'
+ }]
+ },
+ excelOption: {
+ submitBtn: false,
+ emptyBtn: false,
+ column: [{
+ label: '模板上传',
+ prop: 'excelFile',
+ type: 'upload',
+ drag: true,
+ loadText: '模板上传中,请稍等',
+ span: 24,
+ propsHttp: {
+ res: 'data'
+ },
+ tip: '请上传 .xls,.xlsx 标准格式文件',
+ action: "/api/blade-household/household/import-household"
+ },
+ {
+ label: "数据覆盖",
+ prop: "isCovered",
+ type: "switch",
+ align: "center",
+ width: 80,
+ dicData: [{
+ label: "否",
+ value: 0
+ },
+ {
+ label: "是",
+ value: 1
+ }
+ ],
+ value: 0,
+ slot: true,
+ rules: [{
+ required: true,
+ message: "请选择是否覆盖",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: '模板下载',
+ prop: 'excelTemplate',
+ formslot: true,
+ span: 24,
+ }
+ ]
+ },
+ currentLabel: {},
+ currentRow: {},
+ householdLabelList: [],
+ }
+ },
+ watch: {
+ 'form.source': {
+ handler(newData) {
+ let currentAddressColumn = this.findObject(
+ this.option.column,
+ 'currentAddress'
+ )
+
+ let homeAdcodeColumn = this.findObject(
+ this.option.column,
+ 'homeAdcode'
+ )
+
+ if (newData == 1) {
+ currentAddressColumn.disabled = true
+ homeAdcodeColumn.disabled = true
+ } else {
+ currentAddressColumn.disabled = false
+ homeAdcodeColumn.disabled = false
+ }
+ },
+ },
+ 'form.cardType': {
+ handler(newData) {
+ let idCardColumn = this.findObject(
+ this.option.column,
+ 'idCard'
+ )
+
+ let cardNoColumn = this.findObject(
+ this.option.column,
+ 'cardNo'
+ )
+
+ if (newData == 111) {
+ idCardColumn.display = true
+ cardNoColumn.display = false
+ } else {
+ idCardColumn.display = false
+ cardNoColumn.display = true
+ }
+ },
+ },
+ 'form.healthStatus': {
+ handler(newData) {
+ let diseaseNameColumn = this.findObject(
+ this.option.column,
+ 'diseaseName'
+ )
+
+ if (newData == 3) {
+ diseaseNameColumn.disabled = false
+ } else {
+ diseaseNameColumn.disabled = true
+ }
+ }
+ },
+ 'excelForm.isCovered'() {
+ if (this.excelForm.isCovered !== '') {
+ const column = this.findObject(this.excelOption.column, "excelFile")
+ column.action = `/api/blade-household/household/import-household?isCovered=${this.excelForm.isCovered}`
+ }
+ }
+ },
+ computed: {
+ ...mapGetters(["userInfo", "permission"]),
+ permissionList() {
+ console.log("permission===>", this.permission)
+ return {
+ addBtn: this.vaildData(this.permission.household_add, false),
+ viewBtn: this.vaildData(this.permission.household_view, true),
+ delBtn: this.vaildData(this.permission.household_delete, true),
+ editBtn: this.vaildData(this.permission.household_edit, true),
+ // tagBtn: this.vaildData(this.permission.household_manager, true)
+ }
+ },
+
+ textDispose() {
+ return (row, flag, type) => {
+ if (row[flag] || row[type] == null) {
+ return row[type]
+ } else {
+ if (type == 'idCard') {
+ return row[type].replace(/^(.{6})(?:\d+)(.{4})$/, "$1******$2")
+ } else {
+ return row[type].replace(/^(.{3})(?:\d+)(.{4})$/, "$1****$2")
+ }
+ }
+ }
+ },
+
+ labelDispose() {
+ return (list) => {
+ return list.map(item => item.labelName).join(',')
+ }
+ },
+
+ getColor() {
+ return (data) => {
+ return setLabelColor(data)
+ }
+ },
+ ids() {
+ let ids = []
+ this.selectionList.forEach(ele => {
+ ids.push(ele.id)
+ })
+ return ids.join(",")
+ },
+ },
+ mounted() {},
+ methods: {
+ onsubmit() {
+ if (this.labelForm.color === '#999') {
+ let params = {
+ householdId: this.currentRow.id,
+ labelId: this.currentLabel.id,
+ // userId: this.currentLabel.id
+ }
+ removeHouseholdLabel(params).then(res => {
+ this.onLoad(this.page)
+
+ this.$message({
+ type: "success",
+ message: "操作成功!"
+ })
+ this.editLabelFlge = false
+ this.manageLabel(this.currentRow)
+ this.loading = false
+ })
+ } else {
+ this.labelForm.houseCode = this.currentRow.houseCode
+ this.labelForm.householdId = this.currentRow.id
+ this.labelForm.labelId = this.currentLabel.id
+ this.labelForm.userId = this.currentRow.associatedUserId
+ this.labelForm.lableType = 1
+
+ saveOrUpdateHouseholdLabel(this.labelForm).then(res => {
+ this.onLoad(this.page)
+
+ this.$message({
+ type: "success",
+ message: "操作成功!"
+ })
+ this.editLabelFlge = false
+ this.manageLabel(this.currentRow)
+ this.loading = false
+ })
+ }
+ },
+
+ changLabel(item) {
+ this.editLabelFlge = true
+ this.currentLabel = item
+ this.labelForm.color = item.color
+ this.labelForm.remark = item.remark
+ },
+
+ manageLabel(item) {
+ this.loading = true
+ this.currentRow = item
+ this.labelFlag = true
+ let params = {
+ parentId: 1000
+ }
+ // 查询标签
+ getLabelList(Object.assign(params)).then(res => {
+ const data = res.data.data
+ // this.labelData = data;
+ // 查询详情
+ getDetatils(item.id).then(res => {
+ this.householdLabelList = res.data.data.householdLabelList
+ console.log("===>", this.householdLabelList);
+ // 将细类放到一起
+ data.forEach(e => {
+ e.children.forEach(f => {
+ if (this.householdLabelList.length > 0) {
+ if (f.children.length) {
+ f.children.forEach(k => {
+ this.householdLabelList.forEach(h => {
+ if (Number(k.id) == h.labelId) {
+ k['color'] = h.color
+ k['remark'] = h.remark
+ }
+ })
+ })
+ } else {
+ this.householdLabelList.forEach(h => {
+ if (Number(f.id) == h.labelId) {
+ f['color'] = h.color
+ f['remark'] = h.remark
+ }
+ })
+ }
+
+ }
+ })
+ })
+ this.labelData = data
+ this.loading = false
+ })
+ })
+ },
+ rowSave(row, done, loading) {
+ add(row).then(() => {
+ this.initFlag = false
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!"
+ })
+ done()
+ }, error => {
+ window.console.log(error)
+ loading()
+ })
+ },
+ rowUpdate(row, index, done, loading) {
+ update(row).then(() => {
+ this.initFlag = false
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!"
+ })
+ done()
+ }, error => {
+ window.console.log(error)
+ loading()
+ })
+ },
+ rowDel(row) {
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning"
+ })
+ .then(() => {
+ return remove(row.id)
+ })
+ .then(() => {
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!"
+ })
+ })
+ },
+ searchReset() {
+ this.query = {}
+ this.treeDeptId = ''
+ this.onLoad(this.page)
+ },
+ searchChange(params, done) {
+ this.query = params
+ this.page.currentPage = 1
+ params.relationship = 1
+ this.onLoad(this.page, params)
+ done()
+ },
+ selectionChange(list) {
+ this.selectionList = list
+ },
+ selectionClear() {
+ this.selectionList = []
+ // this.$refs.crud.toggleSelection();
+ },
+ handleDelete() {
+ if (this.selectionList.length === 0) {
+ this.$message.warning("请选择至少一条数据")
+ return
+ }
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning"
+ })
+ .then(() => {
+ return remove(this.ids)
+ })
+ .then(() => {
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!"
+ })
+ this.$refs.crud.toggleSelection()
+ })
+ },
+ handleImport() {
+ this.excelBox = true
+ },
+ uploadAfter(res, done, loading, column) {
+ this.excelBox = false
+ this.onLoad(this.page)
+ this.$alert(res)
+ this.$refs.crud.toggleSelection()
+ done()
+ },
+ handleExport() {
+ this.$confirm("是否导出住户数据?", "提示", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning"
+ }).then(() => {
+ NProgress.start()
+ var data = {
+ ...this.query
+ }
+ data = Qs.stringify(data)
+ exportBlob(
+ `/api/blade-household/household/export-household?${this.website.tokenHeader}=${getToken()}&` + data
+ ).then(res => {
+ downloadXls(res.data, `住户数据表${dateNow()}.xlsx`)
+ NProgress.done()
+ })
+ })
+ },
+ handleTemplate() {
+ exportBlob(`/api/blade-household/household/export-template?${this.website.tokenHeader}=${getToken()}`).then(
+ res => {
+ downloadXls(res.data, "住户数据模板.xlsx")
+ })
+ },
+ beforeOpen(done, type) {
+ if (["edit", "view"].includes(type)) {
+ getDetatils(this.form.id).then(res => {
+ this.form = res.data.data
+ done()
+ })
+ }
+ this.initFlag = true
+ },
+ currentChange(currentPage) {
+ this.page.currentPage = currentPage
+ },
+ sizeChange(pageSize) {
+ this.page.pageSize = pageSize
+ },
+ refreshChange() {
+ this.onLoad(this.page, this.query)
+ },
+
+ onLoad(page, params = {}) {
+ this.loading = true
+
+ getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+ const data = {
+ ...res.data.data,
+ records: res.data.data.records.map(item => {
+ return {
+ ...item,
+ 'phoneNumberflag': false,
+ 'idCardflag': false
+ }
+ })
+ }
+
+ this.page.total = data.total
+ this.data = data.records
+ this.loading = false
+ this.selectionClear()
+ })
+ },
+
+ showStringDispose(row, type) {
+ row[type] = !row[type]
+ }
+ }
+ }
+</script>
+
+<style lang="scss" scoped>
+ .box {
+ height: 800px;
+ }
+
+ .grid-container2 {
+ /* display: grid;
+ grid-template-columns: auto auto auto auto;
+ grid-gap: 10px; */
+ display: flex;
+ flex-wrap: wrap;
+ padding-bottom: 20px;
+ }
+
+ .grid-item {
+ padding: 8px 14px;
+ border: 1px solid #dcdfe6;
+ margin-right: 10px;
+ margin-bottom: 10px;
+ border-radius: 20px;
+ }
+
+ .grid-item:hover {
+ background-color: #e8f4ff;
+ color: #017BFC;
+ cursor: pointer;
+ }
+
+ .el-scrollbar {
+ height: 100%;
+ }
+
+ .box .el-scrollbar__wrap {
+ overflow: scroll;
+ }
+
+ :deep(.el-form-item__content) {
+ text-align: left !important;
+ }
+
+ :deep(.avue-form__menu--center .el-button) {
+ margin: 0 5px 0 0;
+ }
+</style>
\ No newline at end of file
diff --git a/src/views/street/index.vue b/src/views/street/index.vue
new file mode 100644
index 0000000..9bee2af
--- /dev/null
+++ b/src/views/street/index.vue
@@ -0,0 +1,1133 @@
+<template>
+ <basic-container>
+ <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" ref="crud" @row-del="rowDel"
+ v-model="form" :permission="permissionList" @row-update="rowUpdate" @row-save="rowSave" :before-open="beforeOpen"
+ @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"
+ @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
+
+ <template slot="menuLeft">
+ <el-button type="danger" size="small" plain icon="el-icon-delete" v-if="permission.place_delete"
+ @click="handleDelete">删 除
+ </el-button>
+ <el-button type="success" size="small" plain v-if="permission.place_import" icon="el-icon-upload2"
+ @click="handleImport">导入
+ </el-button>
+ <el-button type="warning" size="small" plain v-if="permission.place_export" icon="el-icon-download"
+ @click="handleExport">导出
+ </el-button>
+
+ <el-button type="success" size="small" plain v-if="permission.place_import" icon="el-icon-upload2"
+ @click="handlePractitionerImport">从业人员导入
+ </el-button>
+
+ </template>
+ <template slot-scope="{row}" slot="location">
+ <span v-text="showLocation(row.location)"></span>
+ </template>
+
+ <template slot-scope="{row}" slot="lng">
+ <span v-text="decimalProcessing(row.lng)"></span>
+ </template>
+
+ <template slot-scope="{row}" slot="lat">
+ <span v-text="decimalProcessing(row.lat)"></span>
+ </template>
+
+ <template slot-scope="{row, size}" slot="confirmFlag">
+ <el-tag :size="size" :type="showConfirmFlag(row.confirmFlag).type">{{
+ showConfirmFlag(row.confirmFlag).text
+ }}</el-tag>
+ </template>
+
+ <template slot-scope="{row, size}" slot="source">
+ <el-tag :size="size" :type="showSource(row.source).type">{{ showSource(row.source).text
+ }}</el-tag>
+ </template>
+
+ <template slot-scope="{row, size}" slot="menu">
+ <el-button :size="size" type="text" icon="el-icon-s-check" v-if="permission.place_audit_cur"
+ @click="auditCur({ ...row, confirmFlag: 1 })">审核
+ </el-button>
+
+ <el-button :size="size" type="text" icon="el-icon-edit" v-if="permission.place_manage_tenants"
+ @click="ManageTenants(row)">场所维护
+ </el-button>
+ </template>
+
+ <template slot-scope="{row, size}" slot="principalPhone">
+ <el-button :size="size" type="text" @click="showStringDispose(row, 'principalPhoneflag')"
+ v-text="textDispose(row, 'principalPhoneflag', 'principalPhone')">
+ </el-button>
+ </template>
+ <template slot-scope="{row, size}" slot="principalIdCard">
+ <el-button :size="size" type="text" @click="showStringDispose(row, 'principalIdCardflag')"
+ v-text="textDispose(row, 'principalIdCardflag', 'principalIdCard')">
+ </el-button>
+ </template>
+ </avue-crud>
+
+ <baseAllInfo ref="BaseAllInfo"></baseAllInfo>
+
+ <el-dialog class="place-info-box audit-info-box" title="审核" append-to-body :visible.sync="auditBasePopup"
+ width="30%">
+ <auditBase></auditBase>
+ </el-dialog>
+ <el-dialog title="场所数据导入" append-to-body :visible.sync="excelBox" width="555px">
+ <avue-form :option="excelOption" v-model="excelForm" :upload-after="uploadAfter">
+ <template slot="excelTemplate">
+ <el-button size="small" type="primary" @click="handleTemplate">
+ 点击下载<i class="el-icon-download el-icon--right"></i>
+ </el-button>
+ </template>
+ </avue-form>
+ </el-dialog>
+
+ <el-dialog title="从业人员数据导入" append-to-body :visible.sync="excelBoxPractitioner" width="555px">
+ <avue-form :option="excelPractitionerOption" v-model="excelPractitionerForm"
+ :upload-after="uploadPractitionerAfter">
+ <template slot="excelTemplate">
+ <el-button size="small" type="primary" @click="handlePractitionerTemplate">
+ 点击下载<i class="el-icon-download el-icon--right"></i>
+ </el-button>
+ </template>
+ </avue-form>
+ </el-dialog>
+ </basic-container>
+</template>
+
+<script>
+ import {
+ getList,
+ remove,
+ update,
+ add,
+ getPlace,
+ } from "@/api/place/place"
+
+ import {
+ mapGetters
+ } from "vuex"
+ import {
+ exportBlob
+ } from "@/api/common"
+
+ import {
+ getToken
+ } from '@/util/auth'
+ import {
+ downloadXls,
+ } from "@/util/util"
+ import {
+ dateNow
+ } from "@/util/date"
+ import NProgress from 'nprogress'
+ import 'nprogress/nprogress.css'
+ import Qs from "qs"
+ import website from '@/config/website'
+
+ import auditBase from './components/auditBase'
+ import baseAllInfo from './components/baseAllInfo'
+
+ export default {
+ data() {
+
+ //手机号格式校验
+ let validatorPhone = function(rule, value, callback) {
+ if (value) {
+ if (!/^1[3456789]\d{9}$/.test(value)) {
+ callback(new Error('手机号格式有误!'))
+ } else {
+ callback()
+ }
+ }
+ callback()
+ }
+
+ return {
+ excelPractitionerOption: {
+ submitBtn: false,
+ emptyBtn: false,
+ column: [{
+ label: '模板上传',
+ prop: 'excelFile',
+ type: 'upload',
+ drag: true,
+ loadText: '模板上传中,请稍等',
+ span: 24,
+ propsHttp: {
+ res: 'data'
+ },
+ tip: '请上传 .xls,.xlsx 标准格式文件',
+ action: "/api/blade-placePractitioner/placePractitioner/import-practitioner"
+ },
+ {
+ label: "数据覆盖",
+ prop: "isCovered",
+ type: "switch",
+ align: "center",
+ width: 80,
+ dicData: [{
+ label: "否",
+ value: 0
+ },
+ {
+ label: "是",
+ value: 1
+ }
+ ],
+ value: 0,
+ slot: true,
+ rules: [{
+ required: true,
+ message: "请选择是否覆盖",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: '模板下载',
+ prop: 'excelTemplate',
+ formslot: true,
+ span: 24,
+ }
+ ]
+ },
+ excelPractitionerForm: {},
+ excelOption: {
+ submitBtn: false,
+ emptyBtn: false,
+ column: [{
+ label: '模板上传',
+ prop: 'excelFile',
+ type: 'upload',
+ drag: true,
+ loadText: '模板上传中,请稍等',
+ span: 24,
+ propsHttp: {
+ res: 'data'
+ },
+ tip: '请上传 .xls,.xlsx 标准格式文件',
+ action: "/api/blade-place/place/import-place"
+ },
+ {
+ label: "数据覆盖",
+ prop: "isCovered",
+ type: "switch",
+ align: "center",
+ width: 80,
+ dicData: [{
+ label: "否",
+ value: 0
+ },
+ {
+ label: "是",
+ value: 1
+ }
+ ],
+ value: 0,
+ slot: true,
+ rules: [{
+ required: true,
+ message: "请选择是否覆盖",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: '模板下载',
+ prop: 'excelTemplate',
+ formslot: true,
+ span: 24,
+ }
+ ]
+ },
+ excelForm: {},
+ excelBox: false,
+ excelBoxPractitioner: false,
+ form: {},
+ query: {},
+ loading: true,
+
+ page: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0,
+ },
+ datetime: "",
+ selectionList: [],
+ option: {
+ labelWidth: 120,
+ searchLabelWidth: 96,
+ searchShow: true,
+ searchMenuSpan: 3,
+ menuWidth: 280,
+
+ height: "auto",
+ calcHeight: 54,
+ dialogWidth: 950,
+ tip: false,
+ border: true,
+ //stripe:true,
+ index: true,
+ viewBtn: true,
+ editBtn: false,
+ selection: true,
+ dialogClickModal: false,
+ menuFixed: 'right',
+ column: [{
+ width: 156,
+ overHidden: true,
+ label: "场所名称",
+ span: 12,
+ prop: "placeName",
+ searchSpan: 5,
+ search: true,
+ searchLabelWidth: 76,
+ rules: [{
+ required: true,
+ message: "请输入场所名称",
+ trigger: "blur",
+ }, ],
+ },
+ {
+ width: 110,
+ label: "场所负责人",
+ prop: "principal",
+ searchSpan: 5,
+ searchLabelWidth: 110,
+ search: true,
+ rules: [{
+ required: false,
+ message: "请输入负责人",
+ trigger: "blur",
+ }, ],
+ },
+ {
+ width: 120,
+ overHidden: true,
+ label: "手机号码",
+ prop: "principalPhone",
+ search: true,
+ searchSpan: 4,
+ slot: true,
+ rules: [{
+ validator: validatorPhone,
+ trigger: 'blur'
+ }],
+ },
+ {
+ width: 120,
+ overHidden: true,
+ label: "身份证号",
+ prop: "principalIdCard",
+ // search: true,
+ searchSpan: 4,
+ slot: true,
+ rules: [{
+ required: false,
+ message: "请输身份证号",
+ trigger: "blur",
+ }],
+ },
+ {
+ width: 110,
+ label: "所属街道",
+ addDisplay: false,
+ editDisplay: false,
+ viewDisplay: false,
+ prop: "townStreetName",
+ search: true,
+ searchSpan: 4
+ },
+ {
+ width: 156,
+ overHidden: true,
+ label: "所属社区",
+ addDisplay: false,
+ editDisplay: false,
+ viewDisplay: false,
+ prop: "neiName",
+ search: true,
+ searchSpan: 4,
+ rules: [{
+ required: true,
+ message: "请选择所属社区",
+ trigger: "blur",
+ }, ],
+ },
+ {
+ hide: true,
+ parent: false,
+ label: "所属社区",
+ prop: "neiCode",
+ search: false,
+ width: 150,
+ type: "tree",
+ dicUrl: "/api/blade-system/region/treeToCommunity",
+ props: {
+ label: "name",
+ value: "id",
+ },
+ cascader: ["gridCode"],
+ rules: [{
+ required: true,
+ message: "请选择所属社区",
+ trigger: "blur",
+ }, ],
+ },
+ {
+ width: 110,
+ overHidden: true,
+ label: "所属网格",
+ addDisplay: false,
+ editDisplay: false,
+ viewDisplay: false,
+ prop: "gridName",
+ rules: [{
+ required: true,
+ message: "请选择所属网格",
+ trigger: "blur",
+ }, ],
+ },
+ {
+ hide: true,
+ label: "所属网格",
+ prop: "gridCode",
+ type: "tree",
+ cell: true,
+ props: {
+ label: "gridName",
+ value: "gridCode",
+ },
+ dicUrl: "/api/blade-grid/grid/getGridList?communityCode={{neiCode}}",
+ rules: [{
+ required: true,
+ message: "请选择所属网格",
+ trigger: "blur",
+ }, ],
+ },
+ {
+ span: 7,
+ label: "场所标签",
+ prop: "label",
+ type: "select",
+ dicUrl: "/api/blade-category/category/getCategory?level=2",
+ cascader: ["smallLabel"],
+ props: {
+ label: "categoryName",
+ value: "categoryNo"
+ },
+ dataType: "string",
+ hide: true,
+ rules: [{
+ required: true,
+ message: "请输入场所标签",
+ trigger: "blur",
+ }, ],
+ },
+ {
+ span: 5,
+ label: "",
+ labelWidth: 20,
+ prop: "smallLabel",
+ type: "select",
+ dicUrl: "/api/blade-category/category/getCategory?parentNo={{label}}",
+ props: {
+ label: "categoryName",
+ value: "categoryNo"
+ },
+ dataType: "string",
+ hide: true,
+ },
+ {
+ span: 12,
+ label: "标签颜色",
+ prop: "color",
+ type: "select",
+ dicData: [{
+ label: '绿',
+ value: 'green'
+ }, {
+ label: '黄',
+ value: 'yellow'
+ }, {
+ label: '红',
+ value: 'red'
+ }],
+ props: {
+ label: "label",
+ value: "value"
+ },
+ hide: true,
+ },
+ {
+ span: 12,
+ label: "九小场所",
+ prop: "isNine",
+ type: "select",
+ dicData: [{
+ label: "是",
+ value: 1,
+ },
+ {
+ label: "否",
+ value: 2,
+ }
+ ],
+ hide: true,
+ rules: [{
+ required: true,
+ message: "请选择九小场所",
+ trigger: "blur",
+ }, ],
+ },
+ {
+ span: 12,
+ label: "九小分类",
+ prop: "nineType",
+ type: "select",
+ display: false,
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=nineType",
+ dataType: "number",
+ hide: true,
+ props: {
+ label: "dictValue",
+ value: "dictKey",
+ },
+ },
+ {
+ span: 12,
+ label: "阵地",
+ prop: "isFront",
+ type: "select",
+ dicData: [{
+ label: "是",
+ value: 1,
+ },
+ {
+ label: "否",
+ value: 2,
+ }
+ ],
+ hide: true,
+ rules: [{
+ required: true,
+ message: "请选择阵地",
+ trigger: "blur",
+ }, ],
+ },
+ {
+ span: 12,
+ label: "阵地类型",
+ prop: "frontType",
+ type: "select",
+ display: false,
+ row: true,
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=frontType",
+ dataType: "number",
+ hide: true,
+ props: {
+ label: "dictValue",
+ value: "dictKey",
+ },
+ },
+ {
+ span: 12,
+ label: "三级消防单位",
+ prop: "threeFireProtection",
+ labelWidth: 120,
+ type: "select",
+ dicData: [{
+ label: "是",
+ value: 1,
+ },
+ {
+ label: "否",
+ value: 2,
+ }
+ ],
+ hide: true,
+ rules: [{
+ required: false,
+ message: "请选择三级消防单位",
+ trigger: "blur",
+ }, ],
+ },
+ {
+ width: 110,
+ label: "场所照片",
+ prop: "imageUrls",
+ type: "upload",
+ listType: "picture-card",
+ dataType: "string",
+ multiple: true,
+ action: "/api/blade-resource/oss/endpoint/put-file",
+ propsHttp: {
+ res: "data",
+ name: 'name',
+ url: "link",
+ },
+ span: 24,
+ },
+ {
+ width: 156,
+ overHidden: true,
+ slot: true,
+ label: "地址",
+ prop: "location",
+ type: 'map',
+ dataType: "string",
+ minWidth: 250,
+ span: 24,
+ value: [117.966460, 28.431002, ""],
+ rules: [{
+ required: true,
+ message: "请选择地址",
+ trigger: "blur",
+ }, ],
+ },
+ {
+ label: "备注",
+ prop: "remark",
+ type: 'textarea',
+ hide: true,
+ span: 24,
+ rules: [{
+ required: false,
+ message: "请输入场所备注",
+ trigger: "blur",
+ }, ],
+ },
+ {
+ width: 96,
+ slot: true,
+ addDisplay: false,
+ editDisplay: false,
+ viewDisplay: false,
+ label: "经度",
+ hide: true,
+ prop: "lng",
+ },
+ {
+ width: 96,
+ slot: true,
+ addDisplay: false,
+ editDisplay: false,
+ viewDisplay: false,
+ label: "纬度",
+ hide: true,
+ prop: "lat",
+ },
+ {
+ width: 100,
+ addDisplay: false,
+ editDisplay: false,
+ viewDisplay: false,
+ label: '审核状态',
+ prop: 'confirmFlag',
+ type: 'radio',
+ slot: true,
+ dicData: [{
+ label: '待审核',
+ value: 1
+ }, {
+ label: '已审核',
+ value: 2
+ }, {
+ label: '未通过',
+ value: 3
+ }]
+ },
+ {
+ width: 120,
+ display: false,
+ label: '是否有二维码',
+ searchLabelWidth: 104,
+ prop: 'source',
+ type: "select",
+ search: true,
+ searchSpan: 5,
+ slot: true,
+ dicData: [{
+ label: '是',
+ value: 1
+ }, {
+ label: '否',
+ value: 2
+ }]
+ }
+ ],
+ },
+ data: [],
+
+ auditBasePopup: false,
+ }
+ },
+
+ provide() {
+ return {
+ placeElement: this,
+ }
+ },
+
+ components: {
+ auditBase,
+ baseAllInfo
+ },
+
+ watch: {
+ 'form.isNine': {
+ handler(newData) {
+ if (newData) {
+ let nineTypeColumn = this.findObject(
+ this.option.column,
+ 'nineType'
+ )
+
+ if (newData == 1) {
+ nineTypeColumn.display = true
+ } else {
+ nineTypeColumn.display = false
+ }
+ }
+ },
+ },
+ 'form.isFront': {
+ handler(newData) {
+ if (newData) {
+ let frontTypeColumn = this.findObject(
+ this.option.column,
+ 'frontType'
+ )
+
+ if (newData == 1) {
+ frontTypeColumn.display = true
+ } else {
+ frontTypeColumn.display = false
+ }
+ }
+ },
+ },
+ 'excelForm.isCovered'() {
+ if (this.excelForm.isCovered !== '') {
+ const column = this.findObject(this.excelOption.column, "excelFile")
+ column.action = `/api/blade-place/place/import-place?isCovered=${this.excelForm.isCovered}`
+ }
+ },
+
+ 'excelPractitionerForm.isCovered'() {
+ if (this.excelForm.isCovered !== '') {
+ const column = this.findObject(this.excelPractitionerForm.column, "excelFile")
+ column.action =
+ `/api/blade-placePractitioner/placePractitioner/import-practitioner?isCovered=${this.excelPractitionerForm.isCovered}`
+ }
+ }
+ },
+
+ computed: {
+ ...mapGetters(["permission", "userInfo"]),
+ permissionList() {
+ return {
+ addBtn: this.vaildData(this.permission.place_add, true),
+ viewBtn: this.vaildData(this.permission.place_view, true),
+ delBtn: this.vaildData(this.permission.place_delete, true),
+ editBtn: this.vaildData(this.permission.place_edit, true),
+ }
+ },
+ ids() {
+ let ids = []
+ this.selectionList.forEach((ele) => {
+ ids.push(ele.id)
+ })
+ return ids.join(",")
+ },
+
+ showConfirmFlag() {
+ return (data) => {
+ let tags = {
+ text: '',
+ type: ''
+ }
+ if (data == 1) {
+ tags = {
+ text: '待审核',
+ type: 'warning'
+ }
+ } else if (data == 2) {
+ tags = {
+ text: '已审核',
+ type: 'success'
+ }
+ } else if (data == 3) {
+ tags = {
+ text: '未通过',
+ type: 'danger'
+ }
+ } else if (data == 4) {
+ tags = {
+ text: '待完善',
+ type: 'info'
+ }
+ }
+
+ return tags
+ }
+ },
+
+ showSource() {
+ return (data) => {
+ let tags = {
+ text: '',
+ type: ''
+ }
+
+ if (data == 1) {
+ tags = {
+ text: '是',
+ type: 'success'
+ }
+ } else if (data == 2) {
+ tags = {
+ text: '否',
+ type: 'info'
+ }
+ }
+
+ return tags
+ }
+ },
+
+ showLocation() {
+ return (data) => {
+ if (data != null && data.indexOf(',') != -1) {
+ data = data.split(',')
+
+ return data[2]
+ } else {
+ return data || ''
+ }
+ }
+ },
+
+ decimalProcessing() {
+ return (data) => {
+ if (data != null) {
+ return Number(data).toFixed(6)
+ } else {
+ return ''
+ }
+ }
+ },
+
+ textDispose() {
+ return (row, flag, type) => {
+ if (row[flag] || row[type] == null) {
+ return row[type]
+ } else {
+ if (type == 'principalIdCard') {
+ return row[type].replace(/^(.{6})(?:\d+)(.{4})$/, "$1******$2")
+ } else {
+ return row[type].replace(/^(.{3})(?:\d+)(.{4})$/, "$1****$2")
+ }
+ }
+ }
+ }
+ },
+ methods: {
+ showStringDispose(row, type) {
+ row[type] = !row[type]
+ },
+
+ locationDispose(data) {
+ data = data.split(',')
+
+ return {
+ longitude: data[0],
+ latitude: data[1],
+ location: data[2]
+ }
+ },
+
+ auditCur(row) {
+ this.curAuditRow = row
+ this.auditBasePopup = true
+ },
+
+ ManageTenants(item) {
+ this.$refs.BaseAllInfo.initOpen(item)
+ },
+
+ rowSave(row, done, loading) {
+ if (row.imageUrls.length > 0) {
+ var urls = []
+ var split = row.imageUrls.split(",").filter(item => item != '')
+ split.forEach(url => {
+ var names = url.split("jczz/")
+ urls.push(names[1])
+ })
+ row.imageUrls = urls.join(",")
+ }
+
+ let label = row.label
+
+ if (row.smallLabel != '') {
+ label = label + ',' + row.smallLabel
+ }
+
+ delete row.smallLabel
+
+ add({
+ ...row,
+ label,
+ ...this.locationDispose(row.location)
+ }).then(
+ () => {
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ done()
+ },
+ (error) => {
+ window.console.log(error)
+ loading()
+ }
+ )
+ },
+
+ rowUpdate(row, index, done, loading) {
+ if (row.imageUrls.length > 0) {
+ var urls = []
+ var split = row.imageUrls.split(",").filter(item => item != '')
+ split.forEach(url => {
+ var names = url.split("jczz/")
+ urls.push(names[1])
+ })
+ row.imageUrls = urls.join(",")
+ }
+
+ let label = row.label
+
+ if (row.smallLabel != '') {
+ label = label + ',' + row.smallLabel
+ }
+
+ delete row.smallLabel
+
+ update({
+ ...row,
+ label,
+ ...this.locationDispose(row.location)
+ }).then(
+ () => {
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ done()
+ },
+ (error) => {
+ window.console.log(error)
+ loading()
+ }
+ )
+ },
+
+ rowDel(row) {
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ return remove(row.id)
+ })
+ .then(() => {
+ this.onLoad(this.page)
+
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ })
+ },
+
+ searchReset() {
+ this.query = {}
+ this.onLoad(this.page)
+ },
+ searchChange(params, done) {
+ this.query = params
+ this.page.currentPage = 1
+ this.onLoad(this.page, params)
+ done()
+ },
+ selectionChange(list) {
+ this.selectionList = list
+ },
+ selectionClear() {
+ this.selectionList = []
+ this.$nextTick(() => {
+ this.$refs.crud && this.$refs.crud.toggleSelection()
+ })
+ },
+
+ handlePractitionerImport() {
+ this.excelBoxPractitioner = true
+ },
+ handleImport() {
+ this.excelBox = true
+ },
+ uploadAfter(res, done, loading, column) {
+ this.excelBox = false
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: res
+ })
+ this.$refs.crud.toggleSelection()
+ done()
+ },
+ uploadPractitionerAfter(res, done, loading, column) {
+ this.excelBoxPractitioner = false
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: res
+ })
+ this.$refs.crud.toggleSelection()
+ done()
+ },
+ handleExport() {
+ this.$confirm("是否导出场所数据?", "提示", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning"
+ }).then(() => {
+ NProgress.start()
+ var data = {
+ ...this.query
+ }
+ data = Qs.stringify(data)
+ exportBlob(
+ `/api/blade-place/place/export-place?${this.website.tokenHeader}=${getToken()}&` + data
+ ).then(res => {
+ downloadXls(res.data, `场所数据表${dateNow()}.xlsx`)
+ NProgress.done()
+ })
+ })
+ },
+ handleTemplate() {
+ exportBlob(`/api/blade-place/place/export-template?${this.website.tokenHeader}=${getToken()}`).then(res => {
+ downloadXls(res.data, "场所数据模板.xlsx")
+ })
+ },
+ handlePractitionerTemplate() {
+ exportBlob(
+ `/api/blade-placePractitioner/placePractitioner/export-practitioner-template?${this.website.tokenHeader}=${getToken()}`
+ )
+ .then(res => {
+ downloadXls(res.data, "从业人员数据模板.xlsx")
+ })
+ },
+ handleDelete() {
+ if (this.selectionList.length === 0) {
+ this.$message.warning("请选择至少一条数据")
+ return
+ }
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ return remove(this.ids)
+ })
+ .then(() => {
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ this.$refs.crud.toggleSelection()
+ })
+ },
+
+ beforeOpen(done, type) {
+ if (["edit", "view"].includes(type)) {
+ getPlace(this.form.id).then((res) => {
+ this.form = res.data.data
+
+ this.form.location = [this.form.lng, this.form.lat, this.form.location].join(',')
+
+ if (this.form.imageUrls.length) {
+ this.form.imageUrls = this.form.imageUrls.split(",").filter(item => item != '').map(item => website
+ .minioUrl + item).join(',')
+ }
+
+ if (this.form.placePoiLabelVOList.length) {
+ let lebelTwo = this.form.placePoiLabelVOList.find(item => {
+ return item.type == 2
+ })
+
+ if (lebelTwo) this.form.label = String(lebelTwo.poiCode)
+
+ let lebelThree = this.form.placePoiLabelVOList.find(item => {
+ return item.type == 3
+ })
+
+ if (lebelThree) this.form.smallLabel = String(lebelThree.poiCode)
+ }
+
+ done()
+ })
+ } else {
+ done()
+ }
+ },
+
+ currentChange(currentPage) {
+ this.page.currentPage = currentPage
+ },
+ sizeChange(pageSize) {
+ this.page.pageSize = pageSize
+ },
+ refreshChange() {
+ this.onLoad(this.page, this.query)
+ },
+ onLoad(page, params = {}) {
+ this.loading = true
+
+ getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then((res) => {
+ const data = res.data.data
+
+ this.page.total = data.total
+
+ this.data = data.records
+
+ this.data.forEach(item => {
+ this.$set(item, 'principalPhoneflag', false)
+ this.$set(item, 'principalIdCardflag', false)
+ if (item.imageUrls && item.imageUrls != '' && item.imageUrls != null && item.imageUrls.length) {
+ var urls = []
+ var names = item.imageUrls.split(",").filter(item => item != '')
+ names.forEach(name => {
+ urls.push(website.minioUrl + name)
+ })
+ item.imageUrls = urls.join(",")
+ }
+ })
+
+ this.loading = false
+ this.selectionClear()
+ })
+ }
+ }
+ }
+</script>
+
+<style>
+ .avue-upload__icon {
+ line-height: 6;
+ }
+</style>
\ No newline at end of file
diff --git a/src/views/system/menu.vue b/src/views/system/menu.vue
index 9aa0472..590c750 100644
--- a/src/views/system/menu.vue
+++ b/src/views/system/menu.vue
@@ -1,455 +1,456 @@
<template>
- <basic-container>
- <avue-crud :option="option" :table-loading="loading" :data="data" ref="crud" v-model="form"
- :permission="permissionList" :before-open="beforeOpen" :before-close="beforeClose" @row-del="rowDel"
- @row-update="rowUpdate" @row-save="rowSave" @search-change="searchChange" @search-reset="searchReset"
- @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
- @refresh-change="refreshChange" @on-load="onLoad" @tree-load="treeLoad">
- <template slot="menuLeft">
- <el-button type="danger" size="small" icon="el-icon-delete" v-if="permission.menu_delete" plain
- @click="handleDelete">删 除
- </el-button>
- </template>
- <template slot-scope="scope" slot="menu">
- <el-button type="text" icon="el-icon-circle-plus-outline" size="small"
- @click.stop="handleAdd(scope.row, scope.index)"
- v-if="userInfo.role_name.includes('admin') && scope.row.category === 1">新增子项
- </el-button>
- </template>
- <template slot-scope="{row}" slot="source">
- <div style="text-align:center">
- <i :class="row.source" />
- </div>
- </template>
- </avue-crud>
- </basic-container>
+ <basic-container>
+ <avue-crud :option="option" :table-loading="loading" :data="data" ref="crud" v-model="form"
+ :permission="permissionList" :before-open="beforeOpen" :before-close="beforeClose" @row-del="rowDel"
+ @row-update="rowUpdate" @row-save="rowSave" @search-change="searchChange" @search-reset="searchReset"
+ @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
+ @refresh-change="refreshChange" @on-load="onLoad" @tree-load="treeLoad">
+ <template slot="menuLeft">
+ <el-button type="danger" size="small" icon="el-icon-delete" v-if="permission.menu_delete" plain
+ @click="handleDelete">删 除
+ </el-button>
+ </template>
+ <template slot-scope="scope" slot="menu">
+ <el-button type="text" icon="el-icon-circle-plus-outline" size="small"
+ @click.stop="handleAdd(scope.row, scope.index)"
+ v-if="userInfo.role_name.includes('admin') && scope.row.category === 1">新增子项
+ </el-button>
+ </template>
+ <template slot-scope="{row}" slot="source">
+ <div style="text-align:center">
+ <i :class="row.source" />
+ </div>
+ </template>
+ </avue-crud>
+ </basic-container>
</template>
<script>
-import {
+ import {
getLazyList,
remove,
update,
add,
getMenu
-} from "@/api/system/menu"
-import {
+ } from "@/api/system/menu"
+ import {
mapGetters
-} from "vuex"
-import iconList from "@/config/iconList"
-import func from "@/util/func"
-import {
+ } from "vuex"
+ import iconList from "@/config/iconList"
+ import func from "@/util/func"
+ import {
getMenuTree
-} from "@/api/system/menu"
+ } from "@/api/system/menu"
-import {
+ import {
getTreeList
-} from "@/api/label/label"
+ } from "@/api/label/label"
-export default {
- data () {
- return {
- form: {},
- query: {},
- loading: true,
- selectionList: [],
- parentId: 0,
- page: {
- pageSize: 10,
- currentPage: 1,
- total: 0,
+ export default {
+ data() {
+ return {
+ form: {},
+ query: {},
+ loading: true,
+ selectionList: [],
+ parentId: 0,
+ page: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0,
+ },
+ option: {
+ lazy: true,
+ tip: false,
+ simplePage: true,
+ searchShow: true,
+ searchMenuSpan: 6,
+ dialogWidth: "60%",
+ tree: true,
+ border: true,
+ index: true,
+ selection: true,
+ viewBtn: true,
+ menuWidth: 300,
+ dialogClickModal: false,
+ column: [{
+ width: 276,
+ label: "菜单名称",
+ prop: "name",
+ search: true,
+ searchLabelWidth: 76,
+ rules: [{
+ required: true,
+ message: "请输入菜单名称",
+ trigger: "blur"
+ }]
},
- option: {
- lazy: true,
- tip: false,
- simplePage: true,
- searchShow: true,
- searchMenuSpan: 6,
- dialogWidth: "60%",
- tree: true,
- border: true,
- index: true,
- selection: true,
- viewBtn: true,
- menuWidth: 300,
- dialogClickModal: false,
- column: [{
- label: "菜单名称",
- prop: "name",
- search: true,
- searchLabelWidth: 76,
- rules: [{
- required: true,
- message: "请输入菜单名称",
- trigger: "blur"
- }]
- },
- {
- label: "路由地址",
- prop: "path",
- rules: [{
- required: true,
- message: "请输入路由地址",
- trigger: "blur"
- }]
- },
- {
- label: "上级菜单",
- prop: "parentId",
- type: "tree",
- dicData: [],
- // hide: true,
- addDisabled: false,
- props: {
- label: "title",
- value: 'id'
- },
- rules: [{
- required: false,
- message: "请选择上级菜单",
- trigger: "click"
- }]
- },
- {
- label: "菜单图标",
- prop: "source",
- type: "icon",
- slot: true,
- iconList: iconList,
- rules: [{
- required: true,
- message: "请输入菜单图标",
- trigger: "click"
- }]
- },
- {
- label: "菜单编号",
- prop: "code",
- search: true,
- rules: [{
- required: true,
- message: "请输入菜单编号",
- trigger: "blur"
- }]
- },
- {
- label: "菜单类型",
- prop: "category",
- type: "radio",
- dicData: [{
- label: "菜单",
- value: 1
- },
- {
- label: "按钮",
- value: 2
- }
- ],
- hide: true,
- rules: [{
- required: true,
- message: "请选择菜单类型",
- trigger: "blur"
- }]
- },
- {
- label: "菜单别名",
- prop: "alias",
- search: true,
- rules: [{
- required: true,
- message: "请输入菜单别名",
- trigger: "blur"
- }]
- }, {
- label: "菜单",
- prop: "menuType",
- type: "radio",
- rules: [{
- required: true,
- message: "请选择菜单",
- trigger: "blur"
- }],
- dicData: [{
- label: "PC端",
- value: 0
- },
- {
- label: "移动端",
- value: 1
- }
- ],
- },
- {
- label: "新窗口",
- prop: "isOpen",
- type: "radio",
- disabled: false,
- display: false,
- dicData: [{
- label: "否",
- value: 1
- },
- {
- label: "是",
- value: 2
- }
- ],
- value: 1,
- rules: [{
- required: true,
- message: "请选择新窗口打开",
- trigger: "blur"
- }]
- },
- {
- label: "菜单排序",
- prop: "sort",
- type: "number",
- rules: [{
- required: true,
- message: "请输入菜单排序",
- trigger: "blur"
- }]
- },
- {
- label: "背景色",
- prop: "background",
- span: 12,
- minRows: 2,
- hide: true
- },
- {
- label: "图片地址",
- prop: "pictureImg",
- span: 12,
- minRows: 2,
- hide: true
- },
- {
- label: "标签权限",
- prop: "labelList",
- span: 12,
- minRows: 2,
- type: "cascader",
- dicData: [],
- props: {
- label: "name",
- value: 'id'
- },
- multiple: true,
- // hide: true
- },
- {
- label: "菜单备注",
- prop: "remark",
- type: "textarea",
- span: 24,
- minRows: 2,
- hide: true
- },
- ]
+ {
+ label: "路由地址",
+ prop: "path",
+ rules: [{
+ required: true,
+ message: "请输入路由地址",
+ trigger: "blur"
+ }]
},
- data: [],
- labelList: [],
- }
+ {
+ label: "上级菜单",
+ prop: "parentId",
+ type: "tree",
+ dicData: [],
+ // hide: true,
+ addDisabled: false,
+ props: {
+ label: "title",
+ value: 'id'
+ },
+ rules: [{
+ required: false,
+ message: "请选择上级菜单",
+ trigger: "click"
+ }]
+ },
+ {
+ label: "菜单图标",
+ prop: "source",
+ type: "icon",
+ slot: true,
+ iconList: iconList,
+ rules: [{
+ required: true,
+ message: "请输入菜单图标",
+ trigger: "click"
+ }]
+ },
+ {
+ label: "菜单编号",
+ prop: "code",
+ search: true,
+ rules: [{
+ required: true,
+ message: "请输入菜单编号",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "菜单类型",
+ prop: "category",
+ type: "radio",
+ dicData: [{
+ label: "菜单",
+ value: 1
+ },
+ {
+ label: "按钮",
+ value: 2
+ }
+ ],
+ hide: true,
+ rules: [{
+ required: true,
+ message: "请选择菜单类型",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "菜单别名",
+ prop: "alias",
+ search: true,
+ rules: [{
+ required: true,
+ message: "请输入菜单别名",
+ trigger: "blur"
+ }]
+ }, {
+ label: "菜单",
+ prop: "menuType",
+ type: "radio",
+ rules: [{
+ required: true,
+ message: "请选择菜单",
+ trigger: "blur"
+ }],
+ dicData: [{
+ label: "PC端",
+ value: 0
+ },
+ {
+ label: "移动端",
+ value: 1
+ }
+ ],
+ },
+ {
+ label: "新窗口",
+ prop: "isOpen",
+ type: "radio",
+ disabled: false,
+ display: false,
+ dicData: [{
+ label: "否",
+ value: 1
+ },
+ {
+ label: "是",
+ value: 2
+ }
+ ],
+ value: 1,
+ rules: [{
+ required: true,
+ message: "请选择新窗口打开",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "菜单排序",
+ prop: "sort",
+ type: "number",
+ rules: [{
+ required: true,
+ message: "请输入菜单排序",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "背景色",
+ prop: "background",
+ span: 12,
+ minRows: 2,
+ hide: true
+ },
+ {
+ label: "图片地址",
+ prop: "pictureImg",
+ span: 12,
+ minRows: 2,
+ hide: true
+ },
+ {
+ label: "标签权限",
+ prop: "labelList",
+ span: 12,
+ minRows: 2,
+ type: "cascader",
+ dicData: [],
+ props: {
+ label: "name",
+ value: 'id'
+ },
+ multiple: true,
+ // hide: true
+ },
+ {
+ label: "菜单备注",
+ prop: "remark",
+ type: "textarea",
+ span: 24,
+ minRows: 2,
+ hide: true
+ },
+ ]
+ },
+ data: [],
+ labelList: [],
+ }
},
watch: {
- 'form.category' () {
- const category = func.toInt(this.form.category)
- this.$refs.crud.option.column.filter(item => {
- if (item.prop === "path") {
- item.rules[0].required = category === 1
- }
- if (item.prop === 'isOpen') {
- item.disabled = category === 2
- }
- })
- },
+ 'form.category'() {
+ const category = func.toInt(this.form.category)
+ this.$refs.crud.option.column.filter(item => {
+ if (item.prop === "path") {
+ item.rules[0].required = category === 1
+ }
+ if (item.prop === 'isOpen') {
+ item.disabled = category === 2
+ }
+ })
+ },
},
computed: {
- ...mapGetters(["userInfo", "permission"]),
- permissionList () {
- return {
- addBtn: this.vaildData(this.permission.menu_add, false),
- viewBtn: this.vaildData(this.permission.menu_view, false),
- delBtn: this.vaildData(this.permission.menu_delete, false),
- editBtn: this.vaildData(this.permission.menu_edit, false)
- }
- },
- ids () {
- let ids = []
- this.selectionList.forEach(ele => {
- ids.push(ele.id)
- })
- return ids.join(",")
+ ...mapGetters(["userInfo", "permission"]),
+ permissionList() {
+ return {
+ addBtn: this.vaildData(this.permission.menu_add, false),
+ viewBtn: this.vaildData(this.permission.menu_view, false),
+ delBtn: this.vaildData(this.permission.menu_delete, false),
+ editBtn: this.vaildData(this.permission.menu_edit, false)
}
+ },
+ ids() {
+ let ids = []
+ this.selectionList.forEach(ele => {
+ ids.push(ele.id)
+ })
+ return ids.join(",")
+ }
},
methods: {
- initData () {
- getMenuTree().then(res => {
- const column = this.findObject(this.option.column, "parentId")
- column.dicData = res.data.data
- })
+ initData() {
+ getMenuTree().then(res => {
+ const column = this.findObject(this.option.column, "parentId")
+ column.dicData = res.data.data
+ })
- // getTreeList().then(res => {
- // console.log(JSON.stringify(res.data.data))
- const column = this.findObject(this.option.column, "labelList")
- column.dicData = this.labelList
- // });
- },
- handleAdd (row) {
- this.parentId = row.id
- const column = this.findObject(this.option.column, "parentId")
- column.value = row.id
- column.addDisabled = true
- this.$refs.crud.rowAdd()
- },
- rowSave (row, done, loading) {
- add(row).then((res) => {
- // 获取新增数据的相关字段
- const data = res.data.data
- row.id = data.id
- this.$message({
- type: "success",
- message: "操作成功!"
- })
- // 数据回调进行刷新
- done(row)
- }, error => {
- window.console.log(error)
- loading()
+ // getTreeList().then(res => {
+ // console.log(JSON.stringify(res.data.data))
+ const column = this.findObject(this.option.column, "labelList")
+ column.dicData = this.labelList
+ // });
+ },
+ handleAdd(row) {
+ this.parentId = row.id
+ const column = this.findObject(this.option.column, "parentId")
+ column.value = row.id
+ column.addDisabled = true
+ this.$refs.crud.rowAdd()
+ },
+ rowSave(row, done, loading) {
+ add(row).then((res) => {
+ // 获取新增数据的相关字段
+ const data = res.data.data
+ row.id = data.id
+ this.$message({
+ type: "success",
+ message: "操作成功!"
+ })
+ // 数据回调进行刷新
+ done(row)
+ }, error => {
+ window.console.log(error)
+ loading()
+ })
+ },
+ rowUpdate(row, index, done, loading) {
+ update(row).then(() => {
+ this.$message({
+ type: "success",
+ message: "操作成功!"
+ })
+ // 数据回调进行刷新
+ done(row)
+ }, error => {
+ window.console.log(error)
+ loading()
+ })
+ },
+ rowDel(row, index, done) {
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning"
+ })
+ .then(() => {
+ return remove(row.id)
+ })
+ .then(() => {
+ this.$message({
+ type: "success",
+ message: "操作成功!"
})
- },
- rowUpdate (row, index, done, loading) {
- update(row).then(() => {
- this.$message({
- type: "success",
- message: "操作成功!"
- })
- // 数据回调进行刷新
- done(row)
- }, error => {
- window.console.log(error)
- loading()
- })
- },
- rowDel (row, index, done) {
- this.$confirm("确定将选择数据删除?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- })
- .then(() => {
- return remove(row.id)
- })
- .then(() => {
- this.$message({
- type: "success",
- message: "操作成功!"
- })
- // 数据回调进行刷新
- done(row)
- })
- },
- handleDelete () {
- if (this.selectionList.length === 0) {
- this.$message.warning("请选择至少一条数据")
- return
- }
- this.$confirm("确定将选择数据删除?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- })
- .then(() => {
- return remove(this.ids)
- })
- .then(() => {
- // 刷新表格数据并重载
- this.data = []
- this.parentId = 0
- this.$refs.crud.refreshTable()
- this.$refs.crud.toggleSelection()
- // 表格数据重载
- this.onLoad(this.page)
- this.$message({
- type: "success",
- message: "操作成功!"
- })
- })
- },
- searchReset () {
- this.query = {}
- this.parentId = 0
- this.onLoad(this.page)
- },
- searchChange (params, done) {
- this.query = params
- this.parentId = ''
- this.page.currentPage = 1
- this.onLoad(this.page, params)
- done()
- },
- selectionChange (list) {
- this.selectionList = list
- },
- selectionClear () {
- this.selectionList = []
- this.$refs.crud.toggleSelection()
- },
- beforeOpen (done, type) {
- if (["add", "edit"].includes(type)) {
- this.initData()
- }
- if (["edit", "view"].includes(type)) {
- getMenu(this.form.id).then(res => {
- this.form = res.data.data
- })
- }
- done()
- },
- beforeClose (done) {
- this.parentId = ""
- const column = this.findObject(this.option.column, "parentId")
- column.value = ""
- column.addDisabled = false
- done()
- },
- currentChange (currentPage) {
- this.page.currentPage = currentPage
- },
- sizeChange (pageSize) {
- this.page.pageSize = pageSize
- },
- refreshChange () {
- this.onLoad(this.page, this.query)
- },
- onLoad (page, params = {}) {
- this.loading = true
- getLazyList(this.parentId, Object.assign(params, this.query)).then(res => {
- this.data = res.data.data
- this.loading = false
- this.selectionClear()
- })
- getTreeList().then(res => {
- this.labelList = res.data.data
- })
- },
- treeLoad (tree, treeNode, resolve) {
- const parentId = tree.id
- getLazyList(parentId).then(res => {
- resolve(res.data.data)
- })
- // getTreeList().then(res => {
- // console.log(JSON.stringify(res.data.data))
- const column = this.findObject(this.option.column, "labelList")
- column.dicData = this.labelList
- // });
+ // 数据回调进行刷新
+ done(row)
+ })
+ },
+ handleDelete() {
+ if (this.selectionList.length === 0) {
+ this.$message.warning("请选择至少一条数据")
+ return
}
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning"
+ })
+ .then(() => {
+ return remove(this.ids)
+ })
+ .then(() => {
+ // 刷新表格数据并重载
+ this.data = []
+ this.parentId = 0
+ this.$refs.crud.refreshTable()
+ this.$refs.crud.toggleSelection()
+ // 表格数据重载
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!"
+ })
+ })
+ },
+ searchReset() {
+ this.query = {}
+ this.parentId = 0
+ this.onLoad(this.page)
+ },
+ searchChange(params, done) {
+ this.query = params
+ this.parentId = ''
+ this.page.currentPage = 1
+ this.onLoad(this.page, params)
+ done()
+ },
+ selectionChange(list) {
+ this.selectionList = list
+ },
+ selectionClear() {
+ this.selectionList = []
+ this.$refs.crud.toggleSelection()
+ },
+ beforeOpen(done, type) {
+ if (["add", "edit"].includes(type)) {
+ this.initData()
+ }
+ if (["edit", "view"].includes(type)) {
+ getMenu(this.form.id).then(res => {
+ this.form = res.data.data
+ })
+ }
+ done()
+ },
+ beforeClose(done) {
+ this.parentId = ""
+ const column = this.findObject(this.option.column, "parentId")
+ column.value = ""
+ column.addDisabled = false
+ done()
+ },
+ currentChange(currentPage) {
+ this.page.currentPage = currentPage
+ },
+ sizeChange(pageSize) {
+ this.page.pageSize = pageSize
+ },
+ refreshChange() {
+ this.onLoad(this.page, this.query)
+ },
+ onLoad(page, params = {}) {
+ this.loading = true
+ getLazyList(this.parentId, Object.assign(params, this.query)).then(res => {
+ this.data = res.data.data
+ this.loading = false
+ this.selectionClear()
+ })
+ getTreeList().then(res => {
+ this.labelList = res.data.data
+ })
+ },
+ treeLoad(tree, treeNode, resolve) {
+ const parentId = tree.id
+ getLazyList(parentId).then(res => {
+ resolve(res.data.data)
+ })
+ // getTreeList().then(res => {
+ // console.log(JSON.stringify(res.data.data))
+ const column = this.findObject(this.option.column, "labelList")
+ column.dicData = this.labelList
+ // });
+ }
}
-}
+ }
</script>
<style></style>
\ No newline at end of file
diff --git a/src/views/task/reportForRepairs.vue b/src/views/task/reportForRepairs.vue
index 3b6f7d8..3c391aa 100644
--- a/src/views/task/reportForRepairs.vue
+++ b/src/views/task/reportForRepairs.vue
@@ -10,941 +10,937 @@
-->
<!-- 走访日志 -->
<template>
- <basic-container>
- <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" ref="crud" @row-del="rowDel"
- v-model="form" :permission="permissionList" @row-update="rowUpdate" @row-save="rowSave"
- :before-open="beforeOpen" @search-change="searchChange" @search-reset="searchReset"
- @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
- @refresh-change="refreshChange" @on-load="onLoad">
- <template slot="confirmFlag" slot-scope="{row, size}">
- <el-tag :size="size" :type="showConfirmFlag(row.confirmFlag).type">
- {{ showConfirmFlag(row.confirmFlag).text }}
- </el-tag>
- </template>
+ <basic-container>
+ <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" ref="crud" @row-del="rowDel"
+ v-model="form" :permission="permissionList" @row-update="rowUpdate" @row-save="rowSave" :before-open="beforeOpen"
+ @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"
+ @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
+ <template slot="confirmFlag" slot-scope="{row, size}">
+ <el-tag :size="size" :type="showConfirmFlag(row.confirmFlag).type">
+ {{ showConfirmFlag(row.confirmFlag).text }}
+ </el-tag>
+ </template>
- <template slot="expand" slot-scope="{row, size}">
- <el-timeline>
- <el-timeline-item v-for="(item, index) in timeLineData(row)" :key="index" :timestamp="item.createTime"
- :icon="item.icon" :color="item.color" :hide-timestamp="item.contentType == 3" placement="top">
- <el-card v-show="item.contentType == 1" :body-style="{ padding: '10px', background: '#f8f8f8' }">
- <div>
- 评价:{{ item.content }}
- </div>
- <el-rate v-model="item.point" disabled :colors="colors">
- </el-rate>
- </el-card>
+ <template slot="expand" slot-scope="{row, size}">
+ <el-timeline>
+ <el-timeline-item v-for="(item, index) in timeLineData(row)" :key="index" :timestamp="item.createTime"
+ :icon="item.icon" :color="item.color" :hide-timestamp="item.contentType == 3" placement="top">
+ <el-card v-show="item.contentType == 1" :body-style="{ padding: '10px', background: '#f8f8f8' }">
+ <div>
+ 评价:{{ item.content }}
+ </div>
+ <el-rate v-model="item.point" disabled :colors="colors">
+ </el-rate>
+ </el-card>
- <el-card v-show="item.peopleType != 1 && item.contentType == 0"
- :body-style="{ padding: '10px', background: '#f8f8f8' }">
- <div>
- {{ item.name }} {{ item.mobile }}
- </div>
- <div>
- {{ item.content }}
- </div>
- <div v-show="item.imageList != '' && item.imageList != null">
- <el-image style="width: 100px; height: 100px" :src="showCurImage(item.imageList)"
- :preview-src-list="showImageListData(item.imageList)">
- </el-image>
- </div>
- </el-card>
+ <el-card v-show="item.peopleType != 1 && item.contentType == 0"
+ :body-style="{ padding: '10px', background: '#f8f8f8' }">
+ <div>
+ {{ item.name }} {{ item.mobile }}
+ </div>
+ <div>
+ {{ item.content }}
+ </div>
+ <div v-show="item.imageList != '' && item.imageList != null">
+ <el-image style="width: 100px; height: 100px" :src="showCurImage(item.imageList)"
+ :preview-src-list="showImageListData(item.imageList)">
+ </el-image>
+ </div>
+ </el-card>
- <el-card v-show="item.peopleType == 1 && item.contentType == 0"
- :body-style="{ padding: '10px', background: '#f8f8f8' }">
- <span style="color: rgb(204, 204, 204);">系统:{{ item.content || '959999' }}</span>
- </el-card>
+ <el-card v-show="item.peopleType == 1 && item.contentType == 0"
+ :body-style="{ padding: '10px', background: '#f8f8f8' }">
+ <span style="color: rgb(204, 204, 204);">系统:{{ item.content || '959999' }}</span>
+ </el-card>
- <span v-show="item.contentType == 3">结束</span>
- </el-timeline-item>
+ <span v-show="item.contentType == 3">结束</span>
+ </el-timeline-item>
- <!-- <el-timeline-item timestamp="2018/4/12" placement="top">
+ <!-- <el-timeline-item timestamp="2018/4/12" placement="top">
<el-card>
<h4>更新 Github 模板</h4>
<p>王小虎 提交于 2018/4/12 20:46</p>
</el-card>
</el-timeline-item> -->
- </el-timeline>
- </template>
+ </el-timeline>
+ </template>
- <template slot-scope="{row, size, index}" slot="menu">
- <el-button :size="size" v-if="permission.report_for_repairs_details" type="text"
- icon="el-icon-document-remove" @click="rowExpansion(row)">
- 详情
- </el-button>
+ <template slot-scope="{row, size, index}" slot="menu">
+ <el-button :size="size" v-if="permission.report_for_repairs_details" type="text" icon="el-icon-document-remove"
+ @click="rowExpansion(row)">
+ 详情
+ </el-button>
- <el-button :size="size" v-if="permission.report_for_repairs_reply" type="text"
- icon="el-icon-chat-dot-square" :disabled="row.confirmFlag === 3" @click="replyBtnClick(row)">
- 回复
- </el-button>
+ <el-button :size="size" v-if="permission.report_for_repairs_reply" type="text" icon="el-icon-chat-dot-square"
+ :disabled="row.confirmFlag === 3" @click="replyBtnClick(row)">
+ 回复
+ </el-button>
- <el-button :size="size" v-if="permission.report_for_repairs_turn_over" type="text"
- icon="el-icon-document-copy" :disabled="row.confirmFlag === 3" @click="turnOverBtnClick(row)">
- 移交
- </el-button>
+ <el-button :size="size" v-if="permission.report_for_repairs_turn_over" type="text" icon="el-icon-document-copy"
+ :disabled="row.confirmFlag === 3" @click="turnOverBtnClick(row)">
+ 移交
+ </el-button>
- <el-button :size="size" v-if="permission.report_for_repairs_del" type="text" icon="el-icon-delete"
- @click="rowDel(row)">
- 删除
- </el-button>
- </template>
+ <el-button :size="size" v-if="permission.report_for_repairs_del" type="text" icon="el-icon-delete"
+ @click="rowDel(row)">
+ 删除
+ </el-button>
+ </template>
- <template slot-scope="{row, size, index}" slot="menuLeft">
- <el-button :size="size" type="primary" v-if="permission.task_reportForRepairs_add" icon="el-icon-plus"
- @click="$refs.crud.rowAdd()">新增</el-button>
+ <template slot-scope="{row, size, index}" slot="menuLeft">
+ <el-button :size="size" type="primary" v-if="permission.task_reportForRepairs_add" icon="el-icon-plus"
+ @click="$refs.crud.rowAdd()">新增</el-button>
- <el-button size="small" icon="el-icon-delete" plain v-if="permission.article_delete" @click="handleDelete">删
- 除
- </el-button>
- </template>
+ <el-button size="small" icon="el-icon-delete" plain v-if="permission.article_delete" @click="handleDelete">删
+ 除
+ </el-button>
+ </template>
- <template slot-scope="{row, size}" slot="phone">
- <el-button :size="size" type="text" @click="showStringDispose(row, 'phoneflag')"
- v-text="textDispose(row, 'phoneflag', 'phone')">
- </el-button>
- </template>
- </avue-crud>
+ <template slot-scope="{row, size}" slot="phone">
+ <el-button :size="size" type="text" @click="showStringDispose(row, 'phoneflag')"
+ v-text="textDispose(row, 'phoneflag', 'phone')">
+ </el-button>
+ </template>
+ </avue-crud>
- <el-dialog title="回复" append-to-body :visible.sync="replyPopup" center @close="popupClose">
- <avue-form ref="replyForm" :option="replyOption" v-model="replyForm" @submit="handleSubmit"
- @reset-change="handleReset">
- <template slot-scope="{row}" slot="videoList">
- <el-upload class="video-uploader" action="/api/blade-resource/oss/endpoint/put-file"
- :file-list="fileList" :headers="updateHeader" :show-file-list="true" :limit="1" :on-change="getFile"
- :on-exceed="handleExceed" :on-success="uploadVideoProcess" :before-upload="beforeUploadVideo"
- :before-remove="beforeRemove">
- <el-button size="small" type="primary">点击上传</el-button>
- <div slot="tip" class="el-upload__tip">上传视频只能是 mp4 格式,且大小不能超过 50MB</div>
- </el-upload>
- </template>
- </avue-form>
- </el-dialog>
+ <el-dialog title="回复" append-to-body :visible.sync="replyPopup" center @close="popupClose">
+ <avue-form ref="replyForm" :option="replyOption" v-model="replyForm" @submit="handleSubmit"
+ @reset-change="handleReset">
+ <template slot-scope="{row}" slot="videoList">
+ <el-upload class="video-uploader" action="/api/blade-resource/oss/endpoint/put-file" :file-list="fileList"
+ :headers="updateHeader" :show-file-list="true" :limit="1" :on-change="getFile" :on-exceed="handleExceed"
+ :on-success="uploadVideoProcess" :before-upload="beforeUploadVideo" :before-remove="beforeRemove">
+ <el-button size="small" type="primary">点击上传</el-button>
+ <div slot="tip" class="el-upload__tip">上传视频只能是 mp4 格式,且大小不能超过 50MB</div>
+ </el-upload>
+ </template>
+ </avue-form>
+ </el-dialog>
- <el-dialog title="转交" class="turn-over-popup" append-to-body :visible.sync="turnOverPopup" center
- @close="popupClose">
- <avue-form ref="turnOverForm" :option="turnOverOption" v-model="turnOverForm" @submit="turnOverHandleSubmit"
- @reset-change="turnOverHandleReset"></avue-form>
- </el-dialog>
- </basic-container>
+ <el-dialog title="转交" class="turn-over-popup" append-to-body :visible.sync="turnOverPopup" center
+ @close="popupClose">
+ <avue-form ref="turnOverForm" :option="turnOverOption" v-model="turnOverForm" @submit="turnOverHandleSubmit"
+ @reset-change="turnOverHandleReset"></avue-form>
+ </el-dialog>
+ </basic-container>
</template>
<script>
-import {
+ import {
getList,
remove,
update,
add,
getReportForRepairs,
saveReply
-} from "@/api/task/reportForRepairs"
-import {
+ } from "@/api/task/reportForRepairs"
+ import {
mapGetters
-} from "vuex"
-import website from '@/config/website'
-import {
+ } from "vuex"
+ import website from '@/config/website'
+ import {
Base64
-} from 'js-base64'
-import {
+ } from 'js-base64'
+ import {
getToken
-} from '@/util/auth'
+ } from '@/util/auth'
-export default {
- data () {
- let validatorPhone = function (rule, value, callback) {
- if (value) {
- if (!/^1[3456789]\d{9}$/.test(value)) {
- callback(new Error('手机号格式有误!'))
- } else {
- callback()
- }
- }
+ export default {
+ data() {
+ let validatorPhone = function(rule, value, callback) {
+ if (value) {
+ if (!/^1[3456789]\d{9}$/.test(value)) {
+ callback(new Error('手机号格式有误!'))
+ } else {
callback()
+ }
}
+ callback()
+ }
- return {
- colors: ['#99A9BF', '#F7BA2A', '#FF9900'],
- form: {},
- query: {},
- loading: true,
- page: {
- pageSize: 10,
- currentPage: 1,
- total: 0,
+ return {
+ colors: ['#99A9BF', '#F7BA2A', '#FF9900'],
+ form: {},
+ query: {},
+ loading: true,
+ page: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0,
+ },
+ datetime: "",
+ selectionList: [],
+ option: {
+ labelWidth: 96,
+ searchLabelWidth: 96,
+ searchShow: true,
+ searchMenuSpan: 3,
+ menuWidth: 280,
+ addBtn: false,
+ viewBtn: false,
+ editBtn: false,
+ delBtn: false,
+ index: false,
+ selection: false,
+ expand: true,
+ height: "auto",
+ calcHeight: 54,
+ dialogWidth: 950,
+ tip: false,
+ border: true,
+ //stripe:true,
+ // excelBtn: true,
+ dialogClickModal: false,
+ column: [{
+ width: 100,
+ label: "类型",
+ prop: "type",
+ span: 12,
+ searchLabelWidth: 46,
+ searchSpan: 4,
+ search: true,
+ dataType: "number",
+ type: "select",
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=reportForRepairsType",
+ props: {
+ label: "dictValue",
+ value: "dictKey",
+ },
},
- datetime: "",
- selectionList: [],
- option: {
- labelWidth: 96,
- searchLabelWidth: 96,
- searchShow: true,
- searchMenuSpan: 3,
- menuWidth: 280,
-
- addBtn: false,
- viewBtn: false,
- editBtn: false,
- delBtn: false,
- index: false,
- selection: false,
- expand: true,
- height: "auto",
- calcHeight: 54,
- dialogWidth: 950,
- tip: false,
- border: true,
- //stripe:true,
- // excelBtn: true,
- dialogClickModal: false,
- column: [
- {
- width: 100,
- label: "类型",
- prop: "type",
- span: 12,
- searchLabelWidth: 46,
- searchSpan: 4,
- search: true,
- dataType: "number",
- type: "select",
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=reportForRepairsType",
- props: {
- label: "dictValue",
- value: "dictKey",
- },
- },
- {
- width: 110,
- label: "姓名",
- prop: "realName",
- span: 12,
- searchSpan: 4,
- searchLabelWidth: 66,
- search: true,
- },
-
- {
- width: 120,
- label: "手机号码",
- prop: "phone",
- search: true,
- searchSpan: 4,
- slot: true,
- rules: [{
- validator: validatorPhone,
- trigger: 'blur'
- }],
- },
-
- {
- width: 110,
- label: "图片",
- prop: "imageUrls",
- type: "upload",
- listType: "picture-card",
- dataType: "string",
- multiple: true,
- action: "/api/blade-resource/oss/endpoint/put-file",
- propsHttp: {
- res: "data",
- name: 'name',
- url: "link",
- },
- span: 24,
- },
- {
- overHidden: true,
- label: "地点",
- prop: "addressName",
- },
- {
- width: 110,
- label: "所属街道",
- addDisplay: false,
- editDisplay: false,
- viewDisplay: false,
- prop: "streetName",
- search: true,
- searchSpan: 4
- },
-
- {
- width: 156,
- overHidden: true,
- label: "所属社区",
- addDisplay: false,
- editDisplay: false,
- viewDisplay: false,
- prop: "communityName",
- search: true,
- searchSpan: 4
- },
- {
- width: 100,
- label: "状态",
- addDisplay: false,
- editDisplay: false,
- slot: true,
- prop: "confirmFlag",
- overHidden: true
- },
- {
- width: 144,
- label: "上报时间",
- prop: "createTime",
- addDisplay: false,
- editDisplay: false,
- type: "date",
- format: "yyyy-MM-dd HH:mm:ss",
- valueFormat: "yyyy-MM-dd HH:mm:ss",
- },
- {
- width: 144,
- label: "处理时间",
- prop: "confirmTime",
- addDisplay: false,
- editDisplay: false,
- type: "date",
- format: "yyyy-MM-dd HH:mm:ss",
- valueFormat: "yyyy-MM-dd HH:mm:ss",
- },
- {
- label: "描述",
- prop: "remark",
- type: "textarea",
- hide: true,
- span: 24,
- }
- ],
+ {
+ width: 110,
+ label: "姓名",
+ prop: "realName",
+ span: 12,
+ searchSpan: 4,
+ searchLabelWidth: 66,
+ search: true,
},
- data: [],
- replyPopup: false,
- replyForm: {},
- replyOption: {
- submitBtn: true,
- submitText: '确定',
- emptyBtn: true,
- emptyText: '取消',
+ {
+ width: 120,
+ label: "手机号码",
+ prop: "phone",
+ search: true,
+ searchSpan: 4,
+ slot: true,
+ rules: [{
+ validator: validatorPhone,
+ trigger: 'blur'
+ }],
+ },
- column: [{
- span: 24,
- label: "说明",
- prop: "content",
- type: 'textarea',
- minRows: 3,
- maxRows: 5,
- rules: [{
- required: true,
- message: "请输入说明",
- trigger: "blur",
- }],
- },
+ {
+ width: 110,
+ label: "图片",
+ prop: "imageUrls",
+ type: "upload",
+ listType: "picture-card",
+ dataType: "string",
+ multiple: true,
+ action: "/api/blade-resource/oss/endpoint/put-file",
+ propsHttp: {
+ res: "data",
+ name: 'name',
+ url: "link",
+ },
+ span: 24,
+ },
+ {
+ overHidden: true,
+ label: "地点",
+ prop: "addressName",
+ },
+ {
+ width: 110,
+ label: "所属街道",
+ addDisplay: false,
+ editDisplay: false,
+ viewDisplay: false,
+ prop: "streetName",
+ search: true,
+ searchSpan: 4
+ },
- {
- label: '处理状态',
- prop: 'confirmFlag',
- type: 'select',
- dicData: [{
- label: '待处理',
- value: 1
- }, {
- label: '处理中',
- value: 2
- }, {
- label: '已处理',
- value: 3
- }],
- rules: [{
- required: true,
- message: "请选择处理状态",
- trigger: "blur",
- }],
- },
+ {
+ width: 156,
+ overHidden: true,
+ label: "所属社区",
+ addDisplay: false,
+ editDisplay: false,
+ viewDisplay: false,
+ prop: "communityName",
+ search: true,
+ searchSpan: 4
+ },
+ {
+ width: 100,
+ label: "状态",
+ addDisplay: false,
+ editDisplay: false,
+ slot: true,
+ prop: "confirmFlag",
+ overHidden: true
+ },
+ {
+ width: 144,
+ label: "上报时间",
+ prop: "createTime",
+ addDisplay: false,
+ editDisplay: false,
+ type: "date",
+ format: "yyyy-MM-dd HH:mm:ss",
+ valueFormat: "yyyy-MM-dd HH:mm:ss",
+ },
+ {
+ width: 144,
+ label: "处理时间",
+ prop: "confirmTime",
+ addDisplay: false,
+ editDisplay: false,
+ type: "date",
+ format: "yyyy-MM-dd HH:mm:ss",
+ valueFormat: "yyyy-MM-dd HH:mm:ss",
+ },
+ {
+ label: "描述",
+ prop: "remark",
+ type: "textarea",
+ hide: true,
+ span: 24,
+ }
+ ],
+ },
+ data: [],
- {
- width: 110,
- fileType: 'img',
- label: "图片",
- prop: "imageList",
- type: "upload",
- listType: "picture-card",
- dataType: "string",
- multiple: true,
- action: "/api/blade-resource/oss/endpoint/put-file",
- propsHttp: {
- res: "data",
- name: 'name',
- url: "link",
- },
- span: 24,
- },
+ replyPopup: false,
+ replyForm: {},
+ replyOption: {
+ submitBtn: true,
+ submitText: '确定',
+ emptyBtn: true,
+ emptyText: '取消',
- {
- slot: true,
- label: "视频",
- prop: "videoList",
- span: 24,
+ column: [{
+ span: 24,
+ label: "说明",
+ prop: "content",
+ type: 'textarea',
+ minRows: 3,
+ maxRows: 5,
+ rules: [{
+ required: true,
+ message: "请输入说明",
+ trigger: "blur",
+ }],
+ },
+
+ {
+ label: '处理状态',
+ prop: 'confirmFlag',
+ type: 'select',
+ dicData: [{
+ label: '待处理',
+ value: 1
+ }, {
+ label: '处理中',
+ value: 2
+ }, {
+ label: '已处理',
+ value: 3
+ }],
+ rules: [{
+ required: true,
+ message: "请选择处理状态",
+ trigger: "blur",
+ }],
+ },
+
+ {
+ width: 110,
+ fileType: 'img',
+ label: "图片",
+ prop: "imageList",
+ type: "upload",
+ listType: "picture-card",
+ dataType: "string",
+ multiple: true,
+ action: "/api/blade-resource/oss/endpoint/put-file",
+ propsHttp: {
+ res: "data",
+ name: 'name',
+ url: "link",
+ },
+ span: 24,
+ },
+
+ {
+ slot: true,
+ label: "视频",
+ prop: "videoList",
+ span: 24,
+ }
+ ]
+ },
+
+ turnOverPopup: false,
+ turnOverForm: {},
+ turnOverOption: {
+ submitBtn: true,
+ submitText: '确定',
+ emptyBtn: true,
+ emptyText: '取消',
+
+ column: [
+ // {
+ // hide: true,
+ // span: 14,
+ // label: "地址",
+ // prop: "addressCode",
+ // },
+
+ {
+ span: 24,
+ label: "人员类型",
+ prop: "peopleType",
+ type: 'select',
+ dicData: [{
+ label: '网格员',
+ value: 0
+ }, {
+ label: '物业公司人员',
+ value: 2
+ }],
+ cascader: ["transferUserId"],
+ rules: [{
+ required: true,
+ message: "请选择人员类型",
+ trigger: "blur",
+ }],
+ },
+
+ {
+ span: 24,
+ label: "指定人员",
+ prop: "transferUserId",
+ type: 'select',
+ dicUrl: `/api/blade-system/user/getUserInfoByCode?houseCode={{addressCode}}&type={{peopleType}}`,
+ props: {
+ label: "name",
+ value: "id",
+ },
+ change: ({
+ value,
+ column,
+ item,
+ dic
+ }) => {
+ this.curPeopleDetails = {}
+
+ if (value) {
+ this.curPeopleDetails = item
}
- ]
+ },
+ rules: [{
+ required: true,
+ message: "请选择指定人员",
+ trigger: "blur",
+ }],
},
+ ]
+ },
- turnOverPopup: false,
- turnOverForm: {},
- turnOverOption: {
- submitBtn: true,
- submitText: '确定',
- emptyBtn: true,
- emptyText: '取消',
+ curRow: {},
- column: [
- // {
- // hide: true,
- // span: 14,
- // label: "地址",
- // prop: "addressCode",
- // },
+ fileList: [],
+ updateHeader: {
+ Authorization: `Basic ${Base64.encode(`${website.clientId}:${website.clientSecret}`)}`,
+ 'Blade-Auth': getToken()
+ },
- {
- span: 24,
- label: "人员类型",
- prop: "peopleType",
- type: 'select',
- dicData: [{
- label: '网格员',
- value: 0
- }, {
- label: '物业公司人员',
- value: 2
- }],
- cascader: ["transferUserId"],
- rules: [{
- required: true,
- message: "请选择人员类型",
- trigger: "blur",
- }],
- },
+ curPeopleDetails: {},
- {
- span: 24,
- label: "指定人员",
- prop: "transferUserId",
- type: 'select',
- dicUrl: `/api/blade-system/user/getUserInfoByCode?houseCode={{addressCode}}&type={{peopleType}}`,
- props: {
- label: "name",
- value: "id",
- },
- change: ({
- value,
- column,
- item,
- dic
- }) => {
- this.curPeopleDetails = {}
-
- if (value) {
- this.curPeopleDetails = item
- }
- },
- rules: [{
- required: true,
- message: "请选择指定人员",
- trigger: "blur",
- }],
- },
- ]
- },
-
- curRow: {},
-
- fileList: [],
- updateHeader: {
- Authorization: `Basic ${Base64.encode(`${website.clientId}:${website.clientSecret}`)}`,
- 'Blade-Auth': getToken()
- },
-
- curPeopleDetails: {},
-
- videoFlag: false,
- videoUploadPercent: ''
- }
+ videoFlag: false,
+ videoUploadPercent: ''
+ }
},
watch: {},
computed: {
- ...mapGetters(["permission", "userInfo"]),
- permissionList () {
- return {
- addBtn: this.vaildData(this.permission.reportForRepairs_add, true),
- viewBtn: this.vaildData(this.permission.reportForRepairs_view, true),
- delBtn: this.vaildData(this.permission.reportForRepairs_delete, true),
- editBtn: this.vaildData(this.permission.reportForRepairs_edit, true),
- }
- },
-
- ids () {
- let ids = []
- this.selectionList.forEach((ele) => {
- ids.push(ele.id)
- })
- return ids.join(",")
- },
-
- timeLineData () {
- return (row) => {
- let imageList = row.imageUrls
-
- if (row.taskRepairAppraiseList.length) {
- return [{
- createTime: row.createTime,
- mobile: row.phone,
- name: row.realName,
- imageList,
- content: row.remark,
- color: '#1890ff',
- contentType: 0,
- },
- ...row.taskRepairStepList.map((item, index) => {
- if (index == 0) {
- return {
- ...item,
- contentType: 0,
- }
- }
- return {
- ...item,
- contentType: 0
- }
- }),
- ...row.taskRepairAppraiseList.map(item => {
- return {
- ...item,
- contentType: 1
- }
- }),
- {
- contentType: 3,
- createTime: '',
- icon: 'el-icon-check',
- color: '#0bbd87'
- }
- ]
- } else {
- return [{
- createTime: row.createTime,
- mobile: row.phone,
- name: row.realName,
- imageList,
- content: row.remark,
- color: '#1890ff',
- contentType: 0,
- },
- ...row.taskRepairStepList.map((item, index) => {
- if (index == 0) {
- return {
- ...item,
- contentType: 0,
- }
- }
- return {
- ...item,
- contentType: 0
- }
- })
- ]
- }
- }
- },
-
- showCurImage () {
- return (data) => {
- if (data != null && data.length > 0) {
- return data.split(',').filter(item => item != '')[0]
- }
- return ''
- }
- },
-
- showImageListData () {
- return (data) => {
- if (data != null && data.length > 0) {
- return data.split(',').filter(item => item != '')
- }
- return []
- }
- },
-
- showConfirmFlag () {
- return (data) => {
- let tags = {}
-
- if (data == 1) {
- tags = {
- type: 'warning',
- text: '待处理'
- }
- } else if (data == 2) {
- tags = {
- type: '',
- text: '处理中'
- }
- } else if (data == 3) {
- tags = {
- type: 'success',
- text: '已处理'
- }
- } else if (data == 4) {
- tags = {
- type: 'success',
- text: '已评价'
- }
- }
-
- return tags
- }
- },
-
- textDispose () {
- return (row, flag, type) => {
- if (row[flag] || row[type] == null) {
- return row[type]
- } else {
- if (type == 'principalIdCard') {
- return row[type].replace(/^(.{6})(?:\d+)(.{4})$/, "$1******$2")
- } else {
- return row[type].replace(/^(.{3})(?:\d+)(.{4})$/, "$1****$2")
- }
- }
- }
+ ...mapGetters(["permission", "userInfo"]),
+ permissionList() {
+ return {
+ addBtn: this.vaildData(this.permission.reportForRepairs_add, true),
+ viewBtn: this.vaildData(this.permission.reportForRepairs_view, true),
+ delBtn: this.vaildData(this.permission.reportForRepairs_delete, true),
+ editBtn: this.vaildData(this.permission.reportForRepairs_edit, true),
}
+ },
+
+ ids() {
+ let ids = []
+ this.selectionList.forEach((ele) => {
+ ids.push(ele.id)
+ })
+ return ids.join(",")
+ },
+
+ timeLineData() {
+ return (row) => {
+ let imageList = row.imageUrls
+
+ if (row.taskRepairAppraiseList.length) {
+ return [{
+ createTime: row.createTime,
+ mobile: row.phone,
+ name: row.realName,
+ imageList,
+ content: row.remark,
+ color: '#1890ff',
+ contentType: 0,
+ },
+ ...row.taskRepairStepList.map((item, index) => {
+ if (index == 0) {
+ return {
+ ...item,
+ contentType: 0,
+ }
+ }
+ return {
+ ...item,
+ contentType: 0
+ }
+ }),
+ ...row.taskRepairAppraiseList.map(item => {
+ return {
+ ...item,
+ contentType: 1
+ }
+ }),
+ {
+ contentType: 3,
+ createTime: '',
+ icon: 'el-icon-check',
+ color: '#0bbd87'
+ }
+ ]
+ } else {
+ return [{
+ createTime: row.createTime,
+ mobile: row.phone,
+ name: row.realName,
+ imageList,
+ content: row.remark,
+ color: '#1890ff',
+ contentType: 0,
+ },
+ ...row.taskRepairStepList.map((item, index) => {
+ if (index == 0) {
+ return {
+ ...item,
+ contentType: 0,
+ }
+ }
+ return {
+ ...item,
+ contentType: 0
+ }
+ })
+ ]
+ }
+ }
+ },
+
+ showCurImage() {
+ return (data) => {
+ if (data != null && data.length > 0) {
+ return data.split(',').filter(item => item != '')[0]
+ }
+ return ''
+ }
+ },
+
+ showImageListData() {
+ return (data) => {
+ if (data != null && data.length > 0) {
+ return data.split(',').filter(item => item != '')
+ }
+ return []
+ }
+ },
+
+ showConfirmFlag() {
+ return (data) => {
+ let tags = {}
+
+ if (data == 1) {
+ tags = {
+ type: 'warning',
+ text: '待处理'
+ }
+ } else if (data == 2) {
+ tags = {
+ type: '',
+ text: '处理中'
+ }
+ } else if (data == 3) {
+ tags = {
+ type: 'success',
+ text: '已处理'
+ }
+ } else if (data == 4) {
+ tags = {
+ type: 'success',
+ text: '已评价'
+ }
+ }
+
+ return tags
+ }
+ },
+
+ textDispose() {
+ return (row, flag, type) => {
+ if (row[flag] || row[type] == null) {
+ return row[type]
+ } else {
+ if (type == 'principalIdCard') {
+ return row[type].replace(/^(.{6})(?:\d+)(.{4})$/, "$1******$2")
+ } else {
+ return row[type].replace(/^(.{3})(?:\d+)(.{4})$/, "$1****$2")
+ }
+ }
+ }
+ }
},
methods: {
- showStringDispose (row, type) {
- row[type] = !row[type]
- },
+ showStringDispose(row, type) {
+ row[type] = !row[type]
+ },
- rowExpansion (row) {
- this.$refs.crud.toggleRowExpansion(row)
- },
+ rowExpansion(row) {
+ this.$refs.crud.toggleRowExpansion(row)
+ },
- popupClose () {
- this.$refs.replyForm && this.$refs.replyForm.resetForm()
- this.$refs.turnOverForm && this.$refs.turnOverForm.resetForm()
- },
+ popupClose() {
+ this.$refs.replyForm && this.$refs.replyForm.resetForm()
+ this.$refs.turnOverForm && this.$refs.turnOverForm.resetForm()
+ },
- saveReply (data, done) {
- saveReply(data).then(
- () => {
- this.replyPopup = false
- this.turnOverPopup = false
- this.onLoad(this.page)
- this.$message({
- type: "success",
- message: "操作成功!",
- })
- done()
- },
- (error) => {
- window.console.log(error)
- }
- )
- },
-
- handleSubmit (form, done) {
-
- if (form.imageList.length > 0) {
- var urls = []
- var split = form.imageList.split(",").filter(item => item != '')
- split.forEach(url => {
- var names = url.split("jczz/")
- urls.push(names[1])
- })
- form.imageList = urls.join(",")
- }
- // if (form.imageList.length > 0) {
- // var urls = []
- // var split = form.imageList.split(",").filter(item => item != '')
- // split.forEach(url => {
- // var names = url.split("jczz/")
- // urls.push(names[1])
- // })
- // form.imageList = urls.join(",")
- // }
-
- this.saveReply({
- ...form,
- videoList: this.fileList.map(item => item.response.data.link).join(','),
- repairId: this.curRow.id,
- peopleType: 0,
- mobile: this.userInfo.phone
- }, done)
- },
-
- handleReset () {
- this.fileList = []
+ saveReply(data, done) {
+ saveReply(data).then(
+ () => {
this.replyPopup = false
- },
-
- turnOverHandleSubmit (form, done) {
- let content = ''
-
- if (form.peopleType == 0) {
- content = `事件已移交至 网格员 ${this.curPeopleDetails.name}`
- } else if (form.peopleType == 2) {
- content = `事件已移交至 物业公司人员 ${this.curPeopleDetails.distictName || ''}${this.curPeopleDetails.name}`
- }
-
- this.saveReply({
- ...form,
- confirmFlag: 1,
- content,
- peopleType: 1,
- repairId: this.curRow.id,
- }, done)
- },
-
- turnOverHandleReset () {
this.turnOverPopup = false
- },
-
- //移除
- beforeRemove (file, fileList) {
- return this.$confirm(`确定移除 ${file.name}?`).then(() => {
- this.fileList = fileList
- })
- },
-
- //上传
- getFile (file, fileList) {
- this.fileList = fileList
- },
-
- beforeUploadVideo (file) {
- const isLt50M = file.size / 1024 / 1024 < 50
- if (['video/mp4'].indexOf(file.type) == -1) {
- this.$message.error('上传视频只能是 mp4 格式!')
- return false
- }
- if (!isLt50M) {
- this.$message.error('上传视频大小不能超过 50MB!')
- return false
- }
- return true
- },
-
- handleExceed (files, fileList) {
- this.$message.warning("目前只能上传一个视频文件")
- },
-
- uploadVideoProcess (event, file, fileList) {
- console.log(event, file, fileList, this.fileList)
- },
-
- replyBtnClick (row) {
- this.curRow = row
- this.replyForm = {}
- this.replyPopup = true
- },
-
- turnOverBtnClick (row) {
- this.curRow = row
- this.turnOverForm = {
- addressCode: row.addressCode
- }
- this.turnOverPopup = true
- },
-
- rowSave (row, done, loading) {
- if (row.imageUrls.length > 0) {
- var urls = []
- var split = row.imageUrls.split(",")
- split.forEach(url => {
- var names = url.split("jczz/")
- urls.push(names[1])
- })
- row.imageUrls = urls.join(",")
- }
- add(row).then(
- () => {
- this.onLoad(this.page)
- this.$message({
- type: "success",
- message: "操作成功!",
- })
- done()
- },
- (error) => {
- window.console.log(error)
- loading()
- }
- )
- },
- rowUpdate (row, index, done, loading) {
- if (row.imageUrls.length > 0) {
- var urls = []
- var split = row.imageUrls.split(",")
- split.forEach(url => {
- var names = url.split("jczz/")
- urls.push(names[1])
- })
- row.imageUrls = urls.join(",")
- }
- update(row).then(
- () => {
- this.onLoad(this.page)
- this.$message({
- type: "success",
- message: "操作成功!",
- })
- done()
- },
- (error) => {
- window.console.log(error)
- loading()
- }
- )
- },
- rowDel (row) {
- this.$confirm("确定将选择数据删除?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- })
- .then(() => {
- return remove(row.id)
- })
- .then(() => {
- this.onLoad(this.page)
- this.$message({
- type: "success",
- message: "操作成功!",
- })
- })
- },
- searchReset () {
- this.query = {}
this.onLoad(this.page)
- },
- searchChange (params, done) {
- this.query = params
- this.page.currentPage = 1
- this.onLoad(this.page, params)
- done()
- },
- selectionChange (list) {
- this.selectionList = list
- },
- selectionClear () {
- this.selectionList = []
- this.$refs.crud.toggleSelection()
- },
- handleDelete () {
- if (this.selectionList.length === 0) {
- this.$message.warning("请选择至少一条数据")
- return
- }
- this.$confirm("确定将选择数据删除?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
+ this.$message({
+ type: "success",
+ message: "操作成功!",
})
- .then(() => {
- return remove(this.ids)
- })
- .then(() => {
- this.onLoad(this.page)
- this.$message({
- type: "success",
- message: "操作成功!",
- })
- this.$refs.crud.toggleSelection()
- })
- },
- beforeOpen (done, type) {
- if (["edit", "view"].includes(type)) {
- getReportForRepairs(this.form.id).then((res) => {
- this.form = res.data.data
- if (this.form.imageUrls) {
- if (this.form.imageUrls.length > 0) {
- var urls = []
- var names = this.form.imageUrls.split(",")
- names.forEach(name => {
- urls.push(website.minioUrl + name)
- })
- this.form.imageUrls = urls.join(",")
- }
- }
- })
- }
+ done()
+ },
+ (error) => {
+ window.console.log(error)
+ }
+ )
+ },
- done()
- },
- currentChange (currentPage) {
- this.page.currentPage = currentPage
- },
- sizeChange (pageSize) {
- this.page.pageSize = pageSize
- },
- refreshChange () {
- this.onLoad(this.page, this.query)
- },
- onLoad (page, params = {}) {
- const {
- dateTime
- } = this.query
- let values = {
- ...params,
- }
- if (dateTime) {
- values = {
- ...params,
- startTime: dateTime[0],
- endTime: dateTime[1],
- ...this.query,
- }
- values.dateTime = null
- }
- this.loading = true
- getList(page.currentPage, page.pageSize, values).then((res) => {
- const data = res.data.data
- this.page.total = data.total
- this.data = data.records
- this.data.forEach(item => {
- this.$set(item, 'phoneflag', false)
- if (item.imageUrls) {
- if (item.imageUrls.length > 0) {
- var urls = []
- var names = item.imageUrls.split(",")
- names.forEach(name => {
- urls.push(website.minioUrl + name)
- })
- item.imageUrls = urls.join(",")
- }
- }
- if (item.taskRepairStepList.length > 0) {
- item.taskRepairStepList.forEach(ee => {
- if (ee.imageList) {
- if (ee.imageList.length > 0) {
- var urls = []
- var names = ee.imageList.split(",")
- names.forEach(name => {
- urls.push(website.minioUrl + name)
- })
- ee.imageList = urls.join(",")
- }
- }
- })
- }
- })
- this.loading = false
- this.selectionClear()
- })
+ handleSubmit(form, done) {
+
+ if (form.imageList.length > 0) {
+ var urls = []
+ var split = form.imageList.split(",").filter(item => item != '')
+ split.forEach(url => {
+ var names = url.split("jczz/")
+ urls.push(names[1])
+ })
+ form.imageList = urls.join(",")
}
+ // if (form.imageList.length > 0) {
+ // var urls = []
+ // var split = form.imageList.split(",").filter(item => item != '')
+ // split.forEach(url => {
+ // var names = url.split("jczz/")
+ // urls.push(names[1])
+ // })
+ // form.imageList = urls.join(",")
+ // }
+
+ this.saveReply({
+ ...form,
+ videoList: this.fileList.map(item => item.response.data.link).join(','),
+ repairId: this.curRow.id,
+ peopleType: 0,
+ mobile: this.userInfo.phone
+ }, done)
+ },
+
+ handleReset() {
+ this.fileList = []
+ this.replyPopup = false
+ },
+
+ turnOverHandleSubmit(form, done) {
+ let content = ''
+
+ if (form.peopleType == 0) {
+ content = `事件已移交至 网格员 ${this.curPeopleDetails.name}`
+ } else if (form.peopleType == 2) {
+ content = `事件已移交至 物业公司人员 ${this.curPeopleDetails.distictName || ''}${this.curPeopleDetails.name}`
+ }
+
+ this.saveReply({
+ ...form,
+ confirmFlag: 1,
+ content,
+ peopleType: 1,
+ repairId: this.curRow.id,
+ }, done)
+ },
+
+ turnOverHandleReset() {
+ this.turnOverPopup = false
+ },
+
+ //移除
+ beforeRemove(file, fileList) {
+ return this.$confirm(`确定移除 ${file.name}?`).then(() => {
+ this.fileList = fileList
+ })
+ },
+
+ //上传
+ getFile(file, fileList) {
+ this.fileList = fileList
+ },
+
+ beforeUploadVideo(file) {
+ const isLt50M = file.size / 1024 / 1024 < 50
+ if (['video/mp4'].indexOf(file.type) == -1) {
+ this.$message.error('上传视频只能是 mp4 格式!')
+ return false
+ }
+ if (!isLt50M) {
+ this.$message.error('上传视频大小不能超过 50MB!')
+ return false
+ }
+ return true
+ },
+
+ handleExceed(files, fileList) {
+ this.$message.warning("目前只能上传一个视频文件")
+ },
+
+ uploadVideoProcess(event, file, fileList) {
+ console.log(event, file, fileList, this.fileList)
+ },
+
+ replyBtnClick(row) {
+ this.curRow = row
+ this.replyForm = {}
+ this.replyPopup = true
+ },
+
+ turnOverBtnClick(row) {
+ this.curRow = row
+ this.turnOverForm = {
+ addressCode: row.addressCode
+ }
+ this.turnOverPopup = true
+ },
+
+ rowSave(row, done, loading) {
+ if (row.imageUrls.length > 0) {
+ var urls = []
+ var split = row.imageUrls.split(",")
+ split.forEach(url => {
+ var names = url.split("jczz/")
+ urls.push(names[1])
+ })
+ row.imageUrls = urls.join(",")
+ }
+ add(row).then(
+ () => {
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ done()
+ },
+ (error) => {
+ window.console.log(error)
+ loading()
+ }
+ )
+ },
+ rowUpdate(row, index, done, loading) {
+ if (row.imageUrls.length > 0) {
+ var urls = []
+ var split = row.imageUrls.split(",")
+ split.forEach(url => {
+ var names = url.split("jczz/")
+ urls.push(names[1])
+ })
+ row.imageUrls = urls.join(",")
+ }
+ update(row).then(
+ () => {
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ done()
+ },
+ (error) => {
+ window.console.log(error)
+ loading()
+ }
+ )
+ },
+ rowDel(row) {
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ return remove(row.id)
+ })
+ .then(() => {
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ })
+ },
+ searchReset() {
+ this.query = {}
+ this.onLoad(this.page)
+ },
+ searchChange(params, done) {
+ this.query = params
+ this.page.currentPage = 1
+ this.onLoad(this.page, params)
+ done()
+ },
+ selectionChange(list) {
+ this.selectionList = list
+ },
+ selectionClear() {
+ this.selectionList = []
+ this.$refs.crud.toggleSelection()
+ },
+ handleDelete() {
+ if (this.selectionList.length === 0) {
+ this.$message.warning("请选择至少一条数据")
+ return
+ }
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ return remove(this.ids)
+ })
+ .then(() => {
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ this.$refs.crud.toggleSelection()
+ })
+ },
+ beforeOpen(done, type) {
+ if (["edit", "view"].includes(type)) {
+ getReportForRepairs(this.form.id).then((res) => {
+ this.form = res.data.data
+ if (this.form.imageUrls) {
+ if (this.form.imageUrls.length > 0) {
+ var urls = []
+ var names = this.form.imageUrls.split(",")
+ names.forEach(name => {
+ urls.push(website.minioUrl + name)
+ })
+ this.form.imageUrls = urls.join(",")
+ }
+ }
+ })
+ }
+
+ done()
+ },
+ currentChange(currentPage) {
+ this.page.currentPage = currentPage
+ },
+ sizeChange(pageSize) {
+ this.page.pageSize = pageSize
+ },
+ refreshChange() {
+ this.onLoad(this.page, this.query)
+ },
+ onLoad(page, params = {}) {
+ const {
+ dateTime
+ } = this.query
+ let values = {
+ ...params,
+ }
+ if (dateTime) {
+ values = {
+ ...params,
+ startTime: dateTime[0],
+ endTime: dateTime[1],
+ ...this.query,
+ }
+ values.dateTime = null
+ }
+ this.loading = true
+ getList(page.currentPage, page.pageSize, values).then((res) => {
+ const data = res.data.data
+ this.page.total = data.total
+ this.data = data.records
+ this.data.forEach(item => {
+ this.$set(item, 'phoneflag', false)
+ if (item.imageUrls) {
+ if (item.imageUrls.length > 0) {
+ var urls = []
+ var names = item.imageUrls.split(",")
+ names.forEach(name => {
+ urls.push(website.minioUrl + name)
+ })
+ item.imageUrls = urls.join(",")
+ }
+ }
+ if (item.taskRepairStepList.length > 0) {
+ item.taskRepairStepList.forEach(ee => {
+ if (ee.imageList) {
+ if (ee.imageList.length > 0) {
+ var urls = []
+ var names = ee.imageList.split(",")
+ names.forEach(name => {
+ urls.push(website.minioUrl + name)
+ })
+ ee.imageList = urls.join(",")
+ }
+ }
+ })
+ }
+ })
+ this.loading = false
+ this.selectionClear()
+ })
+ }
},
-}
+ }
</script>
<style>
-.avue-upload__icon {
+ .avue-upload__icon {
line-height: 6;
-}
+ }
</style>
\ No newline at end of file
diff --git a/src/views/task/reportForRepairsTwo.vue b/src/views/task/reportForRepairsTwo.vue
new file mode 100644
index 0000000..3c391aa
--- /dev/null
+++ b/src/views/task/reportForRepairsTwo.vue
@@ -0,0 +1,946 @@
+<!--
+ * @Author: shuishen 1109946754@qq.com
+ * @Date: 2023-12-14 17:10:00
+ * @LastEditors: shuishen 1109946754@qq.com
+ * @LastEditTime: 2024-01-29 14:02:52
+ * @FilePath: \jczz_web\src\views\task\reportForRepairs.vue
+ * @Description:
+ *
+ * Copyright (c) 2023 by shuishen, All Rights Reserved.
+-->
+<!-- 走访日志 -->
+<template>
+ <basic-container>
+ <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" ref="crud" @row-del="rowDel"
+ v-model="form" :permission="permissionList" @row-update="rowUpdate" @row-save="rowSave" :before-open="beforeOpen"
+ @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"
+ @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
+ <template slot="confirmFlag" slot-scope="{row, size}">
+ <el-tag :size="size" :type="showConfirmFlag(row.confirmFlag).type">
+ {{ showConfirmFlag(row.confirmFlag).text }}
+ </el-tag>
+ </template>
+
+ <template slot="expand" slot-scope="{row, size}">
+ <el-timeline>
+ <el-timeline-item v-for="(item, index) in timeLineData(row)" :key="index" :timestamp="item.createTime"
+ :icon="item.icon" :color="item.color" :hide-timestamp="item.contentType == 3" placement="top">
+ <el-card v-show="item.contentType == 1" :body-style="{ padding: '10px', background: '#f8f8f8' }">
+ <div>
+ 评价:{{ item.content }}
+ </div>
+ <el-rate v-model="item.point" disabled :colors="colors">
+ </el-rate>
+ </el-card>
+
+ <el-card v-show="item.peopleType != 1 && item.contentType == 0"
+ :body-style="{ padding: '10px', background: '#f8f8f8' }">
+ <div>
+ {{ item.name }} {{ item.mobile }}
+ </div>
+ <div>
+ {{ item.content }}
+ </div>
+ <div v-show="item.imageList != '' && item.imageList != null">
+ <el-image style="width: 100px; height: 100px" :src="showCurImage(item.imageList)"
+ :preview-src-list="showImageListData(item.imageList)">
+ </el-image>
+ </div>
+ </el-card>
+
+ <el-card v-show="item.peopleType == 1 && item.contentType == 0"
+ :body-style="{ padding: '10px', background: '#f8f8f8' }">
+ <span style="color: rgb(204, 204, 204);">系统:{{ item.content || '959999' }}</span>
+ </el-card>
+
+ <span v-show="item.contentType == 3">结束</span>
+ </el-timeline-item>
+
+
+ <!-- <el-timeline-item timestamp="2018/4/12" placement="top">
+ <el-card>
+ <h4>更新 Github 模板</h4>
+ <p>王小虎 提交于 2018/4/12 20:46</p>
+ </el-card>
+ </el-timeline-item> -->
+ </el-timeline>
+ </template>
+
+ <template slot-scope="{row, size, index}" slot="menu">
+ <el-button :size="size" v-if="permission.report_for_repairs_details" type="text" icon="el-icon-document-remove"
+ @click="rowExpansion(row)">
+ 详情
+ </el-button>
+
+ <el-button :size="size" v-if="permission.report_for_repairs_reply" type="text" icon="el-icon-chat-dot-square"
+ :disabled="row.confirmFlag === 3" @click="replyBtnClick(row)">
+ 回复
+ </el-button>
+
+ <el-button :size="size" v-if="permission.report_for_repairs_turn_over" type="text" icon="el-icon-document-copy"
+ :disabled="row.confirmFlag === 3" @click="turnOverBtnClick(row)">
+ 移交
+ </el-button>
+
+ <el-button :size="size" v-if="permission.report_for_repairs_del" type="text" icon="el-icon-delete"
+ @click="rowDel(row)">
+ 删除
+ </el-button>
+ </template>
+
+ <template slot-scope="{row, size, index}" slot="menuLeft">
+ <el-button :size="size" type="primary" v-if="permission.task_reportForRepairs_add" icon="el-icon-plus"
+ @click="$refs.crud.rowAdd()">新增</el-button>
+
+ <el-button size="small" icon="el-icon-delete" plain v-if="permission.article_delete" @click="handleDelete">删
+ 除
+ </el-button>
+ </template>
+
+ <template slot-scope="{row, size}" slot="phone">
+ <el-button :size="size" type="text" @click="showStringDispose(row, 'phoneflag')"
+ v-text="textDispose(row, 'phoneflag', 'phone')">
+ </el-button>
+ </template>
+ </avue-crud>
+
+ <el-dialog title="回复" append-to-body :visible.sync="replyPopup" center @close="popupClose">
+ <avue-form ref="replyForm" :option="replyOption" v-model="replyForm" @submit="handleSubmit"
+ @reset-change="handleReset">
+ <template slot-scope="{row}" slot="videoList">
+ <el-upload class="video-uploader" action="/api/blade-resource/oss/endpoint/put-file" :file-list="fileList"
+ :headers="updateHeader" :show-file-list="true" :limit="1" :on-change="getFile" :on-exceed="handleExceed"
+ :on-success="uploadVideoProcess" :before-upload="beforeUploadVideo" :before-remove="beforeRemove">
+ <el-button size="small" type="primary">点击上传</el-button>
+ <div slot="tip" class="el-upload__tip">上传视频只能是 mp4 格式,且大小不能超过 50MB</div>
+ </el-upload>
+ </template>
+ </avue-form>
+ </el-dialog>
+
+ <el-dialog title="转交" class="turn-over-popup" append-to-body :visible.sync="turnOverPopup" center
+ @close="popupClose">
+ <avue-form ref="turnOverForm" :option="turnOverOption" v-model="turnOverForm" @submit="turnOverHandleSubmit"
+ @reset-change="turnOverHandleReset"></avue-form>
+ </el-dialog>
+ </basic-container>
+</template>
+
+<script>
+ import {
+ getList,
+ remove,
+ update,
+ add,
+ getReportForRepairs,
+ saveReply
+ } from "@/api/task/reportForRepairs"
+ import {
+ mapGetters
+ } from "vuex"
+ import website from '@/config/website'
+ import {
+ Base64
+ } from 'js-base64'
+ import {
+ getToken
+ } from '@/util/auth'
+
+ export default {
+ data() {
+ let validatorPhone = function(rule, value, callback) {
+ if (value) {
+ if (!/^1[3456789]\d{9}$/.test(value)) {
+ callback(new Error('手机号格式有误!'))
+ } else {
+ callback()
+ }
+ }
+ callback()
+ }
+
+ return {
+ colors: ['#99A9BF', '#F7BA2A', '#FF9900'],
+ form: {},
+ query: {},
+ loading: true,
+ page: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0,
+ },
+ datetime: "",
+ selectionList: [],
+ option: {
+ labelWidth: 96,
+ searchLabelWidth: 96,
+ searchShow: true,
+ searchMenuSpan: 3,
+ menuWidth: 280,
+ addBtn: false,
+ viewBtn: false,
+ editBtn: false,
+ delBtn: false,
+ index: false,
+ selection: false,
+ expand: true,
+ height: "auto",
+ calcHeight: 54,
+ dialogWidth: 950,
+ tip: false,
+ border: true,
+ //stripe:true,
+ // excelBtn: true,
+ dialogClickModal: false,
+ column: [{
+ width: 100,
+ label: "类型",
+ prop: "type",
+ span: 12,
+ searchLabelWidth: 46,
+ searchSpan: 4,
+ search: true,
+ dataType: "number",
+ type: "select",
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=reportForRepairsType",
+ props: {
+ label: "dictValue",
+ value: "dictKey",
+ },
+ },
+ {
+ width: 110,
+ label: "姓名",
+ prop: "realName",
+ span: 12,
+ searchSpan: 4,
+ searchLabelWidth: 66,
+ search: true,
+ },
+
+ {
+ width: 120,
+ label: "手机号码",
+ prop: "phone",
+ search: true,
+ searchSpan: 4,
+ slot: true,
+ rules: [{
+ validator: validatorPhone,
+ trigger: 'blur'
+ }],
+ },
+
+ {
+ width: 110,
+ label: "图片",
+ prop: "imageUrls",
+ type: "upload",
+ listType: "picture-card",
+ dataType: "string",
+ multiple: true,
+ action: "/api/blade-resource/oss/endpoint/put-file",
+ propsHttp: {
+ res: "data",
+ name: 'name',
+ url: "link",
+ },
+ span: 24,
+ },
+ {
+ overHidden: true,
+ label: "地点",
+ prop: "addressName",
+ },
+ {
+ width: 110,
+ label: "所属街道",
+ addDisplay: false,
+ editDisplay: false,
+ viewDisplay: false,
+ prop: "streetName",
+ search: true,
+ searchSpan: 4
+ },
+
+ {
+ width: 156,
+ overHidden: true,
+ label: "所属社区",
+ addDisplay: false,
+ editDisplay: false,
+ viewDisplay: false,
+ prop: "communityName",
+ search: true,
+ searchSpan: 4
+ },
+ {
+ width: 100,
+ label: "状态",
+ addDisplay: false,
+ editDisplay: false,
+ slot: true,
+ prop: "confirmFlag",
+ overHidden: true
+ },
+ {
+ width: 144,
+ label: "上报时间",
+ prop: "createTime",
+ addDisplay: false,
+ editDisplay: false,
+ type: "date",
+ format: "yyyy-MM-dd HH:mm:ss",
+ valueFormat: "yyyy-MM-dd HH:mm:ss",
+ },
+ {
+ width: 144,
+ label: "处理时间",
+ prop: "confirmTime",
+ addDisplay: false,
+ editDisplay: false,
+ type: "date",
+ format: "yyyy-MM-dd HH:mm:ss",
+ valueFormat: "yyyy-MM-dd HH:mm:ss",
+ },
+ {
+ label: "描述",
+ prop: "remark",
+ type: "textarea",
+ hide: true,
+ span: 24,
+ }
+ ],
+ },
+ data: [],
+
+ replyPopup: false,
+ replyForm: {},
+ replyOption: {
+ submitBtn: true,
+ submitText: '确定',
+ emptyBtn: true,
+ emptyText: '取消',
+
+ column: [{
+ span: 24,
+ label: "说明",
+ prop: "content",
+ type: 'textarea',
+ minRows: 3,
+ maxRows: 5,
+ rules: [{
+ required: true,
+ message: "请输入说明",
+ trigger: "blur",
+ }],
+ },
+
+ {
+ label: '处理状态',
+ prop: 'confirmFlag',
+ type: 'select',
+ dicData: [{
+ label: '待处理',
+ value: 1
+ }, {
+ label: '处理中',
+ value: 2
+ }, {
+ label: '已处理',
+ value: 3
+ }],
+ rules: [{
+ required: true,
+ message: "请选择处理状态",
+ trigger: "blur",
+ }],
+ },
+
+ {
+ width: 110,
+ fileType: 'img',
+ label: "图片",
+ prop: "imageList",
+ type: "upload",
+ listType: "picture-card",
+ dataType: "string",
+ multiple: true,
+ action: "/api/blade-resource/oss/endpoint/put-file",
+ propsHttp: {
+ res: "data",
+ name: 'name',
+ url: "link",
+ },
+ span: 24,
+ },
+
+ {
+ slot: true,
+ label: "视频",
+ prop: "videoList",
+ span: 24,
+ }
+ ]
+ },
+
+ turnOverPopup: false,
+ turnOverForm: {},
+ turnOverOption: {
+ submitBtn: true,
+ submitText: '确定',
+ emptyBtn: true,
+ emptyText: '取消',
+
+ column: [
+ // {
+ // hide: true,
+ // span: 14,
+ // label: "地址",
+ // prop: "addressCode",
+ // },
+
+ {
+ span: 24,
+ label: "人员类型",
+ prop: "peopleType",
+ type: 'select',
+ dicData: [{
+ label: '网格员',
+ value: 0
+ }, {
+ label: '物业公司人员',
+ value: 2
+ }],
+ cascader: ["transferUserId"],
+ rules: [{
+ required: true,
+ message: "请选择人员类型",
+ trigger: "blur",
+ }],
+ },
+
+ {
+ span: 24,
+ label: "指定人员",
+ prop: "transferUserId",
+ type: 'select',
+ dicUrl: `/api/blade-system/user/getUserInfoByCode?houseCode={{addressCode}}&type={{peopleType}}`,
+ props: {
+ label: "name",
+ value: "id",
+ },
+ change: ({
+ value,
+ column,
+ item,
+ dic
+ }) => {
+ this.curPeopleDetails = {}
+
+ if (value) {
+ this.curPeopleDetails = item
+ }
+ },
+ rules: [{
+ required: true,
+ message: "请选择指定人员",
+ trigger: "blur",
+ }],
+ },
+ ]
+ },
+
+ curRow: {},
+
+ fileList: [],
+ updateHeader: {
+ Authorization: `Basic ${Base64.encode(`${website.clientId}:${website.clientSecret}`)}`,
+ 'Blade-Auth': getToken()
+ },
+
+ curPeopleDetails: {},
+
+ videoFlag: false,
+ videoUploadPercent: ''
+ }
+ },
+ watch: {},
+ computed: {
+ ...mapGetters(["permission", "userInfo"]),
+ permissionList() {
+ return {
+ addBtn: this.vaildData(this.permission.reportForRepairs_add, true),
+ viewBtn: this.vaildData(this.permission.reportForRepairs_view, true),
+ delBtn: this.vaildData(this.permission.reportForRepairs_delete, true),
+ editBtn: this.vaildData(this.permission.reportForRepairs_edit, true),
+ }
+ },
+
+ ids() {
+ let ids = []
+ this.selectionList.forEach((ele) => {
+ ids.push(ele.id)
+ })
+ return ids.join(",")
+ },
+
+ timeLineData() {
+ return (row) => {
+ let imageList = row.imageUrls
+
+ if (row.taskRepairAppraiseList.length) {
+ return [{
+ createTime: row.createTime,
+ mobile: row.phone,
+ name: row.realName,
+ imageList,
+ content: row.remark,
+ color: '#1890ff',
+ contentType: 0,
+ },
+ ...row.taskRepairStepList.map((item, index) => {
+ if (index == 0) {
+ return {
+ ...item,
+ contentType: 0,
+ }
+ }
+ return {
+ ...item,
+ contentType: 0
+ }
+ }),
+ ...row.taskRepairAppraiseList.map(item => {
+ return {
+ ...item,
+ contentType: 1
+ }
+ }),
+ {
+ contentType: 3,
+ createTime: '',
+ icon: 'el-icon-check',
+ color: '#0bbd87'
+ }
+ ]
+ } else {
+ return [{
+ createTime: row.createTime,
+ mobile: row.phone,
+ name: row.realName,
+ imageList,
+ content: row.remark,
+ color: '#1890ff',
+ contentType: 0,
+ },
+ ...row.taskRepairStepList.map((item, index) => {
+ if (index == 0) {
+ return {
+ ...item,
+ contentType: 0,
+ }
+ }
+ return {
+ ...item,
+ contentType: 0
+ }
+ })
+ ]
+ }
+ }
+ },
+
+ showCurImage() {
+ return (data) => {
+ if (data != null && data.length > 0) {
+ return data.split(',').filter(item => item != '')[0]
+ }
+ return ''
+ }
+ },
+
+ showImageListData() {
+ return (data) => {
+ if (data != null && data.length > 0) {
+ return data.split(',').filter(item => item != '')
+ }
+ return []
+ }
+ },
+
+ showConfirmFlag() {
+ return (data) => {
+ let tags = {}
+
+ if (data == 1) {
+ tags = {
+ type: 'warning',
+ text: '待处理'
+ }
+ } else if (data == 2) {
+ tags = {
+ type: '',
+ text: '处理中'
+ }
+ } else if (data == 3) {
+ tags = {
+ type: 'success',
+ text: '已处理'
+ }
+ } else if (data == 4) {
+ tags = {
+ type: 'success',
+ text: '已评价'
+ }
+ }
+
+ return tags
+ }
+ },
+
+ textDispose() {
+ return (row, flag, type) => {
+ if (row[flag] || row[type] == null) {
+ return row[type]
+ } else {
+ if (type == 'principalIdCard') {
+ return row[type].replace(/^(.{6})(?:\d+)(.{4})$/, "$1******$2")
+ } else {
+ return row[type].replace(/^(.{3})(?:\d+)(.{4})$/, "$1****$2")
+ }
+ }
+ }
+ }
+ },
+ methods: {
+ showStringDispose(row, type) {
+ row[type] = !row[type]
+ },
+
+ rowExpansion(row) {
+ this.$refs.crud.toggleRowExpansion(row)
+ },
+
+ popupClose() {
+ this.$refs.replyForm && this.$refs.replyForm.resetForm()
+ this.$refs.turnOverForm && this.$refs.turnOverForm.resetForm()
+ },
+
+ saveReply(data, done) {
+ saveReply(data).then(
+ () => {
+ this.replyPopup = false
+ this.turnOverPopup = false
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ done()
+ },
+ (error) => {
+ window.console.log(error)
+ }
+ )
+ },
+
+ handleSubmit(form, done) {
+
+ if (form.imageList.length > 0) {
+ var urls = []
+ var split = form.imageList.split(",").filter(item => item != '')
+ split.forEach(url => {
+ var names = url.split("jczz/")
+ urls.push(names[1])
+ })
+ form.imageList = urls.join(",")
+ }
+ // if (form.imageList.length > 0) {
+ // var urls = []
+ // var split = form.imageList.split(",").filter(item => item != '')
+ // split.forEach(url => {
+ // var names = url.split("jczz/")
+ // urls.push(names[1])
+ // })
+ // form.imageList = urls.join(",")
+ // }
+
+ this.saveReply({
+ ...form,
+ videoList: this.fileList.map(item => item.response.data.link).join(','),
+ repairId: this.curRow.id,
+ peopleType: 0,
+ mobile: this.userInfo.phone
+ }, done)
+ },
+
+ handleReset() {
+ this.fileList = []
+ this.replyPopup = false
+ },
+
+ turnOverHandleSubmit(form, done) {
+ let content = ''
+
+ if (form.peopleType == 0) {
+ content = `事件已移交至 网格员 ${this.curPeopleDetails.name}`
+ } else if (form.peopleType == 2) {
+ content = `事件已移交至 物业公司人员 ${this.curPeopleDetails.distictName || ''}${this.curPeopleDetails.name}`
+ }
+
+ this.saveReply({
+ ...form,
+ confirmFlag: 1,
+ content,
+ peopleType: 1,
+ repairId: this.curRow.id,
+ }, done)
+ },
+
+ turnOverHandleReset() {
+ this.turnOverPopup = false
+ },
+
+ //移除
+ beforeRemove(file, fileList) {
+ return this.$confirm(`确定移除 ${file.name}?`).then(() => {
+ this.fileList = fileList
+ })
+ },
+
+ //上传
+ getFile(file, fileList) {
+ this.fileList = fileList
+ },
+
+ beforeUploadVideo(file) {
+ const isLt50M = file.size / 1024 / 1024 < 50
+ if (['video/mp4'].indexOf(file.type) == -1) {
+ this.$message.error('上传视频只能是 mp4 格式!')
+ return false
+ }
+ if (!isLt50M) {
+ this.$message.error('上传视频大小不能超过 50MB!')
+ return false
+ }
+ return true
+ },
+
+ handleExceed(files, fileList) {
+ this.$message.warning("目前只能上传一个视频文件")
+ },
+
+ uploadVideoProcess(event, file, fileList) {
+ console.log(event, file, fileList, this.fileList)
+ },
+
+ replyBtnClick(row) {
+ this.curRow = row
+ this.replyForm = {}
+ this.replyPopup = true
+ },
+
+ turnOverBtnClick(row) {
+ this.curRow = row
+ this.turnOverForm = {
+ addressCode: row.addressCode
+ }
+ this.turnOverPopup = true
+ },
+
+ rowSave(row, done, loading) {
+ if (row.imageUrls.length > 0) {
+ var urls = []
+ var split = row.imageUrls.split(",")
+ split.forEach(url => {
+ var names = url.split("jczz/")
+ urls.push(names[1])
+ })
+ row.imageUrls = urls.join(",")
+ }
+ add(row).then(
+ () => {
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ done()
+ },
+ (error) => {
+ window.console.log(error)
+ loading()
+ }
+ )
+ },
+ rowUpdate(row, index, done, loading) {
+ if (row.imageUrls.length > 0) {
+ var urls = []
+ var split = row.imageUrls.split(",")
+ split.forEach(url => {
+ var names = url.split("jczz/")
+ urls.push(names[1])
+ })
+ row.imageUrls = urls.join(",")
+ }
+ update(row).then(
+ () => {
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ done()
+ },
+ (error) => {
+ window.console.log(error)
+ loading()
+ }
+ )
+ },
+ rowDel(row) {
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ return remove(row.id)
+ })
+ .then(() => {
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ })
+ },
+ searchReset() {
+ this.query = {}
+ this.onLoad(this.page)
+ },
+ searchChange(params, done) {
+ this.query = params
+ this.page.currentPage = 1
+ this.onLoad(this.page, params)
+ done()
+ },
+ selectionChange(list) {
+ this.selectionList = list
+ },
+ selectionClear() {
+ this.selectionList = []
+ this.$refs.crud.toggleSelection()
+ },
+ handleDelete() {
+ if (this.selectionList.length === 0) {
+ this.$message.warning("请选择至少一条数据")
+ return
+ }
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ return remove(this.ids)
+ })
+ .then(() => {
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ this.$refs.crud.toggleSelection()
+ })
+ },
+ beforeOpen(done, type) {
+ if (["edit", "view"].includes(type)) {
+ getReportForRepairs(this.form.id).then((res) => {
+ this.form = res.data.data
+ if (this.form.imageUrls) {
+ if (this.form.imageUrls.length > 0) {
+ var urls = []
+ var names = this.form.imageUrls.split(",")
+ names.forEach(name => {
+ urls.push(website.minioUrl + name)
+ })
+ this.form.imageUrls = urls.join(",")
+ }
+ }
+ })
+ }
+
+ done()
+ },
+ currentChange(currentPage) {
+ this.page.currentPage = currentPage
+ },
+ sizeChange(pageSize) {
+ this.page.pageSize = pageSize
+ },
+ refreshChange() {
+ this.onLoad(this.page, this.query)
+ },
+ onLoad(page, params = {}) {
+ const {
+ dateTime
+ } = this.query
+ let values = {
+ ...params,
+ }
+ if (dateTime) {
+ values = {
+ ...params,
+ startTime: dateTime[0],
+ endTime: dateTime[1],
+ ...this.query,
+ }
+ values.dateTime = null
+ }
+ this.loading = true
+ getList(page.currentPage, page.pageSize, values).then((res) => {
+ const data = res.data.data
+ this.page.total = data.total
+ this.data = data.records
+ this.data.forEach(item => {
+ this.$set(item, 'phoneflag', false)
+ if (item.imageUrls) {
+ if (item.imageUrls.length > 0) {
+ var urls = []
+ var names = item.imageUrls.split(",")
+ names.forEach(name => {
+ urls.push(website.minioUrl + name)
+ })
+ item.imageUrls = urls.join(",")
+ }
+ }
+ if (item.taskRepairStepList.length > 0) {
+ item.taskRepairStepList.forEach(ee => {
+ if (ee.imageList) {
+ if (ee.imageList.length > 0) {
+ var urls = []
+ var names = ee.imageList.split(",")
+ names.forEach(name => {
+ urls.push(website.minioUrl + name)
+ })
+ ee.imageList = urls.join(",")
+ }
+ }
+ })
+ }
+ })
+ this.loading = false
+ this.selectionClear()
+ })
+ }
+ },
+ }
+</script>
+
+<style>
+ .avue-upload__icon {
+ line-height: 6;
+ }
+</style>
\ No newline at end of file
diff --git a/src/views/user/dept.vue b/src/views/user/dept.vue
new file mode 100644
index 0000000..5caff7e
--- /dev/null
+++ b/src/views/user/dept.vue
@@ -0,0 +1,390 @@
+<template>
+ <basic-container>
+ <avue-crud :option="option" :table-loading="loading" :data="data" ref="crud" v-model="form"
+ :permission="permissionList" :before-open="beforeOpen" :before-close="beforeClose" @row-del="rowDel"
+ @row-update="rowUpdate" @row-save="rowSave" @search-change="searchChange" @search-reset="searchReset"
+ @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
+ @refresh-change="refreshChange" @on-load="onLoad" @tree-load="treeLoad">
+ <template slot="menuLeft">
+ <el-button type="danger" size="small" icon="el-icon-delete" v-if="permission.dept_delete_all" plain
+ @click="handleDelete">删 除
+ </el-button>
+ </template>
+
+ <template slot-scope="{row, size, index}" slot="menu">
+ <el-button type="text" icon="el-icon-delete" :size="size" @click.stop="$refs.crud.rowDel(row, index)"
+ v-if="permission.dept_delete && showCurRowDelete(row)">删除
+ </el-button>
+
+ <el-button type="text" icon="el-icon-circle-plus-outline" :size="size" @click.stop="handleAdd(row, index)"
+ v-if="permission.add_children">新增子项
+ </el-button>
+ </template>
+
+ <template slot-scope="{row}" slot="deptCategory">
+ <el-tag>{{ row.deptCategoryName }}</el-tag>
+ </template>
+ </avue-crud>
+ </basic-container>
+</template>
+
+<script>
+import {
+ getLazyList,
+ remove,
+ update,
+ add,
+ getDept,
+ getDeptTree
+} from "@/api/system/dept"
+import { mapGetters } from "vuex"
+import website from '@/config/website'
+
+export default {
+ data () {
+ return {
+ form: {},
+ selectionList: [],
+ query: {},
+ loading: true,
+ parentId: 0,
+ page: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0,
+ },
+ option: {
+ lazy: true,
+ tip: false,
+ simplePage: true,
+ searchShow: true,
+ searchMenuSpan: 6,
+ tree: true,
+ border: true,
+ index: true,
+ selection: true,
+ viewBtn: true,
+ menuWidth: 300,
+ dialogClickModal: false,
+ column: [
+ {
+ label: "机构名称",
+ prop: "deptName",
+ search: true,
+ searchLabelWidth: 76,
+ rules: [{
+ required: true,
+ message: "请输入机构名称",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "所属租户",
+ prop: "tenantId",
+ type: "tree",
+ dicUrl: "/api/blade-system/tenant/select",
+ addDisplay: false,
+ editDisplay: false,
+ viewDisplay: false,
+ span: 24,
+ props: {
+ label: "tenantName",
+ value: "tenantId"
+ },
+ hide: true,
+ search: false,
+ rules: [{
+ required: true,
+ message: "请输入所属租户",
+ trigger: "click"
+ }]
+ },
+ {
+ label: "机构全称",
+ prop: "fullName",
+ search: true,
+ searchLabelWidth: 100,
+ rules: [{
+ required: true,
+ message: "请输入机构全称",
+ trigger: "blur"
+ }]
+ },
+ {
+ display: false,
+ label: "上级机构",
+ prop: "parentId",
+ dicData: [],
+ type: "tree",
+ hide: true,
+ addDisabled: false,
+ props: {
+ label: "title"
+ },
+ rules: [{
+ required: false,
+ message: "请选择上级机构",
+ trigger: "click"
+ }]
+ },
+ {
+ label: "机构类型",
+ type: "select",
+ dicUrl: "/api/blade-system/dict/dictionary?code=org_category",
+ props: {
+ label: "dictValue",
+ value: "dictKey"
+ },
+ dataType: "number",
+ width: 120,
+ prop: "deptCategory",
+ slot: true,
+ rules: [{
+ required: true,
+ message: "请输入机构类型",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "机构性质",
+ type: "select",
+ dicUrl: "/api/blade-system/dict/dictionary?code=org_nature",
+ props: {
+ label: "dictValue",
+ value: "dictKey"
+ },
+ hide:true,
+ dataType: "number",
+ prop: "deptNature",
+ cascader: ["regionCode"],
+ slot: true,
+ rules: [{
+ required: true,
+ message: "请输入机构性质",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "管辖区域",
+ prop: "regionCode",
+ type: "tree",
+ dicUrl: "/api/blade-system/region/tree?deptNature={{deptNature}}",
+ props: {
+ label: "name",
+ value: "id",
+ },
+ hide:true,
+ defaultExpandedKeys: ["361102003"],
+ rules: [{
+ required: false,
+ message: "请选择管辖区域",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "排序",
+ prop: "sort",
+ type: "number",
+ align: "right",
+ width: 80,
+ rules: [{
+ required: true,
+ message: "请输入排序",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "备注",
+ prop: "remark",
+ rules: [{
+ required: false,
+ message: "请输入备注",
+ trigger: "blur"
+ }],
+ span: 24,
+ hide: true
+ }
+ ]
+ },
+ data: []
+ }
+ },
+ computed: {
+ ...mapGetters(["userInfo", "permission"]),
+ permissionList () {
+ return {
+ addBtn: this.vaildData(this.permission.dept_add, false),
+ viewBtn: this.vaildData(this.permission.dept_view, false),
+ delBtn: this.vaildData(false, true),
+ editBtn: this.vaildData(this.permission.dept_edit, false)
+ }
+ },
+ ids () {
+ let ids = []
+ this.selectionList.forEach(ele => {
+ ids.push(ele.id)
+ })
+ return ids.join(",")
+ },
+
+ showCurRowDelete () {
+ return (row) => {
+ return !(row.id == this.userInfo.dept_id)
+ }
+ }
+ },
+ methods: {
+ initData () {
+ getDeptTree().then(res => {
+ const column = this.findObject(this.option.column, "parentId")
+ column.dicData = res.data.data
+ })
+ },
+ handleAdd (row) {
+ this.parentId = row.id
+ const column = this.findObject(this.option.column, "parentId")
+ column.value = row.id
+ column.addDisabled = true
+ this.$refs.crud.rowAdd()
+ },
+ rowSave (row, done, loading) {
+ add(row).then((res) => {
+ // 获取新增数据的相关字段
+ const data = res.data.data
+ row.id = data.id
+ row.deptCategoryName = data.deptCategoryName
+ row.tenantId = data.tenantId
+ this.$message({
+ type: "success",
+ message: "操作成功!"
+ })
+ // 数据回调进行刷新
+ done(row)
+ }, error => {
+ window.console.log(error)
+ loading()
+ })
+ },
+ rowUpdate (row, index, done, loading) {
+ update(row).then(() => {
+ this.$message({
+ type: "success",
+ message: "操作成功!"
+ })
+ // 数据回调进行刷新
+ done(row)
+ }, error => {
+ window.console.log(error)
+ loading()
+ })
+ },
+ rowDel (row, index, done) {
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning"
+ })
+ .then(() => {
+ return remove(row.id)
+ })
+ .then(() => {
+ this.$message({
+ type: "success",
+ message: "操作成功!"
+ })
+ // 数据回调进行刷新
+ done(row)
+ })
+ },
+ handleDelete () {
+ if (this.selectionList.length === 0) {
+ this.$message.warning("请选择至少一条数据")
+ return
+ }
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning"
+ })
+ .then(() => {
+ return remove(this.ids)
+ })
+ .then(() => {
+ // 刷新表格数据并重载
+ this.data = []
+ this.parentId = 0
+ this.$refs.crud.refreshTable()
+ this.$refs.crud.toggleSelection()
+ // 表格数据重载
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!"
+ })
+ })
+ },
+ searchReset () {
+ this.query = {}
+ this.parentId = 0
+ this.onLoad(this.page)
+ },
+ searchChange (params, done) {
+ this.query = params
+ this.parentId = ''
+ this.page.currentPage = 1
+ this.onLoad(this.page, params)
+ done()
+ },
+ selectionChange (list) {
+ this.selectionList = list
+ },
+ selectionClear () {
+ this.selectionList = []
+ this.$refs.crud.toggleSelection()
+ },
+ beforeOpen (done, type) {
+ if (["add", "edit"].includes(type)) {
+ this.initData()
+ }
+ if (["edit", "view"].includes(type)) {
+ getDept(this.form.id).then(res => {
+ this.form = res.data.data
+ })
+ }
+ done()
+ },
+ beforeClose (done) {
+ this.parentId = ""
+ const column = this.findObject(this.option.column, "parentId")
+ column.value = ""
+ column.addDisabled = false
+ done()
+ },
+ currentChange (currentPage) {
+ this.page.currentPage = currentPage
+ },
+ sizeChange (pageSize) {
+ this.page.pageSize = pageSize
+ },
+ refreshChange () {
+ this.onLoad(this.page, this.query)
+ },
+ onLoad (page, params = {}) {
+ this.loading = true
+ getLazyList(this.parentId, Object.assign(params, this.query)).then(res => {
+ this.data = res.data.data
+ this.loading = false
+ this.selectionClear()
+ })
+ },
+ treeLoad (tree, treeNode, resolve) {
+ const parentId = tree.id
+ getLazyList(parentId).then(res => {
+ resolve(res.data.data)
+ })
+ }
+ }
+}
+</script>
+
+<style></style>
diff --git a/src/views/user/user.vue b/src/views/user/user.vue
new file mode 100644
index 0000000..898b687
--- /dev/null
+++ b/src/views/user/user.vue
@@ -0,0 +1,1013 @@
+<template>
+ <el-row>
+ <el-col :span="5">
+ <div class="box">
+ <el-scrollbar>
+ <basic-container>
+ <avue-tree :option="treeOption" :data="treeData" @node-click="nodeClick" />
+ </basic-container>
+ </el-scrollbar>
+ </div>
+ </el-col>
+ <el-col :span="19">
+ <basic-container>
+ <avue-crud :option="option" :search.sync="search" :table-loading="loading" :data="data" ref="crud"
+ v-model="form" :permission="permissionList" @row-del="rowDel" @row-update="rowUpdate" @row-save="rowSave"
+ :before-open="beforeOpen" :page.sync="page" @search-change="searchChange" @search-reset="searchReset"
+ @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
+ @refresh-change="refreshChange" @on-load="onLoad">
+ <template slot="menuLeft">
+ <el-button type="danger" size="small" plain icon="el-icon-delete" v-if="permission.user_delete"
+ @click="handleDelete">删 除
+ </el-button>
+ <el-button type="info" size="small" plain v-if="permission.user_role" icon="el-icon-user"
+ @click="handleGrant">角色配置
+ </el-button>
+ <el-button type="info" size="small" plain v-if="permission.user_reset" icon="el-icon-refresh"
+ @click="handleReset">密码重置
+ </el-button>
+ <!-- <el-button type="info"
+ size="small"
+ plain
+ v-if="userInfo.role_name.includes('admin')"
+ icon="el-icon-setting"
+ @click="handlePlatform">平台配置
+ </el-button> -->
+ <el-button type="info" size="small" plain v-if="userInfo.role_name.includes('admin')"
+ icon="el-icon-coordinate" @click="handleLock">账号解封
+ </el-button>
+ <el-button type="success" size="small" plain v-if="userInfo.role_name.includes('admin')"
+ icon="el-icon-upload2" @click="handleImport">导入
+ </el-button>
+ <el-button type="warning" size="small" plain v-if="userInfo.role_name.includes('admin')"
+ icon="el-icon-download" @click="handleExport">导出
+ </el-button>
+ </template>
+ <template slot-scope="{row}" slot="tenantName">
+ <el-tag>{{ row.tenantName }}</el-tag>
+ </template>
+ <template slot-scope="{row}" slot="roleName">
+ <el-tag>{{ row.roleName }}</el-tag>
+ </template>
+ <template slot-scope="{row}" slot="deptName">
+ <el-tag>{{ row.deptName }}</el-tag>
+ </template>
+ <template slot-scope="{row}" slot="userTypeName">
+ <el-tag>{{ row.userTypeName }}</el-tag>
+ </template>
+ </avue-crud>
+ <el-dialog title="用户角色配置" append-to-body :visible.sync="roleBox" width="345px">
+
+ <el-tree :data="roleGrantList" show-checkbox check-strictly default-expand-all node-key="id" ref="treeRole"
+ :default-checked-keys="roleTreeObj" :props="props">
+ </el-tree>
+
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="roleBox = false">取 消</el-button>
+ <el-button type="primary" @click="submitRole">确 定</el-button>
+ </span>
+ </el-dialog>
+ <el-dialog title="用户数据导入" append-to-body :visible.sync="excelBox" width="555px">
+ <avue-form :option="excelOption" v-model="excelForm" :upload-after="uploadAfter">
+ <template slot="excelTemplate">
+ <el-button type="primary" @click="handleTemplate">
+ 点击下载<i class="el-icon-download el-icon--right"></i>
+ </el-button>
+ </template>
+ </avue-form>
+ </el-dialog>
+ <!-- <el-dialog title="用户平台配置"
+ append-to-body
+ :visible.sync="platformBox">
+ <avue-crud :option="platformOption"
+ :table-loading="platformLoading"
+ :data="platformData"
+ ref="platformCrud"
+ v-model="platformForm"
+ :before-open="platformBeforeOpen"
+ :page.sync="platformPage"
+ :permission="platformPermissionList"
+ @row-update="platformRowUpdate"
+ @search-change="platformSearchChange"
+ @search-reset="platformSearchReset"
+ @selection-change="platformSelectionChange"
+ @current-change="platformCurrentChange"
+ @size-change="platformSizeChange"
+ @refresh-change="platformRefreshChange"
+ @on-load="platformOnLoad">
+ <template slot-scope="{row}"
+ slot="tenantName">
+ <el-tag>{{row.tenantName}}</el-tag>
+ </template>
+ <template slot-scope="{row}"
+ slot="userTypeName">
+ <el-tag>{{row.userTypeName}}</el-tag>
+ </template>
+ </avue-crud>
+ </el-dialog> -->
+ </basic-container>
+ </el-col>
+ </el-row>
+</template>
+
+<script>
+ import {
+ getList,
+ getUser,
+ getUserPlatform,
+ remove,
+ update,
+ updatePlatform,
+ add,
+ grant,
+ resetPassword,
+ unlock
+ } from "@/api/system/user"
+ import {
+ exportBlob
+ } from "@/api/common"
+ import {
+ getDeptTree,
+ getDeptLazyTree
+ } from "@/api/system/dept"
+ import {
+ getRoleTree
+ } from "@/api/system/role"
+ import {
+ getPostList
+ } from "@/api/system/post"
+ import {
+ mapGetters
+ } from "vuex"
+ import website from '@/config/website'
+ import {
+ getToken
+ } from '@/util/auth'
+ import {
+ downloadXls
+ } from "@/util/util"
+ import {
+ dateNow
+ } from "@/util/date"
+ import NProgress from 'nprogress'
+ import 'nprogress/nprogress.css'
+ import func from "@/util/func"
+
+ export default {
+ data() {
+ const validatePass = (rule, value, callback) => {
+ if (value === '') {
+ callback(new Error('请输入密码'))
+ } else {
+ callback()
+ }
+ }
+ const validatePass2 = (rule, value, callback) => {
+ if (value === '') {
+ callback(new Error('请再次输入密码'))
+ } else if (value !== this.form.password) {
+ callback(new Error('两次输入密码不一致!'))
+ } else {
+ callback()
+ }
+ }
+ return {
+ form: {},
+ search: {},
+ roleBox: false,
+ excelBox: false,
+ platformBox: false,
+ initFlag: true,
+ selectionList: [],
+ query: {},
+ loading: true,
+ platformLoading: false,
+ page: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0
+ },
+ platformPage: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0
+ },
+ init: {
+ roleTree: [],
+ deptTree: [],
+ },
+ props: {
+ label: "title",
+ value: "key"
+ },
+ roleGrantList: [],
+ roleTreeObj: [],
+ treeDeptId: '',
+ treeData: [],
+ treeOption: {
+ nodeKey: 'id',
+ lazy: true,
+ treeLoad: function(node, resolve) {
+ const parentId = (node.level === 0) ? 0 : node.data.id
+ getDeptLazyTree(parentId).then(res => {
+ resolve(res.data.data.map(item => {
+ return {
+ ...item,
+ leaf: !item.hasChildren
+ }
+ }))
+ })
+ },
+ addBtn: false,
+ menu: false,
+ size: 'small',
+ props: {
+ labelText: '标题',
+ label: 'title',
+ value: 'value',
+ children: 'children'
+ }
+ },
+ option: {
+ height: 'auto',
+ calcHeight: 80,
+ tip: false,
+ searchShow: true,
+ searchMenuSpan: 6,
+ border: true,
+ index: true,
+ selection: true,
+ viewBtn: true,
+ dialogType: 'drawer',
+ dialogClickModal: false,
+ column: [{
+ label: "登录账号",
+ prop: "account",
+ search: true,
+ searchLabelWidth: 76,
+ display: false
+ },
+ // {
+ // label: "所属租户",
+ // prop: "tenantName",
+ // slot: true,
+ // display: false
+ // },
+ {
+ label: "用户姓名",
+ prop: "realName",
+ search: true,
+ display: false
+ },
+ {
+ label: "所属角色",
+ prop: "roleName",
+ slot: true,
+ display: false
+ },
+ {
+ label: "所属部门",
+ prop: "deptName",
+ slot: true,
+ display: false
+ },
+ // {
+ // label: "用户平台",
+ // prop: "userTypeName",
+ // slot: true,
+ // display: false
+ // },
+ // {
+ // label: "用户平台",
+ // type: "select",
+ // dicUrl: "/api/blade-system/dict/dictionary?code=user_type",
+ // props: {
+ // label: "dictValue",
+ // value: "dictKey"
+ // },
+ // dataType: "number",
+ // search: true,
+ // hide: true,
+ // display: false,
+ // prop: "userType",
+ // rules: [{
+ // required: true,
+ // message: "请选择用户平台",
+ // trigger: "blur"
+ // }]
+ // },
+ ],
+ group: [{
+ label: '基础信息',
+ prop: 'baseInfo',
+ icon: 'el-icon-user-solid',
+ column: [
+ // {
+ // label: "所属租户",
+ // prop: "tenantId",
+ // type: "tree",
+ // dicUrl: "/api/blade-system/tenant/select",
+ // props: {
+ // label: "tenantName",
+ // value: "tenantId"
+ // },
+ // hide: !website.tenantMode,
+ // addDisplay: website.tenantMode,
+ // editDisplay: website.tenantMode,
+ // viewDisplay: website.tenantMode,
+ // rules: [{
+ // required: true,
+ // message: "请输入所属租户",
+ // trigger: "click"
+ // }],
+ // span: 24,
+ // },
+ {
+ label: "登录账号",
+ prop: "account",
+ rules: [{
+ required: true,
+ message: "请输入登录账号",
+ trigger: "blur"
+ }],
+ },
+ // {
+ // label: "用户平台",
+ // type: "select",
+ // dicUrl: "/api/blade-system/dict/dictionary?code=user_type",
+ // props: {
+ // label: "dictValue",
+ // value: "dictKey"
+ // },
+ // dataType: "number",
+ // slot: true,
+ // prop: "userType",
+ // rules: [{
+ // required: true,
+ // message: "请选择用户平台",
+ // trigger: "blur"
+ // }]
+ // },
+ {
+ label: '密码',
+ prop: 'password',
+ hide: true,
+ editDisplay: false,
+ viewDisplay: false,
+ rules: [{
+ required: true,
+ validator: validatePass,
+ trigger: 'blur'
+ }]
+ },
+ {
+ label: '确认密码',
+ prop: 'password2',
+ hide: true,
+ editDisplay: false,
+ viewDisplay: false,
+ rules: [{
+ required: true,
+ validator: validatePass2,
+ trigger: 'blur'
+ }]
+ },
+ ]
+ },
+ {
+ label: '详细信息',
+ prop: 'detailInfo',
+ icon: 'el-icon-s-order',
+ column: [{
+ label: "用户昵称",
+ prop: "name",
+ hide: true,
+ rules: [{
+ required: true,
+ message: "请输入用户昵称",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "用户姓名",
+ prop: "realName",
+ rules: [{
+ required: true,
+ message: "请输入用户姓名",
+ trigger: "blur"
+ }, {
+ min: 2,
+ max: 5,
+ message: '姓名长度在2到5个字符'
+ }]
+ },
+ {
+ label: "手机号码",
+ prop: "phone",
+ overHidden: true
+ },
+ {
+ label: "电子邮箱",
+ prop: "email",
+ hide: true,
+ overHidden: true
+ },
+ {
+ label: "用户性别",
+ prop: "sex",
+ type: "select",
+ dicData: [{
+ label: "男",
+ value: 1
+ },
+ {
+ label: "女",
+ value: 2
+ },
+ {
+ label: "未知",
+ value: 3
+ }
+ ],
+ hide: true
+ },
+ {
+ label: "用户生日",
+ type: "date",
+ prop: "birthday",
+ format: "yyyy-MM-dd hh:mm:ss",
+ valueFormat: "yyyy-MM-dd hh:mm:ss",
+ hide: true
+ },
+ {
+ label: "账号状态",
+ prop: "statusName",
+ hide: true,
+ display: false
+ }
+ ]
+ },
+ {
+ label: '职责信息',
+ prop: 'dutyInfo',
+ icon: 'el-icon-s-custom',
+ column: [
+ // {
+ // label: "用户编号",
+ // prop: "code",
+ // },
+ {
+ label: "所属角色",
+ prop: "roleId",
+ type: "tree",
+ multiple: true,
+ checkStrictly: true,
+ leafOnly: false,
+ dicData: [],
+ props: {
+ label: "title",
+ value: "id"
+ },
+ rules: [{
+ required: true,
+ message: "请选择所属角色",
+ trigger: "click"
+ }]
+ },
+ {
+ label: "所属部门",
+ prop: "deptId",
+ type: "tree",
+ multiple: true,
+ leafOnly: false,
+ dicData: [],
+ // dataType: "string",
+ props: {
+ label: "title",
+ value: "id"
+ },
+ checkStrictly: true,
+ slot: true,
+ span: 12,
+ rules: [{
+ required: true,
+ message: "请选择所属部门",
+ trigger: "click"
+ }]
+ },
+ // {
+ // label: "所属岗位",
+ // prop: "postId",
+ // type: "tree",
+ // multiple: true,
+ // dicData: [],
+ // props: {
+ // label: "postName",
+ // value: "id"
+ // },
+ // rules: [{
+ // required: true,
+ // message: "请选择所属岗位",
+ // trigger: "click"
+ // }],
+ // },
+ ]
+ },
+ ]
+ },
+ data: [],
+ platformQuery: {},
+ platformSelectionList: [],
+ platformData: [],
+ platformForm: {},
+ platformOption: {
+ tip: false,
+ searchShow: true,
+ searchMenuSpan: 6,
+ border: true,
+ index: true,
+ selection: true,
+ viewBtn: true,
+ dialogClickModal: false,
+ menuWidth: 120,
+ editBtnText: '配置',
+ column: [{
+ label: "登录账号",
+ prop: "account",
+ search: true,
+ display: false
+ },
+ {
+ label: "所属租户",
+ prop: "tenantName",
+ slot: true,
+ display: false
+ },
+ {
+ label: "用户姓名",
+ prop: "realName",
+ search: true,
+ display: false
+ },
+ {
+ label: "用户平台",
+ prop: "userTypeName",
+ slot: true,
+ display: false
+ },
+ {
+ label: "用户平台",
+ type: "select",
+ dicUrl: "/api/blade-system/dict/dictionary?code=user_type",
+ props: {
+ label: "dictValue",
+ value: "dictKey"
+ },
+ dataType: "number",
+ search: true,
+ hide: true,
+ display: false,
+ prop: "userType",
+ rules: [{
+ required: true,
+ message: "请选择用户平台",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "用户拓展",
+ prop: "userExt",
+ type: "textarea",
+ minRows: 8,
+ span: 24,
+ overHidden: true,
+ row: true,
+ hide: true,
+ },
+ ],
+ },
+ excelForm: {},
+ excelOption: {
+ submitBtn: false,
+ emptyBtn: false,
+ column: [{
+ label: '模板上传',
+ prop: 'excelFile',
+ type: 'upload',
+ drag: true,
+ loadText: '模板上传中,请稍等',
+ span: 24,
+ propsHttp: {
+ res: 'data'
+ },
+ tip: '请上传 .xls,.xlsx 标准格式文件',
+ action: "/api/blade-system/user/import-user"
+ },
+ {
+ label: "数据覆盖",
+ prop: "isCovered",
+ type: "switch",
+ align: "center",
+ width: 80,
+ dicData: [{
+ label: "否",
+ value: 0
+ },
+ {
+ label: "是",
+ value: 1
+ }
+ ],
+ value: 0,
+ slot: true,
+ rules: [{
+ required: true,
+ message: "请选择是否覆盖",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: '模板下载',
+ prop: 'excelTemplate',
+ formslot: true,
+ span: 24,
+ }
+ ]
+ }
+ }
+ },
+ watch: {
+ 'form.tenantId'() {
+ if (this.form.tenantId !== '' && this.initFlag) {
+ this.initData(this.form.tenantId)
+ }
+ },
+ 'excelForm.isCovered'() {
+ if (this.excelForm.isCovered !== '') {
+ const column = this.findObject(this.excelOption.column, "excelFile")
+ column.action = `/api/blade-system/user/import-user?isCovered=${this.excelForm.isCovered}`
+ }
+ }
+ },
+ computed: {
+ ...mapGetters(["userInfo", "permission"]),
+ permissionList() {
+ return {
+ addBtn: this.vaildData(this.permission.user_add, false),
+ viewBtn: this.vaildData(this.permission.user_view, false),
+ delBtn: this.vaildData(this.permission.user_delete, false),
+ editBtn: this.vaildData(this.permission.user_edit, false)
+ }
+ },
+ platformPermissionList() {
+ return {
+ addBtn: false,
+ viewBtn: false,
+ delBtn: false,
+ editBtn: this.vaildData(this.permission.user_edit, false)
+ }
+ },
+ ids() {
+ let ids = []
+ this.selectionList.forEach(ele => {
+ ids.push(ele.id)
+ })
+ return ids.join(",")
+ },
+ },
+ mounted() {
+ // 非租户模式默认加载管理组数据
+ if (!website.tenantMode) {
+ this.initData(website.tenantId)
+ }
+ },
+ created() {
+ this.initData(website.tenantId)
+ },
+ methods: {
+ nodeClick(data) {
+ this.treeDeptId = data.id
+ this.page.currentPage = 1
+ this.onLoad(this.page)
+ },
+ initData(tenantId) {
+ getRoleTree(tenantId).then(res => {
+ const column = this.findObject(this.option.group, "roleId")
+ column.dicData = res.data.data
+ })
+ getDeptTree(tenantId).then(res => {
+ const column = this.findObject(this.option.group, "deptId")
+ column.dicData = res.data.data
+ })
+ // getPostList(tenantId).then(res => {
+ // const column = this.findObject(this.option.group, "postId");
+ // column.dicData = res.data.data;
+ // });
+ },
+ submitRole() {
+ const roleList = this.$refs.treeRole.getCheckedKeys().join(",")
+ grant(this.ids, roleList).then(() => {
+ this.roleBox = false
+ this.$message({
+ type: "success",
+ message: "操作成功!"
+ })
+ this.onLoad(this.page)
+ })
+ },
+ rowSave(row, done, loading) {
+ row['tenantId'] = "000000"
+ row['userType'] = 1
+ row.deptId = func.join(row.deptId)
+ row.roleId = func.join(row.roleId)
+ // row.postId = func.join(row.postId)
+ add(row).then(() => {
+ this.initFlag = false
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!"
+ })
+ done()
+ }, error => {
+ window.console.log(error)
+ loading()
+ })
+ },
+ rowUpdate(row, index, done, loading) {
+ row['tenantId'] = "000000"
+ row['userType'] = 1
+ row.deptId = func.join(row.deptId)
+ row.roleId = func.join(row.roleId)
+ // row.postId = func.join(row.postId)
+ update(row).then(() => {
+ this.initFlag = false
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!"
+ })
+ done()
+ }, error => {
+ window.console.log(error)
+ loading()
+ })
+ },
+ rowDel(row) {
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning"
+ })
+ .then(() => {
+ return remove(row.id)
+ })
+ .then(() => {
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!"
+ })
+ })
+ },
+ searchReset() {
+ this.query = {}
+ this.treeDeptId = ''
+ this.onLoad(this.page)
+ },
+ searchChange(params, done) {
+ this.query = params
+ this.page.currentPage = 1
+ this.onLoad(this.page, params)
+ done()
+ },
+ selectionChange(list) {
+ this.selectionList = list
+ },
+ selectionClear() {
+ this.selectionList = []
+ this.$refs.crud.toggleSelection()
+ },
+ handleDelete() {
+ if (this.selectionList.length === 0) {
+ this.$message.warning("请选择至少一条数据")
+ return
+ }
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning"
+ })
+ .then(() => {
+ return remove(this.ids)
+ })
+ .then(() => {
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!"
+ })
+ this.$refs.crud.toggleSelection()
+ })
+ },
+ handleReset() {
+ if (this.selectionList.length === 0) {
+ this.$message.warning("请选择至少一条数据")
+ return
+ }
+ this.$confirm("确定将选择账号密码重置为123456?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning"
+ })
+ .then(() => {
+ return resetPassword(this.ids)
+ })
+ .then(() => {
+ this.$message({
+ type: "success",
+ message: "操作成功!"
+ })
+ this.$refs.crud.toggleSelection()
+ })
+ },
+ handleGrant() {
+ if (this.selectionList.length === 0) {
+ this.$message.warning("请选择至少一条数据")
+ return
+ }
+ this.roleTreeObj = []
+ if (this.selectionList.length === 1) {
+ this.roleTreeObj = this.selectionList[0].roleId.split(",")
+ }
+ getRoleTree().then(res => {
+ this.roleGrantList = res.data.data
+ this.roleBox = true
+ })
+ },
+ handlePlatform() {
+ this.platformBox = true
+ },
+ handleLock() {
+ if (this.selectionList.length === 0) {
+ this.$message.warning("请选择至少一条数据")
+ return
+ }
+ this.$confirm("确定将选择账号解封?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning"
+ })
+ .then(() => {
+ return unlock(this.ids)
+ })
+ .then(() => {
+ this.$message({
+ type: "success",
+ message: "操作成功!"
+ })
+ })
+ },
+ handleImport() {
+ this.excelBox = true
+ },
+ uploadAfter(res, done, loading, column) {
+ window.console.log(column)
+ this.excelBox = false
+ this.refreshChange()
+ done()
+ },
+ handleExport() {
+ const account = func.toStr(this.search.account)
+ const realName = func.toStr(this.search.realName)
+ const deptId = this.treeDeptId
+ this.$confirm("是否导出用户数据?", "提示", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning"
+ }).then(() => {
+ NProgress.start()
+ exportBlob(
+ `/api/blade-system/user/export-user?${this.website.tokenHeader}=${getToken()}&account=${account}&realName=${realName}&deptId=${deptId}`
+ ).then(res => {
+ downloadXls(res.data, `用户数据表${dateNow()}.xlsx`)
+ NProgress.done()
+ })
+ })
+ },
+ handleTemplate() {
+ exportBlob(`/api/blade-system/user/export-template?${this.website.tokenHeader}=${getToken()}`).then(res => {
+ downloadXls(res.data, "用户数据模板.xlsx")
+ })
+ },
+ beforeOpen(done, type) {
+ if (["edit", "view"].includes(type)) {
+ getUser(this.form.id).then(res => {
+ this.form = res.data.data
+ if (this.form.hasOwnProperty("deptId")) {
+ this.form.deptId = this.form.deptId.split(",")
+ }
+ if (this.form.hasOwnProperty("roleId")) {
+ this.form.roleId = this.form.roleId.split(",")
+ }
+ // if (this.form.hasOwnProperty("postId")) {
+ // this.form.postId = this.form.postId.split(",")
+ // }
+ })
+ }
+ this.initFlag = true
+ done()
+ },
+ currentChange(currentPage) {
+ this.page.currentPage = currentPage
+ },
+ sizeChange(pageSize) {
+ this.page.pageSize = pageSize
+ },
+ refreshChange() {
+ this.onLoad(this.page, this.query)
+ },
+ onLoad(page, params = {}) {
+ this.loading = true
+ getList(page.currentPage, page.pageSize, Object.assign(params, this.query), this.treeDeptId).then(res => {
+ const data = res.data.data
+ this.page.total = data.total
+ this.data = data.records
+ this.loading = false
+ this.selectionClear()
+ })
+ },
+ platformRowUpdate(row, index, done, loading) {
+ updatePlatform(row.id, row.userType, row.userExt).then(() => {
+ this.platformOnLoad(this.platformPage)
+ this.$message({
+ type: "success",
+ message: "操作成功!"
+ })
+ done()
+ }, error => {
+ window.console.log(error)
+ loading()
+ })
+ },
+ platformBeforeOpen(done, type) {
+ if (["edit", "view"].includes(type)) {
+ getUserPlatform(this.platformForm.id).then(res => {
+ this.platformForm = res.data.data
+ })
+ }
+ done()
+ },
+ platformSearchReset() {
+ this.platformQuery = {}
+ this.platformOnLoad(this.platformPage)
+ },
+ platformSearchChange(params, done) {
+ this.platformQuery = params
+ this.platformPage.currentPage = 1
+ this.platformOnLoad(this.platformPage, params)
+ done()
+ },
+ platformSelectionChange(list) {
+ this.platformSelectionList = list
+ },
+ platformSelectionClear() {
+ this.platformSelectionList = []
+ this.$refs.platformCrud.toggleSelection()
+ },
+ platformCurrentChange(currentPage) {
+ this.platformPage.currentPage = currentPage
+ },
+ platformSizeChange(pageSize) {
+ this.platformPage.pageSize = pageSize
+ },
+ platformRefreshChange() {
+ this.platformOnLoad(this.platformPage, this.platformQuery)
+ },
+ platformOnLoad(page, params = {}) {
+ this.platformLoading = true
+ getList(page.currentPage, page.pageSize, Object.assign(params, this.query), this.treeDeptId).then(res => {
+ const data = res.data.data
+ this.platformPage.total = data.total
+ this.platformData = data.records
+ this.platformLoading = false
+ this.selectionClear()
+ })
+ }
+ }
+ }
+</script>
+
+<style>
+ .box {
+ height: 800px;
+ }
+
+ .el-scrollbar {
+ height: 100%;
+ }
+
+ .box .el-scrollbar__wrap {
+ overflow: scroll;
+ }
+</style>
\ No newline at end of file
diff --git a/src/views/userHouse/components/auditBase.vue b/src/views/userHouse/components/auditBase.vue
new file mode 100644
index 0000000..c70f425
--- /dev/null
+++ b/src/views/userHouse/components/auditBase.vue
@@ -0,0 +1,112 @@
+<template>
+ <div class="cur-container-box">
+ <avue-form ref="replyForm" :option="option" v-model="form" :close-on-click-modal="false">
+
+ <template slot-scope="{size}" slot="menuForm">
+ <el-button type="primary" :size="size" @click="handleSubmit">通 过</el-button>
+ <el-button :size="size" @click="handleReset">驳 回</el-button>
+ </template>
+
+ </avue-form>
+ </div>
+</template>
+
+<script>
+ import {
+ setCheckPlaceExt
+ } from "@/api/place/place"
+
+ export default {
+ inject: ["placeElement"],
+
+ data() {
+ return {
+ form: {},
+ option: {
+ submitBtn: false,
+ emptyBtn: false,
+ column: [{
+ span: 23,
+ row: true,
+ label: "审批意见",
+ prop: "confirmNotion",
+ type: 'textarea',
+ minRows: 3,
+ maxRows: 5,
+ rules: [],
+ }]
+ },
+ }
+ },
+
+ methods: {
+ handleSubmit() {
+ setCheckPlaceExt({
+ confirmFlag: 2,
+ id: this.placeElement.curAuditRow.placeExtId,
+ confirmNotion: this.form.confirmNotion
+ }).then(() => {
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ this.$refs.replyForm && this.$refs.replyForm.resetForm()
+ this.placeElement.auditBasePopup = false
+
+ this.placeElement.onLoad(this.placeElement.page)
+ })
+ },
+
+ handleReset() {
+ if ('confirmNotion' in this.form && this.form.confirmNotion.trim() == '' || !this.form.confirmNotion) {
+ this.$message({
+ type: 'warning',
+ message: "请输入审批意见!",
+ })
+
+ return
+ }
+
+ setCheckPlaceExt({
+ confirmFlag: 3,
+ id: this.placeElement.curAuditRow.placeExtId,
+ confirmNotion: this.form.confirmNotion
+ }).then(() => {
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ this.$refs.replyForm && this.$refs.replyForm.resetForm()
+ this.placeElement.auditBasePopup = false
+
+ this.placeElement.onLoad(this.placeElement.page)
+ })
+ },
+ }
+ }
+</script>
+
+<style lang="scss" scoped>
+ .cur-container-box {
+ display: flex;
+ flex-direction: column;
+ width: 100%;
+ height: 100%;
+ overflow: hidden;
+
+ .content-box {
+ margin: 0 4px;
+ padding: 0 16px;
+ height: 0;
+ flex: 1;
+ overflow: hidden;
+ overflow-y: auto;
+ }
+
+ .footer-btn-box {
+ margin-top: 10px;
+ display: flex;
+ justify-content: center;
+ }
+ }
+</style>
\ No newline at end of file
diff --git a/src/views/userHouse/components/baseAllInfo.vue b/src/views/userHouse/components/baseAllInfo.vue
new file mode 100644
index 0000000..100aa41
--- /dev/null
+++ b/src/views/userHouse/components/baseAllInfo.vue
@@ -0,0 +1,1194 @@
+<template>
+ <el-dialog class="place-info-box" title="场所维护" append-to-body :visible.sync="roleBox" center @close="roleBoxClose">
+ <div class="cur-container-box">
+ <div class="content-box">
+ <box-title class="m10" :classVal="9" :title="'基本信息'"></box-title>
+ <avue-form v-if="baseShow" ref="baseForm" :option="option" v-model="form">
+ <template slot-scope="{ row, size, index }" slot="houseCodeBinds">
+ <el-select v-model="form.houseCodeBinds" filterable remote multiple :remote-method="onRemoteMethod"
+ @change="onSelectChange" placeholder="请选择标准地址" reserve-keyword>
+ <el-option v-for="item in standardAddressList" :key="item.addressCode" :label="item.addressName"
+ :value="item.addressCode">
+ </el-option>
+ </el-select>
+ </template>
+ </avue-form>
+
+
+ <box-title class="m10" :classVal="9" :title="'房东信息'"></box-title>
+ <avue-form v-if="restShow" ref="restForm" :option="houseOwnerOption" v-model="placeForm"></avue-form>
+
+ <box-title class="m10" :classVal="9" :title="'其他信息'"></box-title>
+ <avue-form v-if="restShow" ref="restForm" :option="optionDetail" v-model="placeForm"></avue-form>
+
+ <box-title class="m10" :classVal="9" :title="'从业人员'"></box-title>
+ <avue-crud :option="placeOption" :table-loading="loading" :data="placeExt" ref="crud" v-model="houseHoldForm"
+ :permission="permissionList" @row-del="houseHoldRowDel" @row-update="houseHoldRowUpdate"
+ @row-save="houseHoldRowSave" :page.sync="holdPage" @current-change="holdCurrentChange"
+ @size-change="holdSizeChange" @refresh-change="refreshHoldChange" @on-load="holdOnLoad">
+ </avue-crud>
+ </div>
+
+ <div class="footer-btn-box">
+ <el-button size="small" :disabled="disabled" type="primary" @click="dataUpdate">保 存</el-button>
+
+ <el-button size="small" @click="roleBoxClose">关 闭</el-button>
+ </div>
+ </div>
+ </el-dialog>
+</template>
+
+<script>
+ import {
+ getPlaceDetaill,
+ getPlaceExt,
+ holdRemove,
+ holdAdd,
+ holdUpdate,
+ getHoldList,
+ update,
+ updatePlaceExt,
+ getPlaceAddressList
+ } from "@/api/place/place"
+ import {
+ getPlaceList
+ } from "@/api/doorplateAddress/doorplateAddress"
+ import website from "@/config/website"
+
+ import boxTitle from "./boxTitle"
+
+ export default {
+ data() {
+ //手机号格式校验
+ let validatorPhone = function(rule, value, callback) {
+ if (value) {
+ if (!/^1[3456789]\d{9}$/.test(value)) {
+ callback(new Error("手机号格式有误!"))
+ } else {
+ callback()
+ }
+ }
+ callback()
+ }
+
+ return {
+ disabled: false,
+ roleBox: false,
+ baseShow: false,
+ restShow: false,
+
+ placeExt: [],
+
+ form: {},
+ option: {
+ submitBtn: false,
+ emptyBtn: false,
+ dialogMenuPosition: 'right',
+ column: [{
+ span: 12,
+ label: "场所名称",
+ prop: "placeName",
+ labelWidth: 120,
+ rules: [{
+ required: true,
+ message: "请输入场所名称",
+ trigger: "blur",
+ }, ],
+ },
+
+
+
+ {
+ label: "负责人",
+ prop: "principal",
+ labelWidth: 120,
+ rules: [{
+ required: false,
+ message: "请输入负责人",
+ trigger: "blur",
+ }, ],
+ },
+
+ {
+ width: 96,
+ label: "手机号码",
+ prop: "principalPhone",
+ labelWidth: 120,
+ search: true,
+ searchSpan: 4,
+ slot: true,
+ overHidden: true,
+ rules: [{
+ validator: validatorPhone,
+ trigger: "blur",
+ }, ],
+ },
+ {
+ width: 120,
+ overHidden: true,
+ label: "身份证号",
+ labelWidth: 120,
+ prop: "principalIdCard",
+ search: true,
+ searchSpan: 4,
+ slot: true,
+ rules: [{
+ required: false,
+ message: "请输身份证号",
+ trigger: "blur",
+ }],
+ },
+
+ {
+ hide: true,
+ parent: false,
+ label: "所属社区",
+ labelWidth: 120,
+ prop: "neiCode",
+ search: false,
+ type: "tree",
+ dicUrl: "/api/blade-system/region/treeToCommunity",
+ props: {
+ label: "name",
+ value: "id",
+ },
+ cascader: ["gridCode"],
+ // dicFormatter: (res) => {
+ // return dsposeData(res.data)
+ // },
+ rules: [{
+ required: true,
+ message: "请选择所属社区",
+ trigger: "blur",
+ }, ],
+ },
+ {
+ hide: true,
+ label: "所属网格",
+ prop: "gridCode",
+ type: "tree",
+ labelWidth: 120,
+ cell: true,
+ props: {
+ label: "gridName",
+ value: "gridCode",
+ },
+ // dataType: 'string',
+ dicUrl: "/api/blade-grid/grid/getGridList?communityCode={{neiCode}}",
+ rules: [{
+ required: true,
+ message: "请选择所属网格",
+ trigger: "blur",
+ }, ],
+ },
+
+ {
+ span: 7,
+ label: "场所标签",
+ prop: "label",
+ labelWidth: 120,
+ type: "select",
+ dicUrl: "/api/blade-category/category/getCategory?level=2",
+ cascader: ["smallLabel"],
+ props: {
+ label: "categoryName",
+ value: "categoryNo",
+ },
+ dataType: "string",
+ hide: true,
+ rules: [{
+ required: true,
+ message: "请输入场所标签",
+ trigger: "blur",
+ }, ],
+ },
+ {
+ span: 5,
+ label: "",
+ labelWidth: 20,
+ prop: "smallLabel",
+ type: "select",
+ dicUrl: "/api/blade-category/category/getCategory?parentNo={{label}}",
+ props: {
+ label: "categoryName",
+ value: "categoryNo",
+ },
+ dataType: "string",
+ hide: true,
+ },
+
+ {
+ span: 12,
+ label: "标签颜色",
+ prop: "color",
+ type: "select",
+ labelWidth: 120,
+ dicData: [{
+ label: "绿",
+ value: "green",
+ },
+ {
+ label: "黄",
+ value: "yellow",
+ },
+ {
+ label: "红",
+ value: "red",
+ },
+ ],
+ props: {
+ label: "label",
+ value: "value",
+ },
+ hide: true,
+ },
+ {
+ span: 12,
+ label: "九小场所",
+ prop: "isNine",
+ labelWidth: 120,
+ type: "select",
+ dicData: [{
+ label: "是",
+ value: 1,
+ },
+ {
+ label: "否",
+ value: 2,
+ }
+ ],
+ rules: [{
+ required: true,
+ message: "请选择九小分类",
+ trigger: "blur",
+ }, ],
+ hide: true,
+ },
+ {
+ span: 12,
+ label: "九小分类",
+ prop: "nineType",
+ labelWidth: 120,
+ type: "select",
+ display: false,
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=nineType",
+ dataType: "number",
+ hide: true,
+ props: {
+ label: "dictValue",
+ value: "dictKey",
+ },
+ },
+ {
+ span: 12,
+ label: "阵地",
+ prop: "isFront",
+ labelWidth: 120,
+ type: "select",
+ dicData: [{
+ label: "是",
+ value: 1,
+ },
+ {
+ label: "否",
+ value: 2,
+ }
+ ],
+ hide: true,
+ rules: [{
+ required: true,
+ message: "请选择阵地",
+ trigger: "blur",
+ }, ],
+ },
+ {
+ span: 12,
+ label: "阵地类型",
+ prop: "frontType",
+ type: "select",
+ labelWidth: 120,
+ display: false,
+ row: true,
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=frontType",
+ dataType: "number",
+ hide: true,
+ props: {
+ label: "dictValue",
+ value: "dictKey",
+ },
+ },
+ {
+ span: 12,
+ label: "三级消防单位",
+ prop: "threeFireProtection",
+ labelWidth: 120,
+ type: "select",
+ dicData: [{
+ label: "是",
+ value: 1,
+ },
+ {
+ label: "否",
+ value: 2,
+ }
+ ],
+ hide: true,
+ rules: [{
+ required: false,
+ message: "请选择三级消防单位",
+ trigger: "blur",
+ }],
+ },
+
+ {
+ span: 12,
+ label: "无炸类型",
+ prop: "noExplosionCategory",
+ type: "select",
+ labelWidth: 120,
+ display: true,
+ row: true,
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=noExplosionCategory",
+ dataType: "number",
+ hide: true,
+ props: {
+ label: "dictValue",
+ value: "dictKey",
+ },
+ },
+
+ {
+ label: "场所照片",
+ prop: "imageUrls",
+ width: 80,
+ type: "upload",
+ labelWidth: 120,
+ listType: "picture-card",
+ dataType: "string",
+ multiple: true,
+ action: "/api/blade-resource/oss/endpoint/put-file",
+ propsHttp: {
+ res: "data",
+ name: "name",
+ url: "link",
+ },
+ span: 24,
+ },
+ {
+ width: 160,
+ overHidden: true,
+ slot: true,
+ label: "地址",
+ prop: "location",
+ type: "map",
+ dataType: "string",
+ labelWidth: 120,
+ span: 24,
+ value: [117.96646, 28.431002, ""],
+ cascader: ['houseCodeBinds'],
+ rules: [{
+ required: true,
+ message: "请选择地址",
+ trigger: "blur",
+ }, ],
+ },
+ {
+ width: 160,
+ overHidden: true,
+ display: false,
+ labelWidth: 120,
+ hide: true,
+ label: "地址",
+ prop: "addressName",
+ span: 12
+ },
+
+ // {
+ // width: 160,
+ // overHidden: true,
+ // slot: true,
+ // label: "标准地址",
+ // prop: "houseCodeBinds",
+ // span: 24,
+ // type: 'select',
+ // labelWidth:120,
+ // dataType: "object",
+ // remote: true,
+ // multiple: true,
+ // hide: true,
+ // display: false,
+ // filterable:true,
+ // dicUrl: `/api/blade-doorplateAddress/doorplateAddress/getPlaceList`,
+ // props: {
+ // label: 'addressName',
+ // value: 'addressCode',
+ // },
+ // dicData: [],
+ // rules: [{
+ // required: false,
+ // message: "请选择标准地址",
+ // trigger: "blur",
+ // }, ]
+ // },
+ {
+ span: 24,
+ hide: true,
+ prop: "houseCodeBinds",
+ slot: true,
+ label: "标准地址",
+ labelWidth: 120,
+
+ },
+ {
+ label: "备注",
+ prop: "remark",
+ type: 'textarea',
+ labelWidth: 120,
+ hide: true,
+ span: 24,
+ rules: [{
+ required: false,
+ message: "请输入场所备注",
+ trigger: "blur",
+ }, ],
+ },
+ ],
+ },
+
+ placeForm: {},
+ optionDetail: {
+ submitBtn: false,
+ emptyBtn: false,
+ column: [{
+ label: "学生人数",
+ prop: "studentNumber",
+ },
+ {
+ label: "教职工人数",
+ prop: "workersNumber",
+ },
+ {
+ label: "专职保安",
+ prop: "securityNumber",
+ },
+ {
+ label: "专职门卫",
+ prop: "guardNumber",
+ },
+ {
+ label: "专兼职保卫人员",
+ prop: "temporarySecurityNumber",
+ },
+ {
+ label: "走读/寄宿",
+ prop: "dayStudentsNumber",
+ },
+ {
+ label: "住校生人数",
+ prop: "residentialStudentsNumber",
+ },
+ {
+ label: "宿舍管理人员",
+ prop: "housemasterNumber",
+ }, {
+ labelWidth: 100,
+ label: "法人信息",
+ prop: "legalPerson",
+ },
+ {
+ labelWidth: 100,
+ label: "法人电话",
+ prop: "legalTel",
+ search: true,
+ searchSpan: 4,
+ slot: true,
+ overHidden: true,
+ rules: [{
+ validator: validatorPhone,
+ trigger: "blur",
+ }, ],
+ },
+
+
+ {
+ label: "营业执照",
+ prop: "imageUrls",
+ width: 80,
+ type: "upload",
+ listType: "picture-card",
+ dataType: "string",
+ multiple: true,
+ action: "/api/blade-resource/oss/endpoint/put-file",
+ propsHttp: {
+ res: "data",
+ name: "name",
+ url: "link",
+ },
+ span: 24,
+ },
+
+ {
+ label: "场所平面图",
+ prop: "planImageUrls",
+ width: 80,
+ type: "upload",
+ listType: "picture-card",
+ dataType: "string",
+ multiple: true,
+ action: "/api/blade-resource/oss/endpoint/put-file",
+ propsHttp: {
+ res: "data",
+ name: "name",
+ url: "link",
+ },
+ span: 24,
+ },
+ ],
+ },
+
+ loading: true,
+ placeOption: {
+ menu: true,
+ height: 300,
+ calcHeight: 54,
+ dialogWidth: 950,
+ tip: false,
+ searchShow: false,
+ addBtn: true,
+ delBtn: true,
+ editBtn: true,
+ border: true,
+ index: true,
+ dialogClickModal: false,
+ column: [{
+ labelWidth: 100,
+ label: "姓名",
+ prop: "name",
+ searchSpan: 4,
+ search: true,
+ },
+ {
+ labelWidth: 100,
+ label: "性别",
+ prop: "gender",
+ type: "select",
+ dicData: [{
+ label: "男",
+ value: 1
+ },
+ {
+ label: "女",
+ value: 0
+ },
+ {
+ label: "未知",
+ value: "3"
+ }
+ ],
+ },
+ {
+ labelWidth: 100,
+ span: 12,
+ label: "民族",
+ prop: "ethnicity",
+ type: "select",
+ row: true,
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=nationType",
+ dataType: "number",
+ props: {
+ label: "dictValue",
+ value: "dictKey",
+ },
+ },
+ {
+ labelWidth: 100,
+ label: "身份证号",
+ prop: "idCard",
+ },
+
+ {
+ labelWidth: 100,
+ label: "电话号码",
+ prop: "telephone",
+ search: true,
+ searchSpan: 4,
+ slot: true,
+ overHidden: true,
+ rules: [{
+ validator: validatorPhone,
+ trigger: "blur",
+ }, ],
+ },
+
+ {
+ labelWidth: 100,
+ label: "现居住地",
+ prop: "tempAddress",
+ searchSpan: 4,
+ search: true,
+ },
+ {
+ labelWidth: 100,
+ label: "岗位",
+ prop: "jobNature",
+ // hide: true
+ },
+
+ {
+ label: "从业人员照片",
+ prop: "employerImg",
+ labelWidth: 100,
+ type: "upload",
+ listType: "picture-card",
+ dataType: "string",
+ multiple: true,
+ action: "/api/blade-resource/oss/endpoint/put-file",
+ propsHttp: {
+ res: "data",
+ name: "name",
+ url: "link",
+ },
+ span: 24,
+ hide: true
+ },
+ {
+ label: "入职时间",
+ labelWidth: 100,
+ hide: true,
+ row: true,
+ prop: "resignationTime",
+ type: "datetime",
+ format: "yyyy-MM-dd",
+ valueFormat: "yyyy-MM-dd",
+ // format: "yyyy-MM-dd hh:mm:ss",
+ // valueFormat: "yyyy-MM-dd hh:mm:ss",
+ rules: [{
+ required: false,
+ message: "请选择入职时间",
+ trigger: "blur",
+ }]
+ },
+ {
+ label: "离职时间",
+ labelWidth: 100,
+ hide: true,
+ row: true,
+ prop: "employmentTime",
+ type: "datetime",
+ format: "yyyy-MM-dd",
+ valueFormat: "yyyy-MM-dd",
+ // format: "yyyy-MM-dd hh:mm:ss",
+ // valueFormat: "yyyy-MM-dd hh:mm:ss",
+ rules: [{
+ required: false,
+ message: "请选择离职时间",
+ trigger: "blur",
+ }]
+ },
+ {
+ labelWidth: 100,
+ label: "状态",
+ prop: "resignationFlag",
+ // hide: true
+ type: "select",
+ display: false,
+ dicData: [{
+ label: "在职",
+ value: 1
+ },
+ {
+ label: "离职",
+ value: 2
+ }
+ ],
+ },
+
+ ]
+ },
+ holdPage: {
+ pageSize: 20,
+ currentPage: 1,
+ total: 0,
+ },
+ houseHoldForm: {},
+ houseOwnerOption: {
+ submitBtn: false,
+ emptyBtn: false,
+ column: [
+
+ {
+ width: 96,
+ label: "姓名",
+ prop: "landlordName",
+ search: true,
+ searchSpan: 4,
+ slot: true,
+ overHidden: true
+ },
+ {
+ width: 96,
+ label: "身份证号",
+ prop: "landlordIdCard",
+ search: true,
+ searchSpan: 4,
+ slot: true,
+ overHidden: true,
+ rules: [{
+ // validator: validatorPhone,
+ trigger: "blur",
+ }, ],
+ },
+ {
+ width: 96,
+ label: "手机号",
+ prop: "landlordPhone",
+ search: true,
+ searchSpan: 4,
+ slot: true,
+ overHidden: true,
+ rules: [{
+ validator: validatorPhone,
+ trigger: "blur",
+ }, ],
+ },
+ ],
+ },
+ userOption: {
+ submitBtn: false,
+ emptyBtn: false,
+ column: [
+
+ {
+ width: 96,
+ label: "电话",
+ prop: "legalTel",
+ search: true,
+ searchSpan: 4,
+ slot: true,
+ overHidden: true,
+ rules: [{
+ validator: validatorPhone,
+ trigger: "blur",
+ }, ],
+ },
+ {
+ width: 96,
+ label: "微信号",
+ prop: "legalTel",
+ search: true,
+ searchSpan: 4,
+ slot: true,
+ overHidden: true,
+ rules: [{
+ validator: validatorPhone,
+ trigger: "blur",
+ }, ],
+ },
+
+
+
+ ],
+ },
+
+ standardAddressList: [], //标准地址数据
+ standardAddress: "",
+ standardAddressSearchKey: ""
+ }
+ },
+
+ components: {
+ boxTitle
+ },
+
+ inject: ["placeElement"],
+
+ watch: {
+
+ 'form.houseBindList': {
+ handler(newData) {
+ console.log("=======>", newData)
+ }
+ },
+
+ 'form.isNine': {
+ handler(newData) {
+ if (newData) {
+ let nineTypeColumn = this.findObject(
+ this.option.column,
+ 'nineType'
+ )
+
+ if (newData == 1) {
+ nineTypeColumn.display = true
+ } else {
+ nineTypeColumn.display = false
+ }
+ }
+ },
+ },
+ 'form.isFront': {
+ handler(newData) {
+ if (newData) {
+ let frontTypeColumn = this.findObject(
+ this.option.column,
+ 'frontType'
+ )
+
+ if (newData == 1) {
+ frontTypeColumn.display = true
+ } else {
+ frontTypeColumn.display = false
+ }
+ }
+ }
+ },
+ 'form.addressName': {
+ handler(newData) {
+ console.log("111111")
+ const column = this.findObject(this.option.column, "houseCodeBinds")
+ if (newData) {
+ column.display = true;
+ } else {
+ column.display = false
+ }
+ }
+ }
+ },
+ methods: {
+ initOpen(newData) {
+ console.log("item==>", newData);
+ this.curRow = newData
+ this.roleBox = true
+ this.baseShow = false
+ this.restShow = false
+ this.form = {}
+ this.placeForm = {}
+
+ const that = this
+
+ that.$axios
+ .all([getPlaceDetaill(newData["houseCode"]), getPlaceExt({
+ placeId: newData["id"]
+ }), getPlaceList()])
+ .then(
+ that.$axios.spread(function(baseInfo, restInfo) {
+ console.log("houseCodeBinds===>", baseInfo.data.data.houseCodeBinds)
+ that.form = baseInfo.data.data
+ that.form.addressName = that.form.location;
+ that.form.location = [
+ that.form.lng,
+ that.form.lat,
+ that.form.location,
+ ].join(",")
+ if (baseInfo.data.data.houseCodeBinds) {
+ that.standardAddressList = baseInfo.data.data.houseBindList;
+ that.form.houseCodeBinds = baseInfo.data.data.houseCodeBinds.split(",")
+ }
+
+ if (that.form.imageUrls && that.form.imageUrls.length) {
+ that.form.imageUrls = that.form.imageUrls
+ .split(",")
+ .filter((item) => item != "")
+ .map((item) => website.minioUrl + item)
+ .join(",")
+ }
+
+ if (
+ that.form.placePoiLabelVOList &&
+ that.form.placePoiLabelVOList.length
+ ) {
+ let lebelTwo = that.form.placePoiLabelVOList.find((item) => {
+ return item.type == 2
+ })
+
+ if (lebelTwo) that.form.label = String(lebelTwo.poiCode)
+
+ let lebelThree = that.form.placePoiLabelVOList.find((item) => {
+ return item.type == 3
+ })
+
+ if (lebelThree) that.form.smallLabel = String(lebelThree.poiCode)
+ }
+
+ that.baseShow = true
+ const data = restInfo.data.data
+
+
+
+
+ if (data) {
+ let imageUrls = data.imageUrls
+ let planImageUrls = data.planImageUrls
+
+ if (imageUrls && imageUrls.length) {
+ imageUrls = imageUrls
+ .split(",")
+ .filter((item) => item != "")
+ .map((item) => website.minioUrl + item)
+ .join(",")
+ }
+
+ if (planImageUrls && planImageUrls.length) {
+ planImageUrls = planImageUrls
+ .split(",")
+ .filter((item) => item != "")
+ .map((item) => website.minioUrl + item)
+ .join(",")
+ }
+
+ that.placeForm = {
+ ...data,
+ imageUrls,
+ planImageUrls,
+
+
+ }
+ }
+
+ that.restShow = true
+ })
+ )
+
+ that.getPlaceAddressListRequest()
+ },
+
+ locationDispose(data) {
+ data = data.split(",")
+
+ return {
+ longitude: data[0],
+ latitude: data[1],
+ location: data[2],
+ }
+ },
+
+ selectionClear() {
+ this.$nextTick(() => {
+ this.$refs.crud && this.$refs.crud.toggleSelection()
+ })
+ },
+
+ houseHoldRowUpdate(row, index, done, loading) {
+ holdUpdate(row).then(
+ () => {
+ this.holdOnLoad(this.holdPage)
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ done()
+ },
+ (error) => {
+ window.console.log(error)
+ loading()
+ }
+ )
+ },
+
+ houseHoldRowDel(row) {
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ return holdRemove(row.id)
+ })
+ .then(() => {
+ this.holdOnLoad(this.holdPage)
+
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ })
+ },
+
+ houseHoldRowSave(row, done, loading) {
+ holdAdd({
+ ...row,
+ placeId: this.curRow.id,
+ }).then(
+ () => {
+ this.holdOnLoad(this.holdPage)
+
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ done()
+ },
+ (error) => {
+ window.console.log(error)
+ loading()
+ }
+ )
+ },
+
+ refreshHoldChange() {
+ this.holdOnLoad(this.holdPage)
+ },
+
+ holdOnLoad(holdPage, params = {}) {
+ if (!this.curRow.id) return
+
+ let values = {
+ ...params,
+ placeId: this.curRow.id,
+ }
+
+ getHoldList(holdPage.currentPage, holdPage.pageSize, values).then(
+ (res) => {
+ const data = res.data.data
+
+ this.holdPage.total = data.total
+ this.placeExt = data.records
+
+ this.loading = false
+ this.selectionClear()
+ }
+ )
+ },
+
+ holdCurrentChange(currentPage) {
+ this.holdPage.currentPage = currentPage
+ },
+
+ holdSizeChange(pageSize) {
+ this.holdPage.pageSize = pageSize
+ },
+
+ desposeImage(data) {
+ if (data) {
+ if (data.length > 0) {
+ var urls = []
+ var split = data.split(",").filter((item) => item != "")
+ split.forEach((url) => {
+ var names = url.split("jczz/")
+ urls.push(names[1])
+ })
+ data = urls.join(",")
+ }
+ }
+ return data
+ },
+
+ dataUpdate() {
+ const that = this
+ that.disabled = true;
+ let imageUrls = this.desposeImage(this.form.imageUrls)
+ let placeImages = this.desposeImage(this.placeForm.imageUrls)
+ let placePlanImageUrls = this.desposeImage(this.placeForm.planImageUrls)
+
+ let label = this.form.label
+
+ if (this.form.smallLabel != "") {
+ label = label + "," + this.form.smallLabel
+ }
+
+ delete this.form.smallLabel
+ if (Array.isArray(this.form.houseCodeBinds)) {
+ this.form.houseCodeBinds = this.form.houseCodeBinds.join(",")
+ }
+
+ this.form.placeExtEntity = null
+ this.$refs.baseForm.validate((valid, done, msg) => {
+ if (valid) {
+ that.$axios
+ .all([
+ update({
+ // ...this.placeElement.curRow,
+ ...this.form,
+ imageUrls,
+ label,
+ ...this.locationDispose(this.form.location),
+ }),
+ updatePlaceExt({
+ ...this.placeForm,
+ imageUrls: placeImages,
+ planImageUrls: placePlanImageUrls,
+ }),
+ ])
+ .then(
+ that.$axios.spread(function() {
+ that.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+
+ that.roleBoxClose()
+
+ that.placeElement.onLoad(
+ that.placeElement.page,
+ that.placeElement.query
+ )
+ done()
+ })
+ )
+ } else {
+ console.log("error submit!!")
+ that.disabled = false;
+ return false
+ }
+ })
+ },
+
+ roleBoxClose() {
+ this.form = {}
+ this.placeForm = {}
+ this.disabled = false
+ this.$refs.baseForm && this.$refs.baseForm.resetForm()
+ this.$refs.restForm && this.$refs.restForm.resetForm()
+ this.baseShow = false
+ this.restShow = false
+ this.roleBox = false
+ },
+
+ getPlaceAddressListRequest(query) {
+ getPlaceAddressList({
+ addressName: query
+ }).then(res => {
+ this.standardAddressList = res.data.data;
+ })
+ },
+
+ onSelectChange(e) {
+ console.log("selectChange===>", e);
+ // this.getPlaceAddressListRequest()
+ },
+
+ onRemoteMethod(query) {
+ console.log("remote===>", query)
+ this.getPlaceAddressListRequest(query)
+ },
+
+
+
+ },
+ }
+</script>
+
+<style lang="scss" scoped>
+ .cur-container-box {
+ display: flex;
+ flex-direction: column;
+ width: 100%;
+ height: 100%;
+ overflow: hidden;
+
+ .content-box {
+ margin: 0 4px;
+ padding: 0 10px;
+ height: 0;
+ flex: 1;
+ overflow: hidden;
+ overflow-y: auto;
+ }
+
+ .footer-btn-box {
+ margin-top: 10px;
+ display: flex;
+ justify-content: center;
+ }
+ }
+</style>
\ No newline at end of file
diff --git a/src/views/userHouse/houseListTwo.vue b/src/views/userHouse/houseListTwo.vue
new file mode 100644
index 0000000..b673a97
--- /dev/null
+++ b/src/views/userHouse/houseListTwo.vue
@@ -0,0 +1,911 @@
+<template>
+ <el-row>
+ <el-col :span="24">
+ <basic-container>
+ <avue-crud :option="option" :search.sync="search" :table-loading="loading" :data="data" ref="crud"
+ v-model="form" :permission="permissionList" @row-del="rowDel" @row-update="rowUpdate"
+ @row-save="rowSave" :before-open="beforeOpen" :page.sync="page" @search-change="searchChange"
+ @search-reset="searchReset" @selection-change="selectionChange" @current-change="currentChange"
+ @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
+ <template slot="menuLeft">
+ <el-button type="danger" size="small" plain icon="el-icon-delete" v-if="permission.house_del"
+ @click="handleDelete">删 除
+ </el-button>
+ <!-- <el-button type="success" size="small" plain v-if="userInfo.role_name.includes('admin')"
+ icon="el-icon-upload2" @click="handleImport">导入
+ </el-button>
+ <el-button type="warning" size="small" plain v-if="userInfo.role_name.includes('admin')"
+ icon="el-icon-download" @click="handleExport">导出
+ </el-button> -->
+ <!-- <el-button type="success" size="small" plain v-if="permission.house_import" icon="el-icon-upload2"
+ @click="handleImport">导入
+ </el-button> -->
+ <!-- <el-button type="warning" size="small" plain v-if="permission.house_export" icon="el-icon-download"
+ @click="handleExport">导出
+ </el-button> -->
+ </template>
+ <template slot-scope="{row}" slot="location">
+ <span v-text="showLocation(row.location)"></span>
+ </template>
+
+ <template slot-scope="{row, size}" slot="menu">
+ <el-button :size="size" type="text" icon="el-icon-circle-plus-outline"
+ v-if="permission.house_manager" @click="handleHouseholdManager(row)">住户管理
+ </el-button>
+ <el-button :size="size" type="text" icon="el-icon-circle-plus-outline"
+ v-if="permission.house_tag" @click="manageLabel(row)">标签
+ </el-button>
+ </template>
+
+ <template slot-scope="{row, size}" slot="phone">
+ <el-button :size="size" type="text" @click="showStringDispose(row, 'phoneflag')">
+ {{ textDispose(row, 'phoneflag', 'phone') }}
+ </el-button>
+ </template>
+
+ <template slot-scope="{row}" slot="userHouseLabelVOList">
+ {{ labelDispose(row.userHouseLabelVOList) }}
+ </template>
+ </avue-crud>
+ <el-dialog title="用户角色配置" append-to-body :visible.sync="roleBox" width="345px">
+
+ <el-tree :data="roleGrantList" show-checkbox check-strictly default-expand-all node-key="id"
+ ref="treeRole" :default-checked-keys="roleTreeObj" :props="props">
+ </el-tree>
+
+ <span slot="footer" class="dialog-footer">
+ <el-button size="small" @click="roleBox = false">取 消</el-button>
+ <el-button size="small" type="primary" @click="submitRole">确 定</el-button>
+ </span>
+ </el-dialog>
+
+ <el-dialog title="标签管理" append-to-body :visible.sync="labelFlag" center width="600px">
+ <div id="" class="grid-container2">
+ <div class="grid-item" :style="{ backgroundColor: getColor(item.color) }"
+ v-for="(item, index) in labelData" :key="index" @click="changLabel(item)">
+ {{ item.name }}
+ </div>
+ </div>
+ <!-- <span slot="footer" class="dialog-footer">
+ <el-button @click="labelFlag = false">取 消</el-button>
+ <el-button type="primary" @click="submitRole">确 定</el-button>
+ </span> -->
+ </el-dialog>
+
+ <el-dialog :title="'编辑标签 ' + currentLabel.name" append-to-body :visible.sync="editLabelFlge"
+ width="655px">
+ <avue-form :option="labelOption" v-model="labelForm" :submit="onsubmit">
+ </avue-form>
+ <span slot="footer" class="dialog-footer">
+ <el-button size="small" @click="editLabelFlge = false">取 消</el-button>
+ <el-button size="small" type="primary" @click="onsubmit">确 定</el-button>
+ </span>
+ </el-dialog>
+
+ <el-dialog title="用户数据导入" append-to-body :visible.sync="excelBox" width="555px">
+ <avue-form :option="excelOption" v-model="excelForm" :upload-after="uploadAfter">
+ <template slot="excelTemplate">
+ <el-button type="primary" @click="handleTemplate">
+ 点击下载<i class="el-icon-download el-icon--right"></i>
+ </el-button>
+ </template>
+ </avue-form>
+ </el-dialog>
+
+ <el-dialog title="住户管理" append-to-body :visible.sync="householdManagerVisible" width="70%" height="60%">
+ <householdManager ref="householdManager" />
+ </el-dialog>
+ </basic-container>
+ </el-col>
+ </el-row>
+</template>
+
+<script>
+import { setHouseLabelColor } from '@/util/util'
+
+import {
+ getList,
+ remove,
+ add,
+ update,
+ getDetatil,
+ getDetatils
+} from "@/api/userHouse/list/house.js"
+import {
+ removeHouseholdLabel,
+ saveOrUpdateHouseLabelInfo
+} from "@/api/userHouse/list/userHouseList.js"
+import {
+ getLabelList,
+} from '@/api/label/label'
+import {
+ exportBlob
+} from "@/api/common"
+import {
+ mapGetters
+} from "vuex"
+import website from '@/config/website'
+import {
+ getToken
+} from '@/util/auth'
+import {
+ downloadXls
+} from "@/util/util"
+import {
+ dateNow
+} from "@/util/date"
+import NProgress from 'nprogress'
+import 'nprogress/nprogress.css'
+import householdManager from "./components/householdManager"
+import Qs from "qs"
+export default {
+ components: {
+ householdManager
+ },
+ data() {
+
+ //手机号格式校验
+ let validatorPhone = function (rule, value, callback) {
+ if (value) {
+ if (!/^1[3456789]\d{9}$/.test(value)) {
+ callback(new Error('手机号格式有误!'))
+ } else {
+ callback()
+ }
+ }
+ callback()
+ }
+
+ return {
+ labelData: [],
+ labelForm: {},
+ userHouseLabelVOList: [],
+ currentLabel: {},
+ labelOption: {
+ submitBtn: false,
+ emptyBtn: false,
+ column: [{
+ label: '级别',
+ prop: 'color',
+ type: 'radio',
+ button: true,
+ row: true,
+ dicData: [{
+ label: '撤销',
+ value: '#999'
+ }, {
+ label: '绿',
+ value: 'green'
+ }, {
+ label: '黄',
+ value: 'yellow'
+ }, {
+ label: '红',
+ value: 'red'
+ }],
+ rules: [{
+ required: true,
+ message: "请选择",
+ trigger: "blur"
+ }]
+ }, {
+ row: true,
+ label: '备注',
+ prop: 'remark',
+ type: 'input'
+ }]
+ },
+ editLabelFlge: false,
+ labelFlag: false,
+ householdManagerVisible: false,
+ form: {},
+ search: {},
+ excelBox: false,
+ selectionList: [],
+ query: {},
+ loading: true,
+ page: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0
+ },
+ option: {
+ labelWidth: 120,
+ searchLabelWidth: 96,
+ searchShow: true,
+ searchMenuSpan: 3,
+ menuWidth: 350,
+
+ height: 'auto',
+ calcHeight: 80,
+ tip: false,
+ border: true,
+ index: true,
+ selection: true,
+ viewBtn: true,
+ dialogType: 'drawer',
+ dialogClickModal: false,
+ column: [
+ {
+ label: "房屋编号",
+ prop: "houseCode",
+ width: 180,
+ hide: true,
+ display: false
+ },
+ {
+ // hide: true,
+ width: 220,
+ overHidden: true,
+ label: '地址',
+ parent: false,
+ prop: "address",
+ display: false,
+ searchLabelWidth: 46,
+ searchSpan: 4,
+ search: true,
+ },
+ {
+ overHidden: true,
+ slot: true,
+ label: "地址",
+ prop: "location",
+ type: 'map',
+ disabled: false,
+ dataType: "string",
+ searchLabelWidth: 66,
+ hide: true,
+ value: [117.966460, 28.431002, ""],
+ rules: [
+ {
+ required: true,
+ message: "请选择巡查地址",
+ trigger: "blur",
+ },
+ ],
+ },
+
+ {
+ hide: true,
+ parent: false,
+ label: "小区名称",
+ prop: "districtCode",
+ type: 'tree',
+ dicUrl: `/api/blade-district/district/getDistrictTree`,
+ props: {
+ label: "name",
+ value: "id"
+ },
+ defaultExpandedKeys: ["361102003"],
+ span: 12,
+ width: 220,
+ overHidden: true,
+ },
+
+ {
+ width: 220,
+ overHidden: true,
+ label: '小区名称',
+ parent: false,
+ prop: "districtName",
+ searchSpan: 4,
+ display: false,
+ search: true,
+ },
+
+ {
+ width: 110,
+ label: "所属街道",
+ addDisplay: false,
+ editDisplay: false,
+ viewDisplay: false,
+ prop: "townStreetName",
+ search: true,
+ searchSpan: 4
+ },
+
+ {
+ width: 156,
+ overHidden: true,
+ label: "所属社区",
+ addDisplay: false,
+ editDisplay: false,
+ viewDisplay: false,
+ prop: "neiName",
+ search: true,
+ searchSpan: 4,
+ rules: [{
+ required: true,
+ message: "请选择所属社区",
+ trigger: "blur",
+ }],
+ },
+
+ {
+ hide: true,
+ parent: false,
+ label: "所属社区",
+ prop: "neiCode",
+ search: false,
+ type: "tree",
+ dicUrl: "/api/blade-system/region/treeToCommunity",
+ props: {
+ label: "name",
+ value: "id",
+ },
+ cascader: ["gridCode"],
+ rules: [
+ {
+ required: true,
+ message: "请选择所属社区",
+ trigger: "blur",
+ },
+ ],
+ },
+
+ {
+ width: 110,
+ overHidden: true,
+ label: "所属网格",
+ addDisplay: false,
+ editDisplay: false,
+ viewDisplay: false,
+ prop: "gridName",
+ rules: [{
+ required: true,
+ message: "请选择所属网格",
+ trigger: "blur",
+ }],
+ },
+
+ {
+ hide: true,
+ label: "所属网格",
+ prop: "gridCode",
+ type: "tree",
+ cell: true,
+ props: {
+ label: "gridName",
+ value: "gridCode",
+ },
+ dicUrl:
+ "/api/blade-grid/grid/getGridList?communityCode={{neiCode}}",
+ rules: [
+ {
+ required: true,
+ message: "请选择所属网格",
+ trigger: "blur",
+ },
+ ],
+ },
+
+ {
+ label: "房屋照片",
+ prop: "imageUrls",
+ width: 110,
+ type: "upload",
+ listType: "picture-card",
+ dataType: "string",
+ multiple: true,
+ action: "/api/blade-resource/oss/endpoint/put-file",
+ propsHttp: {
+ res: "data",
+ name: 'name',
+ url: "link",
+ },
+ span: 24,
+ },
+
+
+ {
+ width: 120,
+ label: "电话",
+ prop: "phone",
+ slot: true,
+ rules: [
+ {
+ validator: validatorPhone,
+ trigger: 'blur'
+ }
+ ],
+ },
+
+ {
+ label: "幢",
+ prop: "building",
+ },
+ {
+ label: "单元",
+ prop: "unit",
+ },
+ {
+ label: "室",
+ prop: "room",
+ },
+ {
+ label: "楼层",
+ prop: "floor",
+ type: "number",
+ rules: [{
+ required: true,
+ message: "请输入楼层",
+ trigger: "blur",
+ },],
+ },
+ {
+ label: "面积",
+ prop: "area",
+ type: "number",
+ },
+ {
+ label: "物业费",
+ prop: "propertyPrice",
+ type: "number",
+ },
+ {
+ label: "服务到期",
+ prop: "serviceDue",
+ type: "datetime",
+ format: "yyyy-MM-dd",
+ valueFormat: "yyyy-MM-dd",
+ },
+ {
+ width: 210,
+ overHidden: true,
+ label: "标签",
+ prop: "userHouseLabelVOList",
+ display: false
+ },
+ ]
+ },
+ data: [],
+ excelForm: {},
+ excelOption: {
+ submitBtn: false,
+ emptyBtn: false,
+ column: [{
+ label: '模板上传',
+ prop: 'excelFile',
+ type: 'upload',
+ drag: true,
+ loadText: '模板上传中,请稍等',
+ span: 24,
+ propsHttp: {
+ res: 'data'
+ },
+ tip: '请上传 .xls,.xlsx 标准格式文件',
+ action: "/api/blade-system/user/import-user"
+ },
+ {
+ label: "数据覆盖",
+ prop: "isCovered",
+ type: "switch",
+ align: "center",
+ width: 80,
+ dicData: [{
+ label: "否",
+ value: 0
+ },
+ {
+ label: "是",
+ value: 1
+ }
+ ],
+ value: 0,
+ slot: true,
+ rules: [{
+ required: true,
+ message: "请选择是否覆盖",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: '模板下载',
+ prop: 'excelTemplate',
+ formslot: true,
+ span: 24,
+ }
+ ]
+ }
+ }
+ },
+ watch: {
+ 'form.source': {
+ handler(newData) {
+
+ let locationColumn = this.findObject(
+ this.option.column,
+ 'location'
+ )
+
+ if (newData == 1) {
+ locationColumn.disabled = true
+ } else {
+ locationColumn.disabled = false
+ }
+ },
+ },
+ },
+ computed: {
+ ...mapGetters(["userInfo", "permission"]),
+ permissionList() {
+ return {
+ addBtn: this.vaildData(this.permission.house_add, true),
+ viewBtn: this.vaildData(this.permission.house_view, true),
+ delBtn: this.vaildData(this.permission.house_del, true),
+ editBtn: this.vaildData(this.permission.house_edit, true)
+ }
+ },
+
+ textDispose() {
+ return (row, flag, type) => {
+ if (row[flag] || row[type] == null) {
+ return row[type]
+ } else {
+ if (type == 'idCard') {
+ return row[type].replace(/^(.{6})(?:\d+)(.{4})$/, "$1******$2")
+ } else {
+ return row[type].replace(/^(.{3})(?:\d+)(.{4})$/, "$1****$2")
+ }
+ }
+ }
+ },
+ showLocation() {
+ return (data) => {
+ if (data != null && data.indexOf(',') != -1) {
+ data = data.split(',')
+
+ return data[2]
+ } else {
+ return data || ''
+ }
+ }
+ },
+
+ labelDispose() {
+ return (list) => {
+ return list.map(item => item.labelName).join(',')
+ }
+ },
+
+ getColor() {
+ return (data) => {
+ return setHouseLabelColor(data)
+ }
+ }
+ },
+ mounted() { },
+ methods: {
+ locationDispose(data) {
+ data = data.split(',')
+
+ return {
+ lng: data[0],
+ lat: data[1],
+ address: data[2]
+ }
+ },
+
+ onsubmit() {
+ if (this.labelForm.color === '#999') {
+ let params = {
+ householdId: this.currentRow.id,
+ labelId: this.currentLabel.id
+ }
+ removeHouseholdLabel(params).then(res => {
+ this.$message({
+ type: "success",
+ message: "操作成功!"
+ })
+ this.editLabelFlge = false
+ this.manageLabel(this.currentRow)
+ this.loading = false
+ })
+ } else {
+ this.labelForm.houseCode = this.currentRow.houseCode
+ this.labelForm.householdId = this.currentRow.id
+ this.labelForm.labelId = this.currentLabel.id
+ this.labelForm.lableType = 2
+ saveOrUpdateHouseLabelInfo(this.labelForm).then(res => {
+ this.$message({
+ type: "success",
+ message: "操作成功!"
+ })
+ this.editLabelFlge = false
+ this.manageLabel(this.currentRow)
+ this.loading = false
+ })
+ }
+ },
+
+ changLabel(item) {
+ // this.editLabelFlge = true
+ this.currentLabel = item
+ // this.labelForm.color = item.color
+ // this.labelForm.remark = item.remark
+ // console.log(item,9999)
+ if(item.name == '闲置'){
+ this.labelForm.color = 'green'
+ }
+ if(item.name == '自住'){
+ this.labelForm.color = 'blue'
+ }
+ if(item.name == '出租'){
+ this.labelForm.color = 'yellow'
+ }
+ this.labelForm.houseCode = this.currentRow.houseCode
+ this.labelForm.labelId = this.currentLabel.id
+ this.labelForm.lableType = 2
+ saveOrUpdateHouseLabelInfo(this.labelForm).then(res => {
+ this.$message({
+ type: "success",
+ message: "操作成功!"
+ })
+ // this.editLabelFlge = false
+ this.manageLabel(this.currentRow)
+ this.loading = false
+ })
+ },
+ manageLabel(item) {
+ this.loading = true
+ this.currentRow = item
+ this.labelFlag = true
+ let params = {
+ parentId: 1001
+ }
+ // 查询标签
+ getLabelList(Object.assign(params)).then(res => {
+ const data = res.data.data
+ // 查询详情
+ getDetatils({
+ houseCode: item.houseCode
+ }).then(res => {
+ if (res.data.data) {
+ this.userHouseLabelVOList = res.data.data.userHouseLabelVOList
+ this.loading = false
+ // 将细类放到一起
+ data.forEach(f => {
+ if (this.userHouseLabelVOList.length > 0) {
+ this.userHouseLabelVOList.forEach(h => {
+ if (Number(f.id) == h.labelId) {
+ f['color'] = h.color
+ f['remark'] = h.remark
+ }
+ })
+ }
+ })
+ }
+ this.labelData = data
+ this.loading = false
+ })
+ })
+ },
+ handleHouseholdManager(row) {
+ var that = this
+ this.householdManagerVisible = true
+ this.$nextTick(() => {
+ that.$refs.householdManager.init(row)
+ })
+ },
+ rowSave(row, done, loading) {
+ if (row.imageUrls.length > 0) {
+ var urls = []
+ var split = row.imageUrls.split(",")
+ split.forEach(url => {
+ var names = url.split("jczz/")
+ urls.push(names[1])
+ })
+ row.imageUrls = urls.join(",")
+ }
+
+ add({ ...row, ...this.locationDispose(row.location) }
+ ).then(() => {
+ this.initFlag = false
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!"
+ })
+ done()
+ }, error => {
+ window.console.log(error)
+ loading()
+ })
+ },
+ rowUpdate(row, index, done, loading) {
+ if (row.imageUrls.length > 0) {
+ var urls = []
+ var split = row.imageUrls.split(",")
+ split.forEach(url => {
+ var names = url.split("jczz/")
+ urls.push(names[1])
+ })
+ row.imageUrls = urls.join(",")
+ }
+
+ update({ ...row, ...this.locationDispose(row.location) }).then(() => {
+ this.initFlag = false
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!"
+ })
+ done()
+ }, error => {
+ window.console.log(error)
+ loading()
+ })
+ },
+ rowDel(row) {
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning"
+ })
+ .then(() => {
+ return remove(row.id)
+ })
+ .then(() => {
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!"
+ })
+ })
+ },
+ searchReset() {
+ this.query = {}
+ this.treeDeptId = ''
+ this.onLoad(this.page)
+ },
+ searchChange(params, done) {
+ this.query = params
+ this.page.currentPage = 1
+ this.onLoad(this.page, params)
+ done()
+ },
+ selectionChange(list) {
+ this.selectionList = list
+ },
+ selectionClear() {
+ this.selectionList = []
+ this.$refs.crud.toggleSelection()
+ },
+ handleDelete() {
+ if (this.selectionList.length === 0) {
+ this.$message.warning("请选择至少一条数据")
+ return
+ }
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning"
+ })
+ .then(() => {
+ return remove(this.ids)
+ })
+ .then(() => {
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!"
+ })
+ this.$refs.crud.toggleSelection()
+ })
+ },
+ handleImport() {
+ this.excelBox = true
+ },
+ uploadAfter(res, done, loading, column) {
+ window.console.log(column)
+ this.excelBox = false
+ this.refreshChange()
+ done()
+ },
+ handleExport() {
+ this.$confirm("是否导出房屋数据?", "提示", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning"
+ }).then(() => {
+ NProgress.start()
+ var data = {
+ ...this.query
+ }
+ data = Qs.stringify(data)
+ exportBlob(
+ `/api/blade-house/house/export-house?${this.website.tokenHeader}=${getToken()}&` + data
+ ).then(res => {
+ downloadXls(res.data, `房屋数据表${dateNow()}.xlsx`)
+ NProgress.done()
+ })
+ })
+ },
+ handleTemplate() {
+ exportBlob(`/api/blade-system/user/export-template?${this.website.tokenHeader}=${getToken()}`).then(res => {
+ downloadXls(res.data, "房屋数据模板.xlsx")
+ })
+ },
+ beforeOpen(done, type) {
+ if (["edit", "view"].includes(type)) {
+ getDetatil({
+ id: this.form.id
+ }).then(res => {
+ this.form = res.data.data
+
+ this.form.location = [this.form.lng, this.form.lat, this.form.address].join(',')
+
+ if (this.form.imageUrls) {
+ if (this.form.imageUrls.length > 0) {
+ var urls = []
+ var names = this.form.imageUrls.split(",")
+ names.forEach(name => {
+ urls.push(website.minioUrl + name)
+ })
+ this.form.imageUrls = urls.join(",")
+ }
+ }
+ })
+ }
+ this.initFlag = true
+ done()
+ },
+ currentChange(currentPage) {
+ this.page.currentPage = currentPage
+ },
+ sizeChange(pageSize) {
+ this.page.pageSize = pageSize
+ },
+ refreshChange() {
+ this.onLoad(this.page, this.query)
+ },
+ onLoad(page, params = {}) {
+ this.loading = true
+
+ getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+ const data = {
+ ...res.data.data,
+ records: res.data.data.records.map(item => {
+ if (item.imageUrls) {
+ if (item.imageUrls.length > 0) {
+ var urls = []
+ var names = item.imageUrls.split(",")
+ names.forEach(name => {
+ urls.push(website.minioUrl + name)
+ })
+ item.imageUrls = urls.join(",")
+ }
+ }
+
+ return {
+ ...item,
+ 'phoneflag': false,
+ }
+ })
+ }
+ this.page.total = data.total
+ this.data = data.records
+ this.loading = false
+ this.selectionClear()
+ })
+ },
+ showStringDispose(row, type) {
+ row[type] = !row[type]
+ }
+ }
+}
+</script>
+
+<style>
+.box {
+ height: 800px;
+}
+
+.el-scrollbar {
+ height: 100%;
+}
+
+.box .el-scrollbar__wrap {
+ overflow: scroll;
+}
+</style>
\ No newline at end of file
diff --git a/src/views/userHouse/practitioner.vue b/src/views/userHouse/practitioner.vue
new file mode 100644
index 0000000..cd82781
--- /dev/null
+++ b/src/views/userHouse/practitioner.vue
@@ -0,0 +1,675 @@
+<template>
+ <basic-container>
+ <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" ref="crud" v-model="form"
+ :permission="permissionList" @row-save="rowSave" @row-del="rowDel" :before-open="beforeOpen"
+ @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"
+ @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
+ <template slot-scope="{row, size}" slot="age">
+ <el-tag :size="size">{{
+ row.age
+ }}</el-tag>
+ </template>
+
+ <template slot-scope="{row, size}" slot="gender">
+ <el-tag :size="size" :type="showGender(row.gender).type">{{
+ showGender(row.gender).text
+ }}</el-tag>
+ </template>
+
+ <template slot-scope="{row, size}" slot="resignationFlag">
+ <el-tag :size="size" :type="showResignationFlag(row.resignationFlag).type">{{
+ showResignationFlag(row.resignationFlag).text
+ }}</el-tag>
+ </template>
+
+ <template slot-scope="{row, size}" slot="telephone">
+ <el-button :size="size" type="text" @click="showStringDispose(row, 'telephoneflag')"
+ v-text="textDispose(row, 'telephoneflag', 'telephone')">
+ </el-button>
+ </template>
+ <template slot-scope="{row, size}" slot="idCard">
+ <el-button :size="size" type="text" @click="showStringDispose(row, 'idCardflag')"
+ v-text="textDispose(row, 'idCardflag', 'idCard')">
+ </el-button>
+ </template>
+
+ <!-- <template slot="menuLeft">
+ <el-button type="primary" size="small" @click="handleQueryAlarm(1)">未成年人 ({{ countInfo.minors }}) 人
+ </el-button>
+ <el-button type="primary" size="small" @click="handleQueryAlarm(2)">少数民族 ({{ countInfo.nationalMinority }}) 人
+ </el-button>
+ </template> -->
+
+ <template slot-scope="{row, size}" slot="menu">
+ <!-- <el-button :size="size" type="text" icon="el-icon-s-check" v-if="permission.place_audit_cur"
+ @click="auditCur({ ...row, confirmFlag: 1 })">审核
+ </el-button>
+
+ <el-button :size="size" type="text" icon="el-icon-edit" v-if="permission.place_manage_tenants"
+ @click="ManageTenants(row)">场所维护
+ </el-button> -->
+ </template>
+
+ <template slot-scope="{row, size}" slot="principalPhone">
+ <el-button :size="size" type="text" @click="showStringDispose(row, 'principalPhoneflag')"
+ v-text="textDispose(row, 'principalPhoneflag', 'principalPhone')">
+ </el-button>
+ </template>
+ <template slot-scope="{row, size}" slot="principalIdCard">
+ <el-button :size="size" type="text" @click="showStringDispose(row, 'principalIdCardflag')"
+ v-text="textDispose(row, 'principalIdCardflag', 'principalIdCard')">
+ </el-button>
+ </template>
+ </avue-crud>
+
+ <baseAllInfo ref="BaseAllInfo"></baseAllInfo>
+
+ <el-dialog class="place-info-box audit-info-box" title="审核" append-to-body :visible.sync="auditBasePopup"
+ width="30%">
+ <auditBase></auditBase>
+ </el-dialog>
+ </basic-container>
+</template>
+
+<script>
+ import {
+ getPractitionerList as getList,
+ add,
+ getWarningPersonnelCount as getCount
+ } from "@/api/place/place"
+ import {
+ remove
+ } from "@/api/place/practitioner"
+ import {
+ mapGetters
+ } from "vuex"
+
+ import website from '@/config/website'
+
+ import auditBase from './components/auditBase'
+ import baseAllInfo from './components/baseAllInfo'
+
+ export default {
+ data() {
+ //手机号格式校验
+ let validatorPhone = function(rule, value, callback) {
+ if (value) {
+ if (!/^1[3456789]\d{9}$/.test(value)) {
+ callback(new Error('手机号格式有误!'))
+ } else {
+ callback()
+ }
+ }
+ callback()
+ }
+
+ return {
+ form: {},
+ query: {},
+ loading: true,
+
+ page: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0,
+ },
+ datetime: "",
+ selectionList: [],
+ option: {
+ labelWidth: 120,
+ searchLabelWidth: 96,
+ searchShow: true,
+ searchMenuSpan: 3,
+ menuWidth: 160,
+ height: "auto",
+ calcHeight: 54,
+ dialogWidth: 950,
+ tip: false,
+ border: true,
+ addBtn: false,
+ index: true,
+ viewBtn: true,
+ editBtn: false,
+ delBtn: true,
+ dialogClickModal: false,
+ column: [{
+ label: "所属街道",
+ parent: false,
+ search: true,
+ searchSpan: 4,
+ prop: "townStreetName",
+ type: "tree",
+ dicUrl: "/api/blade-system/region/getTownTree",
+ props: {
+ label: "name",
+ value: "name"
+ },
+ rules: [{
+ required: true,
+ message: "请选择所属街道",
+ trigger: "blur",
+ }, ],
+ },
+
+ {
+ parent: false,
+ label: "所属社区",
+ prop: "neiName",
+ width: 150,
+ search: true,
+ type: "tree",
+ searchSpan: 4,
+ dicUrl: "/api/blade-system/region/treeToCommunity",
+ props: {
+ label: "name",
+ value: "name",
+ },
+ cascader: ["gridCode"],
+ rules: [{
+ required: true,
+ message: "请选择所属社区",
+ trigger: "blur",
+ }, ],
+ },
+ {
+ overHidden: true,
+ label: "姓名",
+ span: 12,
+ prop: "name",
+ searchSpan: 3,
+ search: true,
+ searchLabelWidth: 76,
+
+ },
+ {
+ label: "性别",
+ prop: "gender",
+ width: 80,
+ align: "center",
+ type: "select",
+ dicData: [{
+ label: "男",
+ value: 1
+ },
+ {
+ label: "女",
+ value: 0
+ }
+ ]
+ },
+ {
+ label: "民族",
+ width: 80,
+ dicUrl: "/api/blade-system/dict-biz/tree?code=nationType",
+ props: {
+ label: "title",
+ value: "key",
+ },
+ prop: "ethnicity",
+ type: "select",
+ dataType: "number"
+ },
+ {
+ overHidden: true,
+ label: "身份证号",
+ prop: "idCard",
+ // search: true,
+ width: 160,
+ searchSpan: 4,
+ slot: true,
+ },
+ {
+ label: "电话号码",
+ prop: "telephone",
+ searchSpan: 4,
+ searchLabelWidth: 110,
+ search: true,
+ },
+ {
+ width: 80,
+ label: "年龄",
+ prop: "age",
+ align: "center"
+ },
+ {
+ minWidth: 160,
+ label: "现居住地",
+ prop: "tempAddress",
+ },
+ {
+ label: "岗位",
+ prop: "jobNature",
+ }, {
+ width: 110,
+ label: '从业人员照片',
+ prop: 'employerImg',
+ fileType: 'img',
+ type: "upload",
+ listType: "picture-card",
+ dataType: "string",
+ disabled: true,
+ row: true,
+ span: 12,
+ }, {
+ label: "工作单位",
+ prop: "employer",
+ searchSpan: 4
+ },
+ {
+ width: 160,
+ label: "标签",
+ addDisplay: false,
+ editDisplay: false,
+ viewDisplay: false,
+ prop: "categoryName",
+ searchSpan: 4
+ },
+ {
+ label: "状态",
+ searchLabelWidth: 60,
+ prop: "resignationFlag",
+ align: 'center',
+ searchSpan: 3,
+ search: true,
+ type: "select",
+ dicData: [{
+ label: "在职",
+ value: "1"
+ },
+ {
+ label: "已离职",
+ value: "2"
+ }
+ ]
+ },
+ {
+ label: "入职时间",
+ prop: "employmentTime",
+ hide: true,
+ },
+ {
+ label: "离职时间",
+ prop: "resignationTime",
+ hide: true,
+ },
+ {
+ label: "预警人员",
+ addDisplay: false,
+ editDisplay: false,
+ viewDisplay: false,
+ prop: "type",
+ searchSpan: 3,
+ hide: true,
+ type: "select",
+ search: true,
+ dicData: [{
+ label: "未成年人",
+ value: 1
+ },
+ {
+ label: "少数民族",
+ value: 2
+ },
+ {
+ label: "以上都有",
+ value: 3
+ }
+ ],
+ },
+ ],
+ },
+ data: [],
+
+ auditBasePopup: false,
+
+ countInfo: {}
+ }
+ },
+
+ provide() {
+ return {
+ placeElement: this,
+ }
+ },
+
+ components: {
+ auditBase,
+ baseAllInfo
+ },
+
+
+ computed: {
+ ...mapGetters(["permission", "userInfo"]),
+ permissionList() {
+ return {
+ // addBtn: this.vaildData(this.permission.place_add, true),
+ viewBtn: this.vaildData(this.permission.place_practitioner_view, true),
+ delBtn: this.vaildData(this.permission.place_practitioner_delete, true),
+ // editBtn: this.vaildData(this.permission.place_edit, true),
+ }
+ },
+ ids() {
+ let ids = []
+ this.selectionList.forEach((ele) => {
+ ids.push(ele.id)
+ })
+ return ids.join(",")
+ },
+
+ showConfirmFlag() {
+ return (data) => {
+ let tags = {
+ text: '',
+ type: ''
+ }
+ if (data == 1) {
+ tags = {
+ text: '待审核',
+ type: 'warning'
+ }
+ } else if (data == 2) {
+ tags = {
+ text: '已审核',
+ type: 'success'
+ }
+ } else if (data == 3) {
+ tags = {
+ text: '未通过',
+ type: 'danger'
+ }
+ } else if (data == 4) {
+ tags = {
+ text: '待完善',
+ type: 'info'
+ }
+ }
+
+ return tags
+ }
+ },
+
+ showResignationFlag() {
+ return (data) => {
+ let tags = {
+ text: '',
+ type: ''
+ }
+
+ if (data == 1) {
+ tags = {
+ text: '在职',
+ type: 'success'
+ }
+ } else if (data == 2) {
+ tags = {
+ text: '已离职',
+ type: 'danger'
+ }
+ }
+
+ return tags
+ }
+ },
+
+ showGender() {
+ return (data) => {
+ let tags = {
+ text: '',
+ type: ''
+ }
+
+ if (data == 1) {
+ tags = {
+ text: '男',
+ type: 'primary'
+ }
+ } else if (data == 0) {
+ tags = {
+ text: '女',
+ type: 'primary'
+ }
+ }
+
+ return tags
+ }
+ },
+
+ decimalProcessing() {
+ return (data) => {
+ if (data != null) {
+ return Number(data).toFixed(6)
+ } else {
+ return ''
+ }
+ }
+ },
+
+ textDispose() {
+ return (row, flag, type) => {
+ if (row[flag] || row[type] == null) {
+ return row[type]
+ } else {
+ if (type == 'principalIdCard') {
+ return row[type].replace(/^(.{6})(?:\d+)(.{4})$/, "$1******$2")
+ } else {
+ return row[type].replace(/^(.{3})(?:\d+)(.{4})$/, "$1****$2")
+ }
+ }
+ }
+ }
+ },
+ methods: {
+ handleQueryAlarm(type) {
+ this.query.type = type
+ this.onLoad(this.page)
+ },
+ showStringDispose(row, type) {
+ row[type] = !row[type]
+ },
+
+ locationDispose(data) {
+ data = data.split(',')
+
+ return {
+ longitude: data[0],
+ latitude: data[1],
+ location: data[2]
+ }
+ },
+ rowDel(row) {
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning"
+ })
+ .then(() => {
+ return remove(row.id)
+ })
+ .then(() => {
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!"
+ })
+ })
+ },
+
+ auditCur(row) {
+ this.curAuditRow = row
+ this.auditBasePopup = true
+ },
+
+ ManageTenants(item) {
+ this.$refs.BaseAllInfo.initOpen(item)
+ },
+
+ rowSave(row, done, loading) {
+ if (row.imageUrls.length > 0) {
+ var urls = []
+ var split = row.imageUrls.split(",").filter(item => item != '')
+ split.forEach(url => {
+ var names = url.split("jczz/")
+ urls.push(names[1])
+ })
+ row.imageUrls = urls.join(",")
+ }
+
+ let label = row.label
+
+ if (row.smallLabel != '') {
+ label = label + ',' + row.smallLabel
+ }
+
+ delete row.smallLabel
+
+ add({
+ ...row,
+ label,
+ ...this.locationDispose(row.location)
+ }).then(
+ () => {
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ done()
+ },
+ (error) => {
+ window.console.log(error)
+ loading()
+ }
+ )
+ },
+
+ searchReset() {
+ this.query = {}
+ this.onLoad(this.page)
+ },
+ searchChange(params, done) {
+ this.query = params
+ this.page.currentPage = 1
+ this.onLoad(this.page, params)
+ done()
+ },
+ selectionChange(list) {
+ this.selectionList = list
+ },
+ selectionClear() {
+ this.selectionList = []
+ this.$nextTick(() => {
+ this.$refs.crud && this.$refs.crud.toggleSelection()
+ })
+ },
+ handleDelete() {
+ if (this.selectionList.length === 0) {
+ this.$message.warning("请选择至少一条数据")
+ return
+ }
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ return remove(this.ids)
+ })
+ .then(() => {
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ this.$refs.crud.toggleSelection()
+ })
+ },
+
+ beforeOpen(done, type) {
+ if (["edit", "view"].includes(type)) {
+ if (this.form.resignationFlag) {
+ if (this.form.resignationFlag == 1) {
+ this.form.resignationFlag = '在职'
+ }
+ if (this.form.resignationFlag == 2) {
+ this.form.resignationFlag = '已离职'
+ }
+ // this.form.employerImg = this.form.employerImg.split(",").filter(item => item != '').map(item => website.minioUrl + item).join(',')
+ }
+ done()
+ }
+ },
+
+ currentChange(currentPage) {
+ this.page.currentPage = currentPage
+ },
+ sizeChange(pageSize) {
+ this.page.pageSize = pageSize
+ },
+ refreshChange() {
+ this.onLoad(this.page, this.query)
+ },
+ onLoad(page, params = {}) {
+ this.loading = true
+
+ getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then((res) => {
+ const data = res.data.data
+
+ this.page.total = data.total
+
+ this.data = data.records
+ this.getPeopleCount();
+
+ this.data.forEach(item => {
+ this.$set(item, 'telephoneflag', false)
+ this.$set(item, 'idCardflag', false)
+ if (item.employerImg && item.employerImg != '' && item.employerImg != null && item.employerImg
+ .length) {
+ var urls = []
+ var names = item.employerImg.split(",").filter(item => item != '')
+ names.forEach(name => {
+ urls.push(website.minioUrl + name)
+ })
+ item.employerImg = urls.join(",")
+ }
+ })
+
+ this.loading = false
+ this.selectionClear()
+ })
+ },
+
+
+ getPeopleCount(params = {}) {
+ // 在职的
+ // params = {
+ // resignationFlag:1
+ // }
+ getCount(params).then(res => {
+ this.countInfo = res.data.data;
+ })
+ }
+
+ }
+ }
+</script>
+
+<style>
+ .avue-upload__icon {
+ line-height: 6;
+ }
+
+ .type-row {
+ display: flex;
+ padding: 0 0 20px;
+ }
+
+ .type-item {
+ padding: 12px 12px;
+ background-color: #429FFF;
+ color: #fff;
+ font-size: 14px;
+ margin-right: 30px;
+ border-radius: 6px;
+ text-align: center;
+ }
+</style>
\ No newline at end of file
diff --git a/vue.config.js b/vue.config.js
index e3847bf..871e091 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -54,7 +54,7 @@
},
"/api": {
//本地服务接口地址
- target: "http://192.168.204.1:9528",
+ target: "http://localhost:9528",
// target: "https://srgdjczzxtpt.com:2080/api",
// target: "https://kt39592615.goho.co",
// target: "http://z4042833u6.wicp.vip",
--
Gitblit v1.9.3