cfort 3 лет назад
Родитель
Сommit
b80fbd8777
1 измененных файлов с 15 добавлено и 20 удалено
  1. 15 20
      src/views/platform/bpmn/bpmInstHis/record/component/testingRecord.vue

+ 15 - 20
src/views/platform/bpmn/bpmInstHis/record/component/testingRecord.vue

@@ -55,6 +55,7 @@
                                 <i class="el-icon-caret-bottom"></i>查阅
                             </div>
                             <template v-for="(item ,index) in reportList">
+                                <!-- 检测记录 -->
                                 <div v-if="item.key === 'testing'">
                                     <el-popover placement="left" width="200" trigger="click">
                                         <div class="operate-item" slot="reference" @click="getTesting(scope.row)">
@@ -73,8 +74,8 @@
                                     </el-popover>
                                 </div>
                                 <div v-else-if="item.key === 'file'">
-                                    <el-popover placement="left" width="200" trigger="click">
-                                        <div class="operate-item" slot="reference" @click="getFile(scope.row)">
+                                    <el-popover placement="left" width="300" trigger="click">
+                                        <div class="operate-item" slot="reference" @click="getFile(scope.row[item.field])">
                                             <i class="el-icon-s-order"></i> {{item.name}}
                                         </div>
                                         <div class="three-item">
@@ -84,7 +85,7 @@
                                                 class="operate-item"
                                                 @click="preview(i)"
                                             >
-                                                {{ i.fileName }}.{{ i.ext }}
+                                                <i class="el-icon-tickets"></i>{{ i.fileName }}.{{ i.ext }}
                                             </div>
                                         </div>
                                     </el-popover>
@@ -184,31 +185,29 @@
             name: '附件',
             key: 'file',
             path: '',
+            field: 'suo_you_yuan_shi_',
             hasItem: true
         },
         {
             name: '检测报告',
-            key: 'id_',
-            path: '43罗湖/LH非 检测报告.rpx',
+            key: 'file',
+            path: '',
+            field: 'bao_gao_pdf_',
             hasItem: false
         }
     ]
     // 非通用检测项目编号及报表路径
     const specialTest = [
         {
-            id: '1-1',
-            path: '43罗湖/LHXBJY-JC-SOP-001-FQ-01 无菌检测记录表.rpx'
-        },
-        {
-            id: '1-2',
+            id: 'Process_0idt26n',
             path: '43罗湖/LHXBJY-JC-SOP-001-FQ-01 无菌检测记录表.rpx'
         },
         {
-            id: '2',
+            id: 'Process_1rwhy1r',
             path: '43罗湖/LHXBJY-JC-SOP-002-FQ-01 支原体检测(培养法).rpx'
         },
         {
-            id: '3',
+            id: 'Process_05lkhio',
             path: '43罗湖/LHXBJY-JC-SOP-003-FQ-01 细菌内毒素检查记录表.rpx'
         }
     ]
@@ -233,7 +232,7 @@
             }
         },
         data () {
-            reportList[1].path = this.info.reportPath
+            reportList[reportList.length - 1].path = this.info.reportPath
             return {
                 searchList,
                 reportList,
@@ -309,20 +308,16 @@
             getTesting (row) {
                 const { wei_tuo_id_, yang_pin_bian_hao } = row
                 this.testingList = []
-                let sql = `select b.id_ as id, a.xiang_mu_bian_hao as number, a.jian_ce_xiang_mu_ as projectName from t_mjjcnlfw a, t_lhjczb b where a.id_ = b.jian_ce_xiang_mu_ and b.wei_tuo_id_ = '${wei_tuo_id_}' and b.yang_pin_bian_hao = '${yang_pin_bian_hao}'`
+                let sql = `select b.id_ as id, a.defkey_ as number, a.jian_ce_xiang_mu_ as projectName from t_mjjcnlfw a, t_lhjczb b where a.id_ = b.jian_ce_xiang_mu_ and b.wei_tuo_id_ = '${wei_tuo_id_}' and b.yang_pin_bian_hao = '${yang_pin_bian_hao}' and jian_ce_lei_xing_ = '${this.info.type}'`
                 curdPost('sql', sql).then(res => {
                     this.testingList = res.variables && res.variables.data
                     // console.log(this.testingList)
                 })
             },
             // 获取附件信息,报告表【bao_gao_pdf_, suo_you_yuan_shi_】字段
-            getFile (row) {
+            getFile (key) {
                 this.fileList = []
-                const { bao_gao_pdf_, suo_you_yuan_shi_ } = row
-                let fileArr = [bao_gao_pdf_]
-                fileArr = fileArr.concat(suo_you_yuan_shi_.split(','))
-                // console.log(fileArr)
-                let sql = `select id_ as id, file_name_ as fileName, ext_ as ext from ibps_file_attachment where find_in_set(id_, '${fileArr.join(',')}')`
+                let sql = `select id_ as id, file_name_ as fileName, ext_ as ext from ibps_file_attachment where find_in_set(id_, '${key}')`
                 curdPost('sql', sql).then(res => {
                     this.fileList = res.variables && res.variables.data
                 })