{"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":1692168359236},{"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//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\r\nimport {dragControllerDiv} from '@/mixins/dragControllerDiv'\r\nimport {TableMixin} from '@/mixins/tableMixin'\r\nimport regionManageDialog from '@/views/Device/resourceManage/components/regionManageDialog'\r\nimport resourceManage from '@/api/device/resourceManage.js'\r\nimport dictUtils from '@/components/dict/DictSelectUtils.js'\r\nexport default {\r\n name: 'RegionManage',\r\n components: {\r\n regionManageDialog,\r\n },\r\n mixins: [TableMixin],\r\n data() {\r\n return {\r\n url: {\r\n delete: '/device/baseArea/',\r\n },\r\n areaType: [],\r\n querys: [\r\n {\r\n group: 'main',\r\n operation: 'LIKE',\r\n parentGroup: '',\r\n property: 'name',\r\n relation: 'AND',\r\n value: '',\r\n },\r\n {\r\n group: 'main',\r\n operation: 'LIKE',\r\n parentGroup: '',\r\n property: 'code',\r\n relation: 'AND',\r\n value: '',\r\n },\r\n {\r\n group: 'main',\r\n operation: 'EQUAL',\r\n parentGroup: '',\r\n property: 'parentId',\r\n relation: 'AND',\r\n value: '0',\r\n },\r\n ],\r\n treeData: [],\r\n defaultProps: {\r\n children: 'children',\r\n label: 'name',\r\n },\r\n treeNode: null,\r\n }\r\n },\r\n created() {\r\n this.areaType = dictUtils.getDictItemsFromCache('qylx')\r\n },\r\n mounted() {\r\n dragControllerDiv()\r\n this.loadTree()\r\n },\r\n methods: {\r\n handleDeleteAfter() {\r\n this.loadTree()\r\n },\r\n reload() {\r\n this.treeNode = null\r\n this.loadTree()\r\n this.loadData()\r\n },\r\n handleAdd() {\r\n if (!this.treeNode) {\r\n this.$message.warning('请选择上级区域!')\r\n return\r\n }\r\n this.$refs.formModal.add(this.treeNode)\r\n },\r\n handleUpdate(row) {\r\n this.$refs.formModal.edit(row, this.treeNode)\r\n },\r\n handleNodeClick(data) {\r\n this.treeNode = data\r\n this.querys[2].value = this.treeNode.id\r\n this.loadData(1)\r\n },\r\n clearQuerys() {\r\n this.querys[0].value = ''\r\n this.querys[1].value = ''\r\n this.querys[2].value = this.querys[2].value\r\n ? this.querys[2].value\r\n : 0\r\n },\r\n formatData(rows) {\r\n rows.forEach((row) => {\r\n let types = row.areaType.split(',')\r\n let temp = types.map((item) => {\r\n let name\r\n this.areaType.forEach((dictItem) => {\r\n if (dictItem.value == item) {\r\n name = dictItem.name\r\n }\r\n })\r\n return name\r\n })\r\n row.areaTypeShow = temp\r\n })\r\n return rows\r\n },\r\n loadTree() {\r\n this.treeData = []\r\n resourceManage.loadAreaTree(\r\n {\r\n id: '0',\r\n },\r\n (res) => {\r\n this.treeData = res.value // this.formatData(res.rows)\r\n this.$set(this.treeData)\r\n }\r\n )\r\n },\r\n loadData(page) {\r\n if (page) {\r\n this.queryParam.pageBean.page = page\r\n }\r\n this.loading = true\r\n this.tableData = []\r\n this.queryParam.querys = []\r\n if (this.querys[0].value) {\r\n this.queryParam.querys.push(this.querys[0])\r\n }\r\n if (this.querys[1].value) {\r\n this.queryParam.querys.push(this.querys[1])\r\n }\r\n if (this.querys[2].value) {\r\n this.queryParam.querys.push(this.querys[2])\r\n }\r\n this.queryParam.sorter = [{direction: 'ASC', property: 'sn_'}]\r\n resourceManage.loadArea(this.queryParam, (res) => {\r\n this.total = res.total\r\n this.tableData = res.rows\r\n this.$set(this.tableData)\r\n this.loading = false\r\n })\r\n },\r\n },\r\n}\r\n",null]}