|
@@ -331,7 +331,51 @@
|
|
|
order: '5',
|
|
order: '5',
|
|
|
}"
|
|
}"
|
|
|
>
|
|
>
|
|
|
- <div :style="{ width: 'calc(33.33% - 8px)', margin: '0', alignItems: 'center', color: '#fff', flex: 'none', display: 'flex' }">
|
|
|
|
|
|
|
+ <!-- <div :style="{ width: 'calc(33.33% - 8px)', margin: '0', alignItems: 'center', color: '#fff', flex: 'none', display: 'flex' }">
|
|
|
|
|
+ <div :style="{ color: '#3f83f8', width: '100px', textAlign: 'right' }">归属县旗</div>
|
|
|
|
|
+ <el-select
|
|
|
|
|
+ class="comp-select"
|
|
|
|
|
+ :style="{
|
|
|
|
|
+ border: '1px solid #3f83f8',
|
|
|
|
|
+ padding: '0 10px',
|
|
|
|
|
+ margin: '0 0 0 10px',
|
|
|
|
|
+ color: '#3f83f8',
|
|
|
|
|
+ background: 'none',
|
|
|
|
|
+ width: 'calc(100% - 100px)',
|
|
|
|
|
+ lineHeight: '30px',
|
|
|
|
|
+ height: '30px',
|
|
|
|
|
+ }"
|
|
|
|
|
+ v-model="ycForm.compId"
|
|
|
|
|
+ placeholder="归属县旗"
|
|
|
|
|
+ @change="getYcSubList"
|
|
|
|
|
+ clearable
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-option v-for="item in ycCompList" :key="item.value" :label="item.label" :value="item.value" />
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </div> -->
|
|
|
|
|
+ <div :style="{ width: 'calc(30.33% - 8px)', margin: '0', alignItems: 'center', color: '#fff', flex: 'none', display: 'flex' }">
|
|
|
|
|
+ <div :style="{ color: '#3f83f8', width: '100px', textAlign: 'right' }">变电站</div>
|
|
|
|
|
+ <el-select
|
|
|
|
|
+ s
|
|
|
|
|
+ class="comp-select"
|
|
|
|
|
+ :style="{
|
|
|
|
|
+ border: '1px solid #3f83f8',
|
|
|
|
|
+ padding: '0 10px',
|
|
|
|
|
+ margin: '0 0 0 10px',
|
|
|
|
|
+ color: '#3f83f8',
|
|
|
|
|
+ background: 'none',
|
|
|
|
|
+ width: 'calc(100% - 100px)',
|
|
|
|
|
+ lineHeight: '30px',
|
|
|
|
|
+ height: '30px',
|
|
|
|
|
+ }"
|
|
|
|
|
+ v-model="ycForm.subId"
|
|
|
|
|
+ placeholder="变电站"
|
|
|
|
|
+ clearable
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-option v-for="item in ycSubList" :key="item.value" :label="item.label" :value="item.value" />
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div :style="{ width: 'calc(30.33% - 8px)', margin: '0', alignItems: 'center', color: '#fff', flex: 'none', display: 'flex' }">
|
|
|
<div :style="{ color: '#3f83f8', width: '100px', textAlign: 'right' }">温度</div>
|
|
<div :style="{ color: '#3f83f8', width: '100px', textAlign: 'right' }">温度</div>
|
|
|
<input
|
|
<input
|
|
|
:style="{
|
|
:style="{
|
|
@@ -375,14 +419,14 @@
|
|
|
<!-- <div :style='{"width":"calc(33.33% - 8px)","fontSize":"16px","lineHeight":"40px","color":"#3f83f8","textAlign":"center"}'>
|
|
<!-- <div :style='{"width":"calc(33.33% - 8px)","fontSize":"16px","lineHeight":"40px","color":"#3f83f8","textAlign":"center"}'>
|
|
|
预测当日降雨量:{{form.dailyrainfall}}
|
|
预测当日降雨量:{{form.dailyrainfall}}
|
|
|
</div> -->
|
|
</div> -->
|
|
|
- <div :style="{ width: 'calc(53.33% - 8px)', margin: '0', alignItems: 'center', color: '#fff', flex: 'none', display: 'flex' }">
|
|
|
|
|
|
|
+ <div :style="{ width: 'calc(39.33% - 8px)', margin: '0', alignItems: 'center', color: '#fff', flex: 'none', display: 'flex' }">
|
|
|
<div :style="{ color: '#3f83f8', width: '100px', textAlign: 'right' }">时间</div>
|
|
<div :style="{ color: '#3f83f8', width: '100px', textAlign: 'right' }">时间</div>
|
|
|
<el-date-picker
|
|
<el-date-picker
|
|
|
size="large"
|
|
size="large"
|
|
|
v-model="ycForm.dateRange"
|
|
v-model="ycForm.dateRange"
|
|
|
type="daterange"
|
|
type="daterange"
|
|
|
value-format="yyyy-MM-dd"
|
|
value-format="yyyy-MM-dd"
|
|
|
- range-separator="至"
|
|
|
|
|
|
|
+ range-separator="-"
|
|
|
start-placeholder="开始日期"
|
|
start-placeholder="开始日期"
|
|
|
end-placeholder="结束日期"
|
|
end-placeholder="结束日期"
|
|
|
:style="{
|
|
:style="{
|
|
@@ -391,7 +435,6 @@
|
|
|
margin: '0 0 0 10px',
|
|
margin: '0 0 0 10px',
|
|
|
color: '#3f83f8',
|
|
color: '#3f83f8',
|
|
|
background: 'none',
|
|
background: 'none',
|
|
|
- width: 'calc(100% - 100px)',
|
|
|
|
|
lineHeight: '30px',
|
|
lineHeight: '30px',
|
|
|
height: '30px',
|
|
height: '30px',
|
|
|
}"
|
|
}"
|
|
@@ -417,6 +460,11 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+ <div v-if="ycObj">
|
|
|
|
|
+ <div><span>电采暖用户数:</span>{{ ycObj?.elecHeatingUserNum || 0 }}</div>
|
|
|
|
|
+ <div><span>基础负荷:</span>{{ ycObj?.baseLoad || 0 }}</div>
|
|
|
|
|
+ <div><span>电采暖负荷:</span>{{ ycObj?.elecHeatingLoad || 0 }}</div>
|
|
|
|
|
+ </div>
|
|
|
<div :style="{ width: '28%', padding: '0', flexWrap: 'wrap', flexDirection: 'column', display: 'flex', gap: '10px' }">
|
|
<div :style="{ width: '28%', padding: '0', flexWrap: 'wrap', flexDirection: 'column', display: 'flex', gap: '10px' }">
|
|
|
<div class="echarts3">
|
|
<div class="echarts3">
|
|
|
<div
|
|
<div
|
|
@@ -453,7 +501,7 @@
|
|
|
}"
|
|
}"
|
|
|
>
|
|
>
|
|
|
<div :style="{ fontSize: '20px', lineHeight: '36px', color: '#fff', textAlign: 'left', background: 'none', fontWeight: '500' }">
|
|
<div :style="{ fontSize: '20px', lineHeight: '36px', color: '#fff', textAlign: 'left', background: 'none', fontWeight: '500' }">
|
|
|
- 月用户数
|
|
|
|
|
|
|
+ 月电采暖用户数
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div :style="{ width: '100%', padding: '0 30px 0 0', flex: 'auto', height: '0' }">
|
|
<div :style="{ width: '100%', padding: '0 30px 0 0', flex: 'auto', height: '0' }">
|
|
@@ -3185,6 +3233,8 @@ export default {
|
|
|
compName: '',
|
|
compName: '',
|
|
|
recordDate: '',
|
|
recordDate: '',
|
|
|
},
|
|
},
|
|
|
|
|
+ ycSubList: [],
|
|
|
|
|
+ ycObj: null,
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
mounted() {
|
|
mounted() {
|
|
@@ -3192,39 +3242,79 @@ export default {
|
|
|
// this.getrainfalldataList()
|
|
// this.getrainfalldataList()
|
|
|
particlesJS('particles', this.particlesJson);
|
|
particlesJS('particles', this.particlesJson);
|
|
|
},
|
|
},
|
|
|
- created() {
|
|
|
|
|
- this.getCompList();
|
|
|
|
|
|
|
+ async created() {
|
|
|
|
|
+ await this.getCompList();
|
|
|
|
|
+ await this.getRecordDate();
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
|
this.times();
|
|
this.times();
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
|
this.getSubList();
|
|
this.getSubList();
|
|
|
this.getqiyeCount();
|
|
this.getqiyeCount();
|
|
|
this.getrainfalldataCount();
|
|
this.getrainfalldataCount();
|
|
|
|
|
+ this.getrainfalldataList2();
|
|
|
|
|
+ if (!this.searchForm.recordDate) return;
|
|
|
this.rainfalldataChat1();
|
|
this.rainfalldataChat1();
|
|
|
this.rainfalldataChat2();
|
|
this.rainfalldataChat2();
|
|
|
this.rainfalldataChat3();
|
|
this.rainfalldataChat3();
|
|
|
this.rainfalldataChat4();
|
|
this.rainfalldataChat4();
|
|
|
this.rainfalldataChat5();
|
|
this.rainfalldataChat5();
|
|
|
this.rainfalldataChat6();
|
|
this.rainfalldataChat6();
|
|
|
- setTimeout(() => {
|
|
|
|
|
- this.getrainfalldataList2();
|
|
|
|
|
- }, 500);
|
|
|
|
|
}, 500);
|
|
}, 500);
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
- changeComp() {
|
|
|
|
|
|
|
+ // 获取变电站列表
|
|
|
|
|
+ async getYcSubList() {
|
|
|
|
|
+ this.ycSubList = [];
|
|
|
|
|
+ let params = {
|
|
|
|
|
+ page: this.pageIndex,
|
|
|
|
|
+ limit: this.pageSize,
|
|
|
|
|
+ sort: 'id',
|
|
|
|
|
+ order: 'desc',
|
|
|
|
|
+ compId: this.compList.find(item => item.label === this.searchForm.compName)?.value,
|
|
|
|
|
+ };
|
|
|
|
|
+ const { data } = await this.$http({
|
|
|
|
|
+ url: '/sub/page',
|
|
|
|
|
+ method: 'get',
|
|
|
|
|
+ params: params,
|
|
|
|
|
+ });
|
|
|
|
|
+ if (data && data.code === 0) {
|
|
|
|
|
+ this.ycSubList = data.data.list.map(item => ({
|
|
|
|
|
+ label: item.subName,
|
|
|
|
|
+ value: String(item.id),
|
|
|
|
|
+ }));
|
|
|
|
|
+ this.ycForm.subId = undefined;
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ async changeComp() {
|
|
|
|
|
+ this.getYcSubList();
|
|
|
|
|
+ await this.getRecordDate();
|
|
|
|
|
+ this.getrainfalldataList2();
|
|
|
|
|
+ if (!this.searchForm.recordDate) return;
|
|
|
this.rainfalldataChat1('value');
|
|
this.rainfalldataChat1('value');
|
|
|
this.rainfalldataChat2('value');
|
|
this.rainfalldataChat2('value');
|
|
|
this.rainfalldataChat3('value');
|
|
this.rainfalldataChat3('value');
|
|
|
this.rainfalldataChat4('value');
|
|
this.rainfalldataChat4('value');
|
|
|
this.rainfalldataChat5('value');
|
|
this.rainfalldataChat5('value');
|
|
|
this.rainfalldataChat6('value');
|
|
this.rainfalldataChat6('value');
|
|
|
- this.getrainfalldataList2();
|
|
|
|
|
|
|
+ },
|
|
|
|
|
+ async getRecordDate() {
|
|
|
|
|
+ const compId = this.compList.find(item => item.label === this.searchForm.compName)?.value;
|
|
|
|
|
+ const { data } = await this.$http({
|
|
|
|
|
+ url: `/subLoad/getMaxRecordDate/${compId}`,
|
|
|
|
|
+ method: 'get',
|
|
|
|
|
+ });
|
|
|
|
|
+ if (data && data.code === 0) {
|
|
|
|
|
+ this.searchForm.recordDate = data.data?.recordDate;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$message.error(data.msg);
|
|
|
|
|
+ this.searchForm.recordDate = '';
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
// 获取公司列表
|
|
// 获取公司列表
|
|
|
async getCompList() {
|
|
async getCompList() {
|
|
|
this.compList = [];
|
|
this.compList = [];
|
|
|
|
|
+ this.ycCompList = [];
|
|
|
const { data } = await this.$http({
|
|
const { data } = await this.$http({
|
|
|
url: `/company/lists`,
|
|
url: `/company/lists`,
|
|
|
method: 'get',
|
|
method: 'get',
|
|
@@ -3234,11 +3324,24 @@ export default {
|
|
|
label: item.compName,
|
|
label: item.compName,
|
|
|
value: String(item.id),
|
|
value: String(item.id),
|
|
|
}));
|
|
}));
|
|
|
|
|
+ this.ycCompList = data.data.map(item => ({
|
|
|
|
|
+ label: item.compName,
|
|
|
|
|
+ value: String(item.id),
|
|
|
|
|
+ }));
|
|
|
this.searchForm.compName = this.compList[0].label;
|
|
this.searchForm.compName = this.compList[0].label;
|
|
|
|
|
+ this.ycForm.compId = this.ycCompList[0].value;
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
// 预测
|
|
// 预测
|
|
|
ycForecastHandler() {
|
|
ycForecastHandler() {
|
|
|
|
|
+ if (!this.ycForm.compId || this.ycForm.compId == undefined) {
|
|
|
|
|
+ this.$message.warning('请选择县旗');
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (!this.ycForm.subId || this.ycForm.subId == undefined) {
|
|
|
|
|
+ this.$message.warning('请选择变电站');
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
if (this.ycForm.temperature == '' || this.ycForm.temperature == undefined) {
|
|
if (this.ycForm.temperature == '' || this.ycForm.temperature == undefined) {
|
|
|
this.$message.warning('请输入温度');
|
|
this.$message.warning('请输入温度');
|
|
|
return;
|
|
return;
|
|
@@ -3252,6 +3355,8 @@ export default {
|
|
|
limit: 999,
|
|
limit: 999,
|
|
|
sort: 'id',
|
|
sort: 'id',
|
|
|
order: 'desc',
|
|
order: 'desc',
|
|
|
|
|
+ compId: this.compList.find(item => item.label === this.searchForm.compName)?.value,
|
|
|
|
|
+ subId: this.ycForm.subId,
|
|
|
};
|
|
};
|
|
|
if (this.ycForm.temperature != '' && this.ycForm.temperature != undefined) {
|
|
if (this.ycForm.temperature != '' && this.ycForm.temperature != undefined) {
|
|
|
params['temperature'] = Number(this.ycForm.temperature);
|
|
params['temperature'] = Number(this.ycForm.temperature);
|
|
@@ -3261,11 +3366,13 @@ export default {
|
|
|
params['endDate'] = this.ycForm.dateRange[1];
|
|
params['endDate'] = this.ycForm.dateRange[1];
|
|
|
}
|
|
}
|
|
|
this.$http({
|
|
this.$http({
|
|
|
- url: '/electric-heating/predict',
|
|
|
|
|
|
|
+ url: '/subLoad/predict',
|
|
|
method: 'post',
|
|
method: 'post',
|
|
|
data: params,
|
|
data: params,
|
|
|
}).then(({ data }) => {
|
|
}).then(({ data }) => {
|
|
|
|
|
+ console.log(data, 'data');
|
|
|
if (data && data.code === 0) {
|
|
if (data && data.code === 0) {
|
|
|
|
|
+ this.ycObj = data.data;
|
|
|
this.$message.success(data.msg);
|
|
this.$message.success(data.msg);
|
|
|
} else {
|
|
} else {
|
|
|
this.$message.error(data.msg);
|
|
this.$message.error(data.msg);
|
|
@@ -3838,7 +3945,7 @@ export default {
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
//统计接口1
|
|
//统计接口1
|
|
|
- rainfalldataChat1(type = 'init') {
|
|
|
|
|
|
|
+ rainfalldataChat1(type = 'value') {
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
|
var rainfalldataChart1 = echarts.init(document.getElementById('rainfalldataChart1'), 'carp');
|
|
var rainfalldataChart1 = echarts.init(document.getElementById('rainfalldataChart1'), 'carp');
|
|
|
this.$http({
|
|
this.$http({
|
|
@@ -3851,9 +3958,7 @@ export default {
|
|
|
}).then(({ data }) => {
|
|
}).then(({ data }) => {
|
|
|
if (data && data.code === 0) {
|
|
if (data && data.code === 0) {
|
|
|
const res = type === 'init' ? data?.data?.result || [] : data?.data || [];
|
|
const res = type === 'init' ? data?.data?.result || [] : data?.data || [];
|
|
|
- if (data.data?.recordDate) {
|
|
|
|
|
- this.searchForm.recordDate = data.data.recordDate;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
let xAxis = [];
|
|
let xAxis = [];
|
|
|
let yAxis = [];
|
|
let yAxis = [];
|
|
|
let pArray = [];
|
|
let pArray = [];
|
|
@@ -3927,7 +4032,7 @@ export default {
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
//统计接口2
|
|
//统计接口2
|
|
|
- rainfalldataChat2(type = 'init') {
|
|
|
|
|
|
|
+ rainfalldataChat2(type = 'value') {
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
|
var rainfalldataChart2 = echarts.init(document.getElementById('rainfalldataChart2'), 'carp');
|
|
var rainfalldataChart2 = echarts.init(document.getElementById('rainfalldataChart2'), 'carp');
|
|
|
this.$http({
|
|
this.$http({
|
|
@@ -3940,9 +4045,7 @@ export default {
|
|
|
}).then(({ data }) => {
|
|
}).then(({ data }) => {
|
|
|
if (data && data.code === 0) {
|
|
if (data && data.code === 0) {
|
|
|
const res = type === 'init' ? data?.data?.result || [] : data?.data || [];
|
|
const res = type === 'init' ? data?.data?.result || [] : data?.data || [];
|
|
|
- if (data.data?.recordDate) {
|
|
|
|
|
- this.searchForm.recordDate = data.data.recordDate;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
let xAxis = [];
|
|
let xAxis = [];
|
|
|
let yAxis = [];
|
|
let yAxis = [];
|
|
|
let pArray = [];
|
|
let pArray = [];
|
|
@@ -4014,7 +4117,7 @@ export default {
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
//统计接口3
|
|
//统计接口3
|
|
|
- rainfalldataChat3(type = 'init') {
|
|
|
|
|
|
|
+ rainfalldataChat3(type = 'value') {
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
|
var rainfalldataChart3 = echarts.init(document.getElementById('rainfalldataChart3'), 'carp');
|
|
var rainfalldataChart3 = echarts.init(document.getElementById('rainfalldataChart3'), 'carp');
|
|
|
this.$http({
|
|
this.$http({
|
|
@@ -4027,9 +4130,7 @@ export default {
|
|
|
}).then(({ data }) => {
|
|
}).then(({ data }) => {
|
|
|
if (data && data.code === 0) {
|
|
if (data && data.code === 0) {
|
|
|
const res = type === 'init' ? data?.data?.result || [] : data?.data || [];
|
|
const res = type === 'init' ? data?.data?.result || [] : data?.data || [];
|
|
|
- if (data.data?.recordDate) {
|
|
|
|
|
- this.searchForm.recordDate = data.data.recordDate;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
let xAxis = [];
|
|
let xAxis = [];
|
|
|
let yAxis = [];
|
|
let yAxis = [];
|
|
|
let pArray = [];
|
|
let pArray = [];
|
|
@@ -4100,11 +4201,49 @@ export default {
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
- //统计接口4
|
|
|
|
|
- rainfalldataChat4(type = 'init') {
|
|
|
|
|
|
|
+ // //统计接口4
|
|
|
|
|
+ // rainfalldataChat4(type = 'value') {
|
|
|
|
|
+ // this.$nextTick(() => {
|
|
|
|
|
+ // this.$http({
|
|
|
|
|
+ // url: `/subLoad/${type}/users_num/monthly`,
|
|
|
|
|
+ // method: 'get',
|
|
|
|
|
+ // params: {
|
|
|
|
|
+ // companyName: this.searchForm.compName,
|
|
|
|
|
+ // recordDate: this.searchForm.recordDate,
|
|
|
|
|
+ // },
|
|
|
|
|
+ // }).then(({ data }) => {
|
|
|
|
|
+ // if (data && data.code === 0) {
|
|
|
|
|
+ // const res = type === 'init' ? data?.data?.result || [] : data?.data || [];
|
|
|
|
|
+
|
|
|
|
|
+ // let xAxis = [];
|
|
|
|
|
+ // let yAxis = [];
|
|
|
|
|
+ // let pArray = [];
|
|
|
|
|
+ // for (let i = 0; i < res.length; i++) {
|
|
|
|
|
+ // xAxis.push(res[i].subName);
|
|
|
|
|
+ // yAxis.push(parseFloat(res[i].total));
|
|
|
|
|
+ // pArray.push({
|
|
|
|
|
+ // value: parseFloat(res[i].total),
|
|
|
|
|
+ // name: res[i].subName,
|
|
|
|
|
+ // });
|
|
|
|
|
+ // }
|
|
|
|
|
+ // var option = {};
|
|
|
|
|
+ // this.wordclouds(pArray, 'rainfalldataChart4');
|
|
|
|
|
+ // } else {
|
|
|
|
|
+ // this.$message({
|
|
|
|
|
+ // message: data.msg,
|
|
|
|
|
+ // type: 'warning',
|
|
|
|
|
+ // duration: 1500,
|
|
|
|
|
+ // });
|
|
|
|
|
+ // }
|
|
|
|
|
+ // });
|
|
|
|
|
+ // });
|
|
|
|
|
+ // },
|
|
|
|
|
+ //统计接口1
|
|
|
|
|
+ rainfalldataChat4(type = 'value') {
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
|
|
|
+ var rainfalldataChart4 = echarts.init(document.getElementById('rainfalldataChart4'), 'carp');
|
|
|
this.$http({
|
|
this.$http({
|
|
|
- url: `/subLoad/${type}/users_num/monthly`,
|
|
|
|
|
|
|
+ url: `/subLoad/${type}/join_electric_heating_num/monthly`,
|
|
|
method: 'get',
|
|
method: 'get',
|
|
|
params: {
|
|
params: {
|
|
|
companyName: this.searchForm.compName,
|
|
companyName: this.searchForm.compName,
|
|
@@ -4113,13 +4252,14 @@ export default {
|
|
|
}).then(({ data }) => {
|
|
}).then(({ data }) => {
|
|
|
if (data && data.code === 0) {
|
|
if (data && data.code === 0) {
|
|
|
const res = type === 'init' ? data?.data?.result || [] : data?.data || [];
|
|
const res = type === 'init' ? data?.data?.result || [] : data?.data || [];
|
|
|
- if (data.data?.recordDate) {
|
|
|
|
|
- this.searchForm.recordDate = data.data.recordDate;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
let xAxis = [];
|
|
let xAxis = [];
|
|
|
let yAxis = [];
|
|
let yAxis = [];
|
|
|
let pArray = [];
|
|
let pArray = [];
|
|
|
for (let i = 0; i < res.length; i++) {
|
|
for (let i = 0; i < res.length; i++) {
|
|
|
|
|
+ if (this.boardBase && i == this.boardBase.lineNum) {
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
xAxis.push(res[i].subName);
|
|
xAxis.push(res[i].subName);
|
|
|
yAxis.push(parseFloat(res[i].total));
|
|
yAxis.push(parseFloat(res[i].total));
|
|
|
pArray.push({
|
|
pArray.push({
|
|
@@ -4128,7 +4268,53 @@ export default {
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
var option = {};
|
|
var option = {};
|
|
|
- this.wordclouds(pArray, 'rainfalldataChart4');
|
|
|
|
|
|
|
+ let titleObj = this.line3.title;
|
|
|
|
|
+ titleObj.text = '电采暖用户数';
|
|
|
|
|
+
|
|
|
|
|
+ const legendObj = this.line3.legend;
|
|
|
|
|
+
|
|
|
|
|
+ let xAxisObj = this.line3.xAxis;
|
|
|
|
|
+ xAxisObj.type = 'category';
|
|
|
|
|
+ xAxisObj.boundaryGap = false;
|
|
|
|
|
+ xAxisObj.data = xAxis;
|
|
|
|
|
+
|
|
|
|
|
+ let yAxisObj = this.line3.yAxis;
|
|
|
|
|
+ yAxisObj.type = 'value';
|
|
|
|
|
+
|
|
|
|
|
+ let seriesObj = {
|
|
|
|
|
+ data: yAxis,
|
|
|
|
|
+ type: 'line',
|
|
|
|
|
+ smooth: true,
|
|
|
|
|
+ };
|
|
|
|
|
+ seriesObj = Object.assign(seriesObj, this.line3.series);
|
|
|
|
|
+ const gridObj = this.line3.grid;
|
|
|
|
|
+ let tooltipObj = {
|
|
|
|
|
+ trigger: 'item',
|
|
|
|
|
+ formatter: '{b} : {c}',
|
|
|
|
|
+ };
|
|
|
|
|
+ tooltipObj = Object.assign(tooltipObj, this.line3.tooltip ? this.line3.tooltip : {});
|
|
|
|
|
+ option = {
|
|
|
|
|
+ backgroundColor: this.line3.backgroundColor,
|
|
|
|
|
+ color: this.line3.color,
|
|
|
|
|
+ title: titleObj,
|
|
|
|
|
+ legend: legendObj,
|
|
|
|
|
+ tooltip: tooltipObj,
|
|
|
|
|
+ xAxis: xAxisObj,
|
|
|
|
|
+ yAxis: yAxisObj,
|
|
|
|
|
+ grid: gridObj,
|
|
|
|
|
+ series: [seriesObj],
|
|
|
|
|
+ };
|
|
|
|
|
+ // 使用刚指定的配置项和数据显示图表。
|
|
|
|
|
+ rainfalldataChart4.setOption(option);
|
|
|
|
|
+
|
|
|
|
|
+ //根据窗口的大小变动图表
|
|
|
|
|
+ window.addEventListener(
|
|
|
|
|
+ 'resize',
|
|
|
|
|
+ () => {
|
|
|
|
|
+ rainfalldataChart4.resize();
|
|
|
|
|
+ },
|
|
|
|
|
+ false
|
|
|
|
|
+ );
|
|
|
} else {
|
|
} else {
|
|
|
this.$message({
|
|
this.$message({
|
|
|
message: data.msg,
|
|
message: data.msg,
|
|
@@ -4140,7 +4326,7 @@ export default {
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
//统计接口5
|
|
//统计接口5
|
|
|
- rainfalldataChat5(type = 'init') {
|
|
|
|
|
|
|
+ rainfalldataChat5(type = 'value') {
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
|
var rainfalldataChart5 = echarts.init(document.getElementById('rainfalldataChart5'), 'carp');
|
|
var rainfalldataChart5 = echarts.init(document.getElementById('rainfalldataChart5'), 'carp');
|
|
|
this.$http({
|
|
this.$http({
|
|
@@ -4153,9 +4339,7 @@ export default {
|
|
|
}).then(({ data }) => {
|
|
}).then(({ data }) => {
|
|
|
if (data && data.code === 0) {
|
|
if (data && data.code === 0) {
|
|
|
const res = type === 'init' ? data?.data?.result || [] : data?.data || [];
|
|
const res = type === 'init' ? data?.data?.result || [] : data?.data || [];
|
|
|
- if (data.data?.recordDate) {
|
|
|
|
|
- this.searchForm.recordDate = data.data.recordDate;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
let xAxis = [];
|
|
let xAxis = [];
|
|
|
let yAxis = [];
|
|
let yAxis = [];
|
|
|
let pArray = [];
|
|
let pArray = [];
|
|
@@ -4229,7 +4413,7 @@ export default {
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
// 统计接口6
|
|
// 统计接口6
|
|
|
- rainfalldataChat6(type = 'init') {
|
|
|
|
|
|
|
+ rainfalldataChat6(type = 'value') {
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
|
var rainfalldataChart6 = echarts.init(document.getElementById('rainfalldataChart6'), 'carp');
|
|
var rainfalldataChart6 = echarts.init(document.getElementById('rainfalldataChart6'), 'carp');
|
|
|
this.$http({
|
|
this.$http({
|
|
@@ -4242,9 +4426,7 @@ export default {
|
|
|
}).then(({ data }) => {
|
|
}).then(({ data }) => {
|
|
|
if (data && data.code === 0) {
|
|
if (data && data.code === 0) {
|
|
|
const res = type === 'init' ? data?.data?.result || [] : data?.data || [];
|
|
const res = type === 'init' ? data?.data?.result || [] : data?.data || [];
|
|
|
- if (data.data?.recordDate) {
|
|
|
|
|
- this.searchForm.recordDate = data.data.recordDate;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
let xAxis = [];
|
|
let xAxis = [];
|
|
|
let yAxis = [];
|
|
let yAxis = [];
|
|
|
let pArray = [];
|
|
let pArray = [];
|