|
|
@@ -20,45 +20,50 @@
|
|
|
<div class="topCard">
|
|
|
<top-bar v-if="topBarData.length" :info="topBarData" />
|
|
|
</div>
|
|
|
- <div class="middleCard">
|
|
|
+ <div class="middleCard" >
|
|
|
+ <div style="width:100%">
|
|
|
<div class="middleCardLeft" >
|
|
|
<middleCard v-if="MiddleLeftPieViewList.data.length" :info="MiddleLeftPieViewList" ref="middleCardLeft"/>
|
|
|
</div>
|
|
|
- <dv-decoration-2 :reverse="true" style="width:5px;height:330px;margin-left: 25px;" />
|
|
|
+ <dv-decoration-2 :reverse="true" style="width:5px;height:350px;margin:0 15px;" />
|
|
|
<div class="middleCardCenter">
|
|
|
<middleCard v-if="eBgRateData.data.length" :info="eBgRateData" ref="middleCardCenter"/>
|
|
|
</div>
|
|
|
- <dv-decoration-2 :reverse="true" style="width:5px;height:330px;margin-left: 25px;" />
|
|
|
+ <dv-decoration-2 :reverse="true" style="width:5px;height:350px;margin:0 15px;" />
|
|
|
<div class="middleCardRight">
|
|
|
<CarouselTabl v-if="config.data.length" :info="config"/>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ </div>
|
|
|
<dv-decoration-10 />
|
|
|
<div class="bottomCard">
|
|
|
- <div style="width:30%;display:flex;margin-left: 30px;">
|
|
|
+ <div style="width:31%;display:flex;">
|
|
|
<div class="bottomCardLeft0">
|
|
|
<middleCard v-if="weiHuSheBeiData.data.length" :info="weiHuSheBeiData" ref="sheBeiWeiHuRef"/>
|
|
|
</div>
|
|
|
- <div style="padding-left: 10px;">
|
|
|
+ <dv-decoration-2 :reverse="true" style="width:3%;height:330px;margin: 0 10px;" />
|
|
|
+ <div style="width:37%">
|
|
|
<zhuzhuangtu v-if="sheBeiweiHuData.data.length" :info="sheBeiweiHuData" ref="sheBeiWeiHuDataref"/>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <dv-decoration-2 :reverse="true" style="width:5px;height:330px;margin-left: 15px;" />
|
|
|
- <div style="width:30%;display:flex;margin-left: 15px;">
|
|
|
+ <dv-decoration-2 :reverse="true" style="width:5px;height:330px;margin: 0 10px;" />
|
|
|
+ <div style="width:31%;display:flex;">
|
|
|
<div class="bottomCardLeft">
|
|
|
<middleCard v-if="sheBeiHeChaData.data.length" :info="sheBeiHeChaData" ref="sheBeiHeChaRef"/>
|
|
|
</div>
|
|
|
- <div class="bottomCardCenter">
|
|
|
- <zhuzhuangtu v-if="zhuantaiEData.data.length" :info="zhuantaiEData" ref="zhuantaiEDataref"/>
|
|
|
+ <dv-decoration-2 :reverse="true" style="width:5px;height:330px;margin: 0 10px;" />
|
|
|
+ <div style="width:37%">
|
|
|
+ <zhuzhuangtu v-if="bottomData.data.length" :info="bottomData" ref="bottomCardLeft"/>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <dv-decoration-2 :reverse="true" style="width:5px;height:330px;margin-left: 15px;" />
|
|
|
- <div style="width:30%;display:flex;margin-left: 15px;">
|
|
|
+ <dv-decoration-2 :reverse="true" style="width:5px;height:330px;margin: 0 10px;" />
|
|
|
+ <div style="width:31%;display:flex;">
|
|
|
<div class="bottomCardright">
|
|
|
<middleCard v-if="jianDingjiaoZhunSheBeiData.data.length" :info="jianDingjiaoZhunSheBeiData" ref="jiandingRef"/>
|
|
|
</div>
|
|
|
- <div class="bottomCardright2">
|
|
|
- <zhuzhuangtu v-if="bottomData.data.length" :info="bottomData" ref="bottomCardLeft"/>
|
|
|
+ <dv-decoration-2 :reverse="true" style="width:3%;height:330px;margin: 0 10px;" />
|
|
|
+ <div style="width:40%">
|
|
|
+ <zhuzhuangtu v-if="zhuantaiEData.data.length" :info="zhuantaiEData" ref="zhuantaiEDataref"/>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
@@ -87,7 +92,7 @@ export default {
|
|
|
data() {
|
|
|
const d = new Date();
|
|
|
return {
|
|
|
- titleName: "设备信息查询",
|
|
|
+ titleName: "设备管理看板",
|
|
|
year: d.toJSON().slice(0, 4),
|
|
|
month: d.toJSON().slice(0, 7),
|
|
|
today: d.toJSON().slice(0, 10),
|
|
|
@@ -117,7 +122,8 @@ export default {
|
|
|
bottomData:{xData:[],data:[],config:{idSelector:""}},
|
|
|
zhuantaiEData:{xData:[],data:[],config:{idSelector:""}},
|
|
|
sheBeiweiHuData:{xData:[],data:[],config:{idSelector:""}},
|
|
|
- config:{ header:['设备名称','设备编号','规格型号','最近检定/校准日期','设备状态'],data:[]}
|
|
|
+ config:{ header:['设备名称','设备编号','规格型号','最近检定/校准日期','设备状态'],data:[]},
|
|
|
+ zichan:0,
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
@@ -139,6 +145,7 @@ export default {
|
|
|
this.$router.back(-1);
|
|
|
},
|
|
|
updateAll(e) {
|
|
|
+ // this.getSheBeiMony();
|
|
|
this.getTopBarData();
|
|
|
this.getMiddleLeftPieView();
|
|
|
this.getCarouselTable();
|
|
|
@@ -146,22 +153,24 @@ export default {
|
|
|
},
|
|
|
async getTopBarData(){
|
|
|
let this_ = this;
|
|
|
- let sql =`select a.Equipments,b.addEquipments,c.testEquipments,c1.testNoEquipments,d.checkEquipments,
|
|
|
+ let sql =`select a.Equipments,a1.mony,b.addEquipments,c.testEquipments,c1.testNoEquipments,d.checkEquipments,
|
|
|
d1.checkNoEquipments,e.goodEquipments,f.scrapEquipments,g.limitedEquipments,h.weiHuNoEquipments,h1.weiHuEquipments
|
|
|
from
|
|
|
(select count(*) as Equipments from t_sbdj) as a,
|
|
|
- (select count(*) as addEquipments from t_sbdj where gou_jin_ri_qi_ LIKE '%2022-12%') as b,
|
|
|
+ (select zi_chan_yuan_zhi_ as mony FROM t_sbdj) as a1,
|
|
|
+ (select count(*) as addEquipments from t_sbdj where gou_jin_ri_qi_ LIKE '${this_.month}') as b,
|
|
|
(select count(*) as testEquipments from t_sbjdxzqr where shi_fou_guo_shen_ ='1') as c,
|
|
|
(select count(*) as testNoEquipments from t_sbjdxzqr) as c1,
|
|
|
- (select count(*) as checkEquipments from t_sbhcjlb where create_time_ LIKE '%2022-12%' and shi_fou_guo_shen_ ='1') as d,
|
|
|
- (select count(*) as checkNoEquipments from t_sbhcjlb where create_time_ LIKE '%2022-12%') as d1,
|
|
|
+ (select count(*) as checkEquipments from t_sbhcjlb where create_time_ LIKE '${this_.month}' and shi_fou_guo_shen_ ='1') as d,
|
|
|
+ (select count(*) as checkNoEquipments from t_sbhcjlb where create_time_ LIKE '${this_.month}') as d1,
|
|
|
(select count(*) as goodEquipments from t_sbdj where she_bei_zhuang_ta ='正常') as e,
|
|
|
(select count(*) as scrapEquipments from t_sbdj where she_bei_zhuang_ta ='停用' or she_bei_zhuang_ta ='报废/停用') as f,
|
|
|
(select count(*) as limitedEquipments from t_sbdj where she_bei_zhuang_ta ='限制使用') as g,
|
|
|
- (select count(*) as weiHuNoEquipments from t_mjsbwhjhzb where create_time_ LIKE '%2022-12%') as h,
|
|
|
- (select count(*) as weiHuEquipments from t_mjsbwhbyjlby where create_time_ LIKE '%2022-12%' and shi_fou_guo_shen_ ='1') as h1`;
|
|
|
+ (select count(*) as weiHuNoEquipments from t_mjsbwhjhzb where create_time_ LIKE '${this_.month}') as h,
|
|
|
+ (select count(*) as weiHuEquipments from t_mjsbwhbyjlby where create_time_ LIKE '${this_.month}' and shi_fou_guo_shen_ ='1') as h1`;
|
|
|
await curdPost("sql",sql).then(res=>{
|
|
|
const data = res.variables.data
|
|
|
+ let zichan = this_.getAllMonyInt(data);
|
|
|
let eIntactnessRate = Number(((data[0].goodEquipments/data[0].Equipments).toFixed(3)+"").slice(2,4));
|
|
|
let eBadRate = 100 - parseInt(eIntactnessRate);
|
|
|
let obj ={};
|
|
|
@@ -169,14 +178,14 @@ export default {
|
|
|
obj.name = "正常设备";
|
|
|
this_.MiddleLeftPieViewList.data.push(obj);
|
|
|
obj ={};
|
|
|
- obj.value = data[0].scrapEquipments;
|
|
|
- obj.name = "停用/报废";
|
|
|
+ obj.value = data[0].limitedEquipments;
|
|
|
+ obj.name = "备用设备";
|
|
|
this_.MiddleLeftPieViewList.data.push(obj);
|
|
|
obj ={};
|
|
|
- obj.value = data[0].limitedEquipments;
|
|
|
- obj.name = "限制使用";
|
|
|
+ obj.value = data[0].scrapEquipments;
|
|
|
+ obj.name = "停用/报废";
|
|
|
this_.MiddleLeftPieViewList.data.push(obj);
|
|
|
- this_.MiddleLeftPieViewList.color = ['#ff7070','#ffee00','#5c7bd9'];
|
|
|
+ this_.MiddleLeftPieViewList.color = ['#339933','#FFFF66','#FF0033'];
|
|
|
this_.MiddleLeftPieViewList.config.title = "设备状态工作分布";
|
|
|
this_.MiddleLeftPieViewList.config.idSelector = "main2";
|
|
|
this_.$nextTick(()=>{
|
|
|
@@ -225,7 +234,7 @@ export default {
|
|
|
danwei:'台'
|
|
|
},
|
|
|
{
|
|
|
- label: '已维护设备数',
|
|
|
+ label: '本月已维护设备数',
|
|
|
value: data[0].weiHuEquipments,
|
|
|
danwei:'台'
|
|
|
}
|
|
|
@@ -255,7 +264,7 @@ export default {
|
|
|
danwei:'台'
|
|
|
},
|
|
|
{
|
|
|
- label: '本月核查设备数',
|
|
|
+ label: '本月已核查设备数',
|
|
|
value: data[0].checkEquipments,
|
|
|
danwei:'件'
|
|
|
}
|
|
|
@@ -270,13 +279,13 @@ export default {
|
|
|
danwei:'%'
|
|
|
},
|
|
|
{
|
|
|
- label: '设备损坏率',
|
|
|
+ label: '设备故障率',
|
|
|
value: eBadRate,
|
|
|
danwei:'%'
|
|
|
},
|
|
|
{
|
|
|
label: '设备总值',
|
|
|
- value:100,
|
|
|
+ value:zichan,
|
|
|
danwei:'元'
|
|
|
},
|
|
|
]
|
|
|
@@ -286,7 +295,7 @@ export default {
|
|
|
this_.bottomData.xData =["计划核查设备数","已核查设备数"];
|
|
|
this_.bottomData.data.push(data[0].checkNoEquipments);
|
|
|
this_.bottomData.data.push(data[0].checkEquipments);
|
|
|
- this_.bottomData.config.title ="核查设备数量";
|
|
|
+ this_.bottomData.config.title ="核查设备柱状图";
|
|
|
this_.bottomData.config.idSelector ="main4";
|
|
|
// this_.$nextTick(()=>{
|
|
|
// setTimeout(() => {
|
|
|
@@ -296,13 +305,13 @@ export default {
|
|
|
this_.zhuantaiEData.xData =["计划检定/校准设备数","已完成检定/校准设备数",];
|
|
|
this_.zhuantaiEData.data.push(data[0].testNoEquipments);
|
|
|
this_.zhuantaiEData.data.push(data[0].testEquipments);
|
|
|
- this_.zhuantaiEData.config.title ="设备检定/校准设备数量";
|
|
|
- this_.zhuantaiEData.config.idSelector ="main3";
|
|
|
+ this_.zhuantaiEData.config.title ="设备检定/校准设备柱状图";
|
|
|
+ this_.zhuantaiEData.config.idSelector ="main3";
|
|
|
//维护设备柱状图
|
|
|
- this_.sheBeiweiHuData.xData =["计划维护设备数","已完成维护设备数",];
|
|
|
+ this_.sheBeiweiHuData.xData =["计划维护设备数","已完成设备数",];
|
|
|
this_.sheBeiweiHuData.data.push(data[0].weiHuNoEquipments);
|
|
|
this_.sheBeiweiHuData.data.push(data[0].weiHuEquipments);
|
|
|
- this_.sheBeiweiHuData.config.title ="设备维护设备";
|
|
|
+ this_.sheBeiweiHuData.config.title ="设备维护柱状图";
|
|
|
this_.sheBeiweiHuData.config.idSelector ="mainWeiHuZ";
|
|
|
this_.$nextTick(()=>{
|
|
|
setTimeout(() => {
|
|
|
@@ -318,9 +327,9 @@ export default {
|
|
|
this_.eBgRateData.data.push(objRate);
|
|
|
objRate ={};
|
|
|
objRate.value = eBadRate;
|
|
|
- objRate.name = "设备损坏率";
|
|
|
+ objRate.name = "设备故障率";
|
|
|
this_.eBgRateData.data.push(objRate);
|
|
|
- this_.eBgRateData.color = ['#0dcbd4','#5470c6'];
|
|
|
+ this_.eBgRateData.color = ['#339933','#FF0033'];
|
|
|
this_.eBgRateData.config.title = "设备完好率分布";
|
|
|
this_.eBgRateData.config.idSelector = "main1";
|
|
|
//设备维护
|
|
|
@@ -332,8 +341,8 @@ export default {
|
|
|
objweihu.value = data[0].weiHuEquipments;
|
|
|
objweihu.name = "已维护设备数";
|
|
|
this_.weiHuSheBeiData.data.push(objweihu);
|
|
|
- this_.weiHuSheBeiData.color = ['#0dcbd4','#5470c6'];
|
|
|
- this_.weiHuSheBeiData.config.title = "设备核查分布";
|
|
|
+ this_.weiHuSheBeiData.color = ['#5470c6','#38a838'];
|
|
|
+ this_.weiHuSheBeiData.config.title = "设备维护分布";
|
|
|
this_.weiHuSheBeiData.config.idSelector = "mainWeiHu";
|
|
|
//设备核查
|
|
|
let objHeCha ={};
|
|
|
@@ -344,7 +353,7 @@ export default {
|
|
|
objHeCha.value = data[0].checkEquipments;
|
|
|
objHeCha.name = "已核查设备数";
|
|
|
this_.sheBeiHeChaData.data.push(objHeCha);
|
|
|
- this_.sheBeiHeChaData.color = ['#0dcbd4','#5470c6'];
|
|
|
+ this_.sheBeiHeChaData.color = ['#5470c6','#38a838'];
|
|
|
this_.sheBeiHeChaData.config.title = "设备核查分布";
|
|
|
this_.sheBeiHeChaData.config.idSelector = "mainHeCha";
|
|
|
//设备检定校准
|
|
|
@@ -354,9 +363,9 @@ export default {
|
|
|
this_.jianDingjiaoZhunSheBeiData.data.push(objJianding);
|
|
|
objJianding ={};
|
|
|
objJianding.value = data[0].testEquipments;
|
|
|
- objJianding.name = "已检定/校准设备数";
|
|
|
+ objJianding.name = "已完成设备数";
|
|
|
this_.jianDingjiaoZhunSheBeiData.data.push(objJianding);
|
|
|
- this_.jianDingjiaoZhunSheBeiData.color = ['#0dcbd4','#5470c6'];
|
|
|
+ this_.jianDingjiaoZhunSheBeiData.color = ['#5470c6','#38a838'];
|
|
|
this_.jianDingjiaoZhunSheBeiData.config.title = "设备检定校准分布";
|
|
|
this_.jianDingjiaoZhunSheBeiData.config.idSelector = "mainJianDing";
|
|
|
this_.$nextTick(()=>{
|
|
|
@@ -388,7 +397,7 @@ export default {
|
|
|
data1.push(item.she_bei_ming_cheng_);
|
|
|
data1.push(item.she_bei_shi_bie_h);
|
|
|
data1.push(item.gui_ge_xing_hao_);
|
|
|
- data1.push(item.zhuang_tai_fen_xi || "asda");
|
|
|
+ data1.push(item.zhuang_tai_fen_xi || "");
|
|
|
data1.push(item.she_bei_zhuang_ta);
|
|
|
this_.config.data.push(data1);
|
|
|
});
|
|
|
@@ -396,7 +405,32 @@ export default {
|
|
|
.catch((err) => {
|
|
|
console.log(err);
|
|
|
});
|
|
|
- }
|
|
|
+ },
|
|
|
+ getAllMonyInt (monyArr){
|
|
|
+ let mony = 0;
|
|
|
+ let filterMony
|
|
|
+ monyArr.forEach(item=>{
|
|
|
+ if(item.mony.includes("元")){
|
|
|
+ filterMony = item.mony.slice(0,item.mony.length-1)*1;
|
|
|
+ mony +=filterMony
|
|
|
+ }
|
|
|
+
|
|
|
+ })
|
|
|
+ // console.log(mony.toFixed(2))
|
|
|
+ // return mony.toFixed(2);
|
|
|
+ return mony;
|
|
|
+ },
|
|
|
+ // async getSheBeiMony (){
|
|
|
+ // let this_= this;
|
|
|
+ // const sql = "select zi_chan_yuan_zhi_ as mony FROM t_sbdj";
|
|
|
+ // await curdPost("sql",sql).then(res=>{
|
|
|
+ // let data = res.variables.data;
|
|
|
+ // this_.zichan= this_.getAllMonyInt(data);
|
|
|
+ // console.log(this_.zichan);
|
|
|
+ // }).catch(err=>{
|
|
|
+ // console.error(err)
|
|
|
+ // })
|
|
|
+ // }
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
|
@@ -492,22 +526,20 @@ export default {
|
|
|
width: 100%;
|
|
|
}
|
|
|
.middleCard,.bottomCard{
|
|
|
- width: 100vw;
|
|
|
+ width: 100%;
|
|
|
+ margin-left: 30px;
|
|
|
// margin-top: 30px;
|
|
|
div{
|
|
|
- display: inline-block;
|
|
|
+ display: inline-block;
|
|
|
}
|
|
|
.middleCardLeft{
|
|
|
- width: 20%;
|
|
|
- margin-left: 30px;
|
|
|
+ width: 22%;
|
|
|
}
|
|
|
.middleCardCenter{
|
|
|
- width: 20%;
|
|
|
- margin-left: 15px;
|
|
|
+ width: 22%;
|
|
|
}
|
|
|
.middleCardRight{
|
|
|
- margin-left: 30px;
|
|
|
- width: 50%;
|
|
|
+ width: 48%;
|
|
|
}
|
|
|
padding: 10px;
|
|
|
}
|
|
|
@@ -516,9 +548,9 @@ export default {
|
|
|
div{
|
|
|
display: inline-block;
|
|
|
}
|
|
|
- // .bottomCardLeft0{
|
|
|
-
|
|
|
- // }
|
|
|
+ .bottomCardLeft0,.bottomCardLeft,.bottomCardright{
|
|
|
+ width: 70%;
|
|
|
+ }
|
|
|
// .bottomCardCenter0{
|
|
|
|
|
|
// }
|
|
|
@@ -541,7 +573,7 @@ export default {
|
|
|
}
|
|
|
.dv-decoration-10 {
|
|
|
width: 96%;
|
|
|
- margin: -7px 2% 0;
|
|
|
+ margin: 7px 2% 0;
|
|
|
height: 5px;
|
|
|
}
|
|
|
</style>
|