{"remainingRequest":"D:\\jenkins\\workspace\\examine-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\examine-fvue\\src\\views\\mainDataMenu\\components\\deviceMenuDialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\examine-fvue\\src\\views\\mainDataMenu\\components\\deviceMenuDialog.vue","mtime":1670234386342},{"path":"D:\\jenkins\\workspace\\examine-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\examine-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\examine-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\r\nimport deviceMenu from '@/api/examination/deviceMenu.js'\r\nimport dictUtils from '@/components/dict/DictSelectUtils.js'\r\nexport default {\r\n\tname: 'warning',\r\n\tdata() {\r\n\t\treturn {\r\n\t\t\ttitle: '',\r\n\t\t\troomList: [],\r\n\t\t\ttypeList: [],\r\n\t\t\tvisible: false,\r\n\t\t\tparams: {\r\n\t\t\t\troomId: \"\",\r\n\t\t\t\tcode: '',\r\n\t\t\t\tname: '',\r\n\t\t\t\tip: '',\r\n\t\t\t\taisle: '',\r\n\t\t\t\turl: \"\",\r\n\t\t\t\ttype: ''\r\n\t\t\t},\r\n\t\t\trules: {\r\n\t\t\t\troomId: [{\r\n\t\t\t\t\trequired: true,\r\n\t\t\t\t\tmessage: '请选择所属考场',\r\n\t\t\t\t\ttrigger: 'blur',\r\n\t\t\t\t},],\r\n\t\t\t\tcode: [{\r\n\t\t\t\t\trequired: true,\r\n\t\t\t\t\tmessage: '请输入设备编码',\r\n\t\t\t\t\ttrigger: 'blur',\r\n\t\t\t\t},],\r\n\t\t\t\tname: [{\r\n\t\t\t\t\trequired: true,\r\n\t\t\t\t\tmessage: '请输入设备名称',\r\n\t\t\t\t\ttrigger: 'blur',\r\n\t\t\t\t},],\r\n\t\t\t\ttype: [{\r\n\t\t\t\t\trequired: true,\r\n\t\t\t\t\tmessage: '请输入设备类型',\r\n\t\t\t\t\ttrigger: 'blur',\r\n\t\t\t\t},],\r\n\t\t\t\tip: [{\r\n\t\t\t\t\trequired: true,\r\n\t\t\t\t\tmessage: '请输入IP地址',\r\n\t\t\t\t\ttrigger: 'blur',\r\n\t\t\t\t},],\r\n\t\t\t\taisle: [{\r\n\t\t\t\t\trequired: true,\r\n\t\t\t\t\tmessage: '请输入通道号',\r\n\t\t\t\t\ttrigger: 'blur',\r\n\t\t\t\t},],\r\n\t\t\t\turl: [{\r\n\t\t\t\t\trequired: true,\r\n\t\t\t\t\tmessage: '请输入访问地址',\r\n\t\t\t\t\ttrigger: 'blur',\r\n\t\t\t\t},],\r\n\t\t\t},\r\n\t\t\tqueryParam: {\r\n\t\t\t\tpageBean: {\r\n\t\t\t\t\tpage: -1,\r\n\t\t\t\t\tpageSize: 10,\r\n\t\t\t\t\tshowTotal: true\r\n\t\t\t\t},\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t},\r\n\tcreated() {\r\n\t\tthis.typeList = dictUtils.getDictItemsFromCache('sblx')\r\n\t},\r\n\tmounted() { },\r\n\tmethods: {\r\n\t\tadd(val) {\r\n\t\t\tthis.getRoomQuery()\r\n\t\t\tthis.visible = true\r\n\t\t\tthis.title = '新增'\r\n\t\t\tthis.params.type = this.typeList[0].value\r\n\t\t\t// this.params = val\r\n\t\t},\r\n\t\tedit(row) {\r\n\t\t\tthis.getRoomQuery()\r\n\t\t\tthis.visible = true\r\n\t\t\tthis.title = '修改'\r\n\t\t\tdeviceMenu.detailId(row.id, res => {\r\n\t\t\t\tthis.params = res\r\n\t\t\t})\r\n\t\t},\r\n\t\t//保存\r\n\t\tgoInfo() {\r\n\t\t\tthis.$refs.formInfo.validate(valid => {\r\n\t\t\t\tif (valid) {\r\n\t\t\t\t\tif (this.title === '新增') {\r\n\t\t\t\t\t\tdeviceMenu.addData(this.params, response => {\r\n\t\t\t\t\t\t\tif (response.state) {\r\n\t\t\t\t\t\t\t\tthis.$notify({\r\n\t\t\t\t\t\t\t\t\ttype: 'success',\r\n\t\t\t\t\t\t\t\t\tmessage: '保存成功',\r\n\t\t\t\t\t\t\t\t\tduration: 2000\r\n\t\t\t\t\t\t\t\t})\r\n\t\t\t\t\t\t\t\tthis.handleClose()\r\n\t\t\t\t\t\t\t\tthis.$parent.loadData(1)\r\n\t\t\t\t\t\t\t} else { }\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (this.title === '修改') {\r\n\t\t\t\t\t\tdeviceMenu.editData(this.params, response => {\r\n\t\t\t\t\t\t\tif (response.state) {\r\n\t\t\t\t\t\t\t\tthis.$notify({\r\n\t\t\t\t\t\t\t\t\ttype: 'success',\r\n\t\t\t\t\t\t\t\t\tmessage: '修改成功',\r\n\t\t\t\t\t\t\t\t\tduration: 2000\r\n\t\t\t\t\t\t\t\t})\r\n\t\t\t\t\t\t\t\tthis.handleClose()\r\n\t\t\t\t\t\t\t\tthis.$parent.loadData(1)\r\n\t\t\t\t\t\t\t} else { }\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn false\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t},\r\n\t\tgetRoomQuery() {\r\n\t\t\tdeviceMenu.roomQuery(this.queryParam, res => {\r\n\t\t\t\tif (res.rows) {\r\n\t\t\t\t\tthis.roomList = res.rows\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t},\r\n\t\t// 关闭新增人员窗口\r\n\t\thandleClose() {\r\n\t\t\tthis.visible = false\r\n\t\t\tthis.params = {\r\n\t\t\t\troomId: \"\",\r\n\t\t\t\tcode: '',\r\n\t\t\t\tname: '',\r\n\t\t\t\tip: '',\r\n\t\t\t\taisle: '',\r\n\t\t\t\turl: \"\",\r\n\t\t\t}\r\n\t\t},\r\n\t},\r\n}\r\n",null]}