From 35f21b7140de4558f4dedb23172d6eb0882706cf Mon Sep 17 00:00:00 2001 From: sjl <1716605279@qq.com> Date: Wed, 15 Oct 2025 08:49:11 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E9=99=A4=E6=97=A5=E5=BF=97=EF=BC=8C?= =?UTF-8?q?=E8=A1=A8=E6=A0=BC=E5=AE=BD=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/api/index.ts | 6 +-- frontend/src/components/ImportExcel/index.vue | 4 +- frontend/src/components/ImportZip/index.vue | 2 +- frontend/src/directives/modules/auth.ts | 2 +- frontend/src/utils/webSocketClient.ts | 40 +++++++++---------- .../views/home/components/channelPairing.vue | 2 - ...eDataCheckSingleChannelSingleTestPopup.vue | 2 +- .../src/views/home/components/compareTest.vue | 13 +++--- .../home/components/compareTestPopup.vue | 28 ++++++------- .../dataCheckSingleChannelSingleTestPopup.vue | 12 +++--- .../home/components/deviceConnectionPopup.vue | 2 +- .../src/views/home/components/factorTest.vue | 27 ++++++------- .../src/views/home/components/preTest.vue | 2 +- .../src/views/home/components/resultPopup.vue | 2 +- frontend/src/views/home/components/table.vue | 12 +++--- .../src/views/home/components/temptest.vue | 2 +- frontend/src/views/home/components/test.vue | 8 ++-- .../src/views/home/components/testPopup.vue | 24 +++++------ .../src/views/home/components/timeTest.vue | 2 +- frontend/src/views/home/tabs/model.vue | 4 +- .../components/controlSourceDetail.vue | 2 +- .../controlSource/components/machineTree.vue | 8 ++-- .../src/views/machine/controlSource/index.vue | 6 +-- .../machine/device/components/monitorTab.vue | 2 +- .../components/testScriptDipTab.vue | 2 +- .../testScript/components/testScriptTree.vue | 2 +- .../src/views/machine/testSource/index.vue | 2 +- .../autoTest/components/autoTestTable.vue | 7 ++-- .../plan/autoTest/components/autoTestTree.vue | 4 +- frontend/src/views/plan/autoTest/index.vue | 8 ++-- .../plan/planList/components/childrenPlan.vue | 16 ++++---- .../plan/planList/components/devSelect.vue | 2 +- .../plan/planList/components/devTransfer.vue | 2 +- .../plan/planList/components/planPopup.vue | 2 +- frontend/src/views/plan/planList/index.vue | 8 ++-- .../plan/preTest/components/timeLine.vue | 2 +- .../singlePlanList/components/details.vue | 10 ++--- .../src/views/plan/singlePlanList/index.vue | 2 +- 38 files changed, 135 insertions(+), 148 deletions(-) diff --git a/frontend/src/api/index.ts b/frontend/src/api/index.ts index f4db584..3ced9fd 100644 --- a/frontend/src/api/index.ts +++ b/frontend/src/api/index.ts @@ -93,7 +93,7 @@ class RequestHttp { } // 登陆失效 if (data.code === ResultEnum.OVERDUE) { - console.log('登陆失效') + //console.log('登陆失效') userStore.setAccessToken('') userStore.setRefreshToken('') userStore.setIsRefreshToken(false) @@ -142,7 +142,7 @@ class RequestHttp { async (error: AxiosError) => { const { response } = error tryHideFullScreenLoading() - console.log('error', error.message) + //console.log('error', error.message) // 请求超时 && 网络错误单独判断,没有 response if (error.message.indexOf('timeout') !== -1) ElMessage.error('请求超时!请您稍后重试') if (error.message.indexOf('Network Error') !== -1) ElMessage.error('网络错误!请您稍后重试') @@ -228,7 +228,7 @@ class RequestHttp { // 设置默认的Authorization头部 eventSource.addEventListener('open', function () { - console.log('SSE连接已建立') + //console.log('SSE连接已建立') }) // 添加错误处理 eventSource.addEventListener('error', function (err) { diff --git a/frontend/src/components/ImportExcel/index.vue b/frontend/src/components/ImportExcel/index.vue index 099cb97..ff76805 100644 --- a/frontend/src/components/ImportExcel/index.vue +++ b/frontend/src/components/ImportExcel/index.vue @@ -112,7 +112,7 @@ const uploadExcel = async (param: UploadRequestOptions) => { } async function handleImportResponse(res: any) { - console.log(res) + if (res.type === 'application/json') { const fileReader = new FileReader() @@ -129,7 +129,7 @@ async function handleImportResponse(res: any) { } emit('result', jsonData.data) } catch (err) { - console.log(err) + //console.log(err) } } fileReader.readAsText(res) diff --git a/frontend/src/components/ImportZip/index.vue b/frontend/src/components/ImportZip/index.vue index 7a8e5de..e566b21 100644 --- a/frontend/src/components/ImportZip/index.vue +++ b/frontend/src/components/ImportZip/index.vue @@ -210,7 +210,7 @@ const closeEventSource = () => { if (eventSource.value) { eventSource.value.close() eventSource.value = null - console.log('SSE连接已关闭') + // console.log('SSE连接已关闭') } } // 监听 dialogVisible 的变化,确保在对话框关闭时清理资源 diff --git a/frontend/src/directives/modules/auth.ts b/frontend/src/directives/modules/auth.ts index 30d0c1e..9755514 100644 --- a/frontend/src/directives/modules/auth.ts +++ b/frontend/src/directives/modules/auth.ts @@ -16,7 +16,7 @@ const auth: Directive = { } else { currentPageRoles = authStore.authButtonListGet[authStore.routeName] ?? [] } - console.log('currentPageRoles', currentPageRoles) + //console.log('currentPageRoles', currentPageRoles) if (value instanceof Array && value.length) { const hasPermission = value.every(item => currentPageRoles.includes(item)) if (!hasPermission) el.remove() diff --git a/frontend/src/utils/webSocketClient.ts b/frontend/src/utils/webSocketClient.ts index bf323b0..9735e69 100644 --- a/frontend/src/utils/webSocketClient.ts +++ b/frontend/src/utils/webSocketClient.ts @@ -246,13 +246,13 @@ export default class SocketService { public connect(): Promise | void { // 检查浏览器支持 if (!window.WebSocket) { - console.log('您的浏览器不支持WebSocket'); + // console.log('您的浏览器不支持WebSocket'); return; } // 防止重复连接 if (this.connectionStatus === ConnectionStatus.CONNECTING || this.connected) { - console.warn('WebSocket已连接或正在连接中'); + // console.warn('WebSocket已连接或正在连接中'); return; } @@ -263,7 +263,7 @@ export default class SocketService { this.setupEventHandlersLegacy(); } catch (error) { this.connectionStatus = ConnectionStatus.ERROR; - console.error('WebSocket连接失败:', error); + //console.error('WebSocket连接失败:', error); } } @@ -276,14 +276,14 @@ export default class SocketService { // 检查浏览器支持 if (!window.WebSocket) { const error = '您的浏览器不支持WebSocket'; - console.error(error); + //console.error(error); reject(new Error(error)); return; } // 防止重复连接 if (this.connectionStatus === ConnectionStatus.CONNECTING || this.connected) { - console.warn('WebSocket已连接或正在连接中'); + //console.warn('WebSocket已连接或正在连接中'); resolve(); return; } @@ -307,11 +307,11 @@ export default class SocketService { */ public registerCallBack(messageType: string, callback: CallbackFunction): void { if (!messageType || typeof callback !== 'function') { - console.error('注册回调函数参数无效'); + //console.error('注册回调函数参数无效'); return; } this.callBackMapping[messageType] = callback; - console.log(`注册消息处理器: ${messageType}`); + // console.log(`注册消息处理器: ${messageType}`); } /** @@ -321,7 +321,7 @@ export default class SocketService { public unRegisterCallBack(messageType: string): void { if (this.callBackMapping[messageType]) { delete this.callBackMapping[messageType]; - console.log(`注销消息处理器: ${messageType}`); + //console.log(`注销消息处理器: ${messageType}`); } } @@ -354,10 +354,10 @@ export default class SocketService { const message = typeof data === 'string' ? data : JSON.stringify(data); this.ws.send(message); - console.log('发送消息:', message); + //console.log('发送消息:', message); resolve(); } catch (error) { - console.error('发送消息失败:', error); + //console.error('发送消息失败:', error); reject(error); } }); @@ -367,7 +367,7 @@ export default class SocketService { * 关闭WebSocket连接 */ public closeWs(): void { - console.log('正在关闭WebSocket连接...'); + //console.log('正在关闭WebSocket连接...'); // 清理心跳 this.clearHeartbeat(); @@ -383,7 +383,7 @@ export default class SocketService { this.connectRetryCount = 0; this.sendRetryCount = 0; - console.log('WebSocket连接已关闭'); + //console.log('WebSocket连接已关闭'); } /** @@ -447,7 +447,7 @@ export default class SocketService { // 连接成功事件 this.ws.onopen = () => { ElMessage.success("WebSocket连接服务端成功"); - console.log('WebSocket连接成功'); + // console.log('WebSocket连接成功'); this.connectionStatus = ConnectionStatus.CONNECTED; this.connectRetryCount = 0; this.startHeartbeat(); @@ -456,7 +456,7 @@ export default class SocketService { // 连接关闭事件 this.ws.onclose = (event: CloseEvent) => { - console.log('WebSocket连接关闭', event.code, event.reason); + //console.log('WebSocket连接关闭', event.code, event.reason); this.connectionStatus = ConnectionStatus.DISCONNECTED; this.clearHeartbeat(); @@ -489,7 +489,7 @@ export default class SocketService { // 连接成功事件 this.ws.onopen = () => { ElMessage.success("webSocket连接服务端成功了"); - console.log('连接服务端成功了'); + // console.log('连接服务端成功了'); this.connectionStatus = ConnectionStatus.CONNECTED; this.connectRetryCount = 0; this.startHeartbeat(); @@ -497,7 +497,7 @@ export default class SocketService { // 连接关闭事件 this.ws.onclose = (event: CloseEvent) => { - console.log('连接webSocket服务端关闭'); + // console.log('连接webSocket服务端关闭'); this.connectionStatus = ConnectionStatus.DISCONNECTED; this.clearHeartbeat(); @@ -530,7 +530,7 @@ export default class SocketService { // 心跳响应处理 if (event.data === 'over') { - console.log(`${new Date().toLocaleTimeString()} - 收到心跳响应`); + // console.log(`${new Date().toLocaleTimeString()} - 收到心跳响应`); this.lastResponseHeartTime = Date.now(); return; } @@ -553,7 +553,7 @@ export default class SocketService { } } else { // 非JSON格式的消息,作为普通文本处理 - console.log('收到非JSON格式消息:', event.data); + // console.log('收到非JSON格式消息:', event.data); // 可以添加文本消息的处理逻辑 if (this.callBackMapping['text']) { this.callBackMapping['text']({ @@ -587,7 +587,7 @@ export default class SocketService { const delay = this.config.reconnectDelay! * this.connectRetryCount; - console.log(`尝试第${this.connectRetryCount}次重连,${delay}ms后开始...`); + // console.log(`尝试第${this.connectRetryCount}次重连,${delay}ms后开始...`); setTimeout(() => { try { @@ -674,7 +674,7 @@ export default class SocketService { */ private sendHeartbeat(): void { if (this.connected && this.ws) { - console.log(`${new Date().toLocaleTimeString()} - 发送心跳消息`); + // console.log(`${new Date().toLocaleTimeString()} - 发送心跳消息`); this.ws.send('alive'); } } diff --git a/frontend/src/views/home/components/channelPairing.vue b/frontend/src/views/home/components/channelPairing.vue index 1078a11..c52ce2d 100644 --- a/frontend/src/views/home/components/channelPairing.vue +++ b/frontend/src/views/home/components/channelPairing.vue @@ -158,7 +158,6 @@ const handleConnectEnd = (params: any) => { } const handleConnect = (params: any) => { - console.log('连接信息:', params) const sourceNode = nodes.value.find(node => node.id === params.source) const targetNode = nodes.value.find(node => node.id === params.target) @@ -207,7 +206,6 @@ const devIds = ref() const standardDevIds = ref() const open = async () => { - console.log('开始打开通道配对') edges.value = [] devIds.value = prop.devIdList.map(d => d.id) standardDevIds.value = prop.pqStandardDevList.map(d => d.id) diff --git a/frontend/src/views/home/components/compareDataCheckSingleChannelSingleTestPopup.vue b/frontend/src/views/home/components/compareDataCheckSingleChannelSingleTestPopup.vue index cbf97d2..52fb4e8 100644 --- a/frontend/src/views/home/components/compareDataCheckSingleChannelSingleTestPopup.vue +++ b/frontend/src/views/home/components/compareDataCheckSingleChannelSingleTestPopup.vue @@ -485,7 +485,7 @@ const getResults = async (code: any) => { // 判断是否为录波数据请求 const isWaveDataRequest = code === 'wave_data' || isWaveData.value - console.log('isWaveDataRequest:', rowList.value.scriptType) + getContrastResult({ planId: checkStore.plan.id, scriptType: rowList.value.scriptType, diff --git a/frontend/src/views/home/components/compareTest.vue b/frontend/src/views/home/components/compareTest.vue index da263ae..d64761c 100644 --- a/frontend/src/views/home/components/compareTest.vue +++ b/frontend/src/views/home/components/compareTest.vue @@ -548,7 +548,7 @@ watch( // 设置闪变项目为LOADING状态 const flickerResultItem = checkResult.find(item => item.code === 'F') - console.log('flickerResultItem', flickerResultItem) + if (flickerResultItem) { flickerResultItem.devices.forEach(device => { device.chnResult.fill(CheckData.ChnCheckResultEnum.LOADING) @@ -563,8 +563,7 @@ watch( scriptName: item.scriptName, devices: [] } - console.log('item', item) - console.log('newValue.code', newValue.code) + // 特殊处理录波项目 - 如果是25005消息且当前项目是录波项目,则使用已设置的状态 if ((newValue.code == 25005 || newValue.code == 25006) && item.code === 'wave_data') { @@ -574,15 +573,15 @@ watch( } } // 特殊处理闪变项目 - 如果是25007消息且当前项目是闪变项目,则使用已设置的状态 else if (newValue.code == 25007 && item.code === 'F') { - console.log('flicker',checkResult) + const existingFlickerItem = checkResult.find(checkItem => checkItem.scriptName === '闪变') - console.log('existingFlickerItem', existingFlickerItem) + if (existingFlickerItem) { temp.devices = [...existingFlickerItem.devices] // 保留已设置的devices } } else { - console.log('else') + // 找到message中所有scriptName与当前item.code匹配的项 const matchedDevices = message .filter((msg: any) => msg.scriptName === item.code) @@ -756,7 +755,7 @@ const initScriptData = async () => { // 保存脚本数据并设置总数 scriptData.push(...temp) checkTotal = scriptData.length - console.log('shul',checkTotal) + } // 初始化设备列表 const initDeviceList = () => { diff --git a/frontend/src/views/home/components/compareTestPopup.vue b/frontend/src/views/home/components/compareTestPopup.vue index 0128a75..bc7e36c 100644 --- a/frontend/src/views/home/components/compareTestPopup.vue +++ b/frontend/src/views/home/components/compareTestPopup.vue @@ -374,7 +374,7 @@ const handleSubmitFast = async () => { }) preTestStatus.value = 'start' if (checkStore.selectTestItems.test) { - console.log(111111) + testRef.value.initializeParameters() testRef.value.showTestLog() @@ -413,12 +413,12 @@ const emit = defineEmits<{ }>() watch(preTestStatus, function (newValue, oldValue) { - console.log('预检测状态', newValue, oldValue) + ActiveStatue.value = newValue }) watch(TestStatus, function (newValue, oldValue) { - console.log('正式检测状态', newValue, oldValue) + ActiveStatue.value = newValue }) @@ -431,13 +431,11 @@ watch(stepsActiveIndex, function (newValue, oldValue) { testRef.value.startTimeCount() }, 500) } - console.log('步骤索引', newValue, oldValue) + }) watch(ActiveStatue, function (newValue, oldValue) { - console.log('当前步骤状态-----', newValue) - console.log('stepsActiveIndex-----', stepsActiveIndex.value) - console.log('stepsTotalNum----', stepsTotalNum.value) + if (newValue === 'error') { stepsActiveIndex.value = stepsTotalNum.value + 1 nextStepText.value = '检测失败' @@ -466,7 +464,7 @@ watch(ActiveStatue, function (newValue, oldValue) { }) const handleQuit = () => { - console.log('handleQuit', ActiveStatue.value) + if ( ActiveStatue.value !== 'success' && ActiveStatue.value !== 'waiting' && @@ -486,13 +484,13 @@ const handlePause = () => { testRef.value?.handlePause() } const sendPause = () => { - console.log('发起暂停请求') + TestStatus.value = 'paused_ing' pauseTest() } const sendResume = () => { - console.log('发起继续检测请求') + resumeTest({ userPageId: JwtUtil.getLoginName(), @@ -509,7 +507,7 @@ const sendResume = () => { } const sendReCheck = () => { - console.log('发送重新检测指令') + startPreTest({ userPageId: JwtUtil.getLoginName(), devIds: checkStore.devices.map(item => item.deviceId), @@ -524,7 +522,7 @@ const sendReCheck = () => { checkStore.selectTestItems.test ] }).then(res => { - console.log(res) + if (res.code === 'A001014') { ElMessageBox.alert('装置配置异常', '初始化失败', { confirmButtonText: '确定', @@ -558,17 +556,17 @@ const nextStep = () => { stepsActiveIndex.value++ for (let selectTestItemsKey in checkStore.selectTestItems) { if (tempStep == 0 && checkStore.selectTestItems[selectTestItemsKey]) { - console.log('selectTestItemsKey1') + stepsActiveView.value = idx stepsActive.value = idx return } if (checkStore.selectTestItems[selectTestItemsKey] && tempStep != 0) { - console.log('selectTestItemsKey2') + tempStep-- } - console.log('selectTestItemsKey3', idx) + idx++ } } diff --git a/frontend/src/views/home/components/dataCheckSingleChannelSingleTestPopup.vue b/frontend/src/views/home/components/dataCheckSingleChannelSingleTestPopup.vue index 2973e37..9a2a9ce 100644 --- a/frontend/src/views/home/components/dataCheckSingleChannelSingleTestPopup.vue +++ b/frontend/src/views/home/components/dataCheckSingleChannelSingleTestPopup.vue @@ -258,7 +258,7 @@ const handleNodeClick = async (data: any) => { currentDesc.value = data.sourceDesc scriptType = data.scriptType ?? scriptType - console.log('点击左侧树节点触发事件handleNodeClick', checkIndex.value) + if (checkIndex.value !== '') { await updateTableData() activeTab.value = 'resultTab' @@ -267,7 +267,7 @@ const handleNodeClick = async (data: any) => { } const handleErrorSysChange = async () => { - console.log('切换误差体系', formContent.errorSysId) + changeErrorSystem({ planId: checkStore.plan.id, scriptId: checkStore.plan.scriptId, @@ -303,7 +303,7 @@ watch( ) const handleChnNumChange = async () => { - console.log('通道号', formContent.chnNum) + // 发起请求,查询该测试项的检测结果 const { data: resTreeDataTemp }: { data: CheckData.TreeItem[] } = await getTreeData({ scriptId: checkStore.plan.scriptId, @@ -330,7 +330,7 @@ watch(currentCheckItem, (newVal, oldVal) => { if (newVal.length == 2) { key += '_' + newVal[1] } - console.log('当前检测项', key) + doCurrentCheckItemUpdate(key) } else { activeTab.value = 'resultTab' @@ -618,7 +618,7 @@ const setCheckResultData = (data: CheckData.ResCheckResult | null) => { }) } Object.assign(checkResultData, result) - console.log('检测结果', checkResultData) + } const exportRawDataHandler = () => { @@ -661,7 +661,7 @@ const setRawData = (data: CheckData.RawDataItem[]) => { }) rawTableData.length = 0 Object.assign(rawTableData, data) - console.log('原始数据', rawTableData) + } const dataToShow = (num: number): string => { if (num == null || num == undefined) { diff --git a/frontend/src/views/home/components/deviceConnectionPopup.vue b/frontend/src/views/home/components/deviceConnectionPopup.vue index 2d6cbd5..5307b53 100644 --- a/frontend/src/views/home/components/deviceConnectionPopup.vue +++ b/frontend/src/views/home/components/deviceConnectionPopup.vue @@ -155,7 +155,7 @@ const handleConnectEnd = (params: any) => { } const handleConnect = (params: any) => { - console.log('连接信息:', params) + const sourceNode = nodes.value.find(node => node.id === params.source) const targetNode = nodes.value.find(node => node.id === params.target) diff --git a/frontend/src/views/home/components/factorTest.vue b/frontend/src/views/home/components/factorTest.vue index fc9bf8d..bd13eac 100644 --- a/frontend/src/views/home/components/factorTest.vue +++ b/frontend/src/views/home/components/factorTest.vue @@ -233,8 +233,7 @@ watch(testStatus, function (newValue, oldValue) { * 3. 表格数据的实时更新 */ watch(webMsgSend, function (newValue, oldValue) { - console.log('webMsgSend---code', newValue.code) - console.log('webMsgSend---requestId', newValue.requestId) + // 只有在非等待状态下才处理WebSocket消息 if (testStatus.value !== 'waiting') { @@ -325,8 +324,7 @@ watch(webMsgSend, function (newValue, oldValue) { TableInit(); } else { // ==================== 特定业务消息处理 ==================== - console.log('显示东西code', newValue.code) - console.log('显示东西requestId', newValue.requestId) + switch (newValue.requestId) { // 处理源通讯校验相关消息 case 'yjc_ytxjy': @@ -443,7 +441,7 @@ watch(webMsgSend, function (newValue, oldValue) { break; // ★★★ 处理系数校准核心业务消息 ★★★ case 'Coefficient_Check': - console.log("Coefficient_Checkactive", active.value); + // ==================== 第1阶段:大电压/电流系数下装 ==================== switch (newValue.operateCode) { @@ -523,7 +521,7 @@ watch(webMsgSend, function (newValue, oldValue) { switch (newValue.operateCode) { case 'DATA_CHNFACTOR$02': // 接收并更新表格中的系数校准数据 - console.log('表格', name.value) + // 遍历所有设备,找到匹配的表格项并更新数据 for (let i = 0; i < name.value.length; i++) { @@ -594,17 +592,16 @@ watch(webMsgSend, function (newValue, oldValue) { firstCoefficientVO.aI = newValue.data.aI; firstCoefficientVO.bI = newValue.data.bI; firstCoefficientVO.cI = newValue.data.cI; - - console.log(newValue.data.devName + '对象:', firstCoefficientVO); + activeIndex.value++; // 更新活跃索引 } else { - console.log('未找到匹配的' + newValue.data.devName + '对象'); + //console.log('未找到匹配的' + newValue.data.devName + '对象'); } } else { - console.log(newValue.data.devName + '数组为空'); + //console.log(newValue.data.devName + '数组为空'); } } else { - console.log('未找到' + newValue.data.devName + '对应的数组'); + //console.log('未找到' + newValue.data.devName + '对应的数组'); } } break; @@ -655,7 +652,7 @@ watch(webMsgSend, function (newValue, oldValue) { * 通知父组件检测失败,重置相关状态 */ const TableInit = () => { - console.log("出错系数检测",active.value); + // 通知父组件系数校准失败 emit('update:testStatus', 'error') } @@ -667,7 +664,7 @@ const TableInit = () => { * @param desc 描述:'系数下装' | '系数校准' */ const tableLoading = (type: string, desc: string) => { - console.log('转动',channel.value) + // 遍历所有设备 for (let i = 0; i < channel.value.length; i++) { @@ -688,7 +685,7 @@ const tableLoading = (type: string, desc: string) => { } } } else { - console.log('不转了') + //console.log('不转了') } } } @@ -868,7 +865,7 @@ const handleSubmit = async () => { isButtonDisabled.value = true; // 禁用按钮,防止重复提交 tableLoading('big', '系数下装') // 开启大幅值系数下装的加载动画 active.value++; // 步骤进度+1,进入第一个校准阶段 - console.log('开始检测active.value', active.value) + }; /** diff --git a/frontend/src/views/home/components/preTest.vue b/frontend/src/views/home/components/preTest.vue index af0bf03..2f1cf9d 100644 --- a/frontend/src/views/home/components/preTest.vue +++ b/frontend/src/views/home/components/preTest.vue @@ -389,7 +389,7 @@ watch(webMsgSend, function (newValue, oldValue) { ts.value = 'success' } activeIndex.value = 5 - console.log("@@@@", ts.value) + break } break; diff --git a/frontend/src/views/home/components/resultPopup.vue b/frontend/src/views/home/components/resultPopup.vue index 4c2f351..9093ff5 100644 --- a/frontend/src/views/home/components/resultPopup.vue +++ b/frontend/src/views/home/components/resultPopup.vue @@ -86,7 +86,7 @@ const resultData = ref([ ]) const handleClick = (row: any) => { - console.log(111) + DataCheckDialogVisible.value = true } diff --git a/frontend/src/views/home/components/table.vue b/frontend/src/views/home/components/table.vue index f74d09a..7640214 100644 --- a/frontend/src/views/home/components/table.vue +++ b/frontend/src/views/home/components/table.vue @@ -468,14 +468,14 @@ const columns = reactive[]>([ { prop: 'recheckNum', label: '检测次数', - minWidth: 100, + minWidth: 110, sortable: true, isShow: modeStore.currentMode != '比对式' }, { prop: 'checkState', label: '检测状态', - minWidth: 100, + minWidth: 110, sortable: true, isShow: checkStateShow, render: scope => { @@ -485,7 +485,7 @@ const columns = reactive[]>([ { prop: 'checkResult', label: '检测结果', - minWidth: 100, + minWidth: 110, sortable: true, render: scope => { if (scope.row.checkResult === 0) { @@ -501,7 +501,7 @@ const columns = reactive[]>([ { prop: 'reportState', label: '报告状态', - minWidth: 100, + minWidth: 110, sortable: true, render: scope => { if (scope.row.reportState === 0) { @@ -519,7 +519,7 @@ const columns = reactive[]>([ { prop: 'factorCheckResult', label: '系数校准结果', - minWidth: 100, + minWidth: 140, sortable: true, isShow: factorCheckShow.value && appSceneStore.currentScene === '1', render: scope => { @@ -595,7 +595,7 @@ const handleRefresh = () => { // 表格排序 const sortTable = ({ newIndex, oldIndex }: { newIndex?: number; oldIndex?: number }) => { - console.log(newIndex, oldIndex) // 避免未使用参数警告 + ElMessage.success('修改列表排序成功') } diff --git a/frontend/src/views/home/components/temptest.vue b/frontend/src/views/home/components/temptest.vue index 5625213..5df6fe7 100644 --- a/frontend/src/views/home/components/temptest.vue +++ b/frontend/src/views/home/components/temptest.vue @@ -16,7 +16,7 @@ interface User { address: string } const handleClick = (row:any) => { - console.log(111) + }; const tableRowClassName = ({ row, diff --git a/frontend/src/views/home/components/test.vue b/frontend/src/views/home/components/test.vue index a333d41..c190e75 100644 --- a/frontend/src/views/home/components/test.vue +++ b/frontend/src/views/home/components/test.vue @@ -303,7 +303,7 @@ let count = 0 // 监听WebSocket消息变化,处理各种检测状态和错误 watch(webMsgSend, function(newValue, oldValue) { - console.log('webMsgSend', newValue) + // 只在非等待状态下处理消息 if (testStatus.value !== 'waiting') { // 步骤4:正式检测阶段的消息处理 @@ -637,7 +637,7 @@ watch(webMsgSend, function(newValue, oldValue) { break // 检测结束 case 'Quit': - console.log('检测结束') + break } } @@ -1113,7 +1113,7 @@ const pauseSuccessCallback = () => { log: `${new Date().toLocaleString()}:暂停检测`, }) stopTimeCount() - console.log('暂停中') + } @@ -1123,7 +1123,7 @@ const handleResumeTest = () => { startData.value = new Date() testLogList.push({ type: 'info', log: `${new Date().toLocaleString()}:开始重新检测!` }) resumeTimeCount() - console.log('开始继续检测') + } // ========== 测试项索引管理函数 ========== diff --git a/frontend/src/views/home/components/testPopup.vue b/frontend/src/views/home/components/testPopup.vue index fc65435..d4d8fc8 100644 --- a/frontend/src/views/home/components/testPopup.vue +++ b/frontend/src/views/home/components/testPopup.vue @@ -325,7 +325,7 @@ const handleSubmitFast = () => { return } - console.log('handleSubmit', stepsActive.value, TestStatus.value) + // 根据当前激活的步骤执行对应的检测逻辑 switch (stepsActive.value) { @@ -442,28 +442,28 @@ const emit = defineEmits<{ // ====================== 状态监听器 ====================== // 监听各个检测步骤的状态变化,并同步到总体状态 watch(preTestStatus, function (newValue, oldValue) { - console.log('预检测状态变化:', newValue, oldValue) + ActiveStatue.value = newValue // 同步到总体状态 }) watch(timeTestStatus, function (newValue, oldValue) { - console.log('守时检测状态变化:', newValue, oldValue) + ActiveStatue.value = newValue // 同步到总体状态 }) watch(channelsTestStatus, function (newValue, oldValue) { - console.log('系数校准状态变化:', newValue, oldValue) + ActiveStatue.value = newValue // 同步到总体状态 }) watch(TestStatus, function (newValue, oldValue) { - console.log('正式检测状态变化:', newValue, oldValue) + ActiveStatue.value = newValue // 同步到总体状态 }) // 监听总体状态变化,处理步骤切换和错误状态 watch(ActiveStatue, function (newValue, oldValue) { - console.log('总体状态变化:', newValue, oldValue) + // 处理错误状态 if (newValue === 'error') { @@ -474,21 +474,21 @@ watch(ActiveStatue, function (newValue, oldValue) { // 处理成功完成状态(已到达最后一个检测步骤) if (newValue === 'success' && stepsActiveIndex.value === stepsTotalNum.value - 1) { stepsActiveIndex.value += 2 // 跳到完成状态 - console.log('success') + nextStepText.value = '检测完成' } // 处理连接超时状态 if (newValue === 'connect_timeout') { stepsActiveIndex.value += 2 // 跳过当前步骤 - console.log('connect_timeout') + nextStepText.value = '连接超时' } // 处理暂停超时状态 if (newValue === 'pause_timeout') { stepsActiveIndex.value += 2 // 跳过当前步骤 - console.log('pause_timeout') + nextStepText.value = '暂停超时' } @@ -504,7 +504,7 @@ watch(ActiveStatue, function (newValue, oldValue) { * 处理退出检测 */ const handleQuit = () => { - console.log('handleQuit', ActiveStatue.value) + // 可以直接关闭的安全状态:未检测、检测完成、检测失败或异常情况 const safeExitStates = [ @@ -543,7 +543,7 @@ const handlePause = () => { * 发送暂停指令 */ const sendPause = () => { - console.log('发起暂停请求') + TestStatus.value = 'paused_ing' // 设置为暂停中状态 pauseTest() // 调用暂停API @@ -553,7 +553,7 @@ const sendPause = () => { * 发送继续检测指令 */ const sendResume = () => { - console.log('发起继续检测请求') + // 调用继续检测API resumeTest({ userPageId: JwtUtil.getLoginName(), diff --git a/frontend/src/views/home/components/timeTest.vue b/frontend/src/views/home/components/timeTest.vue index b827bb5..b135768 100644 --- a/frontend/src/views/home/components/timeTest.vue +++ b/frontend/src/views/home/components/timeTest.vue @@ -268,7 +268,7 @@ function addMillisecondsToDate(dateString: string, millisecondsToAdd: number): D watch(activeIndex, function (newValue, oldValue) { - console.log(activeIndex.value,111,stepsIndex.value,222) + if (activeIndex.value === 1) { startTime.value = formatDateTime(new Date()); diff --git a/frontend/src/views/home/tabs/model.vue b/frontend/src/views/home/tabs/model.vue index 588f996..25e1e4f 100644 --- a/frontend/src/views/home/tabs/model.vue +++ b/frontend/src/views/home/tabs/model.vue @@ -82,10 +82,10 @@ const handelOpen = async (item: any) => { return } const handleSelect = (key: string, keyPath: string[]) => { - console.log(key, keyPath) + } onMounted(() => { - console.log() + }) diff --git a/frontend/src/views/plan/singlePlanList/index.vue b/frontend/src/views/plan/singlePlanList/index.vue index 40c545e..54eb28f 100644 --- a/frontend/src/views/plan/singlePlanList/index.vue +++ b/frontend/src/views/plan/singlePlanList/index.vue @@ -391,7 +391,7 @@ const changeStatus = async (row: User.ResUserList) => { proTable.value?.getTableList() } onMounted(() => { - console.log(proTable.value?.tableData) + })