王克恕 пре 3 година
родитељ
комит
c53f4acbee

+ 118 - 118
imcs-ui/package.json

@@ -1,118 +1,118 @@
-{
-  "name": "zuihou-ui",
-  "version": "1.0.0",
-  "description": "zuihou-admin-cloud 前端项目",
-  "author": "zuihou",
-  "license": "Apache 2.0",
-  "scripts": {
-    "dev": "vue-cli-service serve",
-    "build:prod": "vue-cli-service build",
-    "build:boot": "vue-cli-service build --mode boot",
-    "build:docker": "vue-cli-service build --mode docker",
-    "build:stage": "vue-cli-service build --mode staging",
-    "preview": "node build/index.js --preview",
-    "lint": "eslint --ext .js,.vue src",
-    "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml",
-    "new": "plop"
-  },
-  "keywords": [
-    "vue",
-    "admin",
-    "dashboard",
-    "element-ui",
-    "management-system"
-  ],
-  "repository": {
-    "type": "git",
-    "url": "https://github.com/zuihou/zuihou-ui"
-  },
-  "bugs": {
-    "url": "https://github.com/zuihou/zuihou-ui/issues"
-  },
-  "dependencies": {
-    "@riophae/vue-treeselect": "0.0.38",
-    "axios": "^0.21.4",
-    "chromedriver": "^79.0.0",
-    "clipboard": "2.0.4",
-    "codemirror": "^5.64.0",
-    "driver.js": "0.9.5",
-    "dropzone": "5.5.1",
-    "echarts": "^5.2.2",
-    "element-ui": "2.15.6",
-    "file-saver": "2.0.1",
-    "fuse.js": "3.4.4",
-    "jsbarcode": "^3.11.3",
-    "jsonlint": "1.6.3",
-    "jszip": "^3.7.1",
-    "moment": "^2.29.1",
-    "normalize.css": "7.0.0",
-    "nprogress": "0.2.0",
-    "path-to-regexp": "2.4.0",
-    "screenfull": "4.2.0",
-    "showdown": "^1.9.1",
-    "sortablejs": "1.8.4",
-    "spark-md5": "^3.0.1",
-    "tui-editor": "1.3.3",
-    "vue": "2.6.10",
-    "vue-count-to": "^1.0.13",
-    "vue-echarts": "^6.0.0-rc.5",
-    "vue-i18n": "7.3.2",
-    "vue-lazyload": "^1.3.3",
-    "vue-print-nb": "^1.6.0",
-    "vue-progressbar": "^0.7.5",
-    "vue-router": "3.0.2",
-    "vue-seamless-scroll": "^1.1.23",
-    "vue-simple-uploader": "^0.7.4",
-    "vue-splitpane": "1.0.4",
-    "vuedraggable": "2.20.0",
-    "vuescroll": "^4.17.3",
-    "vuex": "3.1.0",
-    "xlsx": "^0.17.4"
-  },
-  "devDependencies": {
-    "@babel/core": "7.0.0",
-    "@babel/register": "7.0.0",
-    "@vue/cli-plugin-babel": "3.5.3",
-    "@vue/cli-plugin-eslint": "3.5.1",
-    "@vue/cli-plugin-unit-jest": "^3.9.0",
-    "@vue/cli-service": "3.5.3",
-    "@vue/test-utils": "1.0.0-beta.29",
-    "autoprefixer": "^9.5.1",
-    "babel-core": "7.0.0-bridge.0",
-    "babel-eslint": "10.0.1",
-    "babel-jest": "23.6.0",
-    "chalk": "2.4.2",
-    "chokidar": "2.1.5",
-    "compression-webpack-plugin": "^1.1.12",
-    "connect": "3.6.6",
-    "eslint": "5.15.3",
-    "eslint-plugin-vue": "5.2.2",
-    "html-webpack-plugin": "3.2.0",
-    "husky": "1.3.1",
-    "less": "^3.13.1",
-    "less-loader": "^5.0.0",
-    "lint-staged": "8.1.5",
-    "mockjs": "1.0.1-beta3",
-    "node-sass": "^6.0.1",
-    "plop": "2.3.0",
-    "pug": "^3.0.2",
-    "pug-plain-loader": "^1.1.0",
-    "qs": "^6.10.2",
-    "runjs": "^4.3.2",
-    "sass-loader": "^10.0.1",
-    "script-ext-html-webpack-plugin": "2.1.3",
-    "script-loader": "0.7.2",
-    "serve-static": "^1.13.2",
-    "svg-sprite-loader": "4.1.3",
-    "svgo": "1.2.0",
-    "vue-template-compiler": "2.6.10"
-  },
-  "engines": {
-    "node": ">=8.9",
-    "npm": ">= 3.0.0"
-  },
-  "browserslist": [
-    "> 1%",
-    "last 2 versions"
-  ]
-}
+{
+  "name": "zuihou-ui",
+  "version": "1.0.0",
+  "description": "zuihou-admin-cloud 前端项目",
+  "author": "zuihou",
+  "license": "Apache 2.0",
+  "scripts": {
+    "dev": "vue-cli-service serve",
+    "build:prod": "vue-cli-service build",
+    "build:boot": "vue-cli-service build --mode boot",
+    "build:docker": "vue-cli-service build --mode docker",
+    "build:stage": "vue-cli-service build --mode staging",
+    "preview": "node build/index.js --preview",
+    "lint": "eslint --ext .js,.vue src",
+    "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml",
+    "new": "plop"
+  },
+  "keywords": [
+    "vue",
+    "admin",
+    "dashboard",
+    "element-ui",
+    "management-system"
+  ],
+  "repository": {
+    "type": "git",
+    "url": "https://github.com/zuihou/zuihou-ui"
+  },
+  "bugs": {
+    "url": "https://github.com/zuihou/zuihou-ui/issues"
+  },
+  "dependencies": {
+    "@riophae/vue-treeselect": "0.0.38",
+    "axios": "^0.21.4",
+    "chromedriver": "^79.0.0",
+    "clipboard": "2.0.4",
+    "codemirror": "^5.64.0",
+    "driver.js": "0.9.5",
+    "dropzone": "5.5.1",
+    "echarts": "^5.2.2",
+    "element-ui": "2.15.6",
+    "file-saver": "2.0.1",
+    "fuse.js": "3.4.4",
+    "jsbarcode": "^3.11.3",
+    "jsonlint": "1.6.3",
+    "jszip": "^3.7.1",
+    "moment": "^2.29.1",
+    "normalize.css": "7.0.0",
+    "nprogress": "0.2.0",
+    "path-to-regexp": "2.4.0",
+    "screenfull": "4.2.0",
+    "showdown": "^1.9.1",
+    "sortablejs": "1.8.4",
+    "spark-md5": "^3.0.1",
+    "tui-editor": "1.3.3",
+    "vue": "2.6.10",
+    "vue-count-to": "^1.0.13",
+    "vue-echarts": "^6.0.0-rc.5",
+    "vue-i18n": "7.3.2",
+    "vue-lazyload": "^1.3.3",
+    "vue-print-nb": "^1.6.0",
+    "vue-progressbar": "^0.7.5",
+    "vue-router": "3.0.2",
+    "vue-seamless-scroll": "^1.1.23",
+    "vue-simple-uploader": "^0.7.4",
+    "vue-splitpane": "1.0.4",
+    "vuedraggable": "2.20.0",
+    "vuescroll": "^4.17.3",
+    "vuex": "3.1.0",
+    "xlsx": "^0.17.4"
+  },
+  "devDependencies": {
+    "@babel/core": "7.0.0",
+    "@babel/register": "7.0.0",
+    "@vue/cli-plugin-babel": "3.5.3",
+    "@vue/cli-plugin-eslint": "3.5.1",
+    "@vue/cli-plugin-unit-jest": "^3.9.0",
+    "@vue/cli-service": "3.5.3",
+    "@vue/test-utils": "1.0.0-beta.29",
+    "autoprefixer": "^9.5.1",
+    "babel-core": "7.0.0-bridge.0",
+    "babel-eslint": "10.0.1",
+    "babel-jest": "23.6.0",
+    "chalk": "2.4.2",
+    "chokidar": "2.1.5",
+    "compression-webpack-plugin": "^1.1.12",
+    "connect": "3.6.6",
+    "eslint": "5.15.3",
+    "eslint-plugin-vue": "5.2.2",
+    "html-webpack-plugin": "3.2.0",
+    "husky": "1.3.1",
+    "less": "^3.13.1",
+    "less-loader": "^5.0.0",
+    "lint-staged": "8.1.5",
+    "mockjs": "1.0.1-beta3",
+    "node-sass": "^4.14.1",
+    "sass-loader": "^7.1.0",
+    "plop": "2.3.0",
+    "pug": "^3.0.2",
+    "pug-plain-loader": "^1.1.0",
+    "qs": "^6.10.2",
+    "runjs": "^4.3.2",
+    "script-ext-html-webpack-plugin": "2.1.3",
+    "script-loader": "0.7.2",
+    "serve-static": "^1.13.2",
+    "svg-sprite-loader": "4.1.3",
+    "svgo": "1.2.0",
+    "vue-template-compiler": "2.6.10"
+  },
+  "engines": {
+    "node": ">=8.9",
+    "npm": ">= 3.0.0"
+  },
+  "browserslist": [
+    "> 1%",
+    "last 2 versions"
+  ]
+}

