|
|
@@ -101,7 +101,7 @@
|
|
|
<div v-for="(item,index) in formatData" :key="index" class="content-item">
|
|
|
<div class="item">{{ index+1 }}</div>
|
|
|
<div v-for="(i,ind) in item" :key="ind" class="item">
|
|
|
- <el-tooltip v-show="i.count>0" class="item" effect="light" placement="top-start">
|
|
|
+ <el-tooltip v-show="i.count > 0 && i.show" class="item" effect="light" placement="top-start">
|
|
|
<template slot="content">
|
|
|
<div>
|
|
|
<div v-for="(ii,indd) in i.data" :key="indd" class="detail">
|
|
|
@@ -112,16 +112,15 @@
|
|
|
<div class="item" style="margin:2px 0">额定时长:{{ ii.e_ding_shi_chang_|| '/' }}</div>
|
|
|
<div class="item" style="margin:2px 0">已使用总时长:{{ ii.zsc2|| '/' }}</div>
|
|
|
<div class="item" style="margin:2px 0">当次使用时长:{{ ii.shi_yong_shi_chan|| '/' }}</div>
|
|
|
- <div class="item" style="margin:2px 0">使用时间:{{ ii.sysj1|| '/' }}</div>
|
|
|
+ <div class="item" style="margin:2px 0">使用时间:{{ ii.ri_qi_|| '/' }}</div>
|
|
|
<div class="item" style="margin:2px 0">擦拭情况:{{ ii.wan_cheng_qing_ku|| '/' }}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
<div class="green-circle" />
|
|
|
- <!-- <div v-else class="orange-circle" /> -->
|
|
|
</el-tooltip>
|
|
|
- <div v-if=" i.count===0 && i.show" class="red-circle" />
|
|
|
+ <div v-if="i.wait>0 && i.show" class="red-circle" />
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -216,35 +215,37 @@ export default {
|
|
|
const fliterData = this.dataList
|
|
|
let result = []
|
|
|
fliterData.forEach(item => {
|
|
|
- const { she_shi_id_, zi_wai_deng_ming_, deng_guan_hao_, bu_men_, gang_wei_ } = item
|
|
|
- const t = result.find(i => i.she_shi_id_ === she_shi_id_)
|
|
|
+ const { she_shi_id_, zi_wai_deng_ming_, deng_guan_hao_, bu_men_, gang_wei_, shi_fou_guo_shen_, config_id_, bian_zhi_shi_jian } = item
|
|
|
+ const t = result.find(i => i.config_id_ === config_id_)
|
|
|
if (t) {
|
|
|
t.children.push(item)
|
|
|
} else {
|
|
|
result.push({
|
|
|
- she_shi_id_: she_shi_id_ || '',
|
|
|
+ config_id_: config_id_ || '',
|
|
|
zi_wai_deng_ming_: zi_wai_deng_ming_ || '',
|
|
|
deng_guan_hao_: deng_guan_hao_ || '',
|
|
|
bu_men_: bu_men_ || '',
|
|
|
gang_wei_: gang_wei_ || '',
|
|
|
+ shi_fou_guo_shen_: shi_fou_guo_shen_ || '',
|
|
|
+ bian_zhi_shi_jian: bian_zhi_shi_jian || '',
|
|
|
children: [item]
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
- // console.log('fliterData', result)
|
|
|
+ console.log('fliterData', result)
|
|
|
this.totalList.forEach(item => {
|
|
|
- const { she_shi_id_, zi_wai_deng_ming_, deng_guan_hao_, bian_zhi_bu_men_, gang_wei_ } = item
|
|
|
- const t = result.find(i => i.she_shi_id_ === item.she_shi_id_)
|
|
|
- if (!t) {
|
|
|
- result.push({
|
|
|
- she_shi_id_: she_shi_id_ || '',
|
|
|
- zi_wai_deng_ming_: zi_wai_deng_ming_ || '',
|
|
|
- deng_guan_hao_: deng_guan_hao_ || '',
|
|
|
- bu_men_: bian_zhi_bu_men_ || '',
|
|
|
- gang_wei_: gang_wei_ || '',
|
|
|
- children: []
|
|
|
- })
|
|
|
- }
|
|
|
+ const { she_shi_id_, zi_wai_deng_ming_, deng_guan_hao_, bian_zhi_bu_men_, gang_wei_, config_id_ } = item
|
|
|
+ const t = result.find(i => i.config_id_ === item.config_id_)
|
|
|
+ // if (!t) {
|
|
|
+ // result.push({
|
|
|
+ // config_id_: config_id_ || '',
|
|
|
+ // zi_wai_deng_ming_: zi_wai_deng_ming_ || '',
|
|
|
+ // deng_guan_hao_: deng_guan_hao_ || '',
|
|
|
+ // bu_men_: bian_zhi_bu_men_ || '',
|
|
|
+ // gang_wei_: gang_wei_ || '',
|
|
|
+ // children: []
|
|
|
+ // })
|
|
|
+ // }
|
|
|
})
|
|
|
if (this.position) {
|
|
|
result = result.filter(item => item.bu_men_ === this.position)
|
|
|
@@ -266,16 +267,24 @@ export default {
|
|
|
const arr = []
|
|
|
const day = ('0' + (i + 1)).slice(-2)
|
|
|
const fullDay = this.month + '-' + day
|
|
|
- // console.log(fullDay)
|
|
|
this.fliterData.forEach(item => {
|
|
|
- const obj = {
|
|
|
+ const obj = {
|
|
|
data: [],
|
|
|
count: 0,
|
|
|
+ wait: 0,
|
|
|
show: true,
|
|
|
fullDay
|
|
|
}
|
|
|
- const tempList = item.children.filter(k => k.ri_qi_.slice(0, 10) === fullDay)
|
|
|
- obj.count = tempList.length
|
|
|
+
|
|
|
+ const tempList = item.children.filter(k => k.config_id_ && k.bian_zhi_shi_jian.slice(0, 10) === fullDay)
|
|
|
+ const overList = item.children.filter(k => k.bian_zhi_shi_jian && k.bian_zhi_shi_jian.slice(0, 10) === fullDay && (k.shi_fou_guo_shen_ == '已完成' || k.shi_fou_guo_shen_ == '无需处理'))
|
|
|
+ obj.count = overList.length
|
|
|
+
|
|
|
+ const waitList = item.children.filter(k => k.bian_zhi_shi_jian && k.bian_zhi_shi_jian.slice(0, 10) === fullDay && k.shi_fou_guo_shen_ == '待处理')
|
|
|
+ obj.wait = waitList.length
|
|
|
+
|
|
|
+ console.log('数量', overList.length, waitList.length)
|
|
|
+
|
|
|
obj.data = tempList
|
|
|
if (new Date(fullDay).getTime() > new Date(this.curTime).getTime()) {
|
|
|
obj.show = false
|
|
|
@@ -284,7 +293,6 @@ export default {
|
|
|
})
|
|
|
answer[i] = arr
|
|
|
}
|
|
|
- // console.log('answer', answer)
|
|
|
return answer
|
|
|
}
|
|
|
},
|
|
|
@@ -292,7 +300,8 @@ export default {
|
|
|
this.init()
|
|
|
const sql = `select she_shi_id_,zi_wai_deng_ming_,deng_guan_hao_,bian_zhi_bu_men_,gang_wei_ from t_jykzwdxdjlbsc where di_dian_='${this.level}' and shi_fou_ting_yong='1'`
|
|
|
const { variables: { data }} = await this.$common.request('sql', sql)
|
|
|
- this.totalList = data
|
|
|
+ console.log('totalList', data)
|
|
|
+ this.totalList = data //紫外灯记录
|
|
|
},
|
|
|
methods: {
|
|
|
handleActionEvent ({ key }) {
|
|
|
@@ -352,15 +361,14 @@ export default {
|
|
|
this.title = `紫外灯消毒月度统计`
|
|
|
const y = +this.month.split('-')[0]
|
|
|
const m = +this.month.split('-')[1]
|
|
|
- const sql = `select a.id_,a.parent_id_,a.she_bei_hao_,a.ri_qi_,a.bu_men_,a.wan_cheng_qing_ku,a.pi_ci_,a.shi_yong_shi_chan,a.zong_shi_chang_ as zsc1,a.qian_ming_,a.fang_jian_di_zhi_,a.e_ding_shi_chang_,a.zi_wai_deng_id_,a.gang_wei_,a.pan_ding_ri_qi_ as pdrq1,b.zi_wai_deng_ming_,b.zong_shi_chang_ as zsc2,b.deng_guan_hao_,b.ri_chang_zhao_she,b.shang_ci_xiao_du_,b.she_shi_id_,b.fang_jian_,b.shi_fou_gen_huan_,b.shi_fou_ting_yong,b.pan_ding_ri_qi_ as pdrq2 FROM t_jykzwdxdjlbzb a LEFT JOIN t_jykzwdxdjlbsc b ON a.zi_wai_deng_id_=b.id_ where b.di_dian_='${this.level}' and b.shi_fou_ting_yong='1' and YEAR(a.ri_qi_) = ${y} and MONTH(a.ri_qi_) = ${m}`
|
|
|
+ // const sql = `select a.id_,a.shi_fou_guo_shen_,a.she_bei_hao_,a.ri_qi_,a.bu_men_,a.wan_cheng_qing_ku,a.pi_ci_,a.shi_yong_shi_chan,a.zong_shi_chang_ as zsc1,a.qian_ming_,a.fang_jian_di_zhi_,a.e_ding_shi_chang_,a.zi_wai_deng_id_,a.gang_wei_,a.pan_ding_ri_qi_ as pdrq1,b.zi_wai_deng_ming_,b.zong_shi_chang_ as zsc2,b.deng_guan_hao_,b.ri_chang_zhao_she,b.shang_ci_xiao_du_,b.she_shi_id_,b.fang_jian_,b.shi_fou_gen_huan_,b.shi_fou_ting_yong,b.pan_ding_ri_qi_ as pdrq2 FROM t_jykzwdxdjlbzb a LEFT JOIN t_jykzwdxdjlbsc b ON a.zi_wai_deng_id_=b.she_shi_id_ where b.di_dian_='${this.level}' and b.shi_fou_ting_yong='1' and YEAR(a.ri_qi_) = ${y} and MONTH(a.ri_qi_) = ${m}`
|
|
|
+ const sql = `select a.id_, a.config_id_, a.bian_zhi_shi_jian, a.shi_fou_guo_shen_, a.she_bei_hao_, a.ri_qi_, a.bu_men_, a.wan_cheng_qing_ku, a.shi_yong_shi_chan, b.zong_shi_chang_ as zsc1,a.qian_ming_, a.fang_jian_di_zhi_,a.e_ding_shi_chang_,a.zi_wai_deng_id_,a.gang_wei_, b.zi_wai_deng_ming_,b.zong_shi_chang_ as zsc2,b.deng_guan_hao_,b.ri_chang_zhao_she,b.shang_ci_xiao_du_,b.she_shi_id_,b.fang_jian_,b.shi_fou_gen_huan_,b.shi_fou_ting_yong FROM t_jykzwdxdjlbzb a LEFT JOIN t_jykzwdxdjlbsc b ON a.config_id_=b.config_id_ where b.di_dian_='${this.level}' and b.shi_fou_ting_yong='1' and a.bian_zhi_shi_jian like '%${this.month}%'`
|
|
|
+
|
|
|
+
|
|
|
const { variables: { data }} = await this.$common.request('sql', sql)
|
|
|
- // console.log('data', data)
|
|
|
+
|
|
|
this.dataList = data
|
|
|
- // this.dataList.forEach(item => {
|
|
|
- // if (!Object.hasOwn(item, 'wei_hu_lei_xing_') || !item.wei_hu_lei_xing_) {
|
|
|
- // item.wei_hu_lei_xing_ = '按需保养'
|
|
|
- // }
|
|
|
- // })
|
|
|
+ console.log('dataList', data)
|
|
|
this.loading = false
|
|
|
}
|
|
|
}
|