修改现场问题

This commit is contained in:
guanj
2025-07-16 18:10:24 +08:00
parent bb7eb039b5
commit c88484caf7
16 changed files with 1171 additions and 1072 deletions

View File

@@ -8,12 +8,14 @@
"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-hbqr": "cross-env VUE_APP_MODE=cgyqr VUE_APP_HB=hbqr VUE_APP_KEY=scqr vue-cli-service serve",
"dev-jbqr": "cross-env VUE_APP_MODE=jbqr vue-cli-service serve", "dev-jbqr": "cross-env VUE_APP_MODE=jbqr vue-cli-service serve",
"build": "vue-cli-service build", "build": "vue-cli-service build",
"build-zoom": "cross-env VUE_APP_ZOOM=1 vue-cli-service build", "build-zoom": "cross-env VUE_APP_ZOOM=1 vue-cli-service build",
"build-hbqr": "cross-env VUE_APP_MODE=cgyqr VUE_APP_HB=hbqr 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-cgyqr": "cross-env VUE_APP_MODE=cgyqr vue-cli-service build", "build-cgyqr": "cross-env VUE_APP_MODE=cgyqr vue-cli-service build",
"build-cgyqr1": "cross-env VUE_APP_MODE=cgyqr VUE_APP_KEY=scqr vue-cli-service build",
"build-jbqr": "cross-env VUE_APP_MODE=jbqr vue-cli-service build", "build-jbqr": "cross-env VUE_APP_MODE=jbqr vue-cli-service build",
"preview": "node build/index.js --preview", "preview": "node build/index.js --preview",
"deploy-18": "cross-env VUE_APP_ZOOM=1 vue-cli-service build && ./upload_script/upload_18.sh" "deploy-18": "cross-env VUE_APP_ZOOM=1 vue-cli-service build && ./upload_script/upload_18.sh"

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)
// getURLParameter
if (accessToken) {
// 超高压嵌入 接受父应用传参 // 超高压嵌入 接受父应用传参
window.addEventListener( console.log('超高压嵌入')
'message',
event => {
if (event.data && event.data.type === 'iframeNest') {
let { accessToken, displayMode, theme } = event.data
console.log('我是iframe,我接收到了数据:', accessToken)
productionManagementCheck({ productionManagementCheck({
token: accessToken token: accessToken
}).then(res => { }).then(res => {
console.log('🚀 ~ receiveMessageFromOutside ~ res:', res)
if (res.code == 'A0000') { if (res.code == 'A0000') {
proceed(to, from, next) proceed({ path: pathname || to.path }, from, next, 'cdf1')
} }
}) })
}
},
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
}) })
}) })
} }
if (process.env.VUE_APP_KEY == 'scqr') {
flag = true
next(to.path)
} else {
next() next()
}
}, 500) }, 500)
}) })
.catch(error => { .catch(error => {
@@ -238,10 +292,15 @@ async function proceed(to, from, next, HB_NAME) {
}) })
}) })
}) })
} else {
if (process.env.VUE_APP_KEY == 'scqr') {
flag = true
next(to.path)
} else { } else {
next() next()
} }
} }
}
function getmuen(data) { function getmuen(data) {
if (data.children.length == 0) { if (data.children.length == 0) {

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,8 +223,8 @@ 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

@@ -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>
@@ -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,8 +25,10 @@ export default {
}, },
created() { created() {
if (process.env.VUE_APP_MODE === 'cgyqr') { if (process.env.VUE_APP_MODE === 'cgyqr') {
if (process.env.VUE_APP_KEY != 'scqr') {
this.guanzhou() this.guanzhou()
} }
}
}, },
mounted() {}, mounted() {},
methods: { methods: {

View File

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

View File

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

View File

@@ -17,28 +17,30 @@
</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') {
if (process.env.VUE_APP_KEY != 'scqr') {
this.guanzhou() this.guanzhou()
} }
}
}, },
mounted() { mounted() {
this.vh = window.sessionStorage.getItem('appheight') - 12 + 'px' this.vh = window.sessionStorage.getItem('appheight') - 12 + 'px'
@@ -60,8 +62,8 @@ export default {
// console.log(tab, event); // console.log(tab, event);
this.activeName = tab.name this.activeName = tab.name
} }
}, }
}; }
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.pa10 { .pa10 {

View File

@@ -37,8 +37,11 @@ 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.guanzhou()
} }
}
}, },
mounted() {}, mounted() {},
methods: { methods: {

View File

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

View File

@@ -48,7 +48,9 @@ export default {
} }
}, },
created() { created() {
if (process.env.VUE_APP_KEY != 'scqr') {
this.guanzhou() 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

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