26 files modified
26 files added
| | |
| | | "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", |
| | |
| | | "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", |
| | |
| | | "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" |
| | | }, |
| | |
| | | "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", |
| | |
| | | "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", |
| | |
| | | "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": { |
| | |
| | | "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", |
| | |
| | | "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", |
| | |
| | | "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", |
| | |
| | | "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" |
| | | } |
| | |
| | | "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", |
| | |
| | | "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": { |
| | |
| | | "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", |
| | |
| | | } |
| | | }, |
| | | "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": { |
| | |
| | | "@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", |
| | |
| | | "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", |
| | |
| | | "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": { |
| | |
| | | "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": { |
| | |
| | | "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", |
| | |
| | | "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", |
| | |
| | | "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", |
| | |
| | | "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", |
| | |
| | | "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", |
| | |
| | | "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", |
| | |
| | | "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", |
| | |
| | | } |
| | | }, |
| | | "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": { |
| | |
| | | "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", |
| | |
| | | "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", |
| | |
| | | } |
| | | }) |
| | | } |
| | | |
| | | 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', |
| New file |
| | |
| | | <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> |
| | |
| | | <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", |
| | |
| | | }; |
| | | </script> |
| | | <style scoped lang="scss"> |
| | | ::v-deep(.avue-form__menu--center){ |
| | | ::v-deep .avue-form__menu--center { |
| | | display: none !important; |
| | | } |
| | | </style> |
| | |
| | | columnBtn: false, |
| | | dialogClickModal: false, |
| | | column: [{ |
| | | searchLabelWidth: 60, |
| | | label: "地址", |
| | | prop: "address", |
| | | minWidth: 100, |
| | |
| | | row: true, |
| | | span: 24, |
| | | }, { |
| | | label: "社区", |
| | | label: "所属社区", |
| | | prop: "communityName", |
| | | align: 'center', |
| | | labelWidth: 120, |
| | |
| | | }, ], |
| | | }, |
| | | { |
| | | searchLabelWidth: 40, |
| | | label: "宣防单位", |
| | | prop: "deptName", |
| | | align: 'center', |
| | |
| | | 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, |
| | |
| | | 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, |
| | |
| | | }, |
| | | |
| | | 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({ |
| | |
| | | }) |
| | | .then(() => { |
| | | row.isDeleted = 1 |
| | | return removeTask(row) |
| | | return update(row) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page) |
| | |
| | | <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"> |
| | | 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="menuLeft"> |
| | | <el-button type="warning" size="small" plain v-if="permission.household_export" icon="el-icon-download" |
| | | @click="handleExport">导出 |
| | | </el-button> |
| | | </template> |
| | | |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { getList, remove, update, add, getGridPatrolRecord } from "@/api/grid/gridPatrolRecord" |
| | | import { mapGetters } from "vuex" |
| | | 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 { |
| | |
| | | selection: true, |
| | | excelBtn: true, |
| | | dialogClickModal: false, |
| | | column: [ |
| | | 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: 96, |
| | | searchSpan: 4, |
| | | searchLabelWidth: 100, |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | viewDisplay: false, |
| | | label: "巡查人名称", |
| | | prop: "userName", |
| | | search: true, |
| | | }, |
| | | { |
| | | label: "巡查标题", |
| | | prop: "name", |
| | |
| | | searchSpan: 4, |
| | | search: true, |
| | | searchLabelWidth: 76, |
| | | rules: [ |
| | | { |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入巡查标题", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, ], |
| | | }, |
| | | { |
| | | label: "巡查内容", |
| | |
| | | dataType: "string", |
| | | span: 24, |
| | | value: [117.966460, 28.431002, ""], |
| | | rules: [ |
| | | { |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择巡查地址", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, ], |
| | | }, |
| | | |
| | | { |
| | |
| | | type: "date", |
| | | format: "yyyy-MM-dd HH:mm:ss", |
| | | valueFormat: "yyyy-MM-dd HH:mm:ss", |
| | | rules: [ |
| | | { |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入巡查时间", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, ], |
| | | } |
| | | ], |
| | | }, |
| | | data: [], |
| | | } |
| | | }, |
| | | watch: { |
| | | }, |
| | | watch: {}, |
| | | computed: { |
| | | ...mapGetters(["permission", "userInfo"]), |
| | | |
| | |
| | | } |
| | | }, |
| | | 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(',') |
| | | |
| | |
| | | this.onLoad(this.page, this.query) |
| | | }, |
| | | onLoad (page, params = {}) { |
| | | const { dateTime } = this.query |
| | | const { |
| | | dateTime |
| | | } = this.query |
| | | let values = { |
| | | ...params, |
| | | } |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { getList } from "@/api/punch_card" |
| | | import { mapGetters } from "vuex" |
| | | import { |
| | | getList |
| | | } from "@/api/punch_card" |
| | | import { |
| | | mapGetters |
| | | } from "vuex" |
| | | import website from '@/config/website' |
| | | |
| | | export default { |
| | |
| | | excelBtn: true, |
| | | dialogClickModal: false, |
| | | header:false, |
| | | column: [ |
| | | 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: "打卡人员", |
| | |
| | | type: "date", |
| | | format: "yyyy-MM-dd HH:mm:ss", |
| | | valueFormat: "yyyy-MM-dd HH:mm:ss", |
| | | rules: [ |
| | | { |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入走访时间", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, ], |
| | | }, |
| | | { |
| | | label: "工作内容", |
| | |
| | | data: [], |
| | | } |
| | | }, |
| | | watch: { |
| | | }, |
| | | watch: {}, |
| | | computed: { |
| | | ...mapGetters(["permission", "userInfo"]), |
| | | permissionList () { |
| | |
| | | onLoad (page, params = {}) { |
| | | this.loading = true |
| | | |
| | | const { dateTime } = this.query |
| | | const { |
| | | dateTime |
| | | } = this.query |
| | | |
| | | if (dateTime) { |
| | | this.query = { |
| New file |
| | |
| | | <!-- 走访日志 --> |
| | | <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> |
| | |
| | | slot: true |
| | | }, |
| | | { |
| | | width: 100, |
| | | width: 120, |
| | | label: "诉求人联系电话", |
| | | prop: "applicantPhone", |
| | | rules: [{ |
| | |
| | | // value: [117.966460, 28.431002, ""] |
| | | }, |
| | | { |
| | | width: 100, |
| | | label: "事发地点-经度", |
| | | prop: "sceneGeoLng", |
| | | disabled: true, |
| | | width: 100, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入事发地点-经度", |
| | |
| | | }, ], |
| | | }, |
| | | { |
| | | width: 100, |
| | | label: "事发地点-纬度", |
| | | prop: "sceneGeoLat", |
| | | disabled: true, |
| | |
| | | values.dateTime = null |
| | | } |
| | | this.loading = true |
| | | this.getDeptInfo(); |
| | | // this.getDeptInfo(); |
| | | |
| | | getList(page.currentPage, page.pageSize, values).then((res) => { |
| | | const data = res.data.data |
| | |
| | | <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"> |
| | | 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">删 |
| | | 除 |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { getList, remove, update, add, getGridman } from "@/api/grid/gridman" |
| | | import { mapGetters } from "vuex" |
| | | import { |
| | | getList, |
| | | remove, |
| | | update, |
| | | add, |
| | | getGridman |
| | | } from "@/api/grid/gridman" |
| | | import { |
| | | mapGetters |
| | | } from "vuex" |
| | | import website from '@/config/website' |
| | | export default { |
| | | data () { |
| | |
| | | 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, |
| | |
| | | prop: "communityCode", |
| | | search: false, |
| | | type: "tree", |
| | | dataType: 'string', |
| | | dicUrl: "/api/blade-system/region/tree", |
| | | dicUrl: "/api/blade-system/region/treeToCommunity", |
| | | cascader: ['gridCode'], |
| | | props: { |
| | | label: "name", |
| | | value: "id", |
| | | }, |
| | | cascader: ["gridCode"], |
| | | rules: [ |
| | | { |
| | | rules: [{ |
| | | required: true, |
| | | message: "请选择所属社区", |
| | | trigger: "blur", |
| | | }, ], |
| | | }, |
| | | ], |
| | | }, |
| | | |
| | | |
| | | { |
| | | label: "所属网格", |
| | |
| | | label: "gridName", |
| | | value: "gridCode", |
| | | }, |
| | | dicUrl: |
| | | "/api/blade-grid/grid/getGridList?communityCode={{communityCode}}", |
| | | rules: [ |
| | | { |
| | | dicUrl: "/api/blade-grid/grid/getGridList?communityCode={{communityCode}}", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入网格名称", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, ], |
| | | }, |
| | | |
| | | { |
| | |
| | | searchSpan: 4, |
| | | search: true, |
| | | searchLabelWidth: 60, |
| | | rules: [ |
| | | { |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入网格员", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, ], |
| | | }, |
| | | |
| | | { |
| | |
| | | prop: "mobile", |
| | | searchSpan: 4, |
| | | search: true, |
| | | rules: [ |
| | | { |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入联系电话", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, ], |
| | | slot: true |
| | | }, |
| | | |
| | |
| | | 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: "请选择所属社区", |
| | |
| | | data: [], |
| | | } |
| | | }, |
| | | watch: { |
| | | }, |
| | | watch: {}, |
| | | computed: { |
| | | ...mapGetters(["permission", "userInfo"]), |
| | | permissionList () { |
| | |
| | | this.onLoad(this.page, this.query) |
| | | }, |
| | | onLoad (page, params = {}) { |
| | | const { dateTime } = this.query |
| | | const { |
| | | dateTime |
| | | } = this.query |
| | | let values = { |
| | | ...params, |
| | | } |
| | |
| | | trigger: "blur", |
| | | }, ], |
| | | }, |
| | | |
| | | { |
| | | overHidden: true, |
| | | label: "网格名称", |
| | |
| | | </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"> |
| | |
| | | </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> |
| | |
| | | slot: true |
| | | }, |
| | | { |
| | | width: 140, |
| | | label: "场所地址", |
| | | prop: "location", |
| | | span: 24, |
| | | row: true, |
| | | overHidden: true, |
| | | searchSpan: 4, |
| | | searchLabelWidth: 46, |
| | | }, |
| | |
| | | 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 |
| | | }] |
| | | |
| | | }, |
| | | ], |
| | | }, |
| | |
| | | |
| | | 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 = {} |
| | |
| | | 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") { |
| | |
| | | .avue-upload__icon { |
| | | line-height: 6; |
| | | } |
| | | |
| | | .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> |
| | |
| | | </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" |
| New file |
| | |
| | | <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> |
| New file |
| | |
| | | <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> |
| New file |
| | |
| | | <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> |
| New file |
| | |
| | | <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> |
| | |
| | | searchLabelWidth: 96, |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 450, |
| | | searchGutter: 15, |
| | | menuWidth: 350, |
| | | dialogMenuPosition: 'center', |
| | | height: "auto", |
| | | calcHeight: 54, |
| | |
| | | prop: "title", |
| | | span: 24, |
| | | row: true, |
| | | searchSpan: 4, |
| | | searchSpan: 3, |
| | | search: true, |
| | | searchLabelWidth: 76, |
| | | rules: [{ |
| | |
| | | width: 110, |
| | | label: "招标封面", |
| | | prop: "url", |
| | | // align:'center', |
| | | type: "upload", |
| | | listType: "picture-img", |
| | | action: "/api/blade-resource/oss/endpoint/put-file", |
| | |
| | | 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, |
| | |
| | | }], |
| | | }, |
| | | { |
| | | searchLabelWidth: 80, |
| | | label: "发布时间", |
| | | prop: "dateTime", |
| | | type: "daterange", |
| | |
| | | |
| | | { |
| | | width: 110, |
| | | searchLabelWidth: 80, |
| | | label: "所属街道", |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | |
| | | }, |
| | | { |
| | | width: 156, |
| | | searchLabelWidth: 80, |
| | | overHidden: true, |
| | | label: "所属社区", |
| | | addDisplay: false, |
| | |
| | | }, |
| | | { |
| | | width: 100, |
| | | searchLabelWidth: 80, |
| | | label: "发布状态", |
| | | prop: "publish", |
| | | value: "0", |
| | | slot: true, |
| | | searchSpan: 4, |
| | | searchSpan: 3, |
| | | search: true, |
| | | type: "select", |
| | | rules: [{ |
| | |
| | | searchMenuSpan: 3, |
| | | menuWidth: 450, |
| | | addBtn: false, |
| | | searchGutter: 15, |
| | | menu: false, |
| | | height: "auto", |
| | | calcHeight: 54, |
| | |
| | | prop: "title", |
| | | span: 24, |
| | | row: true, |
| | | searchSpan: 4, |
| | | searchSpan: 3, |
| | | search: true, |
| | | searchLabelWidth: 46, |
| | | rules: [{ |
| | |
| | | }], |
| | | }, |
| | | { |
| | | searchLabelWidth: 80, |
| | | label: "发布时间", |
| | | prop: "dateTime", |
| | | type: "daterange", |
| | |
| | | }, |
| | | { |
| | | width: 110, |
| | | searchLabelWidth: 80, |
| | | label: "所属街道", |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | |
| | | }, |
| | | |
| | | { |
| | | width: 156, |
| | | searchLabelWidth: 80, |
| | | overHidden: true, |
| | | label: "所属社区", |
| | | addDisplay: false, |
| | |
| | | }, |
| | | |
| | | { |
| | | width: 100, |
| | | searchLabelWidth: 80, |
| | | label: "发布状态", |
| | | prop: "publish", |
| | | value: "0", |
| | | slot: true, |
| | | searchSpan: 4, |
| | | searchSpan: 3, |
| | | search: true, |
| | | type: "select", |
| | | display: false, |
| | |
| | | 整改后图片 |
| | | </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> |
| | |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(this.ids) |
| | | // return remove(this.ids) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page) |
| | |
| | | this.onLoad(this.page, this.query) |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | const {} = this.query |
| | | // const {} = this.query |
| | | let values = { |
| | | ...params, |
| | | } |
| | |
| | | }, ], |
| | | }, |
| | | { |
| | | searchLabelWidth: 80, |
| | | parent: false, |
| | | label: "所属社区", |
| | | prop: "neiCode", |
| | | search: true, |
| | | searchSpan: 4, |
| | | width: 150, |
| | | width: 120, |
| | | type: "tree", |
| | | dicUrl: "/api/blade-system/region/treeToCommunity", |
| | | props: { |
| New file |
| | |
| | | <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> |
| | |
| | | <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> |
| | |
| | | if (row.communityCode) { |
| | | this.query.regionCode = row.communityCode |
| | | } |
| | | this.query.labelId = row.labelId |
| | | if (row.parentId) { |
| | | this.query.parentId = row.parentId |
| | | } else { |
| | | this.query.parentId = 103 |
| | | } |
| | | this.query.labelId = row.labelId |
| | | this.onLoad(this.page, this.query) |
| | | }, |
| | | onsubmit() { |
| | |
| | | this.currentRow = item |
| | | this.labelFlag = true |
| | | let params = { |
| | | parentId: 103 |
| | | parentId: this.query.parentId |
| | | } |
| | | // 查询标签 |
| | | getLabelList(Object.assign(params)).then(res => { |
| | |
| | | getDetatils(item.id).then(res => { |
| | | this.householdLabelList = res.data.data.householdLabelList |
| | | // 将细类放到一起 |
| | | data.forEach(e => { |
| | | e.children.forEach(f => { |
| | | console.log("*********123*********", res.data.data.householdLabelList) |
| | | data.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 |
| | | 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 |
| | | }) |
| | | }) |
| New file |
| | |
| | | <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> |
| | |
| | | roleBox: false, |
| | | |
| | | form: {}, |
| | | query: {}, |
| | | query: { |
| | | labelId: 103, |
| | | }, |
| | | loading: true, |
| | | |
| | | page: { |
| | |
| | | ...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 |
| New file |
| | |
| | | <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> |
| New file |
| | |
| | | <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> |
| New file |
| | |
| | | <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> |
| | |
| | | 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> |
| | |
| | | <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> |
| | |
| | | item.imageUrlsList = item.imageUrls.split(',').map(ele => { |
| | | return website.minioUrl + ele |
| | | }) |
| | | |
| | | } |
| | | if (item.rectificationImageUrls) { |
| | | item.rectificationImageUrlsList = item.rectificationImageUrls.split(',').map(ele => { |
| | |
| | | }, |
| | | |
| | | 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() |
| | | } |
| | | }, |
| | |
| | | </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"> |
| | | 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> |
| | |
| | | import { |
| | | getYHTJList |
| | | } from "@/api/publicSecurity/ninePlaceManage" |
| | | import { export_json_to_excels } from "@/util/Export2Excel" |
| | | import { timestampToTime } from "@/util/timeStamp" |
| | | import { |
| | | export_json_to_excels |
| | | } from "@/util/Export2Excel" |
| | | import { |
| | | timestampToTime |
| | | } from "@/util/timeStamp" |
| | | |
| | | export default { |
| | | data () { |
| | |
| | | columnBtn: false, |
| | | refreshBtn: false, |
| | | dialogClickModal: false, |
| | | column: [ |
| | | { |
| | | column: [{ |
| | | label: "地区", |
| | | prop: "name", |
| | | align: 'center', |
| | |
| | | { |
| | | label: "小学校(幼儿园、校外培训机构)", |
| | | align: 'center', |
| | | children: [ |
| | | { |
| | | children: [{ |
| | | label: "学校", |
| | | prop: "xxx", |
| | | align: 'center', |
| | |
| | | { |
| | | label: "小医院(诊所、养老院)", |
| | | align: 'center', |
| | | children: [ |
| | | { |
| | | children: [{ |
| | | label: "医院", |
| | | prop: "yy", |
| | | align: 'center', |
| | |
| | | align: 'center', |
| | | }, |
| | | { |
| | | width: 120, |
| | | label: "小歌舞娱乐场所", |
| | | prop: "xgwylcs", |
| | | align: 'center', |
| | | }, |
| | | { |
| | | width: 120, |
| | | label: "小美容洗浴场所", |
| | | prop: "xmrxycs", |
| | | align: 'center', |
| | | }, |
| | | { |
| | | width: 120, |
| | | label: "小生产加工企业", |
| | | prop: "xscjgqy", |
| | | align: 'center', |
| | |
| | | |
| | | // 导出 |
| | | exportBtn () { |
| | | const multiHeader = ["序号", "地区", "小商店", "小旅馆", "小学校(幼儿园、校外培训机构)", "", "", "小医院(诊所、养老院)", "", "", "小网吧", "小餐饮场所", "小歌舞娱乐场所", "小美容洗浴场所", "小生产加工企业", "总数"]//第一行表头 |
| | | const multiHeader = ["序号", "地区", "小商店", "小旅馆", "小学校(幼儿园、校外培训机构)", "", "", "小医院(诊所、养老院)", "", "", "小网吧", "小餐饮场所", |
| | | "小歌舞娱乐场所", "小美容洗浴场所", "小生产加工企业", "总数" |
| | | ] //第一行表头 |
| | | const tHeader = ["", "", "", "", "学校", "幼儿园", "校外培训机构", "医院", "诊所", "养老院", "", "", "", "", "", "",]//最后一行的表头 |
| | | const filterVal = [ |
| | | "index", |
| | |
| | | <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"> |
| | |
| | | </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> |
| | |
| | | } from "@/api/task/task" |
| | | |
| | | import auditBase from './components/auditBase' |
| | | import word from '../../components/offce/word' |
| | | import { |
| | | mapGetters |
| | | } from "vuex" |
| | |
| | | }], |
| | | }, |
| | | visible: false, |
| | | visibleWord: false, |
| | | taskType: 0, |
| | | curRow: {}, |
| | | roleBox: false, |
| | |
| | | |
| | | components: { |
| | | auditBase, |
| | | word, |
| | | campusReporting, |
| | | hotelReporting, |
| | | labelReporting, |
| | |
| | | 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) { |
| | |
| | | this.cancelAudit() |
| | | }, |
| | | |
| | | handleCloseWord() { |
| | | this.visibleWord = false |
| | | }, |
| | | |
| | | // 取消审核 |
| | | cancelAudit() { |
| | | this.visible = false |
| New file |
| | |
| | | <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> |
| | |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | return remove(this.ids) |
| | | // return remove(this.ids) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page) |
| | |
| | | this.onLoad(this.page, this.query) |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | const {} = this.query |
| | | // const {} = this.query |
| | | let values = { |
| | | ...params, |
| | | } |
| New file |
| | |
| | | <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> |
| New file |
| | |
| | | <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> |
| New file |
| | |
| | | <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> |
| New file |
| | |
| | | <!-- |
| | | * @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> |
| New file |
| | |
| | | <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> |
| New file |
| | |
| | | <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> |
| | |
| | | menuWidth: 300, |
| | | dialogClickModal: false, |
| | | column: [{ |
| | | width: 276, |
| | | label: "菜单名称", |
| | | prop: "name", |
| | | search: true, |
| | |
| | | <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"> |
| | | 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 }} |
| | |
| | | </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 :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 :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 :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> |
| | | |
| | |
| | | <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-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> |
| | |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | menuWidth: 280, |
| | | |
| | | addBtn: false, |
| | | viewBtn: false, |
| | | editBtn: false, |
| | |
| | | //stripe:true, |
| | | // excelBtn: true, |
| | | dialogClickModal: false, |
| | | column: [ |
| | | { |
| | | column: [{ |
| | | width: 100, |
| | | label: "类型", |
| | | prop: "type", |
| New file |
| | |
| | | <!-- |
| | | * @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> |
| New file |
| | |
| | | <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> |
| New file |
| | |
| | | <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> |
| New file |
| | |
| | | <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> |
| New file |
| | |
| | | <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> |
| New file |
| | |
| | | <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> |
| New file |
| | |
| | | <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> |
| | |
| | | }, |
| | | "/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", |