7 Commits

Author SHA1 Message Date
39093641d8 用能系统功能调整 2025-07-24 11:40:23 +08:00
guanj
c88484caf7 修改现场问题 2025-07-16 18:10:24 +08:00
GGJ
bb7eb039b5 修改 监测指标数据质量统计字段名称 2025-04-21 13:33:40 +08:00
GGJ
b317bf9c7d Merge branch 'master' of http://192.168.1.22:3000/root/HB_PMS3.0_WEB 2025-04-18 15:15:09 +08:00
GGJ
0a521bdcb7 配置超高压生产嵌入系统 2025-04-18 15:15:00 +08:00
263cd764f3 1.主网台账修改 2025-03-21 16:20:25 +08:00
a04bb33206 1.主配网测点数据重算功能bug
2.监督计划新增校验
2025-03-21 08:58:54 +08:00
30 changed files with 1356 additions and 1176 deletions

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

@@ -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

@@ -15,6 +15,14 @@ export function heBeiToken(data) {
params: data, params: data,
}); });
} }
// /超高压嵌入token校验
export function productionManagementCheck(data) {
return request({
url: "/pqs-auth/judgeToken/productionManagementCheck",
method: "post",
params: data,
});
}
//登录获取token //登录获取token
export function login(data) { export function login(data) {
return request({ return request({

View File

@@ -3,8 +3,7 @@ import store from './store'
import NProgress from 'nprogress' // progress bar import NProgress from 'nprogress' // progress bar
import 'nprogress/nprogress.css' // progress bar style import 'nprogress/nprogress.css' // progress bar style
import getPageTitle from '@/utils/get-page-title' import getPageTitle from '@/utils/get-page-title'
import { logout } from '@/api/user.js' import { productionManagementCheck } from '@/api/user.js'
// NProgress.configure({ showSpinner: false }) // NProgress Configuration // NProgress.configure({ showSpinner: false }) // NProgress Configuration
// && from.path === '/agreement' && from.path === '/policy' // && from.path === '/agreement' && from.path === '/policy'
const whiteList = ['/login', '/agreement', '/policy'] // no redirect whitelist const whiteList = ['/login', '/agreement', '/policy'] // no redirect whitelist
@@ -19,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'
@@ -27,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()
@@ -43,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')) {
@@ -54,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)
// } // }
@@ -87,7 +102,25 @@ router.beforeEach(async (to, from, next) => {
// }) // })
// } // }
} else { } else {
proceed(to, from, next) // const response = await fetch('/')
// const flag = response.headers.get('X-Xbqr')
let { accessToken, pathname } = getURLParameter('accessToken')
console.log('🚀 ~ accessToken:', accessToken, pathname)
// getURLParameter
if (accessToken) {
// 超高压嵌入 接受父应用传参
console.log('超高压嵌入')
productionManagementCheck({
token: accessToken
}).then(res => {
if (res.code == 'A0000') {
proceed({ path: pathname || to.path }, from, next, 'cdf1')
}
})
} else {
proceed(to, from, next)
}
} }
// else { // else {
@@ -131,11 +164,54 @@ 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 是否为空的日志
let name = HB_NAME || 'cdf' let name = HB_NAME || 'cdf'
// 检查 sessionStorage 中是否没有 cntoken
console.log('🚀 ~ proceed ~ name:', name, window.sessionStorage.getItem('cntoken') == null) console.log('🚀 ~ proceed ~ name:', name, window.sessionStorage.getItem('cntoken') == null)
// 定义默认密码
if (window.sessionStorage.getItem('cntoken') == null) { if (window.sessionStorage.getItem('cntoken') == null) {
// 初始化登录表单
let password = '@#001njcnpqs' let password = '@#001njcnpqs'
let loginjmForm = { let loginjmForm = {
username: '', username: '',
@@ -143,47 +219,69 @@ async function proceed(to, from, next, HB_NAME) {
grant_type: 'captcha', grant_type: 'captcha',
verifyCode: 0, verifyCode: 0,
imageCode: '' imageCode: ''
// 对 name 进行加密处理
} }
let username = encrypt(name) let username = encrypt(name)
// 设置登录表单的用户名
// 将应用高度存储到 sessionStorage 中
loginjmForm.username = username loginjmForm.username = username
// 调用 gongkey 函数获取公钥
window.sessionStorage.setItem('appheight', document.body.offsetHeight - 10) window.sessionStorage.setItem('appheight', document.body.offsetHeight - 10)
await gongkey({ loginName: username }).then(async response => { await gongkey({ loginName: username }).then(async response => {
window.publicKey = response.data window.publicKey = response.data
// 将公钥存储到全局变量和 localStorage 中
window.localStorage.setItem('publicKey', response.data) window.localStorage.setItem('publicKey', response.data)
var sm3Pwd = sm3Digest(password) var sm3Pwd = sm3Digest(password)
// 使用 SM3 算法对密码进行摘要处理
var jiamipassword = '' var jiamipassword = ''
// 使用 SM2 算法对密码进行加密
jiamipassword = sm2(sm3Pwd + '|' + password, publicKey, 0) jiamipassword = sm2(sm3Pwd + '|' + password, publicKey, 0)
loginjmForm.password = jiamipassword loginjmForm.password = jiamipassword
// 设置登录表单的加密密码
store store
// 调用 Vuex 的 login 方法进行登录
.dispatch('user/login', loginjmForm) .dispatch('user/login', loginjmForm)
.then(async response => { .then(async response => {
if (response.code === 'A0101' && response.message === '登录认证,密码失效,请重置') { if (response.code === 'A0101' && response.message === '登录认证,密码失效,请重置') {
// 如果登录响应需要重置密码
CodeSr().then(response => { CodeSr().then(response => {
// 调用 CodeSr 函数获取验证码图片
let blob = new Blob([response], { type: 'image/jpg' }) let blob = new Blob([response], { type: 'image/jpg' })
let url = window.URL.createObjectURL(blob) let url = window.URL.createObjectURL(blob)
}) })
} }
await store.dispatch('user/getInfo') await store.dispatch('user/getInfo')
// 获取用户信息
// 根据角色生成可访问的路线图 // 根据角色生成可访问的路线图
const accessRoutes = await store.dispatch('permission/generateRoutes') const accessRoutes = await store.dispatch('permission/generateRoutes')
// 动态添加可访问的路由 // 动态添加可访问的路由
setTimeout(() => { setTimeout(() => {
router.addRoutes(accessRoutes) router.addRoutes(accessRoutes)
if (response.code === 'A0000') { if (response.code === 'A0000') {
// 如果登录成功
loginjmForm.verifyCode = 0 loginjmForm.verifyCode = 0
// 重置验证码
SysConfig() SysConfig()
// 调用 SysConfig 函数进行系统配置
// 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 => {
@@ -195,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

@@ -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

@@ -615,21 +615,24 @@ export default {
//台区台账表头 //台区台账表头
tableHeaderMonitoring: [ tableHeaderMonitoring: [
// { prop: 'id', label: '监测点编号', width: 120 }, // { prop: 'id', label: '监测点编号', width: 120 },
{ prop: 'monitorObjectName', label: '监测对象名称', width: 250 },
{ prop: 'name', label: '测点名称', width: 220 }, { prop: 'name', label: '测点名称', width: 220 },
{ prop: 'monitorId', label: '测点编号', width: 220 },
{ prop: 'orgName', label: '组织机构名称', width: 170 }, { prop: 'orgName', label: '组织机构名称', width: 170 },
{ prop: 'operationName', label: '运维单位名称', width: 170 }, { prop: 'operationName', label: '运维单位名称', width: 170 },
{ prop: 'midStation', label: '变电站编号', width: 150 },
{ prop: 'powerrName', label: '变电站名称', width: 120 }, { prop: 'powerrName', label: '变电站名称', width: 120 },
//{ prop: "generatrixName", label: "母线名称", width: 120 },
{ prop: 'busId', label: '母线编号', width: 180 }, { prop: 'busId', label: '母线编号', width: 180 },
{ prop: 'lineName', label: '母线名称', width: 180 }, { prop: 'lineName', label: '母线名称', width: 180 },
// { prop: "lineId", label: "监测线路ID", width: 180 }, { prop: "lineNum", label: "装置接线序号", width: 180 },
{ prop: 'voltageLevel', label: '电压等级', width: 100 }, { prop: 'voltageLevel', label: '电压等级', width: 100 },
{ prop: 'monitorState', label: '监测点状态', width: 120 }, { prop: 'monitorState', label: '监测点状态', width: 120 },
{ prop: 'monitorObjectName', label: '监测对象名称', width: 250 },
{ prop: 'monitorType', label: '监测点类型', width: 120 }, { prop: 'monitorType', label: '监测点类型', width: 120 },
{ prop: 'minShortCircuitCapacity', label: '最小短路容量', width: 120 }, { prop: 'minShortCircuitCapacity', label: '最小短路容量', width: 120 },
{ prop: 'powerSupplyEqCapacity', label: '供电设备容量', width: 120 }, { prop: 'powerSupplyEqCapacity', label: '供电设备容量', width: 120 },
{ prop: 'userAgreementCapacity', label: '用户协议容量', width: 120 }, { prop: 'userAgreementCapacity', label: '用户协议容量', width: 120 },
{ prop: 'putDate', label: '投运日期', width: 120 },
{ {
prop: 'voltageDeviationUpperLimit', prop: 'voltageDeviationUpperLimit',
label: '电压偏差限值(上)', label: '电压偏差限值(上)',
@@ -1384,7 +1387,7 @@ export default {
form.pageSize = this.total form.pageSize = this.total
getAllMonitorPageList(form).then(res => { getAllMonitorPageList(form).then(res => {
this.$refs.Monitoringpoint.exportData({ this.$refs.Monitoringpoint.exportData({
filename: '监测点台账', // 文件名字 filename: '监测点台账'+new Date().getTime(), // 文件名字
sheetName: 'Sheet1', sheetName: 'Sheet1',
type: 'xlsx', //导出文件类型 xlsx 和 csv type: 'xlsx', //导出文件类型 xlsx 和 csv
useStyle: true, useStyle: true,

View File

@@ -88,7 +88,7 @@ export default {
{ prop: 'effectiveAccessRate', label: '有效接入率(%)' }, { prop: 'effectiveAccessRate', label: '有效接入率(%)' },
{ prop: 'dataIntegrityRate', label: '数据完整率(%)' }, { prop: 'dataIntegrityRate', label: '数据完整率(%)' },
{ prop: 'indexIntegrityRate', label: '指标完整率(%)' }, { prop: 'indexIntegrityRate', label: '指标完整率(%)' },
{ prop: 'isUnusual', label: '数据是否异常' } { prop: 'isUnusual', label: '异常监测点数' }
], ],
qualitystatisticsData: [], qualitystatisticsData: [],
device: '', device: '',
@@ -154,13 +154,13 @@ export default {
//判断数据是否异常 //判断数据是否异常
cellStyle(row) { cellStyle(row) {
console.log(row) console.log(row)
if (row.columnIndex == 6) { // if (row.columnIndex == 6) {
if (row.row.isUnusual == 0) { // if (row.row.isUnusual == 0) {
row.row.isUnusual = '正常 ' // row.row.isUnusual = '正常 '
} else if (row.row.isUnusual == 1) { // } else if (row.row.isUnusual == 1) {
row.row.isUnusual = '异常' // row.row.isUnusual = '异常'
} // }
} // }
}, },
//导出 //导出
exportEvent() { exportEvent() {

View File

@@ -2024,12 +2024,22 @@ export default {
this.$refs.ruleform.validate(value => { this.$refs.ruleform.validate(value => {
// console.log(value); // console.log(value);
if (value == true) { if (value == true) {
if(this.ruleform.ifReleaseWarning == 1){
//需要提示预告警单不能为空
if(this.ruleform.workAlarmId == null || this.ruleform.workAlarmId == ''){
this.$message.warning("关联告预警单不可为空!");
return
}
}
this.$confirm('是否确认新增?', '提示', { this.$confirm('是否确认新增?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}) })
.then(() => { .then(() => {
addProblem(this.ruleform).then(res => { addProblem(this.ruleform).then(res => {
if (res.code == 'A0000') { if (res.code == 'A0000') {
this.$message({ this.$message({
@@ -2194,6 +2204,14 @@ export default {
this.$refs.ruleform.validate(value => { this.$refs.ruleform.validate(value => {
// console.log(value); // console.log(value);
if (value == true) { if (value == true) {
if(this.ruleform.ifReleaseWarning == 1){
//需要提示预告警单不能为空
if(this.ruleform.workAlarmId == null || this.ruleform.workAlarmId == ''){
this.$message.warning("关联告预警单不可为空!");
return
}
}
this.$confirm('是否确认修改?', '提示', { this.$confirm('是否确认修改?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',

View File

@@ -29,7 +29,7 @@
<el-col :span="24"> <el-col :span="24">
<div class="button" style="float: left"> <div class="button" style="float: left">
<el-button type="primary" icon="el-icon-circle-plus" @click="planAdditionFn">新增计划</el-button> <el-button type="primary" icon="el-icon-circle-plus" @click="planAdditionFn">新增计划</el-button>
<el-button type="primary" icon="el-icon-s-claim" @click="planReviewFn">提交审核</el-button> <!-- <el-button type="primary" icon="el-icon-s-claim" @click="planReviewFn">提交审核</el-button>-->
</div> </div>
<div class="button"> <div class="button">
@@ -667,7 +667,7 @@ export default {
//获取审核人列表 //获取审核人列表
getAuditUser() { getAuditUser() {
let param = {roleType: 3} let param = {roleType: 1}
getAuditUser(param).then(res => { getAuditUser(param).then(res => {
if (res && res.code === 'A0000') { if (res && res.code === 'A0000') {
this.auditUserList = res.data this.auditUserList = res.data

View File

@@ -1195,7 +1195,7 @@ export default {
//获取审核人列表 //获取审核人列表
getAuditUser() { getAuditUser() {
let param = {roleType: 3} let param = {roleType: 1}
getAuditUser(param).then(res => { getAuditUser(param).then(res => {
if (res && res.code === 'A0000') { if (res && res.code === 'A0000') {
this.auditUserList = res.data this.auditUserList = res.data

View File

@@ -6,9 +6,9 @@
<el-tab-pane label="普测计划管理" name="1" :style="'height:' + vh + 'px;'"> <el-tab-pane label="普测计划管理" name="1" :style="'height:' + vh + 'px;'">
<Planmanagement v-if="activeName == '1'"></Planmanagement> <Planmanagement v-if="activeName == '1'"></Planmanagement>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="普测计划审批" name="2" :style="'height:' + vh + 'px;'"> <!-- <el-tab-pane label="普测计划审批" name="2" :style="'height:' + vh + 'px;'">
<Planapproval v-if="activeName == '2'" ref="planapprovalRef" :son="planId"></Planapproval> <Planapproval v-if="activeName == '2'" ref="planapprovalRef" :son="planId"></Planapproval>
</el-tab-pane> </el-tab-pane>-->
<!-- <el-tab-pane label="普测结果管理" name="3" :style="'height:' + vh + 'px;'"> <!-- <el-tab-pane label="普测结果管理" name="3" :style="'height:' + vh + 'px;'">
<Resultsmanagement v-if="activeName == '3'"></Resultsmanagement> <Resultsmanagement v-if="activeName == '3'"></Resultsmanagement>
</el-tab-pane> </el-tab-pane>

View File

@@ -35,13 +35,13 @@
<influence v-if="activeName == '4'"></influence> <influence v-if="activeName == '4'"></influence>
</el-tab-pane> </el-tab-pane>
<!-- <el-tab-pane <el-tab-pane
label="详细数据表" label="详细数据表"
name="5" name="5"
:style="'height:' + vh + ';'" :style="'height:' + vh + ';'"
> >
<dataSheet v-if="activeName == '5'"></dataSheet> <dataSheet v-if="activeName == '5'"></dataSheet>
</el-tab-pane> --> </el-tab-pane>
</el-tabs> </el-tabs>
</el-col> </el-col>
</el-row> </el-row>

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

@@ -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()

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

@@ -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() { 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() { }
this.vh = window.sessionStorage.getItem('appheight')-12+'px' },
}, mounted() {
methods: { this.vh = window.sessionStorage.getItem('appheight') - 12 + 'px'
guanzhou(){ },
var data ={ methods: {
token:this.$route.query.token guanzhou() {
} var data = {
api1.guanzhou(data).then(res=>{ token: this.$route.query.token
if(res.code=='A0000'){ }
return api1.guanzhou(data).then(res => {
}else{ if (res.code == 'A0000') {
this.$router.push('/error/massege/403') return
} } else {
}) this.$router.push('/error/massege/403')
}, }
handleClick(tab, event) { })
// console.log(tab, event); },
this.activeName = tab.name 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

@@ -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);
});
//如果别的页面路由过来的进行路由参数处理 //如果别的页面路由过来的进行路由参数处理
}, },
@@ -1412,10 +1355,11 @@ export default {
}, },
methods: { methods: {
connectMqtt() { 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 +1368,69 @@ export default {
username: "t_user", username: "t_user",
password: "njcnpqs", password: "njcnpqs",
}; };
const url = "wss://pqmcn.com:8087/mqtt"; const url = "ws://192.168.1.24:8085/mqtt";
mqttWs = mqtt.connect(url, options); mqttWs = mqtt.connect(url, options);
this.globalMqtt.setWs(mqttWs); 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) {
@@ -1694,7 +1698,7 @@ export default {
}, },
querfromdata(data, timehbValue, type, interval) { querfromdata(data, timehbValue, type, interval) {
this.interval = interval; this.interval = interval;
this.timeRange = data; this.timeRange = data;
if (type == 1) { if (type == 1) {
@@ -2009,7 +2013,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 +2029,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

@@ -264,7 +264,7 @@ export default {
//获取审核人列表 //获取审核人列表
getAuditUser() { getAuditUser() {
let param = {roleType: 3} let param = {roleType: 1}
getAuditUser(param).then(res => { getAuditUser(param).then(res => {
if (res && res.code === 'A0000') { if (res && res.code === 'A0000') {
this.auditUserList = res.data this.auditUserList = res.data

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

@@ -69,7 +69,7 @@
</el-form-item> </el-form-item>
<el-form-item style="float: right;margin-right: 50px"> <el-form-item style="float: right;margin-right: 50px">
<el-button :disabled="store.params.dataType === '01'" type="primary" @click="reCalUpload(activeName)"> <el-button :disabled="store.params.dataType === '01'" type="primary" @click="reCalUpload('1')">
{{ storeList[activeName].label + '重新计算' }} {{ storeList[activeName].label + '重新计算' }}
</el-button> </el-button>
</el-form-item> </el-form-item>
@@ -605,7 +605,7 @@ export default {
let dateMonth = this.store.params.searchBeginTime.substring(0, 7) let dateMonth = this.store.params.searchBeginTime.substring(0, 7)
//月 //月
request request
.get('/prepare-boot/dimGlobal/reCalMonthUploadAlgorithm?statisticDate=' + dateMonth + '&type=' + type) .get('/prepare-boot/dimGlobal/reCalMonthUploadAlgorithm?statisticDate=' + dateMonth + '&type=1')
.then(res => { .then(res => {
if (res && res.code === 'A0000') { if (res && res.code === 'A0000') {
this.$message({ this.$message({
@@ -617,7 +617,7 @@ export default {
}) })
} else { } else {
request request
.get('/prepare-boot/dimGlobal/reCalUploadAlgorithm?statisticDate=' + this.store.params.searchBeginTime + '&type=' + type) .get('/prepare-boot/dimGlobal/reCalUploadAlgorithm?statisticDate=' + this.store.params.searchBeginTime + '&type=1')
.then(res => { .then(res => {
if (res && res.code === 'A0000') { if (res && res.code === 'A0000') {
this.$message({ this.$message({

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

@@ -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.24: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,