From 577939da379791cf177cbb2fdcfd9103b64fa934 Mon Sep 17 00:00:00 2001 From: revive <1664535558@qq.com> Date: Wed, 28 Oct 2020 09:51:02 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E5=AE=8C=E6=88=90=E6=96=B0=E5=BB=BA?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E5=A4=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/request.js | 1 + src/views/main_web/workspace/service.js | 7 +- src/views/main_web/workspace/workspace.vue | 183 +++++++++++++-------- vue.config.js | 2 +- 4 files changed, 120 insertions(+), 73 deletions(-) diff --git a/src/utils/request.js b/src/utils/request.js index b94484cd..4db91488 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -114,6 +114,7 @@ function mapApiPathToFullPath(path) { case "project/CreateProject": case "project/EditProject": case "project/assignedWork": + // case 'template/deleteTemplateNodeModelFile': method = 'POST'; break; diff --git a/src/views/main_web/workspace/service.js b/src/views/main_web/workspace/service.js index 9a5b2a5d..bbb553f9 100644 --- a/src/views/main_web/workspace/service.js +++ b/src/views/main_web/workspace/service.js @@ -1,4 +1,4 @@ -import { fetchApi } from '@/utils/request'; +import { fetchApi ,wrapErrorHint} from '@/utils/request'; import { firstCharToLowerCase, firstCharToUpperCase } from '@/utils/tool'; @@ -23,6 +23,7 @@ export async function fetchFolderFileList(folderId, userId) { return res; } -export async function createSubFolder() { - const res = await fetchApi('folder/createSubfolder', {}); +export async function createSubFolder(folderGroupData) { + const res = await fetchApi('folder/createSubfolder', folderGroupData); + return wrapErrorHint(res); } \ No newline at end of file diff --git a/src/views/main_web/workspace/workspace.vue b/src/views/main_web/workspace/workspace.vue index de551527..d7dd52a2 100644 --- a/src/views/main_web/workspace/workspace.vue +++ b/src/views/main_web/workspace/workspace.vue @@ -2681,7 +2681,7 @@ @@ -2938,16 +2938,23 @@ export default { isClient: back.isClient, // 是否是客户端 dialogNewFolderGroup: false, //新建文件分组组弹窗 folderGroupData: { - folderGroupID: "", - folderID: "", - superID: "", - levelId: "", - folderGroupName: "", - childCount: 0, - createUserID: "", - createTime: "", - modifyUserID: "", - modifyTime: "", + Id:"", + ProjId:"", + SuperId:"", + LevelId:"", + FirstFolderId:"", + FolderName:"", + TemplateId:"", + NodeId:"", + SysCode:"", + FileCount:0, + ChildCount:0, + Deleted:0, + Customed:0, + CreateUserId:"", + CreateTime:"", + ModifyUserId:"", + ModifyTime:"", }, //文件分组数据 myListFolderGroups: [], // 我的文件分组数据 dbClickSelectedFolderGroupData: {}, //双击选中的当前文件夹分组对象 @@ -6412,27 +6419,27 @@ export default { */ newCreateFolderGroup: function () { this.dialogNewFolderGroup = true; - this.folderGroupData = { - folderGroupID: "", - folderID: "", - superID: "", - levelId: "", - folderGroupName: "", - childCount: 0, - createUserID: "", - createTime: "", - modifyUserID: "", - modifyTime: "", - }; + // this.folderGroupData = { + // folderGroupID: "", + // folderID: "", + // superID: "", + // levelId: "", + // folderGroupName: "", + // childCount: 0, + // createUserID: "", + // createTime: "", + // modifyUserID: "", + // modifyTime: "", + // }; + }, /** * 点击确定 保存文件夹组 */ - createFolderGroupSure: function () { - var thisApp = this; + async createFolderGroupSure(){ if ( - this.folderGroupData.folderGroupName == null || - this.folderGroupData.folderGroupName == "" + this.folderGroupData.FolderName == null || + this.folderGroupData.FolderName == "" ) { this.$notify({ title: "温馨提示", @@ -6443,49 +6450,87 @@ export default { }); return; } - this.folderGroupData.folderGroupID = this.dbClickSelectedFolderGroupData.folderGroupID; - this.folderGroupData.superID = this.dbClickSelectedFolderGroupData.folderGroupID; - this.folderGroupData.levelId = this.dbClickSelectedFolderGroupData.levelId; - this.folderGroupData.folderID = this.nowFolder.folderID; - this.folderGroupData.createUserID = sessionStorage.userId; - debugger; - this.$axios({ - method: "post", - url: encodeURI(process.env.API_HOST + "folders/foldergroup"), - data: this.folderGroupData, - }) - .then((response) => { - this.dialogNewFolderGroup = false; - if (response.data.state == 1) { - thisApp.refreshPages(); - this.$notify({ - title: "恭喜您", - message: "文件夹创建成功!", - type: "success", - offset: 100, - duration: 2500, - }); - } else { - this.$notify({ - title: "温馨提示", - message: response.data.message, - type: "error", - offset: 100, - duration: 5000, - }); - } - }) - .catch((error) => { - console.log(error); - this.$notify({ - title: "温馨提示", - message: "文件夹创建失败!", - type: "error", - offset: 100, - duration: 5000, - }); - }); + this.folderGroupData={ + Id:sessionStorage.userId, + ProjId:sessionStorage.projId, + SuperId:this.nowFolder.id, + LevelId:this.nowFolder.levelId, + FirstFolderId:this.nowFolder.firstFolderId, + FolderName:this.folderGroupData.FolderName, + TemplateId:this.nowFolder.templateId, + SysCode:this.nowFolder.sysCode, + FileCount:0, + ChildCount:0, + Deleted:0, + Customed:2, + CreateUserId:sessionStorage.userId, + CreateTime:new Date(), + ModifyUserId:sessionStorage.userId, + ModifyTime:new Date(), + } + console.log(this.folderGroupData); + const Res = await services.createSubFolder(this.folderGroupData); + }, + + // createFolderGroupSure: function () { + // var thisApp = this; + // if ( + // this.folderGroupData.folderGroupName == null || + // this.folderGroupData.folderGroupName == "" + // ) { + // this.$notify({ + // title: "温馨提示", + // message: "请输入文件夹名称!", + // type: "error", + // offset: 100, + // duration: 5000, + // }); + // return; + // } + // this.folderGroupData.folderGroupID = this.dbClickSelectedFolderGroupData.folderGroupID; + // this.folderGroupData.superID = this.dbClickSelectedFolderGroupData.folderGroupID; + // this.folderGroupData.levelId = this.dbClickSelectedFolderGroupData.levelId; + // this.folderGroupData.folderID = this.nowFolder.folderID; + // this.folderGroupData.createUserID = sessionStorage.userId; + // debugger; + // this.$axios({ + // method: "post", + // url: encodeURI(process.env.API_HOST + "folders/foldergroup"), + // data: this.folderGroupData, + // }) + // .then((response) => { + // this.dialogNewFolderGroup = false; + // if (response.data.state == 1) { + // thisApp.refreshPages(); + // this.$notify({ + // title: "恭喜您", + // message: "文件夹创建成功!", + // type: "success", + // offset: 100, + // duration: 2500, + // }); + // } else { + // this.$notify({ + // title: "温馨提示", + // message: response.data.message, + // type: "error", + // offset: 100, + // duration: 5000, + // }); + // } + // }) + // .catch((error) => { + // console.log(error); + // this.$notify({ + // title: "温馨提示", + // message: "文件夹创建失败!", + // type: "error", + // offset: 100, + // duration: 5000, + // }); + // }); + // }, /** * 双击文件夹组名称 进入文件夹 */ diff --git a/vue.config.js b/vue.config.js index 0311060c..4e268fa6 100644 --- a/vue.config.js +++ b/vue.config.js @@ -30,7 +30,7 @@ module.exports = { proxy: { '/api/pms': { // target: 'http://47.104.91.134:8089', - target:'http://10.240.32.182:8089', + target:'http://10.240.32.204:8089', changeOrigin: true, secure: false, From 2d6f5529e30b8f1e8651ad2506a1ac33ce990586 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 28 Oct 2020 10:12:21 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E6=80=BB=E5=90=8E?= =?UTF-8?q?=E5=8F=B0=E5=AF=BC=E8=88=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/app-header/components/nav.vue | 2 +- src/views/manage_system/index.vue | 11 +++++++---- src/views/manage_system/template/matrix.vue | 10 ++++++++++ 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/src/components/app-header/components/nav.vue b/src/components/app-header/components/nav.vue index 0baaf5f8..f42c1dfa 100644 --- a/src/components/app-header/components/nav.vue +++ b/src/components/app-header/components/nav.vue @@ -4,7 +4,7 @@ class="app-nav-item" v-for="navItem in list" :key="navItem.key" - :class="{ 'app-nav-item-active': navItem.key === currentKey }" + :class="{ 'app-nav-item-active': currentKey.indexOf(navItem.key) === 0 }" @click="goto(navItem.key)" > {{navItem.label}} diff --git a/src/views/manage_system/index.vue b/src/views/manage_system/index.vue index c544deb5..4e240a21 100644 --- a/src/views/manage_system/index.vue +++ b/src/views/manage_system/index.vue @@ -23,11 +23,14 @@ const navItem = (pathName, label) => ({ key: pathName, label }); const navList = [ navItem("system_customer", "客户列表"), navItem("system_template", "流程模板"), - navItem("system_runmanage", "应用管理"), - navItem("system_template_matrix", "运行管理"), + navItem("system_appcenter", "应用管理"), + navItem("system_runmanage", "运行管理"), navItem("system_setting", "总体权限"), ]; const hash = navList.reduce((h, item) => (h[item.key] = true, h), {}); + +hash['system_template_file'] = true; + const isInNavRange = name => hash[name]; export default { @@ -37,7 +40,7 @@ export default { }, data() { return { - showHeader: isInNavRange(this.$route.name), + showHeader: isInNavRange(this.$route), navList, }; }, @@ -61,7 +64,7 @@ export default { }, watch: { $route(to) { - this.showHeader = isInNavRange(to.name); + this.showHeader = isInNavRange(to); } } }; diff --git a/src/views/manage_system/template/matrix.vue b/src/views/manage_system/template/matrix.vue index 64f86d33..86b8e41a 100644 --- a/src/views/manage_system/template/matrix.vue +++ b/src/views/manage_system/template/matrix.vue @@ -8,6 +8,12 @@ -->