1 line
38 KiB
JSON
1 line
38 KiB
JSON
|
{"remainingRequest":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\src\\views\\modules\\equipmentManage\\gateway-add-or-update.vue?vue&type=script&lang=js&","dependencies":[{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\src\\views\\modules\\equipmentManage\\gateway-add-or-update.vue","mtime":1614735254000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\babel-loader\\lib\\index.js","mtime":499162500000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\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\nimport throttle from 'lodash/throttle'\nimport {\n\tvalidateIP,\n} from '@/utils/validate.js'\nimport {\n\ttreeDataTranslate,\n\tgetDictDataList\n} from '@/utils'\nexport default {\n\tname: \"electric-add-or-update\",\n\tdata() {\n\t\treturn {\n\t\t\tloading: false,\n\t\t\tvisible: false,\n\t\t\ttfSetupaddrList: [], // 安装地址\n\t\t\teqTypeList: [], // 设备类型\n\t\t\tbusList: [], // 总线\n\t\t\teqNumberList: [], // 设备路数\n\t\t\teqList: [], // 设备(新增使用)\n\t\t\tpirList: [], // 修改使用\n\t\t\tlightList: [], // 修改使用\n\t\t\tpm25List: [], // 修改使用\n\t\t\tuwbRegionList: [], // \"区域围栏列表\"\n\t\t\tdataForm: {\n\t\t\t\t\"id\": \"\",\n\t\t\t\tgwId: \"\",\n\t\t\t\tgwIpgateway: \"\",\n\t\t\t\tgwName: \"\",\n\t\t\t\tmbdDevicetype: \"\",\n\t\t\t\tgwSn: \"\",\n\t\t\t\t// gwUwbnum: \"\",\n\t\t\t\tgwExpirydate: \"\",\n\t\t\t\tgwSetupaddr: [],\n\t\t\t\tscGatebusdeviceDTOList: [],\n\t\t\t\tremark: \"\",\n\t\t\t},\n\t\t\toptions: [{\n\t\t\t\tvalue: '-1',\n\t\t\t\tlabel: '-1'\n\t\t\t}]\n\t\t}\n\t},\n\tmethods: {\n\t\t// 新增总线\n\t\thandleAddClick() {\n\t\t\tlet obj = {\n\t\t\t\tgbdLineNum: \"\",\n\t\t\t\tgbdDevicetype: \"\",\n\t\t\t\tmbdId: \"\",\n\t\t\t\tlightroadnum: \"\", // 灯口编号\n\t\t\t\tgbdAddr: \"\",\n\t\t\t\tgbdGroup: \"\",\n\t\t\t\tgbdFenceId: \"\",\n\t\t\t\tfourEightTwelve: \"\", // 灯口编号类型\n\t\t\t}\n\n\t\t\tlet isZero = this.dataForm.scGatebusdeviceDTOList.length === 0 // 空数组\n\t\t\tif (isZero) {\n\t\t\t\tthis.dataForm.scGatebusdeviceDTOList.unshift(obj)\n\t\t\t} else {\n\t\t\t\tlet isEmpty = false // 默认每个字段都有值\n\t\t\t\tlet i = 0\n\t\t\t\tthis.dataForm.scGatebusdeviceDTOList.forEach((item, index) => {\n\t\t\t\t\tif (item.gbdLineNum === \"\" || item.gbdDevicetype === \"\" || item.mbdId === \"\" || item.gbdAddr === \"\") {\n\t\t\t\t\t\ti = index\n\t\t\t\t\t\tisEmpty = true\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\tif (isEmpty) {\n\t\t\t\t\tthis.$message.info(`请先完善第${i+1}条数据信息再新增`)\n\t\t\t\t} else {\n\t\t\t\t\tthis.dataForm.scGatebusdeviceDTOList.unshift(obj)\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t// 删除\n\t\thandleDeleteClick(obj, index) {\n\t\t\tthis.dataForm.scGatebusdeviceDTOList.splice(index, 1)\n\t\t},\n\t\t// 选择总线\n\t\thandleLineChange(e, obj, i) {\n\t\t\tif (e === \"\") {\n\t\t\t\treturn this.dataForm.scGatebusdeviceDTOList[i].gbdLineNum = \"\"\n\t\t\t}\n\t\t\t// 当表单\"设备类型\"和总线\"设备类型\"都选择智能控灯设备时,不做设备是否被<EFBFBD><EFBFBD>
|