修改现场问题

This commit is contained in:
guanj
2026-05-21 09:37:58 +08:00
parent 39093641d8
commit 54f336ab45
30 changed files with 52075 additions and 31145 deletions

20941
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -52,7 +52,7 @@ export default {
}
}, 10000)
},
mounted() {
async mounted() {
// 处理笔记本系统默认系统比例为150%带来的布局影响
if (process.env.VUE_APP_ZOOM) {
const m = this.detectZoom()
@@ -65,7 +65,7 @@ export default {
window.sessionStorage.setItem('appheight', this.appheight)
if (process.env.VUE_APP_MODE === 'jbqr') {
window.sessionStorage.setItem('appheight', document.body.offsetHeight - 10)
}else if(process.env.VUE_APP_MODE === 'cgyqr'){
} else if (process.env.VUE_APP_MODE === 'cgyqr') {
window.sessionStorage.setItem('appheight', document.body.offsetHeight - 10)
}
}, 100)
@@ -82,7 +82,7 @@ export default {
window.sessionStorage.setItem('appheight', this.appheight)
if (process.env.VUE_APP_MODE === 'jbqr') {
window.sessionStorage.setItem('appheight', document.body.offsetHeight - 10)
}else if(process.env.VUE_APP_MODE === 'cgyqr'){
} else if (process.env.VUE_APP_MODE === 'cgyqr') {
window.sessionStorage.setItem('appheight', document.body.offsetHeight - 10)
}
// }, 100)
@@ -90,6 +90,11 @@ export default {
window.addEventListener('beforeunload', e => this.beforeunloadHandler(e))
window.addEventListener('unload', e => this.unloadHandler(e))
window.addEventListener('resize', this.handleResizeEcharts)
let response = await fetch('/')
let MqttUrl = response.headers.get('X-Mqtt-Url')
console.log("🚀 ~ mounted ~ MqttUrl:", MqttUrl)
localStorage.setItem('MqttUrl', MqttUrl)
},
// destroyed() {
// window.removeEventListener('beforeunload', e => this.beforeunloadHandler(e))

View File

@@ -163,9 +163,9 @@
overflow-y: auto;
}
.el-dialog__header {
height: 36px;
height: 55px;
padding: 0 20px;
line-height: 36px;
line-height: 55px;
background: $themeColor;
.el-dialog__title {
font-size: 16px;

View File

@@ -154,9 +154,9 @@
overflow-y: auto;
}
.el-dialog__header {
height: 36px;
height: 55px;
padding: 0 20px;
line-height: 36px;
line-height: 55px;
background: $themeColor;
.el-dialog__title {
font-size: 16px;

View File

@@ -970,9 +970,9 @@
}
.el-dialog .el-dialog__header {
height: 36px;
height: 55px;
padding: 0 10px !important;
line-height: 36px;
line-height: 55px;
background: #034e4b !important;
}

View File

@@ -916,9 +916,9 @@
}
.el-dialog .el-dialog__header {
height: 36px;
height: 55px;
padding: 0 10px !important;
line-height: 36px;
line-height: 55px;
}
.el-dialog .el-dialog__header .el-dialog__headerbtn {
@@ -1130,9 +1130,9 @@
overflow-y: auto;
}
.el-dialog__header {
height: 36px;
height: 55px;
padding: 0 20px;
line-height: 36px;
line-height: 55px;
background: $themeColor;
.el-dialog__title {
font-size: 16px;

View File

@@ -896,9 +896,9 @@
}
.el-dialog .el-dialog__header {
height: 36px;
height: 55px;
padding: 0 10px !important;
line-height: 36px;
line-height: 55px;
background: #044267 !important;
}
@@ -1100,9 +1100,9 @@
overflow-y: auto;
}
.el-dialog__header {
height: 36px;
height: 55px;
padding: 0 20px;
line-height: 36px;
line-height: 55px;
background: $themeColor;
.el-dialog__title {
font-size: 16px;

View File

@@ -25,7 +25,7 @@
:height="vh + 'px'"
>
<el-table-column prop="userName" label="登录用户" align="center"></el-table-column>
<el-table-column prop="ip" label="登录ip" align="center"></el-table-column>
<el-table-column prop="ip" label="登录IP" align="center"></el-table-column>
<el-table-column prop="time" label="登录时间" align="center"></el-table-column>
</el-table>
<el-pagination

View File

@@ -25,7 +25,7 @@
查询
</el-button>
<el-button type="primary" icon="el-icon-download">导出历史数据</el-button>
<!-- <el-button type="primary" icon="el-icon-download">导出历史数据</el-button> -->
</el-form-item>
</el-form>
</el-col>

View File

@@ -164,9 +164,10 @@ export default {
mounted() {
this.deptId = JSON.parse(window.sessionStorage.getItem('Info')).deptId
this.zoom = 1 / document.body.style.zoom
this.setHeight()
window.addEventListener('resize', this.setHeight)
this.$nextTick(() => {
this.setHeight()
window.addEventListener('resize', this.setHeight)
this.getTemplateLists()
})
},
@@ -177,7 +178,7 @@ export default {
setHeight() {
this.zoom = 1 / document.body.style.zoom
this.vh = window.sessionStorage.getItem('appheight')
this.vw = document.getElementById('app-main-in').offsetWidth
this.vw = document.getElementById('app-main-in')?.offsetWidth
},
async getTemplateLists() {
await getTemplateByDept({ id: this.deptId }).then(res => {

View File

@@ -24,8 +24,8 @@
</template>
<script>
import SteadyStateReport from "./components/SteadyStateReport.vue";
import reportForm from "./components/reportForm";
import StandingBook from "./components/StandingBook";
import reportForm from "./components/reportForm.vue";
import StandingBook from "./components/StandingBook.vue";
export default {
components: { SteadyStateReport, reportForm, StandingBook },
props: {},

View File

@@ -5,52 +5,30 @@
</el-button>
<el-form :inline="true" :model="formData" class="demo-form-inline">
<el-form-item label="指标:">
<el-select
v-model="condition"
multiple
collapse-tags
:multiple-limit="limit"
filterable
placeholder="请选择指标"
>
<el-select v-model="condition" multiple collapse-tags :multiple-limit="limit" filterable
placeholder="请选择指标">
<el-option-group v-for="group in options" :key="group.label" :label="group.label">
<el-option
v-for="item in group.options"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
<el-option v-for="item in group.options" :key="item.value" :label="item.label"
:value="item.value"></el-option>
</el-option-group>
</el-select>
</el-form-item>
<el-form-item label="类型:">
<el-select style="width: 150px" v-model="formData.valueType" placeholder="请选择类型">
<el-option
v-for="item in typeoptions"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
<el-option v-for="item in typeoptions" :key="item.value" :label="item.label"
:value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="谐波:" v-show="xb">
<el-select style="width: 120px" v-model="formData.harmonic" placeholder="请选择谐波">
<el-option
v-for="item in harmonicoptions"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
<el-option v-for="item in harmonicoptions" :key="item.value" :label="item.label"
:value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item v-show="jxb" label="间谐波:">
<el-select style="width: 120px" v-model="formData.inHarmonic" placeholder="请选择间谐波">
<el-option
v-for="item in inharmonicoptions"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
<el-option v-for="item in inharmonicoptions" :key="item.value" :label="item.label"
:value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item>
@@ -63,19 +41,10 @@
<timeindex :interval="interval"></timeindex>
</el-form-item> -->
</el-form>
<el-row
ref="tubiao"
v-loading="loading"
id="tubiao"
:gutter="10"
:style="'overflow:scroll;height:' + rowvh + ';cursor:pointer;scrollbar-arrow-color:#302D30;'"
>
<el-col
:span="24"
v-for="(item, index) in list"
:key="index"
:style="index > 0 ? 'margin-top: 10px;height:' + vhh : 'margin-top: 0px;height:' + vhh"
>
<el-row ref="tubiao" v-loading="loading" id="tubiao" :gutter="10"
:style="'overflow:scroll;height:' + rowvh + ';cursor:pointer;scrollbar-arrow-color:#302D30;'">
<el-col :span="24" v-for="(item, index) in list" :key="index"
:style="index > 0 ? 'margin-top: 10px;height:' + vhh : 'margin-top: 0px;height:' + vhh">
<div ref="kk" :id="item.id" :style="`height:${vh};cursor:pointer;;`"></div>
</el-col>
</el-row>
@@ -103,7 +72,7 @@ export default {
zoom: '',
loading: false,
url: require('@/assets/point.png'),
timeOptions:[
timeOptions: [
{ label: "年份", value: 1 },
{ label: "季度", value: 2 },
{ label: "月份", value: 3 },
@@ -471,7 +440,7 @@ export default {
}
}
},
created() {},
created() { },
mounted() {
this.queryData()
this.zoom = 1 / document.body.style.zoom
@@ -1816,8 +1785,18 @@ export default {
document.mozCancelFullScreen()
}
}
}
}
},
// myTool: {
// show: true,
// title: '自定义扩展方法',
// icon: 'path://M213.333333 213.333333h640v426.666667l-213.333333 213.333333H213.333333V213.333333z m42.666667 42.666667v554.666667h366.933333l187.733334-187.733334V256H256z m426.666667 170.666667H384V384h298.666667v42.666667z m0 128H384v-42.666667h298.666667v42.666667z m-85.333334 128H384v-42.666667h213.333333v42.666667z',
// onclick: function () {
// }
// },
},
},
yAxis: [
// (item.minValue - 0.5).toFixed(2)

File diff suppressed because it is too large Load Diff

View File

@@ -614,118 +614,120 @@ export default {
this.interval = interval;
this.loading = true;
this.timeValue = data;
if(this.$refs.fhf.intervald==3){
let timedate = this.$refs.fhf.timeValue[1]
let timedate1 = timedate.split('-')
if(timedate1[2]=='01' || timedate1[2]=='02' || timedate1[2]=='03'){
let strTime = this.$refs.fhf.timeValue[0]
let strTime1 = this.$refs.fhf.timeValue[1]
let str1 = strTime.split('-')
let str2 = strTime1.split('-')
var now = new Date()
let month = now.getMonth()
if (month == 0) {
month = 12
str1[0] = str1[0] - 1
str2[0] = str2[0] - 1
}
if (month < 10) {
month = '0' + month
}
this.formData.searchBeginTime = str1[0] + '-' + month + '-' + str1[2]
if(month==1 || month==3 || month==5 || month==7 || month==8 || month==10 || month==12){
this.formData.searchEndTime = str2[0]+'-'+month+'-31'
}else{
this.formData.searchEndTime = str2[0]+'-'+month+'-30'
}
}else{
this.formData.searchBeginTime = this.$refs.fhf.timeValue[0]
// if(this.$refs.fhf.intervald==3){
// let timedate = this.$refs.fhf.timeValue[1]
// let timedate1 = timedate.split('-')
// if(timedate1[2]=='01' || timedate1[2]=='02' || timedate1[2]=='03'){
// let strTime = this.$refs.fhf.timeValue[0]
// let strTime1 = this.$refs.fhf.timeValue[1]
// let str1 = strTime.split('-')
// let str2 = strTime1.split('-')
// var now = new Date()
// let month = now.getMonth()
// if (month == 0) {
// month = 12
// str1[0] = str1[0] - 1
// str2[0] = str2[0] - 1
// }
// if (month < 10) {
// month = '0' + month
// }
// this.formData.searchBeginTime = str1[0] + '-' + month + '-' + str1[2]
// this.formData.searchEndTime = str2[0] + '-' + month + '-' + new Date(str2[0], month, 0).getDate()
// // if(month==1 || month==3 || month==5 || month==7 || month==8 || month==10 || month==12){
// // this.formData.searchEndTime = str2[0]+'-'+month+'-31'
// // }else{
// // this.formData.searchEndTime = str2[0]+'-'+month+'-30'
// // }
// }else{
// this.formData.searchBeginTime = this.$refs.fhf.timeValue[0]
// this.formData.searchEndTime = this.$refs.fhf.timeValue[1]
// }
// }else if(this.$refs.fhf.intervald==4){
// let timedate = this.$refs.fhf.timeValue[1]
// let timedate1 = timedate.split('-')
// if(timedate1[2]=='01' || timedate1[2]=='02' || timedate1[2]=='03' ){
// // 获取前七天的日期
// var previousDates = [];
// for (var i = 6; i >= 0; i--) {
// //var previousDate = new Date(currentDate);
// let strTime = this.$refs.fhf.timeValue[0]
// var currentDate = new Date(strTime);
// let previousDate = new Date(Date.parse(strTime.replace(/-/g,"/")))
// previousDate.setDate(currentDate.getDate() - i);
// previousDates.push(previousDate);
// }
// // 格式化日期
// var formattedDates = previousDates.map(function(date) {
// var year = date.getFullYear();
// var month = (date.getMonth() + 1).toString().padStart(2, '0');
// var day = date.getDate().toString().padStart(2, '0');
// let d = year + '-' + month + '-' + day;
// //console.log("+++++++++++",d)
// // 输出前七天的日期数组
// return d
// });
// this.formData.searchBeginTime = formattedDates[0]
// this.formData.searchEndTime = formattedDates[formattedDates.length-1]
// // console.log(formattedDates);
// }else{
// this.formData.searchBeginTime = this.$refs.fhf.timeValue[0]
// this.formData.searchEndTime = this.$refs.fhf.timeValue[1]
// }
// }else if(this.$refs.fhf.intervald==5){
// let timedate = this.$refs.fhf.timeValue[1]
// let timedate1 = timedate.split('-')
// if(timedate1[2]=='01' || timedate1[2]=='02' || timedate1[2]=='03' ){
// let strTime = this.$refs.fhf.timeValue[0]
// let currentDate = new Date(Date.parse(strTime.replace(/-/g,"/")))
// // console.log('当前日期(中国标准时间):', currentDate);
// // console.log("++++",currentDate)
// // 向前推一天
// currentDate.setDate(currentDate.getDate() - 1);
// // 格式化日期字符串
// const formatDate = (date) => {
// const year = date.getFullYear();
// const month = String(date.getMonth() + 1).padStart(2, '0');
// const day = String(date.getDate()).padStart(2, '0');
// return `${year}-${month}-${day}`;
// };
// let strTime2 = this.$refs.fhf.timeValue[1]
// let currentDate2 = new Date(Date.parse(strTime2.replace(/-/g,"/")))
// // console.log('当前日期(中国标准时间):', currentDate);
// // console.log("++++",currentDate)
// // 向前推一天
// currentDate.setDate(currentDate.getDate() - 1);
// // 格式化日期字符串
// const formatDate2 = (date) => {
// const year = date.getFullYear();
// const month = String(date.getMonth() + 1).padStart(2, '0');
// const day = String(date.getDate()).padStart(2, '0');
// return `${year}-${month}-${day}`;
// };
// // console.log('当前日期:', formatDate(new Date())); // 当前日期
// // console.log('向前推一天:', formatDate(currentDate)); // 一天前的日期
// this.formData.searchBeginTime = formatDate(currentDate)
// this.formData.searchEndTime = formatDate(currentDate2)
// }else {
// this.formData.searchBeginTime = this.$refs.fhf.timeValue[0]
// this.formData.searchEndTime = this.$refs.fhf.timeValue[1]
// }
// //let estr = this.$refs.fff.timeValue[1]
// }else{
// this.formData.searchBeginTime = this.$refs.fhf.timeValue[0]
// this.formData.searchEndTime = this.$refs.fhf.timeValue[1]
// }
this.formData.searchBeginTime = this.$refs.fhf.timeValue[0]
this.formData.searchEndTime = this.$refs.fhf.timeValue[1]
}
}else if(this.$refs.fhf.intervald==4){
let timedate = this.$refs.fhf.timeValue[1]
let timedate1 = timedate.split('-')
if(timedate1[2]=='01' || timedate1[2]=='02' || timedate1[2]=='03' ){
// 获取前七天的日期
var previousDates = [];
for (var i = 6; i >= 0; i--) {
//var previousDate = new Date(currentDate);
let strTime = this.$refs.fhf.timeValue[0]
var currentDate = new Date(strTime);
let previousDate = new Date(Date.parse(strTime.replace(/-/g,"/")))
previousDate.setDate(currentDate.getDate() - i);
previousDates.push(previousDate);
}
// 格式化日期
var formattedDates = previousDates.map(function(date) {
var year = date.getFullYear();
var month = (date.getMonth() + 1).toString().padStart(2, '0');
var day = date.getDate().toString().padStart(2, '0');
let d = year + '-' + month + '-' + day;
//console.log("+++++++++++",d)
// 输出前七天的日期数组
return d
});
this.formData.searchBeginTime = formattedDates[0]
this.formData.searchEndTime = formattedDates[formattedDates.length-1]
// console.log(formattedDates);
}else{
this.formData.searchBeginTime = this.$refs.fhf.timeValue[0]
this.formData.searchEndTime = this.$refs.fhf.timeValue[1]
}
}else if(this.$refs.fhf.intervald==5){
let timedate = this.$refs.fhf.timeValue[1]
let timedate1 = timedate.split('-')
if(timedate1[2]=='01' || timedate1[2]=='02' || timedate1[2]=='03' ){
let strTime = this.$refs.fhf.timeValue[0]
let currentDate = new Date(Date.parse(strTime.replace(/-/g,"/")))
// console.log('当前日期(中国标准时间):', currentDate);
// console.log("++++",currentDate)
// 向前推一天
currentDate.setDate(currentDate.getDate() - 1);
// 格式化日期字符串
const formatDate = (date) => {
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0');
const day = String(date.getDate()).padStart(2, '0');
return `${year}-${month}-${day}`;
};
let strTime2 = this.$refs.fhf.timeValue[1]
let currentDate2 = new Date(Date.parse(strTime2.replace(/-/g,"/")))
// console.log('当前日期(中国标准时间):', currentDate);
// console.log("++++",currentDate)
// 向前推一天
currentDate.setDate(currentDate.getDate() - 1);
// 格式化日期字符串
const formatDate2 = (date) => {
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0');
const day = String(date.getDate()).padStart(2, '0');
return `${year}-${month}-${day}`;
};
// console.log('当前日期:', formatDate(new Date())); // 当前日期
// console.log('向前推一天:', formatDate(currentDate)); // 一天前的日期
this.formData.searchBeginTime = formatDate(currentDate)
this.formData.searchEndTime = formatDate(currentDate2)
}else {
this.formData.searchBeginTime = this.$refs.fhf.timeValue[0]
this.formData.searchEndTime = this.$refs.fhf.timeValue[1]
}
//let estr = this.$refs.fff.timeValue[1]
}else{
this.formData.searchBeginTime = this.$refs.fhf.timeValue[0]
this.formData.searchEndTime = this.$refs.fhf.timeValue[1]
}
this.formData.pageSize = this.pageData.pageSize;
this.formData.pageNum = this.pageData.pageNum;
api2.lineOverLimit(this.formData).then((res) => {

View File

@@ -657,113 +657,114 @@ export default {
this.tableData = []
this.timeValue = data
//this.dateFormat(this.timeValue[0], this.timeValue[1]);
if (this.$refs.fkf.intervald == 3) {
let timedate = this.$refs.fkf.timeValue[1]
let timedate1 = timedate.split('-')
if (timedate1[2] == '01' || timedate1[2] == '02' || timedate1[2] == '03') {
let strTime = this.$refs.fkf.timeValue[0]
let strTime1 = this.$refs.fkf.timeValue[1]
let str1 = strTime.split('-')
let str2 = strTime1.split('-')
var now = new Date()
let month = now.getMonth()
if (month == 0) {
month = 12
str1[0] = str1[0] - 1
str2[0] = str2[0] - 1
}
if (month < 10) {
month = '0' + month
}
this.formData.searchBeginTime = str1[0] + '-' + month + '-' + str1[2]
// if (this.$refs.fkf.intervald == 3) {
// let timedate = this.$refs.fkf.timeValue[1]
// let timedate1 = timedate.split('-')
// if (timedate1[2] == '01' || timedate1[2] == '02' || timedate1[2] == '03') {
// let strTime = this.$refs.fkf.timeValue[0]
// let strTime1 = this.$refs.fkf.timeValue[1]
// let str1 = strTime.split('-')
// let str2 = strTime1.split('-')
// var now = new Date()
// let month = now.getMonth()
// if (month == 0) {
// month = 12
// str1[0] = str1[0] - 1
// str2[0] = str2[0] - 1
// }
// if (month < 10) {
// month = '0' + month
// }
// this.formData.searchBeginTime = str1[0] + '-' + month + '-' + str1[2]
this.formData.searchEndTime = str2[0] + '-' + month + '-' + new Date(str2[0], month, 0).getDate()
// this.formData.searchEndTime = str2[0] + '-' + month + '-' + new Date(str2[0], month, 0).getDate()
} else {
this.formData.searchBeginTime = this.$refs.fkf.timeValue[0]
this.formData.searchEndTime = this.$refs.fkf.timeValue[1]
}
} else if (this.$refs.fkf.intervald == 4) {
let timedate = this.$refs.fkf.timeValue[1]
let timedate1 = timedate.split('-')
if (timedate1[2] == '01' || timedate1[2] == '02' || timedate1[2] == '03') {
// 获取前七天的日期
var previousDates = []
for (var i = 6; i >= 0; i--) {
//var previousDate = new Date(currentDate);
let strTime = this.$refs.fkf.timeValue[0]
var currentDate = new Date(strTime)
let previousDate = new Date(Date.parse(strTime.replace(/-/g, '/')))
previousDate.setDate(currentDate.getDate() - i)
previousDates.push(previousDate)
}
// 格式化日期
var formattedDates = previousDates.map(function (date) {
var year = date.getFullYear()
var month = (date.getMonth() + 1).toString().padStart(2, '0')
var day = date.getDate().toString().padStart(2, '0')
// } else {
// this.formData.searchBeginTime = this.$refs.fkf.timeValue[0]
// this.formData.searchEndTime = this.$refs.fkf.timeValue[1]
// }
// } else if (this.$refs.fkf.intervald == 4) {
// let timedate = this.$refs.fkf.timeValue[1]
// let timedate1 = timedate.split('-')
// if (timedate1[2] == '01' || timedate1[2] == '02' || timedate1[2] == '03') {
// // 获取前七天的日期
// var previousDates = []
// for (var i = 6; i >= 0; i--) {
// //var previousDate = new Date(currentDate);
// let strTime = this.$refs.fkf.timeValue[0]
// var currentDate = new Date(strTime)
// let previousDate = new Date(Date.parse(strTime.replace(/-/g, '/')))
// previousDate.setDate(currentDate.getDate() - i)
// previousDates.push(previousDate)
// }
// // 格式化日期
// var formattedDates = previousDates.map(function (date) {
// var year = date.getFullYear()
// var month = (date.getMonth() + 1).toString().padStart(2, '0')
// var day = date.getDate().toString().padStart(2, '0')
let d = year + '-' + month + '-' + day
// console.log("+++++++++++",d)
// 输出前七天的日期数组
return d
})
this.formData.searchBeginTime = formattedDates[0]
this.formData.searchEndTime = formattedDates[formattedDates.length - 1]
// console.log(formattedDates);
} else {
this.formData.searchBeginTime = this.$refs.fkf.timeValue[0]
this.formData.searchEndTime = this.$refs.fkf.timeValue[1]
}
} else if (this.$refs.fkf.intervald == 5) {
let timedate = this.$refs.fkf.timeValue[1]
let timedate1 = timedate.split('-')
if (timedate1[2] == '01' || timedate1[2] == '02' || timedate1[2] == '03') {
let strTime = this.$refs.fkf.timeValue[0]
let currentDate = new Date(Date.parse(strTime.replace(/-/g, '/')))
// console.log('当前日期(中国标准时间):', currentDate);
// console.log("++++",currentDate)
// let d = year + '-' + month + '-' + day
// // console.log("+++++++++++",d)
// // 输出前七天的日期数组
// return d
// })
// this.formData.searchBeginTime = formattedDates[0]
// this.formData.searchEndTime = formattedDates[formattedDates.length - 1]
// // console.log(formattedDates);
// } else {
// this.formData.searchBeginTime = this.$refs.fkf.timeValue[0]
// this.formData.searchEndTime = this.$refs.fkf.timeValue[1]
// }
// } else if (this.$refs.fkf.intervald == 5) {
// let timedate = this.$refs.fkf.timeValue[1]
// let timedate1 = timedate.split('-')
// if (timedate1[2] == '01' || timedate1[2] == '02' || timedate1[2] == '03') {
// let strTime = this.$refs.fkf.timeValue[0]
// let currentDate = new Date(Date.parse(strTime.replace(/-/g, '/')))
// // console.log('当前日期(中国标准时间):', currentDate);
// // console.log("++++",currentDate)
// 向前推一天
currentDate.setDate(currentDate.getDate() - 1)
// // 向前推一天
// currentDate.setDate(currentDate.getDate() - 1)
// 格式化日期字符串
const formatDate = date => {
const year = date.getFullYear()
const month = String(date.getMonth() + 1).padStart(2, '0')
const day = String(date.getDate()).padStart(2, '0')
return `${year}-${month}-${day}`
}
let strTime2 = this.$refs.fkf.timeValue[1]
let currentDate2 = new Date(Date.parse(strTime2.replace(/-/g, '/')))
// console.log('当前日期(中国标准时间):', currentDate);
// console.log("++++",currentDate)
// // 格式化日期字符串
// const formatDate = date => {
// const year = date.getFullYear()
// const month = String(date.getMonth() + 1).padStart(2, '0')
// const day = String(date.getDate()).padStart(2, '0')
// return `${year}-${month}-${day}`
// }
// let strTime2 = this.$refs.fkf.timeValue[1]
// let currentDate2 = new Date(Date.parse(strTime2.replace(/-/g, '/')))
// // console.log('当前日期(中国标准时间):', currentDate);
// // console.log("++++",currentDate)
// 向前推一天
currentDate.setDate(currentDate.getDate() - 1)
// // 向前推一天
// currentDate.setDate(currentDate.getDate() - 1)
// 格式化日期字符串
const formatDate2 = date => {
const year = date.getFullYear()
const month = String(date.getMonth() + 1).padStart(2, '0')
const day = String(date.getDate()).padStart(2, '0')
return `${year}-${month}-${day}`
}
// console.log('当前日期:', formatDate(new Date())); // 当前日期
// console.log('向前推一天:', formatDate(currentDate)); // 一天前的日期
this.formData.searchBeginTime = formatDate(currentDate)
this.formData.searchEndTime = formatDate(currentDate2)
} else {
this.formData.searchBeginTime = this.$refs.fkf.timeValue[0]
this.formData.searchEndTime = this.$refs.fkf.timeValue[1]
}
// // 格式化日期字符串
// const formatDate2 = date => {
// const year = date.getFullYear()
// const month = String(date.getMonth() + 1).padStart(2, '0')
// const day = String(date.getDate()).padStart(2, '0')
// return `${year}-${month}-${day}`
// }
// // console.log('当前日期:', formatDate(new Date())); // 当前日期
// // console.log('向前推一天:', formatDate(currentDate)); // 一天前的日期
// this.formData.searchBeginTime = formatDate(currentDate)
// this.formData.searchEndTime = formatDate(currentDate2)
// } else {
// this.formData.searchBeginTime = this.$refs.fkf.timeValue[0]
// this.formData.searchEndTime = this.$refs.fkf.timeValue[1]
// }
//let estr = this.$refs.fff.timeValue[1]
} else {
this.formData.searchBeginTime = this.$refs.fkf.timeValue[0]
// //let estr = this.$refs.fff.timeValue[1]
// } else {
// this.formData.searchBeginTime = this.$refs.fkf.timeValue[0]
// this.formData.searchEndTime = this.$refs.fkf.timeValue[1]
// }
this.formData.searchBeginTime = this.$refs.fkf.timeValue[0]
this.formData.searchEndTime = this.$refs.fkf.timeValue[1]
}
var data = window.sessionStorage.getItem('Info')
data = eval('(' + data + ')')
this.formData.deptIndex = data.deptId

View File

@@ -891,112 +891,114 @@ export default {
this.tableData = []
this.timeValue = data
// this.dateFormat(this.timeValue[0], this.timeValue[1]);
if (this.$refs.fyf.intervald == 3) {
let timedate = this.$refs.fyf.timeValue[1]
let timedate1 = timedate.split('-')
if (timedate1[2] == '01' || timedate1[2] == '02' || timedate1[2] == '03') {
let strTime = this.$refs.fyf.timeValue[0]
let strTime1 = this.$refs.fyf.timeValue[1]
let str1 = strTime.split('-')
let str2 = strTime1.split('-')
var now = new Date()
let month = now.getMonth()
if (month == 0) {
month = 12
str1[0] = str1[0] - 1
str2[0] = str2[0] - 1
}
if (month < 10) {
month = '0' + month
}
this.formData.searchBeginTime = str1[0] + '-' + month + '-' + str1[2]
// if (this.$refs.fyf.intervald == 3) {
// let timedate = this.$refs.fyf.timeValue[1]
// let timedate1 = timedate.split('-')
// if (timedate1[2] == '01' || timedate1[2] == '02' || timedate1[2] == '03') {
// let strTime = this.$refs.fyf.timeValue[0]
// let strTime1 = this.$refs.fyf.timeValue[1]
// let str1 = strTime.split('-')
// let str2 = strTime1.split('-')
// var now = new Date()
// let month = now.getMonth()
// if (month == 0) {
// month = 12
// str1[0] = str1[0] - 1
// str2[0] = str2[0] - 1
// }
// if (month < 10) {
// month = '0' + month
// }
// this.formData.searchBeginTime = str1[0] + '-' + month + '-' + str1[2]
this.formData.searchEndTime = str2[0] + '-' + month + '-' + new Date(str2[0], month, 0).getDate()
// this.formData.searchEndTime = str2[0] + '-' + month + '-' + new Date(str2[0], month, 0).getDate()
} else {
this.formData.searchBeginTime = this.$refs.fyf.timeValue[0]
this.formData.searchEndTime = this.$refs.fyf.timeValue[1]
}
} else if (this.$refs.fyf.intervald == 4) {
let timedate = this.$refs.fyf.timeValue[1]
let timedate1 = timedate.split('-')
if (timedate1[2] == '01' || timedate1[2] == '02' || timedate1[2] == '03') {
// 获取前七天的日期
var previousDates = []
for (var i = 6; i >= 0; i--) {
//var previousDate = new Date(currentDate);
let strTime = this.$refs.fyf.timeValue[0]
var currentDate = new Date(strTime)
let previousDate = new Date(Date.parse(strTime.replace(/-/g, '/')))
previousDate.setDate(currentDate.getDate() - i)
previousDates.push(previousDate)
}
// 格式化日期
var formattedDates = previousDates.map(function (date) {
var year = date.getFullYear()
var month = (date.getMonth() + 1).toString().padStart(2, '0')
var day = date.getDate().toString().padStart(2, '0')
// } else {
// this.formData.searchBeginTime = this.$refs.fyf.timeValue[0]
// this.formData.searchEndTime = this.$refs.fyf.timeValue[1]
// }
// } else if (this.$refs.fyf.intervald == 4) {
// let timedate = this.$refs.fyf.timeValue[1]
// let timedate1 = timedate.split('-')
// if (timedate1[2] == '01' || timedate1[2] == '02' || timedate1[2] == '03') {
// // 获取前七天的日期
// var previousDates = []
// for (var i = 6; i >= 0; i--) {
// //var previousDate = new Date(currentDate);
// let strTime = this.$refs.fyf.timeValue[0]
// var currentDate = new Date(strTime)
// let previousDate = new Date(Date.parse(strTime.replace(/-/g, '/')))
// previousDate.setDate(currentDate.getDate() - i)
// previousDates.push(previousDate)
// }
// // 格式化日期
// var formattedDates = previousDates.map(function (date) {
// var year = date.getFullYear()
// var month = (date.getMonth() + 1).toString().padStart(2, '0')
// var day = date.getDate().toString().padStart(2, '0')
let d = year + '-' + month + '-' + day
// console.log("+++++++++++",d)
// 输出前七天的日期数组
return d
})
this.formData.searchBeginTime = formattedDates[0]
this.formData.searchEndTime = formattedDates[formattedDates.length - 1]
// console.log(formattedDates);
} else {
this.formData.searchBeginTime = this.$refs.fyf.timeValue[0]
this.formData.searchEndTime = this.$refs.fyf.timeValue[1]
}
} else if (this.$refs.fyf.intervald == 5) {
let timedate = this.$refs.fyf.timeValue[1]
let timedate1 = timedate.split('-')
if (timedate1[2] == '01' || timedate1[2] == '02' || timedate1[2] == '03') {
let strTime = this.$refs.fyf.timeValue[0]
let currentDate = new Date(Date.parse(strTime.replace(/-/g, '/')))
// console.log('当前日期(中国标准时间):', currentDate);
// console.log("++++",currentDate)
// let d = year + '-' + month + '-' + day
// // console.log("+++++++++++",d)
// // 输出前七天的日期数组
// return d
// })
// this.formData.searchBeginTime = formattedDates[0]
// this.formData.searchEndTime = formattedDates[formattedDates.length - 1]
// // console.log(formattedDates);
// } else {
// this.formData.searchBeginTime = this.$refs.fyf.timeValue[0]
// this.formData.searchEndTime = this.$refs.fyf.timeValue[1]
// }
// } else if (this.$refs.fyf.intervald == 5) {
// let timedate = this.$refs.fyf.timeValue[1]
// let timedate1 = timedate.split('-')
// if (timedate1[2] == '01' || timedate1[2] == '02' || timedate1[2] == '03') {
// let strTime = this.$refs.fyf.timeValue[0]
// let currentDate = new Date(Date.parse(strTime.replace(/-/g, '/')))
// // console.log('当前日期(中国标准时间):', currentDate);
// // console.log("++++",currentDate)
// 向前推一天
currentDate.setDate(currentDate.getDate() - 1)
// // 向前推一天
// currentDate.setDate(currentDate.getDate() - 1)
// 格式化日期字符串
const formatDate = date => {
const year = date.getFullYear()
const month = String(date.getMonth() + 1).padStart(2, '0')
const day = String(date.getDate()).padStart(2, '0')
return `${year}-${month}-${day}`
}
let strTime2 = this.$refs.fyf.timeValue[1]
let currentDate2 = new Date(Date.parse(strTime2.replace(/-/g, '/')))
// console.log('当前日期(中国标准时间):', currentDate);
// console.log("++++",currentDate)
// // 格式化日期字符串
// const formatDate = date => {
// const year = date.getFullYear()
// const month = String(date.getMonth() + 1).padStart(2, '0')
// const day = String(date.getDate()).padStart(2, '0')
// return `${year}-${month}-${day}`
// }
// let strTime2 = this.$refs.fyf.timeValue[1]
// let currentDate2 = new Date(Date.parse(strTime2.replace(/-/g, '/')))
// // console.log('当前日期(中国标准时间):', currentDate);
// // console.log("++++",currentDate)
// 向前推一天
currentDate.setDate(currentDate.getDate() - 1)
// // 向前推一天
// currentDate.setDate(currentDate.getDate() - 1)
// 格式化日期字符串
const formatDate2 = date => {
const year = date.getFullYear()
const month = String(date.getMonth() + 1).padStart(2, '0')
const day = String(date.getDate()).padStart(2, '0')
return `${year}-${month}-${day}`
}
// console.log('当前日期:', formatDate(new Date())); // 当前日期
// console.log('向前推一天:', formatDate(currentDate)); // 一天前的日期
this.formData.searchBeginTime = formatDate(currentDate)
this.formData.searchEndTime = formatDate(currentDate2)
} else {
this.formData.searchBeginTime = this.$refs.fyf.timeValue[0]
this.formData.searchEndTime = this.$refs.fyf.timeValue[1]
}
// // 格式化日期字符串
// const formatDate2 = date => {
// const year = date.getFullYear()
// const month = String(date.getMonth() + 1).padStart(2, '0')
// const day = String(date.getDate()).padStart(2, '0')
// return `${year}-${month}-${day}`
// }
// // console.log('当前日期:', formatDate(new Date())); // 当前日期
// // console.log('向前推一天:', formatDate(currentDate)); // 一天前的日期
// this.formData.searchBeginTime = formatDate(currentDate)
// this.formData.searchEndTime = formatDate(currentDate2)
// } else {
// this.formData.searchBeginTime = this.$refs.fyf.timeValue[0]
// this.formData.searchEndTime = this.$refs.fyf.timeValue[1]
// }
//let estr = this.$refs.fff.timeValue[1]
} else {
this.formData.searchBeginTime = this.$refs.fyf.timeValue[0]
// //let estr = this.$refs.fff.timeValue[1]
// } else {
// this.formData.searchBeginTime = this.$refs.fyf.timeValue[0]
// this.formData.searchEndTime = this.$refs.fyf.timeValue[1]
// }
this.formData.searchBeginTime = this.$refs.fyf.timeValue[0]
this.formData.searchEndTime = this.$refs.fyf.timeValue[1]
}
var data = window.sessionStorage.getItem('Info')
data = eval('(' + data + ')')
this.formData.deptIndex = data.deptId

View File

@@ -1,384 +1,402 @@
<template>
<div v-loading="loading"
element-loading-text="数据加载中">
<el-form :inline="true" :model="formInline" class="demo-form-inline">
<el-form-item label="类型:" style="display:none">
<el-select
v-model="formData.statisticalType"
@change="changeclasss"
placeholder="请选择统计类型"
style="width:100%"
>
<el-option
v-for="item in classificationData"
:key="item.id"
:label="item.name"
:value="{
label: item.name,
value: item.id,
name: item.name,
id: item.id,
code: item.code,
sort: item.sort,
}"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="区域:" >
<el-select
ref="selectTree1"
v-model="deptName"
placeholder="请选择所属部门区域"
style="width: 100%"
>
<el-option :value="deptIndex" style="height: auto">
<el-tree
ref="tree"
:data="treeData"
node-key="id"
accordion
:default-expanded-keys="idArr"
:props="defaultProps"
@node-click="handleNodeClick"
>
<span class="span-ellipsis" slot-scope="{ node, data }">
<span :title="data.name">{{ data.name }}</span>
<div v-loading="loading" element-loading-text="数据加载中">
<el-form :inline="true" :model="formInline" class="demo-form-inline">
<el-form-item label="类型:" style="display: none">
<el-select
v-model="formData.statisticalType"
@change="changeclasss"
placeholder="请选择统计类型"
style="width: 100%"
>
<el-option
v-for="item in classificationData"
:key="item.id"
:label="item.name"
:value="{
label: item.name,
value: item.id,
name: item.name,
id: item.id,
code: item.code,
sort: item.sort
}"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="区域:">
<el-select ref="selectTree1" v-model="deptName" placeholder="请选择所属部门区域" style="width: 100%">
<el-option :value="deptIndex" style="height: auto">
<el-tree
ref="tree"
:data="treeData"
node-key="id"
accordion
:default-expanded-keys="idArr"
:props="defaultProps"
@node-click="handleNodeClick"
>
<span class="span-ellipsis" slot-scope="{ node, data }">
<span :title="data.name">{{ data.name }}</span>
</span>
</el-tree>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="厂家:">
<el-select
v-model="formData.manufacturer"
multiple
collapse-tags
placeholder="请选择终端厂家"
style="width: 100%"
>
<el-option
v-for="item in terminaloption"
:key="item.id"
:label="item.name"
:value="{
label: item.name,
value: item.id,
code: item.code,
name: item.name,
id: item.id,
sort: item.sort
}"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="干扰源:" style="display: none">
<el-select
v-model="formData.loadType"
multiple
collapse-tags
placeholder="请选择干扰源类型"
style="width: 100%"
>
<el-option
v-for="item in interfereoption"
:key="item.id"
:label="item.name"
:value="{
label: item.name,
value: item.id,
code: item.code,
name: item.name,
id: item.id,
sort: item.sort
}"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="通讯状态:">
<el-select
v-model="formData.comFlag"
multiple
collapse-tags
placeholder="请选择通讯状态"
style="width: 100%"
>
<el-option
v-for="item in communicationstatus"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="终端状态:">
<el-select
v-model="formData.runFlag"
multiple
collapse-tags
placeholder="请选择终端状态"
style="width: 100%"
>
<el-option
v-for="item in terminalstatus"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" size="small" icon="el-icon-search" @click="queryDataInfo">查询</el-button>
</el-form-item>
<el-form-item style="float: right">
<span>
在线率60%
<span style="color: red; font-weight: bold">&ensp;&ensp;&ensp;</span>
60%在线率90%
<span style="color: rgb(255, 174, 0); font-weight: bold">&ensp;&ensp;&ensp;</span>
90%在线率
<span style="color: green; font-weight: bold"></span>
</span>
</el-tree>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="厂家:" >
<el-select
v-model="formData.manufacturer"
multiple
collapse-tags
placeholder="请选择终端厂家"
style="width: 100%"
>
<el-option
v-for="item in terminaloption"
:key="item.id"
:label="item.name"
:value="{
label: item.name,
value: item.id,
code: item.code,
name: item.name,
id: item.id,
sort: item.sort,
}"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="干扰源:" style="display: none">
<el-select
v-model="formData.loadType"
multiple
collapse-tags
placeholder="请选择干扰源类型"
style="width: 100%"
>
<el-option
v-for="item in interfereoption"
:key="item.id"
:label="item.name"
:value="{
label: item.name,
value: item.id,
code: item.code,
name: item.name,
id: item.id,
sort: item.sort,
}"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="通讯状态:" >
<el-select
v-model="formData.comFlag"
multiple
collapse-tags
placeholder="请选择通讯状态"
style="width: 100%"
>
<el-option
v-for="item in communicationstatus"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="终端状态:" >
<el-select
v-model="formData.runFlag"
multiple
collapse-tags
placeholder="请选择终端状态"
style="width: 100%"
>
<el-option
v-for="item in terminalstatus"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item >
<el-button
type="primary"
size="small"
icon="el-icon-search"
@click="queryDataInfo"
>查询</el-button
>
</el-form-item>
<el-form-item style="float: right;">
<span>在线率60% <span style="color:red;font-weight: bold;">&ensp;&ensp;&ensp;</span> 60%在线率90% <span style="color:rgb(255, 174, 0);font-weight: bold;">&ensp;&ensp;&ensp;</span> 90%在线率 <span style="color:green;font-weight: bold;"></span> </span>
</el-form-item>
</el-form>
<el-row :gutter="20" style="margin-top: 0%">
<el-col :span="24">
<terminalmessagetable
:tableData="tableData"
:classvalue="classt"
></terminalmessagetable>
</el-col>
</el-row>
</div>
</el-form-item>
</el-form>
<el-row :gutter="20" style="margin-top: 0%">
<el-col :span="24">
<terminalmessagetable :tableData="tableData" :classvalue="classt"></terminalmessagetable>
</el-col>
</el-row>
</div>
</template>
<script>
import { getappheight, getheight } from "@/assets/commjs/common";
import { guanzhou } from "@/assets/commjs/token";
import api1 from "@/api/pollution/pollution";
import timepicker from "@/views/cgy-components/TimePicker/index4";
import { dicData } from "../../../assets/commjs/dictypeData";
import api from "../../../api/integraliy/integraliy";
import Table from "../../components/teble/index";
import Pagination from "../../components/pagination/index";
import terminalmessagetable from "@/views/cgy-components/terminalmessagetable";
import { getappheight, getheight } from '@/assets/commjs/common'
import { guanzhou } from '@/assets/commjs/token'
import api1 from '@/api/pollution/pollution'
import timepicker from '@/views/cgy-components/TimePicker/index4'
import { dicData } from '../../../assets/commjs/dictypeData'
import api from '../../../api/integraliy/integraliy'
import Table from '../../components/teble/index'
import Pagination from '../../components/pagination/index'
import terminalmessagetable from '@/views/cgy-components/terminalmessagetable'
export default {
components: {
timepicker,
terminalmessagetable,
// onlinerateechart
},
watch: {},
computed: {},
data() {
return {
formInline: {},
loading: false,
classt: "Power_Network",
asideheight: undefined,
id: 1,
copent: 0,
title: "电网拓扑",
xdata: [
"江苏省",
"江西省",
"安徽省",
"湖北省",
"浙江省",
"湖南省",
"广东省",
"福建省",
"海南省",
"四川省",
"青海省",
"河北省",
],
ydata: [
92.6, 25.9, 39.0, 26.4, 28.7, 90.7, 75.6, 82.2, 48.7, 58.8, 16.0, 32.3,
],
classvalue: 0,
activeName: "tab1",
panindexOptions: [],
formData: {
//后面需要修改
serverName: "harmonic-boot",
searchBeginTime:'2023-04-01',
searchEndTime:'2023-04-11',
deptIndex: "",
monitorFlag: 2,
powerFlag: 2,
loadType: [],
manufacturer: [],
statisticalType: "",
scale: [],
comFlag: [0, 1],
runFlag: [0, 1, 2],
},
deptId: "",
deptName: "全国",
deptIndex: "",
treeData: [],
idArr: [],
defaultProps: {
children: "children",
label: "name",
},
//统计类型
classificationData: [],
//电压等级
voltageleveloption: [],
//终端厂家
terminaloption: [],
//干扰源类型
interfereoption: [],
//通讯状态
communicationstatus: [
{ value: 0, label: "中断" },
{ value: 1, label: "正常" },
],
//终端状态
terminalstatus: [
{ value: 0, label: "投运" },
{ value: 1, label: "热备用" },
{ value: 2, label: "停运" },
],
classt: "Power_Network",
tableData: [],
};
},
created() {
var info = window.sessionStorage.getItem("Info");
info = eval("(" + info + ")");
this.formData.deptIndex = info.deptId;
this.getAreaDept();
this.getclassificationData();
this.getVoltage();
this.getManufacturer();
this.getLoadType();
},
mounted() {
// this.asideheight = getappheight();
this.queryDataInfo();
},
methods: {
guanzhou() {
var data = {
token: this.$route.query.token,
};
api1.guanzhou(data).then((res) => {
if (res.code == "A0000") {
return;
} else {
this.$router.push("/error/massege/403");
components: {
timepicker,
terminalmessagetable
// onlinerateechart
},
watch: {},
computed: {},
data() {
return {
formInline: {},
loading: false,
classt: 'Power_Network',
asideheight: undefined,
id: 1,
copent: 0,
title: '电网拓扑',
xdata: [
'江苏省',
'江西省',
'安徽省',
'湖北省',
'浙江省',
'湖南省',
'广东省',
'福建省',
'海南省',
'四川省',
'青海省',
'河北省'
],
ydata: [92.6, 25.9, 39.0, 26.4, 28.7, 90.7, 75.6, 82.2, 48.7, 58.8, 16.0, 32.3],
classvalue: 0,
activeName: 'tab1',
panindexOptions: [],
formData: {
//后面需要修改
serverName: 'harmonic-boot',
searchBeginTime: '',
searchEndTime: '',
deptIndex: '',
monitorFlag: 2,
powerFlag: 2,
loadType: [],
manufacturer: [],
statisticalType: '',
scale: [],
comFlag: [0, 1],
runFlag: [0, 1, 2]
},
deptId: '',
deptName: '全国',
deptIndex: '',
treeData: [],
idArr: [],
defaultProps: {
children: 'children',
label: 'name'
},
//统计类型
classificationData: [],
//电压等级
voltageleveloption: [],
//终端厂家
terminaloption: [],
//干扰源类型
interfereoption: [],
//通讯状态
communicationstatus: [
{ value: 0, label: '中断' },
{ value: 1, label: '正常' }
],
//终端状态
terminalstatus: [
{ value: 0, label: '投运' },
{ value: 1, label: '热备用' },
{ value: 2, label: '停运' }
],
classt: 'Power_Network',
tableData: []
}
});
},
//切换统计类型
changeclasss(val) {
this.classt = val.code;
created() {
var info = window.sessionStorage.getItem('Info')
info = eval('(' + info + ')')
this.formData.deptIndex = info.deptId
this.getAreaDept()
this.getclassificationData()
this.getVoltage()
this.getManufacturer()
this.getLoadType()
},
//部门绑定区域触发区域树节点
handleNodeClick(data, node) {
this.deptName = data.name;
this.$refs.selectTree1.blur();
this.deptId = data.id;
this.formData.deptIndex = data.id;
mounted() {
// this.asideheight = getappheight();
this.queryDataInfo()
},
//2次组件触发事件
querfromdata(data) {
this.timeValue = data;
// alert("父组件条件查询触发方法" + this.timeValue);
},
handleClick(tab, event) {
this.$nextTick(() => {
this.$refs.child.onlinerateechart();
});
},
changePageNum(data) {
this.pageData.pageNum = data;
// alert("父组件当前页" + this.pageData.pageNum);
},
changePageSize(data) {
this.pageData.pageSize = data;
//alert("父组件当前条数" + this.pageData.pageSize);
},
//查询触发方法
queryDataInfo() {
this.loading = true;
api.getRuntimeData(this.formData).then((res) => {
if (res.code == "A0000") {
if (res.data.length == 0) {
this.tableData = [];
this.loading = false;
} else {
this.tableData = res.data;
this.loading = false;
}
methods: {
guanzhou() {
var data = {
token: this.$route.query.token
}
api1.guanzhou(data).then(res => {
if (res.code == 'A0000') {
return
} else {
this.$router.push('/error/massege/403')
}
})
},
//切换统计类型
changeclasss(val) {
this.classt = val.code
},
//部门绑定区域触发区域树节点
handleNodeClick(data, node) {
this.deptName = data.name
this.$refs.selectTree1.blur()
this.deptId = data.id
this.formData.deptIndex = data.id
},
//2次组件触发事件
querfromdata(data) {
this.timeValue = data
// alert("父组件条件查询触发方法" + this.timeValue);
},
handleClick(tab, event) {
this.$nextTick(() => {
this.$refs.child.onlinerateechart()
})
},
changePageNum(data) {
this.pageData.pageNum = data
// alert("父组件当前页" + this.pageData.pageNum);
},
changePageSize(data) {
this.pageData.pageSize = data
//alert("父组件当前条数" + this.pageData.pageSize);
},
//查询触发方法
queryDataInfo() {
console.log(123, this.getSearchTimeRange())
this.formData.searchBeginTime = this.getSearchTimeRange().searchBeginTime
this.formData.searchEndTime = this.getSearchTimeRange().searchEndTime
this.loading = true
api.getRuntimeData(this.formData).then(res => {
if (res.code == 'A0000') {
if (res.data.length == 0) {
this.tableData = []
this.loading = false
} else {
this.tableData = res.data
this.loading = false
}
}
})
},
//获取区域
getAreaDept() {
api.getAreaDept().then(res => {
if (res.code == 'A0000') {
var data = res.data
data.forEach(element => {
this.idArr.push(element.id)
})
this.treeData = data
}
})
},
//字典获取数据电压等级
getVoltage() {
var code = 'Dev_Voltage_Stand'
this.voltageleveloption = dicData(code, [])
//this.formData.scale = this.voltageleveloption;
},
//字典获取数据终端厂家
getManufacturer() {
var code = 'Dev_Manufacturers'
this.terminaloption = dicData(code, [])
this.formData.manufacturer = this.terminaloption
},
//字典获取数据干扰源类型
getLoadType() {
var code = 'Interference_Source'
this.interfereoption = dicData(code, [])
this.formData.loadType = this.interfereoption
},
//获取统计类型
getclassificationData() {
var code = 'Statistical_Type'
this.classificationData = dicData(code, ['Report_Type', 'Voltage_Level', 'Load_Type', 'Manufacturer'])
this.formData.statisticalType = this.classificationData[0]
},
getSearchTimeRange() {
const now = new Date()
const currentYear = now.getFullYear()
const currentMonth = now.getMonth() // 0-11
const currentDate = now.getDate()
let searchBeginTime, searchEndTime
if (currentDate === 1) {
// 如果是1号返回上个月1号到上个月最后一天
// 上个月的第一天
const lastMonthFirstDay = new Date(currentYear, currentMonth - 1, 1)
searchBeginTime = this.formatDate(lastMonthFirstDay)
// 上个月的最后一天当前月的第0天就是上个月的最后一天
const lastMonthLastDay = new Date(currentYear, currentMonth, 0)
searchEndTime = this.formatDate(lastMonthLastDay)
} else {
// 如果不是1号返回当月1号到当前时间
const monthFirstDay = new Date(currentYear, currentMonth, 1)
searchBeginTime = this.formatDate(monthFirstDay)
searchEndTime = this.formatDate(now)
}
return {
searchBeginTime,
searchEndTime
}
},
// 辅助函数:格式化日期为 YYYY-MM-DD
formatDate(date) {
const year = date.getFullYear()
const month = String(date.getMonth() + 1).padStart(2, '0')
const day = String(date.getDate()).padStart(2, '0')
return `${year}-${month}-${day}`
}
});
},
//获取区域
getAreaDept() {
api.getAreaDept().then((res) => {
if (res.code == "A0000") {
var data = res.data;
data.forEach((element) => {
this.idArr.push(element.id);
});
this.treeData = data;
}
});
},
//字典获取数据电压等级
getVoltage() {
var code = "Dev_Voltage_Stand";
this.voltageleveloption = dicData(code, []);
//this.formData.scale = this.voltageleveloption;
},
//字典获取数据终端厂家
getManufacturer() {
var code = "Dev_Manufacturers";
this.terminaloption = dicData(code, []);
this.formData.manufacturer = this.terminaloption;
},
//字典获取数据干扰源类型
getLoadType() {
var code = "Interference_Source";
this.interfereoption = dicData(code, []);
this.formData.loadType = this.interfereoption;
},
//获取统计类型
getclassificationData() {
var code = "Statistical_Type";
this.classificationData = dicData(code, [
"Report_Type",
"Voltage_Level",
"Load_Type",
"Manufacturer"
]);
this.formData.statisticalType = this.classificationData[0];
},
},
};
}
}
</script>
<style lang="scss" scoped>
@import url("../../../styles/common.less");
@import url('../../../styles/common.less');
.main {
overflow: hidden;
overflow: hidden;
}
::v-deep .el-main[data-v-2338f777] {
/* margin-top: 10px; */
padding: 10px 10px 10px 10px;
background-color: rgba(234, 235, 236, 0.996);
color: #333;
line-height: 0px;
/* margin-top: 10px; */
padding: 10px 10px 10px 10px;
background-color: rgba(234, 235, 236, 0.996);
color: #333;
line-height: 0px;
}
// ::v-deep .el-table__body-wrapper::-webkit-scrollbar {
// width: 8px; /*滚动条宽度*/
@@ -399,7 +417,7 @@ export default {
// }
::v-deep .el-select-dropdown__item,
.el-select-dropdown__item {
background-color: #fff;
padding: 0 5px !important;
background-color: #fff;
padding: 0 5px !important;
}
</style>

View File

@@ -35,7 +35,7 @@
<el-button v-show="buttonShow && thb" @click="tongbiyear" type="primary">同比</el-button>
<el-button v-show="buttonShow && thb" @click="huangbiyear" type="primary">环比</el-button>
<el-button v-show="false" type="primary">导出文件</el-button>
<!-- <el-button @click="querfromdata(1)" type="primary" icon="el-icon-search">查询</el-button>-->
<!-- <el-button @click="querfromdata(1)" type="primary" icon="el-icon-search">查询</el-button> -->
</el-form-item>
</el-form>

View File

@@ -1100,8 +1100,8 @@ export default {
voltageLevelArr: [],
/**母线类型 */
busBarType: [
{ name: '实际母线', value: 0 },
{ name: '虚拟母线', value: 1 }
{ name: '实际母线', value: 1 },
{ name: '虚拟母线', value: 0 }
],
/**监测点详情 */
monitorPointDetail: {

View File

@@ -1354,7 +1354,8 @@ export default {
}
},
methods: {
connectMqtt() {
async connectMqtt() {
let this_ = this
this_.globalMqtt.ws = {};
let mqttWs = null;
@@ -1368,8 +1369,12 @@ export default {
username: "t_user",
password: "njcnpqs",
};
const url = "ws://192.168.1.24:8085/mqtt";
mqttWs = mqtt.connect(url, options);
const url = localStorage.getItem('MqttUrl') == 'null'
? 'ws://192.168.1.24:8085/mqtt'
: localStorage.getItem('MqttUrl')
console.log("🚀 ~ connectMqtt ~ url:", url)
mqttWs =await mqtt.connect(url, options);
this_.globalMqtt.setWs(mqttWs);

View File

@@ -605,7 +605,7 @@ export default {
/**电压等级选项 */
voltageLevelArr: [],
/**母线类型 */
busBarType: [{ name: "实际母线", value: 0 }, { name: "虚拟母线", value: 1 },],
busBarType: [{ name: "实际母线", value: 1 }, { name: "虚拟母线", value: 0 },],
/**监测点详情 */
monitorPointDetail: {
/**行业类型 */

View File

@@ -39,7 +39,7 @@ module.exports = {
// target: 'http://192.168.120.210:10215', //hsw
// target: 'http://192.168.1.28:10215', //超高压
// target: "'https://pqmcn.com:8092/api", //治理
target: 'http://192.168.1.24:10215', // 河北
target: 'http://192.168.1.67:10215', // 河北
// target: "http://192.168.1.31:10215", // 海南
// target: "http://192.168.1.29:10215", // 冀北
changeOrigin: true,