Jelajahi Sumber

归档调整

cfort 3 tahun lalu
induk
melakukan
0d9d17b68c

+ 2 - 2
src/views/platform/bpmn/bpmInstHis/record/CMA.vue

@@ -9,9 +9,9 @@
         data () {
             return {
                 info: {
-                    title: 'CNAS/CMA检测档案',
+                    title: 'CNAS&CMA检测档案',
                     reportPath: '43罗湖/LHXBJY 检测报告',
-                    type: 'cnas/CMA'
+                    type: 'CNAS&CMA'
                 }
             }
         }

+ 1 - 1
src/views/platform/bpmn/bpmInstHis/record/CNAS.vue

@@ -11,7 +11,7 @@
                 info: {
                     title: 'CNAS检测档案',
                     reportPath: '43罗湖/LHXBJY 检测报告',
-                    type: 'cnas'
+                    type: 'CNAS'
                 }
             }
         }

+ 1 - 1
src/views/platform/bpmn/bpmInstHis/record/FEI.vue

@@ -9,7 +9,7 @@
         data () {
             return {
                 info: {
-                    title: '非CNAS/CMA检测档案',
+                    title: '非CNASCMA检测档案',
                     reportPath: '43罗湖/LHXBJY 检测报告',
                     type: '非'
                 }

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

@@ -77,7 +77,7 @@
                                 </div>
                                 <div v-else-if="item.key === 'file'">
                                     <el-popover placement="left" width="300" trigger="click">
-                                        <div class="operate-item" slot="reference" @click="getFile(scope.row[item.field])">
+                                        <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">
@@ -187,7 +187,7 @@
             name: '附件',
             key: 'file',
             path: '',
-            field: 'suo_you_yuan_shi_',
+            field: 'suo_you_yuan_shi_,fu_jian_yi_',
             hasItem: true
         },
         {
@@ -257,9 +257,9 @@
         created () {
             this.globalSql = `select * from t_lhjcbgb where zhuang_tai_ in ('已完成', '待发放') and bao_gao_lei_bie_ = '${this.info.type}'`
             // this.globalSql = `select * from t_lhjcbgb where bao_gao_lei_bie_ = '${this.info.type}'`
-            let sql = `${this.globalSql} order by create_time_ desc limit 0,20`
+            const sql = `${this.globalSql} order by create_time_ desc limit 0,20`
             this.loadData(sql)
-            let sumsql = `select count(*) as total  from t_lhjcbgb where zhuang_tai_ in ('已完成', '待发放') and bao_gao_lei_bie_ = '${this.info.type}'`
+            const sumsql = `select count(*) as total  from t_lhjcbgb where zhuang_tai_ in ('已完成', '待发放') and bao_gao_lei_bie_ = '${this.info.type}'`
             curdPost('sql', sumsql).then((response) => {
                 this.total = response.variables.data[0].total
             })
@@ -287,8 +287,8 @@
                         ids.trust.push(item.wei_tuo_id_)
                     })
                     // 获取合同及委托单数据用于转换ID
-                    let sql1 = `select id_, he_tong_bian_hao_ as name_ from t_bjd where find_in_set(id_, '${ids.contract.join(',')}')`
-                    let sql2 = `select id_, wei_tuo_bian_hao_ as name_ from t_lhwtsqb where find_in_set(id_, '${ids.trust.join(',')}')`
+                    const sql1 = `select id_, he_tong_bian_hao_ as name_ from t_bjd where find_in_set(id_, '${ids.contract.join(',')}')`
+                    const sql2 = `select id_, wei_tuo_bian_hao_ as name_ from t_lhwtsqb where find_in_set(id_, '${ids.trust.join(',')}')`
                     // console.log(sql1, sql2)
                     curdPost('sql', sql1).then(res1 => {
                         this.contractList = res1.variables && res1.variables.data
@@ -300,18 +300,27 @@
             },
             // 获取检测项目数据
             getTesting (row) {
-                const { wei_tuo_id_, yang_pin_bian_hao } = row
+                const { wei_tuo_id_, yang_pin_bian_hao, xiu_gai_bao_gao_b } = row
                 this.testingList = []
-                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}'`
+                const 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 find_in_set(b.jian_ce_xiang_mu_, '${xiu_gai_bao_gao_b}')`
                 curdPost('sql', sql).then(res => {
                     this.testingList = res.variables && res.variables.data
                     // console.log(this.testingList)
                 })
             },
-            // 获取附件信息,报告表【bao_gao_pdf_, suo_you_yuan_shi_】字段
-            getFile (key) {
+            // 获取附件信息,报告表【bao_gao_pdf_, suo_you_yuan_shi_, fu_jian_yi_】字段
+            getFile (row, key) {
+                let files = ''
+                if (key.includes(',')) {
+                    // 多字段
+                    let a = row.suo_you_yuan_shi_ ? row.suo_you_yuan_shi_.split(',') : []
+                    let b = row.fu_jian_yi_ ? row.fu_jian_yi_.split(',') : []
+                    files = a.concat(b).join(',')
+                } else {
+                    files = row[key]
+                }
                 this.fileList = []
-                let sql = `select id_ as id, file_name_ as fileName, ext_ as ext from ibps_file_attachment where find_in_set(id_, '${key}')`
+                const sql = `select id_ as id, file_name_ as fileName, ext_ as ext from ibps_file_attachment where find_in_set(id_, '${files}')`
                 curdPost('sql', sql).then(res => {
                     this.fileList = res.variables && res.variables.data
                 })
@@ -333,17 +342,17 @@
                         params += paramsList[item]
                     }
                 })
-                let sql = `${this.globalSql}${params} order by create_time_ desc limit 0,20`
+                const sql = `${this.globalSql}${params} order by create_time_ desc limit 0,20`
                 // console.log(sql)
                 this.loadData(sql)
             },
             handleSizeChange (value) {
                 this.currentPage = 1
-                let sql = `${this.globalSql} order by create_time_ desc limit 0,${value}`
+                const sql = `${this.globalSql} order by create_time_ desc limit 0,${value}`
                 this.loadData(sql)
             },
             handleCurrentChange (value) {
-                let sql = `${this.globalSql} order by create_time_ desc limit ${value},20`
+                const sql = `${this.globalSql} order by create_time_ desc limit ${value},20`
                 this.loadData(sql)
             },
             alertReport (path, id) {
@@ -373,7 +382,7 @@
             },
             openWindow () {
                 let routeData = this.$router.resolve({
-                    path: "/fileView",
+                    path: '/fileView',
                     query: this.fileOption
                 })
                 window.open(routeData.href);