Explorar el Código

检测档案新增查阅授权签字人pdf

cfort hace 3 años
padre
commit
9fce5c0713

+ 64 - 6
src/views/platform/bpmn/bpmInstHis/listType/CMAjiancedangan.vue

@@ -146,7 +146,29 @@
               style="color: #85ce61"
               @click="alertReport(reports.jiancebaogao, scope.row.id_)"
             >
-              <i class="el-icon-s-order"></i>检测报告
+            <i class="el-icon-s-order"></i> 检测报告
+            </div>
+              <div v-if="scope.row && scope.row.shou_quan_qian_z">
+                <el-popover placement="left" width="200" trigger="click">
+                  <div
+                    class="div_test item"
+                    style="color: #85ce61"
+                    slot="reference"
+                    @click="getFile(scope.row.shou_quan_qian_z)"
+                  >
+                    <i class="el-icon-s-order"></i> 授权签字人PDF
+                  </div>
+                  <div class="three-item">
+                    <div
+                      style="color: #85ce61; cursor: pointer"
+                      v-for="i in fileList"
+                      :key="i.id_"
+                      @click="preview(i)"
+                    >
+                      {{ i.fileName }}.{{ i.ext }}
+                    </div>
+                  </div>
+                </el-popover>
             </div>
           </el-popover>
         </template>
@@ -188,6 +210,7 @@
 <script>
 import curdPost from "@/business/platform/form/utils/custom/joinCURD.js";
 import GetReport from "../corresponding/getReport.js";
+import { SYSTEM_URL, BASE_API } from '@/api/baseUrl'
 export default {
   mixins: [GetReport],
   data() {
@@ -215,7 +238,13 @@ export default {
       hetong: [],
       triggerType: "click",
       wTBH:[],
-      tongyonglujin:'',//检测项目通用路径
+      tongyonglujin: '',// 检测项目通用路径
+      srcUrl: '',
+      fileList: [],
+      fileType: '',
+      fileOption: {
+        user: {}
+      }
     };
   },
   filters: {
@@ -252,16 +281,15 @@ export default {
     },
   },
   created() {
-    let this_= this;
     let sql ="select * from t_mjjcbg WHERE shi_fou_yu_bao_ga='否' and lei_bie_qu_fen_yu ='cnas/CMA' and (zhuang_tai_ = '报告待发放' or  zhuang_tai_ = '完成')  ORDER BY create_time_ DESC limit 0,20";
     this.loadData(sql);
     let sumsql ="select COUNT(*) AS sum  FROM t_mjjcbg WHERE shi_fou_yu_bao_ga='否' and lei_bie_qu_fen_yu ='cnas/CMA' and (zhuang_tai_ ='报告待发放' or  zhuang_tai_ = '完成')";
     curdPost("sql", sumsql).then((response) => {
-      this_.total = response.variables.data[0].sum;
+      this.total = response.variables.data[0].sum;
     });
     let sql2 ="select id_,yuan_shi_ji_lu_ba FROM t_mjjcnlfw WHERE id_ ='f5a95b425d444b549d5a217d4c031855'";
     curdPost("sql", sql2).then((response) => {
-      this_.tongyonglujin = response.variables.data[0].yuan_shi_ji_lu_ba;
+      this.tongyonglujin = response.variables.data[0].yuan_shi_ji_lu_ba;
     });
   },
   methods: {
@@ -360,7 +388,7 @@ export default {
           let data = res.variables.data;
           data.forEach(item=>{
             if(item.id_ ==itemId){
-              this.alertReport(item.yuan_shi_ji_lu_ba?item.yuan_shi_ji_lu_ba:this_.tongyonglujin,shujuid);
+              this.alertReport(item.yuan_shi_ji_lu_ba?item.yuan_shi_ji_lu_ba:this.tongyonglujin,shujuid);
             }
           })
         });
@@ -525,6 +553,36 @@ export default {
         ", 20";
       this.loadData(sql);
     },
+    // 获取附件信息
+    getFile (data) {
+        this.fileList = []
+        let sql = `select id_ as id, file_name_ as fileName, ext_ as ext from ibps_file_attachment where find_in_set(id_, '${data}')`
+        curdPost('sql', sql).then(res => {
+            this.fileList = res.variables && res.variables.data
+        })
+    },
+    // 文件预览
+    preview (file) {
+        this.getOption(file)
+        this.openWindow()
+        this.fileType = ''
+    },
+    getOption (file) {
+        this.fileOption.user.id = this.$store.getters.userId
+        this.fileOption.user.name = this.$store.getters.name
+        this.fileOption.url = BASE_API() + SYSTEM_URL() + `/file/download?attachmentId=${file.id}`
+        this.fileOption.editUrl = BASE_API() + SYSTEM_URL() + `/file/editCallback?fileName=${file.fileName}&fileType=${file.ext}&id=${file.id}`
+        this.fileOption.title = file.fileName
+        this.fileOption.fileType = file.ext
+        console.log(this.fileOption)
+    },
+    openWindow () {
+        let routeData = this.$router.resolve({
+            path: '/fileView',
+            query: this.fileOption
+        })
+        window.open(routeData.href);
+    }
   },
 };
 </script>

