{"remainingRequest":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Device\\deviceManage\\components\\AssociatedEquipmentDialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Device\\deviceManage\\components\\AssociatedEquipmentDialog.vue","mtime":1687946823184},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/web.dom.iterable\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nimport GroupingManage from '@/api/device/GroupingManage.js';\nexport default {\n name: 'AssociatedEquipmentDialog',\n props: {\n StshowFormDias: {\n type: Boolean,\n default: false\n },\n pId: {\n type: String,\n default: ''\n }\n },\n components: {},\n data: function data() {\n return {\n search: '',\n search1: '',\n loading: false,\n multipleSelection: [],\n // 复选框\n multipleSelection1: [],\n leftDisabled: true,\n rightDisabled: true,\n EquipmentList: [],\n reEquipmentList: [],\n EquipmentParams: {\n address: '',\n addvcd: '',\n areaId: '',\n code: '',\n contractList: [{\n contractId: '',\n deviceId: '',\n id: ''\n }],\n fullName: '',\n id: '',\n ip: '',\n lastTime: '',\n lgtd: '',\n lttd: '',\n memo: '',\n name: '',\n outCode: '',\n productId: '',\n status: '',\n supplierCompanyId: ''\n },\n EquipmentParams2: {\n deviceIds: [],\n deviceList: [{\n address: '',\n addvcd: '',\n areaId: '',\n code: '',\n contractList: [{\n contractId: '',\n deviceId: '',\n id: ''\n }],\n fullName: '',\n id: '',\n ip: '',\n lastTime: '',\n lgtd: '',\n lttd: '',\n memo: '',\n name: '',\n outCode: '',\n productId: '',\n status: '',\n supplierCompanyId: ''\n }],\n groupId: ''\n },\n relationList: {\n deviceIds: [],\n groupId: ''\n }\n };\n },\n created: function created() {\n this.relationList.groupId = this.pId;\n this.EquipmentParams2.groupId = this.pId;\n this.getEquipmentData();\n },\n methods: {\n // 获取已关联设备数据\n // reEquipmentData() {\n // GroupingManage.relatedEquipment(this.EquipmentParams2, res => {\n // this.reEquipmentList = res.value.deviceList\n // if (this.reEquipmentList.length > 0) {\n // this.$nextTick(() => {\n // this.$refs.multipleTable.toggleAllSelection()\n // })\n // }\n // })\n // },\n // 获取设备列表\n getEquipmentData: function getEquipmentData() {\n var _this = this;\n\n GroupingManage.relatedEquipment(this.EquipmentParams2, function (res) {\n _this.reEquipmentList = res.value.deviceList;\n GroupingManage.findEquipmentList(_this.EquipmentParams, function (res) {\n _this.EquipmentList = res.value;\n\n if (res.state) {\n if (_this.reEquipmentList.length > 0) {\n _this.$nextTick(function () {\n _this.$refs.multipleTable.toggleAllSelection();\n });\n }\n\n _this.EquipmentList = _this.EquipmentList.filter(function (item) {\n return !_this.reEquipmentList.some(function (value) {\n return value.id == item.id;\n });\n });\n }\n });\n });\n },\n // 未关联设备\n handleSelectionChange: function handleSelectionChange(val) {\n this.multipleSelection = val;\n },\n // 已关联设备\n handleSelectionChange1: function handleSelectionChange1(val) {\n this.multipleSelection1 = val;\n },\n // 赋值\n rightChang: function rightChang() {\n var _this2 = this;\n\n this.reEquipmentList = this.reEquipmentList.concat(this.multipleSelection);\n this.EquipmentList = this.EquipmentList.filter(function (item) {\n return !_this2.reEquipmentList.some(function (citem) {\n return citem.id == item.id;\n });\n });\n },\n leftChang: function leftChang() {\n var _this3 = this;\n\n this.EquipmentList = this.EquipmentList.concat(this.multipleSelection1);\n this.reEquipmentList = this.reEquipmentList.filter(function (item2) {\n return !_this3.EquipmentList.some(function (citem2) {\n return citem2.id == item2.id;\n });\n });\n },\n handleSaveRelation: function handleSaveRelation() {\n var _this4 = this;\n\n this.reEquipmentList.forEach(function (item) {\n _this4.relationList.deviceIds.push(item.id);\n });\n\n if (!!this.relationList) {\n GroupingManage.ConnectionEquipment(this.relationList, function (res) {\n if (res.state) {\n _this4.$notify({\n type: 'success',\n message: '设备关联成功',\n duration: 2000\n });\n\n _this4.$emit('loadData');\n\n _this4.handleClose();\n } else {\n _this4.$message.warning(response.message);\n }\n });\n }\n },\n handleClose: function handleClose() {\n this.EquipmentParams2.groupId = '';\n this.reEquipmentList = [];\n this.EquipmentList = [];\n this.$emit('closeStshowForm');\n }\n }\n};",null]}