1
0
Fork 0
management/front/dkha-web-sz-main/node_modules/.cache/vue-loader/78746223a9295f29a139aff0ce4...

1 line
13 KiB
JSON
Raw Normal View History

2023-12-18 13:12:25 +08:00
{"remainingRequest":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\src\\views\\modules\\sys\\menu-add-or-update.vue?vue&type=script&lang=js&","dependencies":[{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\src\\views\\modules\\sys\\menu-add-or-update.vue","mtime":1614735254000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\babel-loader\\lib\\index.js","mtime":499162500000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\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 debounce from 'lodash/debounce'\nimport { getIconList } from '@/utils'\nexport default {\n 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 () {\n return {\n name: [\n { required: true, message: this.$t('validate.required'), trigger: 'blur' }\n ],\n parentName: [\n { required: true, message: this.$t('validate.required'), trigger: 'change' }\n ]\n }\n }\n },\n watch: {\n 'dataForm.type' (val) {\n this.$refs['dataForm'].clearValidate()\n }\n },\n methods: {\n init () {\n this.visible = true\n this.$nextTick(() => {\n this.$refs['dataForm'].resetFields()\n this.iconList = getIconList()\n this.dataForm.parentName = this.$t('menu.parentNameDefault')\n this.getMenuList().then(() => {\n if (this.dataForm.id) {\n this.getInfo()\n }\n })\n })\n },\n // 获取菜单列表\n getMenuList () {\n return this.$http.get('/sys/menu/list?type=0').then(({ data: res }) => {\n if (res.code !== 0) {\n return this.$message.error(res.msg)\n }\n this.menuList = res.data\n }).catch(() => {})\n },\n // 获取信息\n getInfo () {\n this.$http.get(`/sys/menu/${this.dataForm.id}`).then(({ data: res }) => {\n if (res.code !== 0) {\n return this.$message.error(res.msg)\n }\n this.dataForm = {\n ...this.dataForm,\n ...res.data\n }\n if (this.dataForm.pid === '0') {\n return this.deptListTreeSetDefaultHandle()\n }\n this.$refs.menuListTree.setCurrentKey(this.dataForm.pid)\n }).catch(() => {})\n },\n // 上级菜单树, 设置默认值\n deptListTreeSetDefaultHandle () {\n this.dataForm.pid = '0'\n this.dataForm.parentName = this.$t('menu.parentNameDefault')\n },\n // 上级菜单树, 选中\n menuListTreeCurrentChangeHandle (data) {\n this.dataForm.pid = data.id\n this.dataForm.parentName = data.name\n this.menuListVisible = false\n },\n // 图标, 选中\n iconListCurrentChangeHandle (icon) {\n this.dataForm.icon = icon\n this.iconListVisible = false\n },\n // 表单提交\n dataFormSubmitHandle: debounce(function () {\n this.$refs['dataForm'].validate((valid) => {\n if (!valid) {\n return false\n }\n this.$http[!this.dataForm.id ? 'post' : 'put']('/sys/menu', this.dataForm).then(({ data: res