+ 63 - 4
src/views/platform/bpmn/bpmInstHis/listType/CNASjiancedangan.vue

@@ -145,7 +145,29 @@
               style="color: #85ce61"
               @click="alertReport(reports.jiancebaogao, scope.row.id_)"
             >
-              <i class="el-icon-s-order"></i>检测报告
+              <i class="el-icon-s-order"></i> 检测报告
+            </div>
+              <div v-if="scope.row && scope.row.shou_quan_qian_z">
+                <el-popover placement="left" width="200" trigger="click">
+                  <div
+                    class="div_test item"
+                    style="color: #85ce61"
+                    slot="reference"
+                    @click="getFile(scope.row.shou_quan_qian_z)"
+                  >
+                    <i class="el-icon-s-order"></i> 授权签字人PDF
+                  </div>
+                  <div class="three-item">
+                    <div
+                      style="color: #85ce61; cursor: pointer"
+                      v-for="i in fileList"
+                      :key="i.id_"
+                      @click="preview(i)"
+                    >
+                      {{ i.fileName }}.{{ i.ext }}
+                    </div>
+                  </div>
+                </el-popover>
             </div>
           </el-popover>
         </template>
@@ -187,6 +209,7 @@
 <script>
 import curdPost from "@/business/platform/form/utils/custom/joinCURD.js";
 import GetReport from "../corresponding/getReport.js";
+import { SYSTEM_URL, BASE_API } from '@/api/baseUrl'
 export default {
   mixins: [GetReport],
   data() {
@@ -214,7 +237,13 @@ export default {
       hetong: [],
       triggerType: "click",
       wTBH: [],
-      tongyonglujin:'',
+      tongyonglujin: '',// 检测项目通用路径
+      srcUrl: '',
+      fileList: [],
+      fileType: '',
+      fileOption: {
+        user: {}
+      }
     };
   },
   filters: {
@@ -260,7 +289,7 @@ export default {
     });
     let sql2 ="select id_,yuan_shi_ji_lu_ba FROM t_mjjcnlfw WHERE id_ ='f5a95b425d444b549d5a217d4c031855'";
     curdPost("sql", sql2).then((response) => {
-      this_.tongyonglujin = response.variables.data[0].yuan_shi_ji_lu_ba;
+      this.tongyonglujin = response.variables.data[0].yuan_shi_ji_lu_ba;
     });
   },
   methods: {
@@ -359,7 +388,7 @@ export default {
           let data = res.variables.data;
           data.forEach(item=>{
             if(item.id_ ==itemId){
-              this.alertReport(item.yuan_shi_ji_lu_ba?item.yuan_shi_ji_lu_ba:this_.tongyonglujin,shujuid);
+              this.alertReport(item.yuan_shi_ji_lu_ba?item.yuan_shi_ji_lu_ba:this.tongyonglujin,shujuid);
             }
           })
         });
@@ -527,6 +556,36 @@ export default {
         ", 20";
       this.loadData(sql);
     },
+    // 获取附件信息
+    getFile (data) {
+        this.fileList = []
+        let sql = `select id_ as id, file_name_ as fileName, ext_ as ext from ibps_file_attachment where find_in_set(id_, '${data}')`
+        curdPost('sql', sql).then(res => {
+            this.fileList = res.variables && res.variables.data
+        })
+    },
+    // 文件预览
+    preview (file) {
+        this.getOption(file)
+        this.openWindow()
+        this.fileType = ''
+    },
+    getOption (file) {
+        this.fileOption.user.id = this.$store.getters.userId
+        this.fileOption.user.name = this.$store.getters.name
+        this.fileOption.url = BASE_API() + SYSTEM_URL() + `/file/download?attachmentId=${file.id}`
+        this.fileOption.editUrl = BASE_API() + SYSTEM_URL() + `/file/editCallback?fileName=${file.fileName}&fileType=${file.ext}&id=${file.id}`
+        this.fileOption.title = file.fileName
+        this.fileOption.fileType = file.ext
+        console.log(this.fileOption)
+    },
+    openWindow () {
+        let routeData = this.$router.resolve({
+            path: '/fileView',
+            query: this.fileOption
+        })
+        window.open(routeData.href);
+    }
   },
 };
 </script>

+ 63 - 6
src/views/platform/bpmn/bpmInstHis/listType/feijiancedangan.vue

