+
+
+
-
+
-
+
{
+ if (res1.length > 0) {
+ res1.forEach((item) => {
+ if (item.mpoint_name == "水泥+P.O42.5R 散装") {
+ that.tableDatas[0][5] = item.val;
+ }else if (item.mpoint_name == "水泥+P.O42.5R 袋装"){
+ that.tableDatas[1][5] = item.val;
+ }else if (item.mpoint_name == "水泥+P.O42.5 袋装") {
+ that.tableDatas[2][5] = item.val;
+ }else if (item.mpoint_name == "水泥+P.O42.5 散装") {
+ that.tableDatas[3][5] = item.val;
+ }else if (item.mpoint_name == "复合硅酸盐水泥;42.5R;袋装水泥") {
+ that.tableDatas[4][5] = item.val;
+ }else if (item.mpoint_name == "水泥+P.C42.5 散装") {
+ that.tableDatas[5][5] = item.val;
+ }else if (item.mpoint_name == "水泥+P.O52.5 散装") {
+ that.tableDatas[6][5] = item.val;
+ }else if (item.mpoint_name == "散装水泥总和"){
+ that.tableDatas[7][5] = item.val;
+ }else if (item.mpoint_name == "袋装水泥总和") {
+ that.tableDatas[8][5] = item.val;
+ }
+ else if (item.mpoint_name == "出厂水泥") {
+ that.tableDatas[9][5] = item.val;
+ }else if (item.mpoint_name == "出厂熟料"){
+ that.tableDatas[10][5] = item.val;
+ }else if (item.mpoint_name == "包装进线") {
+ that.tableDatas[11][5] = item.elec_consume_unit;
+ that.tableDatas[12][5] = item.val;
+ }
+ })}
+ })
+ },
+
+ get_months(year, month){
+ let that = this;
+ 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.mpointstat.list.req(params2).then((res2) => {
+ if (res2.length > 0) {
+ res2.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 == "复合硅酸盐水泥;42.5R;袋装水泥") {
+ 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;
+ }else if (item.mpoint_name == "出厂熟料"){
+ that.tableDatas[10][4] = item.val;
+ }else if (item.mpoint_name == "包装进线") {
+ that.tableDatas[11][4] = item.elec_consume_unit;
+ that.tableDatas[12][4] = item.val;
+ }
+ })
+ }
+ })
+ },
//获取天数据-图表
getDayData(year, month) {
let that = this;
@@ -742,6 +872,7 @@ export default {
query1.month_s = month;
query1.type = "day_s";
query1.mgroup = this.query.mgroup;
+
this.$API.enm.mpointstat.list.req(query1).then((response) => {
let seriesData1 = [],
seriesData2 = [],
diff --git a/src/views/enm_pack/teamAnalysis.vue b/src/views/enm_pack/teamAnalysis.vue
index e4ecef51..72d48c73 100644
--- a/src/views/enm_pack/teamAnalysis.vue
+++ b/src/views/enm_pack/teamAnalysis.vue
@@ -88,6 +88,7 @@ export default {
mgroup: "",
},
tableDatas: [],
+ tableName:'水泥分布电耗月度分析表',
};
},
mounted() {
diff --git a/src/views/enm_pack/workshopAnalysis.vue b/src/views/enm_pack/workshopAnalysis.vue
index abc482c6..253de634 100644
--- a/src/views/enm_pack/workshopAnalysis.vue
+++ b/src/views/enm_pack/workshopAnalysis.vue
@@ -126,6 +126,7 @@ export default {
showClose: true,
echartType: "line",
asynDialog: false,
+ tableName:'水泥分布电耗月度分析表'
};
},
mounted() {
diff --git a/src/views/enm_report/quality.vue b/src/views/enm_report/quality.vue
index 92a8e18e..b987c244 100644
--- a/src/views/enm_report/quality.vue
+++ b/src/views/enm_report/quality.vue
@@ -70,6 +70,16 @@
+
@@ -86,11 +96,34 @@
{{item4}} |
-
- {{item1}} |
+
+
+ {{ cell }}
+ |
+
+
+
+
+
+
+ 取 消
+ 确 定
+
+
@@ -111,6 +144,8 @@
],
titleLength:1,
mgroupOptions:[],
+ threshold: 80, // 数值类型的阈值
+ currentThreshold: "80%", // 当前编辑的阈值
tableTime:'',
deptName:'',
typeName:'质检日报表',
@@ -145,6 +180,9 @@
tableData:[],
header2Obj:[],
deptOptions:[],
+ dialogVisible: false, // 控制对话框显示
+ currentColumnIndex: null, // 当前编辑的列索引
+ thresholds: {}, // 存储每列的阈值,key 为列索引
};
},
watch: {
@@ -178,6 +216,34 @@
}
that.tableName = that.deptName+that.typeName;
},
+ updateThreshold() {
+ const num = parseFloat(this.currentThreshold.replace("%", ""));
+ if (!isNaN(num)) {
+ // 保存阈值
+ this.thresholds[this.currentColumnIndex] = num;
+ this.dialogVisible = false; // 关闭对话框
+ } else {
+ this.$message.error("请输入有效的阈值,例如:80%");
+ }
+ },
+ // 关闭对话框时重置状态
+ resetDialog() {
+ this.currentColumnIndex = null;
+ this.currentThreshold = "";
+ },
+ // 动态样式计算
+ getCellClass(cell, cellIndex) {
+ if (cellIndex > 0 && ((cellIndex - 1) % 4 === 3)) {
+ // 假设合格率在每组数据的第四列
+ const cellValue = String(cell);
+ const value = parseFloat(cellValue.replace("%", ""));
+ const threshold = this.thresholds[cellIndex] || 0; // 获取对应列的阈值
+ if (!isNaN(value)) {
+ return value > threshold ? "green-text" : "red-text";
+ }
+ }
+ return "";
+ },
deptChange(e){
let that = this;
that.deptOptions.forEach(item=>{
@@ -197,6 +263,13 @@
this.getTableData();
});
},
+ handleCellClick(cell, rowIndex, cellIndex){
+ if ((cellIndex - 1) % 4 === 3) { //合格率列
+ this.currentColumnIndex = cellIndex; // 记录列索引
+ this.currentThreshold = this.thresholds[cellIndex] || ""; // 获取当前阈值
+ this.dialogVisible = true; // 显示对话框
+ }
+ },
getTableData(){
let that = this;
that.tableDatas3 = [];
@@ -263,7 +336,6 @@
wrapArr = wrapArr.filter(item=>{
return item
})
- console.log(wrapArr,'warpArr')
wrapArr.forEach((item1,index1)=>{
if(item1!=undefined){//一天的数据
let itemArr = [];
@@ -271,7 +343,6 @@
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;
itemArr.push(time)
//遍历每个工段
- console.log(itemArr, 'itemArr--')
item1.forEach(item2=>{
let data2 =item2.qua_data;
//遍历一个工段的物料检验数据
@@ -371,5 +442,11 @@
.tableContainer{
overflow-x: scroll;
}
+ .red-text {
+ color: red;
+ }
+ .green-text {
+ color: green;
+ }
\ No newline at end of file
diff --git a/src/views/enm_report/reportDay.vue b/src/views/enm_report/reportDay.vue
index 12fda1fd..f6eb52e2 100644
--- a/src/views/enm_report/reportDay.vue
+++ b/src/views/enm_report/reportDay.vue
@@ -215,7 +215,7 @@
params.page = 0;
params.year_s = that.year;
params.month_s = that.month;
- params.day_s = that.day;
+ // params.day_s = that.day;
params.type = 'day_s';
that.tableName = that.year+'-'+that.month+'-'+that.day+'-生产日报表';
this.$API.enm.enstat.req(params).then((res) => {
diff --git a/src/views/enm_report/teamAnalysisLog.vue b/src/views/enm_report/teamAnalysisLog.vue
index 174d144a..8f37f2a5 100644
--- a/src/views/enm_report/teamAnalysisLog.vue
+++ b/src/views/enm_report/teamAnalysisLog.vue
@@ -48,6 +48,7 @@
end-placeholder="结束日期"
v-if="query.type == 1"
style="width: 300px;"
+ @change = getTableData
/>
@@ -298,10 +300,14 @@ export default {
getTableData() {
let that = this;
let arr = [];
- if (that.query.type == 1) {
+ this.query.start_time__gte = null;
+ this.query.end_time__lt = null;
+ this.query.end_time__year = null;
+ this.query.end_time__month = null;
+ if (that.query.type == 1 && this.value1 && this.value1.length > 0) {
this.query.start_time__gte = this.value1[0];
this.query.end_time__lt = this.value1[1];}
- else if (that.query.type == 2) {
+ else if (that.query.type == 2 && that.query.month) {
this.query.start_time__gte = '',
this.query.end_time__lt = '',
arr = that.query.month.split('-');
diff --git a/src/views/enm_rm/report.vue b/src/views/enm_rm/report.vue
index a1555a16..1cdddfc0 100644
--- a/src/views/enm_rm/report.vue
+++ b/src/views/enm_rm/report.vue
@@ -459,7 +459,7 @@ let yAxis_hour = [
axisLine: {
show: true,
lineStyle: {
- color: colors[3],
+ color: colors[1],
},
},
axisLabel: {
@@ -1190,7 +1190,7 @@ export default {
dateChange() {
let that = this;
let arr = [];
- if(that.query.type==0) {
+ if(that.query.type==0 && that.query.day) {
arr = that.query.day.split('-');
that.year = Number(arr[0]);
that.month = Number(arr[1]);
@@ -1198,14 +1198,14 @@ export default {
this.getHourData(that.year, that.month, that.days);
this.get_days(that.year, that.month, that.days);
}
- else if(that.query.type==1) {
+ else if(that.query.type==1 && that.query.month) {
let year = that.query.month.split("-")[0];
let month = that.query.month.split("-")[1];
month = Number(month);
this.getDayData(year, month);
this.get_months(year, month);
this.get_month_year_goal(year, month);
- }else if (that.query.type==2) {
+ }else if (that.query.type==2 && that.query.year) {
let year = that.query.year;
this.getMonthData(year);
this.get_years(year);
@@ -1250,54 +1250,54 @@ export default {
get_months(year, month){
let that = this;
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][4] = data2.total_production;
- that.tableDatas[0][7] = precen(
- that.tableDatas[0][4],
- that.tableDatas[0][6]
- );
- that.tableDatas[1][4] = data2.elec_consume_unit;
- that.tableDatas[1][7] = consume_precen(
- that.tableDatas[1][4],
- that.tableDatas[1][6]
- );
- that.tableDatas[2][4] = data2.elec_consume;
- that.tableDatas[3][4] =
- data2.production_cost_unit;
- that.tableDatas[3][7] = consume_precen(
- that.tableDatas[3][3],
- that.tableDatas[3][6]
- );
- that.tableDatas[2][7] = consume_precen(
- that.tableDatas[2][4],
- that.tableDatas[2][6]
- );
- if (data2.imaterial_data.length > 0) {
- data2.imaterial_data.forEach((item) => {
- if (item.material_name == "湿电石渣消耗") {
- that.tableDatas[4][4] = (item.amount_consume).toFixed(2);
- that.tableDatas[4][7] = precen(
- that.tableDatas[4][4],
- that.tableDatas[4][6]
- );
- }else if(item.material_name == "湿电石渣进厂"){
- that.tableDatas[5][4] = (item.amount_consume).toFixed(2);
- that.tableDatas[5][7] = precen(
- that.tableDatas[5][4],
- that.tableDatas[5][6]
- );
- }
- });
- }
- }
- });
+ 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][4] = data2.total_production;
+ that.tableDatas[0][7] = precen(
+ that.tableDatas[0][4],
+ that.tableDatas[0][6]
+ );
+ that.tableDatas[1][4] = data2.elec_consume_unit;
+ that.tableDatas[1][7] = consume_precen(
+ that.tableDatas[1][4],
+ that.tableDatas[1][6]
+ );
+ that.tableDatas[2][4] = data2.elec_consume;
+ that.tableDatas[3][4] =
+ data2.production_cost_unit;
+ that.tableDatas[3][7] = consume_precen(
+ that.tableDatas[3][3],
+ that.tableDatas[3][6]
+ );
+ that.tableDatas[2][7] = consume_precen(
+ that.tableDatas[2][4],
+ that.tableDatas[2][6]
+ );
+ if (data2.imaterial_data.length > 0) {
+ data2.imaterial_data.forEach((item) => {
+ if (item.material_name == "湿电石渣消耗") {
+ that.tableDatas[4][4] = (item.amount_consume).toFixed(2);
+ that.tableDatas[4][7] = precen(
+ that.tableDatas[4][4],
+ that.tableDatas[4][6]
+ );
+ }else if(item.material_name == "湿电石渣进厂"){
+ that.tableDatas[5][4] = (item.amount_consume).toFixed(2);
+ that.tableDatas[5][7] = precen(
+ that.tableDatas[5][4],
+ that.tableDatas[5][6]
+ );
+ }
+ });
+ }
+ }
+ });
},
get_month_year_goal(year, month){
let that = this;
diff --git a/src/views/enm_rm/teamAnalysis.vue b/src/views/enm_rm/teamAnalysis.vue
index d833d86f..4a2b18b3 100644
--- a/src/views/enm_rm/teamAnalysis.vue
+++ b/src/views/enm_rm/teamAnalysis.vue
@@ -98,6 +98,7 @@ export default {
tableDatas: [],
goalDatas: [],
exportLoading: false,
+ tableName : '生料辅料工序班组月度对比分析',
};
},
mounted() {
diff --git a/src/views/enm_rm/workshopAnalysis.vue b/src/views/enm_rm/workshopAnalysis.vue
index fe70447d..aa327496 100644
--- a/src/views/enm_rm/workshopAnalysis.vue
+++ b/src/views/enm_rm/workshopAnalysis.vue
@@ -126,6 +126,7 @@ export default {
echartType: "line",
asynDialog: false,
monthGoal: [],
+ tableName:'生料辅料工序班组月度对比分析',
};
},
mounted() {
diff --git a/src/views/enm_rm_copy/report.vue b/src/views/enm_rm_copy/report.vue
index deb6eb2b..cd88c26d 100644
--- a/src/views/enm_rm_copy/report.vue
+++ b/src/views/enm_rm_copy/report.vue
@@ -2,6 +2,52 @@
+
+
+
+
+
-
+
-
+
-
+
-
+
-
+
{
+ if (res4.length > 0) {
+ let data4 = res4[0];
+ that.tableDatas[0][2] = data4.total_production < 1 ? 0 : data4.total_production;
+ if (data4.total_production == 0) {
+ that.tableDatas[4][2] = 0;
+ that.tableDatas[5][2] = 0;
+ that.tableDatas[6][2] = 0;
+ }else {
+ that.tableDatas[1][2] = data4.production_hour;
+ that.tableDatas[2][2] = data4.run_hour;
+ that.tableDatas[3][2] = data4.run_rate;
+ that.tableDatas[4][2] = data4.elec_consume_unit;
+ that.tableDatas[5][2] = data4.elec_consume;
+ that.tableDatas[6][2] = data4.production_cost_unit;}
+ }
+ });
+ },
+ get_months(year, month){
+ let that = this;
+ 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][4] =
+ data2.total_production;
+ if (
+ that.tableDatas[0][4] >
+ that.tableDatas[0][6]
+ ) {
+ that.wraning = true;
+ }
+ that.tableDatas[0][7] = precen(
+ that.tableDatas[0][4],
+ that.tableDatas[0][6]
+ );
+ that.tableDatas[1][4] =
+ data2.production_hour;
+ that.tableDatas[1][7] = precen(
+ that.tableDatas[1][4],
+ that.tableDatas[1][6]
+ );
+ that.tableDatas[2][4] = data2.run_hour;
+ that.tableDatas[2][7] = precen(
+ that.tableDatas[2][4],
+ that.tableDatas[2][6]
+ );
+ that.tableDatas[3][4] = data2.run_rate;
+ that.tableDatas[3][7] = precen(
+ that.tableDatas[3][4],
+ that.tableDatas[3][6]
+ );
+ that.tableDatas[4][4] =
+ data2.elec_consume_unit;
+ that.tableDatas[4][7] = consume_precen(
+ (that.tableDatas[4][6]-that.tableDatas[4][4]),
+ that.tableDatas[4][6]
+ );
+ that.tableDatas[5][4] = data2.elec_consume;
+ that.tableDatas[5][7] = consume_precen(
+ (that.tableDatas[5][6]-that.tableDatas[5][4]),
+ that.tableDatas[5][6]
+ );
+ that.tableDatas[6][4] =
+ data2.production_cost_unit;
+ that.tableDatas[6][7] = consume_precen(
+ (that.tableDatas[6][6] - that.tableDatas[6][4]),
+ that.tableDatas[6][6]
+ );
+ }
+ });
+ },
+ get_month_year_goal(year, month){
+ let that = this;
+ let params5 = {};
+ params5.page = 0;
+ params5.year = year;
+ params5.mgroup = that.query.mgroup;
+ this.$API.mtm.goal.list
+ .req(params5)
+ .then((res5) => {
+ if (res5.length > 0) {
+ let data5 = res5;
+ data5.forEach((item5) => {
+ let str = "goal_val_" + month;
+ debugger;
+ console.log(str, item5[str]);
+
+ if (item5.goal_cate_name == "总产量(t)") {
+ that.tableDatas[0][6] = item5[str];
+ that.tableDatas[0][8] = item5.goal_val;
+ } else if (
+ item5.goal_cate_name ==
+ "台时产量(t/h)"
+ ) {
+ that.tableDatas[1][6] = item5[str];
+ that.tableDatas[1][8] = item5.goal_val;
+ } else if (
+ item5.goal_cate_name == "运转时间(h)"
+ ) {
+ that.tableDatas[2][6] = item5[str];
+ that.tableDatas[2][8] = item5.goal_val;
+ } else if (
+ item5.goal_cate_name == "运转率(%)"
+ ) {
+ that.tableDatas[3][6] = item5[str];
+ that.tableDatas[3][8] = item5.goal_val;
+ } else if (
+ item5.goal_cate_name ==
+ "单位产品分布电耗(kW·h/t)"
+ ) {
+ that.tableDatas[4][6] = item5[str];
+ that.tableDatas[4][8] = item5.goal_val;
+ } else if (item5.goal_cate_name ==
+ "总电量(kW·h)"){
+ that.tableDatas[5][6] = item5[str];
+ that.tableDatas[5][8] = item5.goal_val;
+ }
+ else if (
+ item5.goal_cate_name ==
+ "单位产品成本(元/吨)"
+ ) {
+ that.tableDatas[6][6] = item5[str];
+ that.tableDatas[6][8] = item5.goal_val;
+ }
+ });
+ }
+ })
+ },
+ get_years(year){
+ 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][5] =
+ data1.total_production;
+ that.tableDatas[0][9] = precen(
+ that.tableDatas[0][5],
+ that.tableDatas[0][8]
+ );
+ that.tableDatas[1][5] =
+ data1.production_hour;
+ that.tableDatas[1][9] = precen(
+ that.tableDatas[1][5],
+ that.tableDatas[1][8]
+ );
+ that.tableDatas[2][5] = data1.run_hour;
+ that.tableDatas[2][9] = precen(
+ that.tableDatas[2][5],
+ that.tableDatas[2][8]
+ );
+ that.tableDatas[3][5] = data1.run_rate;
+ that.tableDatas[3][9] = precen(
+ that.tableDatas[3][5],
+ that.tableDatas[3][8]
+ );
+ that.tableDatas[4][5] =
+ data1.elec_consume_unit;
+ that.tableDatas[4][9] = consume_precen(
+ (that.tableDatas[4][8] - that.tableDatas[4][5]),
+ that.tableDatas[4][8]
+ );
+ that.tableDatas[5][5] = data1.elec_consume;
+ that.tableDatas[5][9] = consume_precen(
+ (that.tableDatas[5][8] - that.tableDatas[5][5]),
+ that.tableDatas[5][8]
+ );
+ that.tableDatas[6][5] =
+ data1.production_cost_unit;
+ that.tableDatas[6][9] = precen(
+ (that.tableDatas[6][8] - that.tableDatas[6][5]),
+ that.tableDatas[6][8]
+ );
+ } else {
+ }
+ });
},
//获取小时数据
getHourData(year, month, days) {
diff --git a/src/views/enm_rm_copy/teamAnalysis.vue b/src/views/enm_rm_copy/teamAnalysis.vue
index bfee9335..166695eb 100644
--- a/src/views/enm_rm_copy/teamAnalysis.vue
+++ b/src/views/enm_rm_copy/teamAnalysis.vue
@@ -100,6 +100,7 @@ export default {
tableDatas: [],
goalDatas: [],
exportLoading: false,
+ tableName:'生料工序班组月度对比分析',
};
},
mounted() {
diff --git a/src/views/enm_rm_copy/workshopAnalysis.vue b/src/views/enm_rm_copy/workshopAnalysis.vue
index c85dce3b..250120ec 100644
--- a/src/views/enm_rm_copy/workshopAnalysis.vue
+++ b/src/views/enm_rm_copy/workshopAnalysis.vue
@@ -125,6 +125,7 @@ export default {
echartType: "line",
asynDialog: false,
monthGoal: [],
+ tableName:'生料分布电耗月度分析表'
};
},
mounted() {
diff --git a/src/views/enm_slag/report.vue b/src/views/enm_slag/report.vue
index bedaebca..3a7910b6 100644
--- a/src/views/enm_slag/report.vue
+++ b/src/views/enm_slag/report.vue
@@ -479,8 +479,7 @@ let yAxis = [
},
];
-
-let yAxis_hour = [
+let yAxis_day = [
{
type: "value",
name: "电石渣干粉总产量 (t)",
@@ -584,6 +583,75 @@ let yAxis_hour = [
}
];
+let yAxis_hour = [
+ {
+ type: "value",
+ name: "电石渣干粉总产量 (t)",
+ position: "left",
+ alignTicks: true,
+ nameRotate: 50,
+ axisLine: {
+ show: true,
+ lineStyle: {
+ color: colors[0],
+ },
+ },
+ axisLabel: {
+ formatter: "{value}",
+ },
+ },
+ {
+ type: "value",
+ nameRotate: 50,
+ name: "电石渣干粉分布电耗(kW·h/t)",
+ position: "right",
+ alignTicks: true,
+ offset: 50,
+ axisLine: {
+ show: true,
+ lineStyle: {
+ color: colors[1],
+ },
+ },
+ axisLabel: {
+ formatter: "{value}",
+ },
+ },
+ {
+ type: "value",
+ nameRotate: 50,
+ name: "电石渣工段总电量(kW·h)",
+ position: "left",
+ alignTicks: true,
+ offset: 50,
+ axisLine: {
+ show: true,
+ lineStyle: {
+ color: colors[2],
+ },
+ },
+ axisLabel: {
+ formatter: "{value}",
+ },
+ },
+
+ {
+ type: "value",
+ nameRotate: 50,
+ name: "成本(元/t)",
+ position: "right",
+ alignTicks: true,
+ axisLine: {
+ show: true,
+ lineStyle: {
+ color: colors[3],
+ },
+ },
+ axisLabel: {
+ formatter: "{value}",
+ },
+ }
+];
export default {
components: {
scEcharts,
@@ -645,7 +713,7 @@ export default {
},
data: [],
},
- yAxis: yAxis_hour,
+ yAxis: yAxis_day,
series: [
{
name: "电石渣干粉总产量",
@@ -750,7 +818,24 @@ export default {
tooltip: tooltip,
grid: grid,
toolbox: toolbox,
- legend: legend,
+ legend: {
+ selector: [
+ {
+ type: 'all',
+ title: '全选'
+ },
+ {
+ type: 'inverse',
+ title: '反选'
+ }
+ ],
+ orient: 'horizontal', // 'vertical'
+ // top: "2%",
+ width: "500px",
+ x: 'center',
+ y:'top',
+ data: ["电石渣干粉总产量", "电石渣干粉分布电耗", "电石渣工段总电量", "成本"],
+ },
xAxis: {
axisTick: {
show: true,
@@ -784,19 +869,7 @@ export default {
type: "bar",
yAxisIndex: 3,
data: [],
- },
- {
- name: "湿电石渣消耗",
- type: "bar",
- yAxisIndex: 4,
- data: [],
- },
- {
- name: "湿电石渣进厂",
- type: "bar",
- yAxisIndex: 5,
- data: [],
- },
+ }
],
},
};
@@ -1022,7 +1095,7 @@ export default {
that.tableDatas[3][4] =
data2.production_cost_unit;
that.tableDatas[3][7] = consume_precen(
- that.tableDatas[3][3],
+ that.tableDatas[3][6]-that.tableDatas[3][4],
that.tableDatas[3][6]
);
that.tableDatas[2][7] = consume_precen(
@@ -1254,7 +1327,7 @@ export default {
dateChange() {
let that = this;
let arr = [];
- if(that.query.type==0) {
+ if(that.query.type==0 && that.query.day) {
arr = that.query.day.split('-');
that.year = Number(arr[0]);
that.month = Number(arr[1]);
@@ -1262,14 +1335,14 @@ export default {
this.getHourData(that.year, that.month, that.days);
this.get_days(that.year, that.month, that.days);
}
- else if(that.query.type==1) {
+ else if(that.query.type==1 && that.query.month) {
let year = that.query.month.split("-")[0];
let month = that.query.month.split("-")[1];
month = Number(month);
this.getDayData(year, month);
this.get_months(year, month);
this.get_month_year_goal(year, month);
- } else if (that.query.type==2) {
+ } else if (that.query.type==2 && that.query.year) {
let year = that.query.year;
this.getMonthData(year);
this.get_years(year);
@@ -1316,8 +1389,8 @@ export default {
options.series[1].data = seriesData2;
options.series[2].data = seriesData5;
options.series[3].data = seriesData1;
- options.series[4].data = seriesData3;
- options.series[5].data = seriesData4;
+ // options.series[4].data = seriesData3;
+ // options.series[5].data = seriesData4;
let hourXAxis = [];
for (let i = 0; i < 24; i++) {
let item = i + "时";
diff --git a/src/views/enm_slag/teamAnalysis.vue b/src/views/enm_slag/teamAnalysis.vue
index ec3582de..1ca30413 100644
--- a/src/views/enm_slag/teamAnalysis.vue
+++ b/src/views/enm_slag/teamAnalysis.vue
@@ -88,6 +88,7 @@ export default {
exportLoading: false,
tableDatas: [],
goalDatas: [],
+ tableName:'电石渣工序班组月度对比分析',
};
},
mounted() {
diff --git a/src/views/enm_slag/workshopAnalysis.vue b/src/views/enm_slag/workshopAnalysis.vue
index 982d2885..c8f0413b 100644
--- a/src/views/enm_slag/workshopAnalysis.vue
+++ b/src/views/enm_slag/workshopAnalysis.vue
@@ -121,6 +121,7 @@ export default {
modelValue: true,
type: "hours",
title: "title",
+ tableName : '电石渣干粉单位电耗月度分析表',
apiObj: "",
showClose: true,
echartType: "line",