1 line
7.5 KiB
JSON
1 line
7.5 KiB
JSON
{"remainingRequest":"E:\\hz-zhhq-web\\node_modules\\thread-loader\\dist\\cjs.js!E:\\hz-zhhq-web\\node_modules\\babel-loader\\lib\\index.js!E:\\hz-zhhq-web\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!E:\\hz-zhhq-web\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!E:\\hz-zhhq-web\\src\\views\\jurisdiction\\appmenu\\appmenu.vue?vue&type=script&lang=js","dependencies":[{"path":"E:\\hz-zhhq-web\\src\\views\\jurisdiction\\appmenu\\appmenu.vue","mtime":1737610069427},{"path":"E:\\hz-zhhq-web\\babel.config.js","mtime":1737610069371},{"path":"E:\\hz-zhhq-web\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"E:\\hz-zhhq-web\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"E:\\hz-zhhq-web\\node_modules\\babel-loader\\lib\\index.js","mtime":456789000000},{"path":"E:\\hz-zhhq-web\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"E:\\hz-zhhq-web\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/es6.array.sort\";\nimport \"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\nimport { getAppMenuTree, deleteAppMenu, addAppMenu, updateAppMenu } from \"@/api/getdata\";\nimport { treeDataTranslate } from '@/utils';\nimport popup from \"./popup/addUpdatePop.vue\";\nexport default {\n components: {\n popup: popup\n },\n data: function data() {\n return {\n loading: false,\n //初始化loading\n loadingMsg: \"\",\n row: {},\n dataList: [],\n dialogTableVisible: false,\n dataForm: {},\n newAlert: false,\n //新增活动弹窗是否显示\n newAlertTitle: '',\n //弹窗title\n isNewActivity: 1 //1是新增 2是编辑\n };\n },\n mounted: function mounted() {\n this.getDate();\n },\n methods: {\n createLoad: function createLoad() {\n this.loading = true;\n this.loadingMsg = \"加载中...\";\n },\n clearLoad: function clearLoad() {\n this.loading = false;\n this.loadingMsg = \"\";\n },\n //关闭新增弹窗\n closeNewAlert: function closeNewAlert() {\n this.newAlert = false;\n },\n /**删除 */delChange: function delChange(id) {\n var _this = this;\n this.$alert(\"确认进行删除嘛?\", \"确认\", {\n confirmButtonText: \"确定\",\n callback: function callback(action) {\n if (action == \"confirm\") {\n _this.createLoad();\n var Content = {\n menus: id + \"\"\n };\n deleteAppMenu(Content).then(function (res) {\n if (res.returnCode == \"1\") {\n _this.$message({\n message: res.returnMsg,\n type: \"success\"\n });\n _this.getDate();\n _this.dialogTableVisible = false;\n } else {\n _this.$message({\n message: res.returnMsg,\n type: \"warning\"\n });\n setTimeout(function () {\n _this.clearLoad();\n }, 300);\n }\n }).catch(function (err) {\n console.log(err);\n setTimeout(function () {\n _this.clearLoad();\n }, 300);\n });\n }\n }\n });\n },\n getDate: function getDate() {\n var _this2 = this;\n this.createLoad();\n var Content = {};\n getAppMenuTree(Content).then(function (res) {\n if (res.returnCode == \"1\") {\n _this2.clearLoad();\n if (res.returnData.data.length == 0) {\n _this2.$message({\n message: \"当前无数据\",\n type: \"success\"\n });\n } else {\n _this2.dataList = treeDataTranslate(res.returnData.data, 'code', 'parentCode');\n }\n } else {\n _this2.$message({\n message: res.returnMsg,\n type: \"warning\"\n });\n setTimeout(function () {\n _this2.clearLoad();\n }, 300);\n }\n }).catch(function (err) {\n console.log(err);\n setTimeout(function () {\n _this2.clearLoad();\n }, 300);\n });\n },\n //新增菜单\n newAdd: function newAdd() {\n this.dataForm = {\n id: 0,\n type: 0,\n name: '',\n parentId: 0,\n parentName: '',\n url: '',\n perms: '',\n orderNum: 0,\n icon: '',\n iconList: []\n };\n this.newAlert = true;\n this.newAlertTitle = '新增菜单';\n this.isNewActivity = 1;\n },\n edit: function edit(data) {\n //遍历整个table数据\n var parentName = \"\";\n for (var i = 0; i < this.dataList.length; i++) {\n var item = this.dataList[i];\n if (\"children\" in item) {\n for (var j = 0; j < item.children.length; j++) {\n var item2 = item.children[j];\n if (item2.code == data.code) {\n parentName = item.name;\n console.log(parentName);\n }\n }\n }\n }\n // this.dataForm = data;\n this.dataForm = Object.assign({}, data);\n this.dataForm.parentName = parentName;\n console.log(this.dataForm, \"111111111111\");\n this.newAlert = true;\n this.newAlertTitle = '修改菜单';\n this.isNewActivity = 2;\n },\n sureAdd: function sureAdd(e) {\n var _this3 = this;\n console.log(e, 'sureAdd');\n this.createLoad();\n\n // let params = {\n // type:e.type,\n // name:e.name,\n // parentId:e.parentId,\n // parentName:e.parentName,\n // url:e.url,\n // orderNum:e.orderNum,\n // icon:e.icon,\n // isDelImg:e.isDelImg\n // };\n if (this.isNewActivity == 1) {\n // params.creator = 'admin';\n // saveMenu(params)\n var Content = {\n parentCode: e.parentId,\n name: e.name,\n type: e.type,\n sort: e.sort,\n pageUrl: e.pageUrl,\n iconUrl: e.iconUrl\n };\n addAppMenu(Content).then(function (res) {\n if (res.returnCode == 1) {\n _this3.$message({\n message: res.returnMsg,\n type: \"success\"\n });\n _this3.newAlert = false;\n _this3.getDate();\n }\n }).catch(function (err) {\n _this3.clearLoad();\n });\n } else {\n var _Content = {\n parentCode: e.parentId || this.dataForm.parentCode,\n code: this.dataForm.code,\n name: e.name,\n type: e.type,\n sort: e.sort,\n pageUrl: e.pageUrl,\n iconUrl: e.iconUrl,\n id: e.id\n };\n // params.id = e.id;\n // params.modifier = 'admin';\n updateAppMenu(_Content).then(function (res) {\n if (res.returnCode == 1) {\n _this3.$message({\n message: res.returnMsg,\n type: \"success\"\n });\n _this3.newAlert = false;\n _this3.getDate();\n }\n }).catch(function (err) {\n _this3.clearLoad();\n });\n }\n ;\n }\n }\n};",null]} |