1
0
Fork 0
management/front/dkha-web-sz-main/node_modules/.cache/babel-loader/6e48fd10da13b7109ea0d3095c8...

1 line
26 KiB
JSON

{"remainingRequest":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!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":["import \"core-js/modules/es7.object.get-own-property-descriptors\";\nimport \"core-js/modules/web.dom.iterable\";\nimport \"core-js/modules/es6.object.keys\";\nimport \"core-js/modules/es6.regexp.search\";\nimport \"core-js/modules/es6.regexp.split\";\nimport _defineProperty from \"C:\\\\Users\\\\27446\\\\Desktop\\\\up\\\\front\\\\dkha-web-sz-main\\\\node_modules\\\\@babel\\\\runtime-corejs2/helpers/esm/defineProperty\";\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 { getDictDataList, treeDataTranslate } from '@/utils';\nimport { validateIP } from '@/utils/validate';\nimport debounce from 'lodash/debounce';\nexport default {\n data: function data() {\n return {\n deptList: [],\n dialogVisible: false,\n loading: false,\n type: 'post',\n addressList: [],\n dataForm: {\n aeClientip: '192.168.24.',\n dfFloorid: [],\n aeClientport: '3639',\n aeSerialnumber: 'NZ53M',\n aeDevicename: '',\n aeSigntype: '1',\n aeExpirydate: new Date(2030, 10, 10),\n aeSignkey: '123456',\n floorName: '',\n aeMainboard: '0',\n remark: ''\n },\n accessEquipTypeList: getDictDataList('accessEquipType'),\n accessDevinceTypeList: getDictDataList('accessDevinceType'),\n eightInchesEquipTypeList: getDictDataList('eightInchesEquipType'),\n rules: {\n aeClientip: [{\n required: true,\n validator: validateIP,\n trigger: ['blur', 'change']\n }],\n dfFloorid: [{\n required: true,\n message: '请选择',\n trigger: ['blur', 'change']\n }],\n aeDeviceid: [{\n required: true,\n message: '请输入',\n trigger: ['blur', 'change']\n }],\n aeClientport: [{\n required: true,\n message: '请输入',\n trigger: ['blur', 'change']\n }],\n aeSerialnumber: [{\n required: true,\n message: '请输入',\n trigger: ['blur', 'change']\n }],\n aeDevicename: [{\n required: true,\n message: '请输入',\n trigger: ['blur', 'change']\n }],\n aeSigntype: [{\n required: true,\n message: '请选择',\n trigger: ['blur', 'change']\n }],\n aeExpirydate: [{\n required: true,\n message: '请选择',\n trigger: ['blur', 'change']\n }],\n aeSignkey: [{\n required: true,\n message: '请选择',\n trigger: ['blur', 'change']\n }],\n aeDevicetype: [{\n required: true,\n message: '请选择',\n trigger: ['blur', 'change']\n }],\n aeMainboard: [{\n required: true,\n message: '请选择',\n trigger: ['blur', 'change']\n }]\n }\n };\n },\n methods: {\n // 获取部门列表\n getDeptList: function getDeptList() {\n var _this = this;\n\n return this.$http.get('/sys/dept/list').then(function (_ref) {\n var res = _ref.data;\n\n if (res.code !== 0) {\n return _this.$message.error(res.msg);\n }\n\n _this.deptList = res.data;\n }).catch(function () {});\n },\n // 获取选中的部门列表\n getDeptCheckList: function getDeptCheckList() {\n var _this2 = this;\n\n return this.$http.get('/system/scaidooreight/dept/' + this.dataForm.aeId).then(function (_ref2) {\n var res = _ref2.data;\n\n if (res.code !== 0) {\n return _this2.$message.error(res.msg);\n }\n\n _this2.dataForm.deptIdList = res.data.map(function (item) {\n return item.deptId;\n });\n\n _this2.$refs.deptListTree.setCheckedKeys(_this2.dataForm.deptIdList); //this.deptList = res.data\n\n }).catch(function () {});\n },\n init: function init(data) {\n var _this3 = this;\n\n this.dialogVisible = true; // 获取最新楼层信息\n\n this.getAddressList();\n this.getDeptList(); // 编辑\n\n if (data) {\n this.type = \"put\";\n this.dataForm = _objectSpread({}, data, {\n aeSigntype: String(data.aeSigntype),\n aeDevicetype: String(data.aeDevicetype),\n aeMainboard: String(data.aeMainboard),\n dfFloorid: data.dfFloorid.split(\",\")\n });\n } else {\n this.type = \"post\";\n this.dataForm = {\n aeClientip: '192.168.24.',\n dfFloorid: [],\n aeClientport: '3639',\n aeSerialnumber: 'NZ53M',\n aeDevicename: '',\n aeSigntype: '1',\n aeExpirydate: new Date(2030, 10, 10),\n aeSignkey: '123456',\n floorName: '',\n aeMainboard: '0',\n remark: ''\n };\n this.$nextTick(function () {\n _this3.$refs['dataForm'].clearValidate();\n });\n }\n\n this.$nextTick(function () {\n _this3.$refs.deptListTree.setCheckedKeys([]);\n });\n\n if (this.dataForm.aeId) {\n this.getDeptCheckList();\n }\n },\n submitInfo: debounce(function () {\n var _this4 = this;\n\n this.$refs['dataForm'].validate(function (valid) {\n if (!valid) {\n return false;\n }\n\n _this4.loading = true;\n\n var submitData = _objectSpread({}, _this4.dataForm, {\n dfFloorid: _this4.dataForm.dfFloorid.join(\",\"),\n deptIdList: _this4.$refs.deptListTree.getCheckedKeys()\n });\n\n _this4.$http({\n url: \"/system/scaidooreight\",\n method: _this4.type,\n data: submitData\n }).then(function (_ref3) {\n var data = _ref3.data;\n\n if (data.code != 0) {\n return _this4.$message.error(data.msg);\n }\n\n _this4.dialogVisible = false;\n\n if (_this4.type == 'post') {\n _this4.$parent.$parent.search();\n\n _this4.$parent.$parent.resetForm('ruleForm');\n } else {// this.$parent.$parent.search();\n }\n\n _this4.$message.success(data.msg || '操作成功');\n }).finally(function () {\n _this4.loading = false;\n });\n });\n }, 1000),\n // 获取楼栋和楼层的cascader\n getAddressList: function getAddressList() {\n var _this5 = this;\n\n // -1是获取所有楼栋\n this.$http.get(\"/system/scdormitoryfloor/tree/-1\").then(function (_ref4) {\n var res = _ref4.data;\n\n if (res.code !== 0) {\n return _this5.$message.error(res.msg);\n }\n\n _this5.addressList = treeDataTranslate(res.data, 'df_floorid', 'df_parentid');\n }).catch(function () {});\n }\n }\n};",{"version":3,"sources":["access-add-or-update.vue"],"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ACA,IAAA,cApGA,4BAoGA;AAAA;;AACA;AACA,WAAA,KAAA,CAAA,GAAA,qCAAA,IAAA,CAAA,iBAEA;AAAA,YADA,GACA,SADA,IACA;;AACA,YAAA,GAAA,CAAA,IAAA,KAAA,CAAA,EAAA;AACA,iBAAA,MAAA,CAAA,QAAA,CAAA,KAAA,CAAA,GAAA,CAAA,GAAA,CAAA;AACA;;AACA,QAAA,MAAA,CAAA,WAAA,GAAA,iBAAA,CAAA,GAAA,CAAA,IAAA,EAAA,YAAA,EAAA,aAAA,CAAA;AACA,OAPA,EAOA,KAPA,CAOA,YAAA,CAAA,CAPA;AAQA;AA9GA;AAnFA,CAAA","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"],"sourceRoot":"src/views/modules/equipmentManage"}]}