{"remainingRequest":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Device\\resourceManage\\components\\regionManageDialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Device\\resourceManage\\components\\regionManageDialog.vue","mtime":1688548248741},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"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//\nimport resourceManage from '@/api/device/resourceManage.js';\nimport utils from '@/hotent-ui-util.js';\nimport dictUtils from '@/components/dict/DictSelectUtils.js';\nimport { ExtendParamsMixin } from '@/mixins/extendParams.js';\nexport default {\n name: 'regionManageModal',\n mixins: [ExtendParamsMixin],\n data: function data() {\n return {\n visible: false,\n title: '新增',\n activeCollapse: '1',\n params: {\n name: '',\n code: '',\n type: 5,\n memo: '',\n shortName: ''\n },\n areaType: [],\n //区域类型\n areaTypeFilter: [],\n //区域类型过滤 根据父级节点类型过滤\n rules: {\n name: [{\n required: true,\n message: '请输入区域名称',\n trigger: 'blur'\n }],\n code: [{\n required: true,\n message: '请输入区域编码',\n trigger: 'blur'\n }],\n shortName: [{\n required: true,\n message: '请输入区域简称',\n trigger: 'blur'\n }] // type: [{\n // \trequired: true,\n // \tmessage: '请输入区域类型',\n // \ttrigger: 'blur',\n // }, ],\n\n },\n parentRow: {}\n };\n },\n created: function created() {},\n methods: {\n changeType: function changeType() {\n this.$forceUpdate();\n },\n add: function add(treeNode) {\n this.areaType = dictUtils.getDictItemsFromCache('qylx');\n this.parentRow = utils.deepClone(treeNode);\n this.visible = true;\n },\n edit: function edit(row, treeNode) {\n this.areaType = dictUtils.getDictItemsFromCache('qylx');\n this.parentRow = utils.deepClone(treeNode);\n this.params = utils.deepClone(row);\n this.visible = true;\n this.title = '修改';\n },\n // setAreaType(parentRow) {\n // this.parentRow = utils.deepClone(parentRow)\n // if (this.parentRow.type == '1') {\n // this.areaTypeFilter = this.areaType.slice(0)\n // } else if (this.parentRow.type == '2') {\n // this.areaTypeFilter = this.areaType.slice(1)\n // } else if (this.parentRow.type == '3') {\n // this.areaTypeFilter = this.areaType.slice(2)\n // } else if (this.parentRow.type == '4') {\n // this.areaTypeFilter = this.areaType.slice(3)\n // } else if (this.parentRow.type == '5') {\n // this.areaTypeFilter = this.areaType.slice(4)\n // }\n // this.params.type = this.areaTypeFilter[0].value\n // },\n handleClose: function handleClose() {\n this.params = {\n name: '',\n code: '',\n type: 5,\n memo: '',\n shortName: ''\n };\n this.title = '新增';\n this.visible = false;\n this.activeCollapse = '1';\n },\n handleSave: function handleSave() {\n var _this = this;\n\n this.$refs.formInfo.validate(function (valid) {\n if (valid) {\n var tempData = utils.deepClone(_this.params);\n\n if (!tempData.parentId) {\n tempData.parentId = _this.parentRow.id;\n }\n\n var method;\n\n if (_this.title === '新增') {\n method = resourceManage.addArea;\n } else if (_this.title === '修改') {\n method = resourceManage.editArea;\n }\n\n method(tempData, function (response) {\n if (response.state) {\n _this.$notify({\n type: 'success',\n message: _this.title + '成功',\n duration: 2000\n });\n\n _this.handleClose();\n\n _this.$emit('reload');\n } else {\n _this.$message.warning(response.message);\n }\n });\n } else {\n _this.$notify({\n type: 'warning',\n message: '请完善表单信息!',\n duration: 2000\n });\n }\n });\n }\n }\n};",null]}