{"remainingRequest":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\bbsl-fvue\\src\\views\\stManager\\components\\deviceForm-dialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\src\\views\\stManager\\components\\deviceForm-dialog.vue","mtime":1684458239606},{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["//\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//\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//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nimport deviceManger from '@/api/stManager/deviceManger.js';\nimport req from '@/request.js';\nexport default {\n name: 'deviceForm-dialog',\n props: {\n showFormDia: {\n type: Boolean,\n default: false\n },\n title: {\n type: String,\n default: ''\n },\n pId: {\n type: String,\n default: ''\n }\n },\n data: function data() {\n return {\n params: {\n code: null,\n name: null,\n deviceFun: null,\n floodHz: null,\n objId: null,\n parentId: null,\n producerLinkPhone: null,\n producerLinkUser: null,\n producerName: null,\n remark: null,\n simCard: null,\n snNo: null,\n type: null // appTypeCodes: [],\n // appTypeNames: [],\n\n },\n types: [],\n //设备类型\n objIds: [],\n parentIds: [],\n //上级设备数组\n // appTypeCodesType: [], //应用分类\n ifMainDams: [{\n name: '未知',\n value: '0'\n }, {\n name: '是',\n value: '1'\n }, {\n name: '否',\n value: '2'\n }],\n elevSyss: [],\n //工程建设情况\n rules: {\n name: [{\n required: true,\n message: '请输入名称',\n trigger: 'blur'\n }],\n code: [{\n required: true,\n message: '请输入代码',\n trigger: 'blur'\n }],\n type: [{\n required: true,\n message: '请选择类型',\n trigger: 'blur'\n }],\n objId: [{\n required: true,\n message: '请选择对象分类',\n trigger: 'blur'\n }]\n }\n };\n },\n created: function created() {\n var _this = this;\n\n this.getDetailInfo();\n this.getSysDict(); // 设备\n\n deviceManger.getParaIds({}, function (res) {\n _this.parentIds = res.value;\n });\n },\n methods: {\n changeParentId: function changeParentId(val) {\n this.params.parentId = '1';\n },\n // changeappType(val) {\n // this.params.appTypeNames=[];\n // this.appTypeCodesType.forEach((e, i) => {\n // val.forEach((j) => {\n // if (e.value == j) {\n // this.params.appTypeNames.push(e.name)\n // }\n // })\n // })\n // // 去重\n // this.params.appTypeNames = [...new Set(this.params.appTypeNames)]\n // },\n // 根据ID查询\n getDetailInfo: function getDetailInfo() {\n var _this2 = this;\n\n if (this.title === '修改') {\n this.getSysDict();\n deviceManger.detailId(this.pId, function (res) {\n _this2.params = res.value;\n\n _this2.$set(_this2.params);\n });\n }\n },\n handleClose: function handleClose() {\n this.params = {\n code: null,\n name: null,\n deviceFun: null,\n floodHz: null,\n objId: null,\n parentId: null,\n producerLinkPhone: null,\n producerLinkUser: null,\n producerName: null,\n remark: null,\n simCard: null,\n snNo: null,\n type: null\n };\n this.$emit('closeFormDiao');\n },\n goInfo: function goInfo(e) {\n var _this3 = this;\n\n this.$refs.formInfo.validate(function (valid) {\n if (valid) {\n if (_this3.title === '新增') {\n var param = JSON.parse(JSON.stringify(_this3.params)); // param.appTypeCodes = param.appTypeCodes.toString();\n // param.appTypeNames = param.appTypeNames.toString();\n\n deviceManger.addSave(param, function (response) {\n if (response.state) {\n _this3.$notify({\n type: 'success',\n message: '新增成功',\n duration: 2000 // offset: 80\n\n });\n\n _this3.$emit('closeFormDiao');\n\n _this3.$emit('refList'); // this.$message.success(response.message)\n\n } else {// this.$message.success(response.message)\n } // this.$emit('closeFormDiao')\n // this.$router.go(-1)\n\n });\n }\n\n if (_this3.title === '修改') {\n deviceManger.upData(_this3.params, function (response) {\n if (response.state) {\n _this3.$notify({\n type: 'success',\n message: '修改成功',\n duration: 2000 // offset: 80\n\n });\n\n _this3.$emit('closeFormDiao');\n\n _this3.$emit('refList'); // this.$message.success(response.message)\n\n } else {// this.$message.success(response.message)\n } // this.$emit('closeFormDiao')\n // this.$router.go(-1)\n\n });\n }\n } else {\n return false;\n }\n });\n },\n //获取字典数据\n getSysDict: function getSysDict() {\n var _this4 = this;\n\n var portal = window.context.portal;\n return new Promise(function (resolve, reject) {\n req.post(portal + '/sys/sysDictionary/v1/queryAllDictItems').then(function (response) {\n resolve(response.data);\n _this4.types = response.data.sblx;\n _this4.objIds = response.data.sbdxfl;\n _this4.appTypeCodesType = response.data.sbyyfl;\n\n if (_this4.title === '新增') {\n _this4.params.type = _this4.types[0].value;\n _this4.params.objId = _this4.objIds[0].value;\n }\n }, function (error) {\n reject(error);\n });\n });\n }\n }\n};",null]}