{"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\\components\\modle\\BasicInformationDialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Device\\deviceManage\\components\\modle\\BasicInformationDialog.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":["//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 productManage from '@/api/device/productManage.js';\nimport dictUtils from '@/components/dict/DictSelectUtils.js';\nimport IconDialog from '@/components/dialog/IconDialog.vue';\nimport IconPanl from '@/components/selector/IconPanl.vue';\nimport { mapState } from 'vuex';\nimport utils from '@/hotent-ui-util.js';\nexport default {\n props: {\n parameter: {\n type: Object,\n default: function _default() {\n return;\n }\n }\n },\n name: 'BasicInformationDialog',\n components: {\n IconDialog: IconDialog,\n IconPanl: IconPanl\n },\n data: function data() {\n return {\n visible: false,\n title: '新增',\n activeCollapse1: '1',\n ctlTypeList: '',\n active: 1,\n previewUrl: window.context.portal + '/file/onlinePreviewController/v1/getFileById_',\n uploadUrl: window.context.portal + '/file/v1/fileUpload',\n icon: '',\n deviceTypeList: [],\n //设备类型字段列表\n isIntellectList: [],\n //智能分类字段列表\n typeOptions: [],\n //产品分类数据\n rules: {\n name: [{\n required: true,\n message: '请输入产品名称',\n trigger: 'blur'\n }],\n isIntellect: [{\n required: true,\n message: '请选择智能分类',\n trigger: 'blur'\n }],\n code: [{\n required: true,\n message: '请输入产品编码',\n trigger: 'blur'\n }],\n deviceType: [{\n required: true,\n message: '请选择设备类型',\n trigger: 'blur'\n }]\n }\n };\n },\n created: function created() {\n this.deviceTypeList = dictUtils.getDictItemsFromCache('sblx');\n this.ctlTypeList = dictUtils.getDictItemsFromCache('kjlx');\n this.isIntellectList = dictUtils.getDictItemsFromCache('znfl');\n this.icon = this.previewUrl + this.parameter.icon;\n },\n mounted: function mounted() {\n this.treeType();\n },\n computed: mapState({\n header: function header(state) {\n return {\n Authorization: \"Bearer \".concat(state.login.currentUser.token)\n };\n }\n }),\n methods: {\n clearIcon: function clearIcon() {\n this.parameter.icon = '';\n },\n choseIcon: function choseIcon(icon) {\n this.parameter.icon = icon;\n },\n handleAvatarSuccess: function handleAvatarSuccess(res, file) {\n console.log(res.fileId);\n console.log(this.previewUrl + res.fileId);\n this.$set(this.parameter, 'icon', res.fileId);\n this.icon = this.previewUrl + res.fileId;\n },\n beforeAvatarUpload: function beforeAvatarUpload(file) {\n var isJPG = file.type === 'image/jpeg' || file.type === 'image/png' || file.type === 'image/jpg';\n var isLt1M = file.size / 1024 / 1024 < 1;\n\n if (!isJPG) {\n this.$message.error('上传图片只能是 JPG 格式!');\n }\n\n if (!isLt1M) {\n this.$message.error('上传图片大小不能超过 1MB!');\n }\n\n return isJPG && isLt1M;\n },\n add: function add() {\n this.visible = true;\n console.log(this.parameter, 'ppppppppp');\n this.icon = this.previewUrl + this.parameter.icon;\n },\n treeType: function treeType() {\n var _this = this;\n\n productManage.productType().then(function (res) {\n _this.typeOptions = res.value;\n });\n },\n handleChange: function handleChange(type) {\n if (type == 'fullName') {\n var nodes = this.$refs.cascader.getCheckedNodes();\n console.log(nodes);\n\n if (nodes && nodes.length > 0) {\n this.parameter.typeId = nodes[0].data.id;\n this.parameter.fullId = nodes[0].data.fullId;\n this.parameter.fullName = nodes[0].data.fullName;\n } else {\n this.$refs.cascader.$refs.panel.clearCheckedNodes();\n this.$refs.cascader.$refs.panel.checkedValue = ''; // 清空选中值\n\n this.$refs.cascader.$refs.panel.activePath = ''; // 清除高亮\n\n this.$refs.cascader.$refs.panel.syncActivePath(); // 初始化(只展示一级节点)\n\n this.parameter.fullName = '';\n this.parameter.fullId = '';\n }\n }\n },\n handleSuccess: function handleSuccess(res, file) {\n var portal = window.context.portal;\n var uploadUrl = portal + '/file/v1/uploadFileForConfig';\n console.log(res, 'llllll', file);\n console.log(uploadUrl);\n this.$set(this.parameter, 'icon', res.fileId);\n this.icon = this.previewUrl + res.fileId;\n },\n beforeUpload: function beforeUpload(file) {\n var isJPG = file.type === 'image/jpeg';\n\n if (!isJPG) {\n this.$message.error('上传图片只能是 JPG 格式!');\n }\n\n return isJPG;\n },\n // 保存产品信息\n handleSave: function handleSave() {\n var _this2 = this;\n\n this.$refs.formInfo.validate(function (valid) {\n if (valid) {\n productManage.updateProductInfo(_this2.parameter).then(function (response) {\n console.log(_this2.parameter, '修改');\n\n if (response.state) {\n _this2.$notify({\n type: 'success',\n message: '修改成功',\n duration: 2000\n });\n\n _this2.handleClose();\n\n _this2.$parent.loadData(1);\n } else {}\n });\n } else {\n return false;\n }\n });\n },\n // 关闭新增人员窗口\n handleClose: function handleClose() {\n this.visible = false;\n this.activeCollapse1 = '1';\n }\n }\n};",null]}