|
|
@@ -40,6 +40,7 @@
|
|
|
<script>
|
|
|
import screenfull from 'screenfull'
|
|
|
import curdPost from '@/business/platform/form/utils/custom/joinCURD.js'
|
|
|
+ import { acceptList } from './data.js'
|
|
|
export default {
|
|
|
name: 'checkBoard',
|
|
|
components: {
|
|
|
@@ -142,7 +143,7 @@
|
|
|
// console.log(sql)
|
|
|
curdPost('sql', sql).then(res => {
|
|
|
const data = res.variables.data
|
|
|
- console.log(data)
|
|
|
+ // console.log(data)
|
|
|
|
|
|
if ( data && data.length ) {
|
|
|
const { month, accepted, approval, jcFinish, jcTotal, process, report, rwFinish, task, today, week, quarter, bgFinish } = data[0]
|
|
|
@@ -242,7 +243,12 @@
|
|
|
// const sql1 = `select tm.jian_ce_xiang_mu_, tm.jian_ce_lei_bie_, IFNULL(rw.qi_wang_wan_cheng, '') as qi_wang_wan_cheng, rw.zhuang_tai_, ipe.NAME_ from t_rwfpb rw, ibps_party_employee ipe, t_mjjcnlfw tm where rw.jian_ce_yuan_ = ipe.ID_ and rw.jian_ce_xiang_mu_ = tm.id_ and rw.create_time_ like '${this.month}%'`
|
|
|
const sql1 = `select tm.jian_ce_xiang_mu_, tm.jian_ce_lei_bie_, IFNULL(rwz.create_time_, '') as qi_wang_wan_cheng, rw.zhuang_tai_, ipe.NAME_ from t_lhrwfpb rw, ibps_party_employee ipe, t_mjjcnlfw tm, t_mjrwfpzb rwz where rwz.jian_ce_yuan_ = ipe.ID_ and rwz.jian_ce_xiang_mu_ = tm.id_ and rw.id_ = rwz.wai_jian_ and rw.create_time_ like '${this.month}%'`
|
|
|
// 获取检测受理类型数据
|
|
|
- const sql2 = `select count(tm.jian_ce_lei_bie_ = '理化' or null) as lh, count(tm.jian_ce_lei_bie_ = '微生物' or null) as wsw, count(tm.jian_ce_lei_bie_ = '细胞活率' or null) as xbhl, count(tm.jian_ce_lei_bie_ = '残留检测' or null) as cljc, count(tm.jian_ce_lei_bie_ = '细胞鉴别' or null) as xbjb from t_lhjczb tj, t_mjjcnlfw tm where tj.jian_ce_xiang_mu_ = tm.id_ and tj.create_time_ like '${this.month}%'`
|
|
|
+ let sqlStr = ''
|
|
|
+ acceptList.forEach((item, index) => {
|
|
|
+ sqlStr += `count(tm.jian_ce_lei_bie_ = '${item}' or null) as r${index}${index === acceptList.length - 1 ? '' : ', '}`
|
|
|
+ })
|
|
|
+ const sql2 = `select ${sqlStr} from t_lhjczb tj, t_mjjcnlfw tm where tj.jian_ce_xiang_mu_ = tm.id_ and tj.create_time_ like '${this.month}%'`
|
|
|
+ // console.log(sqlStr, sql2)
|
|
|
|
|
|
Promise.all([
|
|
|
curdPost('sql', sql1),
|
|
|
@@ -257,7 +263,16 @@
|
|
|
this.middleCardData.tableData.data.push(Object.values(item))
|
|
|
})
|
|
|
|
|
|
- this.middleCardData.acceptData = Object.values(data2[0])
|
|
|
+ let result = []
|
|
|
+ let tempRes = Object.values(data2[0])
|
|
|
+ acceptList.forEach((item, index) => {
|
|
|
+ let o = {
|
|
|
+ name: item,
|
|
|
+ value: tempRes[index]
|
|
|
+ }
|
|
|
+ result.push(o)
|
|
|
+ })
|
|
|
+ this.middleCardData.acceptData = result
|
|
|
this.middleCardData.flag = true
|
|
|
}).catch(error => {
|
|
|
console.log(error)
|