{"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\\productTypeDialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Device\\deviceManage\\components\\productTypeDialog.vue","mtime":1686644136983},{"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//\nimport utils from '@/hotent-ui-util.js';\nimport productType from '@/api/device/productType.js';\nexport default {\n name: 'FormDialog',\n data: function data() {\n return {\n params: {\n code: '',\n name: '',\n memo: '',\n parentId: ''\n },\n activeCollapse1: '1',\n visible: false,\n title: '新增',\n rules: {\n name: [{\n required: true,\n message: '请输入产品名称',\n trigger: 'blur'\n }],\n code: [{\n required: true,\n message: '请输入产品编码',\n trigger: 'blur'\n }]\n }\n };\n },\n created: function created() {},\n methods: {\n // 产品类型新增弹窗\n add: function add(row) {\n console.log(row);\n this.params.parentId = row.id;\n this.visible = true;\n },\n // 产品类型修改弹窗\n edit: function edit(row) {\n console.log(row);\n this.params = utils.deepClone(row);\n this.visible = true;\n this.title = '修改';\n },\n // 关闭弹窗\n handleClose: function handleClose() {\n this.params = {\n name: '',\n code: '',\n memo: '',\n parentId: ''\n };\n this.title = '新增';\n this.visible = false;\n this.activeCollapse = '1';\n },\n // 保存产品类型\n handleSave: function handleSave() {\n var _this = this;\n\n this.$refs.formInfo.validate(function (valid) {\n if (valid) {\n var method;\n\n if (_this.title === '新增') {\n method = productType.addType;\n }\n\n if (_this.title === '修改') {\n method = productType.updateType;\n }\n\n method(_this.params, function (response) {\n if (response.state) {\n _this.$notify({\n type: 'success',\n message: _this.title + '成功',\n duration: 2000\n });\n\n _this.handleClose();\n\n _this.$emit('reload');\n } else {\n _this.$message.warning(response.message);\n }\n });\n } else {\n _this.$notify({\n type: 'warning',\n message: \"请完善表单信息!\",\n duration: 2000\n });\n }\n });\n }\n }\n};",null]}