Compare commits
18 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4189eea278 | ||
|
|
d3fef49af2 | ||
|
|
12d40a5c6e | ||
|
|
6748490c3f | ||
|
|
2c19fc43de | ||
|
|
2ba5ebaddb | ||
|
|
448687115c | ||
|
|
0d4dc2d2bf | ||
|
|
121829a4bd | ||
|
|
3f6952612d | ||
|
|
5ca5d73f98 | ||
|
|
71d80e67f1 | ||
|
|
0e0969c50f | ||
|
|
8ab1a35f3b | ||
|
|
8744dfb0d8 | ||
|
|
b826f505ac | ||
|
|
465ad81069 | ||
|
|
c73bf05d41 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -9,4 +9,3 @@ public/electron/
|
||||
pnpm-lock.yaml
|
||||
CLAUDE.md
|
||||
/public/dist/
|
||||
/docs/
|
||||
|
||||
@@ -33,9 +33,9 @@ mybatis-plus:
|
||||
#驼峰命名
|
||||
map-underscore-to-camel-case: true
|
||||
#配置sql日志输出
|
||||
# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||
#关闭日志输出
|
||||
log-impl: org.apache.ibatis.logging.nologging.NoLoggingImpl
|
||||
# log-impl: org.apache.ibatis.logging.nologging.NoLoggingImpl
|
||||
global-config:
|
||||
db-config:
|
||||
#指定主键生成策略
|
||||
@@ -55,32 +55,30 @@ webSocket:
|
||||
|
||||
#源参数下发,暂态数据默认值
|
||||
Dip:
|
||||
# 暂态前时间(s)
|
||||
# fPreTime: 2f
|
||||
#暂态前时间(s)
|
||||
fPreTime: 2f
|
||||
#写入时间(s)
|
||||
fRampIn: 0.001f
|
||||
#写出时间(s)
|
||||
fRampOut: 0.001f
|
||||
# 暂态后时间(s)
|
||||
# fAfterTime: 3f
|
||||
#暂态后时间(s)
|
||||
fAfterTime: 3f
|
||||
|
||||
|
||||
#Flicker:
|
||||
# waveFluType: CPM
|
||||
# waveType: SQU
|
||||
# fDutyCycle: 50f
|
||||
Flicker:
|
||||
waveFluType: CPM
|
||||
waveType: SQU
|
||||
fDutyCycle: 50f
|
||||
|
||||
#log:
|
||||
# homeDir: D:\logs
|
||||
# commonLevel: info
|
||||
log:
|
||||
homeDir: {{APP_DATA_PATH}}\logs
|
||||
commonLevel: info
|
||||
report:
|
||||
# template: D:\template
|
||||
# reportDir: D:\report
|
||||
template: {{APP_DATA_PATH}}\template
|
||||
reportDir: {{APP_DATA_PATH}}\report
|
||||
dateFormat: yyyy年MM月dd日
|
||||
#data:
|
||||
# homeDir: D:\data
|
||||
#resource:
|
||||
# videoDir: ${data.homeDir}\resources\videos
|
||||
data:
|
||||
homeDir: {{APP_DATA_PATH}}\data
|
||||
qr:
|
||||
cloud: http://pqmcc.com:18082/api/file
|
||||
dev:
|
||||
@@ -117,4 +115,10 @@ activate:
|
||||
private-key: "MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCcUyYhVqczGxblL+o/xZzF/8nf+LjrfUE/dS1aRHM7uMDD0cgCArhjtfneFePrMxt+Z7W8yNBzSarub8qsfhaVNikV7Es7oaeTygfjQXTi2n4AFkir3fM07J08RpWhl5M8f8uWTCuvFUYAw00gq55typqmnbkmJa2VIUy/iQf+cMCP7abz4/jNhUzUR3qA7TV4oMRgTdIEDUp63YF8dOC+JH8XxYrCVeHXV6fLCwmesdMzl0lB2VTEKMfLbXhOmF5g7P9y/16VCcN8UBuZlbyYfn+GAxJOSbeHi5HshOKfoSuD7Jz+3WQZpNavOWjIFExKIU38/CvnJCOP7XBCqpSTAgMBAAECggEAYeWokWRE3TpvwiOZnUpR/aVMdVi75a3ROL5XIpqPV61B+t/bU3cEpl0GF9C5pUeiRi0IoStZb3mI9D1KPW/REKyUWkhabQO1gFYbTnRlkNOn6MILzKX4cwJjDaZeeo4EBPU7N+qHyOOXrU6hdH5FfxhMdV983ajm5eeuupxER1C2kAcIklTeVpTX6EKOgZb5LBp5ssOVm2P42pOauvcRozRcvZmqnErXmukv0H4l3EVNt4rHpTn9riHUC63e8JfiYzVaF6zuNUxv6nHEft0/SRMw11XSTnNfDzcKqgjz6ksFBS/6eQQYKESk+ONC53HUuYHFAknkwsPupDCT2W8FIQKBgQDLHT/xCU3nxGr4vFKBDNaO2D5oK20ECbBO4oDvLWWmQG7f+6TsMy8PgVdMnoL4RfqGlwFAKEpS6KVFHnBVqnNEhcdy9uCI7x7Xx8UnyUtxj1EDTm76uta9Ki9OrlqB6tImDM9+Ya3vGktW37ht4WOx2OsJRhG1dbf6RLwFlH7DWwKBgQDFBxvi5I1BR6hg6Tj7xd2SqOT2Y+BED3xuSYENhWbmMhLJDResaB7mjztbxlYaY2mOE0holWm2uDmVFFhMh4jYXik4hYH8nmDzq9mDpZCZ9pyjYqnAP8THoAa8EbgrUWB8A6BPH4iL3KbMnBfBKY0pIr2xrvnjQjNBAgta7KDRKQKBgCe6oe4wxrdF2TKsC2tIqpMoQxS3Icy/ZGgZr+SYuaBKTCWtoDW/UT40K3JGMxIDBhzbXphBCUCsVt9tM8Xd4EwP6tJW7dZ7B0pnve2pVwNwaAVAiz6p2yUHIle+jN+Koe5lZRSwYIg7WW81tWpwwsJfzqFyvjYDP6hJV4mz4ROvAoGAaRcdnKvjXApomShMqJ4lTPChD3q+SA8qg3jZSOj6tZXHx00gb2kp8jg7pPvpOTIFPy6x1Ha9aCRjMk0ju84fA6lVuzwa1S907wOehUVuF3Eeo1cgy9Y3k3KbpPyeixxgpkUY4JslLdSHc2NemD0dee951qhJyRmqVOZOQDUuoeECgYEAqBw2cAFk3vM97WY06TSldGA8ajVHx3BYRjj+zl62NTQthy8fw3tqxb3c5e8toOmZWKjZvDhg2TRLhsDDQWEYg3LZG87REqVIjgEPcpjNLidjygGX8n3JF2o0O5I/EMvl0s/+LVQONfduOBvhwDqr8QNisbLsyneiAq7umewMolo="
|
||||
public-key: "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnFMmIVanMxsW5S/qP8Wcxf/J3/i4631BP3UtWkRzO7jAw9HIAgK4Y7X53hXj6zMbfme1vMjQc0mq7m/KrH4WlTYpFexLO6Gnk8oH40F04tp+ABZIq93zNOydPEaVoZeTPH/LlkwrrxVGAMNNIKuebcqapp25JiWtlSFMv4kH/nDAj+2m8+P4zYVM1Ed6gO01eKDEYE3SBA1Ket2BfHTgviR/F8WKwlXh11enywsJnrHTM5dJQdlUxCjHy214TpheYOz/cv9elQnDfFAbmZW8mH5/hgMSTkm3h4uR7ITin6Erg+yc/t1kGaTWrzloyBRMSiFN/Pwr5yQjj+1wQqqUkwIDAQAB"
|
||||
|
||||
|
||||
freq-converter:
|
||||
schedule-period: 200 #定时器运行间隔
|
||||
tolerant: 1 #耐受状态
|
||||
dt: 200 #延迟时间ms
|
||||
direction: 0 #0为横向1为纵向
|
||||
allow-error-duration: 6 #暂态持续时间允许最大误差ms
|
||||
allow-error-residual-voltage: 2.0 #暂态幅值允许最多误差%
|
||||
|
||||
Binary file not shown.
Binary file not shown.
BIN
build/extraResources/mysql/data/#innodb_redo/#ib_redo39
Normal file
BIN
build/extraResources/mysql/data/#innodb_redo/#ib_redo39
Normal file
Binary file not shown.
BIN
build/extraResources/mysql/data/#innodb_redo/#ib_redo40
Normal file
BIN
build/extraResources/mysql/data/#innodb_redo/#ib_redo40
Normal file
Binary file not shown.
BIN
build/extraResources/mysql/data/#innodb_redo/#ib_redo41
Normal file
BIN
build/extraResources/mysql/data/#innodb_redo/#ib_redo41
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1 +1 @@
|
||||
95428
|
||||
42428
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,16 +1,3 @@
|
||||
.\binlog.000023
|
||||
.\binlog.000024
|
||||
.\binlog.000025
|
||||
.\binlog.000026
|
||||
.\binlog.000027
|
||||
.\binlog.000028
|
||||
.\binlog.000029
|
||||
.\binlog.000030
|
||||
.\binlog.000031
|
||||
.\binlog.000032
|
||||
.\binlog.000033
|
||||
.\binlog.000034
|
||||
.\binlog.000035
|
||||
.\binlog.000036
|
||||
.\binlog.000037
|
||||
.\binlog.000038
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -42,7 +42,7 @@ function createTray() {
|
||||
tray = new Tray(iconPath);
|
||||
}
|
||||
|
||||
tray.setToolTip('NPQS-9100自动检测平台');
|
||||
tray.setToolTip('变频器暂降耐受实验平台');
|
||||
console.log('[Tray] Tray created successfully');
|
||||
|
||||
// 创建托盘菜单
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# title
|
||||
VITE_GLOB_APP_TITLE=NPQS-9100自动检测平台
|
||||
VITE_GLOB_APP_TITLE=变频器暂降耐受实验平台
|
||||
|
||||
# 本地运行端口号
|
||||
VITE_PORT=18091
|
||||
|
||||
@@ -19,7 +19,7 @@ VITE_API_URL=/api
|
||||
|
||||
# 开发环境跨域代理,支持配置多个
|
||||
|
||||
VITE_PROXY=[["/api","http://127.0.0.1:18093/"]]
|
||||
VITE_PROXY=[["/api","http://127.0.0.1:18092/"]]
|
||||
#VITE_PROXY=[["/api","http://192.168.1.124:18092/"]]
|
||||
#VITE_PROXY=[["/api","http://192.168.2.125:18092/"]]
|
||||
# VITE_PROXY=[["/api","http://192.168.1.138:8080/"]]张文
|
||||
|
||||
@@ -23,6 +23,6 @@ VITE_PWA=true
|
||||
|
||||
# 线上环境接口地址
|
||||
#VITE_API_URL="/api" # 打包时用
|
||||
VITE_API_URL="http://127.0.0.1:18093/"
|
||||
VITE_API_URL="http://127.0.0.1:18092/"
|
||||
# 开启激活验证
|
||||
VITE_ACTIVATE_OPEN=false
|
||||
@@ -4,8 +4,7 @@
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, maximum-scale=1.0, minimum-scale=1.0" />
|
||||
<link rel="icon" type="image/x-icon" href="/favicon.ico">
|
||||
<title>NPQS-9100</title>
|
||||
<title></title>
|
||||
<!-- 优化:vue渲染未完成之前,先加一个css动画 -->
|
||||
<style>
|
||||
#loadingPage {
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 21 KiB |
@@ -1,15 +0,0 @@
|
||||
import http from '@/api'
|
||||
import type { DetectionLockHolder } from '@/stores/modules/detectionLock'
|
||||
|
||||
/**
|
||||
* 查询当前检测锁持有状态
|
||||
* - data 为 null → 锁空闲
|
||||
* - data 非 null → 锁被某账号持有
|
||||
*
|
||||
* 本接口只读,不抢锁、不会返回 DETECTION_BUSY
|
||||
*/
|
||||
export const getCurrentLock = () => {
|
||||
return http.get<DetectionLockHolder | null>('/detection/lock/current', undefined, {
|
||||
loading: false
|
||||
})
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
|
||||
import type { controlSource } from '@/api/device/interface/controlSource'
|
||||
import http from '@/api'
|
||||
import { useDetectionLockStore } from '@/stores/modules/detectionLock'
|
||||
|
||||
/**
|
||||
* @name 程控源管理模块
|
||||
@@ -18,11 +17,8 @@ export const startSimulateTest = (params: controlSource.ResControl) => {
|
||||
}
|
||||
|
||||
//停止
|
||||
export const closeSimulateTest = async (params: controlSource.ResControl) => {
|
||||
const result = await http.post(`/prepare/closeSimulateTest`,params,{loading:false})
|
||||
// 主动终止 → 释放本地持锁标记
|
||||
useDetectionLockStore().clearHolder()
|
||||
return result
|
||||
export const closeSimulateTest = (params: controlSource.ResControl) => {
|
||||
return http.post(`/prepare/closeSimulateTest`,params,{loading:false})
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
import type {Device} from '@/api/device/interface/device'
|
||||
import http from '@/api'
|
||||
|
||||
export const getPqDevListAll = () => {
|
||||
return http.get<Device.ResPqDev[]>(`/pqDev/listAll`)
|
||||
}
|
||||
|
||||
/**
|
||||
* @name 被检设备管理模块
|
||||
*/
|
||||
|
||||
52
frontend/src/api/device/freqConverter/index.ts
Normal file
52
frontend/src/api/device/freqConverter/index.ts
Normal file
@@ -0,0 +1,52 @@
|
||||
import type {FreqConverter} from '@/api/device/interface/freqConverter'
|
||||
import http from '@/api'
|
||||
|
||||
/**
|
||||
* @name 变频器管理模块
|
||||
*/
|
||||
|
||||
//获取设备类型
|
||||
export const getFreqConverterList = (params: FreqConverter.ReqFreqConverterParams) => {
|
||||
return http.post(`/freqConverter/list`, params)
|
||||
}
|
||||
|
||||
//添加设备类型
|
||||
export const addFreqConverter = (params: FreqConverter.ResFreqConverter) => {
|
||||
return http.post(`/freqConverter/add`, params)
|
||||
}
|
||||
|
||||
//编辑设备类型
|
||||
export const updateFreqConverter = (params: FreqConverter.ResFreqConverter) => {
|
||||
return http.post(`/freqConverter/update`, params)
|
||||
}
|
||||
|
||||
//删除设备类型
|
||||
export const deleteFreqConverter = (params: string[]) => {
|
||||
return http.post(`/freqConverter/delete`, params)
|
||||
}
|
||||
|
||||
export const getFreqConverterResult = (params: { converterId?: string }) => {
|
||||
return http.get(`/freqConverter/result?converterId=${params.converterId || ''}`)
|
||||
}
|
||||
|
||||
export const startFreqConverterDetect = (params: {
|
||||
converterId?: string;
|
||||
monitorId?: string;
|
||||
userId?: string | null;
|
||||
reset?: boolean;
|
||||
}) => {
|
||||
return http.get(`/prepare/startFreqConverter`, params, {loading: false})
|
||||
}
|
||||
|
||||
export const stopFreqConverterDetect = (params: {
|
||||
userId?: string | null;
|
||||
}) => {
|
||||
return http.get(`/prepare/stopFreqConverter`, params, {loading: false})
|
||||
}
|
||||
|
||||
export const getFreqConverterSCurve = (params: FreqConverter.ReqFreqConverterSCurveParams) => {
|
||||
return http.get(`/freqConverter/scurve?converterId=${params.converterId || ''}`)
|
||||
}
|
||||
|
||||
|
||||
|
||||
51
frontend/src/api/device/interface/freqConverter.ts
Normal file
51
frontend/src/api/device/interface/freqConverter.ts
Normal file
@@ -0,0 +1,51 @@
|
||||
import type {ReqPage, ResPage} from '@/api/interface'
|
||||
|
||||
// 变频器模块
|
||||
export namespace FreqConverter {
|
||||
|
||||
/**
|
||||
* 变频器数据表格分页查询参数
|
||||
*/
|
||||
export interface ReqFreqConverterParams extends ReqPage {
|
||||
name?: string; // 名称
|
||||
}
|
||||
|
||||
/**
|
||||
* 变频器新增、修改、根据id查询返回的对象
|
||||
*/
|
||||
export interface ResFreqConverter {
|
||||
id?: string; //变频器ID
|
||||
name: string;//变频器名称
|
||||
portName: string; //串口名称
|
||||
slaveAddress: number; //从机地址
|
||||
baudRate: number; //波特率
|
||||
parity: string; //奇偶校验类型
|
||||
dataBits: number; //数据位
|
||||
stopBits: number; //停止位
|
||||
timeoutMs: number; //超时时间(毫秒)
|
||||
suffix?: number; //数据表后缀
|
||||
state?: number;
|
||||
testStatus?: number; //测试状态 0:未测试 1:测试完成
|
||||
createBy?: string | null; //创建用户
|
||||
createTime?: string | null; //创建时间
|
||||
updateBy?: string | null; //更新用户
|
||||
updateTime?: string | null; //更新时间
|
||||
}
|
||||
|
||||
/**
|
||||
* 变频器表格查询分页返回的对象;
|
||||
*/
|
||||
export interface ResFreqConverterPage extends ResPage<ResFreqConverter> {
|
||||
|
||||
}
|
||||
|
||||
export interface ReqFreqConverterSCurveParams {
|
||||
converterId?: string;
|
||||
}
|
||||
|
||||
export interface ResTolerantPoint {
|
||||
durationMs?: number | null;
|
||||
residualVoltage?: number | null;
|
||||
tolerant?: number | null;
|
||||
}
|
||||
}
|
||||
@@ -12,12 +12,6 @@ import { type ResultData } from '@/api/interface'
|
||||
import { ResultEnum } from '@/enums/httpEnum'
|
||||
import { checkStatus } from './helper/checkStatus'
|
||||
import { useUserStore } from '@/stores/modules/user'
|
||||
import { useDetectionLockStore, type DetectionLockHolder } from '@/stores/modules/detectionLock'
|
||||
import {
|
||||
showForceReleasedDialog,
|
||||
showLockBusyDialog,
|
||||
showLockNotStartedToast
|
||||
} from '@/utils/detectionLockDialog'
|
||||
import router from '@/routers'
|
||||
import { refreshToken } from '@/api/user/login'
|
||||
import { EventSourcePolyfill } from 'event-source-polyfill'
|
||||
@@ -113,32 +107,6 @@ class RequestHttp {
|
||||
}
|
||||
return Promise.reject(data)
|
||||
}
|
||||
// 单用户检测互斥:命中 DETECTION_BUSY 时根据 data 和本地持锁状态分发到 4 种文案
|
||||
if (data.code === ResultEnum.DETECTION_BUSY) {
|
||||
const lockStore = useDetectionLockStore()
|
||||
const holder = (data.data ?? null) as DetectionLockHolder | null
|
||||
const currentUserId = userStore.userInfo?.id
|
||||
const localDetecting = lockStore.iAmHolder
|
||||
|
||||
if (!localDetecting && holder) {
|
||||
// S1:他人持锁
|
||||
showLockBusyDialog(holder)
|
||||
} else if (!localDetecting && !holder) {
|
||||
// S2:未开始检测就调中间接口
|
||||
showLockNotStartedToast()
|
||||
} else if (localDetecting && holder && holder.holderUserId !== currentUserId) {
|
||||
// S4-a:被强释 + 别人接手
|
||||
showForceReleasedDialog(holder)
|
||||
lockStore.clearHolder()
|
||||
} else if (localDetecting && !holder) {
|
||||
// S4-b:被强释,无人接手
|
||||
showForceReleasedDialog(null)
|
||||
lockStore.clearHolder()
|
||||
}
|
||||
// 阻断默认错误提示,不再走下面的 ElMessage.error
|
||||
return Promise.reject(data)
|
||||
}
|
||||
|
||||
// 全局错误信息拦截(防止下载文件的时候返回数据流,没有 code 直接报错)
|
||||
if (data.code && data.code !== ResultEnum.SUCCESS) {
|
||||
if (data.message.includes('&')) {
|
||||
|
||||
@@ -69,30 +69,5 @@ export namespace Plan {
|
||||
maxTime: number;
|
||||
}
|
||||
|
||||
export interface PlanStatisticsItem {
|
||||
itemId: string;
|
||||
itemName: string;
|
||||
unqualifiedCount: number;
|
||||
}
|
||||
|
||||
export interface PlanStatistics {
|
||||
planId: string;
|
||||
planName: string;
|
||||
totalCheckCount: number;
|
||||
checkedDeviceCount: number;
|
||||
uncheckedDeviceCount: number;
|
||||
firstQualifiedDeviceCount: number;
|
||||
secondQualifiedDeviceCount: number;
|
||||
thirdOrMoreQualifiedDeviceCount: number;
|
||||
qualifiedDeviceCount: number;
|
||||
unqualifiedDeviceCount: number;
|
||||
unqualifiedItemCount: number;
|
||||
firstPassRate: number;
|
||||
secondPassRate: number;
|
||||
thirdOrMorePassRate: number;
|
||||
unqualifiedRate: number;
|
||||
itemDistributions: PlanStatisticsItem[];
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -94,10 +94,6 @@ export const staticsAnalyse = (params: { id: string[] }) => {
|
||||
return http.download('/adPlan/analyse', params)
|
||||
}
|
||||
|
||||
export const getPlanStatistics = (params: { planId: string; manufacturer?: string; devType?: string }) => {
|
||||
return http.post<Plan.PlanStatistics>(`/adPlan/statistics`, params)
|
||||
}
|
||||
|
||||
//根据计划id分页查询被检设
|
||||
export const getDevListByPlanId = (params: any) => {
|
||||
return http.post(`/adPlan/listDevByPlanId`, params)
|
||||
@@ -163,4 +159,4 @@ export const importAndMergePlanCheckData = (params: Plan.ResPlan) => {
|
||||
return http.upload(`/adPlan/importAndMergePlanCheckData`, params, {
|
||||
timeout: 60000 * 20
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
import http from '@/api'
|
||||
import type { ResourceManage } from '@/api/resourceManage/interface'
|
||||
|
||||
export const getResourceManageList = (params: ResourceManage.ReqResourceManageParams) => {
|
||||
return http.post<ResourceManage.ResResourceManagePage>('/resourceManage/list', params)
|
||||
}
|
||||
|
||||
export const addResourceManage = (params: FormData) => {
|
||||
return http.upload('/resourceManage/add', params)
|
||||
}
|
||||
|
||||
export const updateResourceManage = (params: ResourceManage.ReqUpdateResourceManage) => {
|
||||
return http.post('/resourceManage/update', params)
|
||||
}
|
||||
|
||||
export const getResourceManagePlayUrl = (id: string) => {
|
||||
return http.get<ResourceManage.PlayVO>(`/resourceManage/play?id=${id}`)
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
import type { ReqPage, ResPage } from '@/api/interface'
|
||||
|
||||
export namespace ResourceManage {
|
||||
export interface ReqResourceManageParams extends ReqPage {
|
||||
name?: string
|
||||
fileName?: string
|
||||
}
|
||||
|
||||
export interface ResResourceManage {
|
||||
id: string
|
||||
name: string
|
||||
fileName: string
|
||||
fileSize: number
|
||||
relativePath: string
|
||||
remark: string
|
||||
state: number
|
||||
createBy?: string | null
|
||||
createTime?: string | null
|
||||
updateBy?: string | null
|
||||
updateTime?: string | null
|
||||
}
|
||||
|
||||
export interface ResResourceManagePage extends ResPage<ResResourceManage> {}
|
||||
|
||||
export interface ReqUpdateResourceManage {
|
||||
id: string
|
||||
name: string
|
||||
remark: string
|
||||
}
|
||||
|
||||
export interface PlayVO {
|
||||
url: string
|
||||
}
|
||||
}
|
||||
@@ -1,12 +1,8 @@
|
||||
import http from '@/api'
|
||||
import { useDetectionLockStore } from '@/stores/modules/detectionLock'
|
||||
|
||||
|
||||
export const startPreTest = async (params) => {
|
||||
const result = await http.post(`/prepare/startPreTest`, params, {loading: false})
|
||||
// 抢锁成功 → 标记本地为持锁者
|
||||
useDetectionLockStore().setAsHolder()
|
||||
return result
|
||||
export const startPreTest = (params) => {
|
||||
return http.post(`/prepare/startPreTest`, params, {loading: false})
|
||||
}
|
||||
|
||||
export const closePreTest = (params) => {
|
||||
@@ -41,11 +37,8 @@ export const resumeTest = (params) => {
|
||||
* 比对式通道配对
|
||||
* @param params
|
||||
*/
|
||||
export const contrastTest = async (params: any) => {
|
||||
const result = await http.post(`/prepare/startContrastTest`, params)
|
||||
// 抢锁成功 → 标记本地为持锁者
|
||||
useDetectionLockStore().setAsHolder()
|
||||
return result
|
||||
export const contrastTest = (params: any) => {
|
||||
return http.post(`/prepare/startContrastTest`,params)
|
||||
}
|
||||
|
||||
export const exportAlignData= () => {
|
||||
|
||||
@@ -130,6 +130,7 @@ const initChart = () => {
|
||||
chart.resize()
|
||||
}, 0)
|
||||
}
|
||||
const getChartInstance = () => chart
|
||||
const handlerBar = (options: any) => {
|
||||
if (Array.isArray(options.series)) {
|
||||
options.series.forEach((item: any) => {
|
||||
@@ -253,7 +254,7 @@ onMounted(() => {
|
||||
initChart()
|
||||
resizeObserver.observe(chartRef.value!)
|
||||
})
|
||||
defineExpose({ initChart })
|
||||
defineExpose({ initChart, getChartInstance })
|
||||
onBeforeUnmount(() => {
|
||||
resizeObserver.unobserve(chartRef.value!)
|
||||
chart?.dispose()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// ? 全局默认配置项
|
||||
|
||||
// 首页地址(默认)
|
||||
export const HOME_URL: string = "/home/index";
|
||||
export const HOME_URL: string = "/machine/freqConverter";
|
||||
|
||||
// export const HOME_URL: string = "/machine/controlSource";
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@ export enum ResultEnum {
|
||||
ERROR = 500,
|
||||
ACCESSTOKEN_EXPIRED = "A0024",
|
||||
OVERDUE = "A0025",
|
||||
DETECTION_BUSY = "A020042",
|
||||
TIMEOUT = 30000,
|
||||
TYPE = "success"
|
||||
}
|
||||
|
||||
@@ -1,31 +1,32 @@
|
||||
<template>
|
||||
<div class="footer flx-align-center pl10">
|
||||
<el-dropdown>
|
||||
<div class="change_mode">
|
||||
{{ title }}
|
||||
<el-icon class="el-icon--right change_mode_down"><arrow-down /></el-icon>
|
||||
<el-icon class="el-icon--right change_mode_up"><arrow-up /></el-icon>
|
||||
</div>
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu>
|
||||
<el-dropdown-item
|
||||
v-for="item in modeList"
|
||||
:key="item.key"
|
||||
:disabled="!item.activated"
|
||||
@click="handelOpen(item.code, item.key)"
|
||||
>
|
||||
{{ item.name }}
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</template>
|
||||
</el-dropdown>
|
||||
<p style="margin: 0">
|
||||
<a href="http://www.shining-electric.com/" target="_blank">2024 © 南京灿能电力自动化股份有限公司</a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="footer flx-align-center pl10">
|
||||
<el-dropdown>
|
||||
<div class="change_mode">
|
||||
{{ title }}
|
||||
<el-icon class="el-icon--right change_mode_down"><arrow-down /></el-icon>
|
||||
<el-icon class="el-icon--right change_mode_up"><arrow-up /></el-icon>
|
||||
</div>
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu>
|
||||
<el-dropdown-item
|
||||
v-for="item in modeList"
|
||||
:key="item.key"
|
||||
:disabled="!item.activated"
|
||||
@click="handelOpen(item.code, item.key)"
|
||||
>
|
||||
{{ item.name }}
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</template>
|
||||
</el-dropdown>
|
||||
<p style="margin: 0">
|
||||
<a href="http://www.shining-electric.com/" target="_blank">2024 © 南京灿能电力自动化股份有限公司</a>
|
||||
</p>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { computed } from 'vue'
|
||||
import { HOME_URL } from '@/config'
|
||||
import { useAuthStore } from '@/stores/modules/auth'
|
||||
import { useModeStore } from '@/stores/modules/mode' // 引入模式 store
|
||||
import { useTabsStore } from '@/stores/modules/tabs'
|
||||
@@ -38,97 +39,97 @@ const modeStore = useModeStore()
|
||||
const tabsStore = useTabsStore()
|
||||
|
||||
const title = computed(() => {
|
||||
return modeStore.currentMode === '' ? '选择模块' : modeStore.currentMode + '模块'
|
||||
return modeStore.currentMode === '' ? '选择模块' : modeStore.currentMode + '模块'
|
||||
})
|
||||
const activateInfo = authStore.activateInfo
|
||||
const isActivateOpen = import.meta.env.VITE_ACTIVATE_OPEN
|
||||
const modeList = [
|
||||
{
|
||||
name: '模拟式模块',
|
||||
code: '模拟式',
|
||||
key: 'simulate',
|
||||
activated: isActivateOpen === 'true' ? activateInfo.simulate.permanently === 1 : true
|
||||
},
|
||||
{
|
||||
name: '数字式模块',
|
||||
code: '数字式',
|
||||
key: 'digital',
|
||||
activated: isActivateOpen === 'true' ? activateInfo.digital.permanently === 1 : true
|
||||
},
|
||||
{
|
||||
name: '比对式模块',
|
||||
code: '比对式',
|
||||
key: 'contrast',
|
||||
activated: isActivateOpen === 'true' ? activateInfo.contrast.permanently === 1 : true
|
||||
}
|
||||
{
|
||||
name: '模拟式模块',
|
||||
code: '模拟式',
|
||||
key: 'simulate',
|
||||
activated: isActivateOpen === 'true' ? activateInfo.simulate.permanently === 1 : true
|
||||
},
|
||||
{
|
||||
name: '数字式模块',
|
||||
code: '数字式',
|
||||
key: 'digital',
|
||||
activated: isActivateOpen === 'true' ? activateInfo.digital.permanently === 1 : true
|
||||
},
|
||||
{
|
||||
name: '比对式模块',
|
||||
code: '比对式',
|
||||
key: 'contrast',
|
||||
activated: isActivateOpen === 'true' ? activateInfo.contrast.permanently === 1 : true
|
||||
}
|
||||
]
|
||||
const handelOpen = async (item: string, key: string) => {
|
||||
if (isActivateOpen === 'true' && activateInfo[key].permanently !== 1) {
|
||||
ElMessage.warning(`${item}模块未激活`)
|
||||
return
|
||||
}
|
||||
await authStore.setShowMenu()
|
||||
modeStore.setCurrentMode(item) // 将模式code存入 store
|
||||
// 强制刷新页面
|
||||
await tabsStore.closeMultipleTab()
|
||||
await initDynamicRouter()
|
||||
if (isActivateOpen === 'true' && activateInfo[key].permanently !== 1) {
|
||||
ElMessage.warning(`${item}模块未激活`)
|
||||
return
|
||||
}
|
||||
await authStore.setShowMenu()
|
||||
modeStore.setCurrentMode(item) // 将模式code存入 store
|
||||
// 强制刷新页面
|
||||
await tabsStore.closeMultipleTab()
|
||||
await initDynamicRouter()
|
||||
|
||||
// 只有当目标路径与当前路径不同时才跳转
|
||||
if (router.currentRoute.value.path !== HOME_URL) {
|
||||
await router.push({ path: HOME_URL })
|
||||
} else {
|
||||
// 如果已在目标页面,手动触发组件更新
|
||||
window.location.reload() // 或者采用其他方式刷新数据
|
||||
}
|
||||
|
||||
// 只有当目标路径与当前路径不同时才跳转
|
||||
if (router.currentRoute.value.path !== '/home/index') {
|
||||
await router.push({ path: '/home/index' })
|
||||
} else {
|
||||
// 如果已在目标页面,手动触发组件更新
|
||||
window.location.reload() // 或者采用其他方式刷新数据
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
@use './index.scss';
|
||||
.footer {
|
||||
position: relative;
|
||||
background-color: var(--el-color-primary);
|
||||
// .el-button:hover {
|
||||
// background-color: var(--el-color-primary) !important;
|
||||
// border: none !important;
|
||||
// outline: none !important;
|
||||
// }
|
||||
.change_mode {
|
||||
color: #fff;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
height: 100%;
|
||||
width: auto;
|
||||
font-size: 14px;
|
||||
.change_mode_down {
|
||||
display: block;
|
||||
}
|
||||
.change_mode_up {
|
||||
display: none;
|
||||
}
|
||||
position: relative;
|
||||
background-color: var(--el-color-primary);
|
||||
// .el-button:hover {
|
||||
// background-color: var(--el-color-primary) !important;
|
||||
// border: none !important;
|
||||
// outline: none !important;
|
||||
// }
|
||||
.change_mode {
|
||||
color: #fff;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
height: 100%;
|
||||
width: auto;
|
||||
font-size: 14px;
|
||||
.change_mode_down {
|
||||
display: block;
|
||||
}
|
||||
.change_mode:hover {
|
||||
.change_mode_down {
|
||||
display: none;
|
||||
}
|
||||
.change_mode_up {
|
||||
display: block;
|
||||
}
|
||||
.change_mode_up {
|
||||
display: none;
|
||||
}
|
||||
.el-dropdown {
|
||||
z-index: 1001;
|
||||
}
|
||||
.change_mode:hover {
|
||||
.change_mode_down {
|
||||
display: none;
|
||||
}
|
||||
p {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
text-align: right;
|
||||
line-height: 40px;
|
||||
a {
|
||||
color: #fff;
|
||||
margin-right: 25px; // 增加右边距
|
||||
}
|
||||
.change_mode_up {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
.el-dropdown {
|
||||
z-index: 1001;
|
||||
}
|
||||
p {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
text-align: right;
|
||||
line-height: 40px;
|
||||
a {
|
||||
color: #fff;
|
||||
margin-right: 25px; // 增加右边距
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -22,14 +22,6 @@
|
||||
<el-icon><Edit /></el-icon>
|
||||
{{ t('header.changePassword') }}
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item @click="changeMode" v-if="authStore.showMenuFlag">
|
||||
<el-icon><Switch /></el-icon>
|
||||
{{ t('header.changeMode') }}
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item @click="openDialog('versionRegisterRef')">
|
||||
<el-icon><SetUp /></el-icon>
|
||||
{{ t('header.versionRegister') }}
|
||||
</el-dropdown-item>
|
||||
<el-dropdown trigger="hover" placement="left-start" v-if="userStore.userInfo.loginName == 'root'">
|
||||
<div class="custom-dropdown-trigger">
|
||||
<el-icon><Tools /></el-icon>
|
||||
@@ -62,8 +54,6 @@
|
||||
<InfoDialog ref="infoRef"></InfoDialog>
|
||||
<!-- passwordDialog -->
|
||||
<PasswordDialog ref="passwordRef"></PasswordDialog>
|
||||
<!-- versionRegisterDialog -->
|
||||
<VersionDialog ref="versionRegisterRef"></VersionDialog>
|
||||
<!-- ThemeDialog -->
|
||||
<ThemeDialog ref="themeRef"></ThemeDialog>
|
||||
</template>
|
||||
@@ -77,9 +67,7 @@ import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import InfoDialog from './InfoDialog.vue'
|
||||
import PasswordDialog from './PasswordDialog.vue'
|
||||
import ThemeDialog from './ThemeDialog.vue'
|
||||
import VersionDialog from '@/views/system/versionRegister/index.vue'
|
||||
import { Avatar, Sunny, Switch, Tools } from '@element-plus/icons-vue'
|
||||
import { useAuthStore } from '@/stores/modules/auth'
|
||||
import { Avatar, Sunny, Tools } from '@element-plus/icons-vue'
|
||||
import { useDictStore } from '@/stores/modules/dict'
|
||||
import { useAppSceneStore } from '@/stores/modules/mode'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
@@ -90,7 +78,6 @@ const dictStore = useDictStore()
|
||||
const username = computed(() => userStore.userInfo.name)
|
||||
|
||||
const router = useRouter()
|
||||
const authStore = useAuthStore()
|
||||
|
||||
// 初始化 i18n
|
||||
const { t } = useI18n() // 使用 t 方法替代 $t
|
||||
@@ -111,12 +98,10 @@ const logout = () => {
|
||||
// 打开修改密码和个人信息弹窗
|
||||
const infoRef = ref<InstanceType<typeof InfoDialog> | null>(null)
|
||||
const passwordRef = ref<InstanceType<typeof PasswordDialog> | null>(null)
|
||||
const versionRegisterRef = ref<InstanceType<typeof VersionDialog> | null>(null)
|
||||
const themeRef = ref<InstanceType<typeof ThemeDialog> | null>(null)
|
||||
const openDialog = (ref: string) => {
|
||||
if (ref == 'infoRef') infoRef.value?.openDialog()
|
||||
if (ref == 'passwordRef') passwordRef.value?.openDialog()
|
||||
if (ref == 'versionRegisterRef') versionRegisterRef.value?.openDialog()
|
||||
if (ref == 'themeRef') themeRef.value?.openDialog()
|
||||
}
|
||||
|
||||
@@ -130,10 +115,6 @@ const changeScene = async (value: string) => {
|
||||
}
|
||||
|
||||
//模式切换
|
||||
const changeMode = async () => {
|
||||
authStore.changeModel()
|
||||
await router.push('/home/index')
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user