{"remainingRequest":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Manage\\material\\MaterialInfoManager.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Manage\\material\\MaterialInfoManager.vue","mtime":1690541169611},{"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//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\r\nimport {mapState} from 'vuex'\r\nimport {dragControllerDiv} from './api/dragControllerDiv'\r\nimport classManage from '@/api/manager/material/materialInfoManage.js'\r\nimport {TableMixin} from '@/mixins/tableMixin'\r\nimport dictUsers from '@/components/dict/DictSelectUtils.js'\r\nimport materialInfoDialog from '@/views/Manage/material/components/MaterialInfoDialog.vue'\r\nimport materialClassDialog from '@/views/Manage/material/components/MaterialClassDialog.vue'\r\n\r\nexport default {\r\n name: 'MaterialInfoManage',\r\n components: {\r\n materialInfoDialog,\r\n materialClassDialog\r\n },\r\n mixins: [TableMixin],\r\n data() {\r\n return {\r\n //携带参数\r\n uploadData: {\r\n mainId: ''\r\n },\r\n sortList: {},\r\n titles: '',\r\n tableData: [],\r\n showFormDias: false,\r\n treeData: [\r\n {\r\n code: '0',\r\n id: '0',\r\n name: '物资分类信息',\r\n parentId: null,\r\n children: []\r\n }\r\n ],\r\n defaultProps: {\r\n value: 'id',\r\n label: 'typeName',\r\n parentId: 'parentId',\r\n code: 'code',\r\n children: 'children'\r\n },\r\n data: [],\r\n treeNode: {\r\n code: '0',\r\n id: '0',\r\n name: '物资分类信息',\r\n parentId: null,\r\n children: []\r\n },\r\n updateTreeNode: null,\r\n url: {\r\n delete: '/manager/material/materialinfo/'\r\n },\r\n sorter: [\r\n {\r\n direction: 'ASC',\r\n property: 'sn_'\r\n }\r\n ],\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: 'warehouse_',\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: 'manufacturer_',\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: 'class_Id_',\r\n relation: 'AND',\r\n value: ''\r\n }\r\n ],\r\n pOptions:[]\r\n }\r\n },\r\n watch: {\r\n filterText(val) {\r\n console.log(val)\r\n this.$refs.tree.filter(val)\r\n }\r\n },\r\n created() {\r\n //在created里面区获取actionUrl\r\n this.actionUrl = window.context.portal\r\n // this.types = dictUsers.getDictItemsFromCache('rylx')\r\n },\r\n mounted() {\r\n dragControllerDiv()\r\n this.$refs['tree'].setCurrentKey('物资分类信息')\r\n this.getTreen()\r\n },\r\n //获取token\r\n computed: mapState({\r\n header: state => {\r\n return {\r\n Authorization: `Bearer ${state.login.currentUser.token}`\r\n }\r\n }\r\n }),\r\n methods: {\r\n //上传成功\r\n handleAvatarSuccess(res, file) {\r\n //提示\r\n this.$notify({\r\n type: 'success',\r\n message: this.$t('domestic.success'),\r\n duration: 2000\r\n })\r\n this.loadData() //调用用页面查询接口,刷新数据\r\n },\r\n //上传失败\r\n handleAvatarError(err, file, fileList) {\r\n //提示\r\n this.$notify({\r\n type: 'error',\r\n message: this.$t('domestic.failure'),\r\n duration: 2000\r\n })\r\n },\r\n //数据导入\r\n importData() {},\r\n //数据导出\r\n exportData() {\r\n let exportParam = {...this.queryParam}\r\n exportParam.pageBean = {\r\n page: 1,\r\n pageSize: -1\r\n }\r\n classManage.materialinfoExport(this.queryParam, res => {})\r\n this.loadData()\r\n },\r\n //模板下载\r\n downloadTemplate() {},\r\n // 树查询\r\n getTreen() {\r\n classManage.loadAllClass({}, res => {\r\n // console.log('======loadAllClass====res======', res.value)\r\n\r\n this.treeData[0].children = res.value\r\n this.$set(this.treeData)\r\n })\r\n },\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)}\r\n >\r\n 新增\r\n \r\n this.upDateinfo(data, node)}\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 reload() {\r\n this.treeData = [\r\n {code: '', id: '0', name: '物资管理', parentId: null, children: []}\r\n ]\r\n this.$set(this.treeData)\r\n this.getTreen()\r\n this.loadData()\r\n },\r\n // 重置\r\n clearQuerys() {\r\n this.querys[0].value = ''\r\n this.querys[1].value = ''\r\n this.querys[2].value = ''\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.sorter = this.sorter\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 // if (this.querys[3].value) {\r\n // this.queryParam.querys.push(this.querys[3])\r\n // }\r\n classManage.materialInfoQuery(this.queryParam).then(res => {\r\n console.log(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 insort(id, num) {\r\n // console.log(id, num)\r\n this.sortList[id] = num\r\n // console.log(this.sortList)\r\n },\r\n // insortAdd() {\r\n // //排序保存\r\n // classManage.updateSequenceClass(this.sortList).then(res => {\r\n // // console.log(res)\r\n // this.loadData()\r\n // })\r\n // },\r\n handleAdd() {\r\n // 新增物资信息\r\n if (this.treeNode.id == 0) {\r\n this.$message.warning('请选择分类!')\r\n return\r\n }\r\n this.$refs.formModal.add(this.treeNode)\r\n },\r\n handleNodeClick(data, node, t) {\r\n // 点击分类树节点\r\n this.treeNode = data\r\n if (data.id === '0') {\r\n this.querys[2].value = ''\r\n this.loadData(1)\r\n } else {\r\n this.querys[2].value = this.treeNode.id\r\n this.loadData(1)\r\n }\r\n },\r\n closeFormDiaos() {\r\n this.showFormDias = false\r\n this.getTreen()\r\n this.loadData()\r\n },\r\n // 删除分类信息\r\n remove(data) {\r\n this.$confirm('确定删除选中数据?', '提示', {\r\n confirmButtonText: '确 定',\r\n cancelButtonText: '取 消',\r\n type: 'warning'\r\n })\r\n .then(() => {\r\n classManage.deleteClass(data.id, res => {\r\n if (res.state) {\r\n this.$notify({\r\n type: 'success',\r\n message: '删除成功',\r\n duration: 2000\r\n })\r\n this.queryParam.pageBean.page = 1\r\n // this.loadData()\r\n this.getTreen()\r\n this.$set(this.treeData, this.treeData, this.treeData)\r\n } else {\r\n this.$notify({\r\n type: 'error',\r\n message: res.message,\r\n duration: 2000,\r\n offset: 80\r\n })\r\n }\r\n })\r\n })\r\n .catch(() => {})\r\n },\r\n append(data) {\r\n this.pOptions = [data]\r\n // 新增分类信息\r\n this.titles = '新增'\r\n this.updateTreeNode = {}\r\n this.showFormDias = true\r\n },\r\n upDateinfo(data, node) {\r\n // 修改分类信息\r\n this.titles = '修改'\r\n this.pOptions = [data]\r\n if (node.parent && node.parent.data) {\r\n this.updateTreeNode = {...data, parentId: node.parent.data.id}\r\n } else {\r\n this.updateTreeNode = data\r\n }\r\n this.showFormDias = true\r\n }\r\n }\r\n}\r\n",null]}