Selaa lähdekoodia

fix:补充以往体系运行记录附件可按权限下载逻辑

liujiayin 2 vuotta sitten
vanhempi
sitoutus
12521f9b85
1 muutettua tiedostoa jossa 24 lisäystä ja 9 poistoa
  1. 24 9
      src/views/platform/bpmn/bpmInstHis/oldFilesUploadList.vue

+ 24 - 9
src/views/platform/bpmn/bpmInstHis/oldFilesUploadList.vue

@@ -34,7 +34,7 @@
                     :value="scope.row.fu_jian_"
                     readonly
                     allow-download
-                    :download="false"
+                    :download="fileDownloadAuthority"
                     :multiple="true"
                 />
             </template>
@@ -94,6 +94,19 @@ export default {
         },
     },
     data() {
+        const { role } = this.$store.getters.userInfo;
+        const roleKey = ["xtgljs", "syszr", "dagly", "xxgljs"];
+        var fileDownloadAuthority = false;
+        for (const i of roleKey) {
+            if (
+                role.some((so) => {
+                    return so.alias === i;
+                })
+            ) {
+                fileDownloadAuthority = true;
+                break;
+            }
+        }
         return {
             width: 200,
             selection: false,
@@ -169,7 +182,7 @@ export default {
                     {
                         prop: "nian_du_",
                         label: "年度",
-                        width: 80,
+                        width: 50,
                         dateFormat: "yyyy",
                         sortable: "custom",
                     },
@@ -177,12 +190,12 @@ export default {
                     {
                         prop: "biao_dan_ming_che",
                         label: "表单名称",
-                        width: 350,
+                        width: 150,
                     },
                     {
                         prop: "shi_wu_shuo_ming_",
                         label: "事务说明",
-                        width: 350,
+                        width: 300,
                     },
 
                     {
@@ -191,7 +204,7 @@ export default {
                         width: 100,
                     },
                     //   { prop: 'bm_name', label: '上传部门', width: 120 },
-                    { prop: "ry_name", label: "上传人", width: 100 },
+                    { prop: "ry_name", label: "上传人", width: 80 },
                     {
                         prop: "fu_jian_",
                         label: "附件",
@@ -200,6 +213,7 @@ export default {
                     },
                 ],
             },
+            fileDownloadAuthority
         };
     },
     created() {
@@ -285,7 +299,7 @@ export default {
                     ? ` where biao_dan_ming_che like '%${this.guanJian}%' or shi_wu_shuo_ming_ like '%${this.guanJian}%'`
                     : "";
                 let sql =
-                    "select * FROM t_ywyxjlb jl  LEFT JOIN lh_bm_ry ry ON ry.ry_id  = jl.bian_zhi_ren_" +
+                    "select *,ee.name_ as ry_name FROM t_ywyxjlb jl left join ibps_party_employee ee on ee.id_ = jl.bian_zhi_ren_  LEFT JOIN lh_bm_ry ry ON ry.ry_id  = jl.bian_zhi_ren_" +
                     where +
                     ` order by nian_du_ ${this.sorts.NIAN_DU_}, bian_zhi_shi_jian desc`;
                 curdPost("sql", sql)
@@ -364,7 +378,9 @@ export default {
                     ? ` where biao_dan_ming_che like '%${this.guanJian}%' or shi_wu_shuo_ming_ like '%${this.guanJian}%'`
                     : "";
                 let sql =
-                    `select jl.*,file.file_name_,file.ext_  FROM t_ywyxjlb jl  LEFT JOIN lh_bm_ry ry ON ry.ry_id  = jl.bian_zhi_ren_  left join ibps_file_attachment file on jl.fu_jian_ = file.id_ ` +
+                    `select jl.*,file.file_name_,file.ext_,ee.name_ as ry_name  FROM t_ywyxjlb jl  
+                    left join ibps_party_employee ee on ee.id_ = jl.bian_zhi_ren_
+                    LEFT JOIN lh_bm_ry ry ON ry.ry_id  = jl.bian_zhi_ren_  left join ibps_file_attachment file on jl.fu_jian_ = file.id_ ` +
                     where +
                     ` order by nian_du_ ${this.sorts.NIAN_DU_},bian_zhi_shi_jian desc`;
 
@@ -502,8 +518,7 @@ export default {
                 type: "warning",
             })
                 .then(() => {})
-                .catch(() => {
-                });
+                .catch(() => {});
         },
         /**
          * 处理按钮事件