{"remainingRequest":"D:\\jenkins\\workspace\\examine-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\examine-fvue\\src\\views\\zlMenu\\zlflMenu.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\examine-fvue\\src\\views\\zlMenu\\zlflMenu.vue","mtime":1675656016347},{"path":"D:\\jenkins\\workspace\\examine-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\examine-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\examine-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\r\nimport zlflMenu from '@/api/examination/zlflMenu.js'\r\nimport { TableMixin } from '@/mixins/tableMixin'\r\nimport zlflMenuDialog from './components/zlflMenuDialog.vue'\r\nimport dictUtils from '@/components/dict/DictSelectUtils.js'\r\nexport default {\r\n name: 'equSysMenu',\r\n components: {\r\n zlflMenuDialog\r\n },\r\n mixins: [TableMixin],\r\n data() {\r\n return {\r\n\t\t\turl: {\r\n\t\t\t delete: '/exam/materialType/type/'\r\n\t\t\t}, \r\n search: '',\r\n tableData: [],\r\n treeData: [],\r\n defaultProps: {\r\n children: 'children',\r\n label: 'name'\r\n },\r\n\t\t\tparentId:null,//上级id\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: 'EQUAL',\r\n parentGroup: '',\r\n property: 'parentId',\r\n relation: 'AND',\r\n value: ''\r\n }\r\n ],\r\n\t\t\tfilterText: '',\r\n\t\t\texpandAll:false\r\n }\r\n },\r\n\twatch: {\r\n\t\tfilterText(val) {\r\n\t\t\tthis.$refs.tree.filter(val);\r\n\t\t}\r\n\t},\r\n created() {\r\n this.getTreen()\r\n },\r\n mounted() { },\r\n methods: {\r\n\t\texpandHandle() {\r\n\t\t console.log(this.$refs.tree.store);\r\n\t\t this.expandAll = !this.expandAll;\r\n\t\t this.expandNodes(this.$refs.tree.store.root);\r\n\t\t },\r\n\t\t // 遍历树形数据,设置每一项的expanded属性,实现展开收起\r\n\t\t expandNodes(node) {\r\n\t\t node.expanded = this.expandAll;\r\n\t\t for (let i = 0; i < node.childNodes.length; i++) {\r\n\t\t node.childNodes[i].expanded = this.expandAll;\r\n\t\t if (node.childNodes[i].childNodes.length > 0) {\r\n\t\t this.expandNodes(node.childNodes[i]);\r\n\t\t }\r\n\t\t }\r\n\t\t },\r\n\t\tfilterNode(value, data) {\r\n\t\t\t// console.log(data);\r\n\t\t\tif (!value) return true;\r\n\t\t\treturn data.name.indexOf(value) !== -1;\r\n\t\t},\r\n\t\thandleAdd() {\r\n\t\t this.$refs.formModal.add(this.parentId)\r\n\t\t},\r\n // 授权按钮\r\n Empower(index, item) {\r\n this.$refs.powerModal.add(item)\r\n },\r\n reload() {\r\n this.treeData = []\r\n this.$set(this.treeData)\r\n this.getTreen()\r\n this.loadData()\r\n },\r\n renderContent(h, { node, data, store }) {\r\n return (\r\n {\r\n this.show = true\r\n }}\r\n on-mouseout={() => {\r\n this.show = false\r\n }}\r\n >\r\n {data.name}\r\n \r\n \r\n this.append(data, 'son')}\r\n >\r\n 新增\r\n \r\n this.upDateinfo(data, '')}\r\n >\r\n 修改\r\n \r\n this.remove(data)}\r\n >\r\n 删除\r\n \r\n \r\n \r\n \r\n \r\n )\r\n },\r\n append(data, type) {\r\n if (type != 'father') {\r\n this.$refs.formModal.add(data)\r\n } else {\r\n this.$refs.formModal.add(data)\r\n }\r\n },\r\n upDateinfo(data, type) {\r\n this.$refs.formModal.edit(data)\r\n },\r\n // 删除装备系统类型\r\n remove(item) {\r\n this.$confirm('确定删除选中数据?', '提示', {\r\n distinguishCancelAndClose: true,\r\n confirmButtonText: '确 定',\r\n cancelButtonText: '取 消',\r\n type: 'warning'\r\n })\r\n .then(() => {\r\n zlflMenu.deleteOneEqeSys(item.id).then(res => {\r\n if (res.data.state) {\r\n this.$notify({\r\n type: 'success',\r\n message: '删除成功',\r\n duration: 2000\r\n })\r\n this.getTreen()\r\n this.loadData(1)\r\n }\r\n })\r\n })\r\n .catch(action => {\r\n this.$notify({\r\n type: 'info',\r\n message: action === 'cancel' ? '已取消删除' : '停留在当前页面'\r\n })\r\n })\r\n },\r\n // 重置\r\n clearQuerys() {\r\n this.querys[0].value = ''\r\n this.loadData(1)\r\n },\r\n // 获取list\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 zlflMenu.getMaterial(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 getTreen() {\r\n zlflMenu.getMaterTree({ id: '0' }, res => {\r\n this.treeData = res.value\r\n this.$set(this.treeData)\r\n })\r\n },\r\n searchName() {\r\n let querys = {\r\n name: ''\r\n }\r\n querys.name = this.search\r\n zlflMenu.getMaterTree(querys, res => {\r\n this.treeData = res.value\r\n this.$set(this.treeData)\r\n })\r\n },\r\n // 点击树查看数据\r\n handleNodeClick(data) {\r\n this.parentId = data.id\r\n if (data.id == '0') {\r\n this.querys[1].value = ''\r\n this.loadData(1)\r\n } else {\r\n this.querys[1].value = this.parentId \r\n this.loadData(1)\r\n }\r\n },\r\n\r\n\r\n }\r\n}\r\n",null]}