Преглед изворни кода

非检测档案改为全部检测档案

cfort пре 2 година
родитељ
комит
7d2e33cde5

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

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

+ 4 - 2
src/views/platform/bpmn/bpmInstHis/record/component/testingRecord.vue

@@ -274,11 +274,13 @@
             }
         },
         created () {
-            this.globalSql = `select * from t_lhjcbgb where zhuang_tai_ in ('已完成', '待发放') and bao_gao_lei_bie_ = '${this.info.type}'`
+            // 全部检测档案type为空
+            const args = this.info.type ? ` and bao_gao_lei_bie_ = '${this.info.type}'` : ''
+            this.globalSql = `select * from t_lhjcbgb where zhuang_tai_ in ('已完成', '待发放')${args}`
             // this.globalSql = `select * from t_lhjcbgb where bao_gao_lei_bie_ = '${this.info.type}'`
             const sql = `${this.globalSql} order by create_time_ desc limit 0,20`
             this.loadData(sql)
-            const 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 ('已完成', '待发放')${args}`
             curdPost('sql', sumsql).then((response) => {
                 this.total = response.variables.data[0].total
             })