修改现场问题
This commit is contained in:
20941
package-lock.json
generated
Normal file
20941
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
11
src/App.vue
11
src/App.vue
@@ -52,7 +52,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}, 10000)
|
}, 10000)
|
||||||
},
|
},
|
||||||
mounted() {
|
async mounted() {
|
||||||
// 处理笔记本系统默认系统比例为150%带来的布局影响
|
// 处理笔记本系统默认系统比例为150%带来的布局影响
|
||||||
if (process.env.VUE_APP_ZOOM) {
|
if (process.env.VUE_APP_ZOOM) {
|
||||||
const m = this.detectZoom()
|
const m = this.detectZoom()
|
||||||
@@ -65,7 +65,7 @@ export default {
|
|||||||
window.sessionStorage.setItem('appheight', this.appheight)
|
window.sessionStorage.setItem('appheight', this.appheight)
|
||||||
if (process.env.VUE_APP_MODE === 'jbqr') {
|
if (process.env.VUE_APP_MODE === 'jbqr') {
|
||||||
window.sessionStorage.setItem('appheight', document.body.offsetHeight - 10)
|
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)
|
window.sessionStorage.setItem('appheight', document.body.offsetHeight - 10)
|
||||||
}
|
}
|
||||||
}, 100)
|
}, 100)
|
||||||
@@ -82,7 +82,7 @@ export default {
|
|||||||
window.sessionStorage.setItem('appheight', this.appheight)
|
window.sessionStorage.setItem('appheight', this.appheight)
|
||||||
if (process.env.VUE_APP_MODE === 'jbqr') {
|
if (process.env.VUE_APP_MODE === 'jbqr') {
|
||||||
window.sessionStorage.setItem('appheight', document.body.offsetHeight - 10)
|
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)
|
window.sessionStorage.setItem('appheight', document.body.offsetHeight - 10)
|
||||||
}
|
}
|
||||||
// }, 100)
|
// }, 100)
|
||||||
@@ -90,6 +90,11 @@ export default {
|
|||||||
window.addEventListener('beforeunload', e => this.beforeunloadHandler(e))
|
window.addEventListener('beforeunload', e => this.beforeunloadHandler(e))
|
||||||
window.addEventListener('unload', e => this.unloadHandler(e))
|
window.addEventListener('unload', e => this.unloadHandler(e))
|
||||||
window.addEventListener('resize', this.handleResizeEcharts)
|
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() {
|
// destroyed() {
|
||||||
// window.removeEventListener('beforeunload', e => this.beforeunloadHandler(e))
|
// window.removeEventListener('beforeunload', e => this.beforeunloadHandler(e))
|
||||||
|
|||||||
@@ -163,9 +163,9 @@
|
|||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
.el-dialog__header {
|
.el-dialog__header {
|
||||||
height: 36px;
|
height: 55px;
|
||||||
padding: 0 20px;
|
padding: 0 20px;
|
||||||
line-height: 36px;
|
line-height: 55px;
|
||||||
background: $themeColor;
|
background: $themeColor;
|
||||||
.el-dialog__title {
|
.el-dialog__title {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
|
|||||||
@@ -154,9 +154,9 @@
|
|||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
.el-dialog__header {
|
.el-dialog__header {
|
||||||
height: 36px;
|
height: 55px;
|
||||||
padding: 0 20px;
|
padding: 0 20px;
|
||||||
line-height: 36px;
|
line-height: 55px;
|
||||||
background: $themeColor;
|
background: $themeColor;
|
||||||
.el-dialog__title {
|
.el-dialog__title {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
|
|||||||
@@ -970,9 +970,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.el-dialog .el-dialog__header {
|
.el-dialog .el-dialog__header {
|
||||||
height: 36px;
|
height: 55px;
|
||||||
padding: 0 10px !important;
|
padding: 0 10px !important;
|
||||||
line-height: 36px;
|
line-height: 55px;
|
||||||
background: #034e4b !important;
|
background: #034e4b !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -916,9 +916,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.el-dialog .el-dialog__header {
|
.el-dialog .el-dialog__header {
|
||||||
height: 36px;
|
height: 55px;
|
||||||
padding: 0 10px !important;
|
padding: 0 10px !important;
|
||||||
line-height: 36px;
|
line-height: 55px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-dialog .el-dialog__header .el-dialog__headerbtn {
|
.el-dialog .el-dialog__header .el-dialog__headerbtn {
|
||||||
@@ -1130,9 +1130,9 @@
|
|||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
.el-dialog__header {
|
.el-dialog__header {
|
||||||
height: 36px;
|
height: 55px;
|
||||||
padding: 0 20px;
|
padding: 0 20px;
|
||||||
line-height: 36px;
|
line-height: 55px;
|
||||||
background: $themeColor;
|
background: $themeColor;
|
||||||
.el-dialog__title {
|
.el-dialog__title {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
|
|||||||
@@ -896,9 +896,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.el-dialog .el-dialog__header {
|
.el-dialog .el-dialog__header {
|
||||||
height: 36px;
|
height: 55px;
|
||||||
padding: 0 10px !important;
|
padding: 0 10px !important;
|
||||||
line-height: 36px;
|
line-height: 55px;
|
||||||
background: #044267 !important;
|
background: #044267 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1100,9 +1100,9 @@
|
|||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
.el-dialog__header {
|
.el-dialog__header {
|
||||||
height: 36px;
|
height: 55px;
|
||||||
padding: 0 20px;
|
padding: 0 20px;
|
||||||
line-height: 36px;
|
line-height: 55px;
|
||||||
background: $themeColor;
|
background: $themeColor;
|
||||||
.el-dialog__title {
|
.el-dialog__title {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
:height="vh + 'px'"
|
:height="vh + 'px'"
|
||||||
>
|
>
|
||||||
<el-table-column prop="userName" label="登录用户" align="center"></el-table-column>
|
<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-column prop="time" label="登录时间" align="center"></el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<el-pagination
|
<el-pagination
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
查询
|
查询
|
||||||
</el-button>
|
</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-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|||||||
@@ -164,9 +164,10 @@ export default {
|
|||||||
mounted() {
|
mounted() {
|
||||||
this.deptId = JSON.parse(window.sessionStorage.getItem('Info')).deptId
|
this.deptId = JSON.parse(window.sessionStorage.getItem('Info')).deptId
|
||||||
this.zoom = 1 / document.body.style.zoom
|
this.zoom = 1 / document.body.style.zoom
|
||||||
|
|
||||||
|
this.$nextTick(() => {
|
||||||
this.setHeight()
|
this.setHeight()
|
||||||
window.addEventListener('resize', this.setHeight)
|
window.addEventListener('resize', this.setHeight)
|
||||||
this.$nextTick(() => {
|
|
||||||
this.getTemplateLists()
|
this.getTemplateLists()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -177,7 +178,7 @@ export default {
|
|||||||
setHeight() {
|
setHeight() {
|
||||||
this.zoom = 1 / document.body.style.zoom
|
this.zoom = 1 / document.body.style.zoom
|
||||||
this.vh = window.sessionStorage.getItem('appheight')
|
this.vh = window.sessionStorage.getItem('appheight')
|
||||||
this.vw = document.getElementById('app-main-in').offsetWidth
|
this.vw = document.getElementById('app-main-in')?.offsetWidth
|
||||||
},
|
},
|
||||||
async getTemplateLists() {
|
async getTemplateLists() {
|
||||||
await getTemplateByDept({ id: this.deptId }).then(res => {
|
await getTemplateByDept({ id: this.deptId }).then(res => {
|
||||||
|
|||||||
@@ -24,8 +24,8 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import SteadyStateReport from "./components/SteadyStateReport.vue";
|
import SteadyStateReport from "./components/SteadyStateReport.vue";
|
||||||
import reportForm from "./components/reportForm";
|
import reportForm from "./components/reportForm.vue";
|
||||||
import StandingBook from "./components/StandingBook";
|
import StandingBook from "./components/StandingBook.vue";
|
||||||
export default {
|
export default {
|
||||||
components: { SteadyStateReport, reportForm, StandingBook },
|
components: { SteadyStateReport, reportForm, StandingBook },
|
||||||
props: {},
|
props: {},
|
||||||
|
|||||||
@@ -5,52 +5,30 @@
|
|||||||
</el-button>
|
</el-button>
|
||||||
<el-form :inline="true" :model="formData" class="demo-form-inline">
|
<el-form :inline="true" :model="formData" class="demo-form-inline">
|
||||||
<el-form-item label="指标:">
|
<el-form-item label="指标:">
|
||||||
<el-select
|
<el-select v-model="condition" multiple collapse-tags :multiple-limit="limit" filterable
|
||||||
v-model="condition"
|
placeholder="请选择指标">
|
||||||
multiple
|
|
||||||
collapse-tags
|
|
||||||
:multiple-limit="limit"
|
|
||||||
filterable
|
|
||||||
placeholder="请选择指标"
|
|
||||||
>
|
|
||||||
<el-option-group v-for="group in options" :key="group.label" :label="group.label">
|
<el-option-group v-for="group in options" :key="group.label" :label="group.label">
|
||||||
<el-option
|
<el-option v-for="item in group.options" :key="item.value" :label="item.label"
|
||||||
v-for="item in group.options"
|
:value="item.value"></el-option>
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
></el-option>
|
|
||||||
</el-option-group>
|
</el-option-group>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="类型:">
|
<el-form-item label="类型:">
|
||||||
<el-select style="width: 150px" v-model="formData.valueType" placeholder="请选择类型">
|
<el-select style="width: 150px" v-model="formData.valueType" placeholder="请选择类型">
|
||||||
<el-option
|
<el-option v-for="item in typeoptions" :key="item.value" :label="item.label"
|
||||||
v-for="item in typeoptions"
|
:value="item.value"></el-option>
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
></el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="谐波:" v-show="xb">
|
<el-form-item label="谐波:" v-show="xb">
|
||||||
<el-select style="width: 120px" v-model="formData.harmonic" placeholder="请选择谐波">
|
<el-select style="width: 120px" v-model="formData.harmonic" placeholder="请选择谐波">
|
||||||
<el-option
|
<el-option v-for="item in harmonicoptions" :key="item.value" :label="item.label"
|
||||||
v-for="item in harmonicoptions"
|
:value="item.value"></el-option>
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
></el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-show="jxb" label="间谐波:">
|
<el-form-item v-show="jxb" label="间谐波:">
|
||||||
<el-select style="width: 120px" v-model="formData.inHarmonic" placeholder="请选择间谐波">
|
<el-select style="width: 120px" v-model="formData.inHarmonic" placeholder="请选择间谐波">
|
||||||
<el-option
|
<el-option v-for="item in inharmonicoptions" :key="item.value" :label="item.label"
|
||||||
v-for="item in inharmonicoptions"
|
:value="item.value"></el-option>
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
></el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
@@ -63,19 +41,10 @@
|
|||||||
<timeindex :interval="interval"></timeindex>
|
<timeindex :interval="interval"></timeindex>
|
||||||
</el-form-item> -->
|
</el-form-item> -->
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-row
|
<el-row ref="tubiao" v-loading="loading" id="tubiao" :gutter="10"
|
||||||
ref="tubiao"
|
:style="'overflow:scroll;height:' + rowvh + ';cursor:pointer;scrollbar-arrow-color:#302D30;'">
|
||||||
v-loading="loading"
|
<el-col :span="24" v-for="(item, index) in list" :key="index"
|
||||||
id="tubiao"
|
:style="index > 0 ? 'margin-top: 10px;height:' + vhh : 'margin-top: 0px;height:' + vhh">
|
||||||
: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>
|
<div ref="kk" :id="item.id" :style="`height:${vh};cursor:pointer;;`"></div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@@ -103,7 +72,7 @@ export default {
|
|||||||
zoom: '',
|
zoom: '',
|
||||||
loading: false,
|
loading: false,
|
||||||
url: require('@/assets/point.png'),
|
url: require('@/assets/point.png'),
|
||||||
timeOptions:[
|
timeOptions: [
|
||||||
{ label: "年份", value: 1 },
|
{ label: "年份", value: 1 },
|
||||||
{ label: "季度", value: 2 },
|
{ label: "季度", value: 2 },
|
||||||
{ label: "月份", value: 3 },
|
{ label: "月份", value: 3 },
|
||||||
@@ -471,7 +440,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {},
|
created() { },
|
||||||
mounted() {
|
mounted() {
|
||||||
this.queryData()
|
this.queryData()
|
||||||
this.zoom = 1 / document.body.style.zoom
|
this.zoom = 1 / document.body.style.zoom
|
||||||
@@ -1816,8 +1785,18 @@ export default {
|
|||||||
document.mozCancelFullScreen()
|
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: [
|
yAxis: [
|
||||||
// (item.minValue - 0.5).toFixed(2)
|
// (item.minValue - 0.5).toFixed(2)
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-loading="loading"
|
<div v-loading="loading" element-loading-text="数据加载中">
|
||||||
element-loading-text="数据加载中">
|
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form :inline="true" :model="formData" class="demo-form-inline">
|
<el-form :inline="true" :model="formData" class="demo-form-inline">
|
||||||
<el-form-item style="display:none">
|
<el-form-item style="display: none">
|
||||||
<el-switch
|
<el-switch
|
||||||
class="tableScopeSwitch"
|
class="tableScopeSwitch"
|
||||||
:active-value="2"
|
:active-value="2"
|
||||||
@@ -14,8 +13,7 @@
|
|||||||
inactive-text="超高压"
|
inactive-text="超高压"
|
||||||
inactive-color="#666666"
|
inactive-color="#666666"
|
||||||
v-model="formData.monitorFlag"
|
v-model="formData.monitorFlag"
|
||||||
>
|
></el-switch>
|
||||||
</el-switch>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="类型:">
|
<el-form-item label="类型:">
|
||||||
<el-select
|
<el-select
|
||||||
@@ -34,14 +32,14 @@
|
|||||||
name: item.name,
|
name: item.name,
|
||||||
id: item.id,
|
id: item.id,
|
||||||
code: item.code,
|
code: item.code,
|
||||||
sort: item.sort,
|
sort: item.sort
|
||||||
}"
|
}"
|
||||||
>
|
></el-option>
|
||||||
</el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="区域:" >
|
<el-form-item label="区域:">
|
||||||
<el-select ref="select1"
|
<el-select
|
||||||
|
ref="select1"
|
||||||
v-model="deptName"
|
v-model="deptName"
|
||||||
placeholder="请选择所属部门区域"
|
placeholder="请选择所属部门区域"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
@@ -69,7 +67,7 @@
|
|||||||
multiple
|
multiple
|
||||||
collapse-tags
|
collapse-tags
|
||||||
placeholder="请选择电压等级"
|
placeholder="请选择电压等级"
|
||||||
style="width:100%"
|
style="width: 100%"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in voltageleveloption"
|
v-for="item in voltageleveloption"
|
||||||
@@ -81,13 +79,12 @@
|
|||||||
code: item.code,
|
code: item.code,
|
||||||
name: item.name,
|
name: item.name,
|
||||||
id: item.id,
|
id: item.id,
|
||||||
sort: item.sort,
|
sort: item.sort
|
||||||
}"
|
}"
|
||||||
>
|
></el-option>
|
||||||
</el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="厂家:" >
|
<el-form-item label="厂家:">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="formData.manufacturer"
|
v-model="formData.manufacturer"
|
||||||
multiple
|
multiple
|
||||||
@@ -105,19 +102,18 @@
|
|||||||
code: item.code,
|
code: item.code,
|
||||||
name: item.name,
|
name: item.name,
|
||||||
id: item.id,
|
id: item.id,
|
||||||
sort: item.sort,
|
sort: item.sort
|
||||||
}"
|
}"
|
||||||
>
|
></el-option>
|
||||||
</el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="干扰源:" style="display: none;">
|
<el-form-item label="干扰源:" style="display: none">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="formData.loadType"
|
v-model="formData.loadType"
|
||||||
multiple
|
multiple
|
||||||
collapse-tags
|
collapse-tags
|
||||||
placeholder="请选择干扰源类型"
|
placeholder="请选择干扰源类型"
|
||||||
style="width:100%"
|
style="width: 100%"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in interfereoption"
|
v-for="item in interfereoption"
|
||||||
@@ -129,10 +125,9 @@
|
|||||||
code: item.code,
|
code: item.code,
|
||||||
name: item.name,
|
name: item.name,
|
||||||
id: item.id,
|
id: item.id,
|
||||||
sort: item.sort,
|
sort: item.sort
|
||||||
}"
|
}"
|
||||||
>
|
></el-option>
|
||||||
</el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
@@ -151,17 +146,9 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-tabs style="height:calc(100vh - 127px)"
|
<el-tabs style="height: calc(100vh - 127px)" type="border-card" v-model="activeName" @tab-click="handleClick">
|
||||||
type="border-card"
|
|
||||||
v-model="activeName"
|
|
||||||
@tab-click="handleClick"
|
|
||||||
>
|
|
||||||
<el-tab-pane :lazy="false" label="数据完整性列表" name="tab1">
|
<el-tab-pane :lazy="false" label="数据完整性列表" name="tab1">
|
||||||
<dataintegrity
|
<dataintegrity :classvalue="classt" :tableData="tableData" :loading="loading"></dataintegrity>
|
||||||
:classvalue="classt"
|
|
||||||
:tableData="tableData"
|
|
||||||
:loading="loading"
|
|
||||||
></dataintegrity>
|
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane :lazy="false" label="数据完整性图表" name="tab2">
|
<el-tab-pane :lazy="false" label="数据完整性图表" name="tab2">
|
||||||
<dataintegrityechart
|
<dataintegrityechart
|
||||||
@@ -171,7 +158,6 @@
|
|||||||
:timehuanbiValue="ping"
|
:timehuanbiValue="ping"
|
||||||
:xdata="xdata"
|
:xdata="xdata"
|
||||||
:ydata="ydata"
|
:ydata="ydata"
|
||||||
|
|
||||||
ref="child"
|
ref="child"
|
||||||
></dataintegrityechart>
|
></dataintegrityechart>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
@@ -179,23 +165,22 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getappheight, getheight } from "@/assets/commjs/common";
|
import { getappheight, getheight } from '@/assets/commjs/common'
|
||||||
import {guanzhou} from '@/assets/commjs/token'
|
import { guanzhou } from '@/assets/commjs/token'
|
||||||
import api1 from '@/api/pollution/pollution'
|
import api1 from '@/api/pollution/pollution'
|
||||||
import { dicData } from "@/assets/commjs/dictypeData";
|
import { dicData } from '@/assets/commjs/dictypeData'
|
||||||
import api from "../../../api/integraliy/integraliy";
|
import api from '../../../api/integraliy/integraliy'
|
||||||
import timepicker from "@/views/cgy-components/TimePicker/index4";
|
import timepicker from '@/views/cgy-components/TimePicker/index4'
|
||||||
|
|
||||||
import dataintegrity from "@/views/cgy-components/dataintegrity";
|
import dataintegrity from '@/views/cgy-components/dataintegrity'
|
||||||
import dataintegrityechart from "@/views/cgy-components/dataintegrityechart";
|
import dataintegrityechart from '@/views/cgy-components/dataintegrityechart'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "sjwzx",
|
name: 'sjwzx',
|
||||||
components: {
|
components: {
|
||||||
|
|
||||||
timepicker,
|
timepicker,
|
||||||
dataintegrity,
|
dataintegrity,
|
||||||
dataintegrityechart,
|
dataintegrityechart
|
||||||
},
|
},
|
||||||
watch: {},
|
watch: {},
|
||||||
computed: {},
|
computed: {},
|
||||||
@@ -203,278 +188,273 @@ export default {
|
|||||||
return {
|
return {
|
||||||
formInline: {},
|
formInline: {},
|
||||||
loading: false,
|
loading: false,
|
||||||
classt: "Power_Network",
|
classt: 'Power_Network',
|
||||||
tablename: "tab1",
|
tablename: 'tab1',
|
||||||
thb: false,
|
thb: false,
|
||||||
eacjartflag: true,
|
eacjartflag: true,
|
||||||
interval: 3,
|
interval: 3,
|
||||||
treeData: [],
|
treeData: [],
|
||||||
idArr: [],
|
idArr: [],
|
||||||
defaultProps: {
|
defaultProps: {
|
||||||
children: "children",
|
children: 'children',
|
||||||
label: "name",
|
label: 'name'
|
||||||
},
|
},
|
||||||
deptName: "全国",
|
deptName: '全国',
|
||||||
deptIndex: "",
|
deptIndex: '',
|
||||||
name: "sjwzx",
|
name: 'sjwzx',
|
||||||
path: "/harmonic-boot/harmonic/getIntegrityData",
|
path: '/harmonic-boot/harmonic/getIntegrityData',
|
||||||
asideheight: undefined,
|
asideheight: undefined,
|
||||||
id: 1,
|
id: 1,
|
||||||
title: "区域",
|
title: '区域',
|
||||||
xdata: [],
|
xdata: [],
|
||||||
ydata: [],
|
ydata: [],
|
||||||
classvalue: 0,
|
classvalue: 0,
|
||||||
activeName: "tab1",
|
activeName: 'tab1',
|
||||||
treenode: "",
|
treenode: '',
|
||||||
dataTree: "",
|
dataTree: '',
|
||||||
voltageleve1: "",
|
voltageleve1: '',
|
||||||
//电压等级
|
//电压等级
|
||||||
voltageleveloption: [],
|
voltageleveloption: [],
|
||||||
terminal: "",
|
terminal: '',
|
||||||
terminaloption: [],
|
terminaloption: [],
|
||||||
interfere: "",
|
interfere: '',
|
||||||
interfereoption: [],
|
interfereoption: [],
|
||||||
classificationData: [],
|
classificationData: [],
|
||||||
dictypeData: undefined,
|
dictypeData: undefined,
|
||||||
deptIndex: "",
|
deptIndex: '',
|
||||||
formData: {
|
formData: {
|
||||||
//后面需要修改
|
//后面需要修改
|
||||||
deptIndex: "",
|
deptIndex: '',
|
||||||
monitorFlag: 2,
|
monitorFlag: 2,
|
||||||
powerFlag: 2,
|
powerFlag: 2,
|
||||||
loadType: null,
|
loadType: null,
|
||||||
manufacturer: null,
|
manufacturer: null,
|
||||||
searchBeginTime: "",
|
searchBeginTime: '',
|
||||||
searchEndTime: "",
|
searchEndTime: '',
|
||||||
statisticalType: "",
|
statisticalType: '',
|
||||||
scale: null,
|
scale: null
|
||||||
},
|
},
|
||||||
periodBeginTime: "",
|
periodBeginTime: '',
|
||||||
periodEndTime: "",
|
periodEndTime: '',
|
||||||
timehuanbiValue: [],
|
timehuanbiValue: [],
|
||||||
tableData: [],
|
tableData: [],
|
||||||
ping: "",
|
ping: '',
|
||||||
time: "",
|
time: '',
|
||||||
quyuname: undefined,
|
quyuname: undefined,
|
||||||
vh:null
|
vh: null
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
let data = window.sessionStorage.getItem("sysData");
|
let data = window.sessionStorage.getItem('sysData')
|
||||||
let yudata = eval("(" + data + ")");
|
let yudata = eval('(' + data + ')')
|
||||||
let str = yudata.dataReport.split(",");
|
let str = yudata.dataReport.split(',')
|
||||||
this.quyuname = str[1];
|
this.quyuname = str[1]
|
||||||
var info = window.sessionStorage.getItem("Info");
|
var info = window.sessionStorage.getItem('Info')
|
||||||
info = eval("(" + info + ")");
|
info = eval('(' + info + ')')
|
||||||
this.formData.deptIndex = info.deptId;
|
this.formData.deptIndex = info.deptId
|
||||||
this.getAreaDept();
|
this.getAreaDept()
|
||||||
this.getclassificationData();
|
this.getclassificationData()
|
||||||
this.getVoltage();
|
this.getVoltage()
|
||||||
this.getManufacturer();
|
this.getManufacturer()
|
||||||
this.getLoadType();
|
this.getLoadType()
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.vh = window.sessionStorage.getItem('appheight')-120
|
this.vh = window.sessionStorage.getItem('appheight') - 120
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 算法
|
// 算法
|
||||||
algorithm(name) {
|
algorithm(name) {
|
||||||
let pathInfo = this.$router.resolve({
|
let pathInfo = this.$router.resolve({
|
||||||
path:'/algorithm/algorithm',
|
path: '/algorithm/algorithm',
|
||||||
query:{
|
query: {
|
||||||
name: name,
|
name: name
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
window.open(pathInfo.href, '算法帮助');
|
window.open(pathInfo.href, '算法帮助')
|
||||||
},
|
},
|
||||||
guanzhou(){
|
guanzhou() {
|
||||||
var data ={
|
var data = {
|
||||||
token:this.$route.query.token
|
token: this.$route.query.token
|
||||||
}
|
}
|
||||||
api1.guanzhou(data).then(res=>{
|
api1.guanzhou(data).then(res => {
|
||||||
if(res.code=='A0000'){
|
if (res.code == 'A0000') {
|
||||||
return
|
return
|
||||||
}else{
|
} else {
|
||||||
this.$router.push('/error/massege/403')
|
this.$router.push('/error/massege/403')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//切换统计类型
|
//切换统计类型
|
||||||
changeclasss(val) {
|
changeclasss(val) {
|
||||||
this.classt = val.code;
|
this.classt = val.code
|
||||||
|
|
||||||
},
|
},
|
||||||
//时间格式转化
|
//时间格式转化
|
||||||
dateFormat(dateData1, dateData2) {
|
dateFormat(dateData1, dateData2) {
|
||||||
var timearr = [];
|
var timearr = []
|
||||||
var date = new Date(dateData1);
|
var date = new Date(dateData1)
|
||||||
var y = date.getFullYear();
|
var y = date.getFullYear()
|
||||||
var m = date.getMonth() + 1;
|
var m = date.getMonth() + 1
|
||||||
m = m < 10 ? "0" + m : m;
|
m = m < 10 ? '0' + m : m
|
||||||
var d = date.getDate();
|
var d = date.getDate()
|
||||||
d = d < 10 ? "0" + d : d;
|
d = d < 10 ? '0' + d : d
|
||||||
var h = date.getHours();
|
var h = date.getHours()
|
||||||
h = h < 10 ? "0" + h : h;
|
h = h < 10 ? '0' + h : h
|
||||||
var f = date.getMinutes();
|
var f = date.getMinutes()
|
||||||
f = f < 10 ? "0" + f : f;
|
f = f < 10 ? '0' + f : f
|
||||||
var s = date.getSeconds();
|
var s = date.getSeconds()
|
||||||
s = s < 10 ? "0" + s : s;
|
s = s < 10 ? '0' + s : s
|
||||||
this.formData.searchBeginTime = y + "-" + m + "-" + d;
|
this.formData.searchBeginTime = y + '-' + m + '-' + d
|
||||||
timearr.push(this.formData.startTime);
|
timearr.push(this.formData.startTime)
|
||||||
var date = new Date(dateData2);
|
var date = new Date(dateData2)
|
||||||
var y = date.getFullYear();
|
var y = date.getFullYear()
|
||||||
var m = date.getMonth() + 1;
|
var m = date.getMonth() + 1
|
||||||
m = m < 10 ? "0" + m : m;
|
m = m < 10 ? '0' + m : m
|
||||||
var d = date.getDate();
|
var d = date.getDate()
|
||||||
d = d < 10 ? "0" + d : d;
|
d = d < 10 ? '0' + d : d
|
||||||
var h = date.getHours();
|
var h = date.getHours()
|
||||||
h = h < 10 ? "0" + h : h;
|
h = h < 10 ? '0' + h : h
|
||||||
var f = date.getMinutes();
|
var f = date.getMinutes()
|
||||||
f = f < 10 ? "0" + f : f;
|
f = f < 10 ? '0' + f : f
|
||||||
var s = date.getSeconds();
|
var s = date.getSeconds()
|
||||||
s = s < 10 ? "0" + s : s;
|
s = s < 10 ? '0' + s : s
|
||||||
this.formData.searchEndTime = y + "-" + m + "-" + d;
|
this.formData.searchEndTime = y + '-' + m + '-' + d
|
||||||
timearr.push(this.formData.endTime);
|
timearr.push(this.formData.endTime)
|
||||||
return timearr;
|
return timearr
|
||||||
},
|
},
|
||||||
//部门绑定区域触发区域树节点
|
//部门绑定区域触发区域树节点
|
||||||
handleNodeClick(data, node) {
|
handleNodeClick(data, node) {
|
||||||
|
this.deptName = data.name
|
||||||
this.deptName = data.name;
|
this.$refs.select1.blur()
|
||||||
this.$refs.select1.blur();
|
this.deptId = data.id
|
||||||
this.deptId = data.id;
|
this.formData.deptIndex = data.id
|
||||||
this.formData.deptIndex = data.id;
|
|
||||||
},
|
},
|
||||||
formatDate(date) {
|
formatDate(date) {
|
||||||
|
date = new Date(Date.parse(date.replace(/-/g, '/'))) //转换成Data();
|
||||||
|
|
||||||
|
var y = date.getFullYear()
|
||||||
|
|
||||||
date = new Date(Date.parse(date.replace(/-/g, "/"))); //转换成Data();
|
var m = date.getMonth() + 1
|
||||||
|
m = m < 10 ? '0' + m : m
|
||||||
var y = date.getFullYear();
|
var d = date.getDate()
|
||||||
|
d = d < 10 ? '0' + d : d
|
||||||
var m = date.getMonth() + 1;
|
return y + '-' + m + '-' + d
|
||||||
m = m < 10 ? "0" + m : m;
|
|
||||||
var d = date.getDate();
|
|
||||||
d = d < 10 ? "0" + d : d;
|
|
||||||
return y + "-" + m + "-" + d;
|
|
||||||
},
|
},
|
||||||
//2次组件触发事件
|
//2次组件触发事件
|
||||||
|
|
||||||
querfromdata(data, timehbValue, interval) {
|
querfromdata(data, timehbValue, interval) {
|
||||||
this.interval = interval;
|
this.interval = interval
|
||||||
this.loading = true;
|
this.loading = true
|
||||||
if(this.$refs.fdf.intervald==3){
|
// if (this.$refs.fdf.intervald == 3) {
|
||||||
let timedate = this.$refs.fdf.timeValue[1]
|
// let timedate = this.$refs.fdf.timeValue[1]
|
||||||
let timedate1 = timedate.split('-')
|
// let timedate1 = timedate.split('-')
|
||||||
if(timedate1[2]=='01' || timedate1[2]=='02' || timedate1[2]=='03' ){
|
// if (timedate1[2] == '01' || timedate1[2] == '02' || timedate1[2] == '03') {
|
||||||
let strTime = this.$refs.fdf.timeValue[0]
|
// let strTime = this.$refs.fdf.timeValue[0]
|
||||||
let strTime1 = this.$refs.fdf.timeValue[1]
|
// let strTime1 = this.$refs.fdf.timeValue[1]
|
||||||
let str1 = strTime.split('-')
|
// let str1 = strTime.split('-')
|
||||||
let str2 = strTime1.split('-')
|
// let str2 = strTime1.split('-')
|
||||||
var now = new Date()
|
// var now = new Date()
|
||||||
let month = now.getMonth()
|
// let month = now.getMonth()
|
||||||
if (month == 0) {
|
// if (month == 0) {
|
||||||
month = 12
|
// month = 12
|
||||||
str1[0] = str1[0] - 1
|
// str1[0] = str1[0] - 1
|
||||||
str2[0] = str2[0] - 1
|
// str2[0] = str2[0] - 1
|
||||||
}
|
// }
|
||||||
if (month < 10) {
|
// if (month < 10) {
|
||||||
month = '0' + month
|
// month = '0' + month
|
||||||
}
|
// }
|
||||||
this.formData.searchBeginTime = str1[0] + '-' + month + '-' + str1[2]
|
// 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 + '-' + new Date(str2[0], month, 0).getDate()
|
||||||
this.formData.searchEndTime = str2[0]+'-'+month+'-31'
|
// // if(month==1 || month==3 || month==5 || month==7 || month==8 || month==10 || month==12){
|
||||||
}else{
|
// // this.formData.searchEndTime = str2[0]+'-'+month+'-31'
|
||||||
this.formData.searchEndTime = str2[0]+'-'+month+'-30'
|
// // }else{
|
||||||
}
|
// // this.formData.searchEndTime = str2[0]+'-'+month+'-30'
|
||||||
}else{
|
// // }
|
||||||
|
// } else {
|
||||||
|
// this.formData.searchBeginTime = this.$refs.fdf.timeValue[0]
|
||||||
|
// this.formData.searchEndTime = this.$refs.fdf.timeValue[1]
|
||||||
|
// }
|
||||||
|
// } else if (this.$refs.fdf.intervald == 4) {
|
||||||
|
// let timedate = this.$refs.fdf.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.fdf.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.fdf.timeValue[0]
|
||||||
|
// this.formData.searchEndTime = this.$refs.fdf.timeValue[1]
|
||||||
|
// }
|
||||||
|
// } else if (this.$refs.fdf.intervald == 5) {
|
||||||
|
// let timedate = this.$refs.fdf.timeValue[1]
|
||||||
|
// let timedate1 = timedate.split('-')
|
||||||
|
// if (timedate1[2] == '01' || timedate1[2] == '02' || timedate1[2] == '03') {
|
||||||
|
// let strTime = this.$refs.fdf.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.fdf.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.fdf.timeValue[0]
|
||||||
|
// this.formData.searchEndTime = this.$refs.fdf.timeValue[1]
|
||||||
|
// }
|
||||||
|
|
||||||
|
// //let estr = this.$refs.fff.timeValue[1]
|
||||||
|
// } else {
|
||||||
|
// this.formData.searchBeginTime = this.$refs.fdf.timeValue[0]
|
||||||
|
// this.formData.searchEndTime = this.$refs.fdf.timeValue[1]
|
||||||
|
// }
|
||||||
this.formData.searchBeginTime = this.$refs.fdf.timeValue[0]
|
this.formData.searchBeginTime = this.$refs.fdf.timeValue[0]
|
||||||
this.formData.searchEndTime = this.$refs.fdf.timeValue[1]
|
this.formData.searchEndTime = this.$refs.fdf.timeValue[1]
|
||||||
}
|
|
||||||
}else if(this.$refs.fdf.intervald==4){
|
|
||||||
let timedate = this.$refs.fdf.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.fdf.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.fdf.timeValue[0]
|
|
||||||
this.formData.searchEndTime = this.$refs.fdf.timeValue[1]
|
|
||||||
}
|
|
||||||
}else if(this.$refs.fdf.intervald==5){
|
|
||||||
let timedate = this.$refs.fdf.timeValue[1]
|
|
||||||
let timedate1 = timedate.split('-')
|
|
||||||
if(timedate1[2]=='01' || timedate1[2]=='02' || timedate1[2]=='03' ){
|
|
||||||
let strTime = this.$refs.fdf.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.fdf.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.fdf.timeValue[0]
|
|
||||||
this.formData.searchEndTime = this.$refs.fdf.timeValue[1]
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//let estr = this.$refs.fff.timeValue[1]
|
|
||||||
}else{
|
|
||||||
this.formData.searchBeginTime = this.$refs.fdf.timeValue[0]
|
|
||||||
this.formData.searchEndTime = this.$refs.fdf.timeValue[1]
|
|
||||||
}
|
|
||||||
|
|
||||||
// this.timeValue = data;
|
// this.timeValue = data;
|
||||||
// this.timehuanbiValue = timehbValue;
|
// this.timehuanbiValue = timehbValue;
|
||||||
// this.periodBeginTime = this.timehuanbiValue[0];
|
// this.periodBeginTime = this.timehuanbiValue[0];
|
||||||
@@ -483,28 +463,28 @@ export default {
|
|||||||
// this.dateFormat(this.timeValue[0], this.timeValue[1]);
|
// this.dateFormat(this.timeValue[0], this.timeValue[1]);
|
||||||
// this.time =
|
// this.time =
|
||||||
// this.formData.searchBeginTime + "至" + this.formData.searchEndTime;
|
// this.formData.searchBeginTime + "至" + this.formData.searchEndTime;
|
||||||
api.integrityData(this.formData).then((res) => {
|
api.integrityData(this.formData).then(res => {
|
||||||
if (res.code == "A0000") {
|
if (res.code == 'A0000') {
|
||||||
if (res.data.length == 0) {
|
if (res.data.length == 0) {
|
||||||
this.tableData = [];
|
this.tableData = []
|
||||||
} else {
|
} else {
|
||||||
res.data.forEach((m) => {
|
res.data.forEach(m => {
|
||||||
m.id = this.guid();
|
m.id = this.guid()
|
||||||
m.children.forEach((n) => {
|
m.children.forEach(n => {
|
||||||
n.id = this.guid();
|
n.id = this.guid()
|
||||||
n.children.forEach((d) => {
|
n.children.forEach(d => {
|
||||||
d.id = this.guid();
|
d.id = this.guid()
|
||||||
d.children.forEach((p) => {
|
d.children.forEach(p => {
|
||||||
p.id = this.guid();
|
p.id = this.guid()
|
||||||
});
|
})
|
||||||
});
|
})
|
||||||
});
|
})
|
||||||
});
|
})
|
||||||
this.tableData = res.data;
|
this.tableData = res.data
|
||||||
this.loading = false;
|
this.loading = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
var data = {
|
var data = {
|
||||||
deptIndex: this.formData.deptIndex,
|
deptIndex: this.formData.deptIndex,
|
||||||
loadType: this.formData.loadType,
|
loadType: this.formData.loadType,
|
||||||
@@ -516,173 +496,169 @@ export default {
|
|||||||
scale: this.formData.scale,
|
scale: this.formData.scale,
|
||||||
powerFlag: 2,
|
powerFlag: 2,
|
||||||
periodBeginTime: this.periodBeginTime,
|
periodBeginTime: this.periodBeginTime,
|
||||||
periodEndTime: this.periodEndTime,
|
periodEndTime: this.periodEndTime
|
||||||
};
|
}
|
||||||
api.IntegrityIcon(data).then((res) => {
|
api.IntegrityIcon(data).then(res => {
|
||||||
this.eacjartflag = true;
|
this.eacjartflag = true
|
||||||
if (res.code == "A0000") {
|
if (res.code == 'A0000') {
|
||||||
if(res.data.length==0){
|
if (res.data.length == 0) {
|
||||||
this.xdata =[]
|
this.xdata = []
|
||||||
this.ydata =[]
|
this.ydata = []
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.child.dataintegrity();
|
this.$refs.child.dataintegrity()
|
||||||
});
|
|
||||||
this.loading = false;
|
|
||||||
|
|
||||||
}else{
|
|
||||||
var data = res.data
|
|
||||||
data.sort((a,b) => {
|
|
||||||
return a.type > b.type ? 1 : -1;
|
|
||||||
})
|
})
|
||||||
this.xdata =[]
|
this.loading = false
|
||||||
this.ydata =[]
|
} else {
|
||||||
for(var i=0;i<data.length;i++){
|
var data = res.data
|
||||||
|
data.sort((a, b) => {
|
||||||
|
return a.type > b.type ? 1 : -1
|
||||||
|
})
|
||||||
|
this.xdata = []
|
||||||
|
this.ydata = []
|
||||||
|
for (var i = 0; i < data.length; i++) {
|
||||||
this.xdata.push(data[i].type)
|
this.xdata.push(data[i].type)
|
||||||
if(data[i].single==3.14159){
|
if (data[i].single == 3.14159) {
|
||||||
this.ydata.push((data[i].single))
|
this.ydata.push(data[i].single)
|
||||||
}else{
|
} else {
|
||||||
this.ydata.push((data[i].single).toFixed(2))
|
this.ydata.push(data[i].single.toFixed(2))
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.child.dataintegrity();
|
this.$refs.child.dataintegrity()
|
||||||
});
|
})
|
||||||
this.loading = false;
|
this.loading = false
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
})
|
||||||
});
|
|
||||||
},
|
},
|
||||||
//标签切换
|
//标签切换
|
||||||
handleClick(tab, event) {
|
handleClick(tab, event) {
|
||||||
this.tablename = tab.name;
|
this.tablename = tab.name
|
||||||
this.activeName = tab.name;
|
this.activeName = tab.name
|
||||||
if (tab.name == "tab1") {
|
if (tab.name == 'tab1') {
|
||||||
this.thb = false;
|
this.thb = false
|
||||||
this.eacjartflag = false;
|
this.eacjartflag = false
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.child.dataintegrity();
|
this.$refs.child.dataintegrity()
|
||||||
});
|
})
|
||||||
} else if (tab.name == "tab2") {
|
} else if (tab.name == 'tab2') {
|
||||||
this.thb = true;
|
this.thb = true
|
||||||
this.eacjartflag = true;
|
this.eacjartflag = true
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.child.dataintegrity();
|
this.$refs.child.dataintegrity()
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//开关触发
|
//开关触发
|
||||||
handleStatusChange(val) {
|
handleStatusChange(val) {
|
||||||
this.formData.monitorFlag = val;
|
this.formData.monitorFlag = val
|
||||||
//this.fiveTreeData()
|
//this.fiveTreeData()
|
||||||
},
|
},
|
||||||
//获取区域
|
//获取区域
|
||||||
getAreaDept() {
|
getAreaDept() {
|
||||||
api.getAreaDept().then((res) => {
|
api.getAreaDept().then(res => {
|
||||||
if (res.code == "A0000") {
|
if (res.code == 'A0000') {
|
||||||
var data = res.data;
|
var data = res.data
|
||||||
data.forEach((element) => {
|
data.forEach(element => {
|
||||||
this.idArr.push(element.id);
|
this.idArr.push(element.id)
|
||||||
});
|
})
|
||||||
this.treeData = data;
|
this.treeData = data
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
//字典获取数据电压等级
|
//字典获取数据电压等级
|
||||||
getVoltage() {
|
getVoltage() {
|
||||||
// debugger
|
// debugger
|
||||||
var code = "Dev_Voltage_Stand";
|
var code = 'Dev_Voltage_Stand'
|
||||||
this.voltageleveloption = dicData(code, []);
|
this.voltageleveloption = dicData(code, [])
|
||||||
this.formData.scale = this.voltageleveloption;
|
this.formData.scale = this.voltageleveloption
|
||||||
},
|
},
|
||||||
//字典获取数据终端厂家
|
//字典获取数据终端厂家
|
||||||
getManufacturer() {
|
getManufacturer() {
|
||||||
//debugger
|
//debugger
|
||||||
var code = "Dev_Manufacturers";
|
var code = 'Dev_Manufacturers'
|
||||||
this.terminaloption = dicData(code, []);
|
this.terminaloption = dicData(code, [])
|
||||||
this.formData.manufacturer = this.terminaloption;
|
this.formData.manufacturer = this.terminaloption
|
||||||
},
|
},
|
||||||
//字典获取数据干扰源类型
|
//字典获取数据干扰源类型
|
||||||
getLoadType() {
|
getLoadType() {
|
||||||
//debugger
|
//debugger
|
||||||
var code = "Interference_Source";
|
var code = 'Interference_Source'
|
||||||
this.interfereoption = dicData(code, []);
|
this.interfereoption = dicData(code, [])
|
||||||
this.formData.loadType = this.interfereoption;
|
this.formData.loadType = this.interfereoption
|
||||||
},
|
},
|
||||||
//获取统计类型
|
//获取统计类型
|
||||||
getclassificationData() {
|
getclassificationData() {
|
||||||
//debugger
|
//debugger
|
||||||
var code = "Statistical_Type";
|
var code = 'Statistical_Type'
|
||||||
this.classificationData = dicData(code, ["Report_Type",'Load_Type']);
|
this.classificationData = dicData(code, ['Report_Type', 'Load_Type'])
|
||||||
this.formData.statisticalType = this.classificationData[0];
|
this.formData.statisticalType = this.classificationData[0]
|
||||||
},
|
},
|
||||||
|
|
||||||
//获取数据完整性列表数据
|
//获取数据完整性列表数据
|
||||||
getQueryData() {
|
getQueryData() {
|
||||||
var data = {
|
var data = {
|
||||||
area: "0",
|
area: '0',
|
||||||
comparison: 0,
|
comparison: 0,
|
||||||
interference: [],
|
interference: [],
|
||||||
manufacturer: [],
|
manufacturer: [],
|
||||||
searchBeginTime: "",
|
searchBeginTime: '',
|
||||||
searchEndTime: "",
|
searchEndTime: '',
|
||||||
statisticalType: 0,
|
statisticalType: 0,
|
||||||
voltageLevel: [],
|
voltageLevel: []
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
guid() {
|
guid() {
|
||||||
return "xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g, function (c) {
|
return 'xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
|
||||||
var r = (Math.random() * 16) | 0,
|
var r = (Math.random() * 16) | 0,
|
||||||
v = c === "x" ? r : (r & 0x3) | 0x8;
|
v = c === 'x' ? r : (r & 0x3) | 0x8
|
||||||
return v.toString(16);
|
return v.toString(16)
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
//导出文件
|
//导出文件
|
||||||
exportExcel() {
|
exportExcel() {
|
||||||
api.getExportIntegrityData(this.formData).then((res) => {
|
api.getExportIntegrityData(this.formData).then(res => {
|
||||||
if (res.code == "A0000") {
|
if (res.code == 'A0000') {
|
||||||
var path = res.data;
|
var path = res.data
|
||||||
//window.location.href=('/api/harmonic-boot/integrity/exportIntegrityDataExcel?filePath='+path)
|
//window.location.href=('/api/harmonic-boot/integrity/exportIntegrityDataExcel?filePath='+path)
|
||||||
this.getpath(path);
|
this.getpath(path)
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
getpath(path) {
|
getpath(path) {
|
||||||
var fileName = path.substring(path.lastIndexOf("/") + 1, path.length); //获取文件名
|
var fileName = path.substring(path.lastIndexOf('/') + 1, path.length) //获取文件名
|
||||||
api.getExportIntegrityDataExcel(path).then((res) => {
|
api.getExportIntegrityDataExcel(path).then(res => {
|
||||||
var blob = new Blob([res], {
|
var blob = new Blob([res], {
|
||||||
type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
|
||||||
}); //response是返回的数据对象
|
}) //response是返回的数据对象
|
||||||
var downloadElement = document.createElement("a");
|
var downloadElement = document.createElement('a')
|
||||||
var href = window.URL.createObjectURL(blob); //创建下载的链接
|
var href = window.URL.createObjectURL(blob) //创建下载的链接
|
||||||
downloadElement.href = href;
|
downloadElement.href = href
|
||||||
downloadElement.setAttribute("download", fileName);
|
downloadElement.setAttribute('download', fileName)
|
||||||
document.body.appendChild(downloadElement);
|
document.body.appendChild(downloadElement)
|
||||||
downloadElement.click(); //点击下载
|
downloadElement.click() //点击下载
|
||||||
document.body.removeChild(downloadElement); //下载完成移除元素
|
document.body.removeChild(downloadElement) //下载完成移除元素
|
||||||
window.URL.revokeObjectURL(href); //释放掉blob对象
|
window.URL.revokeObjectURL(href) //释放掉blob对象
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
rest() {
|
rest() {
|
||||||
this.deptName = "全国";
|
this.deptName = '全国'
|
||||||
this.formData = {
|
this.formData = {
|
||||||
deptIndex: "",
|
deptIndex: '',
|
||||||
monitorFlag: 2,
|
monitorFlag: 2,
|
||||||
loadType: null,
|
loadType: null,
|
||||||
manufacturer: null,
|
manufacturer: null,
|
||||||
searchBeginTime: "",
|
searchBeginTime: '',
|
||||||
searchEndTime: "",
|
searchEndTime: '',
|
||||||
statisticalType: "",
|
statisticalType: '',
|
||||||
scale: null,
|
scale: null
|
||||||
};
|
}
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
};
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
@import url("../../../styles/common.less");
|
@import url('../../../styles/common.less');
|
||||||
.main {
|
.main {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -614,118 +614,120 @@ export default {
|
|||||||
this.interval = interval;
|
this.interval = interval;
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.timeValue = data;
|
this.timeValue = data;
|
||||||
if(this.$refs.fhf.intervald==3){
|
// if(this.$refs.fhf.intervald==3){
|
||||||
let timedate = this.$refs.fhf.timeValue[1]
|
// let timedate = this.$refs.fhf.timeValue[1]
|
||||||
let timedate1 = timedate.split('-')
|
// let timedate1 = timedate.split('-')
|
||||||
if(timedate1[2]=='01' || timedate1[2]=='02' || timedate1[2]=='03'){
|
// if(timedate1[2]=='01' || timedate1[2]=='02' || timedate1[2]=='03'){
|
||||||
let strTime = this.$refs.fhf.timeValue[0]
|
// let strTime = this.$refs.fhf.timeValue[0]
|
||||||
let strTime1 = this.$refs.fhf.timeValue[1]
|
// let strTime1 = this.$refs.fhf.timeValue[1]
|
||||||
let str1 = strTime.split('-')
|
// let str1 = strTime.split('-')
|
||||||
let str2 = strTime1.split('-')
|
// let str2 = strTime1.split('-')
|
||||||
var now = new Date()
|
// var now = new Date()
|
||||||
let month = now.getMonth()
|
// let month = now.getMonth()
|
||||||
if (month == 0) {
|
// if (month == 0) {
|
||||||
month = 12
|
// month = 12
|
||||||
str1[0] = str1[0] - 1
|
// str1[0] = str1[0] - 1
|
||||||
str2[0] = str2[0] - 1
|
// str2[0] = str2[0] - 1
|
||||||
}
|
// }
|
||||||
if (month < 10) {
|
// if (month < 10) {
|
||||||
month = '0' + month
|
// month = '0' + month
|
||||||
}
|
// }
|
||||||
this.formData.searchBeginTime = str1[0] + '-' + month + '-' + str1[2]
|
// 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 + '-' + new Date(str2[0], month, 0).getDate()
|
||||||
this.formData.searchEndTime = str2[0]+'-'+month+'-31'
|
// // if(month==1 || month==3 || month==5 || month==7 || month==8 || month==10 || month==12){
|
||||||
}else{
|
// // this.formData.searchEndTime = str2[0]+'-'+month+'-31'
|
||||||
this.formData.searchEndTime = str2[0]+'-'+month+'-30'
|
// // }else{
|
||||||
}
|
// // this.formData.searchEndTime = str2[0]+'-'+month+'-30'
|
||||||
}else{
|
// // }
|
||||||
|
// }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.searchBeginTime = this.$refs.fhf.timeValue[0]
|
||||||
this.formData.searchEndTime = this.$refs.fhf.timeValue[1]
|
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.pageSize = this.pageData.pageSize;
|
||||||
this.formData.pageNum = this.pageData.pageNum;
|
this.formData.pageNum = this.pageData.pageNum;
|
||||||
api2.lineOverLimit(this.formData).then((res) => {
|
api2.lineOverLimit(this.formData).then((res) => {
|
||||||
|
|||||||
@@ -657,113 +657,114 @@ export default {
|
|||||||
this.tableData = []
|
this.tableData = []
|
||||||
this.timeValue = data
|
this.timeValue = data
|
||||||
//this.dateFormat(this.timeValue[0], this.timeValue[1]);
|
//this.dateFormat(this.timeValue[0], this.timeValue[1]);
|
||||||
if (this.$refs.fkf.intervald == 3) {
|
// if (this.$refs.fkf.intervald == 3) {
|
||||||
let timedate = this.$refs.fkf.timeValue[1]
|
// let timedate = this.$refs.fkf.timeValue[1]
|
||||||
let timedate1 = timedate.split('-')
|
// let timedate1 = timedate.split('-')
|
||||||
if (timedate1[2] == '01' || timedate1[2] == '02' || timedate1[2] == '03') {
|
// if (timedate1[2] == '01' || timedate1[2] == '02' || timedate1[2] == '03') {
|
||||||
let strTime = this.$refs.fkf.timeValue[0]
|
// let strTime = this.$refs.fkf.timeValue[0]
|
||||||
let strTime1 = this.$refs.fkf.timeValue[1]
|
// let strTime1 = this.$refs.fkf.timeValue[1]
|
||||||
let str1 = strTime.split('-')
|
// let str1 = strTime.split('-')
|
||||||
let str2 = strTime1.split('-')
|
// let str2 = strTime1.split('-')
|
||||||
var now = new Date()
|
// var now = new Date()
|
||||||
let month = now.getMonth()
|
// let month = now.getMonth()
|
||||||
if (month == 0) {
|
// if (month == 0) {
|
||||||
month = 12
|
// month = 12
|
||||||
str1[0] = str1[0] - 1
|
// str1[0] = str1[0] - 1
|
||||||
str2[0] = str2[0] - 1
|
// str2[0] = str2[0] - 1
|
||||||
}
|
// }
|
||||||
if (month < 10) {
|
// if (month < 10) {
|
||||||
month = '0' + month
|
// month = '0' + month
|
||||||
}
|
// }
|
||||||
this.formData.searchBeginTime = str1[0] + '-' + month + '-' + str1[2]
|
// 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 {
|
// } 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)
|
||||||
|
|
||||||
|
// // 向前推一天
|
||||||
|
// 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)
|
||||||
|
|
||||||
|
// // 向前推一天
|
||||||
|
// 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]
|
||||||
|
// }
|
||||||
|
|
||||||
|
// //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.searchBeginTime = this.$refs.fkf.timeValue[0]
|
||||||
this.formData.searchEndTime = this.$refs.fkf.timeValue[1]
|
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)
|
|
||||||
|
|
||||||
// 向前推一天
|
|
||||||
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)
|
|
||||||
|
|
||||||
// 向前推一天
|
|
||||||
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]
|
|
||||||
}
|
|
||||||
|
|
||||||
//let estr = this.$refs.fff.timeValue[1]
|
|
||||||
} else {
|
|
||||||
this.formData.searchBeginTime = this.$refs.fkf.timeValue[0]
|
|
||||||
this.formData.searchEndTime = this.$refs.fkf.timeValue[1]
|
|
||||||
}
|
|
||||||
|
|
||||||
var data = window.sessionStorage.getItem('Info')
|
var data = window.sessionStorage.getItem('Info')
|
||||||
data = eval('(' + data + ')')
|
data = eval('(' + data + ')')
|
||||||
this.formData.deptIndex = data.deptId
|
this.formData.deptIndex = data.deptId
|
||||||
|
|||||||
@@ -891,112 +891,114 @@ export default {
|
|||||||
this.tableData = []
|
this.tableData = []
|
||||||
this.timeValue = data
|
this.timeValue = data
|
||||||
// this.dateFormat(this.timeValue[0], this.timeValue[1]);
|
// this.dateFormat(this.timeValue[0], this.timeValue[1]);
|
||||||
if (this.$refs.fyf.intervald == 3) {
|
// if (this.$refs.fyf.intervald == 3) {
|
||||||
let timedate = this.$refs.fyf.timeValue[1]
|
// let timedate = this.$refs.fyf.timeValue[1]
|
||||||
let timedate1 = timedate.split('-')
|
// let timedate1 = timedate.split('-')
|
||||||
if (timedate1[2] == '01' || timedate1[2] == '02' || timedate1[2] == '03') {
|
// if (timedate1[2] == '01' || timedate1[2] == '02' || timedate1[2] == '03') {
|
||||||
let strTime = this.$refs.fyf.timeValue[0]
|
// let strTime = this.$refs.fyf.timeValue[0]
|
||||||
let strTime1 = this.$refs.fyf.timeValue[1]
|
// let strTime1 = this.$refs.fyf.timeValue[1]
|
||||||
let str1 = strTime.split('-')
|
// let str1 = strTime.split('-')
|
||||||
let str2 = strTime1.split('-')
|
// let str2 = strTime1.split('-')
|
||||||
var now = new Date()
|
// var now = new Date()
|
||||||
let month = now.getMonth()
|
// let month = now.getMonth()
|
||||||
if (month == 0) {
|
// if (month == 0) {
|
||||||
month = 12
|
// month = 12
|
||||||
str1[0] = str1[0] - 1
|
// str1[0] = str1[0] - 1
|
||||||
str2[0] = str2[0] - 1
|
// str2[0] = str2[0] - 1
|
||||||
}
|
// }
|
||||||
if (month < 10) {
|
// if (month < 10) {
|
||||||
month = '0' + month
|
// month = '0' + month
|
||||||
}
|
// }
|
||||||
this.formData.searchBeginTime = str1[0] + '-' + month + '-' + str1[2]
|
// 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 {
|
// } 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)
|
||||||
|
|
||||||
|
// // 向前推一天
|
||||||
|
// 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)
|
||||||
|
|
||||||
|
// // 向前推一天
|
||||||
|
// 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]
|
||||||
|
// }
|
||||||
|
|
||||||
|
// //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.searchBeginTime = this.$refs.fyf.timeValue[0]
|
||||||
this.formData.searchEndTime = this.$refs.fyf.timeValue[1]
|
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)
|
|
||||||
|
|
||||||
// 向前推一天
|
|
||||||
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)
|
|
||||||
|
|
||||||
// 向前推一天
|
|
||||||
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]
|
|
||||||
}
|
|
||||||
|
|
||||||
//let estr = this.$refs.fff.timeValue[1]
|
|
||||||
} else {
|
|
||||||
this.formData.searchBeginTime = this.$refs.fyf.timeValue[0]
|
|
||||||
this.formData.searchEndTime = this.$refs.fyf.timeValue[1]
|
|
||||||
}
|
|
||||||
var data = window.sessionStorage.getItem('Info')
|
var data = window.sessionStorage.getItem('Info')
|
||||||
data = eval('(' + data + ')')
|
data = eval('(' + data + ')')
|
||||||
this.formData.deptIndex = data.deptId
|
this.formData.deptIndex = data.deptId
|
||||||
|
|||||||
@@ -1,13 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-loading="loading"
|
<div v-loading="loading" element-loading-text="数据加载中">
|
||||||
element-loading-text="数据加载中">
|
|
||||||
<el-form :inline="true" :model="formInline" class="demo-form-inline">
|
<el-form :inline="true" :model="formInline" class="demo-form-inline">
|
||||||
<el-form-item label="类型:" style="display:none">
|
<el-form-item label="类型:" style="display: none">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="formData.statisticalType"
|
v-model="formData.statisticalType"
|
||||||
@change="changeclasss"
|
@change="changeclasss"
|
||||||
placeholder="请选择统计类型"
|
placeholder="请选择统计类型"
|
||||||
style="width:100%"
|
style="width: 100%"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in classificationData"
|
v-for="item in classificationData"
|
||||||
@@ -19,19 +18,13 @@
|
|||||||
name: item.name,
|
name: item.name,
|
||||||
id: item.id,
|
id: item.id,
|
||||||
code: item.code,
|
code: item.code,
|
||||||
sort: item.sort,
|
sort: item.sort
|
||||||
}"
|
}"
|
||||||
>
|
></el-option>
|
||||||
</el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="区域:" >
|
<el-form-item label="区域:">
|
||||||
<el-select
|
<el-select ref="selectTree1" v-model="deptName" placeholder="请选择所属部门区域" style="width: 100%">
|
||||||
ref="selectTree1"
|
|
||||||
v-model="deptName"
|
|
||||||
placeholder="请选择所属部门区域"
|
|
||||||
style="width: 100%"
|
|
||||||
>
|
|
||||||
<el-option :value="deptIndex" style="height: auto">
|
<el-option :value="deptIndex" style="height: auto">
|
||||||
<el-tree
|
<el-tree
|
||||||
ref="tree"
|
ref="tree"
|
||||||
@@ -50,7 +43,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="厂家:" >
|
<el-form-item label="厂家:">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="formData.manufacturer"
|
v-model="formData.manufacturer"
|
||||||
multiple
|
multiple
|
||||||
@@ -68,10 +61,9 @@
|
|||||||
code: item.code,
|
code: item.code,
|
||||||
name: item.name,
|
name: item.name,
|
||||||
id: item.id,
|
id: item.id,
|
||||||
sort: item.sort,
|
sort: item.sort
|
||||||
}"
|
}"
|
||||||
>
|
></el-option>
|
||||||
</el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="干扰源:" style="display: none">
|
<el-form-item label="干扰源:" style="display: none">
|
||||||
@@ -92,13 +84,12 @@
|
|||||||
code: item.code,
|
code: item.code,
|
||||||
name: item.name,
|
name: item.name,
|
||||||
id: item.id,
|
id: item.id,
|
||||||
sort: item.sort,
|
sort: item.sort
|
||||||
}"
|
}"
|
||||||
>
|
></el-option>
|
||||||
</el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="通讯状态:" >
|
<el-form-item label="通讯状态:">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="formData.comFlag"
|
v-model="formData.comFlag"
|
||||||
multiple
|
multiple
|
||||||
@@ -111,11 +102,10 @@
|
|||||||
:key="item.value"
|
:key="item.value"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value"
|
:value="item.value"
|
||||||
>
|
></el-option>
|
||||||
</el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="终端状态:" >
|
<el-form-item label="终端状态:">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="formData.runFlag"
|
v-model="formData.runFlag"
|
||||||
multiple
|
multiple
|
||||||
@@ -128,50 +118,45 @@
|
|||||||
:key="item.value"
|
:key="item.value"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value"
|
:value="item.value"
|
||||||
>
|
></el-option>
|
||||||
</el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item >
|
<el-form-item>
|
||||||
<el-button
|
<el-button type="primary" size="small" icon="el-icon-search" @click="queryDataInfo">查询</el-button>
|
||||||
type="primary"
|
|
||||||
size="small"
|
|
||||||
icon="el-icon-search"
|
|
||||||
@click="queryDataInfo"
|
|
||||||
>查询</el-button
|
|
||||||
>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item style="float: right;">
|
<el-form-item style="float: right">
|
||||||
<span>在线率≦60% <span style="color:red;font-weight: bold;">差   </span> 60%<在线率≦90% <span style="color:rgb(255, 174, 0);font-weight: bold;">良   </span> 90%≦在线率 <span style="color:green;font-weight: bold;">优</span> </span>
|
<span>
|
||||||
|
在线率≦60%
|
||||||
|
<span style="color: red; font-weight: bold">差   </span>
|
||||||
|
60%<在线率≦90%
|
||||||
|
<span style="color: rgb(255, 174, 0); font-weight: bold">良   </span>
|
||||||
|
90%≦在线率
|
||||||
|
<span style="color: green; font-weight: bold">优</span>
|
||||||
|
</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-row :gutter="20" style="margin-top: 0%">
|
<el-row :gutter="20" style="margin-top: 0%">
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<terminalmessagetable
|
<terminalmessagetable :tableData="tableData" :classvalue="classt"></terminalmessagetable>
|
||||||
:tableData="tableData"
|
|
||||||
:classvalue="classt"
|
|
||||||
|
|
||||||
></terminalmessagetable>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getappheight, getheight } from "@/assets/commjs/common";
|
import { getappheight, getheight } from '@/assets/commjs/common'
|
||||||
import { guanzhou } from "@/assets/commjs/token";
|
import { guanzhou } from '@/assets/commjs/token'
|
||||||
import api1 from "@/api/pollution/pollution";
|
import api1 from '@/api/pollution/pollution'
|
||||||
import timepicker from "@/views/cgy-components/TimePicker/index4";
|
import timepicker from '@/views/cgy-components/TimePicker/index4'
|
||||||
import { dicData } from "../../../assets/commjs/dictypeData";
|
import { dicData } from '../../../assets/commjs/dictypeData'
|
||||||
import api from "../../../api/integraliy/integraliy";
|
import api from '../../../api/integraliy/integraliy'
|
||||||
import Table from "../../components/teble/index";
|
import Table from '../../components/teble/index'
|
||||||
import Pagination from "../../components/pagination/index";
|
import Pagination from '../../components/pagination/index'
|
||||||
import terminalmessagetable from "@/views/cgy-components/terminalmessagetable";
|
import terminalmessagetable from '@/views/cgy-components/terminalmessagetable'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
timepicker,
|
timepicker,
|
||||||
terminalmessagetable,
|
terminalmessagetable
|
||||||
// onlinerateechart
|
// onlinerateechart
|
||||||
},
|
},
|
||||||
watch: {},
|
watch: {},
|
||||||
@@ -180,54 +165,52 @@ export default {
|
|||||||
return {
|
return {
|
||||||
formInline: {},
|
formInline: {},
|
||||||
loading: false,
|
loading: false,
|
||||||
classt: "Power_Network",
|
classt: 'Power_Network',
|
||||||
asideheight: undefined,
|
asideheight: undefined,
|
||||||
id: 1,
|
id: 1,
|
||||||
copent: 0,
|
copent: 0,
|
||||||
title: "电网拓扑",
|
title: '电网拓扑',
|
||||||
xdata: [
|
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,
|
|
||||||
],
|
],
|
||||||
|
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,
|
classvalue: 0,
|
||||||
activeName: "tab1",
|
activeName: 'tab1',
|
||||||
panindexOptions: [],
|
panindexOptions: [],
|
||||||
formData: {
|
formData: {
|
||||||
//后面需要修改
|
//后面需要修改
|
||||||
serverName: "harmonic-boot",
|
serverName: 'harmonic-boot',
|
||||||
searchBeginTime:'2023-04-01',
|
searchBeginTime: '',
|
||||||
searchEndTime:'2023-04-11',
|
searchEndTime: '',
|
||||||
deptIndex: "",
|
deptIndex: '',
|
||||||
monitorFlag: 2,
|
monitorFlag: 2,
|
||||||
powerFlag: 2,
|
powerFlag: 2,
|
||||||
loadType: [],
|
loadType: [],
|
||||||
manufacturer: [],
|
manufacturer: [],
|
||||||
statisticalType: "",
|
statisticalType: '',
|
||||||
scale: [],
|
scale: [],
|
||||||
comFlag: [0, 1],
|
comFlag: [0, 1],
|
||||||
runFlag: [0, 1, 2],
|
runFlag: [0, 1, 2]
|
||||||
},
|
},
|
||||||
deptId: "",
|
deptId: '',
|
||||||
deptName: "全国",
|
deptName: '全国',
|
||||||
deptIndex: "",
|
deptIndex: '',
|
||||||
treeData: [],
|
treeData: [],
|
||||||
idArr: [],
|
idArr: [],
|
||||||
defaultProps: {
|
defaultProps: {
|
||||||
children: "children",
|
children: 'children',
|
||||||
label: "name",
|
label: 'name'
|
||||||
},
|
},
|
||||||
//统计类型
|
//统计类型
|
||||||
classificationData: [],
|
classificationData: [],
|
||||||
@@ -239,136 +222,171 @@ export default {
|
|||||||
interfereoption: [],
|
interfereoption: [],
|
||||||
//通讯状态
|
//通讯状态
|
||||||
communicationstatus: [
|
communicationstatus: [
|
||||||
{ value: 0, label: "中断" },
|
{ value: 0, label: '中断' },
|
||||||
{ value: 1, label: "正常" },
|
{ value: 1, label: '正常' }
|
||||||
],
|
],
|
||||||
//终端状态
|
//终端状态
|
||||||
terminalstatus: [
|
terminalstatus: [
|
||||||
{ value: 0, label: "投运" },
|
{ value: 0, label: '投运' },
|
||||||
{ value: 1, label: "热备用" },
|
{ value: 1, label: '热备用' },
|
||||||
{ value: 2, label: "停运" },
|
{ value: 2, label: '停运' }
|
||||||
],
|
],
|
||||||
classt: "Power_Network",
|
classt: 'Power_Network',
|
||||||
tableData: [],
|
tableData: []
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
var info = window.sessionStorage.getItem("Info");
|
var info = window.sessionStorage.getItem('Info')
|
||||||
info = eval("(" + info + ")");
|
info = eval('(' + info + ')')
|
||||||
this.formData.deptIndex = info.deptId;
|
this.formData.deptIndex = info.deptId
|
||||||
this.getAreaDept();
|
this.getAreaDept()
|
||||||
this.getclassificationData();
|
this.getclassificationData()
|
||||||
this.getVoltage();
|
this.getVoltage()
|
||||||
this.getManufacturer();
|
this.getManufacturer()
|
||||||
this.getLoadType();
|
this.getLoadType()
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
// this.asideheight = getappheight();
|
// this.asideheight = getappheight();
|
||||||
this.queryDataInfo();
|
this.queryDataInfo()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
guanzhou() {
|
guanzhou() {
|
||||||
var data = {
|
var data = {
|
||||||
token: this.$route.query.token,
|
token: this.$route.query.token
|
||||||
};
|
|
||||||
api1.guanzhou(data).then((res) => {
|
|
||||||
if (res.code == "A0000") {
|
|
||||||
return;
|
|
||||||
} else {
|
|
||||||
this.$router.push("/error/massege/403");
|
|
||||||
}
|
}
|
||||||
});
|
api1.guanzhou(data).then(res => {
|
||||||
|
if (res.code == 'A0000') {
|
||||||
|
return
|
||||||
|
} else {
|
||||||
|
this.$router.push('/error/massege/403')
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
//切换统计类型
|
//切换统计类型
|
||||||
changeclasss(val) {
|
changeclasss(val) {
|
||||||
this.classt = val.code;
|
this.classt = val.code
|
||||||
},
|
},
|
||||||
//部门绑定区域触发区域树节点
|
//部门绑定区域触发区域树节点
|
||||||
handleNodeClick(data, node) {
|
handleNodeClick(data, node) {
|
||||||
this.deptName = data.name;
|
this.deptName = data.name
|
||||||
this.$refs.selectTree1.blur();
|
this.$refs.selectTree1.blur()
|
||||||
this.deptId = data.id;
|
this.deptId = data.id
|
||||||
this.formData.deptIndex = data.id;
|
this.formData.deptIndex = data.id
|
||||||
},
|
},
|
||||||
//2次组件触发事件
|
//2次组件触发事件
|
||||||
querfromdata(data) {
|
querfromdata(data) {
|
||||||
this.timeValue = data;
|
this.timeValue = data
|
||||||
// alert("父组件条件查询触发方法" + this.timeValue);
|
// alert("父组件条件查询触发方法" + this.timeValue);
|
||||||
},
|
},
|
||||||
handleClick(tab, event) {
|
handleClick(tab, event) {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.child.onlinerateechart();
|
this.$refs.child.onlinerateechart()
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
changePageNum(data) {
|
changePageNum(data) {
|
||||||
this.pageData.pageNum = data;
|
this.pageData.pageNum = data
|
||||||
// alert("父组件当前页" + this.pageData.pageNum);
|
// alert("父组件当前页" + this.pageData.pageNum);
|
||||||
},
|
},
|
||||||
changePageSize(data) {
|
changePageSize(data) {
|
||||||
this.pageData.pageSize = data;
|
this.pageData.pageSize = data
|
||||||
//alert("父组件当前条数" + this.pageData.pageSize);
|
//alert("父组件当前条数" + this.pageData.pageSize);
|
||||||
},
|
},
|
||||||
//查询触发方法
|
//查询触发方法
|
||||||
queryDataInfo() {
|
queryDataInfo() {
|
||||||
this.loading = true;
|
console.log(123, this.getSearchTimeRange())
|
||||||
api.getRuntimeData(this.formData).then((res) => {
|
this.formData.searchBeginTime = this.getSearchTimeRange().searchBeginTime
|
||||||
if (res.code == "A0000") {
|
this.formData.searchEndTime = this.getSearchTimeRange().searchEndTime
|
||||||
|
this.loading = true
|
||||||
|
api.getRuntimeData(this.formData).then(res => {
|
||||||
|
if (res.code == 'A0000') {
|
||||||
if (res.data.length == 0) {
|
if (res.data.length == 0) {
|
||||||
this.tableData = [];
|
this.tableData = []
|
||||||
this.loading = false;
|
this.loading = false
|
||||||
} else {
|
} else {
|
||||||
this.tableData = res.data;
|
this.tableData = res.data
|
||||||
this.loading = false;
|
this.loading = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
//获取区域
|
//获取区域
|
||||||
getAreaDept() {
|
getAreaDept() {
|
||||||
api.getAreaDept().then((res) => {
|
api.getAreaDept().then(res => {
|
||||||
if (res.code == "A0000") {
|
if (res.code == 'A0000') {
|
||||||
var data = res.data;
|
var data = res.data
|
||||||
data.forEach((element) => {
|
data.forEach(element => {
|
||||||
this.idArr.push(element.id);
|
this.idArr.push(element.id)
|
||||||
});
|
})
|
||||||
this.treeData = data;
|
this.treeData = data
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
//字典获取数据电压等级
|
//字典获取数据电压等级
|
||||||
getVoltage() {
|
getVoltage() {
|
||||||
var code = "Dev_Voltage_Stand";
|
var code = 'Dev_Voltage_Stand'
|
||||||
this.voltageleveloption = dicData(code, []);
|
this.voltageleveloption = dicData(code, [])
|
||||||
//this.formData.scale = this.voltageleveloption;
|
//this.formData.scale = this.voltageleveloption;
|
||||||
},
|
},
|
||||||
//字典获取数据终端厂家
|
//字典获取数据终端厂家
|
||||||
getManufacturer() {
|
getManufacturer() {
|
||||||
var code = "Dev_Manufacturers";
|
var code = 'Dev_Manufacturers'
|
||||||
this.terminaloption = dicData(code, []);
|
this.terminaloption = dicData(code, [])
|
||||||
this.formData.manufacturer = this.terminaloption;
|
this.formData.manufacturer = this.terminaloption
|
||||||
},
|
},
|
||||||
//字典获取数据干扰源类型
|
//字典获取数据干扰源类型
|
||||||
getLoadType() {
|
getLoadType() {
|
||||||
var code = "Interference_Source";
|
var code = 'Interference_Source'
|
||||||
this.interfereoption = dicData(code, []);
|
this.interfereoption = dicData(code, [])
|
||||||
this.formData.loadType = this.interfereoption;
|
this.formData.loadType = this.interfereoption
|
||||||
},
|
},
|
||||||
//获取统计类型
|
//获取统计类型
|
||||||
getclassificationData() {
|
getclassificationData() {
|
||||||
var code = "Statistical_Type";
|
var code = 'Statistical_Type'
|
||||||
this.classificationData = dicData(code, [
|
this.classificationData = dicData(code, ['Report_Type', 'Voltage_Level', 'Load_Type', 'Manufacturer'])
|
||||||
"Report_Type",
|
this.formData.statisticalType = this.classificationData[0]
|
||||||
"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}`
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@import url("../../../styles/common.less");
|
@import url('../../../styles/common.less');
|
||||||
|
|
||||||
.main {
|
.main {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
<el-button v-show="buttonShow && thb" @click="tongbiyear" type="primary">同比</el-button>
|
<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="buttonShow && thb" @click="huangbiyear" type="primary">环比</el-button>
|
||||||
<el-button v-show="false" 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-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|||||||
@@ -1100,8 +1100,8 @@ export default {
|
|||||||
voltageLevelArr: [],
|
voltageLevelArr: [],
|
||||||
/**母线类型 */
|
/**母线类型 */
|
||||||
busBarType: [
|
busBarType: [
|
||||||
{ name: '实际母线', value: 0 },
|
{ name: '实际母线', value: 1 },
|
||||||
{ name: '虚拟母线', value: 1 }
|
{ name: '虚拟母线', value: 0 }
|
||||||
],
|
],
|
||||||
/**监测点详情 */
|
/**监测点详情 */
|
||||||
monitorPointDetail: {
|
monitorPointDetail: {
|
||||||
|
|||||||
@@ -1354,7 +1354,8 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
connectMqtt() {
|
async connectMqtt() {
|
||||||
|
|
||||||
let this_ = this
|
let this_ = this
|
||||||
this_.globalMqtt.ws = {};
|
this_.globalMqtt.ws = {};
|
||||||
let mqttWs = null;
|
let mqttWs = null;
|
||||||
@@ -1368,8 +1369,12 @@ export default {
|
|||||||
username: "t_user",
|
username: "t_user",
|
||||||
password: "njcnpqs",
|
password: "njcnpqs",
|
||||||
};
|
};
|
||||||
const url = "ws://192.168.1.24:8085/mqtt";
|
const url = localStorage.getItem('MqttUrl') == 'null'
|
||||||
mqttWs = mqtt.connect(url, options);
|
? '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);
|
this_.globalMqtt.setWs(mqttWs);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -605,7 +605,7 @@ export default {
|
|||||||
/**电压等级选项 */
|
/**电压等级选项 */
|
||||||
voltageLevelArr: [],
|
voltageLevelArr: [],
|
||||||
/**母线类型 */
|
/**母线类型 */
|
||||||
busBarType: [{ name: "实际母线", value: 0 }, { name: "虚拟母线", value: 1 },],
|
busBarType: [{ name: "实际母线", value: 1 }, { name: "虚拟母线", value: 0 },],
|
||||||
/**监测点详情 */
|
/**监测点详情 */
|
||||||
monitorPointDetail: {
|
monitorPointDetail: {
|
||||||
/**行业类型 */
|
/**行业类型 */
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ module.exports = {
|
|||||||
// target: 'http://192.168.120.210:10215', //hsw
|
// target: 'http://192.168.120.210:10215', //hsw
|
||||||
// target: 'http://192.168.1.28:10215', //超高压
|
// target: 'http://192.168.1.28:10215', //超高压
|
||||||
// target: "'https://pqmcn.com:8092/api", //治理
|
// 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.31:10215", // 海南
|
||||||
// target: "http://192.168.1.29:10215", // 冀北
|
// target: "http://192.168.1.29:10215", // 冀北
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user