{"remainingRequest":"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\\EquipmentDetails.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Device\\deviceManage\\components\\EquipmentDetails.vue","mtime":1688615807625},{"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":["//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\r\nimport req from '@/request.js'\r\nimport {TableMixin} from '@/mixins/tableMixin'\r\nimport equipmentManage from '@/api/device/equipmentManage.js'\r\nimport {ExtendParamsMixin} from '@/mixins/deviceExtend.js'\r\nimport resourceManage from '@/api/device/resourceManage.js'\r\nimport latitude from '@/mixins/latitude'\r\nimport userManage from '@/api/device/userManage.js'\r\nimport productManage from '@/api/device/productManage.js'\r\nimport EquipmentInfoDialog from './modle/EquipmentInfoDialog.vue'\r\nimport EquipmentAlarm from './modle/EquipmentAlarm.vue'\r\nimport dictUtils from '@/components/dict/DictSelectUtils.js'\r\nimport PhysicalModel from './modle/PhysicalModel.vue'\r\n// import EquipmentExtendModel from './modle/EquipmentExtendModel.vue'\r\nimport relatedDevice from './modle/relatedDevice.vue'\r\nimport EquipStatuslog from './modle/EquipStatuslog.vue'\r\nimport RealTimeData from './modle/RealTimeData.vue'\r\nimport HazardRealDataModel from './modle/HazardRealDataModel.vue'\r\nimport WaterRealDataModel from './modle/WaterRealDataModel.vue'\r\nimport RoadblockRealDataModel from './modle/RoadblockRealDataModel.vue'\r\nimport SignboaerdRealDataModel from './modle/SignboaerdRealDataModel.vue'\r\nimport basisDialog from './modle/basisDialog.vue'\r\nimport WarningInformation from './modle/WarningInformation.vue'\r\nimport {error} from 'dingtalk-jsapi'\r\nexport default {\r\n name: 'EquipmentDetails',\r\n components: {\r\n PhysicalModel,\r\n EquipmentInfoDialog,\r\n EquipmentAlarm,\r\n // EquipmentExtendModel,\r\n relatedDevice,\r\n EquipStatuslog,\r\n // RealTimeData,\r\n HazardRealDataModel,\r\n WaterRealDataModel,\r\n RoadblockRealDataModel,\r\n SignboaerdRealDataModel,\r\n basisDialog,\r\n WarningInformation,\r\n },\r\n mixins: [TableMixin, ExtendParamsMixin],\r\n data() {\r\n return {\r\n activeName: 'first',\r\n parameters: {}, //接收参数\r\n size: '',\r\n status: '',\r\n addressType: '',\r\n floor: '',\r\n areaName: '',\r\n addvcdName: '',\r\n valueList: [],\r\n paramsValueList: [],\r\n floorList: [], //安装楼层列表\r\n addressTypeList: [], //安装地点类型列表\r\n productName: '', //产品名称\r\n repairUserName: '',\r\n productData: [],\r\n areaOptions: [],\r\n extendParams: [],\r\n productParams: [],\r\n productValue: {},\r\n productTypeValue: {},\r\n productTypelx: '',\r\n dialogId: null,\r\n dialogName: null,\r\n equipmentId: '',\r\n inquireType: true,\r\n importantData: [\r\n {\r\n name: '一般设备',\r\n value: '0',\r\n },\r\n {\r\n name: '重点设备',\r\n value: '1',\r\n },\r\n ],\r\n }\r\n },\r\n created() {\r\n // this.parameters = this.$route.query\r\n this.equipmentId = this.$route.query.id\r\n console.log(this.$route.query.status)\r\n this.inquireType = this.$route.query.status\r\n this.addressTypeList = dictUtils.getDictItemsFromCache('azddlx')\r\n this.floorList = dictUtils.getDictItemsFromCache('azlc')\r\n this.deviceStatus = dictUtils.getDictItemsFromCache('sbzt')\r\n this.loadAllData()\r\n },\r\n mounted() {},\r\n methods: {\r\n loadAllData() {\r\n equipmentManage.deviceDetailsInfo(this.equipmentId, (res) => {\r\n this.parameters = res\r\n this.loadData()\r\n })\r\n },\r\n translateImportant(val) {\r\n let importantName = ''\r\n this.importantData.forEach((e) => {\r\n if (val == e.value) {\r\n importantName = e.name\r\n }\r\n })\r\n return importantName\r\n },\r\n handleRefresh() {\r\n this.parameters = {}\r\n this.loadAllData()\r\n },\r\n toDialog(id, title) {\r\n // this.dialogName=title\r\n // this.dialogId=id\r\n this.$refs.basisModal.add(id, title)\r\n },\r\n handleClick(tab, event) {\r\n // console.log(tab, event)\r\n if (tab._props.name == 'fiveth' || tab._props.name == 'seventh') {\r\n // productManage\r\n // \t.productInfoDetail(this.parameters.productId)\r\n // \t.then((res) => {\r\n // \t\tthis.productValue = res\r\n // \t\tconsole.log('第一个',res);\r\n // \t\tproductManage\r\n // \t\t\t.productTypeDetail(this.productValue.typeId)\r\n // \t\t\t.then((res) => {\r\n // \t\t\t\tconsole.log('第二个',res);\r\n // \t\t\t\tthis.productTypeValue = res\r\n // \t\t\t})\r\n // \t\t\t.catch((err) => {\r\n // \t\t\t\tconsole.log(err)\r\n // \t\t\t})\r\n // \t})\r\n // \t.catch((err) => {\r\n // \t\tconsole.log(err)\r\n // \t})\r\n let protal = window.context.portal\r\n let requestData = {\r\n url: `${protal}/device/data/query?id=` + this.parameters.id,\r\n data: this.queryParam,\r\n method: 'post',\r\n }\r\n // 根据设备id获取实时数据\r\n req.request(requestData)\r\n .then((res) => {\r\n console.log('第三个', res)\r\n if (res.data.value) {\r\n this.productTypelx = res.data.value.productType\r\n } else {\r\n this.productTypelx = ''\r\n // this.$message.error('该设备无实时数据--------')\r\n }\r\n })\r\n .catch((err) => {\r\n console.log(err)\r\n })\r\n }\r\n },\r\n goBack() {\r\n this.$router.go(-1)\r\n },\r\n getInfo() {\r\n this.extendParams = []\r\n this.productParams = []\r\n equipmentManage.deviceDetails(this.parameters.id, (res) => {\r\n if (!res) return\r\n this.paramsValueList = res.paramsValueList\r\n equipmentManage.getExtendParams(\r\n {\r\n deviceId: this.parameters.id,\r\n },\r\n (res) => {\r\n this.extendParams = res\r\n this.extendParams.forEach((item) => {\r\n this.paramsValueList.forEach((val) => {\r\n if (item.id == val.confId) {\r\n item['value'] = val.value\r\n }\r\n })\r\n if (\r\n item.ctlType == 'select' ||\r\n item.ctlType == 'radio'\r\n ) {\r\n let arr = JSON.parse(item.json)\r\n arr.forEach((i) => {\r\n if (item.value == i.value) {\r\n item.value = i.label\r\n }\r\n })\r\n } else if (item.ctlType == 'checkbox') {\r\n let arr = JSON.parse(item.json)\r\n let arr1 = item.value.split(',')\r\n let itemArr = null\r\n let str = []\r\n arr.forEach((i) => {\r\n if (arr1.indexOf(i.value) !== -1) {\r\n str.push(i.label)\r\n itemArr = str.toString()\r\n }\r\n })\r\n item.value = itemArr\r\n }\r\n })\r\n }\r\n )\r\n equipmentManage.getProductParams(\r\n {\r\n productId: this.parameters.productId,\r\n },\r\n (res) => {\r\n this.productParams = res\r\n this.productParams.forEach((item) => {\r\n this.paramsValueList.forEach((val) => {\r\n if (item.id == val.confId) {\r\n item['value'] = val.value\r\n }\r\n })\r\n if (\r\n item.ctlType == 'select' ||\r\n item.ctlType == 'radio'\r\n ) {\r\n let arr = JSON.parse(item.json)\r\n arr.forEach((i) => {\r\n if (item.value == i.value) {\r\n item.value = i.label\r\n }\r\n })\r\n } else if (item.ctlType == 'checkbox') {\r\n let arr = JSON.parse(item.json)\r\n let arr1 = item.value.split(',')\r\n let itemArr = null\r\n let str = []\r\n arr.forEach((i) => {\r\n if (arr1.indexOf(i.value) !== -1) {\r\n str.push(i.label)\r\n itemArr = str.toString()\r\n }\r\n })\r\n item.value = itemArr\r\n }\r\n })\r\n }\r\n )\r\n })\r\n },\r\n alterBasis() {\r\n this.$refs.formModal.add()\r\n },\r\n formatNumber(key) {\r\n this.parameters[key] = latitude.TreeFour(this.parameters[key])\r\n },\r\n loadData(page) {\r\n this.getInfo()\r\n let data = {\r\n pageBean: {\r\n page: 1,\r\n pageSize: -1,\r\n showTotal: true,\r\n },\r\n }\r\n userManage.userQuery(data).then((res) => {\r\n let data = res.rows\r\n data.forEach((item) => {\r\n if (this.parameters.repairUserId !== '') {\r\n if (item.id == this.parameters.repairUserId) {\r\n this.repairUserName = item.name\r\n }\r\n } else {\r\n this.repairUserName = ''\r\n }\r\n })\r\n })\r\n this.deviceStatus.forEach((item) => {\r\n if (this.parameters.status) {\r\n if (item.value == this.parameters.status) {\r\n this.status = item.name\r\n }\r\n } else {\r\n this.status = ''\r\n }\r\n })\r\n this.addressTypeList.forEach((item) => {\r\n if (this.parameters.addressType) {\r\n if (item.value == this.parameters.addressType) {\r\n this.addressType = item.name\r\n }\r\n } else {\r\n this.addressType = ''\r\n }\r\n })\r\n this.floorList.forEach((item) => {\r\n if (this.parameters.floor) {\r\n if (item.value == this.parameters.floor) {\r\n this.floor = item.name\r\n }\r\n } else {\r\n this.floor = ''\r\n }\r\n })\r\n resourceManage.loadArea(data, (res) => {\r\n this.areaOptions = res.rows\r\n this.areaOptions.forEach((item) => {\r\n if (this.parameters.areaId) {\r\n if (item.id == this.parameters.areaId) {\r\n this.areaName = item.name\r\n }\r\n } else {\r\n this.areaName = ''\r\n }\r\n })\r\n })\r\n resourceManage.loadAdminAreaTree({}, (res) => {\r\n if (this.parameters.addvcd) {\r\n this.addvcdName = res.value[0].name\r\n } else {\r\n this.addvcdName = ''\r\n }\r\n })\r\n },\r\n },\r\n}\r\n",null]}