14 Commits

Author SHA1 Message Date
caozehui
0b26de20b9 资源管理 2026-05-28 13:26:35 +08:00
caozehui
1202f64bfc 检测计划统计功能 2026-05-28 08:44:15 +08:00
caozehui
ce1738daf0 微调 2026-05-27 11:20:12 +08:00
caozehui
a41d824ca3 归档 2026-05-26 15:45:08 +08:00
caozehui
ac5a8450e8 微调 2026-05-26 14:23:59 +08:00
caozehui
01e817a5d6 微调 2026-05-26 13:45:23 +08:00
caozehui
01bf07fc42 检测计划统计功能 2026-05-26 09:22:38 +08:00
caozehui
633e914c9a Revert "下拉多选报告模版"
This reverts commit 37e69e7bda.
2026-05-25 18:38:46 +08:00
caozehui
37e69e7bda 下拉多选报告模版 2026-05-25 14:25:57 +08:00
caozehui
19fb90432a 归档 2026-05-25 09:51:42 +08:00
caozehui
4a3c81a792 归档 2026-05-25 09:50:16 +08:00
caozehui
12d3073241 统一sourceId 2026-05-13 09:47:10 +08:00
caozehui
72838462ad 微调 2026-04-22 10:02:21 +08:00
caozehui
327addf625 微调 2026-04-22 09:58:03 +08:00
115 changed files with 1166 additions and 2633 deletions

View File

@@ -33,9 +33,9 @@ mybatis-plus:
#驼峰命名 #驼峰命名
map-underscore-to-camel-case: true map-underscore-to-camel-case: true
#配置sql日志输出 #配置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: global-config:
db-config: db-config:
#指定主键生成策略 #指定主键生成策略
@@ -79,6 +79,8 @@ report:
dateFormat: yyyy年MM月dd日 dateFormat: yyyy年MM月dd日
data: data:
homeDir: {{APP_DATA_PATH}}\data homeDir: {{APP_DATA_PATH}}\data
resource:
videoDir: {{APP_DATA_PATH}}\resources\videos
qr: qr:
cloud: http://pqmcc.com:18082/api/file cloud: http://pqmcc.com:18082/api/file
dev: dev:
@@ -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bLsyneiAq7umewMolo="
public-key: "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnFMmIVanMxsW5S/qP8Wcxf/J3/i4631BP3UtWkRzO7jAw9HIAgK4Y7X53hXj6zMbfme1vMjQc0mq7m/KrH4WlTYpFexLO6Gnk8oH40F04tp+ABZIq93zNOydPEaVoZeTPH/LlkwrrxVGAMNNIKuebcqapp25JiWtlSFMv4kH/nDAj+2m8+P4zYVM1Ed6gO01eKDEYE3SBA1Ket2BfHTgviR/F8WKwlXh11enywsJnrHTM5dJQdlUxCjHy214TpheYOz/cv9elQnDfFAbmZW8mH5/hgMSTkm3h4uR7ITin6Erg+yc/t1kGaTWrzloyBRMSiFN/Pwr5yQjj+1wQqqUkwIDAQAB" 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 #暂态幅值允许最多误差%

View File

@@ -1 +1 @@
42428 95428

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.

View File

@@ -1,3 +1,16 @@
.\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.000034
.\binlog.000035 .\binlog.000035
.\binlog.000036 .\binlog.000036
.\binlog.000037
.\binlog.000038

View File

@@ -42,7 +42,7 @@ function createTray() {
tray = new Tray(iconPath); tray = new Tray(iconPath);
} }
tray.setToolTip('变频器暂降耐受实验平台'); tray.setToolTip('NPQS-9100自动检测平台');
console.log('[Tray] Tray created successfully'); console.log('[Tray] Tray created successfully');
// 创建托盘菜单 // 创建托盘菜单

View File

@@ -1,5 +1,5 @@
# title # title
VITE_GLOB_APP_TITLE=变频器暂降耐受实验平台 VITE_GLOB_APP_TITLE=NPQS-9100自动检测平台
# 本地运行端口号 # 本地运行端口号
VITE_PORT=18091 VITE_PORT=18091

View File

@@ -19,7 +19,7 @@ VITE_API_URL=/api
# 开发环境跨域代理,支持配置多个 # 开发环境跨域代理,支持配置多个
VITE_PROXY=[["/api","http://127.0.0.1:18092/"]] VITE_PROXY=[["/api","http://127.0.0.1:18093/"]]
#VITE_PROXY=[["/api","http://192.168.1.124: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.2.125:18092/"]]
# VITE_PROXY=[["/api","http://192.168.1.138:8080/"]]张文 # VITE_PROXY=[["/api","http://192.168.1.138:8080/"]]张文

