{"remainingRequest":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Device\\resourceManage\\RegionManage.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Device\\resourceManage\\RegionManage.vue","mtime":1686792516249},{"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//\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\tdragControllerDiv\n} from '@/mixins/dragControllerDiv'\nimport {\n\tTableMixin\n} from '@/mixins/tableMixin'\nimport regionManageDialog from '@/views/Device/resourceManage/components/regionManageDialog'\nimport resourceManage from '@/api/device/resourceManage.js'\nimport dictUtils from '@/components/dict/DictSelectUtils.js'\nexport default {\n\tname: 'RegionManage',\n\tcomponents: {\n\t\tregionManageDialog\n\t},\n\tmixins: [TableMixin],\n\tdata() {\n\t\treturn {\n\t\t\turl: {\n\t\t\t\tdelete: '/device/baseArea/'\n\t\t\t},\n\t\t\tareaType: [],\n\t\t\tquerys: [{\n\t\t\t\t\tgroup: 'main',\n\t\t\t\t\toperation: 'LIKE',\n\t\t\t\t\tparentGroup: '',\n\t\t\t\t\tproperty: 'name',\n\t\t\t\t\trelation: 'AND',\n\t\t\t\t\tvalue: ''\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tgroup: 'main',\n\t\t\t\t\toperation: 'EQUAL',\n\t\t\t\t\tparentGroup: '',\n\t\t\t\t\tproperty: 'type',\n\t\t\t\t\trelation: 'AND',\n\t\t\t\t\tvalue: ''\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tgroup: 'main',\n\t\t\t\t\toperation: 'EQUAL',\n\t\t\t\t\tparentGroup: '',\n\t\t\t\t\tproperty: 'parentId',\n\t\t\t\t\trelation: 'AND',\n\t\t\t\t\tvalue: '0'\n\t\t\t\t}\n\t\t\t],\n\t\t\ttreeData: [],\n\t\t\tdefaultProps: {\n\t\t\t\tchildren: 'children',\n\t\t\t\tlabel: 'name'\n\t\t\t},\n\t\t\ttreeNode: {\n\t\t\t\tcode: '',\n\t\t\t\tid: 0,\n\t\t\t\tname: '区域管理',\n\t\t\t\ttype: 0,\n\t\t\t\tchildren: []\n\t\t\t}\n\t\t}\n\t},\n\tcreated() {\n\t\tthis.areaType = dictUtils.getDictItemsFromCache('qylx')\n\t},\n\tmounted() {\n\t\tdragControllerDiv()\n\t\tthis.loadTree()\n\t},\n\tmethods: {\n\t\treload() {\n\t\t\tthis.treeData = [\n\n\t\t\t]\n\t\t\tthis.$set(this.treeData)\n\t\t\tthis.loadTree()\n\t\t\tthis.loadData()\n\t\t},\n\t\thandleAdd() {\n\t\t\t// if (this.treeNode.type == 0) {\n\t\t\t// this.$message.warning('请选择上级区域!')\n\t\t\t// return\n\t\t\t// }\n\t\t\t// if (this.treeNode.type == 5) {\n\t\t\t// this.$message.warning('监测点不可新增下级区域!')\n\t\t\t// return\n\t\t\t// }\n\t\t\tthis.$refs.formModal.add(this.treeNode)\n\t\t},\n\t\thandleUpdate(row) {\n\t\t\tthis.$refs.formModal.edit(row, this.treeNode)\n\t\t},\n\t\thandleNodeClick(data) {\n\t\t\tthis.treeNode = data\n\t\t\tthis.querys[2].value = this.treeNode.id\n\t\t\tthis.loadData(1)\n\t\t},\n\t\tclearQuerys() {\n\t\t\tthis.querys[0].value = ''\n\t\t\tthis.querys[1].value = ''\n\t\t\tthis.querys[2].value = ''\n\t\t},\n\t\tformatData(rows) {\n\t\t\trows.forEach(row => {\n\t\t\t\tlet types = row.areaType.split(',')\n\t\t\t\tlet temp = types.map(item => {\n\t\t\t\t\tlet name\n\t\t\t\t\tthis.areaType.forEach(dictItem => {\n\t\t\t\t\t\tif (dictItem.value == item) {\n\t\t\t\t\t\t\tname = dictItem.name\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t\treturn name\n\t\t\t\t})\n\t\t\t\trow.areaTypeShow = temp\n\t\t\t})\n\t\t\treturn rows\n\t\t},\n\t\tloadTree() {\n\t\t\tresourceManage.loadAreaTree({\n\t\t\t\tid: '0'\n\t\t\t}, res => {\n\t\t\t\tthis.treeData = res.value // this.formatData(res.rows)\n\t\t\t\tthis.$set(this.treeData)\n\t\t\t})\n\t\t},\n\t\tloadData(page) {\n\t\t\tif (page) {\n\t\t\t\tthis.queryParam.pageBean.page = page\n\t\t\t}\n\t\t\tthis.loading = true\n\t\t\tthis.tableData = []\n\t\t\tthis.queryParam.querys = []\n\t\t\tif (this.querys[0].value) {\n\t\t\t\tthis.queryParam.querys.push(this.querys[0])\n\t\t\t}\n\t\t\tif (this.querys[1].value) {\n\t\t\t\tthis.queryParam.querys.push(this.querys[1])\n\t\t\t}\n\t\t\tif (this.querys[2].value) {\n\t\t\t\tthis.queryParam.querys.push(this.querys[2])\n\t\t\t}\n\t\t\tresourceManage.loadArea(this.queryParam, res => {\n\t\t\t\tthis.total = res.total\n\t\t\t\tthis.tableData = res.rows\n\t\t\t\tthis.$set(this.tableData)\n\t\t\t\tthis.loading = false\n\t\t\t})\n\t\t}\n\t}\n}\n",null]}