Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| bb7eb039b5 | |||
| b317bf9c7d | |||
| 0a521bdcb7 | |||
| 263cd764f3 | |||
| a04bb33206 |
@@ -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({
|
||||||
|
|||||||
@@ -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
|
||||||
@@ -87,8 +86,34 @@ router.beforeEach(async (to, from, next) => {
|
|||||||
// })
|
// })
|
||||||
// }
|
// }
|
||||||
} else {
|
} else {
|
||||||
|
const response = await fetch('/')
|
||||||
|
const flag = response.headers.get('X-Xbqr')
|
||||||
|
console.log('🚀 ~ flag:', flag)
|
||||||
|
|
||||||
|
if (flag) {
|
||||||
|
// 超高压嵌入 接受父应用传参
|
||||||
|
window.addEventListener(
|
||||||
|
'message',
|
||||||
|
event => {
|
||||||
|
if (event.data && event.data.type === 'iframeNest') {
|
||||||
|
let { accessToken, displayMode, theme } = event.data
|
||||||
|
console.log('我是iframe,我接收到了数据:', accessToken)
|
||||||
|
productionManagementCheck({
|
||||||
|
token: accessToken
|
||||||
|
}).then(res => {
|
||||||
|
console.log('🚀 ~ receiveMessageFromOutside ~ res:', res)
|
||||||
|
if (res.code == 'A0000') {
|
||||||
proceed(to, from, next)
|
proceed(to, from, next)
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
false
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
proceed(to, from, next)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// else {
|
// else {
|
||||||
// //获取用户信息
|
// //获取用户信息
|
||||||
@@ -133,9 +158,13 @@ router.beforeEach(async (to, from, next) => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
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,38 +172,53 @@ 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])
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|||||||
@@ -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() {
|
||||||
|
|||||||
@@ -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: '取消',
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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({
|
||||||
|
|||||||
Reference in New Issue
Block a user