View File

@@ -23,6 +23,6 @@ VITE_PWA=true
# 线上环境接口地址 # 线上环境接口地址
#VITE_API_URL="/api" # 打包时用 #VITE_API_URL="/api" # 打包时用
VITE_API_URL="http://127.0.0.1:18092/" VITE_API_URL="http://127.0.0.1:18093/"
# 开启激活验证 # 开启激活验证
VITE_ACTIVATE_OPEN=false VITE_ACTIVATE_OPEN=false

View File

@@ -1,10 +1,6 @@
import type {Device} from '@/api/device/interface/device' import type {Device} from '@/api/device/interface/device'
import http from '@/api' import http from '@/api'
export const getPqDevListAll = () => {
return http.get<Device.ResPqDev[]>(`/pqDev/listAll`)
}
/** /**
* @name 被检设备管理模块 * @name 被检设备管理模块
*/ */

View File

@@ -1,52 +0,0 @@
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 || ''}`)
}

View File

@@ -1,51 +0,0 @@
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;
}
}

View File

@@ -69,5 +69,30 @@ export namespace Plan {
maxTime: number; 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[];
}
} }

View File

@@ -94,6 +94,10 @@ export const staticsAnalyse = (params: { id: string[] }) => {
return http.download('/adPlan/analyse', params) 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分页查询被检设 //根据计划id分页查询被检设
export const getDevListByPlanId = (params: any) => { export const getDevListByPlanId = (params: any) => {
return http.post(`/adPlan/listDevByPlanId`, params) return http.post(`/adPlan/listDevByPlanId`, params)
@@ -159,4 +163,4 @@ export const importAndMergePlanCheckData = (params: Plan.ResPlan) => {
return http.upload(`/adPlan/importAndMergePlanCheckData`, params, { return http.upload(`/adPlan/importAndMergePlanCheckData`, params, {
timeout: 60000 * 20 timeout: 60000 * 20
}) })
} }

View File

@@ -0,0 +1,14 @@
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 getResourceManagePlayUrl = (id: string) => {
return http.get<ResourceManage.PlayVO>(`/resourceManage/play?id=${id}`)
}

View File

@@ -0,0 +1,28 @@
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 PlayVO {
url: string
}
}

View File

@@ -130,7 +130,6 @@ const initChart = () => {
chart.resize() chart.resize()
}, 0) }, 0)
} }
const getChartInstance = () => chart
const handlerBar = (options: any) => { const handlerBar = (options: any) => {
if (Array.isArray(options.series)) { if (Array.isArray(options.series)) {
options.series.forEach((item: any) => { options.series.forEach((item: any) => {
@@ -254,7 +253,7 @@ onMounted(() => {
initChart() initChart()
resizeObserver.observe(chartRef.value!) resizeObserver.observe(chartRef.value!)
}) })
defineExpose({ initChart, getChartInstance }) defineExpose({ initChart })
onBeforeUnmount(() => { onBeforeUnmount(() => {
resizeObserver.unobserve(chartRef.value!) resizeObserver.unobserve(chartRef.value!)
chart?.dispose() chart?.dispose()

View File

@@ -1,7 +1,7 @@
// ? 全局默认配置项 // ? 全局默认配置项
// 首页地址(默认) // 首页地址(默认)
export const HOME_URL: string = "/machine/freqConverter"; export const HOME_URL: string = "/home/index";
// export const HOME_URL: string = "/machine/controlSource"; // export const HOME_URL: string = "/machine/controlSource";

View File

@@ -1,32 +1,31 @@
<template> <template>
<div class="footer flx-align-center pl10"> <div class="footer flx-align-center pl10">
<el-dropdown> <el-dropdown>
<div class="change_mode"> <div class="change_mode">
{{ title }} {{ title }}
<el-icon class="el-icon--right change_mode_down"><arrow-down /></el-icon> <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> <el-icon class="el-icon--right change_mode_up"><arrow-up /></el-icon>
</div> </div>
<template #dropdown> <template #dropdown>
<el-dropdown-menu> <el-dropdown-menu>
<el-dropdown-item <el-dropdown-item
v-for="item in modeList" v-for="item in modeList"
:key="item.key" :key="item.key"
:disabled="!item.activated" :disabled="!item.activated"
@click="handelOpen(item.code, item.key)" @click="handelOpen(item.code, item.key)"
> >
{{ item.name }} {{ item.name }}
</el-dropdown-item> </el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</template> </template>
</el-dropdown> </el-dropdown>
<p style="margin: 0"> <p style="margin: 0">
<a href="http://www.shining-electric.com/" target="_blank">2024 © 南京灿能电力自动化股份有限公司</a> <a href="http://www.shining-electric.com/" target="_blank">2024 © 南京灿能电力自动化股份有限公司</a>
</p> </p>
</div> </div>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { computed } from 'vue' import { computed } from 'vue'
import { HOME_URL } from '@/config'
import { useAuthStore } from '@/stores/modules/auth' import { useAuthStore } from '@/stores/modules/auth'
import { useModeStore } from '@/stores/modules/mode' // 引入模式 store import { useModeStore } from '@/stores/modules/mode' // 引入模式 store
import { useTabsStore } from '@/stores/modules/tabs' import { useTabsStore } from '@/stores/modules/tabs'
@@ -39,97 +38,97 @@ const modeStore = useModeStore()
const tabsStore = useTabsStore() const tabsStore = useTabsStore()
const title = computed(() => { const title = computed(() => {
return modeStore.currentMode === '' ? '选择模块' : modeStore.currentMode + '模块' return modeStore.currentMode === '' ? '选择模块' : modeStore.currentMode + '模块'
}) })
const activateInfo = authStore.activateInfo const activateInfo = authStore.activateInfo
const isActivateOpen = import.meta.env.VITE_ACTIVATE_OPEN const isActivateOpen = import.meta.env.VITE_ACTIVATE_OPEN
const modeList = [ const modeList = [
{ {
name: '模拟式模块', name: '模拟式模块',
code: '模拟式', code: '模拟式',
key: 'simulate', key: 'simulate',
activated: isActivateOpen === 'true' ? activateInfo.simulate.permanently === 1 : true activated: isActivateOpen === 'true' ? activateInfo.simulate.permanently === 1 : true
}, },
{ {
name: '数字式模块', name: '数字式模块',
code: '数字式', code: '数字式',
key: 'digital', key: 'digital',
activated: isActivateOpen === 'true' ? activateInfo.digital.permanently === 1 : true activated: isActivateOpen === 'true' ? activateInfo.digital.permanently === 1 : true
}, },
{ {
name: '比对式模块', name: '比对式模块',
code: '比对式', code: '比对式',
key: 'contrast', key: 'contrast',
activated: isActivateOpen === 'true' ? activateInfo.contrast.permanently === 1 : true activated: isActivateOpen === 'true' ? activateInfo.contrast.permanently === 1 : true
} }
] ]
const handelOpen = async (item: string, key: string) => { const handelOpen = async (item: string, key: string) => {
if (isActivateOpen === 'true' && activateInfo[key].permanently !== 1) { if (isActivateOpen === 'true' && activateInfo[key].permanently !== 1) {
ElMessage.warning(`${item}模块未激活`) ElMessage.warning(`${item}模块未激活`)
return return
} }
await authStore.setShowMenu() await authStore.setShowMenu()
modeStore.setCurrentMode(item) // 将模式code存入 store modeStore.setCurrentMode(item) // 将模式code存入 store
// 强制刷新页面 // 强制刷新页面
await tabsStore.closeMultipleTab() await tabsStore.closeMultipleTab()
await initDynamicRouter() 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> </script>
<style scoped lang="scss"> <style scoped lang="scss">
@use './index.scss'; @use './index.scss';
.footer { .footer {
position: relative; position: relative;
background-color: var(--el-color-primary); background-color: var(--el-color-primary);
// .el-button:hover { // .el-button:hover {
// background-color: var(--el-color-primary) !important; // background-color: var(--el-color-primary) !important;
// border: none !important; // border: none !important;
// outline: none !important; // outline: none !important;
// } // }
.change_mode { .change_mode {
color: #fff; color: #fff;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: flex-start; justify-content: flex-start;
height: 100%; height: 100%;
width: auto; width: auto;
font-size: 14px; font-size: 14px;
.change_mode_down { .change_mode_down {
display: block; display: block;
}
.change_mode_up {
display: none;
}
} }
.change_mode_up { .change_mode:hover {
display: none; .change_mode_down {
display: none;
}
.change_mode_up {
display: block;
}
} }
} .el-dropdown {
.change_mode:hover { z-index: 1001;
.change_mode_down {
display: none;
} }
.change_mode_up { p {
display: block; position: absolute;
width: 100%;
height: 100%;
text-align: right;
line-height: 40px;
a {
color: #fff;
margin-right: 25px; // 增加右边距
}
} }
}
.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> </style>

View File

@@ -22,6 +22,14 @@
<el-icon><Edit /></el-icon> <el-icon><Edit /></el-icon>
{{ t('header.changePassword') }} {{ t('header.changePassword') }}
</el-dropdown-item> </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'"> <el-dropdown trigger="hover" placement="left-start" v-if="userStore.userInfo.loginName == 'root'">
<div class="custom-dropdown-trigger"> <div class="custom-dropdown-trigger">
<el-icon><Tools /></el-icon> <el-icon><Tools /></el-icon>
@@ -54,6 +62,8 @@
<InfoDialog ref="infoRef"></InfoDialog> <InfoDialog ref="infoRef"></InfoDialog>
<!-- passwordDialog --> <!-- passwordDialog -->
<PasswordDialog ref="passwordRef"></PasswordDialog> <PasswordDialog ref="passwordRef"></PasswordDialog>
<!-- versionRegisterDialog -->
<VersionDialog ref="versionRegisterRef"></VersionDialog>
<!-- ThemeDialog --> <!-- ThemeDialog -->
<ThemeDialog ref="themeRef"></ThemeDialog> <ThemeDialog ref="themeRef"></ThemeDialog>
</template> </template>
@@ -67,7 +77,9 @@ import { ElMessage, ElMessageBox } from 'element-plus'
import InfoDialog from './InfoDialog.vue' import InfoDialog from './InfoDialog.vue'
import PasswordDialog from './PasswordDialog.vue' import PasswordDialog from './PasswordDialog.vue'
import ThemeDialog from './ThemeDialog.vue' import ThemeDialog from './ThemeDialog.vue'
import { Avatar, Sunny, Tools } from '@element-plus/icons-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 { useDictStore } from '@/stores/modules/dict' import { useDictStore } from '@/stores/modules/dict'
import { useAppSceneStore } from '@/stores/modules/mode' import { useAppSceneStore } from '@/stores/modules/mode'
import { useI18n } from 'vue-i18n' import { useI18n } from 'vue-i18n'
@@ -78,6 +90,7 @@ const dictStore = useDictStore()
const username = computed(() => userStore.userInfo.name) const username = computed(() => userStore.userInfo.name)
const router = useRouter() const router = useRouter()
const authStore = useAuthStore()
// 初始化 i18n // 初始化 i18n
const { t } = useI18n() // 使用 t 方法替代 $t const { t } = useI18n() // 使用 t 方法替代 $t
@@ -98,10 +111,12 @@ const logout = () => {
// 打开修改密码和个人信息弹窗 // 打开修改密码和个人信息弹窗
const infoRef = ref<InstanceType<typeof InfoDialog> | null>(null) const infoRef = ref<InstanceType<typeof InfoDialog> | null>(null)
const passwordRef = ref<InstanceType<typeof PasswordDialog> | 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 themeRef = ref<InstanceType<typeof ThemeDialog> | null>(null)
const openDialog = (ref: string) => { const openDialog = (ref: string) => {
if (ref == 'infoRef') infoRef.value?.openDialog() if (ref == 'infoRef') infoRef.value?.openDialog()
if (ref == 'passwordRef') passwordRef.value?.openDialog() if (ref == 'passwordRef') passwordRef.value?.openDialog()
if (ref == 'versionRegisterRef') versionRegisterRef.value?.openDialog()
if (ref == 'themeRef') themeRef.value?.openDialog() if (ref == 'themeRef') themeRef.value?.openDialog()
} }
@@ -115,6 +130,10 @@ const changeScene = async (value: string) => {
} }
//模式切换 //模式切换
const changeMode = async () => {
authStore.changeModel()
await router.push('/home/index')
}
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">

View File

@@ -29,7 +29,6 @@ import { useRoute, useRouter } from 'vue-router'
import { useGlobalStore } from '@/stores/modules/global' import { useGlobalStore } from '@/stores/modules/global'
import { useTabsStore } from '@/stores/modules/tabs' import { useTabsStore } from '@/stores/modules/tabs'
import { useAuthStore } from '@/stores/modules/auth' import { useAuthStore } from '@/stores/modules/auth'
import { HOME_URL } from '@/config'
import { TabPaneName, TabsPaneContext } from 'element-plus' import { TabPaneName, TabsPaneContext } from 'element-plus'
import MoreButton from './components/MoreButton.vue' import MoreButton from './components/MoreButton.vue'
@@ -74,13 +73,13 @@ watch(
// 初始化需要固定的 tabs // 初始化需要固定的 tabs
const initTabs = () => { const initTabs = () => {
authStore.flatMenuListGet.forEach(item => { authStore.flatMenuListGet.forEach(item => {
if (item.path === HOME_URL && !item.meta.isHide && !item.meta.isFull) { if (item.meta.isAffix && !item.meta.isHide && !item.meta.isFull) {
const tabsParams = { const tabsParams = {
icon: item.meta.icon, icon: item.meta.icon,
title: item.meta.title, title: item.meta.title,
path: item.path, path: item.path,
name: item.name, name: item.name,
close: false, close: !item.meta.isAffix,
isKeepAlive: item.meta.isKeepAlive, isKeepAlive: item.meta.isKeepAlive,
unshift: true unshift: true
} }

View File

@@ -3,7 +3,6 @@ import { type AuthState } from '@/stores/interface'
import { getAuthButtonListApi, getAuthMenuListApi } from '@/api/user/login' import { getAuthButtonListApi, getAuthMenuListApi } from '@/api/user/login'
import { getAllBreadcrumbList, getFlatMenuList, getShowMenuList } from '@/utils' import { getAllBreadcrumbList, getFlatMenuList, getShowMenuList } from '@/utils'
import { AUTH_STORE_KEY } from '@/stores/constant' import { AUTH_STORE_KEY } from '@/stores/constant'
import { HOME_URL } from '@/config'
import { useModeStore } from '@/stores/modules/mode' import { useModeStore } from '@/stores/modules/mode'
import { getLicense } from '@/api/activate' import { getLicense } from '@/api/activate'
import type { Activate } from '@/api/activate/interface' import type { Activate } from '@/api/activate/interface'
@@ -53,7 +52,7 @@ export const useAuthStore = defineStore(AUTH_STORE_KEY, {
? filterMenuByExcludedNames(menuData, ['testSource', 'testScript', 'controlSource']) ? filterMenuByExcludedNames(menuData, ['testSource', 'testScript', 'controlSource'])
: filterMenuByExcludedNames(menuData, ['standardDevice']) : filterMenuByExcludedNames(menuData, ['standardDevice'])
this.authMenuList = normalizeHomeAffix(filteredMenu) this.authMenuList = filteredMenu
}, },
// Set RouteName // Set RouteName
async setRouteName(name: string) { async setRouteName(name: string) {
@@ -113,22 +112,3 @@ function filterMenuByExcludedNames(menuList: any[], excludedNames: string[]): an
return !excludedNames.includes(menu.name) return !excludedNames.includes(menu.name)
}) })
} }
function normalizeHomeAffix(menuList: any[]): any[] {
return menuList.map(menu => {
const nextMenu = { ...menu }
if (nextMenu.meta) {
nextMenu.meta = {
...nextMenu.meta,
isAffix: nextMenu.path === HOME_URL
}
}
if (Array.isArray(nextMenu.children) && nextMenu.children.length > 0) {
nextMenu.children = normalizeHomeAffix(nextMenu.children)
}
return nextMenu
})
}

View File

@@ -1,11 +1,9 @@
// src/stores/modules/mode.ts // src/stores/modules/mode.ts
import { defineStore } from 'pinia' import { defineStore } from 'pinia'
export const DEFAULT_MODE = '模拟式'
export const useModeStore = defineStore('mode', { export const useModeStore = defineStore('mode', {
state: () => ({ state: () => ({
currentMode: localStorage.getItem('currentMode') || DEFAULT_MODE currentMode: localStorage.getItem('currentMode') || ('' as string)
}), }),
actions: { actions: {
setCurrentMode(modeName: string) { setCurrentMode(modeName: string) {

View File

@@ -4,7 +4,7 @@ import piniaPersistConfig from '@/stores/helper/persist'
import { USER_STORE_KEY } from '@/stores/constant' import { USER_STORE_KEY } from '@/stores/constant'
import { logoutApi } from '@/api/user/login' import { logoutApi } from '@/api/user/login'
import { useAuthStore } from '@/stores/modules/auth' import { useAuthStore } from '@/stores/modules/auth'
import { DEFAULT_MODE, useAppSceneStore, useModeStore } from '@/stores/modules/mode' import { useAppSceneStore, useModeStore } from '@/stores/modules/mode'
import { useDictStore } from '@/stores/modules/dict' import { useDictStore } from '@/stores/modules/dict'
export const useUserStore = defineStore(USER_STORE_KEY, { export const useUserStore = defineStore(USER_STORE_KEY, {
@@ -48,7 +48,7 @@ export const useUserStore = defineStore(USER_STORE_KEY, {
this.setUserInfo({ id: '', name: '', loginName: '' }) this.setUserInfo({ id: '', name: '', loginName: '' })
this.setIsRefreshToken(false) this.setIsRefreshToken(false)
dictStore.setDictData([]) dictStore.setDictData([])
modeStore.setCurrentMode(DEFAULT_MODE) modeStore.setCurrentMode('')
appSceneStore.setCurrentMode('') appSceneStore.setCurrentMode('')
await authStore.resetAuthStore() await authStore.resetAuthStore()
} }

View File

@@ -18,7 +18,7 @@
<template #operation='scope'> <template #operation='scope'>
<el-button v-auth.role="'edit'" type='primary' link :icon='EditPen' @click="openDrawer('edit', scope.row)" :disabled="scope.row.code == 'root'">编辑</el-button> <el-button v-auth.role="'edit'" type='primary' link :icon='EditPen' @click="openDrawer('edit', scope.row)" :disabled="scope.row.code == 'root'">编辑</el-button>
<el-button v-auth.role="'delete'" type='primary' link :icon='Delete' @click='deleteAccount(scope.row)' :disabled="scope.row.code == 'root'">删除</el-button> <el-button v-auth.role="'delete'" type='primary' link :icon='Delete' @click='deleteAccount(scope.row)' :disabled="scope.row.code == 'root'">删除</el-button>
<el-button v-auth.role="'SetPermissions'" type='primary' link :icon='Share' @click="openDrawer('设置权限', scope.row)">设置权限</el-button> <el-button v-auth.role="'SetPermissions'" type='primary' link :icon='Share' @click="openDrawer('设置权限', scope.row)" :disabled="scope.row.code == 'root'">设置权限</el-button>
</template> </template>
</ProTable> </ProTable>

View File

@@ -91,7 +91,7 @@
type="primary" type="primary"
icon="Clock" icon="Clock"
@click="handleTest('手动检测')" @click="handleTest('手动检测')"
v-if="form.activeTabs === 0 && modeStore.currentMode == '模拟式'" v-if="form.activeTabs === 0 && modeStore.currentMode != '比对式'"
> >
手动检测 手动检测
</el-button> </el-button>
@@ -483,7 +483,7 @@ const columns = reactive<ColumnProps<Device.ResPqDev>[]>([
sortable: true, sortable: true,
isShow: checkStateShow, isShow: checkStateShow,
render: scope => { render: scope => {
return scope.row.checkState === 0 ? '未检' : scope.row.checkState === 1 ? '检测中' : '检测完成' return scope.row.checkState === 0 ? '未检' : scope.row.checkState === 1 ? '检测中' : scope.row.checkState === 2 ? '检测完成':'归档'
} }
}, },
{ {
@@ -494,10 +494,12 @@ const columns = reactive<ColumnProps<Device.ResPqDev>[]>([
render: scope => { render: scope => {
if (scope.row.checkResult === 0) { if (scope.row.checkResult === 0) {
return <el-tag type="danger">不符合</el-tag> return <el-tag type="danger">不符合</el-tag>
} else if (scope.row.checkResult === 0) {
return '不符合'
} else if (scope.row.checkResult === 1) { } else if (scope.row.checkResult === 1) {
return '符合' return '符合'
} else if (scope.row.checkResult === 2) { }else if(scope.row.checkResult === 2) {
return '未检' return '未检'
} }
return '' return ''
} }
@@ -539,7 +541,6 @@ const columns = reactive<ColumnProps<Device.ResPqDev>[]>([
{ prop: 'operation', label: '操作', fixed: 'right', minWidth :200,isShow: operationShow } { prop: 'operation', label: '操作', fixed: 'right', minWidth :200,isShow: operationShow }
]) ])
let testType = 'test' // 检测类型:'test'-检测 'reTest'-复检 let testType = 'test' // 检测类型:'test'-检测 'reTest'-复检
let qualifiedCount = 0 //合格数量
//比对单个报告生成 //比对单个报告生成
@@ -575,8 +576,6 @@ const handleSelectionChange = (selection: any[]) => {
} else { } else {
testType = 'reTest' testType = 'reTest'
} }
qualifiedCount=selection.filter(item => item.checkResult == 1).length
let devices: CheckData.Device[] = selection.map((item: any) => { let devices: CheckData.Device[] = selection.map((item: any) => {
return { return {
deviceId: item.id, deviceId: item.id,
@@ -599,6 +598,19 @@ const handleSelectionChange = (selection: any[]) => {
} }
} }
const isUncheckedDevice = (device: Device.ResPqDev) => Number(device.checkState) === 0 || Number(device.checkResult) === 2
const hasCheckedSelectedDevice = () => channelsSelection.value.some(device => !isUncheckedDevice(device))
const hasUncheckedSelectedDevice = () => channelsSelection.value.some(device => isUncheckedDevice(device))
const hasCheckedUnqualifiedSelectedDevice = () =>
channelsSelection.value.some(device => !isUncheckedDevice(device) && Number(device.checkResult) === 0)
const shouldShowRecheckModeDialog = () => hasCheckedSelectedDevice()
const canUseUnqualifiedItemRecheck = () => hasCheckedUnqualifiedSelectedDevice() && !hasUncheckedSelectedDevice()
//查询 //查询
const handleSearch = () => { const handleSearch = () => {
proTable.value?.getTableList() proTable.value?.getTableList()
@@ -923,12 +935,12 @@ const handleTest = async (val: string) => {
dialogTitle.value = val dialogTitle.value = val
if (val === '手动检测') { if (val === '手动检测') {
checkStore.setShowDetailType(2) checkStore.setShowDetailType(2)
if (testType === 'reTest') { if (shouldShowRecheckModeDialog()) {
ElMessageBox.confirm('请选择复检检测方式', '设备复检', { ElMessageBox.confirm('请选择复检检测方式', '设备复检', {
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: '不合格项复检', confirmButtonText: '不合格项复检',
cancelButtonText: '全部复检', cancelButtonText: '全部复检',
showConfirmButton:qualifiedCount<=0, showConfirmButton: canUseUnqualifiedItemRecheck(),
type: 'warning' type: 'warning'
}) })
.then(() => { .then(() => {
@@ -963,11 +975,12 @@ const handleTest = async (val: string) => {
checkStore.setCheckType(1) checkStore.setCheckType(1)
checkStore.initSelectTestItems() checkStore.initSelectTestItems()
// 一键检测 // 一键检测
if (testType === 'reTest' && modeStore.currentMode != '比对式') { if (shouldShowRecheckModeDialog() && modeStore.currentMode != '比对式') {
ElMessageBox.confirm('请选择复检检测方式', '设备复检', { ElMessageBox.confirm('请选择复检检测方式', '设备复检', {
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
confirmButtonText: '不合格项复检', confirmButtonText: '不合格项复检',
cancelButtonText: '全部复检', cancelButtonText: '全部复检',
showConfirmButton: canUseUnqualifiedItemRecheck(),
type: 'warning' type: 'warning'
}) })
.then(() => { .then(() => {
@@ -1087,7 +1100,7 @@ const openDrawer = async (title: string, row: any) => {
if (title === '检测数据查询') { if (title === '检测数据查询') {
checkStore.setShowDetailType(0) checkStore.setShowDetailType(0)
if (modeStore.currentMode == '模拟式') { if (modeStore.currentMode == '模拟式'||modeStore.currentMode == '数字式') {
dataCheckPopupRef.value?.open(row.id, '-1', null) dataCheckPopupRef.value?.open(row.id, '-1', null)
} else if (modeStore.currentMode == '比对式') { } else if (modeStore.currentMode == '比对式') {
dataCheckSingleChannelSingleTestPopupRef.value?.open(row, null, row.id, 2) dataCheckSingleChannelSingleTestPopupRef.value?.open(row, null, row.id, 2)
@@ -1095,7 +1108,7 @@ const openDrawer = async (title: string, row: any) => {
} }
if (title === '误差体系更换') { if (title === '误差体系更换') {
checkStore.setShowDetailType(1) checkStore.setShowDetailType(1)
if (modeStore.currentMode == '模拟式') { if (modeStore.currentMode == '模拟式'||modeStore.currentMode == '数字式') {
dataCheckPopupRef.value?.open(row.id, '-1', null) dataCheckPopupRef.value?.open(row.id, '-1', null)
} else if (modeStore.currentMode == '比对式') { } else if (modeStore.currentMode == '比对式') {
dataCheckSingleChannelSingleTestPopupRef.value?.open(row, null, row.id, 2) dataCheckSingleChannelSingleTestPopupRef.value?.open(row, null, row.id, 2)

View File

@@ -29,7 +29,7 @@
@node-click="handleNodeClick" @node-click="handleNodeClick"
> >
<template #default="{ node, data }"> <template #default="{ node, data }">
<span class="custom-tree-node" style="display: flex; align-items: center;"> <span class="custom-tree-node">
<!-- 父节点图标 --> <!-- 父节点图标 -->
<Platform <Platform
v-if="!data.pid" v-if="!data.pid"
@@ -39,50 +39,52 @@
}" }"
/> />
<!-- 节点名称 --> <!-- 节点名称 -->
<span>{{ node.label }}</span> <span class="node-label">{{ node.label }}</span>
<!-- 子节点右侧图标 + tooltip --> <span class="node-actions">
<el-tooltip <PieChart
v-if=" v-if="isCompletedPlanNode(node.data)"
node.label != '未检' && class="node-action-icon"
node.label != '检测中' && @click.stop="openStatistics(node.data)"
node.label != '检测完成' && style="margin-right: 8px"
hasChildrenInPlanTable(node.data)
"
placement="top"
:manual="true"
content="子计划信息"
>
<List
@click.stop="childDetail(node.data)"
style="
width: 16px;
height: 16px;
margin-left: 8px;
cursor: pointer;
color: var(--el-color-primary);
"
/> />
</el-tooltip> <!-- 子节点右侧图标 + tooltip -->
<el-tooltip
v-if="
node.label != '未检' &&
node.label != '检测中' &&
node.label != '检测完成' &&
hasChildrenInPlanTable(node.data)
"
placement="top"
:manual="true"
content="子计划信息"
>
<List class="node-action-icon" @click.stop="childDetail(node.data)" />
</el-tooltip>
</span>
</span> </span>
</template> </template>
</el-tree> </el-tree>
</div> </div>
</div> </div>
<SourceOpen ref="openSourceView" :width="width" :height="height + 175"></SourceOpen> <SourceOpen ref="openSourceView" :width="width" :height="height + 175"></SourceOpen>
<PlanStatisticsPopup ref="planStatisticsPopupRef" />
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { type Plan } from '@/api/plan/interface' import { type Plan } from '@/api/plan/interface'
import { List, Menu, Platform } from '@element-plus/icons-vue' import { List, Menu, PieChart, Platform } from '@element-plus/icons-vue'
import { nextTick, onMounted, ref, watch } from 'vue' import { nextTick, onMounted, ref, watch } from 'vue'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import { useCheckStore } from '@/stores/modules/check' import { useCheckStore } from '@/stores/modules/check'
import { ElTooltip } from 'element-plus' import { ElTooltip } from 'element-plus'
import SourceOpen from '@/views/plan/planList/components/childrenPlan.vue' import SourceOpen from '@/views/plan/planList/components/childrenPlan.vue'
import PlanStatisticsPopup from '@/views/plan/planList/components/planStatisticsPopup.vue'
import { getPlanList } from '@/api/plan/plan.ts' import { getPlanList } from '@/api/plan/plan.ts'
import { useModeStore } from '@/stores/modules/mode' // 引入模式 store import { useModeStore } from '@/stores/modules/mode' // 引入模式 store
import { useDictStore } from '@/stores/modules/dict' import { useDictStore } from '@/stores/modules/dict'
const openSourceView = ref() const openSourceView = ref()
const planStatisticsPopupRef = ref<InstanceType<typeof PlanStatisticsPopup> | null>(null)
const router = useRouter() const router = useRouter()
const checkStore = useCheckStore() const checkStore = useCheckStore()
const filterText = ref('') const filterText = ref('')
@@ -211,6 +213,14 @@ const childDetail = (data: Plan.ResPlan) => {
} }
} }
const isCompletedPlanNode = (data: Partial<Plan.ResPlan>) => {
return [1, 2].includes(Number(data.testState))
}
const openStatistics = (data: Partial<Plan.ResPlan>) => {
planStatisticsPopupRef.value?.open(data)
}
function buildTree(flatList: any[]): any[] { function buildTree(flatList: any[]): any[] {
const map = new Map() const map = new Map()
const tree: any[] = [] const tree: any[] = []
@@ -293,6 +303,40 @@ defineExpose({ getTreeData, clickTableToTree })
margin-top: 12px; margin-top: 12px;
} }
:deep(.el-tree-node__content) {
padding-right: 6px;
}
.custom-tree-node {
display: flex;
align-items: center;
width: 100%;
min-width: 0;
}
.node-label {
flex: 1;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.node-actions {
flex: none;
display: inline-flex;
align-items: center;
gap: 8px;
margin-left: 8px;
}
.node-action-icon {
width: 16px;
height: 16px;
cursor: pointer;
color: var(--el-color-primary);
}
//.filter-tree span { //.filter-tree span {
// font-size: 16px; // font-size: 16px;
// display:block; // display:block;

View File

@@ -120,7 +120,7 @@ const login = (formEl: FormInstance | undefined) => {
await tabsStore.setTabs([]) await tabsStore.setTabs([])
await keepAliveStore.setKeepAliveName([]) await keepAliveStore.setKeepAliveName([])
// 登录默认不显示菜单和导航栏 // 登录默认不显示菜单和导航栏
await authStore.setShowMenu() await authStore.resetAuthStore()
// 跳转到首页 // 跳转到首页
await router.push(HOME_URL) await router.push(HOME_URL)
} finally { } finally {

Some files were not shown because too many files have changed in this diff Show More