3 Commits

Author SHA1 Message Date
guanj
54f336ab45 修改现场问题 2026-05-21 09:37:58 +08:00
39093641d8 用能系统功能调整 2025-07-24 11:40:23 +08:00
guanj
c88484caf7 修改现场问题 2025-07-16 18:10:24 +08:00
43 changed files with 53201 additions and 32164 deletions

20941
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,166 +1,168 @@
{ {
"name": "vue-pc-admin", "name": "vue-pc-admin",
"version": "0.1.0", "version": "0.1.0",
"description": "这是一个基于 vue admin 管理后台", "description": "这是一个基于 vue admin 管理后台",
"author": "caojinwei", "author": "caojinwei",
"license": "NJCN", "license": "NJCN",
"scripts": { "scripts": {
"dev": "vue-cli-service serve", "dev": "vue-cli-service serve",
"dev-zoom": "cross-env VUE_APP_ZOOM=1 vue-cli-service serve", "dev-zoom": "cross-env VUE_APP_ZOOM=1 vue-cli-service serve",
"dev-cgyqr": "cross-env VUE_APP_MODE=cgyqr vue-cli-service serve", "dev-cgyqr": "cross-env VUE_APP_MODE=cgyqr vue-cli-service serve",
"dev-hbqr": "cross-env VUE_APP_MODE=cgyqr VUE_APP_HB=hbqr vue-cli-service serve", "dev-cgyqr1": "cross-env VUE_APP_MODE=cgyqr VUE_APP_KEY=scqr vue-cli-service serve",
"dev-jbqr": "cross-env VUE_APP_MODE=jbqr vue-cli-service serve", "dev-hbqr": "cross-env VUE_APP_MODE=cgyqr VUE_APP_HB=hbqr VUE_APP_KEY=scqr vue-cli-service serve",
"build": "vue-cli-service build", "dev-jbqr": "cross-env VUE_APP_MODE=jbqr vue-cli-service serve",
"build-zoom": "cross-env VUE_APP_ZOOM=1 vue-cli-service build", "build": "vue-cli-service build",
"build-hbqr": "cross-env VUE_APP_MODE=cgyqr VUE_APP_HB=hbqr vue-cli-service build", "build-zoom": "cross-env VUE_APP_ZOOM=1 vue-cli-service build",
"build-cgyqr": "cross-env VUE_APP_MODE=cgyqr vue-cli-service build", "build-hbqr": "cross-env VUE_APP_MODE=cgyqr VUE_APP_HB=hbqr VUE_APP_KEY=scqr vue-cli-service build",
"build-jbqr": "cross-env VUE_APP_MODE=jbqr vue-cli-service build", "build-cgyqr": "cross-env VUE_APP_MODE=cgyqr vue-cli-service build",
"preview": "node build/index.js --preview", "build-cgyqr1": "cross-env VUE_APP_MODE=cgyqr VUE_APP_KEY=scqr vue-cli-service build",
"deploy-18": "cross-env VUE_APP_ZOOM=1 vue-cli-service build && ./upload_script/upload_18.sh" "build-jbqr": "cross-env VUE_APP_MODE=jbqr vue-cli-service build",
}, "preview": "node build/index.js --preview",
"dependencies": { "deploy-18": "cross-env VUE_APP_ZOOM=1 vue-cli-service build && ./upload_script/upload_18.sh"
"@ckeditor/ckeditor5-vue": "^1.0.1", },
"@jiaminghi/data-view": "^2.10.0", "dependencies": {
"@riophae/vue-treeselect": "^0.4.0", "@ckeditor/ckeditor5-vue": "^1.0.1",
"@toast-ui/editor": "^2.0.1", "@jiaminghi/data-view": "^2.10.0",
"@toast-ui/vue-editor": "^2.0.1", "@riophae/vue-treeselect": "^0.4.0",
"@vue/composition-api": "^1.3.0", "@toast-ui/editor": "^2.0.1",
"@wangeditor/editor": "^5.1.23", "@toast-ui/vue-editor": "^2.0.1",
"@wangeditor/editor-for-vue": "^1.0.2", "@vue/composition-api": "^1.3.0",
"axios": "^0.27.2", "@wangeditor/editor": "^5.1.23",
"baidu-map": "^0.1.4", "@wangeditor/editor-for-vue": "^1.0.2",
"bpmn-js": "^11.1.0", "axios": "^0.27.2",
"bpmn-js-bpmnlint": "^0.15.0", "baidu-map": "^0.1.4",
"bpmnlint": "^6.4.0", "bpmn-js": "^11.1.0",
"bpmnlint-loader": "^0.1.4", "bpmn-js-bpmnlint": "^0.15.0",
"codemirror": "5.39.2", "bpmnlint": "^6.4.0",
"core-js": "^2.6.12", "bpmnlint-loader": "^0.1.4",
"cross-storage": "^1.0.0", "codemirror": "5.39.2",
"crypto-js": "^4.2.0", "core-js": "^2.6.12",
"deepmerge": "^4.2.2", "cross-storage": "^1.0.0",
"driver.js": "^0.9.8", "crypto-js": "^4.2.0",
"echarts": "^5.4.3", "deepmerge": "^4.2.2",
"echarts-gl": "^2.0.9", "driver.js": "^0.9.8",
"echarts-liquidfill": "^3.1.0", "echarts": "^5.4.3",
"el-tree-transfer": "^2.4.7", "echarts-gl": "^2.0.9",
"element-resize-detector": "^1.2.4", "echarts-liquidfill": "^3.1.0",
"element-ui": "^2.15.9", "el-tree-transfer": "^2.4.7",
"exceljs": "^4.3.0", "element-resize-detector": "^1.2.4",
"fabric": "^5.3.0", "element-ui": "^2.15.9",
"file-saver": "^2.0.5", "exceljs": "^4.3.0",
"form-gen-parser": "^1.0.3", "fabric": "^5.3.0",
"highcharts": "^10.0.0", "file-saver": "^2.0.5",
"highcharts-vue": "^1.4.0", "form-gen-parser": "^1.0.3",
"html2canvas": "^1.4.1", "highcharts": "^10.0.0",
"jquery": "^3.6.0", "highcharts-vue": "^1.4.0",
"jquery.panzoom": "^3.2.3", "html2canvas": "^1.4.1",
"js-cookie": "2.2.0", "jquery": "^3.6.0",
"json2csv": "^5.0.6", "jquery.panzoom": "^3.2.3",
"less": "^4.1.2", "js-cookie": "2.2.0",
"less-loader": "^5.0.0", "json2csv": "^5.0.6",
"lib-flexible": "^0.3.2", "less": "^4.1.2",
"lodash.clonedeep": "^4.5.0", "less-loader": "^5.0.0",
"luckyexcel": "^1.0.1", "lib-flexible": "^0.3.2",
"mqtt": "^4.3.6", "lodash.clonedeep": "^4.5.0",
"normalize.css": "7.0.0", "luckyexcel": "^1.0.1",
"nprogress": "0.2.0", "mqtt": "^4.3.6",
"path-to-regexp": "2.4.0", "normalize.css": "7.0.0",
"qiniu-js": "^3.1.2", "nprogress": "0.2.0",
"qrcodejs2": "^0.0.2", "path-to-regexp": "2.4.0",
"sanitizer": "^0.1.3", "qiniu-js": "^3.1.2",
"screenfull": "^5.0.2", "qrcodejs2": "^0.0.2",
"session-storage-sync": "^0.6.0", "sanitizer": "^0.1.3",
"sortablejs": "^1.10.2", "screenfull": "^5.0.2",
"spin.js": "^4.1.1", "session-storage-sync": "^0.6.0",
"sync-session-storage": "^0.0.13", "sortablejs": "^1.10.2",
"throttle-debounce": "^1.1.0", "spin.js": "^4.1.1",
"timeline-slider-vue": "^1.0.6", "sync-session-storage": "^0.0.13",
"umy-ui": "^1.1.6", "throttle-debounce": "^1.1.0",
"v-loading-plugin": "^1.0.7", "timeline-slider-vue": "^1.0.6",
"vue": "2.6.10", "umy-ui": "^1.1.6",
"vue-baidu-map": "^0.21.22", "v-loading-plugin": "^1.0.7",
"vue-drag-resize": "^1.5.4", "vue": "2.6.10",
"vue-echarts": "^6.6.2", "vue-baidu-map": "^0.21.22",
"vue-grid-layout": "^2.3.12", "vue-drag-resize": "^1.5.4",
"vue-jsonp": "^2.0.0", "vue-echarts": "^6.6.2",
"vue-masonry": "^0.16.0", "vue-grid-layout": "^2.3.12",
"vue-particles": "^1.0.9", "vue-jsonp": "^2.0.0",
"vue-resize-observer": "^2.0.16", "vue-masonry": "^0.16.0",
"vue-router": "3.0.6", "vue-particles": "^1.0.9",
"vue-slider-component": "^3.2.24", "vue-resize-observer": "^2.0.16",
"vue-svg-filler": "^1.0.6", "vue-router": "3.0.6",
"vuedraggable": "^2.24.3", "vue-slider-component": "^3.2.24",
"vuex": "3.1.0", "vue-svg-filler": "^1.0.6",
"vxe-table": "3.6.6", "vuedraggable": "^2.24.3",
"vxe-table-plugin-export-xlsx": "2.2.2", "vuex": "3.1.0",
"webpack-theme-color-replacer": "^1.3.7", "vxe-table": "3.6.6",
"xe-utils": "^3.5.14", "vxe-table-plugin-export-xlsx": "2.2.2",
"xlsx": "^0.15.6" "webpack-theme-color-replacer": "^1.3.7",
}, "xe-utils": "^3.5.14",
"devDependencies": { "xlsx": "^0.15.6"
"@babel/core": "7.0.0", },
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6", "devDependencies": {
"@babel/plugin-proposal-optional-chaining": "^7.21.0", "@babel/core": "7.0.0",
"@babel/plugin-transform-modules-commonjs": "^7.9.0", "@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6",
"@babel/register": "7.0.0", "@babel/plugin-proposal-optional-chaining": "^7.21.0",
"@vue/cli-plugin-babel": "3.6.0", "@babel/plugin-transform-modules-commonjs": "^7.9.0",
"@vue/cli-service": "^3.12.1", "@babel/register": "7.0.0",
"@vue/test-utils": "1.0.0-beta.29", "@vue/cli-plugin-babel": "3.6.0",
"autoprefixer": "^9.5.1", "@vue/cli-service": "^3.12.1",
"babel-core": "7.0.0-bridge.0", "@vue/test-utils": "1.0.0-beta.29",
"babel-plugin-transform-es2015-modules-commonjs": "^6.26.2", "autoprefixer": "^9.5.1",
"babel-plugin-transform-remove-console": "^6.9.4", "babel-core": "7.0.0-bridge.0",
"chalk": "2.4.2", "babel-plugin-transform-es2015-modules-commonjs": "^6.26.2",
"compression-webpack-plugin": "^3.1.0", "babel-plugin-transform-remove-console": "^6.9.4",
"connect": "3.6.6", "chalk": "2.4.2",
"cross-env": "^7.0.3", "compression-webpack-plugin": "^3.1.0",
"css-properties-sorting": "^1.0.10", "connect": "3.6.6",
"d3": "^7.1.1", "cross-env": "^7.0.3",
"default-passive-events": "^2.0.0", "css-properties-sorting": "^1.0.10",
"highlight.js": "9.18.5", "d3": "^7.1.1",
"html-webpack-plugin": "3.2.0", "default-passive-events": "^2.0.0",
"less": "^4.1.1", "highlight.js": "9.18.5",
"less-loader": "^5.0.0", "html-webpack-plugin": "3.2.0",
"lint-staged": "8.1.5", "less": "^4.1.1",
"open": "^7.0.3", "less-loader": "^5.0.0",
"postcss-loader": "^3.0.0", "lint-staged": "8.1.5",
"px2rem-loader": "^0.1.9", "open": "^7.0.3",
"raw-loader": "^0.5.1", "postcss-loader": "^3.0.0",
"runjs": "^4.3.2", "px2rem-loader": "^0.1.9",
"sass": "^1.62.0", "raw-loader": "^0.5.1",
"sass-loader": "^7.1.0", "runjs": "^4.3.2",
"sass-resources-loader": "^2.0.3", "sass": "^1.62.0",
"script-ext-html-webpack-plugin": "2.1.3", "sass-loader": "^7.1.0",
"script-loader": "0.7.2", "sass-resources-loader": "^2.0.3",
"serve-static": "^1.13.2", "script-ext-html-webpack-plugin": "2.1.3",
"stylelint": "^12.0.1", "script-loader": "0.7.2",
"stylelint-config-standard": "^20.0.0", "serve-static": "^1.13.2",
"stylelint-order": "^4.1.0", "stylelint": "^12.0.1",
"stylelint-scss": "^3.18.0", "stylelint-config-standard": "^20.0.0",
"svg-sprite-loader": "4.1.3", "stylelint-order": "^4.1.0",
"svgo": "1.2.2", "stylelint-scss": "^3.18.0",
"vkbeautify": "^0.99.3", "svg-sprite-loader": "4.1.3",
"vue-particles": "^1.0.9", "svgo": "1.2.2",
"vue-template-compiler": "2.6.10", "vkbeautify": "^0.99.3",
"vue2-ace-editor": "^0.0.15", "vue-particles": "^1.0.9",
"xcrud": "^0.4.19" "vue-template-compiler": "2.6.10",
}, "vue2-ace-editor": "^0.0.15",
"lint-staged": { "xcrud": "^0.4.19"
"src/**/*.{js,vue}": [ },
"git add" "lint-staged": {
], "src/**/*.{js,vue}": [
"src/**/*.{html,vue,css,sass,scss}": [ "git add"
"stylelint --fix", ],
"git add" "src/**/*.{html,vue,css,sass,scss}": [
"stylelint --fix",
"git add"
]
},
"engines": {
"node": ">=8.9",
"npm": ">= 3.0.0"
},
"browserslist": [
"> 1%",
"last 2 versions",
"not ie <= 11"
] ]
},
"engines": {
"node": ">=8.9",
"npm": ">= 3.0.0"
},
"browserslist": [
"> 1%",
"last 2 versions",
"not ie <= 11"
]
} }