@@ -28,7 +28,6 @@
       :stripe="true"
       style="width: 100%"
       height="75vh"
-      :row-class-name="tableRowClassName"
       :header-cell-style="{
         color: '#000',
         'font-size': '14px',
@@ -148,7 +147,29 @@
               style="color: #85ce61"
               @click="alertReport(reports.jiancebaogao, scope.row.id_)"
             >
-              <i class="el-icon-s-order"></i>检测报告
+            <i class="el-icon-s-order"></i> 检测报告
+            </div>
+              <div v-if="scope.row && scope.row.shou_quan_qian_z">
+                <el-popover placement="left" width="200" trigger="click">
+                  <div
+                    class="div_test item"
+                    style="color: #85ce61"
+                    slot="reference"
+                    @click="getFile(scope.row.shou_quan_qian_z)"
+                  >
+                    <i class="el-icon-s-order"></i> 授权签字人PDF
+                  </div>
+                  <div class="three-item">
+                    <div
+                      style="color: #85ce61; cursor: pointer"
+                      v-for="i in fileList"
+                      :key="i.id_"
+                      @click="preview(i)"
+                    >
+                      {{ i.fileName }}.{{ i.ext }}
+                    </div>
+                  </div>
+                </el-popover>
             </div>
           </el-popover>
         </template>
@@ -190,6 +211,7 @@
 <script>
 import curdPost from "@/business/platform/form/utils/custom/joinCURD.js";
 import GetReport from "../corresponding/getReport.js";
+import { SYSTEM_URL, BASE_API } from '@/api/baseUrl'
 export default {
   data() {
     return {
@@ -216,7 +238,13 @@ export default {
       hetong: [],
       triggerType: "click",
       wTBH: [],
-      tongyonglujin:'',//检测项目通用路径
+      tongyonglujin: '',// 检测项目通用路径
+      srcUrl: '',
+      fileList: [],
+      fileType: '',
+      fileOption: {
+        user: {}
+      }
     };
   },
   mixins: [GetReport],
@@ -251,7 +279,6 @@ export default {
     },
   },
   created() {
-    let this_ = this;
     let sql =
       "select * from t_mjjcbg WHERE shi_fou_yu_bao_ga='否' and lei_bie_qu_fen_yu ='非' and (zhuang_tai_ ='报告待发放' or  zhuang_tai_ = '完成') ORDER BY create_time_ DESC limit 0,20";
     // curdPost("sql", sql).then((response) => {
@@ -265,7 +292,7 @@ export default {
     });
     let sql2 ="select id_,yuan_shi_ji_lu_ba FROM t_mjjcnlfw WHERE id_ ='f5a95b425d444b549d5a217d4c031855'";
     curdPost("sql", sql2).then((response) => {
-      this_.tongyonglujin = response.variables.data[0].yuan_shi_ji_lu_ba;
+      this.tongyonglujin = response.variables.data[0].yuan_shi_ji_lu_ba;
     });
   },
   methods: {
@@ -351,7 +378,7 @@ export default {
           let data = res.variables.data;
           data.forEach(item=>{
             if(item.id_ ==itemId){
-              this.alertReport(item.yuan_shi_ji_lu_ba?item.yuan_shi_ji_lu_ba:this_.tongyonglujin,shujuid);
+              this.alertReport(item.yuan_shi_ji_lu_ba?item.yuan_shi_ji_lu_ba:this.tongyonglujin,shujuid);
             }
           })
         });
@@ -548,6 +575,36 @@ export default {
         ", 20";
       this.loadData(sql);
     },
+    // 获取附件信息
+    getFile (data) {
+        this.fileList = []
+        let sql = `select id_ as id, file_name_ as fileName, ext_ as ext from ibps_file_attachment where find_in_set(id_, '${data}')`
+        curdPost('sql', sql).then(res => {
+            this.fileList = res.variables && res.variables.data
+        })
+    },
+    // 文件预览
+    preview (file) {
+        this.getOption(file)
+        this.openWindow()
+        this.fileType = ''
+    },
+    getOption (file) {
+        this.fileOption.user.id = this.$store.getters.userId
+        this.fileOption.user.name = this.$store.getters.name
+        this.fileOption.url = BASE_API() + SYSTEM_URL() + `/file/download?attachmentId=${file.id}`
+        this.fileOption.editUrl = BASE_API() + SYSTEM_URL() + `/file/editCallback?fileName=${file.fileName}&fileType=${file.ext}&id=${file.id}`
+        this.fileOption.title = file.fileName
+        this.fileOption.fileType = file.ext
+        console.log(this.fileOption)
+    },
+    openWindow () {
+        let routeData = this.$router.resolve({
+            path: '/fileView',
+            query: this.fileOption
+        })
+        window.open(routeData.href);
+    }
   },
 };
 </script>