From 1378bcfb819dd48154f8ae6d8f083944f4173f97 Mon Sep 17 00:00:00 2001 From: revive <1664535558@qq.com> Date: Wed, 6 Jan 2021 10:54:17 +0800 Subject: [PATCH] commit --- public/static/css/main.css | 3 + src/components/app-header/app-header.vue | 4 + .../components_web/projDetail/projDetail.vue | 4 +- src/views/components_web/project/nestTemp.vue | 244 +++++++++++++----- src/views/components_web/project/newProj.vue | 2 +- src/views/main_web/recycle.vue | 7 + .../workspace/components/recyclefile.vue | 112 ++++++++ src/views/main_web/workspace/service.js | 13 + src/views/manage_system/template/matrix.vue | 9 + vue.config.js | 11 +- 10 files changed, 340 insertions(+), 69 deletions(-) create mode 100644 src/views/main_web/workspace/components/recyclefile.vue diff --git a/public/static/css/main.css b/public/static/css/main.css index 00365b0c..1a8e4887 100644 --- a/public/static/css/main.css +++ b/public/static/css/main.css @@ -8940,6 +8940,7 @@ h5.dulilabel{ .proj-detail .right-part .part-wrap::-webkit-scrollbar, .proj-detail .proj-desc-wrap::-webkit-scrollbar, .proj-detail .summary-wrap::-webkit-scrollbar, + .template_improve .summary-wrap::-webkit-scrollbar, .template_nest .template_select_content::-webkit-scrollbar, .template_improve .template_improve_content::-webkit-scrollbar, .new-proj .template_select_content::-webkit-scrollbar { @@ -8954,6 +8955,7 @@ h5.dulilabel{ .right-part .part-wrap::-webkit-scrollbar-thumb, .proj-detail .proj-desc-wrap::-webkit-scrollbar-thumb, .proj-detail .summary-wrap::-webkit-scrollbar-thumb, + .template_improve .summary-wrap::-webkit-scrollbar-thumb, .template_nest .template_select_content::-webkit-scrollbar-thumb, .template_improve .template_improve_content::-webkit-scrollbar-thumb, .new-proj .template_select_content::-webkit-scrollbar-thumb { @@ -8973,6 +8975,7 @@ h5.dulilabel{ .right-part .part-wrap::-webkit-scrollbar-thumb:window-inactive, .proj-detail .proj-desc-wrap::-webkit-scrollbar-thumb:window-inactive, .proj-detail .summary-wrap::-webkit-scrollbar-thumb:window-inactive, + .template_improve .summary-wrap::-webkit-scrollbar-thumb:window-inactive, .new-proj .template_select_content::-webkit-scrollbar-thumb:window-inactive { background-color: #adadad; } diff --git a/src/components/app-header/app-header.vue b/src/components/app-header/app-header.vue index 5098b3a9..8fcfb8f1 100644 --- a/src/components/app-header/app-header.vue +++ b/src/components/app-header/app-header.vue @@ -112,6 +112,10 @@ export default { left: 50%; transform: translateX(-50%); font-size: $font-level-6; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 1; + overflow: hidden; @include setOnelineHeight($app-header-height); } } diff --git a/src/views/components_web/projDetail/projDetail.vue b/src/views/components_web/projDetail/projDetail.vue index 1641511b..1a787455 100644 --- a/src/views/components_web/projDetail/projDetail.vue +++ b/src/views/components_web/projDetail/projDetail.vue @@ -144,7 +144,7 @@
@@ -1383,7 +1383,7 @@ import NestTemp from '../project/nestTemp.vue'; } .right-part { - min-width: 300px; + min-width: 400px; box-sizing: border-box; border-top-left-radius: 8px; border-top-right-radius: 8px; diff --git a/src/views/components_web/project/nestTemp.vue b/src/views/components_web/project/nestTemp.vue index 120064d6..bb7676cc 100644 --- a/src/views/components_web/project/nestTemp.vue +++ b/src/views/components_web/project/nestTemp.vue @@ -2,16 +2,20 @@
- -
选定模板
+
+ 选定模板 +
-
+
已建立交换关系的模板 @@ -19,38 +23,41 @@
{{item.TemplateName}} -
- +
- -
创建
-
-
-
-
模板名称:
-
{{selectTemplate.TemplateName}}
-
-
-
创建时间:
-
{{createDate}}
-
-
-
{{(prop.PropertyName ? prop.PropertyName : '自定义字段') +':'}}
-
- -
-
-
+
+ 创建 +
+ +
+
+
模板名称
+
{{selectTemplate.TemplateName}}
+
+
+
创建时间
+
{{createDate}}
+
+
+
{{(prop.PropertyName ? prop.PropertyName : '自定义字段') +':'}}
+
+ +
+
+
@@ -76,7 +83,11 @@ export default { title:this.nestNodeFolder.folderName, NestTemplateList:[], isTemNest: false, - isNestTemImprove:false, + isNestTemImprove:false, + isNestTempScroll: false,//嵌套模板选择是否滚动 + nestTemplateDescEl: null, + isTempImproveScroll: false, + tempImproveDescEl: null, selectTemplate:{},//选择的嵌套模板 checkedIndex:0, checkNewProjData: { @@ -95,6 +106,22 @@ export default { } }, + mounted(){ + this.nestTemplateDescEl = this.$refs.nestTemplateDesc; + if(this.nestTemplateDescEl) { + this.nestTemplateDescEl.addEventListener('scroll', this.watchNestTempScroll); + } + + this.tempImproveDescEl = this.$refs.tempImproveDesc; + if(this.tempImproveDescEl){ + this.nestTemplateDescEl.addEventListener('scroll',this.watchTempImproveScroll); + } + + }, + beforeDestroy(){ + this.nestTemplateDescEl && this.nestTemplateDescEl.removeEventListener('scroll', this.watchNestTempScroll); + this.tempImproveDescEl && this.tempImproveDescEl.removeEventListener('scroll',this.watchTempImproveScroll) + }, methods:{ /** * 进入嵌套模板信息字段填写 @@ -122,7 +149,8 @@ export default { this.checkNewProjData.CustomProps = [...temp]; }) this.checkNewProjData = {...this.checkNewProjData}; - }) + }) + //debugger; }, /** * 返回到人员分配 @@ -140,7 +168,7 @@ export default { showClose: false, type: "error", }).then(async() => { - const res = await templateService.queryTemplateNodeByTemplateId(this.selectTemplate.TempalteId); + const res = await templateService.queryTemplateNodeByTemplateId(this.selectTemplate.TemplateId); const node = res.Data; let params ={ ProjId: this.nestNodeFolder.projId, @@ -176,6 +204,15 @@ export default { this.checkedIndex=0; } }, + + //嵌套模板页面滚动 + watchNestTempScroll(){ + this.isNestTempScroll = this.nestTemplateDescEl.scrollTop > 0; + }, + //嵌套模板字段信息填充 + watchTempImproveScroll(){ + this.isTempImproveScroll = this.tempImproveDescEl.scrollTop > 0; + } }, watch:{ isTemNestInProp:{ @@ -187,6 +224,16 @@ export default { }, immediate: true }, + isNestTempScroll(val){ + if(val){ + setTimeout(()=>{ + this.nestTemplateDescEl = this.$refs.nestTemplateDesc; + if(this.nestTemplateDescEl){ + this.nestTemplateDescEl.addEventListener('scroll',this.watchNestTempScroll); + } + },50) + } + } } } @@ -207,24 +254,17 @@ export default { text-align: center; font-family: PingFangSC-Regular; } -.input_projname{ - width: 424px; - height: 44px; - border-radius: 4px; - background-color: rgba(233, 233, 235, 1); - border: 0.5px solid rgba(174, 174, 174, 1); - font-size: 16px; - padding-left:16px; -} + .set_position{ position: relative; border-top-right-radius: 8px; border-top-left-radius: 8px; box-shadow: none; } -.template_nest,.template_improve{ - height:calc(100vh - 50px); -} +// .template_improve{ +// height:calc(100vh - 50px); +// min-width: 400px; +// } .template_info_title{ width: 100%; line-height: 44px; @@ -234,7 +274,7 @@ export default { border-bottom: 1px solid #DEDEDF; } .template_select_content{ - height:calc(100% - 50px); + height:calc(100vh - 100px); overflow-y:scroll; .template_info{ width: 100%; @@ -278,29 +318,105 @@ export default { .template_info:hover{ background-color: rgba(50, 50, 60, 0.15); } -.template_improve_content{ - height:calc(100% - 50px); - overflow-y:scroll; - padding: 0 8px; - box-sizing: border-box; - .template_improve_info{ - line-height: 48px; - width: 100%; - color: rgba(0, 0, 0, 0.56); - .template_title{ - width: 142px; - display: inline-block; - text-align: right; +// .template_improve_content{ +// height:calc(100% - 50px); +// overflow-y:scroll; +// padding: 0 8px; +// box-sizing: border-box; +// .template_improve_info{ +// line-height: 48px; +// width: 100%; +// color: rgba(0, 0, 0, 0.56); +// .template_title{ +// //width: 142px; +// width: 30%; +// display: inline-block; +// text-align: right; - } - .template_title_info{ - display: inline-block; - margin-left: 8px; - color: rgba(50, 50, 60, 100); - } +// } +// .template_title_info{ +// display: inline-block; +// margin-left: 8px; +// color: rgba(50, 50, 60, 100); +// } +// } +// .template_improve_infoInput{ +// line-height: 64px; +// } +// .input_projname{ +// width: 120%; +// height: 44px; +// border-radius: 4px; +// background-color: rgba(233, 233, 235, 1); +// border: 0.5px solid rgba(174, 174, 174, 1); +// font-size: 16px; +// padding-left:16px; +// } +// } + .edit-template-btn, .to-distwork-btn{ + position: relative; + left: 24px; + cursor: pointer; + padding: 0 16px; + height: 32px; + line-height: 32px; + margin: 9px 0; + border-radius: 8px; + background-color: rgba(120, 80, 255, 1); + color: rgba(245, 245, 247, 100); + font-size: 14px; + text-align: center; + font-family: PingFangSC-Regular; + + } + .template_improve{ + .summary-wrap { + height: calc(100vh - 100px - 16px); + overflow: scroll; + padding: 0 24px; + margin: 16px 0 0 0; + background-color: #fcfcfc; + + /* 编辑状态下的模板自定义字段输入框 */ + .prop-value-input { + width: 80%; + height: 44px; + border-radius: 4px; + color: rgba(0, 0, 0, 0.56); + background-color: rgba(233, 233, 235, 1); + border: 0.5px solid rgba(174, 174, 174, 1); + font-size: 16px; + padding-left:16px; + + } } - .template_improve_infoInput{ - line-height: 64px; + } + .item { + display: flex; + width: 100%; + margin: 14px 0; + font-size: 14px; + font-family: PingFangSC-Regular; + color: #32323C; + .item-title { + color: #62492f; + width: 24%; + text-align: right; + } + .item-value { + margin: 0 0 0 12px; + &:not(.cover-img-wrap) { + flex: 1; + } + } } -} + .set-header-position { + position: relative !important; + color: #32323c !important; + z-index: 99; + } + .adjust-title-position { + position: relative; + top: 11px; + } \ No newline at end of file diff --git a/src/views/components_web/project/newProj.vue b/src/views/components_web/project/newProj.vue index 057d2154..09fe0564 100644 --- a/src/views/components_web/project/newProj.vue +++ b/src/views/components_web/project/newProj.vue @@ -3,7 +3,7 @@
diff --git a/src/views/main_web/recycle.vue b/src/views/main_web/recycle.vue index d166e3e9..919f50a7 100644 --- a/src/views/main_web/recycle.vue +++ b/src/views/main_web/recycle.vue @@ -195,6 +195,13 @@ export default { this.listFiles(); }, methods: { + /** + * 获取回收站里的文件 + */ + async getListFiles(){ + //const res = await fetchApi('') + + }, /** * 获取当前工作下文件 */ diff --git a/src/views/main_web/workspace/components/recyclefile.vue b/src/views/main_web/workspace/components/recyclefile.vue new file mode 100644 index 00000000..716d179e --- /dev/null +++ b/src/views/main_web/workspace/components/recyclefile.vue @@ -0,0 +1,112 @@ + + + + + \ No newline at end of file diff --git a/src/views/main_web/workspace/service.js b/src/views/main_web/workspace/service.js index b0aee50c..00c45a68 100644 --- a/src/views/main_web/workspace/service.js +++ b/src/views/main_web/workspace/service.js @@ -12,6 +12,19 @@ export async function fetchWorkFlow(projectId, userId) { }); return list; } +/** + * 查询删除的文件 + */ +export async function queryFilesFromRecycleBin() { + const res = await fetchApi('file/queryFilesFromRecycleBin'); + wrapErrorHint(res); + if (res.Code !== 0) return null; + const fileList = (res.Data || []).map(file => { + const lower = firstCharToLowerCase (file); + return lower; + }); + return fileList; +} /** * 查询文件夹下边的文件(包含子文件夹以及协同文件) diff --git a/src/views/manage_system/template/matrix.vue b/src/views/manage_system/template/matrix.vue index 52806c86..dfd69ddd 100644 --- a/src/views/manage_system/template/matrix.vue +++ b/src/views/manage_system/template/matrix.vue @@ -321,7 +321,9 @@ export default { */ async matrixRightNodeClick() { const targetUnit = this.targetUnit; + //debugger; const cloneUnit = Object.assign({}, targetUnit); + //debugger; cloneUnit.Permission = cloneUnit.Permission === 1 ? 0 : 1; const res = await services.fileExchange(cloneUnit); if (res.Code !== 0) return; @@ -358,6 +360,7 @@ export default { // PermCode为资源接受方 const key = `${unit.SysCode}->${unit.PermCode}`; unit.Editable = unit.TemplateId !== subTemplateId; + //unit.Editable = true; h[key] = unit; return h; @@ -387,10 +390,13 @@ export default { */ MatrixLookInfoMenu(event, nodeSend, nodeReceive) { this.loading = true; + // debugger; this.closeMenu(); this.MatrixLookInfoMenuVisible = true; // 显示模态窗口,跳出自定义菜单栏 const unitMap = this.unitMap; + // debugger; const key = `${nodeSend.id}->${nodeReceive.id}`; + // debugger; const targetUnit = unitMap[key]; // this.mousueCheckChangeColor(permNodeIndex, "green"); // PermissionItem.listNodePerm.forEach((realPermItem) => { @@ -401,6 +407,7 @@ export default { // permNodeItem = realPermItem; // } // }); + //debugger; if (targetUnit.Permission == 1) { this.btnMatrixLookInfo = "btnMatrixLookInfo"; } else { @@ -415,9 +422,11 @@ export default { this.loading = false; }, canEditUnit(nodeSend, nodeReceive) { + //debugger; const unitMap = this.unitMap; const key = `${nodeSend.id}->${nodeReceive.id}`; const targetUnit = unitMap[key] || { Editable: true }; + //debugger; return targetUnit.Editable; }, /** diff --git a/vue.config.js b/vue.config.js index 0e32f6da..55af1d7e 100644 --- a/vue.config.js +++ b/vue.config.js @@ -34,11 +34,18 @@ module.exports = { // // target: 'http://www.lockingos.org:8089', // target:'http://192.168.8.114:8092', - // changeOrigin: true, + // changeOricgin: true, // secure: false, // }, + // '/api/cms': { + // // target: 'http://www.lockingos.org:8089', + // target:'http://192.168.8.114:8082', + + // changeOrigin: true, + // secure: false, + // }, '/api': { - target: 'http://www.lockingos.org:9002', + target: 'http://www.lockingos.org:9003', //target: 'http://192.168.8.114:8082', changeOrigin: true, secure: false,