{"remainingRequest":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Device\\deviceManage\\ProductType.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Device\\deviceManage\\ProductType.vue","mtime":1686792516218},{"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\nimport {\n\tTableMixin\n} from '@/mixins/tableMixin'\nimport {dragControllerDiv} from '@/mixins/dragControllerDiv'\nimport dictContracts from '@/components/dict/DictSelectUtils.js'\nimport productType from '@/api/device/productType.js'\nimport productTypeDialog from '@/views/Device/deviceManage/components/productTypeDialog'\n\nexport default {\n\tname: 'ProductType',\n\tmixins: [TableMixin],\n\tcomponents: {\n\t\tproductTypeDialog\n\t},\n\tdata() {\n\t\treturn {\n\t\t\turl: {\n\t\t\t\tdelete: '/device/product/type/'\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\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: 'code',\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: ''\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t},\n\tcreated() {\n\t\tthis.getTreen()\n\t},\n\tmounted() {\n\t\tdragControllerDiv()\n\t\t// this.$refs['tree'].setCurrentKey('产品分类')\n\t},\n\tmethods: {\n\t\t// 产品组织树查询\n\t\tgetTreen() {\n\t\t\tproductType.productType({\n\t\t\t\tid: '0'\n\t\t\t}).then(res => {\n\t\t\t\tthis.treeData = res.value\n\t\t\t\tthis.$set(this.treeData)\n\t\t\t})\n\t\t},\n\t\t// 重置\n\t\tclearQuerys() {\n\t\t\tthis.querys[0].value = ''\n\t\t\tthis.querys[1].value = ''\n\t\t},\n\t\treload() {\n\t\t\tthis.treeData = []\n\t\t\tthis.$set(this.treeData)\n\t\t\tthis.getTreen()\n\t\t\tthis.loadData()\n\t\t},\n\t\thandleUpdate(row) {\n\t\t\tthis.$refs.formModal.edit(row, this.treeNode)\n\t\t},\n\t\t// 获取产品类型list\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\tproductType.typeList(this.queryParam, res => {\n\t\t\t\t// console.log(res, '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\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\tthis.$refs.formModal.add(this.treeNode)\n\t\t},\n\t\thandleNodeClick(data) {\n\t\t\tthis.treeNode = data\n\t\t\tif (data.id == '0') {\n\t\t\t\tthis.querys[2].value = this.treeNode.code\n\t\t\t\tthis.loadData(1)\n\t\t\t} else {\n\t\t\t\tthis.querys[2].value = this.treeNode.id\n\t\t\t\tthis.loadData(1)\n\t\t\t}\n\t\t},\n\t\t// 批量删除产品类型\n\t\thandleDelete() {\n\t\t\tproductType\n\t\t\t\t.removeProductType(this.multipleSelection)\n\t\t\t\t.then(res => {\n\t\t\t\t\tif (res.state) {\n\t\t\t\t\t\tthis.$notify({\n\t\t\t\t\t\t\ttype: 'success',\n\t\t\t\t\t\t\tmessage: '删除成功',\n\t\t\t\t\t\t\tduration: 2000\n\t\t\t\t\t\t})\n\t\t\t\t\t\tthis.queryParam.pageBean.page = 1\n\t\t\t\t\t\tthis.loadData()\n\t\t\t\t\t\tthis.getTreen()\n\t\t\t\t\t\tthis.$set(this.treeData, this.treeData, this.treeData)\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t.catch(res => {\n\t\t\t\t\tthis.$notify({\n\t\t\t\t\t\ttype: 'error',\n\t\t\t\t\t\tmessage: res.message,\n\t\t\t\t\t\tduration: 2000,\n\t\t\t\t\t\toffset: 80\n\t\t\t\t\t})\n\t\t\t\t})\n\t\t}\n\t}\n}\n",null]}