View File

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

View File

@@ -72,21 +72,21 @@ export function getDicTree() {
} }
export function getDicTreeAdd(data) { export function getDicTreeAdd(data) {
return request({ return request({
url: '/system-boot/dic/add', url: '/system-boot/dictTree/add',
method: 'post', method: 'post',
data: data data: data
}) })
} }
export function getDicTreeUpdate(data) { export function getDicTreeUpdate(data) {
return request({ return request({
url: '/system-boot/dic/update', url: '/system-boot/dictTree/update',
method: 'put', method: 'put',
data: data data: data
}) })
} }
export function getDicTreeDelete(data) { export function getDicTreeDelete(data) {
return request({ return request({
url: '/system-boot/dic/delete', url: '/system-boot/dictTree/delete',
method: 'delete', method: 'delete',
params: data params: data
}) })

View File

@@ -18,7 +18,12 @@ const cgyList = [
'/Statistical-analysis/baselineLevelAssessment', '/Statistical-analysis/baselineLevelAssessment',
'/Statistical-analysis/substationBackgroundHarmonic', '/Statistical-analysis/substationBackgroundHarmonic',
'/Statistical-analysis/steadyStateIndicators', '/Statistical-analysis/steadyStateIndicators',
'/Statistical-analysis/transientIndicators' '/Statistical-analysis/transientIndicators',
'/harmonicWave/homePage',
'/harmonicWave/pointmonitoring',
'/harmonicWave/regionalmonitoring',
'/harmonicWave/comprehensiveanalysis',
'/harmonicWave/CVT'
] ]
// 免登录判断 // 免登录判断
import { sm2, encrypt } from '@/assets/commjs/sm2.js' import { sm2, encrypt } from '@/assets/commjs/sm2.js'
@@ -26,7 +31,11 @@ import { sm3Digest } from '@/assets/commjs/sm3'
import { setDictype, setSysConfig } from '@/utils/auth' import { setDictype, setSysConfig } from '@/utils/auth'
import { gongkey, CodeSr, heBeiToken, menulist, updateFirstPassword, dictypeData, getSysConfig } from '@/api/user' import { gongkey, CodeSr, heBeiToken, menulist, updateFirstPassword, dictypeData, getSysConfig } from '@/api/user'
let routerPath = '' let routerPath = ''
let flag = false
router.beforeEach(async (to, from, next) => { router.beforeEach(async (to, from, next) => {
console.log('🚀 ~ to:', to)
console.log('🚀 ~ getURLParameter ~ window.location.href:', window.location.href)
// start progress bar // start progress bar
// NProgress.start() // NProgress.start()
@@ -42,6 +51,10 @@ router.beforeEach(async (to, from, next) => {
// 超高压河北免登录功能 // 超高压河北免登录功能
if (process.env.VUE_APP_MODE === 'cgyqr') { if (process.env.VUE_APP_MODE === 'cgyqr') {
if (flag) {
flag = false
return next()
}
if (process.env.VUE_APP_HB == 'hbqr') { if (process.env.VUE_APP_HB == 'hbqr') {
// let data = JSON.parse(sessionStorage.getItem('userInfo1')) // let data = JSON.parse(sessionStorage.getItem('userInfo1'))
// if (data.userToken == sessionStorage.getItem('HB_TOKEN')) { // if (data.userToken == sessionStorage.getItem('HB_TOKEN')) {
@@ -53,7 +66,10 @@ router.beforeEach(async (to, from, next) => {
// window.sessionStorage.removeItem('cntoken') // window.sessionStorage.removeItem('cntoken')
// sessionStorage.setItem('HB_TOKEN', data.userToken) // sessionStorage.setItem('HB_TOKEN', data.userToken)
// setTimeout(() => { // setTimeout(() => {
proceed(to, from, next, 'cdf')
// console.log('🚀 ~ getURLParameter ~ url:', url)
proceed({ path: window.location.href.split('#')[1].split('&')[0] }, from, next, 'cdf')
// }, 10) // }, 10)
// } // }
@@ -86,30 +102,22 @@ router.beforeEach(async (to, from, next) => {
// }) // })
// } // }
} else { } else {
const response = await fetch('/') // const response = await fetch('/')
const flag = response.headers.get('X-Xbqr') // const flag = response.headers.get('X-Xbqr')
console.log('🚀 ~ flag:', flag)
if (flag) { let { accessToken, pathname } = getURLParameter('accessToken')
// 超高压嵌入 接受父应用传参 console.log('🚀 ~ accessToken:', accessToken, pathname)
window.addEventListener( // getURLParameter
'message', if (accessToken) {
event => { // 超高压嵌入 接受父应用传参
if (event.data && event.data.type === 'iframeNest') { console.log('超高压嵌入')
let { accessToken, displayMode, theme } = event.data productionManagementCheck({
console.log('我是iframe,我接收到了数据:', accessToken) token: accessToken
productionManagementCheck({ }).then(res => {
token: accessToken if (res.code == 'A0000') {
}).then(res => { proceed({ path: pathname || to.path }, from, next, 'cdf1')
console.log('🚀 ~ receiveMessageFromOutside ~ res:', res)
if (res.code == 'A0000') {
proceed(to, from, next)
}
})
} }
}, })
false
)
} else { } else {
proceed(to, from, next) proceed(to, from, next)
} }
@@ -156,6 +164,45 @@ router.beforeEach(async (to, from, next) => {
} }
} }
}) })
// 解析 URL 参数
function getURLParameter(name) {
// 获取当前页面的 URL
const url = window.location.href
// console.log('🚀 ~ getURLParameter ~ url:', url)
// 使用 URL 对象解析 URL
const urlObj = new URL(url)
console.log('🚀 ~ getURLParameter ~ urlObj:', urlObj)
// 获取查询参数
const params = new URLSearchParams(urlObj.search)
console.log(params.get(name)) // 输出: 123
console.log('pathname', urlObj.pathname) // 输出: 123
// 获取 id 参数
return {
accessToken: params.get('accessToken'),
pathname: urlObj.pathname
}
}
function getURLParameterHb(name) {
// 获取当前页面的 URL
const url = window.location.href
// console.log('🚀 ~ getURLParameter ~ url:', url)
// 使用 URL 对象解析 URL
const urlObj = new URL(url)
console.log('🚀 ~ getURLParameter ~ urlObj:', urlObj)
// 获取查询参数
const params = new URLSearchParams(urlObj.search)
console.log(params.get(name)) // 输出: 123
console.log('pathname', urlObj.pathname) // 输出: 123
// 获取 id 参数
return {
accessToken: params.get('accessToken'),
pathname: urlObj.pathname
}
}
async function proceed(to, from, next, HB_NAME) { async function proceed(to, from, next, HB_NAME) {
// 打印当前 name 和 sessionStorage 中 cntoken 是否为空的日志 // 打印当前 name 和 sessionStorage 中 cntoken 是否为空的日志
@@ -222,12 +269,19 @@ async function proceed(to, from, next, HB_NAME) {
// cgyList.indexOf(to.path) !== -1 // cgyList.indexOf(to.path) !== -1
store.dispatch('user/getmenu').then(async response => { store.dispatch('user/getmenu').then(async response => {
await getmuen(response.data[0]) await getmuen(response.data[0])
router.push({ router.push({
path: cgyList.indexOf(to.path) !== -1 ? to.path : to.path //routerPath path: cgyList.indexOf(to.path) !== -1 ? to.path : to.path //routerPath
}) })
}) })
} }
next()
if (process.env.VUE_APP_KEY == 'scqr') {
flag = true
next(to.path)
} else {
next()
}
}, 500) }, 500)
}) })
.catch(error => { .catch(error => {
@@ -239,7 +293,12 @@ async function proceed(to, from, next, HB_NAME) {
}) })
}) })
} else { } else {
next() if (process.env.VUE_APP_KEY == 'scqr') {
flag = true
next(to.path)
} else {
next()
}
} }
} }

