From 0f15c8ed6dd43f43798f53b232930ee0979db09f Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 6 Nov 2020 10:10:14 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E6=A8=A1=E6=9D=BF=20?= =?UTF-8?q?=E6=80=9D=E7=BB=B4=E6=9F=A5=E7=9C=8B=E5=99=A8=E5=92=8C=E7=9F=A9?= =?UTF-8?q?=E9=98=B5=E7=BC=96=E8=BE=91=E5=99=A8=E8=BF=94=E5=9B=9E=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E6=97=B6=E4=B8=A2=E5=A4=B1=E7=8A=B6=E6=80=81=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/manage_system/template/index.vue | 17 +++++++++++------ src/views/manage_system/template/matrix.vue | 9 +++++++++ src/views/manage_system/template/mind.vue | 9 +++++++++ 3 files changed, 29 insertions(+), 6 deletions(-) diff --git a/src/views/manage_system/template/index.vue b/src/views/manage_system/template/index.vue index f98e1765..d1a05752 100644 --- a/src/views/manage_system/template/index.vue +++ b/src/views/manage_system/template/index.vue @@ -2116,14 +2116,19 @@ export default { { label: "总体概况", id: "default", data: {} }, ].concat(tree); this.listTemplateTree = listTemplateTree; - setTimeout(() => { - this.$refs.tree.setCurrentKey('default'); - }, 0); + if (this.$route.params.data != undefined) { + const targetTemlate = this.$route.params.data; // 从思维导图页面返回时加载原来选中模板 - this.getTempNameAndData(this.$route.params.data); + this.getTempNameAndData(targetTemlate); + setTimeout(() => { + this.$refs.tree.setCurrentKey(targetTemlate.id || 'default'); + }, 0); } else { this.getTempNameAndData(listTemplateTree[0]); + setTimeout(() => { + this.$refs.tree.setCurrentKey('default'); + }, 0); } // debugger; // var thisApp = this; @@ -3384,7 +3389,7 @@ export default { params: { name: this.templateName, id: this.templateID, - // data: this.treeMenuClickData, + data: this.treeMenuClickData, }, }); }, @@ -3394,7 +3399,7 @@ export default { params: { name: this.templateName, id: this.templateID, - // data: this.treeMenuClickData, + data: this.treeMenuClickData, } }); }, diff --git a/src/views/manage_system/template/matrix.vue b/src/views/manage_system/template/matrix.vue index 86b8e41a..52806c86 100644 --- a/src/views/manage_system/template/matrix.vue +++ b/src/views/manage_system/template/matrix.vue @@ -13,6 +13,7 @@ theme="white" :title="topNodeName" backBtnTitle="退出矩阵编辑器" + :onBackBtnClick="onBackBtnClick" />
@@ -277,6 +278,14 @@ export default { }, //方法 methods: { + onBackBtnClick() { + this.$router.push({ + name: "system_template", + params: { + data: this.$route.params.data, + }, + }) + }, /** * 查看矩阵 */ diff --git a/src/views/manage_system/template/mind.vue b/src/views/manage_system/template/mind.vue index 54658992..5587f080 100644 --- a/src/views/manage_system/template/mind.vue +++ b/src/views/manage_system/template/mind.vue @@ -13,6 +13,7 @@ theme="white" :title="tempName" backBtnTitle="退出思维导图查看器" + :onBackBtnClick="onBackBtnClick" />
@@ -91,6 +92,14 @@ }, watch: {}, methods: { + onBackBtnClick() { + this.$router.push({ + name: "system_template", + params: { + data: this.$route.params.data, + }, + }) + }, filterCurrentTemplate(templateList) { const currentTemplateId = this.tempId; return templateList.filter(temp => temp.Id !== currentTemplateId); From e2d976bf5c7661d8e820e9ac72c55a69c0265137 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 6 Nov 2020 11:06:55 +0800 Subject: [PATCH 2/7] type safe --- src/services/user.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/user.js b/src/services/user.js index 7644e10b..31aad0b8 100644 --- a/src/services/user.js +++ b/src/services/user.js @@ -93,7 +93,7 @@ export async function getUserListByNode(node, page, pageSize, keywords) { : fetchApi('user/queryUsersByDeptId', { deptId: node.id, idType: node.nodeType === 'company' ? 0 : 1, pageIndex: page, pageSize })); const { data: list, total } = res.Data || {}; return { - list: list.map(firstCharToLowerCase), + list: (list || []).map(firstCharToLowerCase), page, pageSize, total, From af19db044f58f2c134f443fce77d71b3c2e5674c Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 6 Nov 2020 11:07:41 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E6=A6=82=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/manage_company/user/index.vue | 5 +++++ src/views/manage_system/template/index.vue | 15 ++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/views/manage_company/user/index.vue b/src/views/manage_company/user/index.vue index 52ffcf96..0522dcb3 100644 --- a/src/views/manage_company/user/index.vue +++ b/src/views/manage_company/user/index.vue @@ -239,6 +239,11 @@ label="姓名" width="160" > + (t.Count || 0) + count, 0); + this.listTemplateClassify = list.map(t => { + return { + tempName: t.TempName, + count: t.Count, + totalCount: totalCount, + } + }); // var thisApp = this; // this.$axios({ // method: "get", From c198e69cb4543a69852bbc3b14b5eeee20b8984d Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 6 Nov 2020 11:20:29 +0800 Subject: [PATCH 4/7] =?UTF-8?q?workspace=20=E4=BF=AE=E6=AD=A3=E5=B7=A5?= =?UTF-8?q?=E4=BD=9C=E4=B8=AD=E7=9A=84=E7=8A=B6=E6=80=81=E6=A0=87=E7=AD=BE?= =?UTF-8?q?=E7=9A=84=E5=87=BA=E7=8E=B0=E4=BA=8B=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/main_web/workspace/workspace.vue | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/views/main_web/workspace/workspace.vue b/src/views/main_web/workspace/workspace.vue index 219e3d35..8cd35e5c 100644 --- a/src/views/main_web/workspace/workspace.vue +++ b/src/views/main_web/workspace/workspace.vue @@ -538,7 +538,7 @@
工作中 @@ -3288,15 +3288,15 @@ export default { }); }, async updateFileWorkStatus(file, workStatus, message) { - const params = { - FolderId: file.folderId, - FileId: file.id, - UserId: this.userId, - FileStatus: file.status - } + // const params = { + // FolderId: file.folderId, + // FileId: file.id, + // UserId: this.userId, + // FileStatus: file.status + // } const [resFlag] = await Promise.all([ services.changeFileWorkStatus(file.id, workStatus), - services.fileCoordinationChange(params) + // services.fileCoordinationChange(params) ]); if(resFlag.Code !== 0) return; notify.success(message); @@ -3311,7 +3311,6 @@ export default { * 更改文件状态 */ async setFileStatus(file, state, message, type) { - debugger; if(state === 2 || state === 1) {//2代表是开启协同 1代表取消协同 let params = { FolderId: file.folderId, From 0b961b4117a5d804f031f9db9dd5e8d203ba6840 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 6 Nov 2020 13:49:46 +0800 Subject: [PATCH 5/7] =?UTF-8?q?workspace=20=E4=BB=A3=E7=A0=81=E7=B2=BE?= =?UTF-8?q?=E7=AE=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/tool.js | 9 ++ src/views/main_web/workspace/workspace.vue | 106 +++++++++------------ 2 files changed, 55 insertions(+), 60 deletions(-) diff --git a/src/utils/tool.js b/src/utils/tool.js index 9cba2cbc..fe1b38d8 100644 --- a/src/utils/tool.js +++ b/src/utils/tool.js @@ -34,6 +34,15 @@ export const notify = { offset: 100, duration: 2500, }); + }, + info: (message, title = '温馨提示') => { + Vue.prototype.$notify({ + title, + message, + type: 'info', + offset: 100, + duration: 2500, + }); } } diff --git a/src/views/main_web/workspace/workspace.vue b/src/views/main_web/workspace/workspace.vue index 8cd35e5c..6a0fdcb9 100644 --- a/src/views/main_web/workspace/workspace.vue +++ b/src/views/main_web/workspace/workspace.vue @@ -492,13 +492,7 @@ ? ' toumin' : '') " - v-if=" - file.extension != 'jpg' && - file.extension != 'png' && - file.extension != 'bmp' && - file.extension != 'gif' && - file.extension != 'jpeg' - " + v-if="!oneOf(file.extension, ['jpg','png','bmp','gif','jpeg'])" @contextmenu.prevent.stop=" rightShowMenu($event, file, 1) " @@ -515,13 +509,7 @@ ? ' toumin' : '') " - v-if=" - file.extension == 'jpg' || - file.extension == 'png' || - file.extension == 'bmp' || - file.extension == 'gif' || - file.extension == 'jpeg' - " + v-if="oneOf(file.extension, ['jpg','png','bmp','gif','jpeg'])" @contextmenu.prevent.stop=" rightShowMenu($event, file, 1) " @@ -1185,9 +1173,7 @@
下载中
-
- 文件未开启协同 -
+
文件未开启协同
{{ file.folderName }} @@ -3255,38 +3241,38 @@ export default { /** * 打开文件时更新文件状态及编辑人 */ - setModifyStatus(file) { - var thisApp = this; - file.status = 1; // 设置为编辑中 - file.modifyUserID = sessionStorage.userId; - this.$axios({ - method: "put", - url: encodeURI(process.env.API_HOST + "archives/update/status"), - data: file, - }) - .then(function (response) { - if (response.data.state == 1) { - thisApp.$notify({ - title: "恭喜您", - message: response.data.message, - type: "success", - offset: 100, - duration: 2500, - }); - } else { - thisApp.$notify({ - title: "温馨提示", - message: response.data.message, - type: "info", - offset: 100, - duration: 5000, - }); - } - }) - .catch(function (error) { - console.log(error); - }); - }, + // setModifyStatus(file) { + // var thisApp = this; + // file.status = 1; // 设置为编辑中 + // file.modifyUserID = sessionStorage.userId; + // this.$axios({ + // method: "put", + // url: encodeURI(process.env.API_HOST + "archives/update/status"), + // data: file, + // }) + // .then(function (response) { + // if (response.data.state == 1) { + // thisApp.$notify({ + // title: "恭喜您", + // message: response.data.message, + // type: "success", + // offset: 100, + // duration: 2500, + // }); + // } else { + // thisApp.$notify({ + // title: "温馨提示", + // message: response.data.message, + // type: "info", + // offset: 100, + // duration: 5000, + // }); + // } + // }) + // .catch(function (error) { + // console.log(error); + // }); + // }, async updateFileWorkStatus(file, workStatus, message) { // const params = { // FolderId: file.folderId, @@ -5129,17 +5115,17 @@ export default { /** * 上传文件成功时触发 */ - uploadAppFileSuccess: function (file) { - this.newAppInstance.alias = file.filePath; - this.newAppInstance.fileName = file.fileName; - this.$notify({ - title: "温馨提示", - message: "恭喜您,实例文件上传成功!", - type: "success", - offset: 30, - duration: 2000, - }); - }, + // uploadAppFileSuccess: function (file) { + // this.newAppInstance.alias = file.filePath; + // this.newAppInstance.fileName = file.fileName; + // this.$notify({ + // title: "温馨提示", + // message: "恭喜您,实例文件上传成功!", + // type: "success", + // offset: 30, + // duration: 2000, + // }); + // }, /** * 加载我的应用实例数据 */ From ef39898c0198e0e777500a7089d1579e864bee3f Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 6 Nov 2020 13:50:17 +0800 Subject: [PATCH 6/7] =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E4=B8=AD=20=E5=8D=95?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E7=9A=84=E5=BC=95=E7=94=A8=E6=AC=A1=E6=95=B0?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=8E=A5=E5=8F=A3=E6=9B=B4=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/services/template.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/template.js b/src/services/template.js index 2af38eac..05a16458 100644 --- a/src/services/template.js +++ b/src/services/template.js @@ -39,7 +39,7 @@ export async function queryTemplateById(templateId) { * @param {string} templateId */ export async function queryTemplateQuoteCount(templateId) { - const res = await fetchApi('template/queryTemplateQuoteCount', { id: templateId }); + const res = await fetchApi('template/queryTemplateQuoteCountByTempId', { id: templateId }); return res; } /** From 18638947de9f0204ae5aab74dd963a7e12afcfd5 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 6 Nov 2020 13:57:19 +0800 Subject: [PATCH 7/7] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=A4=A7=E5=86=99?= =?UTF-8?q?=E5=AD=97=E6=AF=8D=E8=B5=B7=E5=A4=B4=E7=9A=84=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/services/project.js | 4 ++-- src/utils/request.js | 6 +++--- src/views/components_web/newProj/newProj.vue | 2 +- src/views/main_web/workspace/service.js | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/services/project.js b/src/services/project.js index 3777b51f..fa91c47c 100644 --- a/src/services/project.js +++ b/src/services/project.js @@ -12,7 +12,7 @@ export async function queryProjectsByUserId(userId){ * 项目详情 */ export async function QueryProjectInfoByProjId(projId){ - const res = await fetchApi('project/QueryProjectInfoByProjId',{projId:projId}) + const res = await fetchApi('project/queryProjectInfoByProjId',{projId:projId}) return wrapErrorHint(res); } @@ -20,7 +20,7 @@ export async function QueryProjectInfoByProjId(projId){ * 编辑项目 */ export async function EditProject(proj){ - const res = await fetchApi('project/EditProject',proj) + const res = await fetchApi('project/editProject',proj) return wrapErrorHint(res); } /** diff --git a/src/utils/request.js b/src/utils/request.js index 4dde81b7..9bb958e0 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -111,10 +111,10 @@ function mapApiPathToFullPath(path) { case 'template/createNestedRelevance': case 'template/deleteNestedRelevance': case "folder/createSubfolder": - case "project/CreateProject": - case "project/EditProject": + case "project/createProject": + case "project/editProject": case "project/assignedWork": - case "file/AddArchMilesStone": + case "file/addArchMilesStone": case "file/addFile": case "file/updateFile": case "file/fileCoordinationChange": diff --git a/src/views/components_web/newProj/newProj.vue b/src/views/components_web/newProj/newProj.vue index 3371408b..a574c467 100644 --- a/src/views/components_web/newProj/newProj.vue +++ b/src/views/components_web/newProj/newProj.vue @@ -1441,7 +1441,7 @@ const res = await templateService.queryTemplateNodeByTemplateId(this.selectTemlateID); this.checkNewProjData.Node = res.Data; - this.$fetchApi('project/CreateProject', this.checkNewProjData).then(res => { + this.$fetchApi('project/createProject', this.checkNewProjData).then(res => { console.log(res); if(res.Code === 0) { thisApp.$notify({ diff --git a/src/views/main_web/workspace/service.js b/src/views/main_web/workspace/service.js index f10fca24..3ae986a5 100644 --- a/src/views/main_web/workspace/service.js +++ b/src/views/main_web/workspace/service.js @@ -19,7 +19,7 @@ export async function fetchWorkFlow(projectId, userId) { * @param {*} userId */ export async function fetchFolderFileList(folderId, userId, commonFolderId) { - const res = await fetchApi('folder/QueryFileListByFolderIdAndUserId', { folderId, userId, publicFolderId: commonFolderId }); + const res = await fetchApi('folder/queryFileListByFolderIdAndUserId', { folderId, userId, publicFolderId: commonFolderId }); wrapErrorHint(res); if (res.Code !== 0) return null; const data = res.Data || {}; @@ -52,7 +52,7 @@ export async function AddArchMilesStone(fileInfo) { fileInfo = firstCharToUpperCase(fileInfo); delete fileInfo.IsShowFile; - const res = await fetchApi('file/AddArchMilesStone', fileInfo); + const res = await fetchApi('file/addArchMilesStone', fileInfo); return wrapErrorHint(res); }