Merge branch 'master' of https://e.coding.net/ctcdevteam/ehs/ehs_web
This commit is contained in:
commit
fb79ad7943
|
@ -417,8 +417,8 @@ export default {
|
||||||
});
|
});
|
||||||
let chartDom = document.getElementById("myChart");
|
let chartDom = document.getElementById("myChart");
|
||||||
that.myChart = echarts.init(chartDom);
|
that.myChart = echarts.init(chartDom);
|
||||||
that.option.xAxis.data = xAxisData.reverse();
|
that.option.xAxis.data = xAxisData;
|
||||||
that.option.series[0].data = lineData.reverse();
|
that.option.series[0].data = lineData;
|
||||||
that.myChart.setOption(that.option);
|
that.myChart.setOption(that.option);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
@ -109,7 +109,7 @@
|
||||||
<div class="flexItem">
|
<div class="flexItem">
|
||||||
<div class="itemTitle">
|
<div class="itemTitle">
|
||||||
<div class="itemTitleIcon"></div>
|
<div class="itemTitleIcon"></div>
|
||||||
<div>压缩空气、用水量</div>
|
<div>车间用水量</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="itemBody" id="line2"></div>
|
<div class="itemBody" id="line2"></div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -255,6 +255,15 @@
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="elecItem">
|
||||||
|
<div class="elecItem_wrap">
|
||||||
|
<span>水泥包装工序电耗</span>
|
||||||
|
<p class="elec_number">
|
||||||
|
{{ hotData.bz_elec_consume_unit }}
|
||||||
|
<span class="elec_unit">kw.h/t</span>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -453,6 +462,7 @@ export default {
|
||||||
cen_consume_unit: "", //综合能耗
|
cen_consume_unit: "", //综合能耗
|
||||||
sn_cen_consume_unit: "", //水泥综合能耗
|
sn_cen_consume_unit: "", //水泥综合能耗
|
||||||
sn_elec_consume_unit: "",//水泥分布电耗
|
sn_elec_consume_unit: "",//水泥分布电耗
|
||||||
|
bz_elec_consume_unit: "",//水泥包装分布电耗
|
||||||
},
|
},
|
||||||
tableData: [],
|
tableData: [],
|
||||||
tezhongData: [],
|
tezhongData: [],
|
||||||
|
@ -1088,6 +1098,22 @@ export default {
|
||||||
that.hotData.sn_cen_consume_unit = ress[0].cen_consume_unit;
|
that.hotData.sn_cen_consume_unit = ress[0].cen_consume_unit;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
this.$API.mtm.mgroup.list
|
||||||
|
.req({ page: 0, search: "水泥包装" })
|
||||||
|
.then((res) => {
|
||||||
|
that.yurefadianId = res[0].id;
|
||||||
|
let params = {};
|
||||||
|
params.page = 0;
|
||||||
|
params.year_s = that.currentYear;
|
||||||
|
params.month_s = that.currentMonth;
|
||||||
|
params.type = "month_s";
|
||||||
|
params.mgroup = that.yurefadianId;
|
||||||
|
this.$API.enm.enstat.req(params).then((ress) => {
|
||||||
|
that.hotData.bz_elec_consume_unit =
|
||||||
|
ress[0].elec_consume_unit;
|
||||||
|
that.hotData.sn_cen_consume_unit = ress[0].cen_consume_unit;
|
||||||
|
});
|
||||||
|
});
|
||||||
},
|
},
|
||||||
// this.$API.enm.mpoint.list
|
// this.$API.enm.mpoint.list
|
||||||
// .req({
|
// .req({
|
||||||
|
|
|
@ -220,6 +220,16 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-divider />
|
<el-divider />
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item
|
||||||
|
label="是否表示运行状态"
|
||||||
|
label-width="220"
|
||||||
|
>
|
||||||
|
<el-switch
|
||||||
|
v-model="form.is_rep_ep_running_state"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24">
|
||||||
<el-form-item label="所监测设备">
|
<el-form-item label="所监测设备">
|
||||||
<el-select
|
<el-select
|
||||||
|
@ -238,16 +248,7 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :md="12" :sm="24">
|
|
||||||
<el-form-item
|
|
||||||
label="是否表示所监测设备的运行状态"
|
|
||||||
label-width="220"
|
|
||||||
>
|
|
||||||
<el-switch
|
|
||||||
v-model="form.is_rep_ep_running_state"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :md="8" :sm="24">
|
<el-col :md="8" :sm="24">
|
||||||
<el-form-item
|
<el-form-item
|
||||||
label="状态量基准值"
|
label="状态量基准值"
|
||||||
|
|
|
@ -169,6 +169,9 @@ export default {
|
||||||
end_time: null
|
end_time: null
|
||||||
},
|
},
|
||||||
chartOption: {
|
chartOption: {
|
||||||
|
title: {
|
||||||
|
text: 'Stacked Line'
|
||||||
|
},
|
||||||
color: ["#191970"],
|
color: ["#191970"],
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: "axis",
|
trigger: "axis",
|
||||||
|
@ -194,11 +197,15 @@ export default {
|
||||||
xAxis: {
|
xAxis: {
|
||||||
name: "",
|
name: "",
|
||||||
type: "category",
|
type: "category",
|
||||||
|
axisLabel: {
|
||||||
|
rotate: 45,
|
||||||
|
fontSize: 10,
|
||||||
|
},
|
||||||
data: [],
|
data: [],
|
||||||
|
|
||||||
},
|
},
|
||||||
yAxis: {
|
yAxis: {
|
||||||
name: "当前值",
|
name: "",
|
||||||
type: "value",
|
type: "value",
|
||||||
|
|
||||||
},
|
},
|
||||||
|
@ -227,20 +234,33 @@ export default {
|
||||||
dataChange(req, tableData) {
|
dataChange(req, tableData) {
|
||||||
let that = this;
|
let that = this;
|
||||||
let option = { ...that.chartOption };
|
let option = { ...that.chartOption };
|
||||||
// 获取 x 轴的数据
|
// 获取 x 轴的数据,如果query.type为小时,则显示小时,如果为天则显示天,如果为月则显示月
|
||||||
option.xAxis.data = tableData.map((item, index) => (index+1).toString());
|
if (that.query.type == "hour") {
|
||||||
|
option.title.text = "小时统计";
|
||||||
|
option.xAxis.data = tableData.reverse().map((item) => item.year.toString() + "-" + item.month.toString() + "-" + item.day.toString() + " " + item.hour.toString());
|
||||||
|
}else if (that.query.type == "day") {
|
||||||
|
option.title.text = "天统计";
|
||||||
|
option.xAxis.data = tableData.reverse().map((item, index) => item.year.toString() + "-" + item.month.toString() + "-" + item.day.toString());
|
||||||
|
}else if (that.query.type == "month") {
|
||||||
|
option.title.text = "月统计";
|
||||||
|
option.xAxis.data = tableData.reverse().map((item, index) => item.year.toString() + "-" + item.month.toString());
|
||||||
|
}else if (that.query.type == "day_s") {
|
||||||
|
option.title.text = "班天统计";
|
||||||
|
option.xAxis.data = tableData.length > 0 ? tableData.reverse().map((item, index) => item.day_s.toString()) : [];
|
||||||
|
}else if (that.query.type == "month_s") {
|
||||||
|
option.title.text = "班月统计";
|
||||||
|
option.xAxis.data = tableData.length > 0 ? tableData.reverse().map((item, index) => item.month_s.toString()) : [];
|
||||||
|
}
|
||||||
// 获取 y 轴的数据
|
// 获取 y 轴的数据
|
||||||
|
|
||||||
option.series = [
|
option.series = [
|
||||||
{
|
{
|
||||||
name: tableData[0].mpoint_name,
|
name: tableData.length > 0 ? tableData[0].mpoint_name : "",
|
||||||
type: 'line', // 折线图类型
|
type: 'line', // 折线图类型
|
||||||
data: tableData.map((item) => parseFloat(item.val)), // 将字符串转为数字
|
data: tableData.length > 0 ? tableData.reverse().map((item) => parseFloat(item.val)) : [], // 将字符串转为数字
|
||||||
smooth: true, // 平滑曲线
|
smooth: true, // 平滑曲线
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
option.legend.data = [tableData[0].mpoint_name];
|
option.legend.data = [tableData.length > 0 ? tableData[0].mpoint_name : ""];
|
||||||
// 更新图表选项
|
// 更新图表选项
|
||||||
that.chartOption = option;
|
that.chartOption = option;
|
||||||
},
|
},
|
||||||
|
|
|
@ -25,9 +25,9 @@
|
||||||
:params="{ search: '生产' }"
|
:params="{ search: '生产' }"
|
||||||
></ehsSelect>
|
></ehsSelect>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="currentM == 'xSelect'">
|
<div v-if="currentM == 'xtSelect'">
|
||||||
<h1>基于input封装的远程表格select-单选分页</h1>
|
<h1>基于input封装的远程表格select-单选分页</h1>
|
||||||
<xSelect
|
<xtSelect
|
||||||
:apiObj="apiObj"
|
:apiObj="apiObj"
|
||||||
v-model="x2"
|
v-model="x2"
|
||||||
v-model:label="x2_name"
|
v-model:label="x2_name"
|
||||||
|
@ -36,7 +36,7 @@
|
||||||
>
|
>
|
||||||
<el-table-column label="id" prop="id"></el-table-column>
|
<el-table-column label="id" prop="id"></el-table-column>
|
||||||
<el-table-column label="名称" prop="name"></el-table-column>
|
<el-table-column label="名称" prop="name"></el-table-column>
|
||||||
</xSelect>
|
</xtSelect>
|
||||||
<div>
|
<div>
|
||||||
当前选择:
|
当前选择:
|
||||||
<h1>v-model: {{ x2 }}</h1>
|
<h1>v-model: {{ x2 }}</h1>
|
||||||
|
@ -44,7 +44,7 @@
|
||||||
<h1>v-model:obj: {{ x2_obj }}</h1>
|
<h1>v-model:obj: {{ x2_obj }}</h1>
|
||||||
</div>
|
</div>
|
||||||
<h1 style="margin-top: 20px">基于input封装的远程表格select-多选不分页</h1>
|
<h1 style="margin-top: 20px">基于input封装的远程表格select-多选不分页</h1>
|
||||||
<xSelect
|
<xtSelect
|
||||||
:apiObj="apiObj"
|
:apiObj="apiObj"
|
||||||
v-model="x2s"
|
v-model="x2s"
|
||||||
v-model:obj="x2s_obj"
|
v-model:obj="x2s_obj"
|
||||||
|
@ -53,7 +53,7 @@
|
||||||
>
|
>
|
||||||
<el-table-column label="id" prop="id"></el-table-column>
|
<el-table-column label="id" prop="id"></el-table-column>
|
||||||
<el-table-column label="名称" prop="name"></el-table-column>
|
<el-table-column label="名称" prop="name"></el-table-column>
|
||||||
</xSelect>
|
</xtSelect>
|
||||||
<div>
|
<div>
|
||||||
当前选择:
|
当前选择:
|
||||||
<h1>v-model: {{ x2s }}</h1>
|
<h1>v-model: {{ x2s }}</h1>
|
||||||
|
@ -61,25 +61,25 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h1 style="margin-top: 20px">基于input封装的固定选项select-单选</h1>
|
<h1 style="margin-top: 20px">基于input封装的固定选项select-单选</h1>
|
||||||
<xSelect
|
<xtSelect
|
||||||
:options="options"
|
:options="options"
|
||||||
v-model="x2sf"
|
v-model="x2sf"
|
||||||
style="width: 500px"
|
style="width: 500px"
|
||||||
>
|
>
|
||||||
</xSelect>
|
</xtSelect>
|
||||||
<div>
|
<div>
|
||||||
当前选择:
|
当前选择:
|
||||||
<h1>v-model: {{ x2sf }}</h1>
|
<h1>v-model: {{ x2sf }}</h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h1 style="margin-top: 20px">基于input封装的固定选项select-多选</h1>
|
<h1 style="margin-top: 20px">基于input封装的固定选项select-多选</h1>
|
||||||
<xSelect
|
<xtSelect
|
||||||
:options="options"
|
:options="options"
|
||||||
v-model="x2sfs"
|
v-model="x2sfs"
|
||||||
style="width: 500px"
|
style="width: 500px"
|
||||||
:multiple="true"
|
:multiple="true"
|
||||||
>
|
>
|
||||||
</xSelect>
|
</xtSelect>
|
||||||
<div>
|
<div>
|
||||||
当前选择:
|
当前选择:
|
||||||
<h1>v-model: {{ x2sfs }}</h1>
|
<h1>v-model: {{ x2sfs }}</h1>
|
||||||
|
@ -117,7 +117,7 @@
|
||||||
</el-container>
|
</el-container>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
// import xSelects from "@/components/xSelect/index2.vue";
|
// import xSelects from "@/components/xtSelect/index2.vue";
|
||||||
export default {
|
export default {
|
||||||
name: "testx",
|
name: "testx",
|
||||||
components: {},
|
components: {},
|
||||||
|
@ -125,7 +125,7 @@ export default {
|
||||||
return {
|
return {
|
||||||
menu: [
|
menu: [
|
||||||
"二维码",
|
"二维码",
|
||||||
"xSelect",
|
"xtSelect",
|
||||||
"ehsSelect",
|
"ehsSelect",
|
||||||
"scEcharts",
|
"scEcharts",
|
||||||
"ehsUserSelect",
|
"ehsUserSelect",
|
||||||
|
|
|
@ -26,7 +26,7 @@ module.exports = defineConfig({
|
||||||
},
|
},
|
||||||
client: {
|
client: {
|
||||||
overlay: {
|
overlay: {
|
||||||
// runtimeErrors: false,
|
runtimeErrors: false,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue