{"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":["\n\n\n"]}]}