{"remainingRequest":"D:\\HTC\\program\\善行少年\\security-enterprise-admin\\node_modules\\babel-loader\\lib\\index.js!D:\\HTC\\program\\善行少年\\security-enterprise-admin\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\HTC\\program\\善行少年\\security-enterprise-admin\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\HTC\\program\\善行少年\\security-enterprise-admin\\src\\views\\modules\\sys\\menu-add-or-update.vue?vue&type=script&lang=js","dependencies":[{"path":"D:\\HTC\\program\\善行少年\\security-enterprise-admin\\src\\views\\modules\\sys\\menu-add-or-update.vue","mtime":1581948666000},{"path":"D:\\HTC\\program\\善行少年\\security-enterprise-admin\\babel.config.js","mtime":1581948662000},{"path":"D:\\HTC\\program\\善行少年\\security-enterprise-admin\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\HTC\\program\\善行少年\\security-enterprise-admin\\node_modules\\babel-loader\\lib\\index.js","mtime":456789000000},{"path":"D:\\HTC\\program\\善行少年\\security-enterprise-admin\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\HTC\\program\\善行少年\\security-enterprise-admin\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/es7.object.get-own-property-descriptors\";\nimport \"core-js/modules/web.dom.iterable\";\nimport \"core-js/modules/es6.object.keys\";\nimport \"core-js/modules/es6.function.name\";\nimport _defineProperty from \"D:/HTC/program/\\u5584\\u884C\\u5C11\\u5E74/security-enterprise-admin/node_modules/@babel/runtime/helpers/esm/defineProperty.js\";\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nimport debounce from 'lodash/debounce';\nimport { getIconList } from '@/utils';\nexport default {\n data: function data() {\n return {\n visible: false,\n menuList: [],\n menuListVisible: false,\n iconList: [],\n iconListVisible: false,\n dataForm: {\n id: '',\n type: 0,\n name: '',\n pid: '0',\n parentName: '',\n url: '',\n permissions: '',\n sort: 0,\n icon: ''\n }\n };\n },\n computed: {\n dataRule: function dataRule() {\n return {\n name: [{\n required: true,\n message: this.$t('validate.required'),\n trigger: 'blur'\n }],\n parentName: [{\n required: true,\n message: this.$t('validate.required'),\n trigger: 'change'\n }]\n };\n }\n },\n watch: {\n 'dataForm.type': function dataFormType(val) {\n this.$refs['dataForm'].clearValidate();\n }\n },\n methods: {\n init: function init() {\n var _this = this;\n this.visible = true;\n this.$nextTick(function () {\n _this.$refs['dataForm'].resetFields();\n _this.iconList = getIconList();\n _this.dataForm.parentName = _this.$t('menu.parentNameDefault');\n _this.getMenuList().then(function () {\n if (_this.dataForm.id) {\n _this.getInfo();\n }\n });\n });\n },\n // 获取菜单列表\n getMenuList: function getMenuList() {\n var _this2 = this;\n return this.$http.get('/sys/menu/list?type=0').then(function (_ref) {\n var res = _ref.data;\n if (res.code !== 0) {\n return _this2.$message.error(res.msg);\n }\n _this2.menuList = res.data;\n }).catch(function () {});\n },\n // 获取信息\n getInfo: function getInfo() {\n var _this3 = this;\n this.$http.get(\"/sys/menu/\".concat(this.dataForm.id)).then(function (_ref2) {\n var res = _ref2.data;\n if (res.code !== 0) {\n return _this3.$message.error(res.msg);\n }\n _this3.dataForm = _objectSpread(_objectSpread({}, _this3.dataForm), res.data);\n if (_this3.dataForm.pid === '0') {\n return _this3.deptListTreeSetDefaultHandle();\n }\n _this3.$refs.menuListTree.setCurrentKey(_this3.dataForm.pid);\n }).catch(function () {});\n },\n // 上级菜单树, 设置默认值\n deptListTreeSetDefaultHandle: function deptListTreeSetDefaultHandle() {\n this.dataForm.pid = '0';\n this.dataForm.parentName = this.$t('menu.parentNameDefault');\n },\n // 上级菜单树, 选中\n menuListTreeCurrentChangeHandle: function menuListTreeCurrentChangeHandle(data) {\n this.dataForm.pid = data.id;\n this.dataForm.parentName = data.name;\n this.menuListVisible = false;\n },\n // 图标, 选中\n iconListCurrentChangeHandle: function iconListCurrentChangeHandle(icon) {\n this.dataForm.icon = icon;\n this.iconListVisible = false;\n },\n // 表单提交\n dataFormSubmitHandle: debounce(function () {\n var _this4 = this;\n this.$refs['dataForm'].validate(function (valid) {\n if (!valid) {\n return false;\n }\n _this4.$http[!_this4.dataForm.id ? 'post' : 'put']('/sys/menu', _this4.dataForm).then(function (_ref3) {\n var res = _ref3.data;\n if (res.code !== 0) {\n return _this4.$message.error(res.msg);\n }\n _this4.$message({\n message: _this4.$t('prompt.success'),\n type: 'success',\n duration: 500,\n onClose: function onClose() {\n _this4.visible = false;\n _this4.$emit('refreshDataList');\n }\n });\n }).catch(function () {});\n });\n }, 1000, {\n 'leading': true,\n 'trailing': false\n })\n }\n};",{"version":3,"names":["debounce","getIconList","data","visible","menuList","menuListVisible","iconList","iconListVisible","dataForm","id","type","name","pid","parentName","url","permissions","sort","icon","computed","dataRule","required","message","$t","trigger","watch","dataFormType","val","$refs","clearValidate","methods","init","_this","$nextTick","resetFields","getMenuList","then","getInfo","_this2","$http","get","_ref","res","code","$message","error","msg","catch","_this3","concat","_ref2","_objectSpread","deptListTreeSetDefaultHandle","menuListTree","setCurrentKey","menuListTreeCurrentChangeHandle","iconListCurrentChangeHandle","dataFormSubmitHandle","_this4","validate","valid","_ref3","duration","onClose","$emit"],"sources":["src/views/modules/sys/menu-add-or-update.vue"],"sourcesContent":["\r\n\r\n\r\n\r\n\r\n"],"mappings":";;;;;;;AA+DA,OAAAA,QAAA;AACA,SAAAC,W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