|
|
@@ -4,8 +4,8 @@
|
|
|
<!-- :style="{height:height}" -->
|
|
|
<div class="statistics">
|
|
|
<div class="editDate">
|
|
|
- <!-- <div class="stitle">实验室看板大屏</div> -->
|
|
|
- <!-- <div class="block" style="display:none">
|
|
|
+ <!-- <div class="stitle">实验室管理看板</div>
|
|
|
+ <div class="block" style="display:none">
|
|
|
<span class="demonstration">开始:</span>
|
|
|
<el-date-picker v-model="BeginDate" type="year" size="mini" value-format="yyyy" format="yyyy年" style="width: 96px;"
|
|
|
:clearable="false" @change="checkYear(BeginDate,'begin')" placeholder="选择日期">
|
|
|
@@ -14,10 +14,17 @@
|
|
|
|
|
|
<div class="block">
|
|
|
<span class="demonstration">查询年度:</span>
|
|
|
- <el-date-picker v-model="endDate" type="year" size="mini" value-format="yyyy" format="yyyy年" :clearable="false" style="width: 96px;"
|
|
|
- @change="checkYear(endDate,'end')" placeholder="选择日期">
|
|
|
- </el-date-picker>
|
|
|
- </div>
|
|
|
+ <!-- <el-date-picker v-model="endDate" type="year" size="mini" value-format="yyyy" format="yyyy年" :clearable="false" style="width: 96px;"
|
|
|
+ @change="checkYear(endDate,'end')" placeholder="选择日期"> -->
|
|
|
+ <!-- <el-date-picker
|
|
|
+ v-model="endDate"
|
|
|
+ type="year"
|
|
|
+ value-format="yyyy"
|
|
|
+ @change="checkYear(endDate,'end')"
|
|
|
+ placeholder="选择年">
|
|
|
+ </el-date-picker> -->
|
|
|
+ <!-- </el-date-picker> -->
|
|
|
+ <!-- </div>
|
|
|
|
|
|
<div class="block">
|
|
|
<el-button type="primary" size="mini" plain @click="selectAll">
|
|
|
@@ -26,8 +33,8 @@
|
|
|
</div>
|
|
|
|
|
|
<div class="goBackButton" @click.prevent="goBack()" >
|
|
|
- 返回
|
|
|
- </div> -->
|
|
|
+ 返回 -->
|
|
|
+ <!-- </div> -->
|
|
|
|
|
|
</div>
|
|
|
<!-- <div class="ttitle">质量目标统计</div> -->
|
|
|
@@ -71,24 +78,24 @@
|
|
|
v-if="showAll || showComponents[13]" :data = "getS9neiBuZhiLiang()"/> -->
|
|
|
<!-- <s12fengXian :width="static=='row' ? '20%': '100%'"
|
|
|
v-if="showAll || showComponents[13]" :data = "getS12fengXian()"/> -->
|
|
|
- <!-- <div class="clear"></div> -->
|
|
|
- <!-- </div> -->
|
|
|
- <!-- <div class="ttitle">人员培训与管理</div> -->
|
|
|
- <!-- <div class="componentsData" v-if="relOf"> -->
|
|
|
+ <!-- <div class="clear"></div>
|
|
|
+ </div>
|
|
|
+ <div class="ttitle">人员培训与管理</div>
|
|
|
+ <div class="componentsData" v-if="relOf"> -->
|
|
|
<s4renYuanPeiXun :width="static=='row' ? '25%': '100%'"
|
|
|
v-if="showAll || showComponents[8]" :data = "getS4renYuanPeiXun()"/>
|
|
|
<s5renYuanJianDu :width="static=='row' ? '25%': '100%'"
|
|
|
v-if="showAll || showComponents[9]" :data = "getS5renYuanJianDu()"/>
|
|
|
- <div class="clear"></div>
|
|
|
+ <!-- <div class="clear"></div>
|
|
|
|
|
|
- <!-- </div> -->
|
|
|
- <!-- <div class="ttitle">设备维保</div> -->
|
|
|
- <!-- <div class="componentsData" v-if="relOf"> -->
|
|
|
- <s7sheBeiJiaoZhun :width="'33%'"
|
|
|
+ </div>
|
|
|
+ <div class="ttitle">设备维保</div>
|
|
|
+ <div class="componentsData" v-if="relOf"> -->
|
|
|
+ <s7sheBeiJiaoZhun :width="static=='row' ? '33%': '100%'"
|
|
|
v-if="showAll || showComponents[12]" :data = "getJiaoYanObjNum()"/>
|
|
|
- <s8sheBeiHeCha :width="'33%'"
|
|
|
+ <s8sheBeiHeCha :width="static=='row' ? '33%': '100%'"
|
|
|
v-if="showAll || showComponents[11]" :data = "gethechaObjNum()"/>
|
|
|
- <s11biaoZhunWu :width="'33%'"
|
|
|
+ <s11biaoZhunWu :width="static=='row' ? '33%': '100%'"
|
|
|
v-if="showAll || showComponents[15]" :data = "getbiaozhunObjNum()"/>
|
|
|
<!-- <div class="clear"></div>
|
|
|
|
|
|
@@ -99,9 +106,9 @@
|
|
|
v-if="showAll || showComponents[13]" :data = "getS9neiBuZhiLiang()"/>
|
|
|
<s10waiBuNengLi :width="static=='row' ? '25%': '100%'"
|
|
|
v-if="showAll || showComponents[14]" :data = "getnengtliObjNum()"/>
|
|
|
- <div class="clear"></div>
|
|
|
+ <!-- <div class="clear"></div>
|
|
|
|
|
|
- <!-- </div>
|
|
|
+ </div>
|
|
|
<div class="ttitle">风险控制</div>
|
|
|
<div class="componentsData" v-if="relOf"> -->
|
|
|
<s12fengXian :width="static=='row' ? '25%': '100%'"
|
|
|
@@ -238,6 +245,7 @@
|
|
|
repostCurd('sql', getJiaoYanObj(end)).then(response => {
|
|
|
this.jiaoyanObj = response.variables.data //结果一定存在第0个,因为只有一条数据
|
|
|
// this.getData(this.BeginDate, this.endDate, true, this.dataScope)
|
|
|
+ // console.log(end,this.jiaoyanObj,"nmnakak")
|
|
|
this.gethechaObjData(this.endDate)
|
|
|
})
|
|
|
},
|
|
|
@@ -259,16 +267,23 @@
|
|
|
repostCurd('sql', getbiaozhunObj(end)).then(response => {
|
|
|
this.biaozhunObj = response.variables.data //结果一定存在第0个,因为只有一条数据
|
|
|
// this.getData(this.BeginDate, this.endDate, true, this.dataScope)
|
|
|
- console.log(this.biaozhunObj,'8888')
|
|
|
+ // console.log(this.biaozhunObj,'8888')
|
|
|
this.getData(this.BeginDate, this.endDate, true, this.dataScope)
|
|
|
})
|
|
|
},
|
|
|
/* 通过拼接的sql进行查询全部数据*/
|
|
|
getData(beg, end, of, scope) {
|
|
|
+ // console.log(2222,DBData(beg, end, scope))
|
|
|
repostCurd('sql', DBData(beg, end, scope)).then(response => {
|
|
|
- this.relData = response.variables.data[0] //结果一定存在第0个,因为只有一条数据
|
|
|
+ if(typeof response.variables.data[0] === "undefined"){
|
|
|
+ this.relData = [0] //结果一定存在第0个,因为只有一条数据
|
|
|
+
|
|
|
+ }else{
|
|
|
+ this.relData = response.variables.data[0] //结果一定存在第0个,因为只有一条数据
|
|
|
+
|
|
|
+ }
|
|
|
this.relOf = of
|
|
|
- console.log(beg, end, of, response,'getdata')
|
|
|
+ // console.log(beg, end, of, response,this.relData,'getdata')
|
|
|
})
|
|
|
},
|
|
|
/* 查询全部*/
|
|
|
@@ -276,16 +291,26 @@
|
|
|
/* 上次查询时间不等于当次查询时间, 开始时间不能等于结束时间, 则开始查询。*/
|
|
|
if (this.selectEnd != this.endDate) {
|
|
|
// if ((this.selectEnd != this.endDate || this.selectBeg != this.BeginDate) && this.endDate != this.BeginDate && this.endDate > this.BeginDate) {
|
|
|
- this.getData(this.BeginDate, this.endDate, false, this.dataScope)
|
|
|
- this.selectEnd = this.endDate
|
|
|
- this.selectBeg = this.BeginDate
|
|
|
+ // this.getData(this.BeginDate, this.endDate, false, this.dataScope)
|
|
|
+ this.getConfigData()
|
|
|
+ // this.$forceUpdate();
|
|
|
+
|
|
|
+ // this.selectEnd = this.endDate
|
|
|
+ // this.selectBeg = this.BeginDate
|
|
|
/* 延迟刷新*/
|
|
|
- this.timer = setInterval(() => {
|
|
|
- if (!this.relOf) {
|
|
|
- this.relOf = true
|
|
|
- clearInterval(this.timer)
|
|
|
- }
|
|
|
- }, 100);
|
|
|
+
|
|
|
+ this.relOf = true;
|
|
|
+ this.timer = setTimeout(() => {
|
|
|
+ this.relOf = false
|
|
|
+ clearTimeout(this.timer)
|
|
|
+ }, 0)
|
|
|
+
|
|
|
+ // this.timer = setInterval(() => {
|
|
|
+ // if (!this.relOf) {
|
|
|
+ // this.relOf = true
|
|
|
+ // clearInterval(this.timer)
|
|
|
+ // }
|
|
|
+ // }, 100);
|
|
|
}
|
|
|
// else if (this.endDate == this.BeginDate) {
|
|
|
// this.$message({
|
|
|
@@ -303,16 +328,17 @@
|
|
|
},
|
|
|
/* 年份不得大于当前年份*/
|
|
|
checkYear(year, data) {
|
|
|
- let that = this
|
|
|
- that.dataScope.length = 0
|
|
|
- if(that.BeginDate != '' && that.endDate != ''){
|
|
|
- let poor = Number(that.endDate) - Number(that.BeginDate)
|
|
|
- for (let i = 0; i <= poor; i++) {
|
|
|
- let element = Number(that.BeginDate) + i;
|
|
|
- that.dataScope.push(element+'')
|
|
|
- }
|
|
|
- }
|
|
|
+ // let that = this
|
|
|
+ // that.dataScope.length = 0
|
|
|
+ // if(that.BeginDate != '' && that.endDate != ''){
|
|
|
+ // let poor = Number(that.endDate) - Number(that.BeginDate)
|
|
|
+ // for (let i = 0; i <= poor; i++) {
|
|
|
+ // let element = Number(that.BeginDate) + i;
|
|
|
+ // that.dataScope.push(element+'')
|
|
|
+ // }
|
|
|
+ // }
|
|
|
if (Number(year) > Number(this.getDate(0))) {
|
|
|
+ console.log(data,'3y87sdvfsdf')
|
|
|
data == 'end' ?
|
|
|
this.endDate = this.getDate(0) + '' :
|
|
|
this.BeginDate = this.getDate(0) + ''
|
|
|
@@ -322,7 +348,13 @@
|
|
|
message: '年份不得大于当前年份',
|
|
|
type: 'warning'
|
|
|
});
|
|
|
+ this.selectAll()
|
|
|
}
|
|
|
+ // else(
|
|
|
+ // this.endDate = Number(year)
|
|
|
+ // )
|
|
|
+ // this.$forceUpdate();
|
|
|
+
|
|
|
},
|
|
|
/* 获取当前年份*/
|
|
|
getDate(year) {
|
|
|
@@ -409,3 +441,10 @@
|
|
|
}
|
|
|
.clear{ clear: both; }
|
|
|
</style>
|
|
|
+<style lang="scss">
|
|
|
+.el-year-table .today .cell {
|
|
|
+ color: #606266 !important;
|
|
|
+ font-weight: 100 !important;
|
|
|
+}
|
|
|
+
|
|
|
+</style>
|