Merge remote-tracking branch 'origin/master'

This commit is contained in:
caozehui
2025-10-15 09:59:26 +08:00
39 changed files with 137 additions and 150 deletions

View File

@@ -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<string[]>()
const standardDevIds = ref<string[]>()
const open = async () => {
console.log('开始打开通道配对')
edges.value = []
devIds.value = prop.devIdList.map(d => d.id)
standardDevIds.value = prop.pqStandardDevList.map(d => d.id)

View File

@@ -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,

View File

@@ -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 = () => {

View File

@@ -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++
}
}

View File

@@ -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) {

View File

@@ -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)

View File

@@ -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)
};
/**

View File

@@ -389,7 +389,7 @@ watch(webMsgSend, function (newValue, oldValue) {
ts.value = 'success'
}
activeIndex.value = 5
console.log("@@@@", ts.value)
break
}
break;

View File

@@ -86,7 +86,7 @@ const resultData = ref([
])
const handleClick = (row: any) => {
console.log(111)
DataCheckDialogVisible.value = true
}

View File

@@ -468,14 +468,14 @@ const columns = reactive<ColumnProps<Device.ResPqDev>[]>([
{
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<ColumnProps<Device.ResPqDev>[]>([
{
prop: 'checkResult',
label: '检测结果',
minWidth: 100,
minWidth: 110,
sortable: true,
render: scope => {
if (scope.row.checkResult === 0) {
@@ -501,7 +501,7 @@ const columns = reactive<ColumnProps<Device.ResPqDev>[]>([
{
prop: 'reportState',
label: '报告状态',
minWidth: 100,
minWidth: 110,
sortable: true,
render: scope => {
if (scope.row.reportState === 0) {
@@ -519,7 +519,7 @@ const columns = reactive<ColumnProps<Device.ResPqDev>[]>([
{
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('修改列表排序成功')
}

View File

@@ -16,7 +16,7 @@ interface User {
address: string
}
const handleClick = (row:any) => {
console.log(111)
};
const tableRowClassName = ({
row,

View File

@@ -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('开始继续检测')
}
// ========== 测试项索引管理函数 ==========

View File

@@ -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(),

View File

@@ -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());