Merge branch 'master' of https://sinanoaq.cn:8888/r/gtqt
| | |
| | | "echarts-gl": "^2.0.9", |
| | | "echarts-wordcloud": "^2.0.0", |
| | | "element-plus": "^2.2.9", |
| | | "js-base64": "^3.7.2", |
| | | "js-cookie": "^3.0.1", |
| | | "json-bigint": "^1.0.0", |
| | | "jsplumb": "^2.15.6", |
| | |
| | | }, |
| | | "node_modules/@babel/runtime-corejs3": { |
| | | "version": "7.18.9", |
| | | "resolved": "https://registry.npmmirror.com/@babel/runtime-corejs3/-/runtime-corejs3-7.18.9.tgz", |
| | | "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.18.9.tgz", |
| | | "integrity": "sha512-qZEWeccZCrHA2Au4/X05QW5CMdm4VjUDCrGq5gf1ZDcM4hRqreKrtwAn7yci9zfgAS9apvnsFXiGBHBAxZdK9A==", |
| | | "dependencies": { |
| | | "core-js-pure": "^3.20.2", |
| | |
| | | } |
| | | }, |
| | | "node_modules/@kjgl77/datav-vue3": { |
| | | "version": "1.2.2", |
| | | "resolved": "https://registry.npmmirror.com/@kjgl77/datav-vue3/-/datav-vue3-1.2.2.tgz", |
| | | "integrity": "sha512-NJEn/n5SOOnVeMzQ7kZ6eaY6ux5SYT9uwfC81LC89s4BtwBRnq8zY7xoNIgai7JR1nW1TKEggOBWMfiLlkc/PA==", |
| | | "version": "1.2.1", |
| | | "resolved": "https://registry.npmmirror.com/@kjgl77/datav-vue3/-/datav-vue3-1.2.1.tgz", |
| | | "integrity": "sha512-hiSodPvXkp6o8nyPPgDFcrb+M4h9dZd2hmuT3WqHY+sInEHCFtypCGrhvxRFT3oGlcIlLKSX9WVb117JksFROA==", |
| | | "dependencies": { |
| | | "@jiaminghi/c-render": "^0.4.3", |
| | | "@jiaminghi/charts": "^0.2.18", |
| | |
| | | }, |
| | | "node_modules/adler-32": { |
| | | "version": "1.3.1", |
| | | "resolved": "https://registry.npmmirror.com/adler-32/-/adler-32-1.3.1.tgz", |
| | | "resolved": "https://registry.npmjs.org/adler-32/-/adler-32-1.3.1.tgz", |
| | | "integrity": "sha512-ynZ4w/nUUv5rrsR8UUGoe1VC9hZj6V5hU9Qw1HlMDJGEJw5S7TfTErWTjMys6M7vr0YWcPqs3qAr4ss0nDfP+A==", |
| | | "engines": { |
| | | "node": ">=0.8" |
| | |
| | | }, |
| | | "node_modules/cfb": { |
| | | "version": "1.2.2", |
| | | "resolved": "https://registry.npmmirror.com/cfb/-/cfb-1.2.2.tgz", |
| | | "resolved": "https://registry.npmjs.org/cfb/-/cfb-1.2.2.tgz", |
| | | "integrity": "sha512-KfdUZsSOw19/ObEWasvBP/Ac4reZvAGauZhs6S/gqNhXhI7cKwvlH7ulj+dOEYnca4bm4SGo8C1bTAQvnTjgQA==", |
| | | "dependencies": { |
| | | "adler-32": "~1.3.0", |
| | |
| | | }, |
| | | "node_modules/codepage": { |
| | | "version": "1.15.0", |
| | | "resolved": "https://registry.npmmirror.com/codepage/-/codepage-1.15.0.tgz", |
| | | "resolved": "https://registry.npmjs.org/codepage/-/codepage-1.15.0.tgz", |
| | | "integrity": "sha512-3g6NUTPd/YtuuGrhMnOMRjFc+LJw/bnMp3+0r/Wcz3IXUuCosKRJvMphm5+Q+bvTVGcJJuRvVLuYba+WojaFaA==", |
| | | "engines": { |
| | | "node": ">=0.8" |
| | |
| | | }, |
| | | "node_modules/core-js-pure": { |
| | | "version": "3.25.0", |
| | | "resolved": "https://registry.npmmirror.com/core-js-pure/-/core-js-pure-3.25.0.tgz", |
| | | "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.25.0.tgz", |
| | | "integrity": "sha512-IeHpLwk3uoci37yoI2Laty59+YqH9x5uR65/yiA0ARAJrTrN4YU0rmauLWfvqOuk77SlNJXj2rM6oT/dBD87+A==", |
| | | "hasInstallScript": true |
| | | "hasInstallScript": true, |
| | | "funding": { |
| | | "type": "opencollective", |
| | | "url": "https://opencollective.com/core-js" |
| | | } |
| | | }, |
| | | "node_modules/countup.js": { |
| | | "version": "2.2.0", |
| | |
| | | }, |
| | | "node_modules/crc-32": { |
| | | "version": "1.2.2", |
| | | "resolved": "https://registry.npmmirror.com/crc-32/-/crc-32-1.2.2.tgz", |
| | | "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz", |
| | | "integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==", |
| | | "bin": { |
| | | "crc32": "bin/crc32.njs" |
| | |
| | | }, |
| | | "node_modules/echarts": { |
| | | "version": "5.3.3", |
| | | "resolved": "https://registry.npmmirror.com/echarts/-/echarts-5.3.3.tgz", |
| | | "resolved": "https://registry.npmjs.org/echarts/-/echarts-5.3.3.tgz", |
| | | "integrity": "sha512-BRw2serInRwO5SIwRviZ6Xgm5Lb7irgz+sLiFMmy/HOaf4SQ+7oYqxKzRHAKp4xHQ05AuHw1xvoQWJjDQq/FGw==", |
| | | "dependencies": { |
| | | "tslib": "2.3.0", |
| | |
| | | }, |
| | | "node_modules/frac": { |
| | | "version": "1.1.2", |
| | | "resolved": "https://registry.npmmirror.com/frac/-/frac-1.1.2.tgz", |
| | | "resolved": "https://registry.npmjs.org/frac/-/frac-1.1.2.tgz", |
| | | "integrity": "sha512-w/XBfkibaTl3YDqASwfDUqkna4Z2p9cFSr1aHDt0WoMTECnRfBOv2WArlZILlqgWlmdIlALXGpM2AOhEk5W3IA==", |
| | | "engines": { |
| | | "node": ">=0.8" |
| | |
| | | "funding": { |
| | | "url": "https://github.com/chalk/supports-color?sponsor=1" |
| | | } |
| | | }, |
| | | "node_modules/js-base64": { |
| | | "version": "3.7.2", |
| | | "resolved": "https://registry.npmmirror.com/js-base64/-/js-base64-3.7.2.tgz", |
| | | "integrity": "sha512-NnRs6dsyqUXejqk/yv2aiXlAvOs56sLkX6nUdeaNezI5LFFLlsZjOThmwnrcwh5ZZRwZlCMnVAY3CvhIhoVEKQ==" |
| | | }, |
| | | "node_modules/js-cookie": { |
| | | "version": "3.0.1", |
| | |
| | | }, |
| | | "node_modules/pinia-plugin-persistedstate": { |
| | | "version": "2.1.1", |
| | | "resolved": "https://registry.npmmirror.com/pinia-plugin-persistedstate/-/pinia-plugin-persistedstate-2.1.1.tgz", |
| | | "resolved": "https://registry.npmjs.org/pinia-plugin-persistedstate/-/pinia-plugin-persistedstate-2.1.1.tgz", |
| | | "integrity": "sha512-HUgsU5IRtM75eAQiIqzT3p1oPEuYH1/B2ipTMU++yE+FV0LkHaBswdKXs0RMWYCmugO8s62oxLTh/N1dLNp+5A==", |
| | | "peerDependencies": { |
| | | "pinia": "^2.0.0" |
| | |
| | | }, |
| | | "node_modules/ssf": { |
| | | "version": "0.11.2", |
| | | "resolved": "https://registry.npmmirror.com/ssf/-/ssf-0.11.2.tgz", |
| | | "resolved": "https://registry.npmjs.org/ssf/-/ssf-0.11.2.tgz", |
| | | "integrity": "sha512-+idbmIXoYET47hH+d7dfm2epdOMUDjqcB4648sTZ+t2JwoyBFL/insLfB/racrDmsKB3diwsDA696pZMieAC5g==", |
| | | "dependencies": { |
| | | "frac": "~1.1.2" |
| | |
| | | }, |
| | | "node_modules/wangeditor": { |
| | | "version": "4.7.15", |
| | | "resolved": "https://registry.npmmirror.com/wangeditor/-/wangeditor-4.7.15.tgz", |
| | | "resolved": "https://registry.npmjs.org/wangeditor/-/wangeditor-4.7.15.tgz", |
| | | "integrity": "sha512-aPTdREd8BxXVyJ5MI+LU83FQ7u1EPd341iXIorRNYSOvoimNoZ4nPg+yn3FGbB93/owEa6buLw8wdhYnMCJQLg==", |
| | | "dependencies": { |
| | | "@babel/runtime": "^7.11.2", |
| | |
| | | }, |
| | | "node_modules/wmf": { |
| | | "version": "1.0.2", |
| | | "resolved": "https://registry.npmmirror.com/wmf/-/wmf-1.0.2.tgz", |
| | | "resolved": "https://registry.npmjs.org/wmf/-/wmf-1.0.2.tgz", |
| | | "integrity": "sha512-/p9K7bEh0Dj6WbXg4JG0xvLQmIadrner1bi45VMJTfnbVHsc7yIajZyoSoK60/dtVBs12Fm6WkUI5/3WAVsNMw==", |
| | | "engines": { |
| | | "node": ">=0.8" |
| | |
| | | }, |
| | | "node_modules/word": { |
| | | "version": "0.3.0", |
| | | "resolved": "https://registry.npmmirror.com/word/-/word-0.3.0.tgz", |
| | | "resolved": "https://registry.npmjs.org/word/-/word-0.3.0.tgz", |
| | | "integrity": "sha512-OELeY0Q61OXpdUfTp+oweA/vtLVg5VDOXh+3he3PNzLGG/y0oylSOC1xRVj0+l4vQ3tj/bB1HVHv1ocXkQceFA==", |
| | | "engines": { |
| | | "node": ">=0.8" |
| | |
| | | }, |
| | | "node_modules/xlsx": { |
| | | "version": "0.18.5", |
| | | "resolved": "https://registry.npmmirror.com/xlsx/-/xlsx-0.18.5.tgz", |
| | | "resolved": "https://registry.npmjs.org/xlsx/-/xlsx-0.18.5.tgz", |
| | | "integrity": "sha512-dmg3LCjBPHZnQp5/F/+nnTa+miPJxUXB6vtk42YjBBKayDNagxGEeIdWApkYPOf3Z3pm3k62Knjzp7lMeTEtFQ==", |
| | | "dependencies": { |
| | | "adler-32": "~1.3.0", |
| | |
| | | }, |
| | | "@babel/runtime-corejs3": { |
| | | "version": "7.18.9", |
| | | "resolved": "https://registry.npmmirror.com/@babel/runtime-corejs3/-/runtime-corejs3-7.18.9.tgz", |
| | | "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.18.9.tgz", |
| | | "integrity": "sha512-qZEWeccZCrHA2Au4/X05QW5CMdm4VjUDCrGq5gf1ZDcM4hRqreKrtwAn7yci9zfgAS9apvnsFXiGBHBAxZdK9A==", |
| | | "requires": { |
| | | "core-js-pure": "^3.20.2", |
| | |
| | | } |
| | | }, |
| | | "@kjgl77/datav-vue3": { |
| | | "version": "1.2.2", |
| | | "resolved": "https://registry.npmmirror.com/@kjgl77/datav-vue3/-/datav-vue3-1.2.2.tgz", |
| | | "integrity": "sha512-NJEn/n5SOOnVeMzQ7kZ6eaY6ux5SYT9uwfC81LC89s4BtwBRnq8zY7xoNIgai7JR1nW1TKEggOBWMfiLlkc/PA==", |
| | | "version": "1.2.1", |
| | | "resolved": "https://registry.npmmirror.com/@kjgl77/datav-vue3/-/datav-vue3-1.2.1.tgz", |
| | | "integrity": "sha512-hiSodPvXkp6o8nyPPgDFcrb+M4h9dZd2hmuT3WqHY+sInEHCFtypCGrhvxRFT3oGlcIlLKSX9WVb117JksFROA==", |
| | | "requires": { |
| | | "@jiaminghi/c-render": "^0.4.3", |
| | | "@jiaminghi/charts": "^0.2.18", |
| | |
| | | }, |
| | | "adler-32": { |
| | | "version": "1.3.1", |
| | | "resolved": "https://registry.npmmirror.com/adler-32/-/adler-32-1.3.1.tgz", |
| | | "resolved": "https://registry.npmjs.org/adler-32/-/adler-32-1.3.1.tgz", |
| | | "integrity": "sha512-ynZ4w/nUUv5rrsR8UUGoe1VC9hZj6V5hU9Qw1HlMDJGEJw5S7TfTErWTjMys6M7vr0YWcPqs3qAr4ss0nDfP+A==" |
| | | }, |
| | | "ajv": { |
| | |
| | | }, |
| | | "cfb": { |
| | | "version": "1.2.2", |
| | | "resolved": "https://registry.npmmirror.com/cfb/-/cfb-1.2.2.tgz", |
| | | "resolved": "https://registry.npmjs.org/cfb/-/cfb-1.2.2.tgz", |
| | | "integrity": "sha512-KfdUZsSOw19/ObEWasvBP/Ac4reZvAGauZhs6S/gqNhXhI7cKwvlH7ulj+dOEYnca4bm4SGo8C1bTAQvnTjgQA==", |
| | | "requires": { |
| | | "adler-32": "~1.3.0", |
| | |
| | | }, |
| | | "codepage": { |
| | | "version": "1.15.0", |
| | | "resolved": "https://registry.npmmirror.com/codepage/-/codepage-1.15.0.tgz", |
| | | "resolved": "https://registry.npmjs.org/codepage/-/codepage-1.15.0.tgz", |
| | | "integrity": "sha512-3g6NUTPd/YtuuGrhMnOMRjFc+LJw/bnMp3+0r/Wcz3IXUuCosKRJvMphm5+Q+bvTVGcJJuRvVLuYba+WojaFaA==" |
| | | }, |
| | | "color-convert": { |
| | |
| | | }, |
| | | "core-js-pure": { |
| | | "version": "3.25.0", |
| | | "resolved": "https://registry.npmmirror.com/core-js-pure/-/core-js-pure-3.25.0.tgz", |
| | | "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.25.0.tgz", |
| | | "integrity": "sha512-IeHpLwk3uoci37yoI2Laty59+YqH9x5uR65/yiA0ARAJrTrN4YU0rmauLWfvqOuk77SlNJXj2rM6oT/dBD87+A==" |
| | | }, |
| | | "countup.js": { |
| | |
| | | }, |
| | | "crc-32": { |
| | | "version": "1.2.2", |
| | | "resolved": "https://registry.npmmirror.com/crc-32/-/crc-32-1.2.2.tgz", |
| | | "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz", |
| | | "integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==" |
| | | }, |
| | | "cropperjs": { |
| | |
| | | }, |
| | | "echarts": { |
| | | "version": "5.3.3", |
| | | "resolved": "https://registry.npmmirror.com/echarts/-/echarts-5.3.3.tgz", |
| | | "resolved": "https://registry.npmjs.org/echarts/-/echarts-5.3.3.tgz", |
| | | "integrity": "sha512-BRw2serInRwO5SIwRviZ6Xgm5Lb7irgz+sLiFMmy/HOaf4SQ+7oYqxKzRHAKp4xHQ05AuHw1xvoQWJjDQq/FGw==", |
| | | "requires": { |
| | | "tslib": "2.3.0", |
| | |
| | | }, |
| | | "frac": { |
| | | "version": "1.1.2", |
| | | "resolved": "https://registry.npmmirror.com/frac/-/frac-1.1.2.tgz", |
| | | "resolved": "https://registry.npmjs.org/frac/-/frac-1.1.2.tgz", |
| | | "integrity": "sha512-w/XBfkibaTl3YDqASwfDUqkna4Z2p9cFSr1aHDt0WoMTECnRfBOv2WArlZILlqgWlmdIlALXGpM2AOhEk5W3IA==" |
| | | }, |
| | | "fs.realpath": { |
| | |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | "js-base64": { |
| | | "version": "3.7.2", |
| | | "resolved": "https://registry.npmmirror.com/js-base64/-/js-base64-3.7.2.tgz", |
| | | "integrity": "sha512-NnRs6dsyqUXejqk/yv2aiXlAvOs56sLkX6nUdeaNezI5LFFLlsZjOThmwnrcwh5ZZRwZlCMnVAY3CvhIhoVEKQ==" |
| | | }, |
| | | "js-cookie": { |
| | | "version": "3.0.1", |
| | |
| | | }, |
| | | "pinia-plugin-persistedstate": { |
| | | "version": "2.1.1", |
| | | "resolved": "https://registry.npmmirror.com/pinia-plugin-persistedstate/-/pinia-plugin-persistedstate-2.1.1.tgz", |
| | | "resolved": "https://registry.npmjs.org/pinia-plugin-persistedstate/-/pinia-plugin-persistedstate-2.1.1.tgz", |
| | | "integrity": "sha512-HUgsU5IRtM75eAQiIqzT3p1oPEuYH1/B2ipTMU++yE+FV0LkHaBswdKXs0RMWYCmugO8s62oxLTh/N1dLNp+5A==", |
| | | "requires": {} |
| | | }, |
| | |
| | | }, |
| | | "ssf": { |
| | | "version": "0.11.2", |
| | | "resolved": "https://registry.npmmirror.com/ssf/-/ssf-0.11.2.tgz", |
| | | "resolved": "https://registry.npmjs.org/ssf/-/ssf-0.11.2.tgz", |
| | | "integrity": "sha512-+idbmIXoYET47hH+d7dfm2epdOMUDjqcB4648sTZ+t2JwoyBFL/insLfB/racrDmsKB3diwsDA696pZMieAC5g==", |
| | | "requires": { |
| | | "frac": "~1.1.2" |
| | |
| | | }, |
| | | "wangeditor": { |
| | | "version": "4.7.15", |
| | | "resolved": "https://registry.npmmirror.com/wangeditor/-/wangeditor-4.7.15.tgz", |
| | | "resolved": "https://registry.npmjs.org/wangeditor/-/wangeditor-4.7.15.tgz", |
| | | "integrity": "sha512-aPTdREd8BxXVyJ5MI+LU83FQ7u1EPd341iXIorRNYSOvoimNoZ4nPg+yn3FGbB93/owEa6buLw8wdhYnMCJQLg==", |
| | | "requires": { |
| | | "@babel/runtime": "^7.11.2", |
| | |
| | | }, |
| | | "wmf": { |
| | | "version": "1.0.2", |
| | | "resolved": "https://registry.npmmirror.com/wmf/-/wmf-1.0.2.tgz", |
| | | "resolved": "https://registry.npmjs.org/wmf/-/wmf-1.0.2.tgz", |
| | | "integrity": "sha512-/p9K7bEh0Dj6WbXg4JG0xvLQmIadrner1bi45VMJTfnbVHsc7yIajZyoSoK60/dtVBs12Fm6WkUI5/3WAVsNMw==" |
| | | }, |
| | | "word": { |
| | | "version": "0.3.0", |
| | | "resolved": "https://registry.npmmirror.com/word/-/word-0.3.0.tgz", |
| | | "resolved": "https://registry.npmjs.org/word/-/word-0.3.0.tgz", |
| | | "integrity": "sha512-OELeY0Q61OXpdUfTp+oweA/vtLVg5VDOXh+3he3PNzLGG/y0oylSOC1xRVj0+l4vQ3tj/bB1HVHv1ocXkQceFA==" |
| | | }, |
| | | "word-wrap": { |
| | |
| | | }, |
| | | "xlsx": { |
| | | "version": "0.18.5", |
| | | "resolved": "https://registry.npmmirror.com/xlsx/-/xlsx-0.18.5.tgz", |
| | | "resolved": "https://registry.npmjs.org/xlsx/-/xlsx-0.18.5.tgz", |
| | | "integrity": "sha512-dmg3LCjBPHZnQp5/F/+nnTa+miPJxUXB6vtk42YjBBKayDNagxGEeIdWApkYPOf3Z3pm3k62Knjzp7lMeTEtFQ==", |
| | | "requires": { |
| | | "adler-32": "~1.3.0", |
| | |
| | | <div class="main-card"> |
| | | <el-row class="cardTop"> |
| | | <el-col :span="12" class="mainCardBtn"> |
| | | <el-button type="primary" :icon="Plus" size="default" @click="dialogAddRecord = true">新增</el-button> |
| | | <el-button type="primary" :icon="Plus" size="default" @click="addRecordBtn">新增</el-button> |
| | | <!-- <el-button type="warning" :icon="Edit" size="default" plain>修改</el-button>--> |
| | | <!-- <el-button type="danger" :icon="Delete" size="default" plain @click="deleteBatchBtn">删除</el-button>--> |
| | | </el-col> |
| | |
| | | <div>必选</div> |
| | | <div> |
| | | <div v-if="mustList.length>0" v-for="(i,index) in mustList" :key="index"> |
| | | {{i.materialName}}:默认值:{{i.defaultVal}},{{i.consumables?'耗材':'费耗材'}} |
| | | {{i.materialName}}:默认值:{{i.defaultVal}},{{i.consumables?'耗材':'非耗材'}} |
| | | </div> |
| | | <div v-else> |
| | | 无 |
| | |
| | | <div>可选</div> |
| | | <div> |
| | | <div v-if="chooseList.length>0" v-for="(i,index) in chooseList" :key="index"> |
| | | {{i.materialName}}:默认值:{{i.defaultVal}},{{i.consumables?'耗材':'费耗材'}} |
| | | {{i.materialName}}:默认值:{{i.defaultVal}},{{i.consumables?'耗材':'非耗材'}} |
| | | </div> |
| | | <div v-else> |
| | | 无 |
| | |
| | | </div> |
| | | </div> |
| | | </el-form-item> |
| | | <el-form-item label="描述"> |
| | | <el-input v-model="details.info" type="textarea" autosize readonly /> |
| | | </el-form-item> |
| | | <el-form-item label="创建人"> |
| | | <el-input v-model="details.createUname" readonly /> |
| | | </el-form-item> |
| | |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-dialog> |
| | | <el-dialog v-model="dialogAddRecord" title="作业物资标准编辑" @close="closeAdd" @open="openAdd"> |
| | | <el-dialog v-model="dialogAddRecord" title="作业物资标准编辑" @close="closeAdd" @open="openAdd" center> |
| | | <el-form :model="addRecord" label-width="150px" ref="addRef" :rules="addRules"> |
| | | <el-form-item label="作业物资标准名称" prop="name"> |
| | | <el-input v-model="addRecord.name"> </el-input> |
| | |
| | | <el-form-item label="物资标准配置"> |
| | | <el-tabs tab-position="left" class="demo-tabs" type="border-card"> |
| | | <el-tab-pane v-for="(item,index) in allList" :label="item.materialTypeName" :key="index"> |
| | | <div v-for="(i,x) in item.list" :key="x"> |
| | | <el-checkbox :label="i.name" v-model="checkData[index].list[x].checked"> |
| | | <div>{{i.name}}</div> |
| | | <div><span>默认值:</span><el-input size="small" v-model="checkData[index].list[x].defaultVal"/></div> |
| | | <div> |
| | | <span>配置级别:</span> |
| | | <el-select size="small" v-model="checkData[index].list[x].configurationLevel"> |
| | | <div class="tab-i" v-for="(i,x) in item.list" :key="x"> |
| | | <el-checkbox :label="i.materialName" v-model="checkData[index].list[x].checked"> |
| | | </el-checkbox> |
| | | <el-form v-if="checkData[index].list[x].checked" :model="checkData[index].list[x]" label-width="100px" ref="addListRef" :rules="addListRules"> |
| | | <el-form-item label="默认值" prop="defaultVal"><el-input v-model="checkData[index].list[x].defaultVal"/></el-form-item> |
| | | <el-form-item label="配置级别" prop="configurationLevel"> |
| | | <el-select v-model="checkData[index].list[x].configurationLevel"> |
| | | <el-option key="0" label="必选" value="0"/> |
| | | <el-option key="1" label="可选" value="1"/> |
| | | <el-option key="2" label="高配" value="2"/> |
| | | </el-select> |
| | | </div> |
| | | <div> |
| | | <span>是否耗材:</span> |
| | | <el-radio-group v-model="checkData[index].list[x].consumables" class="ml-4"> |
| | | <el-radio label="1">是</el-radio> |
| | | <el-radio label="2">否</el-radio> |
| | | </el-form-item> |
| | | <el-form-item label="是否耗材" prop="consumables"> |
| | | <el-radio-group v-model="checkData[index].list[x].consumables"> |
| | | <el-radio :label=true>是</el-radio> |
| | | <el-radio :label=false>否</el-radio> |
| | | </el-radio-group> |
| | | </div> |
| | | </el-checkbox> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | </el-form-item> |
| | | <el-form-item label="描述" prop="describe"> |
| | | <el-input v-model="addRecord.describe" type="textarea" autosize :rows="2"/> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="warning" @click="dialogAddRecord = false" size="default" plain>取消</el-button> |
| | | <el-button type="primary" @click="confirmAddRecord(addRef)" size="default">确认</el-button> |
| | | <el-form-item label="描述" prop="info"> |
| | | <el-input v-model="addRecord.info" type="textarea" autosize :rows="2"/> |
| | | </el-form-item> |
| | | </el-form> |
| | | <template #footer> |
| | | <span class="dialog-footer"> |
| | | <el-button type="warning" @click="dialogAddRecord = false" size="default" plain>取消</el-button> |
| | | <el-button type="primary" @click="confirmAddRecord(addRef)" size="default">确认</el-button> |
| | | </span> |
| | | </template> |
| | | </el-dialog> |
| | | <el-dialog v-model="deleteDialog" title="提示" width="30%" center @close="indexClear"> |
| | | <span>您确定要删除该条记录吗?</span> |
| | |
| | | import type { FormInstance, FormRules } from 'element-plus' |
| | | import { teamManageApi } from '/@/api/systemManage/basicDateManage/personShiftManage/teamManage'; |
| | | import { materialApi } from '/@/api/specialWorkSystem/material'; |
| | | import {a} from "pinia-plugin-persistedstate/dist/types-374a3a36"; |
| | | |
| | | // 定义接口来定义对象的类型 |
| | | interface stateType { |
| | |
| | | // }; |
| | | |
| | | const addRef = ref<FormInstance>(); |
| | | const addListRef = ref<FormInstance>(); |
| | | const addRules = reactive<FormRules>({ |
| | | name: [{ required: true, message: '该内容不能为空', trigger: 'blur' }], |
| | | workType: [{ required: true, message: '该内容不能为空', trigger: 'blur' }], |
| | | workLevel: [{ required: true, message: '该内容不能为空', trigger: 'blur' }] |
| | | }); |
| | | const addListRules = reactive<FormRules>({ |
| | | defaultVal: [{ required: true, message: '该内容不能为空', trigger: 'blur' }], |
| | | configurationLevel: [{ required: true, message: '该内容不能为空', trigger: 'blur' }], |
| | | consumables: [{ required: true, message: '该内容不能为空', trigger: 'blur' }] |
| | | }); |
| | | |
| | | // 页面载入时执行方法 |
| | | onMounted(() => { |
| | | getListByPage(); |
| | | getList(); |
| | | getListByPage() |
| | | }); |
| | | |
| | | const toType = (row, column, cellValue, index) => { |
| | |
| | | }; |
| | | |
| | | const toLevel = (row, column, cellValue, index) => { |
| | | if(row.workLevel <= 3){ |
| | | return state.fireLevel.find((item) => item.value === row.workLevel)?.label; |
| | | }else if(row.workLevel>3 && row.workLevel<=7){ |
| | | return state.heightLevel.find((item) => item.value === row.workLevel)?.label; |
| | | }else if(row.workLevel>8 && row.workLevel<=10){ |
| | | return state.hoistLevel.find((item) => item.value === row.workLevel)?.label; |
| | | if(row.workLevel == null){ |
| | | return '无' |
| | | }else{ |
| | | return state.plateLevel.find((item) => item.value === row.workLevel)?.label; |
| | | if(row.workLevel <= 3){ |
| | | return state.fireLevel.find((item) => item.value === row.workLevel)?.label; |
| | | }else if(row.workLevel>3 && row.workLevel<=7){ |
| | | return state.heightLevel.find((item) => item.value === row.workLevel)?.label; |
| | | }else if(row.workLevel>8 && row.workLevel<=10){ |
| | | return state.hoistLevel.find((item) => item.value === row.workLevel)?.label; |
| | | }else{ |
| | | return state.plateLevel.find((item) => item.value === row.workLevel)?.label; |
| | | } |
| | | } |
| | | }; |
| | | |
| | |
| | | let res = await materialApi().getRecordList(); |
| | | if (res.data.code === '200') { |
| | | state.allList = JSON.parse(JSON.stringify(res.data.data)) |
| | | // const test = [{id:1,name:'1',children:[{one:1,two:'1'},]},{id:2,name:'2',children:[{one:2,two:'2'},]}] |
| | | // test.map(item => { |
| | | // item.children.map(i =>{ |
| | | // debugger |
| | | // return { |
| | | // three:true |
| | | // } |
| | | // const obj = i |
| | | // console.log(obj); |
| | | // }) |
| | | // return item |
| | | // }) |
| | | // console.log(test); |
| | | for(let i in state.allList){ |
| | | state.allList[i].list = state.allList[i].list?.map((item:any) => { |
| | | const obj = { |
| | | checked: false, |
| | | materialName: item.name, |
| | | consumables: false, |
| | | consumables: null, |
| | | defaultVal: null, |
| | | configurationLevel: null, |
| | | materialType: item.materialType, |
| | |
| | | }) |
| | | } |
| | | state.checkData = JSON.parse(JSON.stringify(state.allList)) |
| | | // state.checkData = state.allList.map((item)=>{ |
| | | // if(item.list && item.list != null){ |
| | | // console.log('1111111111111') |
| | | // item.list.map((i)=>{ |
| | | // i.checked = false |
| | | // i.defaultVal = null |
| | | // i.configurationLevel = null |
| | | // i.consumables = false |
| | | // debugger |
| | | // const obj = { |
| | | // checked: i.checked, |
| | | // materialName: i.name, |
| | | // consumables: i.consumables, |
| | | // defaultVal: i.defaultVal, |
| | | // configurationLevel: i.configurationLevel, |
| | | // materialType: i.materialType, |
| | | // materialTypeName: i.materialTypeName, |
| | | // emergencyMaterialId: i.id |
| | | // } |
| | | // return {...obj} |
| | | // }) |
| | | // } |
| | | // return item |
| | | // }) |
| | | } else { |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: res.data.msg |
| | | }); |
| | | } |
| | | console.log(state.checkData,'state.checkData') |
| | | } |
| | | |
| | | // 分页获取物资标准列表 |
| | |
| | | getListByPage(); |
| | | }; |
| | | |
| | | const addRecordBtn = () =>{ |
| | | getList() |
| | | state.dialogAddRecord = true |
| | | } |
| | | |
| | | // 添加方法 |
| | | const addRecord = async (data: any) => { |
| | | let res = await materialApi().addRecord(data); |
| | |
| | | |
| | | // 修改方法 |
| | | const editRecordBtn = async (index, row) => { |
| | | getList() |
| | | state.addRecord = JSON.parse(JSON.stringify(row)); |
| | | console.log(state.addRecord,'state.addRecord') |
| | | state.dialogAddRecord = true; |
| | | state.chosenIndex = index; |
| | | }; |
| | | |
| | | const editRecord = async (data: any) => { |
| | | let res = await teamManageApi().updateRecord(data); |
| | | let res = await materialApi().updateRecord(data); |
| | | if (res.data.code === '200') { |
| | | ElMessage({ |
| | | type: 'success', |
| | |
| | | if (!formEl) return; |
| | | await formEl.validate(async (valid, fields) => { |
| | | if (valid) { |
| | | state.addRecord.materialDetailList = [] |
| | | for(let i in state.checkData){ |
| | | if(state.checkData[i].list && state.checkData[i].list.length>0){ |
| | | for(let j=0;j<state.checkData[i].list.length;j++){ |
| | | if(state.checkData[i].list[j].checked){ |
| | | // delete state.checkData[i].list[j].checked |
| | | // state.checkData[i].list[j].checked |
| | | let { checked,...checkObj } = state.checkData[i].list[j] |
| | | state.addRecord.materialDetailList.push(checkObj) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | const data = { |
| | | name: state.addRecord.name, |
| | | workType: state.addRecord.workType, |
| | | workLevel: state.addRecord.workLevel, |
| | | describe: state.addRecord.describe, |
| | | materialDetailList: [] |
| | | info: state.addRecord.info, |
| | | materialDetailList: state.addRecord.materialDetailList |
| | | }; |
| | | // for(let i=0;i<state.checkData.length;i++){ |
| | | // if(state.checkData[i].list !=null && state.checkData[i].list.length>0){ |
| | | // for(let j=0;j<state.checkData[i].list.length;j++){ |
| | | // if(state.checkData[i].list[j].checked){ |
| | | // let {materialName,consumables,defaultVal,configurationLevel,materialType,materialTypeName,id} = state.checkData[i].list[j] |
| | | // const newObj = {materialName,consumables,defaultVal,configurationLevel,materialType,materialTypeName,id} |
| | | // data.materialDetailList.push({ materialName, consumables, defaultVal, configurationLevel, materialType, materialTypeName, id}) |
| | | // } |
| | | // } |
| | | // } |
| | | // } |
| | | console.log(data,'data>>>>>>>>>') |
| | | // if (state.chosenIndex == null) { |
| | | // await addRecord(data); |
| | | // } else { |
| | | // data.groupId = JSON.stringify(state.addRecord.groupId); |
| | | // await editRecord(data); |
| | | // } |
| | | state.dialogAddRecord = false; |
| | | console.log(data.materialDetailList,'data.materialDetailList') |
| | | if(data.materialDetailList.length==0 || data.materialDetailList.some((e) => e.defaultVal == null) || data.materialDetailList.some((e) => e.configurationLevel == null) || data.materialDetailList.some((e) => e.consumables == null)){ |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: '请完善物资配置必填数据' |
| | | }); |
| | | }else{ |
| | | if (state.chosenIndex == null) { |
| | | await addRecord(data); |
| | | } else { |
| | | data.id = state.addRecord.id; |
| | | await editRecord(data); |
| | | } |
| | | state.dialogAddRecord = false; |
| | | } |
| | | } else { |
| | | console.log('error submit!', fields); |
| | | } |
| | |
| | | |
| | | } |
| | | } |
| | | console.log(state.mustList,state.chooseList,state.highList,'666666666') |
| | | state.dialogDetails = true; |
| | | }; |
| | | |
| | |
| | | }; |
| | | return { |
| | | addRef, |
| | | addListRef, |
| | | addRules, |
| | | addListRules, |
| | | View, |
| | | Edit, |
| | | Delete, |
| | | Refresh, |
| | | Plus, |
| | | addRecordBtn, |
| | | toType, |
| | | toLevel, |
| | | searchRecord, |
| | |
| | | width: 100% !important; |
| | | } |
| | | |
| | | .el-checkbox{ |
| | | width: 100%; |
| | | .tab-i{ |
| | | margin-bottom: 20px; |
| | | display: flex; |
| | | align-items: flex-start; |
| | | height: auto; |
| | | ::v-deep(.el-checkbox__label){ |
| | | |
| | | .el-form-item{ |
| | | margin-bottom: 20px; |
| | | &>div{ |
| | | width: 100%; |
| | | margin-bottom: 10px; |
| | | &>span{ |
| | | display: inline-block; |
| | | width: 30%; |
| | | } |
| | | .el-input { |
| | | width: 100% !important; |
| | | } |
| | | .el-select { |
| | | width: 100% !important; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |