diff --git a/ruoyi-ui/src/views/kaohe/employee/index.vue b/ruoyi-ui/src/views/kaohe/employee/index.vue index 870c761..5b410f5 100644 --- a/ruoyi-ui/src/views/kaohe/employee/index.vue +++ b/ruoyi-ui/src/views/kaohe/employee/index.vue @@ -103,9 +103,16 @@ size="mini" type="text" icon="el-icon-view" + v-hasPermi="['kaohe:employee:query']" + @click="viewFuJian(scope.row)" + >详情 + 附件详情/编辑 + >编辑 @@ -276,7 +283,7 @@ - +
@@ -323,6 +330,31 @@
+ + + + + + 附件主题:{{ item.title }} + + + 附件简介:{{ item.docDiscrip }} + + + + +
+ 附件 +
+ +
+ +
+ @@ -388,6 +420,15 @@ export default { }, // 修改内容行 updataRow: {}, + // 附件详情参数 + viewUploadFJ: { + // 是否显示弹出层 + open: false, + // 附件上传 + fileList: [], + // 附件上传 + docDiscripList: [] + }, // 弹出层标题 title: "", // 是否显示弹出层 @@ -420,10 +461,16 @@ export default { }, created() { let userInfo = this.$store.state.user + console.log(userInfo); + // 职工角色 employee if(userInfo.roles.length===1 && userInfo.roles[0]==='employee'){ this.isEmployee = true; this.queryParams.wordId = userInfo.name } + // 部门角色 deptRole + if(userInfo.roles.length===1 && userInfo.roles[0]==='deptRole'){ + this.queryParams.deptId = userInfo.deptId + } this.getList() this.getDeptTree() }, @@ -579,6 +626,26 @@ export default { this.$refs.upload.submit() }, // 附件详情 + viewFuJian(row){ + this.viewUploadFJ.fileList = []; + this.viewUploadFJ.docDiscripList = [{ + title:'', + docDiscrip:'', + }]; + if(row.docs){ + let arr = row.docs.split(';'); + arr.forEach( item => { + let arr1 = item.split(','); + this.viewUploadFJ.fileList.push({ + name: arr1[0], + url: arr1[1] + }); + }) + this.viewUploadFJ.docDiscripList = JSON.parse(row.docDiscrip); + } + this.viewUploadFJ.open = true; + }, + // 附件编辑 handleFuJian(row){ this.updataRow = row; this.uploadFJ.fileList = []; @@ -686,5 +753,11 @@ export default { width: 360px; } } + + .yy_fj_list1 { + height: 36px; + line-height: 36px; + border-bottom: 1px solid #39CCCC; + } } diff --git a/ruoyi-ui/src/views/kaohe/ld_employee/index.vue b/ruoyi-ui/src/views/kaohe/ld_employee/index.vue index 1c0a6f4..6cb44fd 100644 --- a/ruoyi-ui/src/views/kaohe/ld_employee/index.vue +++ b/ruoyi-ui/src/views/kaohe/ld_employee/index.vue @@ -105,9 +105,9 @@ size="mini" type="text" icon="el-icon-view" - v-hasPermi="['kaohe:employee:docs']" - @click="handleFuJian(scope.row)" - >附件详情 + v-hasPermi="['kaohe:employee:query']" + @click="viewFuJian(scope.row)" + >详情
- + + + + + + + + 附件主题:{{ item.title }} + + + 附件简介:{{ item.docDiscrip }} + + + + +
+ 附件 +
+ +
+
@@ -417,7 +442,16 @@ export default { wordId: [ { required: true, message: "工号不能为空", trigger: "blur" } ], - } + }, + // 附件详情参数 + viewUploadFJ: { + // 是否显示弹出层 + open: false, + // 附件上传 + fileList: [], + // 附件上传 + docDiscripList: [] + }, } }, created() { @@ -664,7 +698,27 @@ export default { this.getList(); }) } - } + }, + // 附件详情 + viewFuJian(row){ + this.viewUploadFJ.fileList = []; + this.viewUploadFJ.docDiscripList = [{ + title:'', + docDiscrip:'', + }]; + if(row.docs){ + let arr = row.docs.split(';'); + arr.forEach( item => { + let arr1 = item.split(','); + this.viewUploadFJ.fileList.push({ + name: arr1[0], + url: arr1[1] + }); + }) + this.viewUploadFJ.docDiscripList = JSON.parse(row.docDiscrip); + } + this.viewUploadFJ.open = true; + }, } } @@ -704,5 +758,13 @@ export default { width: 360px; } } + + + .yy_fj_list1 { + height: 36px; + line-height: 36px; + border-bottom: 1px solid #39CCCC; + } + } diff --git a/ruoyi-ui/src/views/system/dept/index.vue b/ruoyi-ui/src/views/system/dept/index.vue index 530cede..abe8d3c 100644 --- a/ruoyi-ui/src/views/system/dept/index.vue +++ b/ruoyi-ui/src/views/system/dept/index.vue @@ -64,9 +64,16 @@ size="mini" type="text" icon="el-icon-view" + v-hasPermi="['system:dept:query']" + @click="viewFuJian(scope.row)" + >详情 + 附件详情/编辑 + >编辑 @@ -167,8 +174,8 @@
- - + +
@@ -215,6 +222,31 @@
+ + + + + + 附件主题:{{ item.title }} + + + 附件简介:{{ item.docDiscrip }} + + + + +
+ 附件 +
+ +
+ +
+ @@ -298,6 +330,15 @@ export default { }, // 修改内容行 updataRow: {}, + // 附件详情参数 + viewUploadFJ: { + // 是否显示弹出层 + open: false, + // 附件上传 + fileList: [], + // 附件上传 + docDiscripList: [] + }, } }, created() { @@ -489,7 +530,27 @@ export default { this.getList(); }) } - } + }, + // 附件详情 + viewFuJian(row){ + this.viewUploadFJ.fileList = []; + this.viewUploadFJ.docDiscripList = [{ + title:'', + docDiscrip:'', + }]; + if(row.docs){ + let arr = row.docs.split(';'); + arr.forEach( item => { + let arr1 = item.split(','); + this.viewUploadFJ.fileList.push({ + name: arr1[0], + url: arr1[1] + }); + }) + this.viewUploadFJ.docDiscripList = JSON.parse(row.docDiscrip); + } + this.viewUploadFJ.open = true; + }, } } @@ -529,5 +590,12 @@ export default { width: 360px; } } + + .yy_fj_list1 { + height: 36px; + line-height: 36px; + border-bottom: 1px solid #39CCCC; + } + }