View File

@@ -86,6 +86,37 @@ export const constantRoutes = [
component: () => import('@/views/cgy-harmonic-boot/UPHomePage'), component: () => import('@/views/cgy-harmonic-boot/UPHomePage'),
meta: { title: '信息概览', icon: 'user' } meta: { title: '信息概览', icon: 'user' }
}, },
// 生产管控
{
path: '/harmonicWave/pointmonitoring',
name: 'pointmonitoring',
component: () => import('@/views/cgy-harmonic-boot/line/pointmonitoring'),
meta: { title: '详细数据', icon: '' }
},
{
path: '/harmonicWave/regionalmonitoring',
name: 'regionalmonitoring',
component: () => import('@/views/cgy-harmonic-boot/region/regionalmonitoring'),
meta: { title: '告警统计', icon: '' }
},
{
path: '/harmonicWave/comprehensiveanalysis',
name: 'comprehensiveanalysis',
component: () => import('@/views/cgy-harmonic-boot/comper/comprehensiveanalysis'),
meta: { title: '综合分析', icon: '' }
},
{
path: '/harmonicWave/CVT',
name: 'CVT',
component: () => import('@/views/cgy-harmonic-boot/CVT'),
meta: { title: 'CVT台账管理', icon: '' }
},
{
path: '/harmonicWave/homePage',
name: 'homePage',
component: () => import('@/views/cgy-harmonic-boot/UPHomePage'),
meta: { title: '信息概览', icon: 'user' }
},
// 冀北嵌入 // 冀北嵌入
{ {
@@ -192,9 +223,9 @@ export const asyncRoutes = [
path: '/dashboard/index', path: '/dashboard/index',
name: 'index', name: 'index',
component: () => component: () =>
// import ("@/views/dashboard/index"), import ("@/views/dashboard/index"),
import('@/views/harmonic-boot/detailed/qypowerpollutionzs'), // import('@/views/harmonic-boot/detailed/qypowerpollutionzs'),
//import('@/views/energy-system/operationalCenter/airManageReadOnly.vue'), // import('@/views/energy-system/operationalCenter/airManageReadOnly.vue'),
meta: { title: '首页概览', icon: '', affix: true } meta: { title: '首页概览', icon: '', affix: true }
}, },
{ {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -7,10 +7,11 @@ import { CodeSr } from '@/api/user'
axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8' axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
const service = axios.create({ const service = axios.create({
// baseURL: '/harmonicWaveApi',//超高压生产嵌入
// baseURL: '/PMS3/Application/third/aqcp-dnzl/harmonicWaveApi',//河北嵌入
baseURL: '/api', baseURL: '/api',
timeout: 150000 timeout: 150000
}) })
// service.interceptors.request.use( // service.interceptors.request.use(
// config => { // config => {
// if(config.url !=='/pqs-oauth2/oauth/token' || config.params.grant_type=='refresh_token'){ // if(config.url !=='/pqs-oauth2/oauth/token' || config.params.grant_type=='refresh_token'){

View File

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

View File

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

View File

@@ -539,7 +539,7 @@ export default {
} }
option1 = { option1 = {
title: { title: {
text: '变电站态超标数量', text: '变电站态超标数量',
left: 'center', left: 'center',
top: 10 top: 10
}, },
@@ -777,7 +777,7 @@ export default {
} }
option2 = { option2 = {
title: { title: {
text: '变电站态超标天数', text: '变电站态超标天数',
left: 'center', left: 'center',
top: 20 top: 20
}, },

View File

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

View File

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

View File

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

View File

@@ -38,11 +38,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<timeindex <timeindex :id="id" ref="fff" :interval="interval" :pushForward="true"></timeindex>
:id="id"
ref="fff"
:interval="interval"
></timeindex>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="querfromdata" icon="el-icon-search">查询</el-button> <el-button type="primary" @click="querfromdata" icon="el-icon-search">查询</el-button>
@@ -93,7 +89,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<span> <span>
{{ {{
scope.row.number scope.row.number
? scope.row.number + `` + scope.row.targetName ? scope.row.number + `` + scope.row.targetName
: scope.row.targetName : scope.row.targetName
}} }}
@@ -235,7 +231,7 @@
<script> <script>
import { getheight } from '../../assets/commjs/common' import { getheight } from '../../assets/commjs/common'
import { A, B, C, AB, BC, CA } from '../../assets/commjs/color' import { A, B, C, AB, BC, CA } from '../../assets/commjs/color'
import timeindex from'@/views/cgy-components/cgytree/TimeintervalTemplat.vue' import timeindex from '@/views/cgy-components/cgytree/TimeintervalTemplat.vue'
import pagination from '@/views/cgy-components/pagination/index' import pagination from '@/views/cgy-components/pagination/index'
import api from '@/api/harmonic/onlineData' import api from '@/api/harmonic/onlineData'
import FileSaver from 'file-saver' import FileSaver from 'file-saver'
@@ -351,7 +347,7 @@ export default {
searchBeginTime: '', searchBeginTime: '',
searchEndTime: '' searchEndTime: ''
}, },
interval: 4, interval: 5,
device: 1, device: 1,
limit: 8, limit: 8,
limit2: 8, limit2: 8,
@@ -554,6 +550,8 @@ export default {
}, },
mounted() { mounted() {
this.vh = window.sessionStorage.getItem('appheight') - 120 this.vh = window.sessionStorage.getItem('appheight') - 120
this.$refs.fff.buttonShow=false
this.$refs.fff.interchange(5)
this.querfromdata() this.querfromdata()
}, },
methods: { methods: {
@@ -693,12 +691,10 @@ export default {
// this.formData.searchBeginTime = this.$refs.fff.timeValue[0]; // this.formData.searchBeginTime = this.$refs.fff.timeValue[0];
// this.formData.searchEndTime = this.$refs.fff.timeValue[1]; // this.formData.searchEndTime = this.$refs.fff.timeValue[1];
this.formData.searchBeginTime =this.$refs.fff.intervald == 5 this.formData.searchBeginTime =
? this.$refs.fff.DayTime this.$refs.fff.intervald == 5 ? this.$refs.fff.DayTime : this.$refs.fff.timeValue[0]
: this.$refs.fff.timeValue[0] this.formData.searchEndTime =
this.formData.searchEndTime =this.$refs.fff.intervald == 5 this.$refs.fff.intervald == 5 ? this.$refs.fff.DayTime : this.$refs.fff.timeValue[1]
? this.$refs.fff.DayTime
: this.$refs.fff.timeValue[1]
this.formData.condition = this.value this.formData.condition = this.value
this.formData.inHarmonics = this.inharmonic this.formData.inHarmonics = this.inharmonic
if (this.number == 111) { if (this.number == 111) {

File diff suppressed because it is too large Load Diff

View File

@@ -25,7 +25,9 @@ export default {
}, },
created() { created() {
if (process.env.VUE_APP_MODE === 'cgyqr') { if (process.env.VUE_APP_MODE === 'cgyqr') {
this.guanzhou() if (process.env.VUE_APP_KEY != 'scqr') {
this.guanzhou()
}
} }
}, },
mounted() {}, mounted() {},

View File

@@ -335,7 +335,9 @@ export default {
}, },
created() { created() {
if (process.env.VUE_APP_MODE === 'cgyqr') { if (process.env.VUE_APP_MODE === 'cgyqr') {
this.guanzhou() if (process.env.VUE_APP_KEY != 'scqr') {
this.guanzhou()
}
} }
this.getIndexType() this.getIndexType()
//this.time() //this.time()

File diff suppressed because it is too large Load Diff

View File

@@ -31,7 +31,9 @@ export default {
}, },
created() { created() {
if (process.env.VUE_APP_MODE === 'cgyqr') { if (process.env.VUE_APP_MODE === 'cgyqr') {
this.guanzhou() if (process.env.VUE_APP_KEY != 'scqr') {
this.guanzhou()
}
} }
}, },
mounted() { mounted() {

View File

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

View File

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

View File

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

View File

@@ -1,73 +1,75 @@
<template> <template>
<div class="pa10"> <div class="pa10">
<el-tabs type="border-card" v-model="activeName" @tab-click="handleClick" style="height:calc(100vh - 20px)"> <el-tabs type="border-card" v-model="activeName" @tab-click="handleClick" style="height: calc(100vh - 20px)">
<el-tab-pane label="监测点数据查询" name="first"> <el-tab-pane label="监测点数据查询" name="first">
<onlineData ></onlineData> <onlineData></onlineData>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="监测点台账信息" name="second"> <el-tab-pane label="监测点台账信息" name="second">
<devicemessage ></devicemessage> <devicemessage></devicemessage>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="终端台账信息" name="third"> <el-tab-pane label="终端台账信息" name="third">
<terminalmessage > </terminalmessage> <terminalmessage></terminalmessage>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="数据完整性统计" name="sen"> <el-tab-pane label="数据完整性统计" name="sen">
<integralitytable ></integralitytable> <integralitytable></integralitytable>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
</template> </template>
<script> <script>
import onlineData from "@/views/cgy-harmonic-boot/monitor/onlineData"; import onlineData from '@/views/cgy-harmonic-boot/monitor/onlineData'
import terminalmessage from "@/views/cgy-harmonic-boot/runmange/terminalmessage"; import terminalmessage from '@/views/cgy-harmonic-boot/runmange/terminalmessage'
import devicemessage from "@/views/cgy-harmonic-boot/runmange/devicemessage"; import devicemessage from '@/views/cgy-harmonic-boot/runmange/devicemessage'
import integralitytable from "@/views/cgy-harmonic-boot/area/integralitytable"; import integralitytable from '@/views/cgy-harmonic-boot/area/integralitytable'
import api1 from '@/api/pollution/pollution' import api1 from '@/api/pollution/pollution'
export default { export default {
components: { components: {
onlineData, onlineData,
devicemessage, devicemessage,
terminalmessage, terminalmessage,
integralitytable, integralitytable
}, },
data() { data() {
return { return {
activeName:'first', activeName: 'first',
vh:null vh: null
};
},
created() {
if (process.env.VUE_APP_MODE === 'cgyqr') {
this.guanzhou()
}
},
mounted() {
this.vh = window.sessionStorage.getItem('appheight')-12+'px'
},
methods: {
guanzhou(){
var data ={
token:this.$route.query.token
} }
api1.guanzhou(data).then(res=>{ },
if(res.code=='A0000'){ created() {
return if (process.env.VUE_APP_MODE === 'cgyqr') {
}else{ if (process.env.VUE_APP_KEY != 'scqr') {
this.$router.push('/error/massege/403') this.guanzhou()
} }
}) }
}, },
handleClick(tab, event) { mounted() {
// console.log(tab, event); this.vh = window.sessionStorage.getItem('appheight') - 12 + 'px'
this.activeName = tab.name },
} 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')
}
})
},
handleClick(tab, event) {
// console.log(tab, event);
this.activeName = tab.name
}
}
}
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.pa10 { .pa10 {
padding: 10px; padding: 10px;
} }
::v-deep .el-tabs--border-card>.el-tabs__content { ::v-deep .el-tabs--border-card > .el-tabs__content {
padding: 10px; padding: 10px;
} }
</style> </style>

View File

@@ -37,7 +37,10 @@ export default {
}, },
created() { created() {
if (process.env.VUE_APP_MODE === 'cgyqr') { if (process.env.VUE_APP_MODE === 'cgyqr') {
this.guanzhou() // this.guanzhou()
if (process.env.VUE_APP_KEY != 'scqr') {
this.guanzhou()
}
} }
}, },
mounted() {}, mounted() {},

View File

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

View File

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

View File

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

View File

@@ -202,14 +202,14 @@
type="danger" type="danger"
size="small" size="small"
v-if="scope.row.type === 1" v-if="scope.row.type === 1"
style="color: red" style="color: #008000"
>开机策略</el-tag >开机策略</el-tag
> >
<el-tag <el-tag
type="primary" type="primary"
size="small" size="small"
v-if="scope.row.type === 2" v-if="scope.row.type === 2"
style="color: green" style="color: #991717"
>关机策略</el-tag >关机策略</el-tag
> >
</template> </template>
@@ -256,24 +256,24 @@
}}</span> }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <!-- <el-table-column
width="150" width="150"
align="center" align="center"
prop="wind" prop="wind"
label="状态" label="状态"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<span type="primary" size="small">{{ <span type="primary" size="small">{{
statusGet(scope.row.status) statusGet(scope.row.status)
}}</span> }}</span>
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column align="center" prop="sjfw" label="涉及范围" > <el-table-column align="center" prop="sjfw" label="涉及范围" >
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-if="scope.row.sjfw==0" @click="confingview(scope.row)" type="primary" size="mini">配置</el-button> <el-button v-if="scope.row.sjfw==0" @click="confingview(scope.row)" type="primary" size="mini">配置</el-button>
<el-button v-if="scope.row.sjfw==1" type="primary" size="mini">查看</el-button> <el-button v-if="scope.row.sjfw==1" type="primary" size="mini">查看</el-button>
</template> </template>
</el-table-column> --> </el-table-column> -->
<el-table-column align="center" prop="caozuo" label="操作"> <el-table-column align="center" prop="caozuo" label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
@@ -283,12 +283,18 @@
>查看</el-button >查看</el-button
> >
<el-button <el-button
v-if="scope.row.status === 0"
type="primary" type="primary"
size="mini" size="mini"
@click="edit(scope.row.id)" @click="edit(scope.row.id)"
>修改</el-button >修改</el-button
> >
<el-button
v-if="scope.row.status === 1"
type="primary"
@click="stopAirStrategy(scope.row.id)"
size="mini"
>停止</el-button
>
<!-- <el-button <!-- <el-button
v-if="scope.row.status !== 1" v-if="scope.row.status !== 1"
type="primary" type="primary"
@@ -303,20 +309,14 @@
size="mini" size="mini"
>执行</el-button >执行</el-button
> >
<el-button
v-if="scope.row.status === 1"
type="primary"
@click="stopAirStrategy(scope.row.id)"
size="mini"
>停止</el-button
>-->
<el-button <el-button
v-if="scope.row.status === 2" v-if="scope.row.status === 2"
@click="querydata(scope.row)" @click="querydata(scope.row)"
type="primary" type="primary"
size="mini" size="mini"
>趋势查看 >趋势查看
</el-button> </el-button>-->
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>

View File

@@ -1330,64 +1330,7 @@ export default {
this.get_bodyHeight(); this.get_bodyHeight();
this.connectMqtt(); this.connectMqtt();
this.globalMqtt.ws.on("connect", (e) => {
this.$message.success("连接mqtt服务器成功!");
console.log("mqtt客户端已连接....");
this.globalMqtt.ws.subscribe("/platform/devack/#");
});
this.globalMqtt.ws.on("error", (error) => {
console.log("mqtt连接失败...", error);
this.mqtt.end();
});
this.globalMqtt.ws.on("close", function () {
console.log("mqtt客户端已断开连接.....");
});
let index = 0;
this.globalMqtt.ws.on("message", (topic, message) => {
let that = this;
if (message) {
let json = JSON.parse(message);
if (json.code === 200) {
if (json.param.action === "ACInMode") {
this.$message.success("内机模式调节成功!");
} else if (json.param.action === "ACInSpeed") {
this.$message.success("内机风速调节成功!");
} else if (json.param.action === "ACInSetTmp") {
this.$message.success("内机温度调节成功!");
} else if (json.param.action === "ACInStat") {
this.$message.success("内机开关机操作成功!");
} else {
this.$message.success("操作成功!");
}
window.setTimeout(function () {
that.getStatisTemplateById();
}, 10000);
} else {
this.$message.error(json.msg);
if (this.userIndex === json.userId) {
this.mqttSendCount++;
if (this.mqttSendCount > 2) {
return;
} else {
this.globalMqtt.ws.publish(
"/platform/devcmd/v1/" + this.devInfo.ndid,
JSON.stringify(this.mqttSendMsg)
);
}
console.log("错误+++进行重发" + this.mqttSendCount);
}
}
this.buttonDisable = false;
}
console.log("收到消息:" + topic + message);
});
//如果别的页面路由过来的进行路由参数处理 //如果别的页面路由过来的进行路由参数处理
}, },
@@ -1411,11 +1354,13 @@ export default {
} }
}, },
methods: { methods: {
connectMqtt() { async connectMqtt() {
this.globalMqtt.ws = {};
let this_ = this
this_.globalMqtt.ws = {};
let mqttWs = null; let mqttWs = null;
let userName = this.$store.state.user.userInfo.loginName; let userName = this_.$store.state.user.userInfo.loginName;
const options = { const options = {
qos: 2, qos: 2,
clean: true, clean: true,
@@ -1424,9 +1369,73 @@ export default {
username: "t_user", username: "t_user",
password: "njcnpqs", password: "njcnpqs",
}; };
const url = "wss://pqmcn.com:8087/mqtt"; const url = localStorage.getItem('MqttUrl') == 'null'
mqttWs = mqtt.connect(url, options); ? 'ws://192.168.1.24:8085/mqtt'
this.globalMqtt.setWs(mqttWs); : localStorage.getItem('MqttUrl')
console.log("🚀 ~ connectMqtt ~ url:", url)
mqttWs =await mqtt.connect(url, options);
this_.globalMqtt.setWs(mqttWs);
this_.globalMqtt.ws.on("connect", (e) => {
this_.$message.success("连接mqtt服务器成功!");
console.log("mqtt客户端已连接....");
this_.globalMqtt.ws.subscribe("/platform/devack/#");
});
this_.globalMqtt.ws.on("error", (error) => {
console.log("mqtt连接失败...", error);
this.mqtt.end();
});
this_.globalMqtt.ws.on("close", function () {
console.log("mqtt客户端已断开连接.....");
});
this_.globalMqtt.ws.on("message", (topic, message) => {
let that = this;
if (message) {
let json = JSON.parse(message);
if (json.code === 200) {
if (json.param.action === "ACInMode") {
this_.$message.success("内机模式调节成功!");
} else if (json.param.action === "ACInSpeed") {
this_.$message.success("内机风速调节成功!");
} else if (json.param.action === "ACInSetTmp") {
this_.$message.success("内机温度调节成功!");
} else if (json.param.action === "ACInStat") {
this_.$message.success("内机开关机操作成功!");
} else {
this_.$message.success("操作成功!");
}
window.setTimeout(function () {
that.getStatisTemplateById();
}, 10000);
} else {
this_.$message.error(json.msg);
if (this_.userIndex === json.userId) {
this_.mqttSendCount++;
if (this_.mqttSendCount > 2) {
return;
} else {
this_.globalMqtt.ws.publish(
"/platform/devcmd/v1/" + this.devInfo.ndid,
JSON.stringify(this.mqttSendMsg)
);
}
console.log("错误+++进行重发" + this.mqttSendCount);
}
}
this_.buttonDisable = false;
}
console.log("收到消息:" + topic + message);
});
}, },
//子节点树点击事件 //子节点树点击事件
getTreeText(data, level) { getTreeText(data, level) {
@@ -2009,7 +2018,7 @@ window.echartsArr.push(myChart);
switchChange(item, type) { switchChange(item, type) {
console.log(item); console.log(item);
console.log(type); console.log(type);
console.log(this.devInfo.ndid);
let msg = { let msg = {
mid: 1, mid: 1,
@@ -2025,10 +2034,14 @@ window.echartsArr.push(myChart);
}, },
}; };
this.globalMqtt.ws.publish( let topic = "/platform/devcmd/v1/" + this.devInfo.ndid;
"/platform/devcmd/v1/" + this.devInfo.ndid, console.log(topic);
JSON.stringify(msg) this.globalMqtt.ws.publish(topic, JSON.stringify(msg), { qos: 0 }, (err) => {
); if (err) console.error("发送失败:", err);
else console.log("发送成功");
})
this.mqttSendMsg = msg; this.mqttSendMsg = msg;
this.mqttSendCount = 0; this.mqttSendCount = 0;

View File

@@ -51,7 +51,9 @@ export default {
}; };
}, },
created() { created() {
this.guanzhou() if (process.env.VUE_APP_KEY != 'scqr') {
this.guanzhou()
}
}, },
mounted() { mounted() {

View File

@@ -48,7 +48,9 @@ export default {
} }
}, },
created() { created() {
this.guanzhou() if (process.env.VUE_APP_KEY != 'scqr') {
this.guanzhou()
}
}, },
mounted() { mounted() {
this.setHeight() this.setHeight()

View File

@@ -75,7 +75,9 @@ export default {
}; };
}, },
created() { created() {
this.guanzhou(); if (process.env.VUE_APP_KEY != 'scqr') {
this.guanzhou()
}
}, },
mounted() {}, mounted() {},
methods: { methods: {

View File

@@ -10,7 +10,7 @@
<el-button @click="queryData()" type="primary" size="mini" style="margin-left:1%;" icon="el-icon-search">查询</el-button> --> <el-button @click="queryData()" type="primary" size="mini" style="margin-left:1%;" icon="el-icon-search">查询</el-button> -->
<el-form :inline="true" :model="form" class="demo-form-inline"> <el-form :inline="true" :model="form" class="demo-form-inline">
<el-form-item> <el-form-item>
<el-button @click="AddTypeClick" type="primary" icon="el-icon-plus">新增字典类型</el-button> <el-button @click="AddTypeClick" type="primary" icon="el-icon-plus">新增字典类型</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-select <el-select

View File

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

View File

@@ -18,7 +18,7 @@ module.exports = {
// publicPath: 'https://fuphoenixes.github.io/example/dist/', // publicPath: 'https://fuphoenixes.github.io/example/dist/',
//publicPath: "./", //publicPath: "./",
// publicPath: process.env.VUE_APP_PATH, // publicPath: process.env.VUE_APP_PATH,
publicPath: process.env.NODE_ENV === 'development' ? './' : process.env.VUE_APP_MODE == 'jbqr' ? './' : '/', publicPath: './', //process.env.NODE_ENV === 'development' ? './' : process.env.VUE_APP_MODE == 'jbqr' ? './' : '/',
outputDir: 'dist', outputDir: 'dist',
assetsDir: 'static', assetsDir: 'static',
// lintOnSave: process.env.NODE_ENV === 'development', // lintOnSave: process.env.NODE_ENV === 'development',
@@ -37,9 +37,9 @@ module.exports = {
'/api': { '/api': {
// target: 'http://18028358809.gnway.cc', //hsw // target: 'http://18028358809.gnway.cc', //hsw
// target: 'http://192.168.120.210:10215', //hsw // target: 'http://192.168.120.210:10215', //hsw
target: 'http://192.168.1.29:10215', //超高压 // target: 'http://192.168.1.28:10215', //超高压
// target: "'https://pqmcn.com:8092/api", //治理 // target: "'https://pqmcn.com:8092/api", //治理
// target: 'http://192.168.1.24:10215', // 河北 target: 'http://192.168.1.67:10215', // 河北
// target: "http://192.168.1.31:10215", // 海南 // target: "http://192.168.1.31:10215", // 海南
// target: "http://192.168.1.29:10215", // 冀北 // target: "http://192.168.1.29:10215", // 冀北
changeOrigin: true, changeOrigin: true,