修改现场问题
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
551
src/App.vue
551
src/App.vue
@@ -1,273 +1,278 @@
|
||||
<template>
|
||||
<div ref="appheight" id="app" class="zindx" :class="themeName">
|
||||
<router-view />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapActions } from 'vuex'
|
||||
import { getThemeColor } from '@/api/user'
|
||||
import { themeColor } from './settings'
|
||||
import '@/assets/font_3482754_22duxhlb6kw/iconfont'
|
||||
|
||||
export default {
|
||||
name: 'app',
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
lastTime: null, //最后一次点击的时间
|
||||
currentTime: null, //当前点击的时间
|
||||
timeOut: 15 * 60 * 1000, //设置超时时间: 15分钟,
|
||||
themecolor: '',
|
||||
appheight: null,
|
||||
appwidth: null,
|
||||
themeName: '',
|
||||
echartTimer: null
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
settings() {
|
||||
return this.$store.state.settings
|
||||
}
|
||||
},
|
||||
created() {
|
||||
if (process.env.VUE_APP_MODE === 'jbqr') {
|
||||
window.addEventListener('message', function (e) {
|
||||
if (e.data.info != undefined) {
|
||||
window.localStorage.setItem('adminInfo', e.data.info)
|
||||
}
|
||||
// window.localStorage.setItem('adminInfo', e.data)
|
||||
})
|
||||
}
|
||||
let DOMIN = window.location.origin
|
||||
let STATIC_URL = DOMIN + '/api/system-boot/image/toStream?bgImage='
|
||||
localStorage.setItem('STATIC_URL', STATIC_URL)
|
||||
this.lastTime = new Date().getTime() //网页第一次打开时,记录当前时间
|
||||
this.gettheme()
|
||||
window.echartsArr = []
|
||||
//定时清理
|
||||
setInterval(() => {
|
||||
if (window.echartsArr.length > 10) {
|
||||
window.echartsArr.splice(0, window.echartsArr.length - 10)
|
||||
}
|
||||
}, 10000)
|
||||
},
|
||||
mounted() {
|
||||
// 处理笔记本系统默认系统比例为150%带来的布局影响
|
||||
if (process.env.VUE_APP_ZOOM) {
|
||||
const m = this.detectZoom()
|
||||
document.body.style.zoom = 100 / Number(m)
|
||||
}
|
||||
setTimeout(() => {
|
||||
this.appwidth = document.body.offsetWidth - 205
|
||||
this.appheight = document.body.offsetHeight - 105
|
||||
window.sessionStorage.setItem('appwidth', this.appwidth)
|
||||
window.sessionStorage.setItem('appheight', this.appheight)
|
||||
if (process.env.VUE_APP_MODE === 'jbqr') {
|
||||
window.sessionStorage.setItem('appheight', document.body.offsetHeight - 10)
|
||||
}else if(process.env.VUE_APP_MODE === 'cgyqr'){
|
||||
window.sessionStorage.setItem('appheight', document.body.offsetHeight - 10)
|
||||
}
|
||||
}, 100)
|
||||
let timer = null
|
||||
window.addEventListener('resize', () => {
|
||||
// if (timer) {
|
||||
// clearTimeout(timer)
|
||||
// }
|
||||
// timer = setTimeout(() => {
|
||||
console.log('窗口变化')
|
||||
this.appwidth = document.body.offsetWidth - 205
|
||||
this.appheight = document.body.offsetHeight - 105
|
||||
window.sessionStorage.setItem('appwidth', this.appwidth)
|
||||
window.sessionStorage.setItem('appheight', this.appheight)
|
||||
if (process.env.VUE_APP_MODE === 'jbqr') {
|
||||
window.sessionStorage.setItem('appheight', document.body.offsetHeight - 10)
|
||||
}else if(process.env.VUE_APP_MODE === 'cgyqr'){
|
||||
window.sessionStorage.setItem('appheight', document.body.offsetHeight - 10)
|
||||
}
|
||||
// }, 100)
|
||||
})
|
||||
window.addEventListener('beforeunload', e => this.beforeunloadHandler(e))
|
||||
window.addEventListener('unload', e => this.unloadHandler(e))
|
||||
window.addEventListener('resize', this.handleResizeEcharts)
|
||||
},
|
||||
// destroyed() {
|
||||
// window.removeEventListener('beforeunload', e => this.beforeunloadHandler(e))
|
||||
// window.removeEventListener('unload', e => this.unloadHandler(e))
|
||||
// window.removeEventListener('resize', this.handleResizeEcharts)
|
||||
// },
|
||||
methods: {
|
||||
...mapActions({
|
||||
changeSetting: 'settings/changeSetting'
|
||||
}),
|
||||
handleResizeEcharts() {
|
||||
// 防抖
|
||||
if (this.echartTimer) {
|
||||
clearTimeout(this.echartTimer)
|
||||
}
|
||||
this.echartTimer = setTimeout(() => {
|
||||
this.echartTimer = null
|
||||
window.echartsArr.forEach(item => {
|
||||
item.resize()
|
||||
})
|
||||
}, 200)
|
||||
},
|
||||
gettheme() {
|
||||
//主题接口
|
||||
getThemeColor().then(response => {
|
||||
const data = response.data
|
||||
var themecolor = data.color
|
||||
var logoUrl = data.logoUrl
|
||||
window.sessionStorage.setItem('logo', logoUrl)
|
||||
var title = data.name
|
||||
this.changeSetting({ themeColor: themecolor })
|
||||
this.changeSetting({ logoUrl: logoUrl })
|
||||
this.changeSetting({ title: title })
|
||||
// // 深蓝色主题
|
||||
let echartsColor = {}
|
||||
if (data.color == '#044267') {
|
||||
require.ensure([], function (require) {
|
||||
require('../src/styles/element-uitwo.scss')
|
||||
})
|
||||
this.themeName = 'element-uitwo'
|
||||
echartsColor = {
|
||||
WordColor: '#fff',
|
||||
thread: '#0379A0',
|
||||
FigureColor: [
|
||||
'#00CCFF',
|
||||
'#FF9933',
|
||||
'#41E398',
|
||||
'#0192CD',
|
||||
'#00FFFF',
|
||||
'#FAC800',
|
||||
'#12AFA6',
|
||||
'#FF680B ',
|
||||
'#FF0000 ',
|
||||
'#07CCCA '
|
||||
]
|
||||
}
|
||||
} else if (data.color == '#065252') {
|
||||
// // 深绿色
|
||||
require.ensure([], function (require) {
|
||||
require('../src/styles/element-uione.scss')
|
||||
})
|
||||
this.themeName = 'element-uione'
|
||||
echartsColor = {
|
||||
WordColor: '#fff',
|
||||
thread: '#268080',
|
||||
FigureColor: [
|
||||
'#01DFA3 ',
|
||||
'#FAC800',
|
||||
'#00CCFF',
|
||||
'#00FFFF',
|
||||
'#FF680B',
|
||||
'#00FF00',
|
||||
'#D5FF6B ',
|
||||
'#FF9933 ',
|
||||
'#5B6E96 ',
|
||||
'#66FFCC '
|
||||
]
|
||||
}
|
||||
} else if (data.color == '#4AB5A5') {
|
||||
// // 浅色调
|
||||
require.ensure([], function (require) {
|
||||
require('../src/styles/element-uithree.scss')
|
||||
})
|
||||
this.themeName = 'element-uithree'
|
||||
echartsColor = {
|
||||
WordColor: '#000',
|
||||
thread: '#000000',
|
||||
FigureColor: [
|
||||
'#07CCCA ',
|
||||
'#00BFF5',
|
||||
'#FFBF00',
|
||||
'#77DA63',
|
||||
'#D5FF6B',
|
||||
'#Ff6600',
|
||||
'#FF9100',
|
||||
'#5B6E96',
|
||||
'#66FFCC',
|
||||
'#B3B3B3'
|
||||
]
|
||||
}
|
||||
} else {
|
||||
//普通
|
||||
require.ensure([], function (require) {
|
||||
require('../src/styles/element-uiforth.scss')
|
||||
})
|
||||
this.themeName = 'element-uiforth'
|
||||
echartsColor = {
|
||||
WordColor: '#000',
|
||||
thread: '#000000',
|
||||
FigureColor: [
|
||||
'#07CCCA ',
|
||||
'#00BFF5',
|
||||
'#FFBF00',
|
||||
'#77DA63',
|
||||
'#D5FF6B',
|
||||
'#Ff6600',
|
||||
'#FF9100',
|
||||
'#5B6E96',
|
||||
'#66FFCC',
|
||||
'#B3B3B3',
|
||||
'#FF00FF',
|
||||
'#CC00FF',
|
||||
'#FF9999'
|
||||
]
|
||||
}
|
||||
}
|
||||
window.localStorage.setItem('echartsColor', JSON.stringify(echartsColor))
|
||||
})
|
||||
},
|
||||
beforeunloadHandler() {
|
||||
this._beforeUnload_time = new Date().getTime()
|
||||
// var storage = window.localStorage;
|
||||
// storage.clear()
|
||||
},
|
||||
unloadHandler(e) {
|
||||
this._gap_time = new Date().getTime() - this._beforeUnload_time
|
||||
// // debugger
|
||||
// // 判断是窗口关闭还是刷新
|
||||
// if (this._gap_time <= 5) {
|
||||
// var storage = window.localStorage
|
||||
// storage.clear()
|
||||
// }
|
||||
},
|
||||
detectZoom() {
|
||||
let ratio = 0,
|
||||
screen = window.screen,
|
||||
ua = navigator.userAgent.toLowerCase()
|
||||
if (window.devicePixelRatio !== undefined) {
|
||||
ratio = window.devicePixelRatio
|
||||
} else if (~ua.indexOf('msie')) {
|
||||
if (screen.deviceXDPI && screen.logicalXDPI) {
|
||||
ratio = screen.deviceXDPI / screen.logicalXDPI
|
||||
}
|
||||
} else if (window.outerWidth !== undefined && window.innerWidth !== undefined) {
|
||||
ratio = window.outerWidth / window.innerWidth
|
||||
}
|
||||
if (ratio) {
|
||||
ratio = Math.round(ratio * 100)
|
||||
}
|
||||
return ratio
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.zindx {
|
||||
min-width: 1200px;
|
||||
}
|
||||
|
||||
body .el-table th.gutter {
|
||||
display: table-cell !important;
|
||||
}
|
||||
|
||||
.plTableBox.el-table__header,
|
||||
.el-table__body,
|
||||
.el-table__footer {
|
||||
width: 100% !important;
|
||||
table-layout: fixed !important;
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<div ref="appheight" id="app" class="zindx" :class="themeName">
|
||||
<router-view />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapActions } from 'vuex'
|
||||
import { getThemeColor } from '@/api/user'
|
||||
import { themeColor } from './settings'
|
||||
import '@/assets/font_3482754_22duxhlb6kw/iconfont'
|
||||
|
||||
export default {
|
||||
name: 'app',
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
lastTime: null, //最后一次点击的时间
|
||||
currentTime: null, //当前点击的时间
|
||||
timeOut: 15 * 60 * 1000, //设置超时时间: 15分钟,
|
||||
themecolor: '',
|
||||
appheight: null,
|
||||
appwidth: null,
|
||||
themeName: '',
|
||||
echartTimer: null
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
settings() {
|
||||
return this.$store.state.settings
|
||||
}
|
||||
},
|
||||
created() {
|
||||
if (process.env.VUE_APP_MODE === 'jbqr') {
|
||||
window.addEventListener('message', function (e) {
|
||||
if (e.data.info != undefined) {
|
||||
window.localStorage.setItem('adminInfo', e.data.info)
|
||||
}
|
||||
// window.localStorage.setItem('adminInfo', e.data)
|
||||
})
|
||||
}
|
||||
let DOMIN = window.location.origin
|
||||
let STATIC_URL = DOMIN + '/api/system-boot/image/toStream?bgImage='
|
||||
localStorage.setItem('STATIC_URL', STATIC_URL)
|
||||
this.lastTime = new Date().getTime() //网页第一次打开时,记录当前时间
|
||||
this.gettheme()
|
||||
window.echartsArr = []
|
||||
//定时清理
|
||||
setInterval(() => {
|
||||
if (window.echartsArr.length > 10) {
|
||||
window.echartsArr.splice(0, window.echartsArr.length - 10)
|
||||
}
|
||||
}, 10000)
|
||||
},
|
||||
async mounted() {
|
||||
// 处理笔记本系统默认系统比例为150%带来的布局影响
|
||||
if (process.env.VUE_APP_ZOOM) {
|
||||
const m = this.detectZoom()
|
||||
document.body.style.zoom = 100 / Number(m)
|
||||
}
|
||||
setTimeout(() => {
|
||||
this.appwidth = document.body.offsetWidth - 205
|
||||
this.appheight = document.body.offsetHeight - 105
|
||||
window.sessionStorage.setItem('appwidth', this.appwidth)
|
||||
window.sessionStorage.setItem('appheight', this.appheight)
|
||||
if (process.env.VUE_APP_MODE === 'jbqr') {
|
||||
window.sessionStorage.setItem('appheight', document.body.offsetHeight - 10)
|
||||
} else if (process.env.VUE_APP_MODE === 'cgyqr') {
|
||||
window.sessionStorage.setItem('appheight', document.body.offsetHeight - 10)
|
||||
}
|
||||
}, 100)
|
||||
let timer = null
|
||||
window.addEventListener('resize', () => {
|
||||
// if (timer) {
|
||||
// clearTimeout(timer)
|
||||
// }
|
||||
// timer = setTimeout(() => {
|
||||
console.log('窗口变化')
|
||||
this.appwidth = document.body.offsetWidth - 205
|
||||
this.appheight = document.body.offsetHeight - 105
|
||||
window.sessionStorage.setItem('appwidth', this.appwidth)
|
||||
window.sessionStorage.setItem('appheight', this.appheight)
|
||||
if (process.env.VUE_APP_MODE === 'jbqr') {
|
||||
window.sessionStorage.setItem('appheight', document.body.offsetHeight - 10)
|
||||
} else if (process.env.VUE_APP_MODE === 'cgyqr') {
|
||||
window.sessionStorage.setItem('appheight', document.body.offsetHeight - 10)
|
||||
}
|
||||
// }, 100)
|
||||
})
|
||||
window.addEventListener('beforeunload', e => this.beforeunloadHandler(e))
|
||||
window.addEventListener('unload', e => this.unloadHandler(e))
|
||||
window.addEventListener('resize', this.handleResizeEcharts)
|
||||
|
||||
let response = await fetch('/')
|
||||
let MqttUrl = response.headers.get('X-Mqtt-Url')
|
||||
console.log("🚀 ~ mounted ~ MqttUrl:", MqttUrl)
|
||||
localStorage.setItem('MqttUrl', MqttUrl)
|
||||
},
|
||||
// destroyed() {
|
||||
// window.removeEventListener('beforeunload', e => this.beforeunloadHandler(e))
|
||||
// window.removeEventListener('unload', e => this.unloadHandler(e))
|
||||
// window.removeEventListener('resize', this.handleResizeEcharts)
|
||||
// },
|
||||
methods: {
|
||||
...mapActions({
|
||||
changeSetting: 'settings/changeSetting'
|
||||
}),
|
||||
handleResizeEcharts() {
|
||||
// 防抖
|
||||
if (this.echartTimer) {
|
||||
clearTimeout(this.echartTimer)
|
||||
}
|
||||
this.echartTimer = setTimeout(() => {
|
||||
this.echartTimer = null
|
||||
window.echartsArr.forEach(item => {
|
||||
item.resize()
|
||||
})
|
||||
}, 200)
|
||||
},
|
||||
gettheme() {
|
||||
//主题接口
|
||||
getThemeColor().then(response => {
|
||||
const data = response.data
|
||||
var themecolor = data.color
|
||||
var logoUrl = data.logoUrl
|
||||
window.sessionStorage.setItem('logo', logoUrl)
|
||||
var title = data.name
|
||||
this.changeSetting({ themeColor: themecolor })
|
||||
this.changeSetting({ logoUrl: logoUrl })
|
||||
this.changeSetting({ title: title })
|
||||
// // 深蓝色主题
|
||||
let echartsColor = {}
|
||||
if (data.color == '#044267') {
|
||||
require.ensure([], function (require) {
|
||||
require('../src/styles/element-uitwo.scss')
|
||||
})
|
||||
this.themeName = 'element-uitwo'
|
||||
echartsColor = {
|
||||
WordColor: '#fff',
|
||||
thread: '#0379A0',
|
||||
FigureColor: [
|
||||
'#00CCFF',
|
||||
'#FF9933',
|
||||
'#41E398',
|
||||
'#0192CD',
|
||||
'#00FFFF',
|
||||
'#FAC800',
|
||||
'#12AFA6',
|
||||
'#FF680B ',
|
||||
'#FF0000 ',
|
||||
'#07CCCA '
|
||||
]
|
||||
}
|
||||
} else if (data.color == '#065252') {
|
||||
// // 深绿色
|
||||
require.ensure([], function (require) {
|
||||
require('../src/styles/element-uione.scss')
|
||||
})
|
||||
this.themeName = 'element-uione'
|
||||
echartsColor = {
|
||||
WordColor: '#fff',
|
||||
thread: '#268080',
|
||||
FigureColor: [
|
||||
'#01DFA3 ',
|
||||
'#FAC800',
|
||||
'#00CCFF',
|
||||
'#00FFFF',
|
||||
'#FF680B',
|
||||
'#00FF00',
|
||||
'#D5FF6B ',
|
||||
'#FF9933 ',
|
||||
'#5B6E96 ',
|
||||
'#66FFCC '
|
||||
]
|
||||
}
|
||||
} else if (data.color == '#4AB5A5') {
|
||||
// // 浅色调
|
||||
require.ensure([], function (require) {
|
||||
require('../src/styles/element-uithree.scss')
|
||||
})
|
||||
this.themeName = 'element-uithree'
|
||||
echartsColor = {
|
||||
WordColor: '#000',
|
||||
thread: '#000000',
|
||||
FigureColor: [
|
||||
'#07CCCA ',
|
||||
'#00BFF5',
|
||||
'#FFBF00',
|
||||
'#77DA63',
|
||||
'#D5FF6B',
|
||||
'#Ff6600',
|
||||
'#FF9100',
|
||||
'#5B6E96',
|
||||
'#66FFCC',
|
||||
'#B3B3B3'
|
||||
]
|
||||
}
|
||||
} else {
|
||||
//普通
|
||||
require.ensure([], function (require) {
|
||||
require('../src/styles/element-uiforth.scss')
|
||||
})
|
||||
this.themeName = 'element-uiforth'
|
||||
echartsColor = {
|
||||
WordColor: '#000',
|
||||
thread: '#000000',
|
||||
FigureColor: [
|
||||
'#07CCCA ',
|
||||
'#00BFF5',
|
||||
'#FFBF00',
|
||||
'#77DA63',
|
||||
'#D5FF6B',
|
||||
'#Ff6600',
|
||||
'#FF9100',
|
||||
'#5B6E96',
|
||||
'#66FFCC',
|
||||
'#B3B3B3',
|
||||
'#FF00FF',
|
||||
'#CC00FF',
|
||||
'#FF9999'
|
||||
]
|
||||
}
|
||||
}
|
||||
window.localStorage.setItem('echartsColor', JSON.stringify(echartsColor))
|
||||
})
|
||||
},
|
||||
beforeunloadHandler() {
|
||||
this._beforeUnload_time = new Date().getTime()
|
||||
// var storage = window.localStorage;
|
||||
// storage.clear()
|
||||
},
|
||||
unloadHandler(e) {
|
||||
this._gap_time = new Date().getTime() - this._beforeUnload_time
|
||||
// // debugger
|
||||
// // 判断是窗口关闭还是刷新
|
||||
// if (this._gap_time <= 5) {
|
||||
// var storage = window.localStorage
|
||||
// storage.clear()
|
||||
// }
|
||||
},
|
||||
detectZoom() {
|
||||
let ratio = 0,
|
||||
screen = window.screen,
|
||||
ua = navigator.userAgent.toLowerCase()
|
||||
if (window.devicePixelRatio !== undefined) {
|
||||
ratio = window.devicePixelRatio
|
||||
} else if (~ua.indexOf('msie')) {
|
||||
if (screen.deviceXDPI && screen.logicalXDPI) {
|
||||
ratio = screen.deviceXDPI / screen.logicalXDPI
|
||||
}
|
||||
} else if (window.outerWidth !== undefined && window.innerWidth !== undefined) {
|
||||
ratio = window.outerWidth / window.innerWidth
|
||||
}
|
||||
if (ratio) {
|
||||
ratio = Math.round(ratio * 100)
|
||||
}
|
||||
return ratio
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.zindx {
|
||||
min-width: 1200px;
|
||||
}
|
||||
|
||||
body .el-table th.gutter {
|
||||
display: table-cell !important;
|
||||
}
|
||||
|
||||
.plTableBox.el-table__header,
|
||||
.el-table__body,
|
||||
.el-table__footer {
|
||||
width: 100% !important;
|
||||
table-layout: fixed !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,93 +1,93 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function list(data) {
|
||||
return request({
|
||||
url: '/system-boot/dictType/list',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
export function updateType(data) {
|
||||
return request({
|
||||
url: '/system-boot/dictType/update',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: '/system-boot/dictType/add',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function addData(data) {
|
||||
return request({
|
||||
url: '/system-boot/dictData/add',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
export function deleteType(data) {
|
||||
return request({
|
||||
url: '/system-boot/dictType/delete',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
export function updateData(data) {
|
||||
return request({
|
||||
url: '/system-boot/dictData/update',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function deleteData(data) {
|
||||
return request({
|
||||
url: '/system-boot/dictData/delete',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
export function getTypeIdData(data) {
|
||||
return request({
|
||||
url: '/system-boot/dictData/getTypeIdData',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
export function getSysConfig() {
|
||||
return request({
|
||||
url: '/system-boot/config/getSysConfig',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
export function getDicTree() {
|
||||
return request({
|
||||
url: '/system-boot/dictTree/queryTree',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
export function getDicTreeAdd(data) {
|
||||
return request({
|
||||
url: '/system-boot/dictTree/add',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
export function getDicTreeUpdate(data) {
|
||||
return request({
|
||||
url: '/system-boot/dictTree/update',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
export function getDicTreeDelete(data) {
|
||||
return request({
|
||||
url: '/system-boot/dictTree/delete',
|
||||
method: 'delete',
|
||||
params: data
|
||||
})
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function list(data) {
|
||||
return request({
|
||||
url: '/system-boot/dictType/list',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
export function updateType(data) {
|
||||
return request({
|
||||
url: '/system-boot/dictType/update',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: '/system-boot/dictType/add',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function addData(data) {
|
||||
return request({
|
||||
url: '/system-boot/dictData/add',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
export function deleteType(data) {
|
||||
return request({
|
||||
url: '/system-boot/dictType/delete',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
export function updateData(data) {
|
||||
return request({
|
||||
url: '/system-boot/dictData/update',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function deleteData(data) {
|
||||
return request({
|
||||
url: '/system-boot/dictData/delete',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
export function getTypeIdData(data) {
|
||||
return request({
|
||||
url: '/system-boot/dictData/getTypeIdData',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
export function getSysConfig() {
|
||||
return request({
|
||||
url: '/system-boot/config/getSysConfig',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
export function getDicTree() {
|
||||
return request({
|
||||
url: '/system-boot/dictTree/queryTree',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
export function getDicTreeAdd(data) {
|
||||
return request({
|
||||
url: '/system-boot/dictTree/add',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
export function getDicTreeUpdate(data) {
|
||||
return request({
|
||||
url: '/system-boot/dictTree/update',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
export function getDicTreeDelete(data) {
|
||||
return request({
|
||||
url: '/system-boot/dictTree/delete',
|
||||
method: 'delete',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
3906
src/router/index.js
3906
src/router/index.js
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,120 +1,120 @@
|
||||
<template>
|
||||
<div class="pd10">
|
||||
<el-form :inline="true" :model="formData" class="demo-form-inline">
|
||||
<el-form-item>
|
||||
<Timeinterval ref="interval" :interval="3"></Timeinterval>
|
||||
</el-form-item>
|
||||
<el-form-item label="筛选数据:">
|
||||
<el-input v-model.trim="formData.loginName" placeholder="请输入筛选数据" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="onSubmit" icon="el-icon-search">查询</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table
|
||||
stripe
|
||||
size="mini"
|
||||
:row-config="{ isCurrent: true, isHover: true }"
|
||||
border
|
||||
highlight-current-row
|
||||
v-loading="loading"
|
||||
element-loading-text="数据加载中"
|
||||
header-cell-class-name="table_header"
|
||||
:data="datamock"
|
||||
style="width: 100%"
|
||||
:height="vh + 'px'"
|
||||
>
|
||||
<el-table-column prop="userName" label="登录用户" align="center"></el-table-column>
|
||||
<el-table-column prop="ip" label="登录ip" align="center"></el-table-column>
|
||||
<el-table-column prop="time" label="登录时间" align="center"></el-table-column>
|
||||
</el-table>
|
||||
<el-pagination
|
||||
background
|
||||
align="right"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
:current-page="formData.pageNum"
|
||||
:page-sizes="[20, 30, 50, 100]"
|
||||
:page-size="formData.pageSize"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="total"
|
||||
class="mt10"
|
||||
></el-pagination>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import Timeinterval from '@/views/components/Timeinterval.vue'
|
||||
import { getAuditLog } from '@/api/AuditManagement/AuditManagement'
|
||||
export default {
|
||||
components: {
|
||||
Timeinterval
|
||||
},
|
||||
props: {},
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
zoom: '', //图表焦点校验
|
||||
vh: undefined,
|
||||
formData: {
|
||||
operateType: '认证',
|
||||
loginName: '',
|
||||
pageNum: 1,
|
||||
pageSize: 20
|
||||
},
|
||||
datamock: [],
|
||||
total: undefined
|
||||
}
|
||||
},
|
||||
created() {},
|
||||
mounted() {
|
||||
this.setHeight()
|
||||
window.addEventListener('resize', this.setHeight)
|
||||
|
||||
this.onSubmit()
|
||||
},
|
||||
beforeDestroy() {
|
||||
window.removeEventListener('resize', this.setHeight)
|
||||
},
|
||||
methods: {
|
||||
setHeight() {
|
||||
this.vh = window.sessionStorage.getItem('appheight') - 95
|
||||
},
|
||||
//查询
|
||||
onSubmit() {
|
||||
this.loading = true
|
||||
this.item = this.$refs.interval.timeValue
|
||||
this.formData.searchBeginTime = this.item[0]
|
||||
this.formData.searchEndTime = this.item[1]
|
||||
getAuditLog(this.formData).then(res => {
|
||||
this.datamock = res.data.records
|
||||
this.total = res.data.total
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
//每页条数改变时触发 选择一页显示多少行
|
||||
handleSizeChange(val) {
|
||||
this.formData.pageSize = val
|
||||
this.onSubmit()
|
||||
},
|
||||
//当前页改变时触发 跳转其他页
|
||||
handleCurrentChange(val) {
|
||||
this.formData.pageNum = val
|
||||
this.onSubmit()
|
||||
}
|
||||
},
|
||||
|
||||
computed: {},
|
||||
|
||||
watch: {}
|
||||
}
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
@import url('../../../styles/comStyle.less');
|
||||
::v-deep .el-form-item--small .el-form-item__content,
|
||||
.el-form-item--small .el-form-item__label {
|
||||
height: 32px;
|
||||
}
|
||||
::v-deep .el-table .cell {
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<div class="pd10">
|
||||
<el-form :inline="true" :model="formData" class="demo-form-inline">
|
||||
<el-form-item>
|
||||
<Timeinterval ref="interval" :interval="3"></Timeinterval>
|
||||
</el-form-item>
|
||||
<el-form-item label="筛选数据:">
|
||||
<el-input v-model.trim="formData.loginName" placeholder="请输入筛选数据" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="onSubmit" icon="el-icon-search">查询</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table
|
||||
stripe
|
||||
size="mini"
|
||||
:row-config="{ isCurrent: true, isHover: true }"
|
||||
border
|
||||
highlight-current-row
|
||||
v-loading="loading"
|
||||
element-loading-text="数据加载中"
|
||||
header-cell-class-name="table_header"
|
||||
:data="datamock"
|
||||
style="width: 100%"
|
||||
:height="vh + 'px'"
|
||||
>
|
||||
<el-table-column prop="userName" label="登录用户" align="center"></el-table-column>
|
||||
<el-table-column prop="ip" label="登录IP" align="center"></el-table-column>
|
||||
<el-table-column prop="time" label="登录时间" align="center"></el-table-column>
|
||||
</el-table>
|
||||
<el-pagination
|
||||
background
|
||||
align="right"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
:current-page="formData.pageNum"
|
||||
:page-sizes="[20, 30, 50, 100]"
|
||||
:page-size="formData.pageSize"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="total"
|
||||
class="mt10"
|
||||
></el-pagination>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import Timeinterval from '@/views/components/Timeinterval.vue'
|
||||
import { getAuditLog } from '@/api/AuditManagement/AuditManagement'
|
||||
export default {
|
||||
components: {
|
||||
Timeinterval
|
||||
},
|
||||
props: {},
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
zoom: '', //图表焦点校验
|
||||
vh: undefined,
|
||||
formData: {
|
||||
operateType: '认证',
|
||||
loginName: '',
|
||||
pageNum: 1,
|
||||
pageSize: 20
|
||||
},
|
||||
datamock: [],
|
||||
total: undefined
|
||||
}
|
||||
},
|
||||
created() {},
|
||||
mounted() {
|
||||
this.setHeight()
|
||||
window.addEventListener('resize', this.setHeight)
|
||||
|
||||
this.onSubmit()
|
||||
},
|
||||
beforeDestroy() {
|
||||
window.removeEventListener('resize', this.setHeight)
|
||||
},
|
||||
methods: {
|
||||
setHeight() {
|
||||
this.vh = window.sessionStorage.getItem('appheight') - 95
|
||||
},
|
||||
//查询
|
||||
onSubmit() {
|
||||
this.loading = true
|
||||
this.item = this.$refs.interval.timeValue
|
||||
this.formData.searchBeginTime = this.item[0]
|
||||
this.formData.searchEndTime = this.item[1]
|
||||
getAuditLog(this.formData).then(res => {
|
||||
this.datamock = res.data.records
|
||||
this.total = res.data.total
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
//每页条数改变时触发 选择一页显示多少行
|
||||
handleSizeChange(val) {
|
||||
this.formData.pageSize = val
|
||||
this.onSubmit()
|
||||
},
|
||||
//当前页改变时触发 跳转其他页
|
||||
handleCurrentChange(val) {
|
||||
this.formData.pageNum = val
|
||||
this.onSubmit()
|
||||
}
|
||||
},
|
||||
|
||||
computed: {},
|
||||
|
||||
watch: {}
|
||||
}
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
@import url('../../../styles/comStyle.less');
|
||||
::v-deep .el-form-item--small .el-form-item__content,
|
||||
.el-form-item--small .el-form-item__label {
|
||||
height: 32px;
|
||||
}
|
||||
::v-deep .el-table .cell {
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,431 +1,431 @@
|
||||
<template>
|
||||
<div v-loading="loading">
|
||||
<div>
|
||||
<div id="boxi" :style="`height:${vh};overflow: hidden;`">
|
||||
<div class="bx" id="wave"></div>
|
||||
</div>
|
||||
<el-tabs type="border-card">
|
||||
<el-tab-pane label="暂态波形上送" :style="'height:' + vhh">
|
||||
<el-table
|
||||
stripe
|
||||
:data="Data"
|
||||
:height="height"
|
||||
border
|
||||
style="width: 100%"
|
||||
header-cell-class-name="table_header"
|
||||
>
|
||||
<el-table-column align="center" prop="number" label="事件段"></el-table-column>
|
||||
<el-table-column align="center" prop="number" label="波形起始点相位(°)">
|
||||
<el-table-column align="center" prop="number" label="A相"></el-table-column>
|
||||
<el-table-column align="center" prop="number" label="B相"></el-table-column>
|
||||
<el-table-column align="center" prop="number" label="C相"></el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="number" label="跳变段电压变化率(V/ms)">
|
||||
<el-table-column align="center" prop="number" label="A相"></el-table-column>
|
||||
<el-table-column align="center" prop="number" label="B相"></el-table-column>
|
||||
<el-table-column align="center" prop="number" label="C相"></el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="number" label="相位跳变(°)">
|
||||
<el-table-column align="center" prop="number" label="A相"></el-table-column>
|
||||
<el-table-column align="center" prop="number" label="B相"></el-table-column>
|
||||
<el-table-column align="center" prop="number" label="C相"></el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="number" label="总分段数目"></el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="number"
|
||||
label="三相电压不平衡度(%)"
|
||||
width="180"
|
||||
></el-table-column>
|
||||
<el-table-column align="center" prop="number" label="暂降类型"></el-table-column>
|
||||
<el-table-column align="center" prop="number" label="暂降原因"></el-table-column>
|
||||
</el-table>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getMonitorEventAnalyseWave } from '@/api/monitoringpointStatistics/echart'
|
||||
import $ from 'jquery'
|
||||
export default {
|
||||
props: {
|
||||
flag: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
DColor: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
boxoList: {
|
||||
type: [Object, Array]
|
||||
},
|
||||
GJList: {
|
||||
type: [Object, Array]
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
|
||||
url: require('@/assets/point.png'),
|
||||
valA: 0,
|
||||
isOpen: false,
|
||||
time: '',
|
||||
type: '',
|
||||
severity: '',
|
||||
iphasic: '',
|
||||
eventValue: '',
|
||||
persistTime: '',
|
||||
lineName: '',
|
||||
subName: '',
|
||||
waveDatas: [],
|
||||
|
||||
Data: [],
|
||||
height: null,
|
||||
vhh: null,
|
||||
ptpass: '',
|
||||
waveHeight: undefined,
|
||||
$wave: undefined,
|
||||
color: '#006565',
|
||||
charts: {},
|
||||
arrpoints: [],
|
||||
titles: '',
|
||||
vh: null,
|
||||
vw: null,
|
||||
zoom: ''
|
||||
}
|
||||
},
|
||||
created() {},
|
||||
watch: {
|
||||
value: function (a, b) {
|
||||
if (a == 2) {
|
||||
// $("#wave1").remove();
|
||||
this.initWaves()
|
||||
} else {
|
||||
$('#wave1').remove()
|
||||
this.initWaves()
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.setHeight()
|
||||
window.addEventListener('resize', this.setHeight)
|
||||
this.$wave = $('#wave').eq(0)
|
||||
this.$nextTick(() => {
|
||||
this.query()
|
||||
})
|
||||
},
|
||||
beforeDestroy() {
|
||||
window.removeEventListener('resize', this.setHeight)
|
||||
},
|
||||
methods: {
|
||||
setHeight() {
|
||||
this.zoom = 1 / document.body.style.zoom
|
||||
if (this.flag) {
|
||||
// console.log(123);
|
||||
this.vh = window.sessionStorage.getItem('appheight') - 210 + 'px'
|
||||
} else {
|
||||
// console.log(3333);
|
||||
this.vh = window.sessionStorage.getItem('appheight') - 275 + 'px'
|
||||
}
|
||||
this.height = window.sessionStorage.getItem('appheight') / 2 - 300 + 'px'
|
||||
this.vw = window.sessionStorage.getItem('appwidth') - 60 + 'px'
|
||||
},
|
||||
query() {
|
||||
this.loading = true
|
||||
this.initWave()
|
||||
},
|
||||
|
||||
//开始画图
|
||||
initWave() {
|
||||
//清除之前增加的div
|
||||
// $("#wave ~ .bx1").remove();
|
||||
$('div.bx1').remove()
|
||||
//设置暂降触发点的位置 一次值与二次值Y轴不同(不是计算出来的)
|
||||
// var height = $(window).height() - 90;
|
||||
var picHeight
|
||||
var show = true
|
||||
|
||||
//var v = $("#interval").val();
|
||||
var isvisible = false
|
||||
|
||||
picHeight = this.vh
|
||||
this.$wave.css('height', picHeight)
|
||||
this.$wave.css('width', this.vw)
|
||||
|
||||
var adata = []
|
||||
var bdata = []
|
||||
var cdata = []
|
||||
var max = 0
|
||||
var min = 0
|
||||
//绘制横向第一个波形图
|
||||
this.GJList.smp_x.forEach((item, ind) => {
|
||||
if (this.GJList.smp_a[ind] > max) {
|
||||
max = this.GJList.smp_a[ind]
|
||||
} else if (this.GJList.smp_a[ind] < min) {
|
||||
min = this.GJList.smp_a[ind]
|
||||
}
|
||||
if (this.GJList.smp_b[ind] > max) {
|
||||
max = this.GJList.smp_b[ind]
|
||||
} else if (this.GJList.smp_b[ind] < min) {
|
||||
min = this.GJList.smp_b[ind]
|
||||
}
|
||||
if (this.GJList.smp_c[ind] > max) {
|
||||
max = this.GJList.smp_c[ind]
|
||||
} else if (this.GJList.smp_c[ind] < min) {
|
||||
min = this.GJList.smp_c[ind]
|
||||
}
|
||||
|
||||
adata.push([item, this.GJList.smp_a[ind]])
|
||||
bdata.push([item, this.GJList.smp_b[ind]])
|
||||
cdata.push([item, this.GJList.smp_c[ind]])
|
||||
})
|
||||
//绘制瞬时波形图
|
||||
const echarts = require('echarts')
|
||||
let wave = document.getElementById('wave')
|
||||
let _this = this
|
||||
var myChartes = echarts.init(wave)
|
||||
let echartsColor = JSON.parse(window.localStorage.echartsColor)
|
||||
var option = {
|
||||
tooltip: {
|
||||
top: '10px',
|
||||
trigger: 'axis',
|
||||
borderColor: 'grey',
|
||||
backgroundColor: '#fff',
|
||||
style: {
|
||||
color: '#000',
|
||||
fontSize: '15px',
|
||||
padding: 10
|
||||
},
|
||||
formatter: function (params) {
|
||||
// console.log(params)
|
||||
var tips = ''
|
||||
tips += '时刻:' + params[0].data[0] + '</br/>'
|
||||
|
||||
for (var i = 0; i < params.length; i++) {
|
||||
if (params[i].seriesName != '暂降触发点') {
|
||||
tips += params[i].seriesName + ':' + params[i].value[1] + '<br/>'
|
||||
}
|
||||
}
|
||||
return tips
|
||||
},
|
||||
// axisPointer: {
|
||||
// type: "cross",
|
||||
// label: {
|
||||
// color: "#fff",
|
||||
// fontSize: 16,
|
||||
// },
|
||||
// },
|
||||
textStyle: {
|
||||
color: '#fff',
|
||||
fontStyle: 'normal',
|
||||
opacity: 0.35,
|
||||
fontSize: 14
|
||||
},
|
||||
backgroundColor: 'rgba(0,0,0,0.35)',
|
||||
borderWidth: 0
|
||||
},
|
||||
title: {
|
||||
left: 'center',
|
||||
text: '发生时刻:' + this.boxoList.startTime + ' PT变化:' + this.boxoList.measurementPointName,
|
||||
textStyle: {
|
||||
fontSize: 16,
|
||||
color: _this.DColor ? '#fff' : echartsColor.WordColor
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
left: '5%',
|
||||
top: '20',
|
||||
verticalAlign: 'top',
|
||||
enabled: true,
|
||||
itemDistance: 5,
|
||||
textStyle: {
|
||||
color: _this.DColor ? '#fff' : echartsColor.WordColor,
|
||||
rich: {
|
||||
a: {
|
||||
verticalAlign: 'middle'
|
||||
}
|
||||
},
|
||||
|
||||
padding: [2, 0, 0, 0] //[上、右、下、左]
|
||||
}
|
||||
},
|
||||
toolbox: {
|
||||
show: false,
|
||||
feature: {
|
||||
//restore: {},
|
||||
saveAsImage: {
|
||||
iconStyle: {
|
||||
borderColor: _this.DColor ? '#fff' : echartsColor.WordColor
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
xAxis: {
|
||||
type: 'value',
|
||||
name: '时刻',
|
||||
boundaryGap: false,
|
||||
min: this.GJList.smp_x[0],
|
||||
max: this.GJList.smp_x[this.GJList.smp_x.length - 1] + 1,
|
||||
title: {
|
||||
text: 'ms',
|
||||
textStyle: {
|
||||
fontSize: 12,
|
||||
color: _this.DColor ? '#fff' : echartsColor.WordColor
|
||||
},
|
||||
enabled: true,
|
||||
align: 'high'
|
||||
},
|
||||
splitLine: {
|
||||
show: false
|
||||
},
|
||||
axisTick: {
|
||||
alignWithLabel: true
|
||||
},
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
color: _this.DColor ? '#fff' : echartsColor.thread
|
||||
},
|
||||
onZero: false //-----------重点
|
||||
},
|
||||
axisLabel: {
|
||||
color: _this.DColor ? '#fff' : echartsColor.WordColor,
|
||||
formatter: function (value, index) {
|
||||
if (_this.valA != (value - 0).toFixed(0)) {
|
||||
_this.valA = (value - 0).toFixed(0)
|
||||
return (value - 0).toFixed(0)
|
||||
}
|
||||
}
|
||||
//rotate:39
|
||||
}
|
||||
// data: this.syncExtremes,
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
name: 'kV',
|
||||
title: {
|
||||
align: 'high',
|
||||
offset: 0,
|
||||
text: 'kV',
|
||||
rotation: 0,
|
||||
y: -10
|
||||
},
|
||||
|
||||
boundaryGap: [0, '100%'],
|
||||
showLastLabel: true,
|
||||
max: (max + 10).toFixed(2),
|
||||
min: (min - 10).toFixed(2),
|
||||
opposite: false,
|
||||
nameTextStyle: {
|
||||
color: _this.DColor ? '#fff' : echartsColor.WordColor
|
||||
},
|
||||
//minInterval: 1,
|
||||
type: 'value',
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: _this.DColor ? '#fff' : echartsColor.thread
|
||||
},
|
||||
onZero: false //-----------重点
|
||||
},
|
||||
axisLabel: {
|
||||
color: _this.DColor ? '#fff' : echartsColor.WordColor,
|
||||
formatter: function (value, index) {
|
||||
return (value - 0).toFixed(2)
|
||||
}
|
||||
},
|
||||
splitLine: {
|
||||
lineStyle: {
|
||||
// 使用深浅的间隔色
|
||||
color: [_this.DColor ? '#fff' : echartsColor.thread],
|
||||
type: 'dashed',
|
||||
opacity: 0.5
|
||||
}
|
||||
}
|
||||
},
|
||||
grid: {
|
||||
left: '1%',
|
||||
right: '40px',
|
||||
bottom: '40px',
|
||||
top: '55px',
|
||||
containLabel: true
|
||||
},
|
||||
dataZoom: [
|
||||
{
|
||||
type: 'inside',
|
||||
height: 13,
|
||||
start: 0,
|
||||
bottom: '20px',
|
||||
end: 100
|
||||
},
|
||||
{
|
||||
start: 0,
|
||||
height: 13,
|
||||
bottom: '20px',
|
||||
end: 100
|
||||
}
|
||||
],
|
||||
series: [
|
||||
{
|
||||
name: 'A相',
|
||||
type: 'line',
|
||||
smooth: true,
|
||||
symbol: 'none',
|
||||
sampling: 'lttb',
|
||||
itemStyle: {
|
||||
color: '#FFCC00'
|
||||
},
|
||||
data: adata
|
||||
},
|
||||
{
|
||||
name: 'B相',
|
||||
type: 'line',
|
||||
smooth: true,
|
||||
symbol: 'none',
|
||||
sampling: 'lttb',
|
||||
itemStyle: {
|
||||
color: '#009900'
|
||||
},
|
||||
data: bdata
|
||||
},
|
||||
{
|
||||
name: 'C相',
|
||||
type: 'line',
|
||||
smooth: true,
|
||||
symbol: 'none',
|
||||
sampling: 'lttb',
|
||||
itemStyle: {
|
||||
color: '#CC0000'
|
||||
},
|
||||
data: cdata
|
||||
},
|
||||
{
|
||||
name: '暂降触发点',
|
||||
type: 'scatter',
|
||||
symbol: 'image://' + this.url,
|
||||
itemStyle: {
|
||||
width: 16,
|
||||
height: 16
|
||||
},
|
||||
data: [[0, min]]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
myChartes.setOption(option)
|
||||
window.echartsArr.push(myChartes)
|
||||
setTimeout(() => {
|
||||
myChartes.resize()
|
||||
this.loading = false
|
||||
}, 400)
|
||||
|
||||
//第一个波形图数据绘制完毕后,绘制后续的波形图
|
||||
|
||||
// let waveDatasTemp = waveDatas.slice(1);
|
||||
// waveDatasTemp.reverse();
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
<div v-loading="loading">
|
||||
<div>
|
||||
<div id="boxi" :style="`height:${vh};overflow: hidden;`">
|
||||
<div class="bx" id="wave"></div>
|
||||
</div>
|
||||
<el-tabs type="border-card">
|
||||
<el-tab-pane label="暂态波形上送" :style="'height:' + vhh">
|
||||
<el-table
|
||||
stripe
|
||||
:data="Data"
|
||||
:height="height"
|
||||
border
|
||||
style="width: 100%"
|
||||
header-cell-class-name="table_header"
|
||||
>
|
||||
<el-table-column align="center" prop="number" label="事件段"></el-table-column>
|
||||
<el-table-column align="center" prop="number" label="波形起始点相位(°)">
|
||||
<el-table-column align="center" prop="number" label="A相"></el-table-column>
|
||||
<el-table-column align="center" prop="number" label="B相"></el-table-column>
|
||||
<el-table-column align="center" prop="number" label="C相"></el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="number" label="跳变段电压变化率(V/ms)">
|
||||
<el-table-column align="center" prop="number" label="A相"></el-table-column>
|
||||
<el-table-column align="center" prop="number" label="B相"></el-table-column>
|
||||
<el-table-column align="center" prop="number" label="C相"></el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="number" label="相位跳变(°)">
|
||||
<el-table-column align="center" prop="number" label="A相"></el-table-column>
|
||||
<el-table-column align="center" prop="number" label="B相"></el-table-column>
|
||||
<el-table-column align="center" prop="number" label="C相"></el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="number" label="总分段数目"></el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="number"
|
||||
label="三相电压不平衡度(%)"
|
||||
width="180"
|
||||
></el-table-column>
|
||||
<el-table-column align="center" prop="number" label="暂降类型"></el-table-column>
|
||||
<el-table-column align="center" prop="number" label="暂降原因"></el-table-column>
|
||||
</el-table>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getMonitorEventAnalyseWave } from '@/api/monitoringpointStatistics/echart'
|
||||
import $ from 'jquery'
|
||||
export default {
|
||||
props: {
|
||||
flag: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
DColor: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
boxoList: {
|
||||
type: [Object, Array]
|
||||
},
|
||||
GJList: {
|
||||
type: [Object, Array]
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
|
||||
url: require('@/assets/point.png'),
|
||||
valA: 0,
|
||||
isOpen: false,
|
||||
time: '',
|
||||
type: '',
|
||||
severity: '',
|
||||
iphasic: '',
|
||||
eventValue: '',
|
||||
persistTime: '',
|
||||
lineName: '',
|
||||
subName: '',
|
||||
waveDatas: [],
|
||||
|
||||
Data: [],
|
||||
height: null,
|
||||
vhh: null,
|
||||
ptpass: '',
|
||||
waveHeight: undefined,
|
||||
$wave: undefined,
|
||||
color: '#006565',
|
||||
charts: {},
|
||||
arrpoints: [],
|
||||
titles: '',
|
||||
vh: null,
|
||||
vw: null,
|
||||
zoom: ''
|
||||
}
|
||||
},
|
||||
created() {},
|
||||
watch: {
|
||||
value: function (a, b) {
|
||||
if (a == 2) {
|
||||
// $("#wave1").remove();
|
||||
this.initWaves()
|
||||
} else {
|
||||
$('#wave1').remove()
|
||||
this.initWaves()
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.setHeight()
|
||||
window.addEventListener('resize', this.setHeight)
|
||||
this.$wave = $('#wave').eq(0)
|
||||
this.$nextTick(() => {
|
||||
this.query()
|
||||
})
|
||||
},
|
||||
beforeDestroy() {
|
||||
window.removeEventListener('resize', this.setHeight)
|
||||
},
|
||||
methods: {
|
||||
setHeight() {
|
||||
this.zoom = 1 / document.body.style.zoom
|
||||
if (this.flag) {
|
||||
// console.log(123);
|
||||
this.vh = window.sessionStorage.getItem('appheight') - 210 + 'px'
|
||||
} else {
|
||||
// console.log(3333);
|
||||
this.vh = window.sessionStorage.getItem('appheight') - 275 + 'px'
|
||||
}
|
||||
this.height = window.sessionStorage.getItem('appheight') / 2 - 300 + 'px'
|
||||
this.vw = window.sessionStorage.getItem('appwidth') - 60 + 'px'
|
||||
},
|
||||
query() {
|
||||
this.loading = true
|
||||
this.initWave()
|
||||
},
|
||||
|
||||
//开始画图
|
||||
initWave() {
|
||||
//清除之前增加的div
|
||||
// $("#wave ~ .bx1").remove();
|
||||
$('div.bx1').remove()
|
||||
//设置暂降触发点的位置 一次值与二次值Y轴不同(不是计算出来的)
|
||||
// var height = $(window).height() - 90;
|
||||
var picHeight
|
||||
var show = true
|
||||
|
||||
//var v = $("#interval").val();
|
||||
var isvisible = false
|
||||
|
||||
picHeight = this.vh
|
||||
this.$wave.css('height', picHeight)
|
||||
this.$wave.css('width', this.vw)
|
||||
|
||||
var adata = []
|
||||
var bdata = []
|
||||
var cdata = []
|
||||
var max = 0
|
||||
var min = 0
|
||||
//绘制横向第一个波形图
|
||||
this.GJList.smp_x.forEach((item, ind) => {
|
||||
if (this.GJList.smp_a[ind] > max) {
|
||||
max = this.GJList.smp_a[ind]
|
||||
} else if (this.GJList.smp_a[ind] < min) {
|
||||
min = this.GJList.smp_a[ind]
|
||||
}
|
||||
if (this.GJList.smp_b[ind] > max) {
|
||||
max = this.GJList.smp_b[ind]
|
||||
} else if (this.GJList.smp_b[ind] < min) {
|
||||
min = this.GJList.smp_b[ind]
|
||||
}
|
||||
if (this.GJList.smp_c[ind] > max) {
|
||||
max = this.GJList.smp_c[ind]
|
||||
} else if (this.GJList.smp_c[ind] < min) {
|
||||
min = this.GJList.smp_c[ind]
|
||||
}
|
||||
|
||||
adata.push([item, this.GJList.smp_a[ind]])
|
||||
bdata.push([item, this.GJList.smp_b[ind]])
|
||||
cdata.push([item, this.GJList.smp_c[ind]])
|
||||
})
|
||||
//绘制瞬时波形图
|
||||
const echarts = require('echarts')
|
||||
let wave = document.getElementById('wave')
|
||||
let _this = this
|
||||
var myChartes = echarts.init(wave)
|
||||
let echartsColor = JSON.parse(window.localStorage.echartsColor)
|
||||
var option = {
|
||||
tooltip: {
|
||||
top: '10px',
|
||||
trigger: 'axis',
|
||||
borderColor: 'grey',
|
||||
backgroundColor: '#fff',
|
||||
style: {
|
||||
color: '#000',
|
||||
fontSize: '15px',
|
||||
padding: 10
|
||||
},
|
||||
formatter: function (params) {
|
||||
// console.log(params)
|
||||
var tips = ''
|
||||
tips += '时刻:' + params[0].data[0] + '</br/>'
|
||||
|
||||
for (var i = 0; i < params.length; i++) {
|
||||
if (params[i].seriesName != '暂降触发点') {
|
||||
tips += params[i].seriesName + ':' + params[i].value[1] + '<br/>'
|
||||
}
|
||||
}
|
||||
return tips
|
||||
},
|
||||
// axisPointer: {
|
||||
// type: "cross",
|
||||
// label: {
|
||||
// color: "#fff",
|
||||
// fontSize: 16,
|
||||
// },
|
||||
// },
|
||||
textStyle: {
|
||||
color: '#fff',
|
||||
fontStyle: 'normal',
|
||||
opacity: 0.35,
|
||||
fontSize: 14
|
||||
},
|
||||
backgroundColor: 'rgba(0,0,0,0.35)',
|
||||
borderWidth: 0
|
||||
},
|
||||
title: {
|
||||
left: 'center',
|
||||
text: '发生时刻:' + this.boxoList.startTime + ' PT变化:' + this.boxoList.measurementPointName,
|
||||
textStyle: {
|
||||
fontSize: 16,
|
||||
color: _this.DColor ? '#fff' : echartsColor.WordColor
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
left: '5%',
|
||||
top: '20',
|
||||
verticalAlign: 'top',
|
||||
enabled: true,
|
||||
itemDistance: 5,
|
||||
textStyle: {
|
||||
color: _this.DColor ? '#fff' : echartsColor.WordColor,
|
||||
rich: {
|
||||
a: {
|
||||
verticalAlign: 'middle'
|
||||
}
|
||||
},
|
||||
|
||||
padding: [2, 0, 0, 0] //[上、右、下、左]
|
||||
}
|
||||
},
|
||||
toolbox: {
|
||||
show: false,
|
||||
feature: {
|
||||
//restore: {},
|
||||
saveAsImage: {
|
||||
iconStyle: {
|
||||
borderColor: _this.DColor ? '#fff' : echartsColor.WordColor
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
xAxis: {
|
||||
type: 'value',
|
||||
name: '时刻',
|
||||
boundaryGap: false,
|
||||
min: this.GJList.smp_x[0],
|
||||
max: this.GJList.smp_x[this.GJList.smp_x.length - 1] + 1,
|
||||
title: {
|
||||
text: 'ms',
|
||||
textStyle: {
|
||||
fontSize: 12,
|
||||
color: _this.DColor ? '#fff' : echartsColor.WordColor
|
||||
},
|
||||
enabled: true,
|
||||
align: 'high'
|
||||
},
|
||||
splitLine: {
|
||||
show: false
|
||||
},
|
||||
axisTick: {
|
||||
alignWithLabel: true
|
||||
},
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
color: _this.DColor ? '#fff' : echartsColor.thread
|
||||
},
|
||||
onZero: false //-----------重点
|
||||
},
|
||||
axisLabel: {
|
||||
color: _this.DColor ? '#fff' : echartsColor.WordColor,
|
||||
formatter: function (value, index) {
|
||||
if (_this.valA != (value - 0).toFixed(0)) {
|
||||
_this.valA = (value - 0).toFixed(0)
|
||||
return (value - 0).toFixed(0)
|
||||
}
|
||||
}
|
||||
//rotate:39
|
||||
}
|
||||
// data: this.syncExtremes,
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
name: 'kV',
|
||||
title: {
|
||||
align: 'high',
|
||||
offset: 0,
|
||||
text: 'kV',
|
||||
rotation: 0,
|
||||
y: -10
|
||||
},
|
||||
|
||||
boundaryGap: [0, '100%'],
|
||||
showLastLabel: true,
|
||||
max: (max + 10).toFixed(2),
|
||||
min: (min - 10).toFixed(2),
|
||||
opposite: false,
|
||||
nameTextStyle: {
|
||||
color: _this.DColor ? '#fff' : echartsColor.WordColor
|
||||
},
|
||||
//minInterval: 1,
|
||||
type: 'value',
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: _this.DColor ? '#fff' : echartsColor.thread
|
||||
},
|
||||
onZero: false //-----------重点
|
||||
},
|
||||
axisLabel: {
|
||||
color: _this.DColor ? '#fff' : echartsColor.WordColor,
|
||||
formatter: function (value, index) {
|
||||
return (value - 0).toFixed(2)
|
||||
}
|
||||
},
|
||||
splitLine: {
|
||||
lineStyle: {
|
||||
// 使用深浅的间隔色
|
||||
color: [_this.DColor ? '#fff' : echartsColor.thread],
|
||||
type: 'dashed',
|
||||
opacity: 0.5
|
||||
}
|
||||
}
|
||||
},
|
||||
grid: {
|
||||
left: '1%',
|
||||
right: '40px',
|
||||
bottom: '40px',
|
||||
top: '55px',
|
||||
containLabel: true
|
||||
},
|
||||
dataZoom: [
|
||||
{
|
||||
type: 'inside',
|
||||
height: 13,
|
||||
start: 0,
|
||||
bottom: '20px',
|
||||
end: 100
|
||||
},
|
||||
{
|
||||
start: 0,
|
||||
height: 13,
|
||||
bottom: '20px',
|
||||
end: 100
|
||||
}
|
||||
],
|
||||
series: [
|
||||
{
|
||||
name: 'A相',
|
||||
type: 'line',
|
||||
smooth: true,
|
||||
symbol: 'none',
|
||||
sampling: 'lttb',
|
||||
itemStyle: {
|
||||
color: '#FFCC00'
|
||||
},
|
||||
data: adata
|
||||
},
|
||||
{
|
||||
name: 'B相',
|
||||
type: 'line',
|
||||
smooth: true,
|
||||
symbol: 'none',
|
||||
sampling: 'lttb',
|
||||
itemStyle: {
|
||||
color: '#009900'
|
||||
},
|
||||
data: bdata
|
||||
},
|
||||
{
|
||||
name: 'C相',
|
||||
type: 'line',
|
||||
smooth: true,
|
||||
symbol: 'none',
|
||||
sampling: 'lttb',
|
||||
itemStyle: {
|
||||
color: '#CC0000'
|
||||
},
|
||||
data: cdata
|
||||
},
|
||||
{
|
||||
name: '暂降触发点',
|
||||
type: 'scatter',
|
||||
symbol: 'image://' + this.url,
|
||||
itemStyle: {
|
||||
width: 16,
|
||||
height: 16
|
||||
},
|
||||
data: [[0, min]]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
myChartes.setOption(option)
|
||||
window.echartsArr.push(myChartes)
|
||||
setTimeout(() => {
|
||||
myChartes.resize()
|
||||
this.loading = false
|
||||
}, 400)
|
||||
|
||||
//第一个波形图数据绘制完毕后,绘制后续的波形图
|
||||
|
||||
// let waveDatasTemp = waveDatas.slice(1);
|
||||
// waveDatasTemp.reverse();
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -1,448 +1,449 @@
|
||||
<template>
|
||||
<el-container style="position: relative" id="dept">
|
||||
<el-button type="primary" style="margin-top: -10px" class="flag" icon="el-icon-close" @click="$emit('close')">
|
||||
返回
|
||||
</el-button>
|
||||
<el-main id="drag-dept-right ">
|
||||
<div class="bm-view" id="container " :style="'height:' + (vh - 20) + 'px ;position: relative;'">
|
||||
<div class="boxTop">
|
||||
<el-form ref="form" :inline="true" :model="form">
|
||||
<el-form-item label="模板:">
|
||||
<el-select
|
||||
value-key="id"
|
||||
:popper-append-to-body="false"
|
||||
v-model="form.TemplateId"
|
||||
placeholder="请选择模板"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="报表类型:">
|
||||
<el-select
|
||||
v-model="form.TemplateId.reportForm"
|
||||
:popper-append-to-body="false"
|
||||
placeholder="请选择报表类型"
|
||||
disabled
|
||||
>
|
||||
<el-option
|
||||
v-for="item in reportFormList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<Timeinterval ref="Timeinterval" :interval="3" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button
|
||||
class="buttons"
|
||||
size="small"
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="Template"
|
||||
>
|
||||
查询
|
||||
</el-button>
|
||||
|
||||
<el-button
|
||||
@click="downloadExcel"
|
||||
class="buttons"
|
||||
size="small"
|
||||
type="primary"
|
||||
icon="el-icon-download"
|
||||
>
|
||||
导出excel
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<div
|
||||
class="luckysheetBox"
|
||||
style="padding: 0; margin: 0"
|
||||
:style="`width:${vw - 50}px;height: ${vh - 200}px;`"
|
||||
></div>
|
||||
<div
|
||||
id="luckysheet"
|
||||
style="padding: 0; margin: 0"
|
||||
:style="`width:${vw - 40}px;height: ${vh - 130}px;margin-top: 50px;`"
|
||||
></div>
|
||||
</div>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</template>
|
||||
<script>
|
||||
import jquery from 'jquery'
|
||||
import { getCustomReport, getTemplateByDept } from '@/api/templateConfiguration'
|
||||
import { exportExcel } from '@/views/components/luckyexcel/export'
|
||||
import Timeinterval from '@/views/components/cgytree/TimeintervalTemplat.vue'
|
||||
import TreeTemplat from '@/views/components/cgytree/TreeTemplat.vue'
|
||||
import LuckyExcel from 'luckyexcel'
|
||||
export default {
|
||||
components: { TreeTemplat, Timeinterval },
|
||||
props: {
|
||||
reportID: {
|
||||
type: String
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
options: [],
|
||||
zoom: '', //图表焦点校验
|
||||
form: {
|
||||
TemplateId: '',
|
||||
|
||||
reportForm: ''
|
||||
},
|
||||
reportFormList: [
|
||||
{
|
||||
value: '1',
|
||||
label: '分析报表'
|
||||
},
|
||||
{
|
||||
value: '2',
|
||||
label: '统计报表'
|
||||
},
|
||||
{
|
||||
value: '3',
|
||||
label: '自定义报表'
|
||||
}
|
||||
],
|
||||
loading: true,
|
||||
vh: undefined,
|
||||
vw: undefined,
|
||||
view: true,
|
||||
checkbox: false,
|
||||
tablename: 1,
|
||||
treenode: '',
|
||||
statisticalList: {}, //树上面的选择框
|
||||
data_info: [], //点位信息
|
||||
map: null, //存储地图
|
||||
flag: true,
|
||||
showtoolbar: false, //富文本框头部显示
|
||||
cellRightClickConfig: {
|
||||
copy: false, // 复制
|
||||
copyAs: false, // 复制为
|
||||
paste: false, // 粘贴
|
||||
insertRow: false, // 插入行
|
||||
insertColumn: false, // 插入列
|
||||
deleteRow: false, // 删除选中行
|
||||
deleteColumn: false, // 删除选中列
|
||||
deleteCell: false, // 删除单元格
|
||||
hideRow: false, // 隐藏选中行和显示选中行
|
||||
hideColumn: false, // 隐藏选中列和显示选中列
|
||||
rowHeight: false, // 行高
|
||||
columnWidth: false, // 列宽
|
||||
clear: false, // 清除内容
|
||||
matrix: false, // 矩阵操作选区
|
||||
sort: false, // 排序选区
|
||||
filter: false, // 筛选选区
|
||||
chart: false, // 图表生成
|
||||
image: false, // 插入图片
|
||||
link: false, // 插入链接
|
||||
data: false, // 数据验证
|
||||
cellFormat: false // 设置单元格格式
|
||||
}, //控制右键菜单
|
||||
list: [
|
||||
// {
|
||||
// name: "Cell",
|
||||
// index: 0,
|
||||
// defaultRowHeight: 27,
|
||||
// defaultColWidth: 105,
|
||||
// },
|
||||
],
|
||||
deptId: ''
|
||||
}
|
||||
},
|
||||
created() {},
|
||||
mounted() {
|
||||
this.deptId = JSON.parse(window.sessionStorage.getItem('Info')).deptId
|
||||
this.zoom = 1 / document.body.style.zoom
|
||||
this.setHeight()
|
||||
window.addEventListener('resize', this.setHeight)
|
||||
this.$nextTick(() => {
|
||||
this.getTemplateLists()
|
||||
})
|
||||
},
|
||||
beforeDestroy() {
|
||||
window.removeEventListener('resize', this.setHeight)
|
||||
},
|
||||
methods: {
|
||||
setHeight() {
|
||||
this.zoom = 1 / document.body.style.zoom
|
||||
this.vh = window.sessionStorage.getItem('appheight')
|
||||
this.vw = document.getElementById('app-main-in').offsetWidth
|
||||
},
|
||||
async getTemplateLists() {
|
||||
await getTemplateByDept({ id: this.deptId }).then(res => {
|
||||
if (res != undefined && res.code == 'A0000') {
|
||||
res.data.forEach(item => {
|
||||
if (item.activation == 1) {
|
||||
this.form.TemplateId = item
|
||||
return
|
||||
}
|
||||
})
|
||||
this.options = res.data
|
||||
setTimeout(() => {
|
||||
this.Template()
|
||||
}, 0)
|
||||
}
|
||||
})
|
||||
},
|
||||
// 选择模板
|
||||
Template() {
|
||||
// debugger
|
||||
let _this = this
|
||||
|
||||
getCustomReport({
|
||||
startTime: this.$refs.Timeinterval.timeValue[0],
|
||||
endTime: this.$refs.Timeinterval.timeValue[1],
|
||||
type: this.$refs.Timeinterval.intervald,
|
||||
tempId: this.form.TemplateId.id,
|
||||
activation: this.form.TemplateId.activation,
|
||||
lineId: this.reportID
|
||||
// lineId: "8696be1d170e05b7d848accc059f4558",
|
||||
}).then(response => {
|
||||
_this.list = response
|
||||
_this.init()
|
||||
// jquery.getJSON(res.data[1], null, function (list) {
|
||||
// _this.list = list;
|
||||
//_this.init();
|
||||
// });
|
||||
})
|
||||
|
||||
// .then((res) => {
|
||||
// console.log("res", res.data);
|
||||
// let Datalist = JSON.parse(res.data);
|
||||
|
||||
// console.log(`13323`, JSON.parse(res.data));
|
||||
// this.list = Datalist;
|
||||
|
||||
// this.init();
|
||||
// });
|
||||
},
|
||||
|
||||
// 初始化插件
|
||||
init() {
|
||||
window.luckysheet.destroy()
|
||||
let options = {
|
||||
container: 'luckysheet', //luckysheet为容器id
|
||||
title: '',
|
||||
lang: 'zh',
|
||||
showinfobar: false,
|
||||
cellRightClickConfig: this.cellRightClickConfig,
|
||||
showtoolbar: this.showtoolbar,
|
||||
// column:8,
|
||||
// row:7,
|
||||
showtoolbarConfig: {
|
||||
textRotateMode: false // '文本旋转方式'
|
||||
},
|
||||
|
||||
data: this.list
|
||||
}
|
||||
|
||||
// console.log(options);
|
||||
luckysheet.create(options)
|
||||
},
|
||||
// 下载表格
|
||||
downloadExcel() {
|
||||
// const value = this.selected;;
|
||||
|
||||
exportExcel(luckysheet.getAllSheets(), '下载')
|
||||
// testaaa();
|
||||
}
|
||||
},
|
||||
|
||||
computed: {},
|
||||
|
||||
watch: {}
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
||||
<style lang="less" scoped>
|
||||
@import url('../../../../styles/comStyle.less');
|
||||
</style>
|
||||
<style lang="scss" scoped>
|
||||
ul {
|
||||
list-style-type: none;
|
||||
padding: 0;
|
||||
}
|
||||
li {
|
||||
display: inline-block;
|
||||
margin: 0 10px;
|
||||
}
|
||||
a {
|
||||
color: #42b983;
|
||||
}
|
||||
.wrap {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
}
|
||||
#container {
|
||||
width: 100%;
|
||||
height: 83vh;
|
||||
border: 1px solid rgb(0, 183, 255);
|
||||
}
|
||||
#container2 {
|
||||
width: 500px;
|
||||
height: 500px;
|
||||
border: 3px solid pink;
|
||||
}
|
||||
#drag-dept-left {
|
||||
min-width: 220px;
|
||||
max-width: 35%;
|
||||
}
|
||||
.overview_scroll::-webkit-scrollbar {
|
||||
width: 2px;
|
||||
height: 1px;
|
||||
background: rgba(6, 70, 122, 0.013);
|
||||
}
|
||||
|
||||
.overview_scroll::-webkit-scrollbar-thumb {
|
||||
border-radius: 4px;
|
||||
margin-right: 5px;
|
||||
-webkit-box-shadow: inset 0 0 0px #0090b411;
|
||||
background: #03c1cf0e;
|
||||
}
|
||||
|
||||
/**拖拽条样式 */
|
||||
#drag-dept {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
top: 10;
|
||||
right: 0;
|
||||
width: 4px;
|
||||
background-color: #04607c2a;
|
||||
box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.35);
|
||||
cursor: col-resize;
|
||||
}
|
||||
|
||||
#drag-dept i {
|
||||
display: inline-block;
|
||||
height: 14px;
|
||||
width: 1px;
|
||||
background-color: #e9e9e9;
|
||||
margin: 0 1px;
|
||||
}
|
||||
|
||||
.overview_scroll::-webkit-scrollbar {
|
||||
width: 2px;
|
||||
height: 1px;
|
||||
background: rgba(6, 70, 122, 0.013);
|
||||
}
|
||||
::-webkit-scrollbar {
|
||||
width: 5px;
|
||||
height: 0px;
|
||||
}
|
||||
.el-tabs--border-card > .el-tabs__header {
|
||||
background-color: #124da5;
|
||||
border-bottom: 2px solid #e4e7ed;
|
||||
margin: 0;
|
||||
}
|
||||
.el-tabs__header {
|
||||
padding: 0;
|
||||
position: relative;
|
||||
margin: 0 px;
|
||||
}
|
||||
.el-tabs--border-card > .el-tabs__content {
|
||||
padding: 0px;
|
||||
}
|
||||
.el-tabs__content {
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
.el-aside,
|
||||
.el-main {
|
||||
margin-top: 0px;
|
||||
}
|
||||
.el-main {
|
||||
padding-top: 0px;
|
||||
padding-bottom: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
::v-deep .boxDiv {
|
||||
height: 25px;
|
||||
line-height: 25px;
|
||||
margin-left: 10px;
|
||||
span:first-child {
|
||||
font-weight: 600;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
::v-deep .button {
|
||||
margin-right: 5px;
|
||||
background-color: $themeColor;
|
||||
color: #fff;
|
||||
height: 18px;
|
||||
line-height: 18px;
|
||||
border: 0 solid #000;
|
||||
border-radius: 2px;
|
||||
&:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
.iconBox {
|
||||
position: absolute;
|
||||
top: 2px;
|
||||
right: 2px;
|
||||
width: 150px;
|
||||
height: 260px;
|
||||
padding: 10px;
|
||||
z-index: 2000;
|
||||
border-radius: 4px;
|
||||
border: 1px solid #ccc;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12), 0 0 6px rgba(0, 0, 0, 0.04);
|
||||
background: rgba(255, 255, 255, 0.75) !important;
|
||||
|
||||
.div {
|
||||
display: flex;
|
||||
|
||||
margin-bottom: 5px;
|
||||
img {
|
||||
height: 20px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
// span {
|
||||
// line-height: 20px;
|
||||
// }
|
||||
}
|
||||
}
|
||||
.boxTop {
|
||||
position: absolute;
|
||||
top: -48px;
|
||||
left: 5px;
|
||||
z-index: 2000;
|
||||
}
|
||||
::v-deep .el-select-dropdown__list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
max-width: 240px;
|
||||
}
|
||||
.luckysheetBox {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 1500;
|
||||
// background-color: #000;
|
||||
}
|
||||
.anchorBL {
|
||||
display: none !important;
|
||||
}
|
||||
::v-deep .el-select {
|
||||
//width: 150px;
|
||||
}
|
||||
.flag {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<el-container style="position: relative" id="dept">
|
||||
<el-button type="primary" style="margin-top: -10px" class="flag" icon="el-icon-close" @click="$emit('close')">
|
||||
返回
|
||||
</el-button>
|
||||
<el-main id="drag-dept-right ">
|
||||
<div class="bm-view" id="container " :style="'height:' + (vh - 20) + 'px ;position: relative;'">
|
||||
<div class="boxTop">
|
||||
<el-form ref="form" :inline="true" :model="form">
|
||||
<el-form-item label="模板:">
|
||||
<el-select
|
||||
value-key="id"
|
||||
:popper-append-to-body="false"
|
||||
v-model="form.TemplateId"
|
||||
placeholder="请选择模板"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="报表类型:">
|
||||
<el-select
|
||||
v-model="form.TemplateId.reportForm"
|
||||
:popper-append-to-body="false"
|
||||
placeholder="请选择报表类型"
|
||||
disabled
|
||||
>
|
||||
<el-option
|
||||
v-for="item in reportFormList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<Timeinterval ref="Timeinterval" :interval="3" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button
|
||||
class="buttons"
|
||||
size="small"
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="Template"
|
||||
>
|
||||
查询
|
||||
</el-button>
|
||||
|
||||
<el-button
|
||||
@click="downloadExcel"
|
||||
class="buttons"
|
||||
size="small"
|
||||
type="primary"
|
||||
icon="el-icon-download"
|
||||
>
|
||||
导出excel
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<div
|
||||
class="luckysheetBox"
|
||||
style="padding: 0; margin: 0"
|
||||
:style="`width:${vw - 50}px;height: ${vh - 200}px;`"
|
||||
></div>
|
||||
<div
|
||||
id="luckysheet"
|
||||
style="padding: 0; margin: 0"
|
||||
:style="`width:${vw - 40}px;height: ${vh - 130}px;margin-top: 50px;`"
|
||||
></div>
|
||||
</div>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</template>
|
||||
<script>
|
||||
import jquery from 'jquery'
|
||||
import { getCustomReport, getTemplateByDept } from '@/api/templateConfiguration'
|
||||
import { exportExcel } from '@/views/components/luckyexcel/export'
|
||||
import Timeinterval from '@/views/components/cgytree/TimeintervalTemplat.vue'
|
||||
import TreeTemplat from '@/views/components/cgytree/TreeTemplat.vue'
|
||||
import LuckyExcel from 'luckyexcel'
|
||||
export default {
|
||||
components: { TreeTemplat, Timeinterval },
|
||||
props: {
|
||||
reportID: {
|
||||
type: String
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
options: [],
|
||||
zoom: '', //图表焦点校验
|
||||
form: {
|
||||
TemplateId: '',
|
||||
|
||||
reportForm: ''
|
||||
},
|
||||
reportFormList: [
|
||||
{
|
||||
value: '1',
|
||||
label: '分析报表'
|
||||
},
|
||||
{
|
||||
value: '2',
|
||||
label: '统计报表'
|
||||
},
|
||||
{
|
||||
value: '3',
|
||||
label: '自定义报表'
|
||||
}
|
||||
],
|
||||
loading: true,
|
||||
vh: undefined,
|
||||
vw: undefined,
|
||||
view: true,
|
||||
checkbox: false,
|
||||
tablename: 1,
|
||||
treenode: '',
|
||||
statisticalList: {}, //树上面的选择框
|
||||
data_info: [], //点位信息
|
||||
map: null, //存储地图
|
||||
flag: true,
|
||||
showtoolbar: false, //富文本框头部显示
|
||||
cellRightClickConfig: {
|
||||
copy: false, // 复制
|
||||
copyAs: false, // 复制为
|
||||
paste: false, // 粘贴
|
||||
insertRow: false, // 插入行
|
||||
insertColumn: false, // 插入列
|
||||
deleteRow: false, // 删除选中行
|
||||
deleteColumn: false, // 删除选中列
|
||||
deleteCell: false, // 删除单元格
|
||||
hideRow: false, // 隐藏选中行和显示选中行
|
||||
hideColumn: false, // 隐藏选中列和显示选中列
|
||||
rowHeight: false, // 行高
|
||||
columnWidth: false, // 列宽
|
||||
clear: false, // 清除内容
|
||||
matrix: false, // 矩阵操作选区
|
||||
sort: false, // 排序选区
|
||||
filter: false, // 筛选选区
|
||||
chart: false, // 图表生成
|
||||
image: false, // 插入图片
|
||||
link: false, // 插入链接
|
||||
data: false, // 数据验证
|
||||
cellFormat: false // 设置单元格格式
|
||||
}, //控制右键菜单
|
||||
list: [
|
||||
// {
|
||||
// name: "Cell",
|
||||
// index: 0,
|
||||
// defaultRowHeight: 27,
|
||||
// defaultColWidth: 105,
|
||||
// },
|
||||
],
|
||||
deptId: ''
|
||||
}
|
||||
},
|
||||
created() {},
|
||||
mounted() {
|
||||
this.deptId = JSON.parse(window.sessionStorage.getItem('Info')).deptId
|
||||
this.zoom = 1 / document.body.style.zoom
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.setHeight()
|
||||
window.addEventListener('resize', this.setHeight)
|
||||
this.getTemplateLists()
|
||||
})
|
||||
},
|
||||
beforeDestroy() {
|
||||
window.removeEventListener('resize', this.setHeight)
|
||||
},
|
||||
methods: {
|
||||
setHeight() {
|
||||
this.zoom = 1 / document.body.style.zoom
|
||||
this.vh = window.sessionStorage.getItem('appheight')
|
||||
this.vw = document.getElementById('app-main-in')?.offsetWidth
|
||||
},
|
||||
async getTemplateLists() {
|
||||
await getTemplateByDept({ id: this.deptId }).then(res => {
|
||||
if (res != undefined && res.code == 'A0000') {
|
||||
res.data.forEach(item => {
|
||||
if (item.activation == 1) {
|
||||
this.form.TemplateId = item
|
||||
return
|
||||
}
|
||||
})
|
||||
this.options = res.data
|
||||
setTimeout(() => {
|
||||
this.Template()
|
||||
}, 0)
|
||||
}
|
||||
})
|
||||
},
|
||||
// 选择模板
|
||||
Template() {
|
||||
// debugger
|
||||
let _this = this
|
||||
|
||||
getCustomReport({
|
||||
startTime: this.$refs.Timeinterval.timeValue[0],
|
||||
endTime: this.$refs.Timeinterval.timeValue[1],
|
||||
type: this.$refs.Timeinterval.intervald,
|
||||
tempId: this.form.TemplateId.id,
|
||||
activation: this.form.TemplateId.activation,
|
||||
lineId: this.reportID
|
||||
// lineId: "8696be1d170e05b7d848accc059f4558",
|
||||
}).then(response => {
|
||||
_this.list = response
|
||||
_this.init()
|
||||
// jquery.getJSON(res.data[1], null, function (list) {
|
||||
// _this.list = list;
|
||||
//_this.init();
|
||||
// });
|
||||
})
|
||||
|
||||
// .then((res) => {
|
||||
// console.log("res", res.data);
|
||||
// let Datalist = JSON.parse(res.data);
|
||||
|
||||
// console.log(`13323`, JSON.parse(res.data));
|
||||
// this.list = Datalist;
|
||||
|
||||
// this.init();
|
||||
// });
|
||||
},
|
||||
|
||||
// 初始化插件
|
||||
init() {
|
||||
window.luckysheet.destroy()
|
||||
let options = {
|
||||
container: 'luckysheet', //luckysheet为容器id
|
||||
title: '',
|
||||
lang: 'zh',
|
||||
showinfobar: false,
|
||||
cellRightClickConfig: this.cellRightClickConfig,
|
||||
showtoolbar: this.showtoolbar,
|
||||
// column:8,
|
||||
// row:7,
|
||||
showtoolbarConfig: {
|
||||
textRotateMode: false // '文本旋转方式'
|
||||
},
|
||||
|
||||
data: this.list
|
||||
}
|
||||
|
||||
// console.log(options);
|
||||
luckysheet.create(options)
|
||||
},
|
||||
// 下载表格
|
||||
downloadExcel() {
|
||||
// const value = this.selected;;
|
||||
|
||||
exportExcel(luckysheet.getAllSheets(), '下载')
|
||||
// testaaa();
|
||||
}
|
||||
},
|
||||
|
||||
computed: {},
|
||||
|
||||
watch: {}
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
||||
<style lang="less" scoped>
|
||||
@import url('../../../../styles/comStyle.less');
|
||||
</style>
|
||||
<style lang="scss" scoped>
|
||||
ul {
|
||||
list-style-type: none;
|
||||
padding: 0;
|
||||
}
|
||||
li {
|
||||
display: inline-block;
|
||||
margin: 0 10px;
|
||||
}
|
||||
a {
|
||||
color: #42b983;
|
||||
}
|
||||
.wrap {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
}
|
||||
#container {
|
||||
width: 100%;
|
||||
height: 83vh;
|
||||
border: 1px solid rgb(0, 183, 255);
|
||||
}
|
||||
#container2 {
|
||||
width: 500px;
|
||||
height: 500px;
|
||||
border: 3px solid pink;
|
||||
}
|
||||
#drag-dept-left {
|
||||
min-width: 220px;
|
||||
max-width: 35%;
|
||||
}
|
||||
.overview_scroll::-webkit-scrollbar {
|
||||
width: 2px;
|
||||
height: 1px;
|
||||
background: rgba(6, 70, 122, 0.013);
|
||||
}
|
||||
|
||||
.overview_scroll::-webkit-scrollbar-thumb {
|
||||
border-radius: 4px;
|
||||
margin-right: 5px;
|
||||
-webkit-box-shadow: inset 0 0 0px #0090b411;
|
||||
background: #03c1cf0e;
|
||||
}
|
||||
|
||||
/**拖拽条样式 */
|
||||
#drag-dept {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
top: 10;
|
||||
right: 0;
|
||||
width: 4px;
|
||||
background-color: #04607c2a;
|
||||
box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.35);
|
||||
cursor: col-resize;
|
||||
}
|
||||
|
||||
#drag-dept i {
|
||||
display: inline-block;
|
||||
height: 14px;
|
||||
width: 1px;
|
||||
background-color: #e9e9e9;
|
||||
margin: 0 1px;
|
||||
}
|
||||
|
||||
.overview_scroll::-webkit-scrollbar {
|
||||
width: 2px;
|
||||
height: 1px;
|
||||
background: rgba(6, 70, 122, 0.013);
|
||||
}
|
||||
::-webkit-scrollbar {
|
||||
width: 5px;
|
||||
height: 0px;
|
||||
}
|
||||
.el-tabs--border-card > .el-tabs__header {
|
||||
background-color: #124da5;
|
||||
border-bottom: 2px solid #e4e7ed;
|
||||
margin: 0;
|
||||
}
|
||||
.el-tabs__header {
|
||||
padding: 0;
|
||||
position: relative;
|
||||
margin: 0 px;
|
||||
}
|
||||
.el-tabs--border-card > .el-tabs__content {
|
||||
padding: 0px;
|
||||
}
|
||||
.el-tabs__content {
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
.el-aside,
|
||||
.el-main {
|
||||
margin-top: 0px;
|
||||
}
|
||||
.el-main {
|
||||
padding-top: 0px;
|
||||
padding-bottom: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
::v-deep .boxDiv {
|
||||
height: 25px;
|
||||
line-height: 25px;
|
||||
margin-left: 10px;
|
||||
span:first-child {
|
||||
font-weight: 600;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
::v-deep .button {
|
||||
margin-right: 5px;
|
||||
background-color: $themeColor;
|
||||
color: #fff;
|
||||
height: 18px;
|
||||
line-height: 18px;
|
||||
border: 0 solid #000;
|
||||
border-radius: 2px;
|
||||
&:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
.iconBox {
|
||||
position: absolute;
|
||||
top: 2px;
|
||||
right: 2px;
|
||||
width: 150px;
|
||||
height: 260px;
|
||||
padding: 10px;
|
||||
z-index: 2000;
|
||||
border-radius: 4px;
|
||||
border: 1px solid #ccc;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12), 0 0 6px rgba(0, 0, 0, 0.04);
|
||||
background: rgba(255, 255, 255, 0.75) !important;
|
||||
|
||||
.div {
|
||||
display: flex;
|
||||
|
||||
margin-bottom: 5px;
|
||||
img {
|
||||
height: 20px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
// span {
|
||||
// line-height: 20px;
|
||||
// }
|
||||
}
|
||||
}
|
||||
.boxTop {
|
||||
position: absolute;
|
||||
top: -48px;
|
||||
left: 5px;
|
||||
z-index: 2000;
|
||||
}
|
||||
::v-deep .el-select-dropdown__list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
max-width: 240px;
|
||||
}
|
||||
.luckysheetBox {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 1500;
|
||||
// background-color: #000;
|
||||
}
|
||||
.anchorBL {
|
||||
display: none !important;
|
||||
}
|
||||
::v-deep .el-select {
|
||||
//width: 150px;
|
||||
}
|
||||
.flag {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,57 +1,57 @@
|
||||
<template>
|
||||
<div>
|
||||
<!-- 台账 -->
|
||||
<StandingBook v-show="flag && flags" @ViewReport="ViewReport" />
|
||||
<!-- 报表 -->
|
||||
<reportForm
|
||||
v-if="!flag"
|
||||
:reportID="reportID"
|
||||
@close="
|
||||
flag = true;
|
||||
flags = true;
|
||||
"
|
||||
/>
|
||||
<!-- 报告 -->
|
||||
<SteadyStateReport
|
||||
v-if="!flags"
|
||||
:reportID="reportID"
|
||||
@close="
|
||||
flag = true;
|
||||
flags = true;
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import SteadyStateReport from "./components/SteadyStateReport.vue";
|
||||
import reportForm from "./components/reportForm";
|
||||
import StandingBook from "./components/StandingBook";
|
||||
export default {
|
||||
components: { SteadyStateReport, reportForm, StandingBook },
|
||||
props: {},
|
||||
data() {
|
||||
return {
|
||||
flag: true,
|
||||
flags: true,
|
||||
reportID: "",
|
||||
};
|
||||
},
|
||||
created() {},
|
||||
|
||||
methods: {
|
||||
ViewReport(id, val) {
|
||||
if (val == 0) {
|
||||
this.flag = false;
|
||||
} else {
|
||||
this.flags = false;
|
||||
}
|
||||
this.reportID = id;
|
||||
},
|
||||
},
|
||||
|
||||
computed: {},
|
||||
|
||||
watch: {},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped></style>
|
||||
<template>
|
||||
<div>
|
||||
<!-- 台账 -->
|
||||
<StandingBook v-show="flag && flags" @ViewReport="ViewReport" />
|
||||
<!-- 报表 -->
|
||||
<reportForm
|
||||
v-if="!flag"
|
||||
:reportID="reportID"
|
||||
@close="
|
||||
flag = true;
|
||||
flags = true;
|
||||
"
|
||||
/>
|
||||
<!-- 报告 -->
|
||||
<SteadyStateReport
|
||||
v-if="!flags"
|
||||
:reportID="reportID"
|
||||
@close="
|
||||
flag = true;
|
||||
flags = true;
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import SteadyStateReport from "./components/SteadyStateReport.vue";
|
||||
import reportForm from "./components/reportForm.vue";
|
||||
import StandingBook from "./components/StandingBook.vue";
|
||||
export default {
|
||||
components: { SteadyStateReport, reportForm, StandingBook },
|
||||
props: {},
|
||||
data() {
|
||||
return {
|
||||
flag: true,
|
||||
flags: true,
|
||||
reportID: "",
|
||||
};
|
||||
},
|
||||
created() {},
|
||||
|
||||
methods: {
|
||||
ViewReport(id, val) {
|
||||
if (val == 0) {
|
||||
this.flag = false;
|
||||
} else {
|
||||
this.flags = false;
|
||||
}
|
||||
this.reportID = id;
|
||||
},
|
||||
},
|
||||
|
||||
computed: {},
|
||||
|
||||
watch: {},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped></style>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,405 +1,423 @@
|
||||
<template>
|
||||
<div v-loading="loading"
|
||||
element-loading-text="数据加载中">
|
||||
<el-form :inline="true" :model="formInline" class="demo-form-inline">
|
||||
<el-form-item label="类型:" style="display:none">
|
||||
<el-select
|
||||
v-model="formData.statisticalType"
|
||||
@change="changeclasss"
|
||||
placeholder="请选择统计类型"
|
||||
style="width:100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in classificationData"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="{
|
||||
label: item.name,
|
||||
value: item.id,
|
||||
name: item.name,
|
||||
id: item.id,
|
||||
code: item.code,
|
||||
sort: item.sort,
|
||||
}"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="区域:" >
|
||||
<el-select
|
||||
ref="selectTree1"
|
||||
v-model="deptName"
|
||||
placeholder="请选择所属部门区域"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option :value="deptIndex" style="height: auto">
|
||||
<el-tree
|
||||
ref="tree"
|
||||
:data="treeData"
|
||||
node-key="id"
|
||||
accordion
|
||||
:default-expanded-keys="idArr"
|
||||
:props="defaultProps"
|
||||
@node-click="handleNodeClick"
|
||||
>
|
||||
<span class="span-ellipsis" slot-scope="{ node, data }">
|
||||
<span :title="data.name">{{ data.name }}</span>
|
||||
</span>
|
||||
</el-tree>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="厂家:" >
|
||||
<el-select
|
||||
v-model="formData.manufacturer"
|
||||
multiple
|
||||
collapse-tags
|
||||
placeholder="请选择终端厂家"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in terminaloption"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="{
|
||||
label: item.name,
|
||||
value: item.id,
|
||||
code: item.code,
|
||||
name: item.name,
|
||||
id: item.id,
|
||||
sort: item.sort,
|
||||
}"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="干扰源:" style="display: none">
|
||||
<el-select
|
||||
v-model="formData.loadType"
|
||||
multiple
|
||||
collapse-tags
|
||||
placeholder="请选择干扰源类型"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in interfereoption"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="{
|
||||
label: item.name,
|
||||
value: item.id,
|
||||
code: item.code,
|
||||
name: item.name,
|
||||
id: item.id,
|
||||
sort: item.sort,
|
||||
}"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="通讯状态:" >
|
||||
<el-select
|
||||
v-model="formData.comFlag"
|
||||
multiple
|
||||
collapse-tags
|
||||
placeholder="请选择通讯状态"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in communicationstatus"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="终端状态:" >
|
||||
<el-select
|
||||
v-model="formData.runFlag"
|
||||
multiple
|
||||
collapse-tags
|
||||
placeholder="请选择终端状态"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in terminalstatus"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item >
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
icon="el-icon-search"
|
||||
@click="queryDataInfo"
|
||||
>查询</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
<el-form-item style="float: right;">
|
||||
<span>在线率≦60% <span style="color:red;font-weight: bold;">差   </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>
|
||||
<el-row :gutter="20" style="margin-top: 0%">
|
||||
<el-col :span="24">
|
||||
<terminalmessagetable
|
||||
:tableData="tableData"
|
||||
:classvalue="classt"
|
||||
|
||||
></terminalmessagetable>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getappheight, getheight } from "@/assets/commjs/common";
|
||||
import { guanzhou } from "@/assets/commjs/token";
|
||||
import api1 from "@/api/pollution/pollution";
|
||||
import timepicker from "@/views/cgy-components/TimePicker/index4";
|
||||
import { dicData } from "../../../assets/commjs/dictypeData";
|
||||
import api from "../../../api/integraliy/integraliy";
|
||||
import Table from "../../components/teble/index";
|
||||
import Pagination from "../../components/pagination/index";
|
||||
import terminalmessagetable from "@/views/cgy-components/terminalmessagetable";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
timepicker,
|
||||
terminalmessagetable,
|
||||
// onlinerateechart
|
||||
},
|
||||
watch: {},
|
||||
computed: {},
|
||||
data() {
|
||||
return {
|
||||
formInline: {},
|
||||
loading: false,
|
||||
classt: "Power_Network",
|
||||
asideheight: undefined,
|
||||
id: 1,
|
||||
copent: 0,
|
||||
title: "电网拓扑",
|
||||
xdata: [
|
||||
"江苏省",
|
||||
"江西省",
|
||||
"安徽省",
|
||||
"湖北省",
|
||||
"浙江省",
|
||||
"湖南省",
|
||||
"广东省",
|
||||
"福建省",
|
||||
"海南省",
|
||||
"四川省",
|
||||
"青海省",
|
||||
"河北省",
|
||||
],
|
||||
ydata: [
|
||||
92.6, 25.9, 39.0, 26.4, 28.7, 90.7, 75.6, 82.2, 48.7, 58.8, 16.0, 32.3,
|
||||
],
|
||||
classvalue: 0,
|
||||
activeName: "tab1",
|
||||
panindexOptions: [],
|
||||
formData: {
|
||||
//后面需要修改
|
||||
serverName: "harmonic-boot",
|
||||
searchBeginTime:'2023-04-01',
|
||||
searchEndTime:'2023-04-11',
|
||||
deptIndex: "",
|
||||
monitorFlag: 2,
|
||||
powerFlag: 2,
|
||||
loadType: [],
|
||||
manufacturer: [],
|
||||
statisticalType: "",
|
||||
scale: [],
|
||||
comFlag: [0, 1],
|
||||
runFlag: [0, 1, 2],
|
||||
},
|
||||
deptId: "",
|
||||
deptName: "全国",
|
||||
deptIndex: "",
|
||||
treeData: [],
|
||||
idArr: [],
|
||||
defaultProps: {
|
||||
children: "children",
|
||||
label: "name",
|
||||
},
|
||||
//统计类型
|
||||
classificationData: [],
|
||||
//电压等级
|
||||
voltageleveloption: [],
|
||||
//终端厂家
|
||||
terminaloption: [],
|
||||
//干扰源类型
|
||||
interfereoption: [],
|
||||
//通讯状态
|
||||
communicationstatus: [
|
||||
{ value: 0, label: "中断" },
|
||||
{ value: 1, label: "正常" },
|
||||
],
|
||||
//终端状态
|
||||
terminalstatus: [
|
||||
{ value: 0, label: "投运" },
|
||||
{ value: 1, label: "热备用" },
|
||||
{ value: 2, label: "停运" },
|
||||
],
|
||||
classt: "Power_Network",
|
||||
tableData: [],
|
||||
};
|
||||
},
|
||||
created() {
|
||||
var info = window.sessionStorage.getItem("Info");
|
||||
info = eval("(" + info + ")");
|
||||
this.formData.deptIndex = info.deptId;
|
||||
this.getAreaDept();
|
||||
this.getclassificationData();
|
||||
this.getVoltage();
|
||||
this.getManufacturer();
|
||||
this.getLoadType();
|
||||
},
|
||||
mounted() {
|
||||
// this.asideheight = getappheight();
|
||||
this.queryDataInfo();
|
||||
},
|
||||
methods: {
|
||||
guanzhou() {
|
||||
var data = {
|
||||
token: this.$route.query.token,
|
||||
};
|
||||
api1.guanzhou(data).then((res) => {
|
||||
if (res.code == "A0000") {
|
||||
return;
|
||||
} else {
|
||||
this.$router.push("/error/massege/403");
|
||||
}
|
||||
});
|
||||
},
|
||||
//切换统计类型
|
||||
changeclasss(val) {
|
||||
this.classt = val.code;
|
||||
},
|
||||
//部门绑定区域触发区域树节点
|
||||
handleNodeClick(data, node) {
|
||||
this.deptName = data.name;
|
||||
this.$refs.selectTree1.blur();
|
||||
this.deptId = data.id;
|
||||
this.formData.deptIndex = data.id;
|
||||
},
|
||||
//2次组件触发事件
|
||||
querfromdata(data) {
|
||||
this.timeValue = data;
|
||||
// alert("父组件条件查询触发方法" + this.timeValue);
|
||||
},
|
||||
handleClick(tab, event) {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.child.onlinerateechart();
|
||||
});
|
||||
},
|
||||
changePageNum(data) {
|
||||
this.pageData.pageNum = data;
|
||||
// alert("父组件当前页" + this.pageData.pageNum);
|
||||
},
|
||||
changePageSize(data) {
|
||||
this.pageData.pageSize = data;
|
||||
//alert("父组件当前条数" + this.pageData.pageSize);
|
||||
},
|
||||
//查询触发方法
|
||||
queryDataInfo() {
|
||||
this.loading = true;
|
||||
api.getRuntimeData(this.formData).then((res) => {
|
||||
if (res.code == "A0000") {
|
||||
if (res.data.length == 0) {
|
||||
this.tableData = [];
|
||||
this.loading = false;
|
||||
} else {
|
||||
this.tableData = res.data;
|
||||
this.loading = false;
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
//获取区域
|
||||
getAreaDept() {
|
||||
api.getAreaDept().then((res) => {
|
||||
if (res.code == "A0000") {
|
||||
var data = res.data;
|
||||
data.forEach((element) => {
|
||||
this.idArr.push(element.id);
|
||||
});
|
||||
this.treeData = data;
|
||||
}
|
||||
});
|
||||
},
|
||||
//字典获取数据电压等级
|
||||
getVoltage() {
|
||||
var code = "Dev_Voltage_Stand";
|
||||
this.voltageleveloption = dicData(code, []);
|
||||
//this.formData.scale = this.voltageleveloption;
|
||||
},
|
||||
//字典获取数据终端厂家
|
||||
getManufacturer() {
|
||||
var code = "Dev_Manufacturers";
|
||||
this.terminaloption = dicData(code, []);
|
||||
this.formData.manufacturer = this.terminaloption;
|
||||
},
|
||||
//字典获取数据干扰源类型
|
||||
getLoadType() {
|
||||
var code = "Interference_Source";
|
||||
this.interfereoption = dicData(code, []);
|
||||
this.formData.loadType = this.interfereoption;
|
||||
},
|
||||
//获取统计类型
|
||||
getclassificationData() {
|
||||
var code = "Statistical_Type";
|
||||
this.classificationData = dicData(code, [
|
||||
"Report_Type",
|
||||
"Voltage_Level",
|
||||
"Load_Type",
|
||||
"Manufacturer"
|
||||
]);
|
||||
this.formData.statisticalType = this.classificationData[0];
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import url("../../../styles/common.less");
|
||||
|
||||
.main {
|
||||
overflow: hidden;
|
||||
}
|
||||
::v-deep .el-main[data-v-2338f777] {
|
||||
/* margin-top: 10px; */
|
||||
padding: 10px 10px 10px 10px;
|
||||
background-color: rgba(234, 235, 236, 0.996);
|
||||
color: #333;
|
||||
line-height: 0px;
|
||||
}
|
||||
// ::v-deep .el-table__body-wrapper::-webkit-scrollbar {
|
||||
// width: 8px; /*滚动条宽度*/
|
||||
// height: 12px; /*滚动条高度*/
|
||||
// }
|
||||
// ::v-deep .el-table__body-wrapper::-webkit-scrollbar-track {
|
||||
// border-radius: 0px; /*滚动条的背景区域的圆角*/
|
||||
// background-color: rgba(203, 208, 207, 0.286); /*滚动条的背景颜色*/
|
||||
// cursor: pointer;
|
||||
// }
|
||||
// ::v-deep .el-table__body-wrapper::-webkit-scrollbar-corner {
|
||||
// background-color: rgba(202, 207, 206, 0.286);
|
||||
// cursor: pointer;
|
||||
// }
|
||||
// ::v-deep .el-table__body-wrapper::-webkit-scrollbar-thumb {
|
||||
// border-radius: 4px; /*滚动条的圆角*/
|
||||
// background-color: rgba(144, 148, 148, 0.979); /*滚动条的背景颜色*/
|
||||
// }
|
||||
::v-deep .el-select-dropdown__item,
|
||||
.el-select-dropdown__item {
|
||||
background-color: #fff;
|
||||
padding: 0 5px !important;
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<div v-loading="loading" element-loading-text="数据加载中">
|
||||
<el-form :inline="true" :model="formInline" class="demo-form-inline">
|
||||
<el-form-item label="类型:" style="display: none">
|
||||
<el-select
|
||||
v-model="formData.statisticalType"
|
||||
@change="changeclasss"
|
||||
placeholder="请选择统计类型"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in classificationData"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="{
|
||||
label: item.name,
|
||||
value: item.id,
|
||||
name: item.name,
|
||||
id: item.id,
|
||||
code: item.code,
|
||||
sort: item.sort
|
||||
}"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="区域:">
|
||||
<el-select ref="selectTree1" v-model="deptName" placeholder="请选择所属部门区域" style="width: 100%">
|
||||
<el-option :value="deptIndex" style="height: auto">
|
||||
<el-tree
|
||||
ref="tree"
|
||||
:data="treeData"
|
||||
node-key="id"
|
||||
accordion
|
||||
:default-expanded-keys="idArr"
|
||||
:props="defaultProps"
|
||||
@node-click="handleNodeClick"
|
||||
>
|
||||
<span class="span-ellipsis" slot-scope="{ node, data }">
|
||||
<span :title="data.name">{{ data.name }}</span>
|
||||
</span>
|
||||
</el-tree>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="厂家:">
|
||||
<el-select
|
||||
v-model="formData.manufacturer"
|
||||
multiple
|
||||
collapse-tags
|
||||
placeholder="请选择终端厂家"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in terminaloption"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="{
|
||||
label: item.name,
|
||||
value: item.id,
|
||||
code: item.code,
|
||||
name: item.name,
|
||||
id: item.id,
|
||||
sort: item.sort
|
||||
}"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="干扰源:" style="display: none">
|
||||
<el-select
|
||||
v-model="formData.loadType"
|
||||
multiple
|
||||
collapse-tags
|
||||
placeholder="请选择干扰源类型"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in interfereoption"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="{
|
||||
label: item.name,
|
||||
value: item.id,
|
||||
code: item.code,
|
||||
name: item.name,
|
||||
id: item.id,
|
||||
sort: item.sort
|
||||
}"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="通讯状态:">
|
||||
<el-select
|
||||
v-model="formData.comFlag"
|
||||
multiple
|
||||
collapse-tags
|
||||
placeholder="请选择通讯状态"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in communicationstatus"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="终端状态:">
|
||||
<el-select
|
||||
v-model="formData.runFlag"
|
||||
multiple
|
||||
collapse-tags
|
||||
placeholder="请选择终端状态"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in terminalstatus"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" size="small" icon="el-icon-search" @click="queryDataInfo">查询</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item style="float: right">
|
||||
<span>
|
||||
在线率≦60%
|
||||
<span style="color: red; font-weight: bold">差   </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>
|
||||
<el-row :gutter="20" style="margin-top: 0%">
|
||||
<el-col :span="24">
|
||||
<terminalmessagetable :tableData="tableData" :classvalue="classt"></terminalmessagetable>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getappheight, getheight } from '@/assets/commjs/common'
|
||||
import { guanzhou } from '@/assets/commjs/token'
|
||||
import api1 from '@/api/pollution/pollution'
|
||||
import timepicker from '@/views/cgy-components/TimePicker/index4'
|
||||
import { dicData } from '../../../assets/commjs/dictypeData'
|
||||
import api from '../../../api/integraliy/integraliy'
|
||||
import Table from '../../components/teble/index'
|
||||
import Pagination from '../../components/pagination/index'
|
||||
import terminalmessagetable from '@/views/cgy-components/terminalmessagetable'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
timepicker,
|
||||
terminalmessagetable
|
||||
// onlinerateechart
|
||||
},
|
||||
watch: {},
|
||||
computed: {},
|
||||
data() {
|
||||
return {
|
||||
formInline: {},
|
||||
loading: false,
|
||||
classt: 'Power_Network',
|
||||
asideheight: undefined,
|
||||
id: 1,
|
||||
copent: 0,
|
||||
title: '电网拓扑',
|
||||
xdata: [
|
||||
'江苏省',
|
||||
'江西省',
|
||||
'安徽省',
|
||||
'湖北省',
|
||||
'浙江省',
|
||||
'湖南省',
|
||||
'广东省',
|
||||
'福建省',
|
||||
'海南省',
|
||||
'四川省',
|
||||
'青海省',
|
||||
'河北省'
|
||||
],
|
||||
ydata: [92.6, 25.9, 39.0, 26.4, 28.7, 90.7, 75.6, 82.2, 48.7, 58.8, 16.0, 32.3],
|
||||
classvalue: 0,
|
||||
activeName: 'tab1',
|
||||
panindexOptions: [],
|
||||
formData: {
|
||||
//后面需要修改
|
||||
serverName: 'harmonic-boot',
|
||||
searchBeginTime: '',
|
||||
searchEndTime: '',
|
||||
deptIndex: '',
|
||||
monitorFlag: 2,
|
||||
powerFlag: 2,
|
||||
loadType: [],
|
||||
manufacturer: [],
|
||||
statisticalType: '',
|
||||
scale: [],
|
||||
comFlag: [0, 1],
|
||||
runFlag: [0, 1, 2]
|
||||
},
|
||||
deptId: '',
|
||||
deptName: '全国',
|
||||
deptIndex: '',
|
||||
treeData: [],
|
||||
idArr: [],
|
||||
defaultProps: {
|
||||
children: 'children',
|
||||
label: 'name'
|
||||
},
|
||||
//统计类型
|
||||
classificationData: [],
|
||||
//电压等级
|
||||
voltageleveloption: [],
|
||||
//终端厂家
|
||||
terminaloption: [],
|
||||
//干扰源类型
|
||||
interfereoption: [],
|
||||
//通讯状态
|
||||
communicationstatus: [
|
||||
{ value: 0, label: '中断' },
|
||||
{ value: 1, label: '正常' }
|
||||
],
|
||||
//终端状态
|
||||
terminalstatus: [
|
||||
{ value: 0, label: '投运' },
|
||||
{ value: 1, label: '热备用' },
|
||||
{ value: 2, label: '停运' }
|
||||
],
|
||||
classt: 'Power_Network',
|
||||
tableData: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
var info = window.sessionStorage.getItem('Info')
|
||||
info = eval('(' + info + ')')
|
||||
this.formData.deptIndex = info.deptId
|
||||
this.getAreaDept()
|
||||
this.getclassificationData()
|
||||
this.getVoltage()
|
||||
this.getManufacturer()
|
||||
this.getLoadType()
|
||||
},
|
||||
mounted() {
|
||||
// this.asideheight = getappheight();
|
||||
this.queryDataInfo()
|
||||
},
|
||||
methods: {
|
||||
guanzhou() {
|
||||
var data = {
|
||||
token: this.$route.query.token
|
||||
}
|
||||
api1.guanzhou(data).then(res => {
|
||||
if (res.code == 'A0000') {
|
||||
return
|
||||
} else {
|
||||
this.$router.push('/error/massege/403')
|
||||
}
|
||||
})
|
||||
},
|
||||
//切换统计类型
|
||||
changeclasss(val) {
|
||||
this.classt = val.code
|
||||
},
|
||||
//部门绑定区域触发区域树节点
|
||||
handleNodeClick(data, node) {
|
||||
this.deptName = data.name
|
||||
this.$refs.selectTree1.blur()
|
||||
this.deptId = data.id
|
||||
this.formData.deptIndex = data.id
|
||||
},
|
||||
//2次组件触发事件
|
||||
querfromdata(data) {
|
||||
this.timeValue = data
|
||||
// alert("父组件条件查询触发方法" + this.timeValue);
|
||||
},
|
||||
handleClick(tab, event) {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.child.onlinerateechart()
|
||||
})
|
||||
},
|
||||
changePageNum(data) {
|
||||
this.pageData.pageNum = data
|
||||
// alert("父组件当前页" + this.pageData.pageNum);
|
||||
},
|
||||
changePageSize(data) {
|
||||
this.pageData.pageSize = data
|
||||
//alert("父组件当前条数" + this.pageData.pageSize);
|
||||
},
|
||||
//查询触发方法
|
||||
queryDataInfo() {
|
||||
console.log(123, this.getSearchTimeRange())
|
||||
this.formData.searchBeginTime = this.getSearchTimeRange().searchBeginTime
|
||||
this.formData.searchEndTime = this.getSearchTimeRange().searchEndTime
|
||||
this.loading = true
|
||||
api.getRuntimeData(this.formData).then(res => {
|
||||
if (res.code == 'A0000') {
|
||||
if (res.data.length == 0) {
|
||||
this.tableData = []
|
||||
this.loading = false
|
||||
} else {
|
||||
this.tableData = res.data
|
||||
this.loading = false
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
//获取区域
|
||||
getAreaDept() {
|
||||
api.getAreaDept().then(res => {
|
||||
if (res.code == 'A0000') {
|
||||
var data = res.data
|
||||
data.forEach(element => {
|
||||
this.idArr.push(element.id)
|
||||
})
|
||||
this.treeData = data
|
||||
}
|
||||
})
|
||||
},
|
||||
//字典获取数据电压等级
|
||||
getVoltage() {
|
||||
var code = 'Dev_Voltage_Stand'
|
||||
this.voltageleveloption = dicData(code, [])
|
||||
//this.formData.scale = this.voltageleveloption;
|
||||
},
|
||||
//字典获取数据终端厂家
|
||||
getManufacturer() {
|
||||
var code = 'Dev_Manufacturers'
|
||||
this.terminaloption = dicData(code, [])
|
||||
this.formData.manufacturer = this.terminaloption
|
||||
},
|
||||
//字典获取数据干扰源类型
|
||||
getLoadType() {
|
||||
var code = 'Interference_Source'
|
||||
this.interfereoption = dicData(code, [])
|
||||
this.formData.loadType = this.interfereoption
|
||||
},
|
||||
//获取统计类型
|
||||
getclassificationData() {
|
||||
var code = 'Statistical_Type'
|
||||
this.classificationData = dicData(code, ['Report_Type', 'Voltage_Level', 'Load_Type', 'Manufacturer'])
|
||||
this.formData.statisticalType = this.classificationData[0]
|
||||
},
|
||||
getSearchTimeRange() {
|
||||
const now = new Date()
|
||||
const currentYear = now.getFullYear()
|
||||
const currentMonth = now.getMonth() // 0-11
|
||||
const currentDate = now.getDate()
|
||||
|
||||
let searchBeginTime, searchEndTime
|
||||
|
||||
if (currentDate === 1) {
|
||||
// 如果是1号,返回上个月1号到上个月最后一天
|
||||
// 上个月的第一天
|
||||
const lastMonthFirstDay = new Date(currentYear, currentMonth - 1, 1)
|
||||
searchBeginTime = this.formatDate(lastMonthFirstDay)
|
||||
|
||||
// 上个月的最后一天(当前月的第0天就是上个月的最后一天)
|
||||
const lastMonthLastDay = new Date(currentYear, currentMonth, 0)
|
||||
searchEndTime = this.formatDate(lastMonthLastDay)
|
||||
} else {
|
||||
// 如果不是1号,返回当月1号到当前时间
|
||||
const monthFirstDay = new Date(currentYear, currentMonth, 1)
|
||||
searchBeginTime = this.formatDate(monthFirstDay)
|
||||
searchEndTime = this.formatDate(now)
|
||||
}
|
||||
|
||||
return {
|
||||
searchBeginTime,
|
||||
searchEndTime
|
||||
}
|
||||
},
|
||||
|
||||
// 辅助函数:格式化日期为 YYYY-MM-DD
|
||||
formatDate(date) {
|
||||
const year = date.getFullYear()
|
||||
const month = String(date.getMonth() + 1).padStart(2, '0')
|
||||
const day = String(date.getDate()).padStart(2, '0')
|
||||
return `${year}-${month}-${day}`
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import url('../../../styles/common.less');
|
||||
|
||||
.main {
|
||||
overflow: hidden;
|
||||
}
|
||||
::v-deep .el-main[data-v-2338f777] {
|
||||
/* margin-top: 10px; */
|
||||
padding: 10px 10px 10px 10px;
|
||||
background-color: rgba(234, 235, 236, 0.996);
|
||||
color: #333;
|
||||
line-height: 0px;
|
||||
}
|
||||
// ::v-deep .el-table__body-wrapper::-webkit-scrollbar {
|
||||
// width: 8px; /*滚动条宽度*/
|
||||
// height: 12px; /*滚动条高度*/
|
||||
// }
|
||||
// ::v-deep .el-table__body-wrapper::-webkit-scrollbar-track {
|
||||
// border-radius: 0px; /*滚动条的背景区域的圆角*/
|
||||
// background-color: rgba(203, 208, 207, 0.286); /*滚动条的背景颜色*/
|
||||
// cursor: pointer;
|
||||
// }
|
||||
// ::v-deep .el-table__body-wrapper::-webkit-scrollbar-corner {
|
||||
// background-color: rgba(202, 207, 206, 0.286);
|
||||
// cursor: pointer;
|
||||
// }
|
||||
// ::v-deep .el-table__body-wrapper::-webkit-scrollbar-thumb {
|
||||
// border-radius: 4px; /*滚动条的圆角*/
|
||||
// background-color: rgba(144, 148, 148, 0.979); /*滚动条的背景颜色*/
|
||||
// }
|
||||
::v-deep .el-select-dropdown__item,
|
||||
.el-select-dropdown__item {
|
||||
background-color: #fff;
|
||||
padding: 0 5px !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -39,7 +39,7 @@ module.exports = {
|
||||
// target: 'http://192.168.120.210:10215', //hsw
|
||||
// target: 'http://192.168.1.28:10215', //超高压
|
||||
// target: "'https://pqmcn.com:8092/api", //治理
|
||||
target: 'http://192.168.1.24:10215', // 河北
|
||||
target: 'http://192.168.1.67:10215', // 河北
|
||||
// target: "http://192.168.1.31:10215", // 海南
|
||||
// target: "http://192.168.1.29:10215", // 冀北
|
||||
changeOrigin: true,
|
||||
|
||||
Reference in New Issue
Block a user