diff --git a/src/assets/icons/Elec.vue b/src/assets/icons/Elec.vue new file mode 100644 index 00000000..567ddcc8 --- /dev/null +++ b/src/assets/icons/Elec.vue @@ -0,0 +1,5 @@ + diff --git a/src/assets/icons/index.js b/src/assets/icons/index.js index d8fa74ea..fe8a6acb 100644 --- a/src/assets/icons/index.js +++ b/src/assets/icons/index.js @@ -22,4 +22,5 @@ export { default as Shebei } from './Shebei.vue' export { default as Xiaoshou } from './Xiaoshou.vue' export { default as Zhixing } from './Zhixing.vue' export { default as Zhizao } from './Zhizao.vue' -export { default as Env } from './Env.vue' \ No newline at end of file +export { default as Env } from './Env.vue' +export { default as Elec } from './Elec.vue' \ No newline at end of file diff --git a/src/components/scOpl/scFire.vue b/src/components/scOpl/scFire.vue index 932dbc4a..5715f5c0 100644 --- a/src/components/scOpl/scFire.vue +++ b/src/components/scOpl/scFire.vue @@ -121,6 +121,16 @@ fit="cover" /> + + + + + +
黑化车间生产数据看板
+
{{ currentDay }} {{ currentTime }}
+
+ + + + +
+
+
昨日黑化合格统计
+
+
+
+
+ {{ item.物料名 }} + {{item.合格数}} +
+
+
+
+ +
+
+
+ 昨日黑化不合格统计 +
+
+
+
+
+ +
+
+
黑化任务进度
+
+
+
+ +
+
+
+
+
+ + + +
+
+
昨日退火合格统计
+
+
+
+ +
+ {{ item.物料名 }} + {{item.合格数}} +
+
+
+
+ +
+
+
+ 昨日退火不合格统计 +
+
+
+
+
+ +
+
+
退火任务进度
+
+
+
+ +
+
+ +
+
+ +
+ + +
+
+
黑化车间本月合格数统计
+
+
+
+
+ +
+
+
黑化车间本月合格率统计
+
+
+
+
+
+
+
+ + + + diff --git a/src/views/enm_coal/power.vue b/src/views/enm_coal/power.vue index 0e42a5fb..4d54df7c 100644 --- a/src/views/enm_coal/power.vue +++ b/src/views/enm_coal/power.vue @@ -519,7 +519,7 @@ export default { obj.day = days; obj.mgroup__name = "煤磨"; obj.mpoint__material__code__in = "elec,elec_0"; - obj.mpoint__ep_monitored__isnull = 0; + // obj.mpoint__ep_monitored__isnull = 0; obj.mpoint__need_display = 1; obj.page = 0; this.$API.enm.mpoint.stat.req(obj).then((response) => { @@ -560,7 +560,7 @@ export default { obj.month_s = month; obj.mgroup__name = "煤磨"; obj.mpoint__material__code__in = "elec,elec_0"; - obj.mpoint__ep_monitored__isnull = 0; + // obj.mpoint__ep_monitored__isnull = 0; obj.mpoint__need_display = 1; obj.page = 0; this.$API.enm.mpoint.stat.req(obj).then((response) => { @@ -601,7 +601,7 @@ export default { obj.year_s = year; obj.mgroup__name = "煤磨"; obj.mpoint__material__code__in = "elec,elec_0"; - obj.mpoint__ep_monitored__isnull = 0; + // obj.mpoint__ep_monitored__isnull = 0; obj.mpoint__need_display = 1; obj.page = 0; this.$API.enm.mpoint.stat.req(obj).then((response) => { diff --git a/src/views/enm_coal/workshopAnalysis.vue b/src/views/enm_coal/workshopAnalysis.vue index 0941abcd..aab4a16d 100644 --- a/src/views/enm_coal/workshopAnalysis.vue +++ b/src/views/enm_coal/workshopAnalysis.vue @@ -171,6 +171,14 @@ export default { } return classInfo; }, + precen(a, b) { + if (b !== 0 && b !== null && a !== null) { + let precen = (a / b)* 100; + return precen.toFixed(2) + "%"; + } else { + return "/"; + } + }, getData() { let that = this; let query0 = {}; @@ -255,11 +263,11 @@ export default { //环比增长率(%) let lastRate = 0; if ( - lastDiff == "/" && + lastDiff !== "/" && lastNum !== "/" && lastNum !== 0 ) { - lastRate = (lastDiff / lastNum) * 100; + lastRate = this.precen(lastDiff, lastNum); } else { lastRate = "/"; } diff --git a/src/views/enm_coalbase/power.vue b/src/views/enm_coalbase/power.vue index 9dff4487..3ca0b8b3 100644 --- a/src/views/enm_coalbase/power.vue +++ b/src/views/enm_coalbase/power.vue @@ -471,7 +471,7 @@ export default { obj.day = days; obj.mgroup__name = "煤磨"; obj.mpoint__material__code__in = "elec,elec_0"; - obj.mpoint__ep_monitored__isnull = 0; + // obj.mpoint__ep_monitored__isnull = 0; obj.mpoint__need_display = 1; obj.page = 0; this.$API.enm.mpoint.stat.req(obj).then((response) => { @@ -512,7 +512,7 @@ export default { obj.month_s = month; obj.mgroup__name = "煤磨"; obj.mpoint__material__code__in = "elec,elec_0"; - obj.mpoint__ep_monitored__isnull = 0; + // obj.mpoint__ep_monitored__isnull = 0; obj.mpoint__need_display = 1; obj.page = 0; this.$API.enm.mpoint.stat.req(obj).then((response) => { @@ -553,7 +553,7 @@ export default { obj.year_s = year; obj.mgroup__name = "煤磨"; obj.mpoint__material__code__in = "elec,elec_0"; - obj.mpoint__ep_monitored__isnull = 0; + // obj.mpoint__ep_monitored__isnull = 0; obj.mpoint__need_display = 1; obj.page = 0; this.$API.enm.mpoint.stat.req(obj).then((response) => { diff --git a/src/views/enm_energy/energy.vue b/src/views/enm_energy/energy.vue index bb34720f..5e2d7e94 100644 --- a/src/views/enm_energy/energy.vue +++ b/src/views/enm_energy/energy.vue @@ -195,7 +195,7 @@ }, getData(){ let that = this; - let params = {}; + let params = {page:0}; let arr = []; if(that.query.type==0){//日 params.type='day_s'; @@ -205,11 +205,14 @@ }else if(that.query.type==1){//月 params.type='month_s'; params.year_s = Number(that.query.year); + }else if (that.query.type==2){ + params.type='year_s'; + params.year_s = Number(that.query.yearStart); } params.mgroup__belong_dept = that.query.belong_dept; this.$API.enm.enstat.req(params).then((res) => { - let data = res.results; + let data = res; let wrapArr = []; let innerArr = []; let ind = 0; @@ -229,31 +232,41 @@ wrapArr[ind][0]=item }else if(item.mgroup_name=='原料磨'){ wrapArr[ind][1]=item + }else if(item.mgroup_name=='原料压缩空气'){ + wrapArr[ind][2]=item } }else if(that.deptName=='烧成车间'){ if(item.mgroup_name=='回转窑'){ wrapArr[ind][1]=item + }else if (item.mgroup_name=='烧成压缩空气') { + wrapArr[ind][2]=item }else{ wrapArr[ind][0]=item } }else{ if(item.mgroup_name=='水泥磨'){ wrapArr[ind][1]=item + }else if(item.mgroup_name=='水泥压缩空气'){ + wrapArr[ind][2]=item }else{ wrapArr[ind][0]=item } } }); // debugger; - // console.log(wrapArr); + console.log(wrapArr); wrapArr.forEach((item1)=>{ //item1------一天的数据 if(item1!=undefined){ let itemArr = []; - let time =item1[0].day_s!=null? item1[0].year_s+'.'+item1[0].month_s+'.'+item1[0].day_s:item1[0].year_s+'.'+item1[0].month_s; + let time = item1[0].day_s && item1[0].month_s + ? item1[0].year_s + '.' + item1[0].month_s + '.' + item1[0].day_s + : item1[0].month_s + ? item1[0].year_s + '.' + item1[0].month_s + : item1[0].year_s; itemArr.push(time) - itemArr.push( item1[0].elec_consume) - itemArr.push( item1[0].elec_coal_consume) + itemArr.push( item1[0].elec_consume) //电量 + itemArr.push( item1[0].elec_coal_consume) //电量折标煤 if(that.deptName=='烧成车间'){ itemArr.push( item1[0].pcoal_consume)//煤粉(t) itemArr.push( item1[0].pcoal_coal_consume)//煤粉折标煤(tce) @@ -265,18 +278,26 @@ }else if(that.deptName=='水泥车间'){ itemArr.push( item1[0].water_consume)//水 } - itemArr.push( item1[0].total_production) - itemArr.push( item1[0].cen_consume_unit) - - itemArr.push( item1[1].elec_consume) - itemArr.push( item1[1].elec_consume*0.1229/1000) + itemArr.push( item1[0].total_production) //总产量 + itemArr.push( item1[0].cen_consume_unit) // 单位产品综合能耗 + if (item1[1]){ + itemArr.push( item1[1].elec_consume) + itemArr.push( item1[1].elec_coal_consume) + }else{ + itemArr.push( 0) + itemArr.push( 0) + } if(that.deptName=='原料车间'){ itemArr.push( item1[1].water_consume)//水 itemArr.push( item1[1].kiln_end_heat)//窑尾余热 } itemArr.push( item1[1].total_production) itemArr.push( item1[1].cen_consume_unit) - itemArr.push( item1[1].cair_consume)//压缩空气 + if(item1 &&item1[2]){ + itemArr.push(item1[2].cair_consume)//压缩空气 + }else{ + itemArr.push( 0) + } innerArr.push(itemArr) } }) diff --git a/src/views/enm_energy/value.vue b/src/views/enm_energy/value.vue index ae654f5f..93887aa0 100644 --- a/src/views/enm_energy/value.vue +++ b/src/views/enm_energy/value.vue @@ -110,12 +110,12 @@ export default { wrapArr2[i].industry_total_val; this.tableDatas[i][2] = wrapArr2[i].industry_add_val; - this.tableDatas[i][3] = wrapArr2[i].en_consume; + this.tableDatas[i][3] = wrapArr2[i].en_consume; //当期值 let tValue3 = 0, hValue3 = 0, tPercent3 = 0, hPercent3 = 0; - if (wrapArr2[i].month_s > 1) { + if (wrapArr2[i].month_s > 1 && i>0) { tValue3 = wrapArr2[i - 1] ? wrapArr2[i - 1].en_consume : "/"; @@ -126,9 +126,9 @@ export default { } if (tValue3 !== "/" && tValue3 !== 0) { tPercent3 = - ((wrapArr2[i].en_consume - tValue3) / + (((wrapArr2[i].en_consume - tValue3) / tValue3) * - 100; + 100).toFixed(2); } else { tPercent3 = "/"; } @@ -141,14 +141,14 @@ export default { } else { hPercent3 = "/"; } - this.tableDatas[i][4] = hPercent3; - this.tableDatas[i][5] = tPercent3; - this.tableDatas[i][6] = wrapArr2[i].en_consume_unit; + this.tableDatas[i][4] = hPercent3; //环比 + this.tableDatas[i][5] = tPercent3; //同比 + this.tableDatas[i][6] = wrapArr2[i].en_consume_unit; //总产值当前 let tValue6 = 0, hValue6 = 0, tPercent6 = 0, hPercent6 = 0; - if (wrapArr2[i].month_s > 1) { + if (wrapArr2[i].month_s > 1 && i > 0) { tValue6 = wrapArr2[i - 1] ? wrapArr2[i - 1].en_consume_unit : "/"; @@ -156,7 +156,7 @@ export default { tValue6 = wrapArr[12] ? wrapArr[12].en_consume_unit : "/"; - } + } if (tValue6 !== "/" && tValue6 !== 0) { tPercent6 = ((wrapArr2[i].en_consume_unit - tValue6) / @@ -176,15 +176,15 @@ export default { } else { hPercent6 = "/"; } - this.tableDatas[i][7] = hPercent6; - this.tableDatas[i][8] = tPercent6; + this.tableDatas[i][7] = hPercent6; //总产值环比 + this.tableDatas[i][8] = tPercent6; //总产值同比 this.tableDatas[i][9] = wrapArr2[i].en_add_consume_unit; let tValue9 = 0, hValue9 = 0, tPercent9 = 0, hPercent9 = 0; - if (wrapArr2[i].month_s > 1) { + if (wrapArr2[i].month_s > 1 && i > 0) { tValue9 = wrapArr2[i - 1] ? wrapArr2[i - 1].en_add_consume_unit : "/"; diff --git a/src/views/enm_kiln/power.vue b/src/views/enm_kiln/power.vue index 4cf813e0..ab95cedf 100644 --- a/src/views/enm_kiln/power.vue +++ b/src/views/enm_kiln/power.vue @@ -473,10 +473,6 @@ export default { that.days = myDate.getDate(); that.hours = myDate.getHours(); that.getMpoints(); - that.getTableHourData(); - that.getHourData(that.year, that.month, that.days); - that.getDayData(that.year, that.month); - that.getMonthData(that.year); }, methods: { getMpoints() { @@ -484,9 +480,8 @@ export default { let obj = {}; obj.mgroup__name = "回转窑"; obj.page = 0; - obj.enabled = 1; + // obj.enabled = 1; obj.material__code__in = "elec,elec_0"; - obj.ep_monitored__isnull = 0; obj.need_display = 1; obj.ordering = "report_sortstr"; this.$API.enm.mpoint.list.req(obj).then((res) => { @@ -497,13 +492,17 @@ export default { }); console.log("arr", arr); that.mpoints = arr; + + that.getTableHourData(); + that.getHourData(that.year, that.month, that.days); + that.getDayData(that.year, that.month); + that.getMonthData(that.year); }); }, typeRadioChange() { this.searchDate = ""; }, dateChange(val) { - console.log(val); if (val !== null) { if (this.typeRadio == "day") { let year = val.split("-")[0]; @@ -637,7 +636,7 @@ export default { obj.day = days; obj.mgroup__name = "回转窑"; obj.mpoint__material__code__in = "elec,elec_0"; - obj.mpoint__ep_monitored__isnull = 0; + // obj.mpoint__ep_monitored__isnull = 0; obj.mpoint__need_display = 1; obj.page = 0; this.$API.enm.mpoint.stat.req(obj).then((response) => { @@ -678,7 +677,7 @@ export default { obj.month_s = month; obj.mgroup__name = "回转窑"; obj.mpoint__material__code__in = "elec,elec_0"; - obj.mpoint__ep_monitored__isnull = 0; + // // obj.mpoint__ep_monitored__isnull = 0; obj.mpoint__need_display = 1; obj.page = 0; this.$API.enm.mpoint.stat.req(obj).then((response) => { @@ -719,7 +718,7 @@ export default { obj.year_s = year; obj.mgroup__name = "回转窑"; obj.mpoint__material__code__in = "elec,elec_0"; - obj.mpoint__ep_monitored__isnull = 0; + // obj.mpoint__ep_monitored__isnull = 0; obj.mpoint__need_display = 1; obj.page = 0; this.$API.enm.mpoint.stat.req(obj).then((response) => { @@ -728,13 +727,14 @@ export default { seriesData.push([]); } let data = response; + console.log('sd',seriesData, that.mpoints) data.forEach((item) => { let ind = item.month_s - 1; let index = that.mpoints.indexOf(item.mpoint_name); //第几个mpoint - if(index != undefined){ - seriesData[index][ind] = item.elec_consume_unit; + if(index==-1){ + return; } - + seriesData[index][ind] = item.elec_consume_unit; }); let options = { ...that.option3 }; for (let j = 0; j < that.mpoints.length; j++) { diff --git a/src/views/enm_kiln/teamAnalysis.vue b/src/views/enm_kiln/teamAnalysis.vue index 863c7897..0ee2adcf 100644 --- a/src/views/enm_kiln/teamAnalysis.vue +++ b/src/views/enm_kiln/teamAnalysis.vue @@ -136,11 +136,11 @@ export default { params.year = that.query.year_s; params.mgroup = that.query.mgroup; this.$API.mtm.goal.list.req(params).then((res) => { - let data = []; - if (res.length > 0) { - data = res[0]; - } - that.getData(data); + // let data = []; + // if (res.length > 0) { + // this.data = res; + // } + that.getData(res); }); }, getData(goalData) { @@ -215,46 +215,81 @@ export default { ? item.入窑生料_Fe2O3_rate_pass : "/"; arr[8] = - item.入窑生料_细度_rate_pass != null - ? item.入窑生料_细度_rate_pass + item.出磨煤粉_细度_rate_pass != null + ? item.出磨煤粉_细度_rate_pass : "/"; arr[9] = - item.入窑生料_水分_rate_pass != null - ? item.入窑生料_水分_rate_pass + item.出磨煤粉_水分_rate_pass != null + ? item.出磨煤粉_水分_rate_pass : "/"; arr[10] = - item.熟料_立升重_rate_pass != null - ? item.熟料_立升重_rate_pass + item.出窑熟料_立升重_rate_pass != null + ? item.出窑熟料_立升重_rate_pass : "/"; arr[11] = - item.熟料_fCaO_rate_pass != null - ? item.熟料_fCaO_rate_pass + item.出窑熟料_fCaO_rate_pass != null + ? item.出窑熟料_fCaO_rate_pass : "/"; //煤耗 - arr[12] = item.elec_consume_unit; //当期值(KW·h/t) - let keyVale = "goal_val_" + n; - arr[5] = goalData[keyVale]; //目标值(KW·h/t)//需要接口获取 - arr[6] = arr[4] - item.celec_consume_unit; //当期与目标差值(KW·h/t) + arr[12] = item.coal_consume_unit; //当期值(KW·h/t) + let keyValue = "goal_val_" + n; + if (goalData.length > 0){ + goalData.forEach((item) => { + if (item.id == "3638341891940192256") { + arr[13] = item[keyValue]; //目标值(KW·h/t)//需要接口获取 + }else if (item.id == "3637651365016526848"){ + arr[25] = item[keyValue]; //目标值(KW·h/t)//需要接口获取 + } + }); + }; + let dq = 0 + if (arr[13] !== null && arr[13] !== undefined){ + dq = arr[12] - arr[13]; //当期与目标差值(KW·h/t) + }else{ + dq == "/" + }; + arr[14] = dq; //当期与目标差值 let ind_pre = 0, huanbi = 0; if (item.month_s == 1) { ind_pre = 12; huanbi = wrapArr0[ind_pre] - ? wrapArr0[ind_pre].elec_consume_unit + ? wrapArr0[ind_pre].coal_consume_unit : "/"; } else { ind_pre = ind - 1; huanbi = wrapArr[ind_pre] - ? wrapArr[ind_pre].elec_consume_unit - ? wrapArr[ind_pre].elec_consume_unit + ? wrapArr[ind_pre].coal_consume_unit + ? wrapArr[ind_pre].coal_consume_unit : "/" : "/"; } arr[15] = huanbi; //环期值(KW·h/t)上个月的值 - arr[16] = item.celec_consume_unit; //当期与环期差值(KW·h/t) - arr[17] = item.celec_consume_unit; //环比增长率(%) - arr[18] = item.celec_consume_unit; //同比增长率(%) + if(huanbi !=="/"){ + arr[16] = arr[12] - huanbi; //当期与环期差值(KW·h/t) + }else{ + arr[16] = "/" + }; + if (arr[15] !== "/"&& arr[15]!== 0 && arr[16]!=="/") { + arr[17] = (arr[16] / arr[15]) * 100; //环比增长率(%) + } else{ + arr[17] = "/" + }; + let sameRate = 0; + if ( + wrapArr0[ind] && + wrapArr0[ind].coal_consume_unit + ) { + sameRate = + ((arrs[1] - + wrapArr0[ind].coal_consume_unit) / + wrapArr0[ind].coal_consume_unit) * + 100; + } else { + sameRate = "/"; + } + arr[18] = sameRate; ///同比增长率(%)需要当前值/ 上一年同一个月的值即wrapArr0[ind].elec_consume_unit //电耗 //设备 arr[19] = @@ -278,8 +313,10 @@ export default { ? item.窑头排风机_consume_unit : "/"; arr[24] = item.elec_consume_unit; //当期值(KW·h/t) - arr[25] = item.celec_consume_unit; //目标值(KW·h/t)//需要接口获取 - arr[26] = item.celec_consume_unit; //当期与目标差值(KW·h/t) + // arr[25] = item.celec_consume_unit; //目标值(KW·h/t)//需要接口获取 + if (item.elec_consume_unit != null &&item.elec_consume_unit !== "/"){ + arr[26] = arr[24]-arr[25] //当期与目标差值(KW·h/t) + } let ind_pre1 = 0, huanbi1 = 0; if (item.month_s == 1) { @@ -296,13 +333,18 @@ export default { : "/"; } arr[27] = huanbi; //环期值(KW·h/t)上个月的值 - arr[28] = item.celec_consume_unit; //当期与环期差值(KW·h/t) - arr[29] = item.celec_consume_unit; //环比增长率(%) + if(arr[27]!=="/" && huanbi1!=="/"){ + arr[28] = arr[24] - huanbi1; //当期与环期差值(KW·h/t) + }else{ + arr[28] = "/" + } + if(arr[28]!=="/" && huanbi1!=="/"){ + arr[29] = (arr[28] / huanbi1) * 100; //环比增长率(%) + }else{ + arr[29] = "/"}; //环比增长率(%) arr[30] = item.celec_consume_unit; //同比增长率(%) - arr[31] = item.celec_consume_unit; //同比增长率(%) wrapArr[ind] = arr; }); - console.log(wrapArr); that.tableDatas = wrapArr; } else { } diff --git a/src/views/enm_kilnbase/power.vue b/src/views/enm_kilnbase/power.vue index 4dcbe760..8264b55c 100644 --- a/src/views/enm_kilnbase/power.vue +++ b/src/views/enm_kilnbase/power.vue @@ -382,7 +382,7 @@ export default { obj.hour = hours_h; obj.mgroup__name = "回转窑"; obj.mpoint__material__code__in = "elec,elec_0"; - // obj.mpoint__ep_monitored__isnull = 0; + // // obj.mpoint__ep_monitored__isnull = 0; obj.mpoint__need_display = 1; obj.page = 0; this.$API.enm.mpoint.stat.req(obj).then((res) => { @@ -469,7 +469,7 @@ export default { obj.day = days; obj.mgroup__name = "回转窑"; obj.mpoint__material__code__in = "elec,elec_0"; - obj.mpoint__ep_monitored__isnull = 0; + // obj.mpoint__ep_monitored__isnull = 0; obj.mpoint__need_display = 1; obj.page = 0; this.$API.enm.mpoint.stat.req(obj).then((response) => { @@ -509,7 +509,7 @@ export default { obj.month_s = month; obj.mgroup__name = "回转窑"; obj.mpoint__material__code__in = "elec,elec_0"; - obj.mpoint__ep_monitored__isnull = 0; + // obj.mpoint__ep_monitored__isnull = 0; obj.mpoint__need_display = 1; obj.page = 0; this.$API.enm.mpoint.stat.req(obj).then((response) => { @@ -550,7 +550,7 @@ export default { obj.year_s = year; obj.mgroup__name = "回转窑"; obj.mpoint__material__code__in = "elec,elec_0"; - obj.mpoint__ep_monitored__isnull = 0; + // obj.mpoint__ep_monitored__isnull = 0; obj.mpoint__need_display = 1; obj.page = 0; this.$API.enm.mpoint.stat.req(obj).then((response) => { diff --git a/src/views/enm_mill/power.vue b/src/views/enm_mill/power.vue index ebe2e42d..6c75c870 100644 --- a/src/views/enm_mill/power.vue +++ b/src/views/enm_mill/power.vue @@ -591,7 +591,7 @@ export default { obj.day = days; obj.mgroup__name = "水泥磨"; obj.mpoint__material__code__in = "elec,elec_0"; - obj.mpoint__ep_monitored__isnull = 0; + // obj.mpoint__ep_monitored__isnull = 0; obj.mpoint__need_display = 1; obj.page = 0; this.$API.enm.mpoint.stat.req(obj).then((response) => { @@ -632,7 +632,7 @@ export default { obj.month_s = month; obj.mgroup__name = "水泥磨"; obj.mpoint__material__code__in = "elec,elec_0"; - obj.mpoint__ep_monitored__isnull = 0; + // obj.mpoint__ep_monitored__isnull = 0; obj.mpoint__need_display = 1; obj.page = 0; this.$API.enm.mpoint.stat.req(obj).then((response) => { @@ -673,7 +673,7 @@ export default { obj.year_s = year; obj.mgroup__name = "水泥磨"; obj.mpoint__material__code__in = "elec,elec_0"; - obj.mpoint__ep_monitored__isnull = 0; + // obj.mpoint__ep_monitored__isnull = 0; obj.mpoint__need_display = 1; obj.page = 0; this.$API.enm.mpoint.stat.req(obj).then((response) => { @@ -685,6 +685,9 @@ export default { data.forEach((item) => { let ind = item.month_s - 1; let index = that.mpoints.indexOf(item.mpoint_name); //第几个mpoint + if(index==-1){ + return; + } seriesData[index][ind] = item.elec_consume_unit; }); let options = { ...that.option3 }; diff --git a/src/views/enm_pack/report.vue b/src/views/enm_pack/report.vue index e04dc87c..625bd68c 100644 --- a/src/views/enm_pack/report.vue +++ b/src/views/enm_pack/report.vue @@ -38,8 +38,9 @@ - - {{ item[0] }} + + {{ item[0] }} + {{ item[0] }} {{ item[1] }} {{ item[4] }} - {{ item[5].toFixed(2) }} + {{ item[5] }} {{ item[6] }} - {{ item[7].toFixed(2) }} + {{ item[7] }} {{ item[8] }} @@ -326,8 +327,18 @@ export default { mgroup: "", }, tableDatas: [ - ["产量", "总产量(t)", 0, 0, 0, 0, 0, 0, 0, 0], - ["能耗", "单位产品分布电耗(KW·h/t)", 0, 0, 0, 0, 0, 0, 0, 0], + ["出厂水泥", "P.O42.5R 散装(t)", 0, 0, 0, "/", "/", "/","/"], + ["出厂水泥", "P.O42.5R 袋装(t)", 0, 0, 0, "/", "/", "/","/"], + ["出厂水泥", "P.O42.5 袋装(t)", 0, 0, 0, "/", "/", "/","/"], + ["出厂水泥", "P.O42.5 散装(t)", 0, 0, 0, "/", "/", "/","/"], + ["出厂水泥", "P.C42.5 袋装(t)", 0, 0, 0, "/", "/", "/","/"], + ["出厂水泥", "P.C42.5 散装(t)", 0, 0, 0, "/", "/", "/","/"], + ["出厂水泥", "P.O52.5 散装(t)", 0, 0, 0, "/", "/", "/","/"], + ["出厂水泥", "出厂水泥合计(t)", 0, 0, 0, 0, 0, 0, 0], + + ["出厂熟料", "熟料(t)", 0, 0, 0, "/", "/", "/","/"], + ["能耗", "单位产品分布电耗(KW·h/t)", 0, 0, 0, 0, 0, 0, 0], + ], tableName: "生产报告", modelValue: true, @@ -360,6 +371,54 @@ export default { yAxisIndex: 0, data: [], }, + { + name: "P.O42.5R 散装", + type: "bar", + yAxisIndex: 0, + data: [], + }, + { + name: "P.O42.5R 袋装", + type: "bar", + yAxisIndex: 0, + data: [], + }, + { + name: "P.O42.5 袋装", + type: "bar", + yAxisIndex: 0, + data: [], + }, + { + name: "P.O42.5 散装", + type: "bar", + yAxisIndex: 0, + data: [], + }, + { + name: "P.C42.5 袋装", + type: "bar", + yAxisIndex: 0, + data: [], + }, + { + name: "P.C42.5 散装", + type: "bar", + yAxisIndex: 0, + data: [], + }, + { + name: "P.O52.5 散装", + type: "bar", + yAxisIndex: 0, + data: [], + }, + { + name: "熟料", + type: "bar", + yAxisIndex: 0, + data: [], + }, { name: "分布电耗", type: "bar", @@ -384,12 +443,60 @@ export default { }, yAxis: yAxis, series: [ - { + { name: "总产量", type: "bar", yAxisIndex: 0, data: [], }, + { + name: "P.O42.5R 散装", + type: "bar", + yAxisIndex: 0, + data: [], + }, + { + name: "P.O42.5R 袋装", + type: "bar", + yAxisIndex: 0, + data: [], + }, + { + name: "P.O42.5 袋装", + type: "bar", + yAxisIndex: 0, + data: [], + }, + { + name: "P.O42.5 散装", + type: "bar", + yAxisIndex: 0, + data: [], + }, + { + name: "P.C42.5 袋装", + type: "bar", + yAxisIndex: 0, + data: [], + }, + { + name: "P.C42.5 散装", + type: "bar", + yAxisIndex: 0, + data: [], + }, + { + name: "P.O52.5 散装", + type: "bar", + yAxisIndex: 0, + data: [], + }, + { + name: "熟料", + type: "bar", + yAxisIndex: 0, + data: [], + }, { name: "分布电耗", type: "bar", @@ -440,43 +547,69 @@ export default { params1.year_s = year; params1.type = "year_s"; params1.mgroup = that.query.mgroup; - this.$API.enm.enstat.req(params1).then((res1) => { + this.$API.enm.mpointstat.list.req(params1).then((res1) => { if (res1.length > 0) { - let data1 = res1[0]; - that.tableDatas[0][4] = data1.total_production; - that.tableDatas[1][4] = data1.elec_consume_unit; - } - }); - //月 + res1.forEach((item) => { + if (item.mpoint_name == "水泥+P.O42.5R 散装") { + that.tableDatas[0][4] = item.val; + }else if (item.mpoint_name == "水泥+P.O42.5R 袋装"){ + that.tableDatas[1][4] = item.val; + }else if (item.mpoint_name == "水泥+P.O42.5 袋装") { + that.tableDatas[2][4] = item.val; + }else if (item.mpoint_name == "水泥+P.O42.5 散装") { + that.tableDatas[3][4] = item.val; + }else if (item.mpoint_name == "水泥+P.C42.5 袋装") { + that.tableDatas[4][4] = item.val; + }else if (item.mpoint_name == "水泥+P.C42.5 散装") { + that.tableDatas[5][4] = item.val; + }else if (item.mpoint_name == "水泥+P.O52.5 散装") { + that.tableDatas[6][4] = item.val; + }else if (item.mpoint_name == "出厂批次水泥合计") { + that.tableDatas[7][4] = item.val; + }else if (item.mpoint_name == "出厂熟料"){ + that.tableDatas[8][4] = item.val; + }else if (item.mpoint_name == "包装进线") { + that.tableDatas[9][4] = item.val; + } + } + )} + }).then(()=>{ + //月 let params2 = {}; params2.page = 0; params2.year_s = year; params2.month_s = month; params2.type = "month_s"; params2.mgroup = that.query.mgroup; - this.$API.enm.enstat.req(params2).then((res2) => { + this.$API.enm.mpointstat.list.req(params2).then((res2) => { if (res2.length > 0) { - let data2 = res2[0]; - that.tableDatas[0][3] = data2.total_production; - that.tableDatas[1][3] = data2.elec_consume_unit; + res2.forEach((item) => { + if (item.mpoint_name == "水泥+P.O42.5R 散装") { + that.tableDatas[0][3] = item.val; + }else if (item.mpoint_name == "水泥+P.O42.5R 袋装"){ + that.tableDatas[1][3] = item.val; + }else if (item.mpoint_name == "水泥+P.O42.5 袋装") { + that.tableDatas[2][3] = item.val; + }else if (item.mpoint_name == "水泥+P.O42.5 散装") { + that.tableDatas[3][3] = item.val; + }else if (item.mpoint_name == "水泥+P.C42.5 袋装") { + that.tableDatas[4][3] = item.val; + }else if (item.mpoint_name == "水泥+P.C42.5 散装") { + that.tableDatas[5][3] = item.val; + }else if (item.mpoint_name == "水泥+P.O52.5 散装") { + that.tableDatas[6][3] = item.val; + }else if (item.mpoint_name == "出厂批次水泥合计") { + that.tableDatas[7][3] = item.val; + }else if (item.mpoint_name == "出厂熟料"){ + that.tableDatas[8][3] = item.val; + }else if (item.mpoint_name == "包装进线") { + that.tableDatas[9][3] = item.val; + } + } + ) } - }); - //昨日 - let params3 = {}; - params3.page = 0; - params3.year_s = year_d; - params3.month_s = month_d; - params3.day_s = days_d; - params3.type = "day_s"; - params3.mgroup = that.query.mgroup; - this.$API.enm.enstat.req(params3).then((res3) => { - if (res3.length > 0) { - let data3 = res3[0]; - that.tableDatas[0][2] = data3.total_production; - that.tableDatas[1][2] = data3.elec_consume_unit; - } - }); - //月目标 + }).then(() => { + //月年目标 let params5 = {}; params5.page = 0; params5.mgroup = that.query.mgroup; @@ -488,63 +621,121 @@ export default { data5.forEach((item5) => { let str = "goal_val_" + that.month; if (item5.goal_cate_name == "总产量(t)") { - that.tableDatas[0][5] = item5[str]; - that.tableDatas[0][7] = item5.goal_val; + that.tableDatas[7][5] = item5[str]; + that.tableDatas[7][7] = item5.goal_val; + that.tableDatas[7][8] = precen( + that.tableDatas[7][4], + that.tableDatas[7][7] + );//计算年完成度 + that.tableDatas[7][6] = precen( + that.tableDatas[7][3], + that.tableDatas[7][5] + );// 计算月完成度 + } else if ( item5.goal_cate_name == "单位产品分布电耗(KW·h/t)" ) { - that.tableDatas[1][5] = item5[str]; - that.tableDatas[1][7] = item5.goal_val; + that.tableDatas[9][5] = item5[str]; + that.tableDatas[9][7] = item5.goal_val; + //计算月目标值 + that.tableDatas[9][8] = precen( + that.tableDatas[9][4], + that.tableDatas[9][7] + );//计算年完成度 + that.tableDatas[9][6] = precen( + that.tableDatas[9][3], + that.tableDatas[9][5] + );// 计算月完成度 + } }); } - }) - .then((res) => { - //年 - let params1 = {}; - params1.page = 0; - params1.year_s = year; - params1.type = "year_s"; - params1.mgroup = this.query.mgroup; - this.$API.enm.enstat.req(params1).then((res1) => { - if (res1.length > 0) { - let data1 = res1[0]; - that.tableDatas[0][4] = data1.total_production; - that.tableDatas[0][8] = precen( - that.tableDatas[0][4], - that.tableDatas[0][7] - ); - that.tableDatas[1][4] = data1.elec_consume_unit; - that.tableDatas[1][8] = precen( - that.tableDatas[1][4], - that.tableDatas[1][7] - ); - } - }); - //月 - let params2 = {}; - params2.page = 0; - params2.year_s = year; - params2.month_s = month; - params2.type = "month_s"; - params2.mgroup = this.query.mgroup; - this.$API.enm.enstat.req(params2).then((res2) => { - if (res2.length > 0) { - let data2 = res2[0]; - that.tableDatas[0][3] = data2.total_production; - that.tableDatas[0][6] = precen( - that.tableDatas[0][3], - that.tableDatas[0][5] - ); - that.tableDatas[1][3] = data2.elec_consume_unit; - that.tableDatas[1][6] = precen( - that.tableDatas[1][3], - that.tableDatas[1][5] - ); - } - }); }); + }) + }); + //昨日 + let params3 = {}; + params3.page = 0; + params3.year_s = year_d; + params3.month_s = month_d; + params3.day_s = days_d; + params3.type = "day_s"; + params3.mgroup = that.query.mgroup; + this.$API.enm.mpointstat.list.req(params3).then((res3) => { + if (res3.length > 0) { + res3.forEach((item) => { + if (item.mpoint_name == "水泥+P.O42.5R 散装") { + that.tableDatas[0][2] = item.val; + }else if (item.mpoint_name == "水泥+P.O42.5R 袋装"){ + that.tableDatas[1][2] = item.val; + }else if (item.mpoint_name == "水泥+P.O42.5 袋装") { + that.tableDatas[2][2] = item.val; + }else if (item.mpoint_name == "水泥+P.O42.5 散装") { + that.tableDatas[3][2] = item.val; + }else if (item.mpoint_name == "水泥+P.C42.5 袋装") { + that.tableDatas[4][2] = item.val; + }else if (item.mpoint_name == "水泥+P.C42.5 散装") { + that.tableDatas[5][2] = item.val; + }else if (item.mpoint_name == "水泥+P.O52.5 散装") { + that.tableDatas[6][2] = item.val; + }else if (item.mpoint_name == "出厂批次水泥合计") { + that.tableDatas[7][2] = item.val; + }else if (item.mpoint_name == "出厂熟料"){ + that.tableDatas[8][2] = item.val; + }else if (item.mpoint_name == "包装进线") { + that.tableDatas[9][2] = item.val; + } + } + ) + } + }); + // this.$API.mtm.goal.list + // .then((res) => { + // //月年完成度 + // let params1 = {}; + // params1.page = 0; + // params1.year_s = year; + // params1.type = "year_s"; + // params1.mgroup = this.query.mgroup; + // this.$API.enm.enstat.req(params1).then((res1) => { + // if (res1.length > 0) { + // let data1 = res1[0]; + // that.tableDatas[0][4] = data1.total_production; + // that.tableDatas[0][8] = precen( + // that.tableDatas[0][4], + // that.tableDatas[0][7] + // ); + // that.tableDatas[1][4] = data1.elec_consume_unit; + // that.tableDatas[1][8] = precen( + // that.tableDatas[1][4], + // that.tableDatas[1][7] + // ); + // } + // }); + // //月 + // let params2 = {}; + // params2.page = 0; + // params2.year_s = year; + // params2.month_s = month; + // params2.type = "month_s"; + // params2.mgroup = this.query.mgroup; + // this.$API.enm.enstat.req(params2).then((res2) => { + // if (res2.length > 0) { + // let data2 = res2[0]; + // that.tableDatas[0][3] = data2.total_production; + // that.tableDatas[0][6] = precen( + // that.tableDatas[0][3], + // that.tableDatas[0][5] + // ); + // that.tableDatas[1][3] = data2.elec_consume_unit; + // that.tableDatas[1][6] = precen( + // that.tableDatas[1][3], + // that.tableDatas[1][5] + // ); + // } + // }); + // }); that.getDayData(year, month); that.getMonthData(year); }); @@ -572,7 +763,7 @@ export default { } } }, - //获取天数据 + //获取天数据-图表 getDayData(year, month) { let that = this; let query1 = {}; @@ -581,19 +772,53 @@ export default { query1.month_s = month; query1.type = "day_s"; query1.mgroup = this.query.mgroup; - this.$API.enm.enstat.req(query1).then((response) => { + this.$API.enm.mpointstat.list.req(query1).then((response) => { let seriesData0 = [], - seriesData1 = []; - + seriesData1 = [], + seriesData2 = [], + seriesData3 = [], + seriesData4 = [], + seriesData5 = [], + seriesData6 = [], + seriesData7 = [], + seriesData8 = [], + seriesData9 = []; let data = response; data.forEach((item) => { let ind = item.day_s - 1; - seriesData0[ind] = item.total_production; - seriesData1[ind] = item.elec_consume_unit; + if (item.mpoint_name == "水泥+P.O42.5R 散装") { + seriesData1[ind] = item.val; + }else if (item.mpoint_name == "水泥+P.O42.5R 袋装"){ + seriesData2[ind] = item.val; + }else if (item.mpoint_name == "水泥+P.O42.5 袋装") { + seriesData3[ind] = item.val; + }else if (item.mpoint_name == "水泥+P.O42.5 散装") { + seriesData4[ind] = item.val; + }else if (item.mpoint_name == "水泥+P.C42.5 袋装") { + seriesData5[ind] = item.val; + }else if (item.mpoint_name == "水泥+P.C42.5 散装") { + seriesData6[ind] = item.val; + }else if (item.mpoint_name == "水泥+P.O52.5 散装") { + seriesData7[ind] = item.val; + }else if (item.mpoint_name == "出厂批次水泥合计") { + seriesData0[ind] = item.val; + }else if (item.mpoint_name == "出厂熟料"){ + seriesData8[ind] = item.val; + }else if (item.mpoint_name == "包装进线") { + seriesData9[ind] = item.val; + } }); let options = { ...that.option1 }; options.series[0].data = seriesData0; options.series[1].data = seriesData1; + options.series[2].data = seriesData2; + options.series[3].data = seriesData3; + options.series[4].data = seriesData4; + options.series[5].data = seriesData5; + options.series[6].data = seriesData6; + options.series[7].data = seriesData7; + options.series[8].data = seriesData8; + options.series[9].data = seriesData9; let dayXAxis = []; for (let i = 1; i <= that.days; i++) { let item = i + "日"; @@ -603,7 +828,7 @@ export default { that.optionDay = options; }); }, - //获取月数据 + //获取月数据-图表 getMonthData(year) { let that = this; let query2 = {}; @@ -611,18 +836,53 @@ export default { query2.year_s = year; query2.type = "month_s"; query2.mgroup = that.query.mgroup; - this.$API.enm.enstat.req(query2).then((response) => { + this.$API.enm.mpointstat.list.req(query2).then((response) => { let seriesData0 = [], - seriesData1 = []; + seriesData1 = [], + seriesData2 = [], + seriesData3 = [], + seriesData4 = [], + seriesData5 = [], + seriesData6 = [], + seriesData7 = [], + seriesData8 = [], + seriesData9 = []; let data = response; data.forEach((item) => { let ind = item.month_s - 1; - seriesData0[ind] = item.total_production; - seriesData1[ind] = item.elec_consume_unit; + if (item.mpoint_name == "水泥+P.O42.5R 散装") { + seriesData1[ind] = item.val; + }else if (item.mpoint_name == "水泥+P.O42.5R 袋装"){ + seriesData2[ind] = item.val; + }else if (item.mpoint_name == "水泥+P.O42.5 袋装") { + seriesData3[ind] = item.val; + }else if (item.mpoint_name == "水泥+P.O42.5 散装") { + seriesData4[ind] = item.val; + }else if (item.mpoint_name == "水泥+P.C42.5 袋装") { + seriesData5[ind] = item.val; + }else if (item.mpoint_name == "水泥+P.C42.5 散装") { + seriesData6[ind] = item.val; + }else if (item.mpoint_name == "水泥+P.O52.5 散装") { + seriesData7[ind] = item.val; + }else if (item.mpoint_name == "出厂批次水泥合计") { + seriesData0[ind] = item.val; + }else if (item.mpoint_name == "出厂熟料"){ + seriesData8[ind] = item.val; + }else if (item.mpoint_name == "包装进线") { + seriesData9[ind] = item.val; + } }); let options = { ...that.option2 }; options.series[0].data = seriesData0; options.series[1].data = seriesData1; + options.series[2].data = seriesData2; + options.series[3].data = seriesData3; + options.series[4].data = seriesData4; + options.series[5].data = seriesData5; + options.series[6].data = seriesData6; + options.series[7].data = seriesData7; + options.series[8].data = seriesData8; + options.series[9].data = seriesData9; let monthXAxis = []; for (let i = 1; i <= that.month; i++) { let item = i + "月"; diff --git a/src/views/enm_pack/teamAnalysis.vue b/src/views/enm_pack/teamAnalysis.vue index 53ee4bb2..19e40fd5 100644 --- a/src/views/enm_pack/teamAnalysis.vue +++ b/src/views/enm_pack/teamAnalysis.vue @@ -113,13 +113,12 @@ export default { }); }, methods: { - getData() { + getData(goalData) { let that = this; let query0 = {}; query0.page = 0; query0.type = "month_st"; query0.year_s = that.query.year_s - 1; - query0.mgroup = "3346520558031773696"; let wrapArr = [], wrapArr0 = [], wrapArrs = []; @@ -167,7 +166,7 @@ export default { arr[3] = item.elec_consume_unit; //当期值(KW·h/t) let keyVale = "goal_val_" + n; arr[4] = goalData[keyVale]; //目标值(KW·h/t)//需要接口获取 - arr[5] = arr[3] - item.celec_consume_unit; //当期与目标差值(KW·h/t) + arr[5] = arr[3] - arr[4]; //当期与目标差值(KW·h/t) let ind_pre = 0, huanbi = 0; if (item.month_s == 1) { @@ -183,14 +182,36 @@ export default { : "/" : "/"; } - arr[6] = huanbi; //环期值(KW·h/t)上个月的值 - arr[7] = item.celec_consume_unit; //当期与环期差值(KW·h/t) - arr[8] = item.celec_consume_unit; //环比增长率(%) - arr[9] = item.celec_consume_unit; //同比增长率(%) - arr[10] = item.celec_consume_unit; //同比增长率(%) + arr[6] = huanbi; //环期值(KW·h/t)上个月的值\ + let diff = 0; + if (arr[6] == "/"){ + diff == "/"; + }else{ + diff = arr[3] - arr[6]; //当期与环期差值(KW·h/t) + } + arr[7] = diff; + if (arr[7]=="/" || arr[6]=="/" || arr[6]==0){ + arr[8] == "/"; + }else{ + arr[8] = (arr[7]/arr[6])*100 //环比增长率(%)= 当期与环期差值(KW·h/t)/环期值(KW·h/t)*100% + } + let sameRate = 0; + if ( + wrapArr0[ind] && + wrapArr0[ind].elec_consume_unit + ) { + sameRate = + ((arrs[1] - + wrapArr0[ind].elec_consume_unit) / + wrapArr0[ind].elec_consume_unit) * + 100; + } else { + sameRate = "/"; + } + arr[9] = sameRate; ///同比增长率(%)需要当前值/ 上一年同一个月的值即wrapArr0[ind].elec_consume_unit + // arr[10] = item.celec_consume_unit; //同比增长率(%)需要当前值-上一年同一个月的值即wrapArr0[ind].elec_consume_unit wrapArr[ind] = arr; }); - console.log(wrapArr); that.tableDatas = wrapArr; } else { } diff --git a/src/views/enm_pack/workshopAnalysis.vue b/src/views/enm_pack/workshopAnalysis.vue index 55ea4a51..d2e65acb 100644 --- a/src/views/enm_pack/workshopAnalysis.vue +++ b/src/views/enm_pack/workshopAnalysis.vue @@ -229,7 +229,7 @@ export default { //当期与目标差值(KW·h/t) let diff = 0; if (item[2] !== "/") { - diff = item[1] - item[2]; + diff = (item[1] - item[2]).toFixed(2); } else { diff = "/"; } @@ -240,9 +240,9 @@ export default { let num = index - 1; if ( wrapArr[num] && - wrapArr[num].elec_consume_unit + wrapArr[num][1] ) { - lastNum = wrapArr[num].elec_consume_unit; + lastNum = wrapArr[num][1]; } else { lastNum = "/"; } diff --git a/src/views/enm_report/quality.vue b/src/views/enm_report/quality.vue index cea2c191..0c05bb67 100644 --- a/src/views/enm_report/quality.vue +++ b/src/views/enm_report/quality.vue @@ -203,17 +203,17 @@ if(that.deptName=='原料车间'){ that.header2Obj=[{name:'辅料',lengths:3},{name:'干混生料',lengths:4}]; that.header2 = ['辅料','干混生料'];//物料 - that.header3 = ['细度','Fe2O3','水分','细度','Fe2O3','水分','CaO'];//检测项 + // that.header3 = ['细度','Fe2O3','水分','细度','Fe2O3','水分','CaO'];//检测项 that.header4 = ['平均值','检次','合次','及格率','平均值','检次','合次','及格率','平均值','检次','合次','及格率','平均值','检次','合次','及格率','平均值','检次','合次','及格率','平均值','检次','合次','及格率','平均值','检次','合次','及格率'];//检测项 }else if(that.deptName=='烧成车间'){ that.header2Obj=[{name:'入窑生料',lengths:4},{name:'熟料',lengths:4}]; that.header2 = ['入窑生料','熟料'];//物料 - that.header3 = ['CaO','Fe2O3','细度','水分','立升重','f-CaO','细度','水分'];//检测项 + // that.header3 = ['CaO','Fe2O3','细度','水分','立升重','f-CaO','细度','水分'];//检测项 that.header4 = ['平均值','检次','合次','及格率','平均值','检次','合次','及格率','平均值','检次','合次','及格率','平均值','检次','合次','及格率','平均值','检次','合次','及格率','平均值','检次','合次','及格率','平均值','检次','合次','及格率','平均值','检次','合次','及格率'];//检测项 }else{ that.header2Obj=[{name:'出磨水泥',lengths:3}]; that.header2 = ['出磨水泥'];//物料 - that.header3 = ['比表面积','SO3','掺量'];//检测项 + // that.header3 = ['比表面积','SO3','掺量'];//检测项 that.header4 = ['平均值','检次','合次','及格率','平均值','检次','合次','及格率','平均值','检次','合次','及格率'];//检测项 } let params = {page: 0}; diff --git a/src/views/enm_rm/logDetail.vue b/src/views/enm_rm/logDetail.vue index 194a0d47..5f9ae29d 100644 --- a/src/views/enm_rm/logDetail.vue +++ b/src/views/enm_rm/logDetail.vue @@ -22,6 +22,7 @@ type="primary" @click.stop="addStlog" v-if="activeName == 'fourth'" + v-auth="'sflogexp.create'" style=" position: absolute; top: 6px; @@ -129,7 +130,7 @@ 保存 @@ -168,7 +169,7 @@ type="primary" :loading="isSaveing" @click="submit5(item)" - style="margin-left: 20px" + style="margin-left: 20px" v-auth="'mpointstat.create'" >保存 @@ -225,6 +226,7 @@ size="small" @click="mpointStat_del(scope.row)" type="danger" + v-auth="'mpointstat.delete'" >删除 @@ -539,6 +541,7 @@ @click=" sflogexp_edit(scope.row) " + v-auth="'sflogexp.update'" type="primary" >编辑 diff --git a/src/views/enm_rm/power.vue b/src/views/enm_rm/power.vue index b17ee554..c49671c9 100644 --- a/src/views/enm_rm/power.vue +++ b/src/views/enm_rm/power.vue @@ -570,7 +570,7 @@ export default { obj.day = days; obj.mgroup__name = "原料磨"; obj.mpoint__material__code__in = "elec,elec_0"; - obj.mpoint__ep_monitored__isnull = 0; + // obj.mpoint__ep_monitored__isnull = 0; obj.mpoint__need_display = 1; obj.page = 0; this.$API.enm.mpoint.stat.req(obj).then((response) => { @@ -611,7 +611,7 @@ export default { obj.month_s = month; obj.mgroup__name = "原料磨"; obj.mpoint__material__code__in = "elec,elec_0"; - obj.mpoint__ep_monitored__isnull = 0; + // obj.mpoint__ep_monitored__isnull = 0; obj.mpoint__need_display = 1; obj.page = 0; this.$API.enm.mpoint.stat.req(obj).then((response) => { @@ -652,7 +652,7 @@ export default { obj.year_s = year; obj.mgroup__name = "原料磨"; obj.mpoint__material__code__in = "elec,elec_0"; - obj.mpoint__ep_monitored__isnull = 0; + // obj.mpoint__ep_monitored__isnull = 0; obj.mpoint__need_display = 1; obj.page = 0; this.$API.enm.mpoint.stat.req(obj).then((response) => { diff --git a/src/views/enm_rmbase/power.vue b/src/views/enm_rmbase/power.vue index 7ccfd086..5c07a1a5 100644 --- a/src/views/enm_rmbase/power.vue +++ b/src/views/enm_rmbase/power.vue @@ -459,7 +459,7 @@ export default { obj.day = days; obj.mgroup__name = "原料磨"; obj.mpoint__material__code__in = "elec,elec_0"; - obj.mpoint__ep_monitored__isnull = 0; + // obj.mpoint__ep_monitored__isnull = 0; obj.mpoint__need_display = 1; obj.page = 0; this.$API.enm.mpoint.stat.req(obj).then((response) => { @@ -500,7 +500,7 @@ export default { obj.month_s = month; obj.mgroup__name = "原料磨"; obj.mpoint__material__code__in = "elec,elec_0"; - obj.mpoint__ep_monitored__isnull = 0; + // obj.mpoint__ep_monitored__isnull = 0; obj.mpoint__need_display = 1; obj.page = 0; this.$API.enm.mpoint.stat.req(obj).then((response) => { @@ -541,7 +541,7 @@ export default { obj.year_s = year; obj.mgroup__name = "原料磨"; obj.mpoint__material__code__in = "elec,elec_0"; - obj.mpoint__ep_monitored__isnull = 0; + // obj.mpoint__ep_monitored__isnull = 0; obj.mpoint__need_display = 1; obj.page = 0; this.$API.enm.mpoint.stat.req(obj).then((response) => { diff --git a/src/views/enm_slag/handoverLog.vue b/src/views/enm_slag/handoverLog.vue index 12e404a9..009fb214 100644 --- a/src/views/enm_slag/handoverLog.vue +++ b/src/views/enm_slag/handoverLog.vue @@ -104,7 +104,7 @@ size="small" @click="sflog_edit(scope.row)" type="primary" - >编辑详情 { @@ -438,7 +431,7 @@ export default { obj.year_s = year; obj.mgroup__name = "电石渣"; obj.mpoint__material__code__in = "elec,elec_0"; - obj.mpoint__ep_monitored__isnull = 0; + // obj.mpoint__ep_monitored__isnull = 0; obj.mpoint__need_display = 1; obj.page = 0; this.$API.enm.mpoint.stat.req(obj).then((response) => { @@ -450,6 +443,9 @@ export default { data.forEach((item) => { let ind = item.month_s - 1; let index = that.mpoints.indexOf(item.mpoint_name); //第几个mpoint + if(index==-1){ + return; + } seriesData[index][ind] = item.elec_consume_unit; }); let options = { ...that.option3 }; diff --git a/src/views/ops/menu.vue b/src/views/ops/menu.vue index 53a9298d..67644e24 100644 --- a/src/views/ops/menu.vue +++ b/src/views/ops/menu.vue @@ -53,9 +53,9 @@ - 模块 - 页面 - 接口 + 模块 + 页面 + 接口 @@ -86,6 +86,11 @@ + + diff --git a/src/views/statistics/pass_num_gx.vue b/src/views/statistics/pass_num_gx.vue new file mode 100644 index 00000000..a1885073 --- /dev/null +++ b/src/views/statistics/pass_num_gx.vue @@ -0,0 +1,257 @@ + + + + diff --git a/src/views/statistics/process_check_gx.vue b/src/views/statistics/process_check_gx.vue new file mode 100644 index 00000000..4322d295 --- /dev/null +++ b/src/views/statistics/process_check_gx.vue @@ -0,0 +1,103 @@ + + + + + diff --git a/src/views/statistics/statistics_inm.vue b/src/views/statistics/statistics_inm.vue new file mode 100644 index 00000000..465a29e5 --- /dev/null +++ b/src/views/statistics/statistics_inm.vue @@ -0,0 +1,252 @@ + + + + + diff --git a/src/views/statistics/statistics_saobian.vue b/src/views/statistics/statistics_saobian.vue new file mode 100644 index 00000000..726b1b94 --- /dev/null +++ b/src/views/statistics/statistics_saobian.vue @@ -0,0 +1,421 @@ + + + + + diff --git a/src/views/statistics/task_rate_gx.vue b/src/views/statistics/task_rate_gx.vue new file mode 100644 index 00000000..b96f23c5 --- /dev/null +++ b/src/views/statistics/task_rate_gx.vue @@ -0,0 +1,218 @@ + + + + diff --git a/src/views/wf/ticketdetail.vue b/src/views/wf/ticketdetail.vue index 6d2fba90..61fcdfb6 100644 --- a/src/views/wf/ticketdetail.vue +++ b/src/views/wf/ticketdetail.vue @@ -248,6 +248,9 @@ + + + { that.operationBtn = res; + console.log("operationBtn", that.operationBtn); if(res.length>0){ for (let i = 0; i < res.length; i++) { if(res[i].on_submit_func=="apps.opm.services.check_opl_audit_imgs"){ that.audit_imgs_show = true; } + if(res[i].on_submit_func=="apps.opm.services.check_opl_work_imgs"){ + that.audit_work_show = true; + } } } @@ -763,7 +779,6 @@ export default { //入厂项目详情 getRpj() { this.$API.rpm.rpj.item.req(this.projectId).then((res) => { - // debugger; this.itemDetail = res; }); }, @@ -771,8 +786,6 @@ export default { getOpl() { let that = this; that.$API.opm.opl.read.req(that.projectId).then((res) => { - // debugger; - // console.log(res); that.itemDetail = res; that.operationId = res.operation; if(res.audit_imgs.length>0){ @@ -783,8 +796,6 @@ export default { obj.url = item.file; that.fileurl.push(obj) }); - // console.log('that.audit_imgs',that.audit_imgs) - // console.log('that.fileurl',that.fileurl) } }); }, @@ -857,7 +868,13 @@ export default { params.ticket_data.close_dos = this.form.close_dos; } if(this.audit_imgs_show){ - params.ticket_data.audit_imgs = this.audit_imgs; + if(this.audit_imgs.length>0){ + params.ticket_data.audit_imgs = this.audit_imgs; + }else{ + this.$message.error("请上传审批照片"); + this.submitLoading = false; + return; + } } this.$API.wf.ticket.ticketHandle .req(this.ticketId, params) diff --git a/src/views/wpm_gx/chart.vue b/src/views/wpm_gx/chart.vue index 3785daae..fb1bdae7 100644 --- a/src/views/wpm_gx/chart.vue +++ b/src/views/wpm_gx/chart.vue @@ -1,14 +1,14 @@