This commit is contained in:
sjl
2025-01-14 11:43:35 +08:00
parent 171533cef0
commit 26cda335c5
9 changed files with 46 additions and 35 deletions

View File

@@ -19,6 +19,6 @@ VITE_API_URL=/api
# 开发环境跨域代理,支持配置多个 # 开发环境跨域代理,支持配置多个
VITE_PROXY=[["/api","http://192.168.1.124:18092/"]] VITE_PROXY=[["/api","http://192.168.1.121:18092/"]]
#VITE_PROXY=[["/api","http://192.168.1.125:18092/"]] #VITE_PROXY=[["/api","http://192.168.1.125:18092/"]]
# VITE_PROXY=[["/api","http://192.168.1.138:8080/"]]张文 # VITE_PROXY=[["/api","http://192.168.1.138:8080/"]]张文

View File

@@ -46,7 +46,7 @@ router.beforeEach(async (to, from, next) => {
const authStore = useAuthStore() const authStore = useAuthStore()
// 1.NProgress 开始 // 1.NProgress 开始
NProgress.start() NProgress.start()
console.log('11111111111111');
// 2.动态设置标题 // 2.动态设置标题
const title = import.meta.env.VITE_GLOB_APP_TITLE const title = import.meta.env.VITE_GLOB_APP_TITLE
document.title = to.meta.title ? `${to.meta.title} - ${title}` : title document.title = to.meta.title ? `${to.meta.title} - ${title}` : title

View File

@@ -36,6 +36,7 @@ export const initDynamicRouter = async () => {
// 3.添加动态路由 // 3.添加动态路由
authStore.flatMenuListGet.forEach(item => { authStore.flatMenuListGet.forEach(item => {
item.children && delete item.children; item.children && delete item.children;
if (item.component && typeof item.component == "string") { if (item.component && typeof item.component == "string") {
item.component = modules["/src/views" + item.component + ".vue"]; item.component = modules["/src/views" + item.component + ".vue"];
} }

View File

@@ -1,5 +1,5 @@
<template> <template>
<el-dialog v-model='dialogVisible' title="系数校准" v-bind="dialogBig" width="1500px" @close="handleCancel"> <el-dialog v-model='dialogVisible' title="系数校准" v-bind="dialogBig" width="1550px" @close="handleCancel">
<div class="test-dialog" > <div class="test-dialog" >
<div class="dialog-content"> <div class="dialog-content">
<div class="right-title"> <div class="right-title">
@@ -241,17 +241,17 @@ watch(webMsgSend,function (newValue,oldValue){
item.devName === newValue.data.devName); item.devName === newValue.data.devName);
if (firstCoefficientVO) { // 检查 firstCoefficientVO 是否存在 if (firstCoefficientVO) { // 检查 firstCoefficientVO 是否存在
firstCoefficientVO.aVuData = parseFloat(newValue.data.aVuData).toFixed(4); firstCoefficientVO.aVuData = parseFloat(newValue.data.aVuData).toFixed(4);
firstCoefficientVO.aVuXi = newValue.data.aVuXi; firstCoefficientVO.aVuXi = parseFloat(newValue.data.aVuXi).toFixed(4);
firstCoefficientVO.bVuData = parseFloat(newValue.data.bVuData).toFixed(4); firstCoefficientVO.bVuData = parseFloat(newValue.data.bVuData).toFixed(4);
firstCoefficientVO.bVuXi = newValue.data.bVuXi; firstCoefficientVO.bVuXi = parseFloat(newValue.data.bVuXi).toFixed(4);
firstCoefficientVO.cVuData = parseFloat(newValue.data.cVuData).toFixed(4); firstCoefficientVO.cVuData = parseFloat(newValue.data.cVuData).toFixed(4);
firstCoefficientVO.cVuXi = newValue.data.cVuXi; firstCoefficientVO.cVuXi = parseFloat(newValue.data.cVuXi).toFixed(4);
firstCoefficientVO.aIeData = parseFloat(newValue.data.aIeData).toFixed(4); firstCoefficientVO.aIeData = parseFloat(newValue.data.aIeData).toFixed(4);
firstCoefficientVO.aIeXi = newValue.data.aIeXi; firstCoefficientVO.aIeXi = parseFloat(newValue.data.aIeXi).toFixed(4);
firstCoefficientVO.bIeData = parseFloat(newValue.data.bIeData).toFixed(4); firstCoefficientVO.bIeData = parseFloat(newValue.data.bIeData).toFixed(4);
firstCoefficientVO.bIeXi = newValue.data.bIeXi; firstCoefficientVO.bIeXi = parseFloat(newValue.data.bIeXi).toFixed(4);
firstCoefficientVO.cIeData = parseFloat(newValue.data.cIeData).toFixed(4); firstCoefficientVO.cIeData = parseFloat(newValue.data.cIeData).toFixed(4);
firstCoefficientVO.cIeXi = newValue.data.cIeXi; firstCoefficientVO.cIeXi = parseFloat(newValue.data.cIeXi).toFixed(4);
//console.log(newValue.data.devName + '对象:', firstCoefficientVO); //console.log(newValue.data.devName + '对象:', firstCoefficientVO);
activeIndex.value++; activeIndex.value++;
} else { } else {
@@ -511,6 +511,11 @@ const updateErrorState = (index: number, hasError: boolean) => {
//console.log('tableDataMap',tableDataMap); //console.log('tableDataMap',tableDataMap);
} }
const emit = defineEmits<{
(e: 'quitClicked'): void;
}>();
const handleCancel=() => { const handleCancel=() => {
// 清空 name, channel, total // 清空 name, channel, total
name.value = []; name.value = [];
@@ -521,6 +526,7 @@ const updateErrorState = (index: number, hasError: boolean) => {
active.value = 0 active.value = 0
dialogVisible.value = false dialogVisible.value = false
editableTabsValue.value = '0' editableTabsValue.value = '0'
emit('quitClicked'); // 触发事件
} }
const getTableDataForChannel = (index: number): any[] => { const getTableDataForChannel = (index: number): any[] => {

View File

@@ -9,8 +9,8 @@
<el-table-column prop="monitorNum" label="监测点序号" width="80"/> <el-table-column prop="monitorNum" label="监测点序号" width="80"/>
<el-table-column prop="desc" label="描述" width="90"/> <el-table-column prop="desc" label="描述" width="90"/>
<el-table-column label="电压通道" > <el-table-column label="电压通道" >
<el-table-column prop="Ua" label="L1(V)"> <el-table-column prop="Ua" label="L1">
<el-table-column prop="aVuData" label="被检值"> <el-table-column prop="aVuData" label="被检值(V)" width="100px">
<template #default="scope"> <template #default="scope">
<el-icon v-if="scope.row.aVuData === '—'&& scope.row.loading" class="loading-box"> <el-icon v-if="scope.row.aVuData === '—'&& scope.row.loading" class="loading-box">
<el-icon-loading /> <el-icon-loading />
@@ -20,7 +20,7 @@
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="aVuXi" label="检测结果"> <el-table-column prop="aVuXi" label="检测结果" width="90px">
<template #default="scope"> <template #default="scope">
<el-tooltip <el-tooltip
v-if="scope.row.aVuXi === '不合格'" v-if="scope.row.aVuXi === '不合格'"
@@ -54,8 +54,8 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
<el-table-column prop="Ub" label="L2(V)"> <el-table-column prop="Ub" label="L2">
<el-table-column prop="bVuData" label="被检值"> <el-table-column prop="bVuData" label="被检值(V)" width="100px">
<template #default="scope"> <template #default="scope">
<el-icon v-if="scope.row.bVuData === '—'&& scope.row.loading" class="loading-box"> <el-icon v-if="scope.row.bVuData === '—'&& scope.row.loading" class="loading-box">
<el-icon-loading /> <el-icon-loading />
@@ -65,7 +65,7 @@
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="bVuXi" label="检测结果"> <el-table-column prop="bVuXi" label="检测结果" width="90px">
<template #default="scope"> <template #default="scope">
<el-tooltip <el-tooltip
v-if="scope.row.bVuXi === '不合格'" v-if="scope.row.bVuXi === '不合格'"
@@ -93,8 +93,8 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
<el-table-column prop="Uc" label="L3(V)"> <el-table-column prop="Uc" label="L3">
<el-table-column prop="cVuData" label="被检值"> <el-table-column prop="cVuData" label="被检值(V)" width="100px">
<template #default="scope"> <template #default="scope">
<el-icon v-if="scope.row.cVuData === '—'&& scope.row.loading" class="loading-box"> <el-icon v-if="scope.row.cVuData === '—'&& scope.row.loading" class="loading-box">
<el-icon-loading /> <el-icon-loading />
@@ -104,7 +104,7 @@
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="cVuXi" label="检测结果"> <el-table-column prop="cVuXi" label="检测结果" width="90px">
<template #default="scope"> <template #default="scope">
<el-tooltip <el-tooltip
v-if="scope.row.cVuXi === '不合格'" v-if="scope.row.cVuXi === '不合格'"
@@ -134,8 +134,8 @@
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
<el-table-column label="电流通道" > <el-table-column label="电流通道" >
<el-table-column prop="Ia" label="L1(A)"> <el-table-column prop="Ia" label="L1">
<el-table-column prop="aIeData" label="被检值"> <el-table-column prop="aIeData" label="被检值(A)" width="100px">
<template #default="scope"> <template #default="scope">
<el-icon v-if="scope.row.aIeData === '—'&& scope.row.loading" class="loading-box"> <el-icon v-if="scope.row.aIeData === '—'&& scope.row.loading" class="loading-box">
<el-icon-loading /> <el-icon-loading />
@@ -145,7 +145,7 @@
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="aIeXi" label="检测结果"> <el-table-column prop="aIeXi" label="检测结果" width="90px">
<template #default="scope"> <template #default="scope">
<el-tooltip <el-tooltip
v-if="scope.row.aIeXi === '不合格'" v-if="scope.row.aIeXi === '不合格'"
@@ -173,8 +173,8 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
<el-table-column prop="Ib" label="L2(A)"> <el-table-column prop="Ib" label="L2">
<el-table-column prop="bIeData" label="被检值"> <el-table-column prop="bIeData" label="被检值(A)" width="100px">
<template #default="scope"> <template #default="scope">
<el-icon v-if="scope.row.bIeData === '—'&& scope.row.loading" class="loading-box"> <el-icon v-if="scope.row.bIeData === '—'&& scope.row.loading" class="loading-box">
<el-icon-loading /> <el-icon-loading />
@@ -184,7 +184,7 @@
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="bIeXi" label="检测结果"> <el-table-column prop="bIeXi" label="检测结果" width="90px">
<template #default="scope"> <template #default="scope">
<el-tooltip <el-tooltip
v-if="scope.row.bIeXi === '不合格'" v-if="scope.row.bIeXi === '不合格'"
@@ -212,8 +212,8 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
<el-table-column prop="Ic" label="L3(A)"> <el-table-column prop="Ic" label="L3">
<el-table-column prop="cIeData" label="被检值"> <el-table-column prop="cIeData" label="被检值(A)" width="100px">
<template #default="scope"> <template #default="scope">
<el-icon v-if="scope.row.cIeData === '—'&& scope.row.loading" class="loading-box"> <el-icon v-if="scope.row.cIeData === '—'&& scope.row.loading" class="loading-box">
<el-icon-loading /> <el-icon-loading />
@@ -223,7 +223,7 @@
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="cIeXi" label="检测结果"> <el-table-column prop="cIeXi" label="检测结果" width="90px">
<template #default="scope"> <template #default="scope">
<el-tooltip <el-tooltip
v-if="scope.row.cIeXi === '不合格'" v-if="scope.row.cIeXi === '不合格'"

View File

@@ -229,7 +229,7 @@
></matchPopup> ></matchPopup>
<!--系数校准--> <!--系数校准-->
<ChannelsTest ref="channelsTest" :webMsgSend="webMsgSend"></ChannelsTest> <ChannelsTest ref="channelsTest" :webMsgSend="webMsgSend" @quitClicked="handleQuitClicked"></ChannelsTest>
</div> </div>
</template> </template>

View File

@@ -452,7 +452,7 @@ onUnmounted(() => {
}) })
const handleBatchGenerate = () => { const handleBatchGenerate = () => {
// console.log('批量生成按钮被点击了'); console.log('批量生成按钮被点击了');
// 在这里添加其他逻辑,比如显示对话框、更新状态等 // 在这里添加其他逻辑,比如显示对话框、更新状态等
getPieData(currentId.value) getPieData(currentId.value)

View File

@@ -200,7 +200,7 @@ const disabledDate = (time: Date) => {
hardwareVersion: '', hardwareVersion: '',
softwareVersion: '', softwareVersion: '',
protocol: 'MMS', protocol: 'MMS',
ip: '192.168.1.200', ip: '172.17.102.200',
port: 102, port: 102,
encryptionFlag: 0, encryptionFlag: 0,
reCheckNum:0, reCheckNum:0,
@@ -229,7 +229,7 @@ const disabledDate = (time: Date) => {
hardwareVersion: '', hardwareVersion: '',
softwareVersion: '', softwareVersion: '',
protocol: 'MMS', protocol: 'MMS',
ip: '192.168.1.200', ip: '172.17.102.200',
port: 102, port: 102,
encryptionFlag: 0, encryptionFlag: 0,
reCheckNum:0, reCheckNum:0,
@@ -262,7 +262,6 @@ const baseRules: Record<string, Array<FormItemRule>> = {
{ required: true, message: '额定电流必填!', trigger: 'blur' }, { required: true, message: '额定电流必填!', trigger: 'blur' },
{ pattern: /^\d+(\.\d+)?$/, message: '额定电流格式错误', trigger: 'blur' } { pattern: /^\d+(\.\d+)?$/, message: '额定电流格式错误', trigger: 'blur' }
], ],
createDate: [{ required: true, message: '生产日期必填!', trigger: 'blur' }],
createId: [{ required: true, message: '出厂编号必填!', trigger: 'blur' }], createId: [{ required: true, message: '出厂编号必填!', trigger: 'blur' }],
ip: [ ip: [
{ required: true, message: 'IP地址必填', trigger: 'blur' }, { required: true, message: 'IP地址必填', trigger: 'blur' },
@@ -292,8 +291,11 @@ const rules = computed(() => {
if (scene.value !== '2') { if (scene.value !== '2') {
dynamicRules.name = [{ required: true, message: '设备名称必填!', trigger: 'blur' }]; dynamicRules.name = [{ required: true, message: '设备名称必填!', trigger: 'blur' }];
dynamicRules.manufacturer = [{ required: true, message: '生产厂家必选!', trigger: 'change' }]; dynamicRules.manufacturer = [{ required: true, message: '生产厂家必选!', trigger: 'change' }];
dynamicRules.createDate= [{ required: true, message: '出厂日期必填!', trigger: 'blur' }];
} }
return dynamicRules; return dynamicRules;
}); });

View File

@@ -44,9 +44,11 @@ import ValueTypePopup from './components/valueTypePopup.vue'
} from '@/api/device/testScript/index' } from '@/api/device/testScript/index'
import { computed, reactive, ref } from 'vue' import { computed, reactive, ref } from 'vue'
import { useModeStore } from '@/stores/modules/mode'; // 引入模式 store import { useModeStore } from '@/stores/modules/mode'; // 引入模式 store
// defineOptions({ defineOptions({
// name: 'machine/testScript' name: '/testScript'
// }) })
const comparisonPopup = ref() const comparisonPopup = ref()
const testScriptPopup = ref() const testScriptPopup = ref()
const valueTypePopup = ref() const valueTypePopup = ref()