{"remainingRequest":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Device\\deviceManage\\ProductManage.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Device\\deviceManage\\ProductManage.vue","mtime":1687336502346},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"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":["import \"core-js/modules/es6.regexp.split\";\nimport \"core-js/modules/web.dom.iterable\";\nimport \"core-js/modules/es6.function.name\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 { TableMixin } from '@/mixins/tableMixin';\nimport { dragControllerDiv } from '@/mixins/dragControllerDiv';\nimport productManage from '@/api/device/productManage.js';\nimport dictUtils from '@/components/dict/DictSelectUtils.js';\nimport productOrgDialog from '@/views/Device/deviceManage/components/productOrgDialog';\nimport productOrgUpdateDialog from '@/views/Device/deviceManage/components/productOrgUpdateDialog';\nimport productManageDialog from '@/views/Device/deviceManage/components/productManageDialog';\nexport default {\n name: 'productManage',\n components: {\n productOrgDialog: productOrgDialog,\n productOrgUpdateDialog: productOrgUpdateDialog,\n productManageDialog: productManageDialog\n },\n mixins: [TableMixin],\n data: function data() {\n return {\n titles: '',\n titleUp: '',\n tableData: [],\n showFormDias: false,\n showFormDiaUp: false,\n //修改产品类型\n treeData: [],\n defaultProps: {\n children: 'children',\n label: 'name'\n },\n previewUrl: window.context.portal + '/file/onlinePreviewController/v1/getFileById_',\n //图标预览\n treeNode: {\n code: '',\n id: '0',\n name: '产品管理',\n type: 0,\n children: []\n },\n pId: '',\n url: {\n delete: '/device/product/info/'\n },\n // 删除产品信息\n querys: [{\n group: 'main',\n operation: 'LIKE',\n parentGroup: '',\n property: 'name',\n relation: 'AND',\n value: ''\n }, {\n group: 'main',\n operation: 'EQUAL',\n parentGroup: '',\n property: 'code',\n relation: 'AND',\n value: ''\n }, {\n group: 'main',\n operation: 'EQUAL',\n parentGroup: '',\n property: 'deviceType',\n relation: 'AND',\n value: ''\n }, {\n group: 'main',\n operation: 'EQUAL',\n parentGroup: '',\n property: 'typeId',\n relation: 'AND',\n value: ''\n }],\n deviceTypeList: [],\n //设备类型字段列表\n isIntellectList: [] //智能分类字段列表\n\n };\n },\n watch: {\n filterText: function filterText(val) {\n this.$refs.tree.filter(val);\n }\n },\n created: function created() {\n this.deviceTypeList = dictUtils.getDictItemsFromCache('sblx');\n this.isIntellectList = dictUtils.getDictItemsFromCache('znfl');\n },\n mounted: function mounted() {\n dragControllerDiv();\n this.getTreen();\n },\n methods: {\n // 产品组织树查询\n getTreen: function getTreen() {\n var _this = this;\n\n productManage.productType().then(function (res) {\n _this.treeData = res.value;\n\n _this.$set(_this.treeData);\n });\n },\n toProductDetails: function toProductDetails(val) {\n var path = this.$route.path;\n\n if (path.indexOf('frontPlat') !== -1) {\n this.$router.push({\n name: 'ProductDetails',\n query: {\n id: val.id,\n name: val.name\n }\n });\n } else {\n this.$router.push({\n name: 'ProductDetailsLink',\n query: {\n id: val.id,\n name: val.name\n }\n });\n }\n },\n // renderContent(h, {node, data, store}) {\n // return (\n // {\n // this.show = true\n // }}\n // on-mouseout={() => {\n // this.show = false\n // }}\n // >\n // {data.name}\n // \n // \n // this.append(data, 'son')}\n // >\n // 新增\n // \n // this.upDateinfo(data, '')}\n // >\n // 修改\n // \n // this.remove(data)}\n // >\n // 删除\n // \n // \n // \n // \n // \n // )\n // },\n reload: function reload() {\n this.treeData = [];\n this.$set(this.treeData);\n this.getTreen();\n this.loadData();\n },\n filterNode: function filterNode(value, data) {\n if (!value) return true;\n return data.name.indexOf(value) !== -1;\n },\n // 获取产品信息\n loadData: function loadData(page) {\n var _this2 = this;\n\n if (page) {\n this.queryParam.pageBean.page = page;\n }\n\n this.loading = true;\n this.tableData = [];\n this.queryParam.querys = [];\n\n if (this.querys[0].value) {\n this.queryParam.querys.push(this.querys[0]);\n }\n\n if (this.querys[1].value) {\n this.queryParam.querys.push(this.querys[1]);\n }\n\n if (this.querys[2].value) {\n this.queryParam.querys.push(this.querys[2]);\n }\n\n if (this.querys[3].value) {\n this.queryParam.querys.push(this.querys[3]);\n }\n\n productManage.productInfo(this.queryParam).then(function (res) {\n // console.log(res)\n _this2.total = res.total;\n _this2.tableData = res.rows;\n\n _this2.tableData.forEach(function (item) {\n var arr = item.fullName.split('/');\n\n for (var index = 0; index < arr.length; index++) {\n if (arr[index] == item.name) {\n return item['fullName'] = arr[index - 1];\n }\n }\n });\n\n _this2.tableData.forEach(function (item) {\n _this2.isIntellectList.forEach(function (val) {\n if (item.isIntellect == val.value) {\n item['isIntellect'] = val.name;\n }\n });\n });\n\n _this2.tableData.forEach(function (item) {\n _this2.deviceTypeList.forEach(function (val) {\n if (item.deviceType == val.value) {\n item['deviceType'] = val.name;\n }\n });\n });\n\n _this2.$set(_this2.tableData);\n\n _this2.loading = false;\n });\n },\n handleAdd: function handleAdd() {\n if (this.treeNode.type == 0) {\n this.$message.warning('请选择产品类型!');\n return;\n }\n\n this.$refs.formModal.add(this.treeNode);\n },\n // 重置\n clearQuerys: function clearQuerys() {\n this.querys[0].value = '';\n this.querys[1].value = '';\n this.querys[2].value = '';\n },\n append: function append(data, type) {\n this.showFormDias = true;\n\n if (type != 'father') {\n this.titles = '新增';\n this.showFormDias = true;\n this.pId = data.id;\n } else {\n this.titles = '新增';\n this.showFormDias = true;\n }\n },\n upDateinfo: function upDateinfo(data, type) {\n this.titleUp = '修改';\n this.showFormDiaUp = true;\n this.pId = data.id;\n },\n // 关闭新增产品类型窗口\n closeFormDiaos: function closeFormDiaos() {\n this.showFormDias = false;\n this.getTreen();\n this.loadData();\n },\n // 关闭修改产品类型窗口\n closeFormDiaoUp: function closeFormDiaoUp() {\n this.showFormDiaUp = false;\n this.getTreen();\n this.loadData();\n },\n // 删除产品类型\n remove: function remove(data) {\n var _this3 = this;\n\n this.$confirm('确定删除选中数据?', '提示', {\n confirmButtonText: '确 定',\n cancelButtonText: '取 消',\n type: 'warning'\n }).then(function () {\n productManage.removeProductType(data.id).then(function (res) {\n if (res.state) {\n _this3.$notify({\n type: 'success',\n message: '删除成功',\n duration: 2000\n });\n\n _this3.queryParam.pageBean.page = 1;\n\n _this3.loadData();\n\n _this3.getTreen();\n\n _this3.$set(_this3.treeData, _this3.treeData, _this3.treeData);\n }\n }).catch(function (res) {\n _this3.$notify({\n type: 'error',\n message: res.message,\n duration: 2000,\n offset: 80\n });\n });\n }).catch(function () {});\n },\n handleNodeClick: function handleNodeClick(data) {\n this.treeNode = data;\n\n if (data.id == '0') {\n this.querys[3].value = this.treeNode.code;\n this.loadData(1);\n } else {\n this.querys[3].value = this.treeNode.id;\n this.loadData(1);\n }\n },\n handleRelease: function handleRelease(row) {\n var _this4 = this;\n\n // let params={\n // \tid:row.id,\n // \tpublishStatus:row.publishStatus\n // }\n var publishStatus = row.publishStatus == 1 ? 0 : 1;\n var formData = new FormData();\n formData.append('id', row.id);\n formData.append('publishStatus', publishStatus);\n var config = {\n headers: {\n 'Content-Type': 'multipart/form-data'\n }\n };\n this.$http.post(window.context.portal + \"/device/product/info/publish\", formData, config).then(function (res) {\n if (res.data.state) {\n _this4.$message.success(\"\".concat(row.publishStatus == 0 ? '发布' : '下架', \"\\u6210\\u529F\"));\n\n _this4.loadData(1);\n }\n });\n }\n }\n};",null]}