management/front/dkha-web-sz-main/node_modules/.cache/vue-loader/6a0d1ad194f9f5c35af17315616...

1 line
19 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\\access-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\\access-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\nimport {\n\tgetDictDataList,\n\ttreeDataTranslate\n} from '@/utils'\nimport {\n\tvalidateIP\n} from '@/utils/validate'\nimport debounce from 'lodash/debounce'\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tdeptList: [],\n\t\t\tdialogVisible: false,\n\t\t\tloading: false,\n\t\t\ttype: 'post',\n\t\t\taddressList: [],\n\t\t\tdataForm: {\n\t\t\t\taeClientip: '192.168.24.',\n\t\t\t\tdfFloorid: [],\n\t\t\t\taeClientport: '3639',\n\t\t\t\taeSerialnumber: 'NZ53M',\n\t\t\t\taeDevicename: '',\n\t\t\t\taeSigntype: '1',\n\t\t\t\taeExpirydate: new Date(2030, 10, 10),\n\t\t\t\taeSignkey: '123456',\n\t\t\t\tfloorName: '',\n\t\t\t\taeMainboard: '0',\n\t\t\t\tremark: ''\n\t\t\t},\n\t\t\taccessEquipTypeList: getDictDataList('accessEquipType'),\n\t\t\taccessDevinceTypeList: getDictDataList('accessDevinceType'),\n\t\t\teightInchesEquipTypeList: getDictDataList('eightInchesEquipType'),\n\t\t\trules: {\n\t\t\t\taeClientip: [{\n\t\t\t\t\trequired: true,\n\t\t\t\t\tvalidator: validateIP,\n\t\t\t\t\ttrigger: ['blur', 'change']\n\t\t\t\t}, ],\n\t\t\t\tdfFloorid: [{\n\t\t\t\t\trequired: true,\n\t\t\t\t\tmessage: '请选择',\n\t\t\t\t\ttrigger: ['blur', 'change']\n\t\t\t\t}],\n\t\t\t\taeDeviceid: [{\n\t\t\t\t\trequired: true,\n\t\t\t\t\tmessage: '请输入',\n\t\t\t\t\ttrigger: ['blur', 'change']\n\t\t\t\t}, ],\n\t\t\t\taeClientport: [{\n\t\t\t\t\trequired: true,\n\t\t\t\t\tmessage: '请输入',\n\t\t\t\t\ttrigger: ['blur', 'change']\n\t\t\t\t}, ],\n\t\t\t\taeSerialnumber: [{\n\t\t\t\t\trequired: true,\n\t\t\t\t\tmessage: '请输入',\n\t\t\t\t\ttrigger: ['blur', 'change']\n\t\t\t\t}],\n\t\t\t\taeDevicename: [{\n\t\t\t\t\trequired: true,\n\t\t\t\t\tmessage: '请输入',\n\t\t\t\t\ttrigger: ['blur', 'change']\n\t\t\t\t}],\n\t\t\t\taeSigntype: [{\n\t\t\t\t\trequired: true,\n\t\t\t\t\tmessage: '请选择',\n\t\t\t\t\ttrigger: ['blur', 'change']\n\t\t\t\t}],\n\t\t\t\taeExpirydate: [{\n\t\t\t\t\trequired: true,\n\t\t\t\t\tmessage: '请选择',\n\t\t\t\t\ttrigger: ['blur', 'change']\n\t\t\t\t}],\n\t\t\t\taeSignkey: [{\n\t\t\t\t\trequired: true,\n\t\t\t\t\tmessage: '请选择',\n\t\t\t\t\ttrigger: ['blur', 'change']\n\t\t\t\t}],\n\t\t\t\taeDevicetype: [{\n\t\t\t\t\trequired: true,\n\t\t\t\t\tmessage: '请选择',\n\t\t\t\t\ttrigger: ['blur', 'change']\n\t\t\t\t}],\n\t\t\t\taeMainboard: [{\n\t\t\t\t\trequired: true,\n\t\t\t\t\tmessage: '请选择',\n\t\t\t\t\ttrigger: ['blur', 'change']\n\t\t\t\t}],\n\t\t\t},\n\t\t}\n\t},\n\tmethods: {\n\t\t// 获取部门列表\n\t\tgetDeptList () {\n\t\t\treturn this.$http.get('/sys/dept/list').then(({ data: res }) => {\n\t\t\t\tif (res.code !== 0) {\n\t\t\t\t\treturn this.$message.error(res.msg)\n\t\t\t\t}\n\t\t\t\tthis.deptList = res.data\n\t\t\t}).catch(() => {})\n\t\t},\n\t\t// 获取选中的部门列表\n\t\tgetDeptCheckList () {\n\t\t\treturn this.$http.get('/system/scaidooreight/dept/'+this.dataForm.aeId).then(({ data: res }) => {\n\t\t\t\tif (res.code !== 0) {\n\t\t\t\t\treturn this.$message.error(res.msg)\n\t\t\t\t}\n\t\t\t\tthis.dataForm.deptIdList = res.data.map(item => item.deptId);\n\t\t\t\tthis.$refs.deptListTree.setCheckedKeys(this.dataForm.deptIdList)\n\t\t\t\t//this.deptList = res.data\n\t\t\t}).catch(() => {})\n\t\t},\n\t\tinit(data) {\n\n\t\t\tthis.dialogVisible = true;\n\t\t\t// 获取最新楼层信息\n\t\t\tthis.getAddressList();\n\t\t\tthis.getDeptList();\n\t\t\t// 编辑\n\t\t\tif (data) {\n\t\t\t\tthis.type = \"put\";\n\t\t\t\tthis.dataForm = {\n\t\t\t\t\t...data,\n\t\t\t\t\taeSigntype: String(data.aeSigntype),\n\t\t\t\t\taeDevicetype: String(data.aeDevicetype),\n\t\t\t\t\taeMainboard: String(data.aeMainboard),\n\t\t\t\t\tdfFloorid: data.dfFloorid.split(\",\")\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthis.type = \"post\";\n\t\t\t\tthis.dataForm = {\n\t\t\t\t\taeClientip: '192.168.24.',\n\t\t\t\t\tdfFloorid: [],\n\t\t\t\t\taeClientport: '3639',\n\t\t\t\t\taeSerialnumber: 'NZ53M',\n\t\t\t\t\taeDevicename: '',\n\t\t\t\t\taeSigntype: '1',\n\t\t\t\t\taeExpirydate: new Date(2030, 10, 10),\n\t\t\t\t\taeSignkey: '123456',\n\t\t\t\t\tfloorName: '',\n\t\t\t\t\taeMainboard: '0',\n\t\t\t\t\tremark: ''\n\t\t\t\t}\n\t\t\t\tthis.$nextTick(() => {\n\t\t\t\t\tthis.$refs['dataForm'].clearValidate()\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tthis.$nextTick(() => {\n\t\t\t\tthis.$refs.deptListTree.setCheckedKeys([]);\n\t\t\t})\n\t\t\tif (this.dataForm.aeId){\n\t\t\t\tthis.getDeptCheckList();\n\t\t\t}\n\t\t},\n\t\tsubmitInfo: debounce(function() {\n\t\t\tthis.$refs['dataForm'].validate((valid) => {\n\t\t\t\tif (!valid) {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t\tthis.loading = true;\n\t\t\t\tlet submitData = {\n\t\t\t\t\t...this.dataForm,\n\t\t\t\t\tdfFloorid: this.dataForm.dfFloorid.join(\",\"),\n\t\t\t\t\tdeptIdList:this.$refs.deptListTree.getCheckedKeys()\n\t\t\t\t}\n\t\t\t\tthis.$http({\n\t\t\t\t\turl: \"/system/scaidooreight\",\n\t\t\t\t\tmethod: this.type,\n\t\t\t\t\tdata: submitData\n\t\t\t\t}).then(({\n\t\t\t\t\tdata\n\t\t\t\t}) => {\n\t\t\t\t\tif (data.code != 0) {\n\t\t\t\t\t\treturn this.$message.error(data.msg)\n\t\t\t\t\t}\n\t\t\t\t\tthis.dialogVisible = false;\n\t\t\t\t\tif (this.type == 'post') {\n\t\t\t\t\t\tthis.$parent.$parent.search();\n\t\t\t\t\t\tthis.$parent.$parent.resetForm('ruleForm');\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// this.$parent.$parent.search();\n\t\t\t\t\t}\n\t\t\t\t\tthis.$message.success(data.msg || '操作成功')\n\t\t\t\t}).finally(() => {\n\t\t\t\t\tthis.loading = false;\n\t\t\t\t})\n\t\t\t})\n\n\t\t}, 1000),\n\t\t// 获取楼栋和楼层的cascader\n\t\tgetAddressList() {\n\t\t\t// -1是获取所有楼栋\n\t\t\tthis.$http.get(`/system/scdormitoryfloor/tree/-1`).then(({\n\t\t\t\tdata: res\n\t\t\t}) => {\n\t\t\t\tif (res.code !== 0) {\n\t\t\t\t\treturn this.$message.error(res.msg)\n\t\t\t\t}\n\t\t\t\tthis.addressList = treeDataTranslate(res.data, 'df_floorid', 'df_parentid')\n\t\t\t}).catch(() => {})\n\t\t},\n\t}\n}\n",{"version":3,"sources":["access-add-or-update.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"access-add-or-update.vue","sourceRoot":"src/views/modules/equipmentManage","sourcesContent":["<template>\n\t<el-dialog :title=\"type=='post'?'新建':'修改'\" :visible.sync=\"dialogVisible\" :close-on-click-modal=\"false\">\n\t\t<div>\n\t\t\t<el-form ref=\"dataForm\" :model=\"dataForm\" :rules=\"rules\" label-width=\"120px\">\n\t\t\t\t<el-row>\n\t\t\t\t\t<el-col :span=\"12\">\n\t\t\t\t\t\t<el-form-item label=\"设备端IP\" prop=\"aeClientip\">\n\t\t\t\t\t\t\t<el-input v-model=\"dataForm.aeClientip\"></el-input>\n\t\t\t\t\t\t</el-form-item>\n\t\t\t\t\t</el-col>\n\t\t\t\t\t<el-col :span=\"11\" :offset=\"1\">\n\t\t\t\t\t\t<el-form-item label=\"设备端端口\" prop=\"aeClientport\">\n\t\t\t\t\t\t\t<el-input v-model=\"dataForm.aeClientport\"></el-input>\n\t\t\t\t\t\t</el-form-item>\n\t\t\t\t\t</el-col>\n\t\t\t\t</el-row>\n\t\t\t\t<el-row>\n\t\t\t\t\t<el-col :span=\"12\">\n\t\t\t\t\t\t<el-form-item label=\"设备名称\" prop=\"aeDevicename\">\n\t\t\t\t\t\t\t<el-input v-model=\"dataForm.aeDevicename\"></el-input>\n\t\t\t\t\t\t</el-form-item>\n\t\t\t\t\t</el-col>\n\t\t\t\t\t<el-col :span=\"11\" :offset=\"1\">\n\t\t\t\t\t\t<el-form-item label=\"设备签到类型\" prop=\"aeSigntype\">\n\t\t\t\t\t\t\t<el-select v-model=\"dataForm.aeSigntype\" placeholder=\"请选择\">\n\t\t\t\t\t\t\t\t<el-option v-for=\"item in accessEquipTypeList\" :key=\"item.dictValue\" :label=\"item.dictLabel\" :value=\"item.dictValue\">\n\t\t\t\t\t\t\t\t</el-option>\n\t\t\t\t\t\t\t</el-select>\n\t\t\t\t\t\t</el-form-item>\n\t\t\t\t\t</el-col>\n\t\t\t\t</el-row>\n\t\t\t\t<el-row>\n\t\t\t\t\t<el-col :span=\"12\">\n\t\t\t\t\t\t<el-form-item label=\"设备序列号\" prop=\"aeSerialnumber\">\n\t\t\t\t\t\t\t<el-input v-model=\"dataForm.aeSerialnumber\"></el-input>\n\t\t\t\t\t\t</el-form-item>\n\t\t\t\t\t</el-col>\n\t\t\t\t\t<el-col :span=\"11\" :offset=\"1\">\n\t\t\t\t\t\t<el-form-item label=\"安装位置\" prop=\"dfFloorid\">\n\t\t\t\t\t\t\t<el-cascader v-model=\"dataForm.dfFloorid\" ref=\"floor\" :props=\"{ value: 'df_floorid', label: 'df_floorname'}\"\n\t\t\t\t\t\t\t clearable placeholder=\"请选择\" :options=\"addressList\"></el-cascader>\n\t\t\t\t\t\t</el-form-item>\n\t\t\t\t\t</el-col>\n\t\t\t\t</el-row>\n\t\t\t\t<el-row>\n\t\t\t\t\t<el-col :span=\"12\">\n\t\t\t\t\t\t<el-form-item label=\"有效期\" prop=\"aeExpirydate\">\n\t\t\t\t\t\t\t<el-date-picker v-model=\"dataForm.aeExpirydate\" type=\"date\" value-format=\"yyyy-MM-dd\" placeholder=\"请选择\"></el-date-picker>\n\t\t\t\t\t\t</el-form-item>\n\t\t\t\t\t</el-col>\n\t\t\t\t\t<el-col :span=\"11\" :offset=\"1\">\n\t\t\t\t\t\t<el-form-item label=\"设备类型\" prop=\"aeDevicetype\">\n\t\t\t\t\t\t\t<el-select v-model=\"dataForm.aeDevicetype\" placeholder=\"请选择\">\n\t\t\t\t\t\t\t\t<el-option v-for=\"item in accessDevinceTypeList\" :key=\"item.dictValue\" :label=\"item.dictLabel\" :value=\"item.dictValue\">\n\t\t\t\t\t\t\t\t</el-option>\n\t\t\t\t\t\t\t</el-select>\n\t\t\t\t\t\t</el-form-item>\n\t\t\t\t\t</el-col>\n\t\t\t\t</el-row>\n\t\t\t\t<el-row>\n\t\t\t\t\t<el-col :span=\"12\">\n\t\t\t\t\t\t<el-form-item label=\"设备主板类型\" prop=\"aeMainboard\">\n\t\t\t\t\t\t\t<el-select v-model=\"dataForm.aeMainboard\" placeholder=\"请选择\">\n\t\t\t\t\t\t\t\t<el-option v-for=\"item in eightInchesEquipTypeList\" :key=\"item.dictValue\" :label=\"item.dictLabel\" :value=\"item.dictValue\">\n\t\t\t\t\t\t\t\t</el-option>\n\t\t\t\t\t\t\t</el-select>\n\t\t\t\t\t\t</el-form-item>\n\t\t\t\t\t</el-col>\n\t\t\t\t\t<el-col :span=\"11\" :offset=\"1\" v-if=\"type=='post'\">\n\t\t\t\t\t\t<el-form-item label=\"签名密钥\" prop=\"aeSignkey\">\n\t\t\t\t\t\t\t<el-input v-model=\"dataForm.aeSignkey\"></el-input>\n\t\t\t\t\t\t</el-form-item>\n\t\t\t\t\t</el-col>\n\t\t\t\t</el-row>\n\t\t\t\t<el-row>\n\t\t\t\t\t<el-col>\n\t\t\t\t\t\t<el-form-item label=\"备注\">\n\t\t\t\t\t\t\t<el-input type=\"textarea\" v-model=\"dataForm.remark\" :rows=\"3\" resize=\"none\" placeholder=\"请输入\"></el-input>\n\t\t\t\t\t\t</el-form-item>\n\t\t\t\t\t</el-col>\n\t\t\t\t</el-row>\n\t\t\t\t<el-row>\n\t\t\t\t\t<el-col>\n\t\t\t\t\t\t<el-form-item label=\"部门\">\n\t\t\t\t\t\t\t<el-tree\n\t\t\t\t\t\t\t\t\t:data=\"deptList\"\n\t\t\t\t\t\t\t\t\t:props=\"{ label: 'name', children: 'children' }\"\n\t\t\t\t\t\t\t\t\tnode-key=\"id\"\n\t\t\t\t\t\t\t\t\tref=\"deptListTree\"\n\t\t\t\t\t\t\t\t\taccordion\n\t\t\t\t\t\t\t\t\t:check-strictly=\"true\"\n\t\t\t\t\t\t\t\t\tshow-checkbox>\n\t\t\t\t\t\t\t</el-tree>\n\t\t\t\t\t\t</el-form-item>\n\t\t\t\t\t</el-col>\n\t\t\t\t</el-row>\n\t\t\t</el-form>\n\t\t</div>\n\t\t<div slot=\"footer\">\n\t\t\t<el-button @click=\"dialogVisible = false\">取 消</el-button>\n\t\t\t<el-button type=\"primary\" v-loading=\"loading\" @click=\"submitInfo\">确 定</el-button>\n\t\t</div>\n\t</el-dialog>\n</template>\n<script>\n\timport {\n\t\tgetDictDataList,\n\t\ttreeDataTranslate\n\t} from '@/utils'\n\timport {\n\t\tvalidateIP\n\t} from '@/utils/validate'\n\timport debounce from 'lodash/debounce'\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\tdeptList: [],\n\t\t\t\tdialogVisible: false,\n\t\t\t\tloading: false,\n\t\t\t\ttype: 'post',\n\t\t\t\taddressList: [],\n\t\t\t\tdataForm: {\n\t\t\t\t\taeClientip: '192.168.24.',\n\t\t\t\t\tdfFloorid: [],\n\t\t\t\t\taeClientport: '3639',\n\t\t\t\t\taeSerialnumber: 'NZ53M',\n\t\t\t\t\taeDevicename: '',\n\t\t\t\t\taeSigntype: '1',\n\t\t\t\t\taeExpirydate: new Date(2030, 10, 10),\n\t\t\t\t\taeSignkey: '123456',\n\t\t\t\t\tfloorName: '',\n\t\t\t\t\taeMainboard: '0',\n\t\t\t\t\tremark: ''\n\t\t\t\t},\n\t\t\t\taccessEquipTypeList: getDictDataList('accessEquipType'),\n\t\t\t\taccessDevinceTypeList: getDictDataList('accessDevinceType'),\n\t\t\t\teightInchesEquipTypeList: getDictDataList('eightInchesEquipType'),\n\t\t\t\trules: {\n\t\t\t\t\taeClientip: [{\n\t\t\t\t\t\trequired: true,\n\t\t\t\t\t\tvalidator: validateIP,\n\t\t\t\t\t\ttrigger: ['blur', 'change']\n\t\t\t\t\t}, ],\n\t\t\t\t\tdfFloorid: [{\n\t\t\t\t\t\trequired: true,\n\t\t\t\t\t\tmessage: '请选择',\n\t\t\t\t\t\ttrigger: ['blur', 'change']\n\t\t\t\t\t}],\n\t\t\t\t\taeDeviceid: [{\n\t\t\t\t\t\trequired: true,\n\t\t\t\t\t\tmessage: '请输入',\n\t\t\t\t\t\ttrigger: ['blur', 'change']\n\t\t\t\t\t}, ],\n\t\t\t\t\taeClientport: [{\n\t\t\t\t\t\trequired: true,\n\t\t\t\t\t\tmessage: '请输入',\n\t\t\t\t\t\ttrigger: ['blur', 'change']\n\t\t\t\t\t}, ],\n\t\t\t\t\taeSerialnumber: [{\n\t\t\t\t\t\trequired: true,\n\t\t\t\t\t\tmessage: '请输入',\n\t\t\t\t\t\ttrigger: ['blur', 'change']\n\t\t\t\t\t}],\n\t\t\t\t\taeDevicename: [{\n\t\t\t\t\t\trequired: true,\n\t\t\t\t\t\tmessage: '请输入',\n\t\t\t\t\t\ttrigger: ['blur', 'change']\n\t\t\t\t\t}],\n\t\t\t\t\taeSigntype: [{\n\t\t\t\t\t\trequired: true,\n\t\t\t\t\t\tmessage: '请选择',\n\t\t\t\t\t\ttrigger: ['blur', 'change']\n\t\t\t\t\t}],\n\t\t\t\t\taeExpirydate: [{\n\t\t\t\t\t\trequired: true,\n\t\t\t\t\t\tmessage: '请选择',\n\t\t\t\t\t\ttrigger: ['blur', 'change']\n\t\t\t\t\t}],\n\t\t\t\t\taeSignkey: [{\n\t\t\t\t\t\trequired: true,\n\t\t\t\t\t\tmessage: '请选择',\n\t\t\t\t\t\ttrigger: ['blur', 'change']\n\t\t\t\t\t}],\n\t\t\t\t\taeDevicetype: [{\n\t\t\t\t\t\trequired: true,\n\t\t\t\t\t\tmessage: '请选择',\n\t\t\t\t\t\ttrigger: ['blur', 'change']\n\t\t\t\t\t}],\n\t\t\t\t\taeMainboard: [{\n\t\t\t\t\t\trequired: true,\n\t\t\t\t\t\tmessage: '请选择',\n\t\t\t\t\t\ttrigger: ['blur', 'change']\n\t\t\t\t\t}],\n\t\t\t\t},\n\t\t\t}\n\t\t},\n\t\tmethods: {\n\t\t\t// 获取部门列表\n\t\t\tgetDeptList () {\n\t\t\t\treturn this.$http.get('/sys/dept/list').then(({ data: res }) => {\n\t\t\t\t\tif (res.code !== 0) {\n\t\t\t\t\t\treturn this.$message.error(res.msg)\n\t\t\t\t\t}\n\t\t\t\t\tthis.deptList = res.data\n\t\t\t\t}).catch(() => {})\n\t\t\t},\n\t\t\t// 获取选中的部门列表\n\t\t\tgetDeptCheckList () {\n\t\t\t\treturn this.$http.get('/system/scaidooreight/dept/'+this.dataForm.aeId).then(({ data: res }) => {\n\t\t\t\t\tif (res.code !== 0) {\n\t\t\t\t\t\treturn this.$message.error(res.msg)\n\t\t\t\t\t}\n\t\t\t\t\tthis.dataForm.deptIdList = res.data.map(item => item.deptId);\n\t\t\t\t\tthis.$refs.deptListTree.setCheckedKeys(this.dataForm.deptIdList)\n\t\t\t\t\t//this.deptList = res.data\n\t\t\t\t}).catch(() => {})\n\t\t\t},\n\t\t\tinit(data) {\n\n\t\t\t\tthis.dialogVisible = true;\n\t\t\t\t// 获取最新楼层信息\n\t\t\t\tthis.getAddressList();\n\t\t\t\tthis.getDeptList();\n\t\t\t\t// 编辑\n\t\t\t\tif (data) {\n\t\t\t\t\tthis.type = \"put\";\n\t\t\t\t\tthis.dataForm = {\n\t\t\t\t\t\t...data,\n\t\t\t\t\t\taeSigntype: String(data.aeSigntype),\n\t\t\t\t\t\taeDevicetype: String(data.aeDevicetype),\n\t\t\t\t\t\taeMainboard: String(data.aeMainboard),\n\t\t\t\t\t\tdfFloorid: data.dfFloorid.split(\",\")\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthis.type = \"post\";\n\t\t\t\t\tthis.dataForm = {\n\t\t\t\t\t\taeClientip: '192.168.24.',\n\t\t\t\t\t\tdfFloorid: [],\n\t\t\t\t\t\taeClientport: '3639',\n\t\t\t\t\t\taeSerialnumber: 'NZ53M',\n\t\t\t\t\t\taeDevicename: '',\n\t\t\t\t\t\taeSigntype: '1',\n\t\t\t\t\t\taeExpirydate: new Date(2030, 10, 10),\n\t\t\t\t\t\taeSignkey: '123456',\n\t\t\t\t\t\tfloorName: '',\n\t\t\t\t\t\taeMainboard: '0',\n\t\t\t\t\t\tremark: ''\n\t\t\t\t\t}\n\t\t\t\t\tthis.$nextTick(() => {\n\t\t\t\t\t\tthis.$refs['dataForm'].clearValidate()\n\t\t\t\t\t})\n\t\t\t\t}\n\n\t\t\t\tthis.$nextTick(() => {\n\t\t\t\t\tthis.$refs.deptListTree.setCheckedKeys([]);\n\t\t\t\t})\n\t\t\t\tif (this.dataForm.aeId){\n\t\t\t\t\tthis.getDeptCheckList();\n\t\t\t\t}\n\t\t\t},\n\t\t\tsubmitInfo: debounce(function() {\n\t\t\t\tthis.$refs['dataForm'].validate((valid) => {\n\t\t\t\t\tif (!valid) {\n\t\t\t\t\t\treturn false\n\t\t\t\t\t}\n\t\t\t\t\tthis.loading = true;\n\t\t\t\t\tlet submitData = {\n\t\t\t\t\t\t...this.dataForm,\n\t\t\t\t\t\tdfFloorid: this.dataForm.dfFloorid.join(\",\"),\n\t\t\t\t\t\tdeptIdList:this.$refs.deptListTree.getCheckedKeys()\n\t\t\t\t\t}\n\t\t\t\t\tthis.$http({\n\t\t\t\t\t\turl: \"/system/scaidooreight\",\n\t\t\t\t\t\tmethod: this.type,\n\t\t\t\t\t\tdata: submitData\n\t\t\t\t\t}).then(({\n\t\t\t\t\t\tdata\n\t\t\t\t\t}) => {\n\t\t\t\t\t\tif (data.code != 0) {\n\t\t\t\t\t\t\treturn this.$message.error(data.msg)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.dialogVisible = false;\n\t\t\t\t\t\tif (this.type == 'post') {\n\t\t\t\t\t\t\tthis.$parent.$parent.search();\n\t\t\t\t\t\t\tthis.$parent.$parent.resetForm('ruleForm');\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// this.$parent.$parent.search();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.$message.success(data.msg || '操作成功')\n\t\t\t\t\t}).finally(() => {\n\t\t\t\t\t\tthis.loading = false;\n\t\t\t\t\t})\n\t\t\t\t})\n\n\t\t\t}, 1000),\n\t\t\t// 获取楼栋和楼层的cascader\n\t\t\tgetAddressList() {\n\t\t\t\t// -1是获取所有楼栋\n\t\t\t\tthis.$http.get(`/system/scdormitoryfloor/tree/-1`).then(({\n\t\t\t\t\tdata: res\n\t\t\t\t}) => {\n\t\t\t\t\tif (res.code !== 0) {\n\t\t\t\t\t\treturn this.$message.error(res.msg)\n\t\t\t\t\t}\n\t\t\t\t\tthis.addressList = treeDataTranslate(res.data, 'df_floorid', 'df_parentid')\n\t\t\t\t}).catch(() => {})\n\t\t\t},\n\t\t}\n\t}\n</script>\n<style lang=\"scss\" scoped>\n\t.el-dialog {\n\t\t.el-form {\n\t\t\t.el-form-item {\n\n\t\t\t\t.el-date-editor--date,\n\t\t\t\t.el-cascader,\n\t\t\t\t.el-select {\n\t\t\t\t\twidth: 100%;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n</style>\n"]}]}