{"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\\Manage\\material\\components\\MaterialClassDialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Manage\\material\\components\\MaterialClassDialog.vue","mtime":1690541169611},{"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.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//\nimport utils from '@/hotent-ui-util.js';\nimport classManage from '@/api/manager/material/materialInfoManage.js';\nimport ebsTreeSelect from '@/views/Manage/components/SelectTree.vue';\nimport PY from '@/views/Manage/components/PY.js';\nexport default {\n name: 'ClassFormDialog',\n components: {\n ebsTreeSelect: ebsTreeSelect\n },\n props: {\n showFormDias: {\n type: Boolean,\n default: false\n },\n titles: {\n type: String,\n default: ''\n },\n treeNode: {\n type: Object,\n default: null\n },\n pOptions: {\n type: Array,\n default: []\n }\n },\n data: function data() {\n return {\n params: {\n // id: null,\n name: '',\n code: '',\n parentId: '',\n memo: ''\n },\n treeData: [{\n code: '0',\n id: '0',\n name: '物资分类信息',\n parentId: null,\n children: []\n }],\n treeSelectProps: {\n value: 'id',\n // ID字段名\n label: 'name',\n // 显示名称\n children: 'children' // 子级字段名\n\n },\n activeCollapse: '1',\n rules: {\n name: [{\n required: true,\n message: '请输入分类名称',\n trigger: 'blur'\n }]\n },\n optionsList: []\n };\n },\n watch: {\n treeNode: function treeNode(newVal, oldVal) {\n console.log('watch===================', newVal);\n this.params = newVal;\n }\n },\n created: function created() {\n var _this = this;\n\n if (this.titles === '修改') {\n classManage.getClassByID(this.pOptions[0].id, function (res) {\n console.log(res);\n _this.params = res;\n _this.optionsList = [{\n id: res.parentId,\n name: res.parentName\n }];\n });\n } else if (this.titles === '新增') {\n this.optionsList = this.pOptions;\n this.params.parentId = this.optionsList[0].id;\n }\n },\n mounted: function mounted() {// this.getTree()\n },\n // destroyed() {\n // \tthis.params = {\n // \t\t\tid: null,\n // \t typeName: '',\n // \t code: '',\n // \t parentId: null\n // \t}\n // },\n methods: {\n getTree: function getTree() {\n var _this2 = this;\n\n classManage.loadAllClass({}, function (res) {\n _this2.treeData[0].children = res; // this.$set(this.treeData)\n\n if (_this2.treeNode) {\n _this2.params = _this2.treeNode;\n console.log('params====mounted============', _this2.treeNode);\n }\n });\n },\n changeType: function changeType() {\n this.$forceUpdate();\n },\n handleClose: function handleClose() {\n this.params = {\n id: null,\n name: '',\n code: '',\n parentId: null\n };\n this.$refs.formInfo.clearValidate();\n this.$emit('closeFormDiaos');\n this.$emit('refList');\n },\n handleSave: function handleSave() {\n var _this3 = this;\n\n this.$refs.formInfo.validate(function (valid) {\n if (valid) {\n var method;\n\n if (!_this3.params.id) {\n method = classManage.addClass;\n\n if (_this3.params.code == null || _this3.params.code === '') {\n _this3.params.code = PY.getCamelChars(_this3.params.name);\n }\n }\n\n if (_this3.params.id) {\n // 修改\n method = classManage.editClass;\n } // 父分类是物资分类时parentId\n\n\n if (_this3.params.parentId === 0) {\n _this3.params.parentId = null;\n }\n\n console.log(method);\n method(_this3.params, function (response) {\n if (response.state) {\n _this3.$notify({\n type: 'success',\n message: _this3.titles + '成功',\n duration: 2000\n });\n\n _this3.$emit('closeFormDiaos');\n\n _this3.$emit('refList');\n } else {\n _this3.$message.warning(response.message);\n }\n });\n } else {\n return false;\n }\n });\n }\n }\n};",null]}