{"remainingRequest":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Device\\riotBarricade\\BarricadeEquipment.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Device\\riotBarricade\\BarricadeEquipment.vue","mtime":1686706098958},{"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\r\nimport {TableMixin} from '@/mixins/tableMixin'\r\nimport riotBarricade from '@/api/device/riotBarricade.js'\r\nimport dictUtils from '@/components/dict/DictSelectUtils.js'\r\nimport RealTimeMonitorDialog from '@/components/detailsDialog/RealTimeMonitorDialog.vue'\r\nexport default {\r\n name: 'RealTimeMonitor',\r\n components: {\r\n RealTimeMonitorDialog,\r\n },\r\n mixins: [TableMixin],\r\n data() {\r\n return {\r\n querys: [\r\n {\r\n group: 'main',\r\n operation: 'LIKE',\r\n parentGroup: '',\r\n property: 'name',\r\n relation: 'AND',\r\n value: '',\r\n },\r\n {\r\n group: 'main',\r\n operation: 'EQUAL',\r\n parentGroup: '',\r\n property: 'code',\r\n relation: 'AND',\r\n value: '',\r\n },\r\n {\r\n group: 'main',\r\n operation: 'EQUAL',\r\n parentGroup: '',\r\n property: 'status',\r\n relation: 'AND',\r\n value: '',\r\n },\r\n ],\r\n up: '上升',\r\n down: '下降',\r\n lock: '锁定',\r\n action: '',\r\n operationName: '',\r\n actionList: [], //动作标识字典\r\n statusList: [], //成功状态字典\r\n deviceStatus: [], // 设备状态字典\r\n addressTypeList: [], //安装地点类型字段列表\r\n dialogVisible: false,\r\n dialogTitle: null,\r\n equipmentType: null,\r\n rowList: null,\r\n code: '',\r\n authCode: null,\r\n isDisabled: true,\r\n }\r\n },\r\n created() {\r\n this.deviceStatus = dictUtils.getDictItemsFromCache('sbzt')\r\n this.actionList = dictUtils.getDictItemsFromCache('dzbs')\r\n this.addressTypeList = dictUtils.getDictItemsFromCache('azddlx')\r\n },\r\n mounted() {},\r\n methods: {\r\n toDialog(name) {\r\n this.$refs.RealTimeMonitorDialog.add(name)\r\n },\r\n // 方法\r\n randyzm() {\r\n //生成随机验证码\r\n let code = ''\r\n let coden = ''\r\n var codeLength = 4 //验证码的长度\r\n var random = new Array(\r\n 0,\r\n 1,\r\n 2,\r\n 3,\r\n 4,\r\n 5,\r\n 6,\r\n 7,\r\n 8,\r\n 9,\r\n 'A',\r\n 'B',\r\n 'C',\r\n 'D',\r\n 'E',\r\n 'F',\r\n 'G',\r\n 'H',\r\n 'I',\r\n 'J',\r\n 'K',\r\n 'L',\r\n 'M',\r\n 'N',\r\n 'O',\r\n 'P',\r\n 'Q',\r\n 'R',\r\n 'S',\r\n 'T',\r\n 'U',\r\n 'V',\r\n 'W',\r\n 'X',\r\n 'Y',\r\n 'Z',\r\n 'a',\r\n 'b',\r\n 'c',\r\n 'd',\r\n 'e',\r\n 'f',\r\n 'g',\r\n 'h',\r\n 'i',\r\n 'j',\r\n 'k',\r\n 'l',\r\n 'm',\r\n 'n',\r\n 'o',\r\n 'p',\r\n 'q',\r\n 'r',\r\n 's',\r\n 't',\r\n 'u',\r\n 'v',\r\n 'w',\r\n 'x',\r\n 'y',\r\n 'z'\r\n ) //随机数\r\n for (var i = 0; i < codeLength; i++) {\r\n //循环操作\r\n var index = Math.floor(Math.random() * 62) //取得随机数的索引(0~61)\r\n code += random[index] //根据索引取得随机数加到code上\r\n coden += random[index] //根据索引取得随机数加到code上\r\n }\r\n this.code = coden //把code值赋给验证码\r\n },\r\n handleUpdate(row) {\r\n console.log(row)\r\n },\r\n clearQuerys() {\r\n this.querys[0].value = ''\r\n },\r\n loadData(page) {\r\n if (page) {\r\n this.queryParam.pageBean.page = page\r\n }\r\n this.loading = true\r\n this.tableData = []\r\n this.queryParam.querys = []\r\n if (this.querys[0].value) {\r\n this.queryParam.querys.push(this.querys[0])\r\n }\r\n if (this.querys[1].value) {\r\n this.queryParam.querys.push(this.querys[1])\r\n }\r\n if (this.querys[2].value) {\r\n this.queryParam.querys.push(this.querys[2])\r\n }\r\n riotBarricade.loadBarricade(this.queryParam, (res) => {\r\n // console.log(res, 'ppppppp')\r\n this.tableData = res.rows.map((item) => {\r\n return {\r\n ...item,\r\n isState: item.isLock == 1 ? true : false,\r\n }\r\n })\r\n\r\n this.total = res.total\r\n this.$set(this.tableData)\r\n this.loading = false\r\n this.tableData.forEach((item) => {\r\n this.deviceStatus.forEach((val) => {\r\n if (item.status == val.value) {\r\n item['statusName'] = val.name\r\n }\r\n })\r\n this.addressTypeList.forEach((val) => {\r\n if (item.addressType == val.value) {\r\n item['addressTypeName'] = val.name\r\n }\r\n })\r\n })\r\n })\r\n },\r\n // getVlaue(event) {\r\n // this.action = event.target.innerText\r\n // },\r\n handleClose() {\r\n this.isDisabled = true\r\n this.dialogVisible = false\r\n },\r\n bulrInput() {\r\n if (this.code.toLowerCase() == this.authCode.toLowerCase()) {\r\n this.isDisabled = false\r\n } else {\r\n this.isDisabled = true\r\n }\r\n },\r\n handleEquipment(row) {\r\n this.authCode = ''\r\n this.code = ''\r\n this.rowList = row\r\n this.equipmentType = '上升'\r\n this.dialogTitle = row.name\r\n this.dialogVisible = true\r\n this.randyzm()\r\n },\r\n falling(command, row) {\r\n this.authCode = ''\r\n this.code = ''\r\n this.rowList = row\r\n this.equipmentType = command\r\n this.dialogTitle = row.name\r\n this.dialogVisible = true\r\n this.randyzm()\r\n },\r\n\tunlock(row) {\r\n this.authCode = ''\r\n this.code = ''\r\n this.rowList = row\r\n this.equipmentType = '解锁'\r\n this.dialogTitle = row.name\r\n this.dialogVisible = true\r\n this.randyzm()\r\n },\r\n onclickDialog() {\r\n let currentUser = JSON.parse(window.sessionStorage.getItem('currentUser'))\r\n this.operationName = currentUser.username\r\n this.actionList.map((item) => {\r\n console.log(item)\r\n if (this.up) {\r\n if (item.name == this.up) {\r\n this.action = item.value\r\n }\r\n }\r\n })\r\n let data = {\r\n action: this.action,\r\n controller_id: this.rowList.code,\r\n deviceCode: this.rowList.code,\r\n deviceName: this.rowList.name,\r\n operator_name: this.operationName,\r\n }\r\n riotBarricade.operationBarricade(data, (res) => {\r\n console.log(res)\r\n this.dialogVisible = false\r\n })\r\n },\r\n\t//解锁\r\n changeSwitch() {\r\n let data = {\r\n action: '21',\r\n deviceCode: this.rowList.code,\r\n }\r\n riotBarricade.lockDataLine([data], (res) => {\r\n this.rowList.isState = false\r\n\t\t this.dialogVisible = false\r\n })\r\n },\r\n //鎖定\r\n onlockData() {\r\n let currentUser = JSON.parse(window.sessionStorage.getItem('currentUser'))\r\n this.operationName = currentUser.username\r\n this.actionList.map((item) => {\r\n if (this.lock) {\r\n if (item.name == this.lock) {\r\n this.action = item.value\r\n }\r\n }\r\n })\r\n let data = {\r\n action: this.action,\r\n deviceCode: this.rowList.code,\r\n }\r\n riotBarricade.lockDataLine([data], (res) => {\r\n this.dialogVisible = false\r\n this.rowList.isState = true\r\n })\r\n },\r\n toUpDate() {\r\n let currentUser = JSON.parse(window.sessionStorage.getItem('currentUser'))\r\n this.operationName = currentUser.username\r\n this.actionList.map((item) => {\r\n console.log(item)\r\n if (this.down) {\r\n if (item.name == this.down) {\r\n this.action = item.value\r\n }\r\n }\r\n })\r\n let data = {\r\n action: this.action,\r\n controller_id: this.rowList.code,\r\n deviceCode: this.rowList.code,\r\n deviceName: this.rowList.name,\r\n operator_name: this.operationName,\r\n }\r\n riotBarricade.operationBarricade(data, (res) => {\r\n console.log(res)\r\n this.dialogVisible = false\r\n })\r\n },\r\n },\r\n}\r\n",null]}