+ 5 - 3
imcs-ui/src/views/zuihou/prepareProductMgr/technologyVersion/components/equipmentForm/index.vue

@@ -140,7 +140,7 @@
 	        type: "warning"
 	      }).then(() => {
 	    		// 过滤我们需要的数据
-		  		let list = this.tableData.filter(item => item.id != row.id)
+		  		let list = this.tableData.filter(item => item.key != row.key)
 		  		// 重新赋值
 		  		this.tableData = list
 		  		// 把值给父组件【程序】赋值
@@ -157,14 +157,16 @@
 	    	let eqList = JSON.parse(JSON.stringify(arr))
 	    	// 新增的时候,去掉id(后台不需要,已经有resourceId就是设备的id)
 	    	eqList.forEach(item => {
-	    		item.id = null
+	    		item.id = null;
+	    		item.key = ''+Math.random();
 	    		// 添加默认值
-	    		item.prority = 10
+	    		item.prority = 10;
 	    	})
 	    	// 合并当前数组,和新增的数组
 	    	let list = [...this.tableData, ...eqList]
 	    	// 去除数组中重复的数据
 	    	this.tableData = arrReduce(list, "resourceId")
+	    	console.log("当前类别数据:", this.tableData);
 	    	// 把值给父组件【程序】赋值
 	    	this.$emit("setProgram", this.tableData)
 	    },