去除日志,表格宽度

This commit is contained in:
sjl
2025-10-15 08:49:11 +08:00
parent b0ca84c8fd
commit 35f21b7140
38 changed files with 135 additions and 148 deletions

View File

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

View File

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

View File

@@ -210,7 +210,7 @@ const closeEventSource = () => {
if (eventSource.value) {
eventSource.value.close()
eventSource.value = null
console.log('SSE连接已关闭')
// console.log('SSE连接已关闭')
}
}
// 监听 dialogVisible 的变化,确保在对话框关闭时清理资源

View File

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

View File

@@ -246,13 +246,13 @@ export default class SocketService {
public connect(): Promise<void> | 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<T = any>(messageType: string, callback: CallbackFunction<T>): 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');
}
}

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

View File

@@ -82,10 +82,10 @@ const handelOpen = async (item: any) => {
return
}
const handleSelect = (key: string, keyPath: string[]) => {
console.log(key, keyPath)
}
onMounted(() => {
console.log()
})
</script>
<style lang="scss" scoped>

View File

@@ -299,7 +299,7 @@ watch(
if (props.formControl.scriptId != '') {
nextTick(async () => {
await getTree()
console.log('props.formControl.scriptId')
treeRef.value.checkTree()
})
}

View File

@@ -129,11 +129,9 @@ function findFirstLeafNode(node: any): any {
}
const checkTree = () => {
console.log('checkTree11')
console.log('checkTree22',props.treeData.length)
console.log('checkTree33',treeRef.value)
if (props.treeData.length > 0 && treeRef.value) {
console.log('checkTree44')
const firstNode = props.treeData[0];
const firstLeafNode = findFirstLeafNode(firstNode);
const firstLeafNodeId = firstLeafNode.id;
@@ -143,7 +141,7 @@ const checkTree = () => {
// 确保在组件挂载后也执行一次
onMounted(() => {
console.log('onMounted',props.treeData);
nextTick(() => {
checkTree()
});

View File

@@ -184,7 +184,7 @@ onMounted(async () => {
})
watch(webMsgSend, function (newValue, oldValue) {
console.log('webMsgSend:', newValue)
if (newValue.requestId.includes('formal_real&&') && newValue.operateCode === 'OPER_GATHER') {
if (newValue.code === 10200) {
ElMessage.success('启动成功!')
@@ -195,7 +195,7 @@ watch(webMsgSend, function (newValue, oldValue) {
ElMessage.error('启动失败!')
startDisabeld.value = false
pauseDisabled.value = true
console.log('错误信息:',webMsgSend)
}
}
if (newValue.requestId.includes('close_source') && newValue.operateCode === 'CLOSE_GATHER') {
@@ -211,7 +211,7 @@ watch(webMsgSend, function (newValue, oldValue) {
ElMessage.error('停止失败!')
startDisabeld.value = true
pauseDisabled.value = false
console.log('错误信息:',webMsgSend)
}
}
switch (newValue.requestId) {

View File

@@ -138,7 +138,7 @@ const columns = reactive<ColumnProps<Monitor.ResPqMon>[]>([
const emit = defineEmits(['get-parameter'])
const getParameter = (data: Monitor.ResPqMon) => {
console.log('data', data)
if (title_Type.value === 'edit') {
// 编辑:替换已有的数据
const index = tableData.value.findIndex(item => item.id === data.id)

View File

@@ -85,7 +85,7 @@ const handleInputRetainTime = value => {
props.childForm[0].dipData.retainTime = 300
emit('setRetainTime', 300 )
}else{
console.log(props);
emit('setRetainTime', value )
}

View File

@@ -37,7 +37,7 @@ const defaultProps = {
const activeName = ref('')
const childActiveName = ref('')
const handleNodeClick = (data, node) => {
console.log('handleNodeClick', data, node)
let code = ['Base', 'VOL', 'Freq', 'Harm', 'Base_0_10', 'Base_20_85', 'Base_110_200']
const parents = getParentNodes(node, [])
parents.pop()

View File

@@ -53,7 +53,7 @@
const proTable = ref<ProTableInstance>()
const getTableList = (params: any) => {
console.log("getTableList",params)
let newParams = JSON.parse(JSON.stringify(params))
const patternId = dictStore.getDictData('Pattern').find(item=>item.name=== modeStore.currentMode)?.id//获取数据字典中对应的id
newParams.pattern = patternId

View File

@@ -128,7 +128,7 @@ const router = useRouter()
const value1 = ref('')
const value2 = ref('')
const tableHeight = ref(0)
console.log(window.innerHeight, '+++++++++')
tableHeight.value = window.innerHeight - 630
//下拉框数据
@@ -443,8 +443,7 @@ const handleRefresh = () => {
}
// 表格拖拽排序
const sortTable = ({ newIndex, oldIndex }: { newIndex?: number; oldIndex?: number }) => {
console.log(newIndex, oldIndex)
console.log(proTable.value?.tableData)
ElMessage.success('修改列表排序成功')
}
@@ -493,7 +492,7 @@ const handleTest = () => {
}
}
onMounted(() => {
console.log(proTable.value?.tableData)
})
defineExpose({ changeActiveTabs })
</script>

View File

@@ -94,7 +94,7 @@ const changeSelect=()=>{
//console.log(treeRef.value.getCheckedKeys());
}
const handleNodeClick = (data) => {
console.log(data);
};
const filterNode = (value: string, data) => {
if (!value) return true;
@@ -105,7 +105,7 @@ const detail = (e: any) => {
emit("jump", e);
};
onMounted(() => {
console.log();
});
defineExpose({ getTreeData,getCurrentIndex });
</script>

View File

@@ -289,7 +289,7 @@ const preTestData = [
// 弹出数据查询页面
const handleClick = (item, index, vvs) => {
//const data = "检测脚本为:"+item.name+";被检设备为:"+item.children.value.devID+";被检通道序号为:"+ item.children.monitorIndex;
console.log(vvs, index, item.name, item.children)
PopupVisible.value = true
showDataPopup.value.open()
}
@@ -379,7 +379,7 @@ const customColors = [
]
//加载进度条
const refreshProgress = () => {
console.log(currentIndex, totalNum, percentage.value)
if (percentage.value < 100) {
percentage.value = Math.trunc((currentIndex / totalNum) * 100)
} else {
@@ -397,7 +397,7 @@ const refreshProgress = () => {
status: 0
})
console.log('检测结束')
if (testModel.value === 'preTest') ElMessage.success('预检测过程全部结束')
else if (testModel.value === 'Test')
//ElMessage.success("正式检测全部结束,你可以停留在此页面查看检测结果,或返回首页进行复检、报告生成和归档等操作")
@@ -507,7 +507,7 @@ const handleFinishTest = () => {
// 表格拖拽排序
const sortTable = ({ newIndex, oldIndex }: { newIndex?: number; oldIndex?: number }) => {
console.log(newIndex, oldIndex)
ElMessage.success('修改列表排序成功')
}

View File

@@ -465,7 +465,7 @@ const addTab = (type: string) => {
subPlanFormContent.value = planFormContent.value?.children?.find(
(child: Plan.ReqPlan) => child.id === planId.value
)
console.log('0000---', subPlanFormContent.value)
planPopup.value?.open('edit', subPlanFormContent.value, modeStore.currentMode, 2)
}
}
@@ -531,7 +531,7 @@ const removeTab = async (targetName: TabPaneName) => {
}
// 弹窗打开方法
const open = async (textTitle: string, data: Plan.ReqPlan, pattern: string) => {
console.log('open', data)
dialogVisible.value = true
title.value = textTitle
planTitle.value = data.name
@@ -579,13 +579,13 @@ const handleTabClick = (tab: any) => {
const handleTableDataUpdate = async (newData: any[]) => {
// 👇 处理新数据,例如更新 planFormContent
console.log('handleTableDataUpdate', newData)
const matchedItem = findItemById(newData, planId.value)
if (matchedItem) {
planFormContent.value = matchedItem
console.log('递归匹配成功:', planFormContent.value)
//console.log('递归匹配成功:', planFormContent.value)
} else {
console.warn('未找到匹配的 planId:', planId.value)
// console.warn('未找到匹配的 planId:', planId.value)
}
}
@@ -616,7 +616,7 @@ const handleRemove = async (row: any) => {
ElMessage.warning(`当前设备已被子计划绑定,无法删除!`)
return
}
console.log('shcn', planFormContent.value)
proTable.value?.getTableList() // 刷新当前表格
})
.catch(() => {
@@ -739,7 +739,7 @@ const initSSE = () => {
eventSource.value = http.sse('/sse/createSse')
eventSource.value.onmessage = event => {
console.log('收到消息内容是:', event.data)
const res = JSON.parse(event.data)
progressData.value.percentage = res.data
progressData.value.message = res.message
@@ -763,7 +763,7 @@ const closeEventSource = () => {
if (eventSource.value) {
eventSource.value.close()
eventSource.value = null
console.log('SSE连接已关闭')
//console.log('SSE连接已关闭')
}
}

View File

@@ -439,7 +439,7 @@ const convertToTree = (data: Device[], groupBy?: string | undefined) => {
}
const filterNode: FilterNodeMethodFunction = (value: string, data: Tree) => {
if (!value) return true
console.log('data', data)
if (data.id.toString().includes('_')) {
return false
}

View File

@@ -97,7 +97,7 @@ const filterMethod = (query: string, item: { label?: string }) => {
const open = async (data: Plan.ReqPlan) => {
dialogVisible.value = true
planData.value = data
console.log('planData.value', planData.value)
const standardDevList_Result1 = await getUnboundStandardDevList(data)
unboundStandardDevList.value = standardDevList_Result1.data as StandardDevice.ResPqStandardDevice[]

View File

@@ -678,7 +678,7 @@ const save = () => {
formContent.memberIds = formContent.memberIds ? [formContent.memberIds?.toString()] : []
await updatePlan(formContent)
emit('update:tab')
console.log('更新子计划', formContent)
} else {
formContent.sourceIds = null
await updatePlan(formContent)

View File

@@ -207,13 +207,13 @@ onMounted(async () => {
//假分页后用data刷新
const refreshTable = async () => {
try {
console.log('表格刷新')
patternId.value = dictStore.getDictData('Pattern').find(item => item.name === modeStore.currentMode)?.id
const result = await getPlanList({ patternId: patternId.value })
tableData.value = buildTree(result.data as any[])
pageTotal.value = tableData.value.length
updateCurrentPageData(tableData.value)
console.log('表格刷新成功')
} catch (error) {
tableData.value = []
ElMessage.error('获取计划列表失败')
@@ -225,7 +225,7 @@ watch(
() => tableData.value,
newVal => {
if (childrenPlanView.value && newVal) {
console.log('监听 tableData 变化', newVal)
childrenPlanView.value.handleTableDataUpdate?.(newVal)
updateCurrentPageData(newVal)
}
@@ -309,7 +309,7 @@ const updateCurrentPageData = (data = tableData.value) => {
const start = (currentPage.value - 1) * pageSize.value
const end = start + pageSize.value
currentPageData.value = data.slice(start, end)
console.log('currentPageData', currentPageData.value)
}
const dataSourceType = computed(() => {

View File

@@ -57,7 +57,7 @@ const open = (list: any) => {
};
onMounted(() => {
console.log();
});
defineExpose({ open });
</script>

View File

@@ -201,10 +201,10 @@ const submitForm = async (formEl: FormInstance | undefined) => {
if (!formEl) return
await formEl.validate((valid, fields) => {
if (valid) {
console.log('submit!')
//console.log('submit!')
close()
} else {
console.log('error submit!', fields)
//console.log('error submit!', fields)
}
})
}
@@ -220,7 +220,7 @@ const options = Array.from({ length: 10000 }).map((_, idx) => ({
label: `${idx + 1}`,
}))
onMounted(() => {
console.log();
});
const dialogVisible = ref<boolean>(false);
const dialogTitle = ref<string>("");
@@ -231,9 +231,7 @@ const open = (title: string) => {
const close=()=>{
dialogVisible.value = false;
}
onMounted(() => {
console.log();
});
defineExpose({ open });
</script>
<style lang="scss" scoped></style>

View File

@@ -391,7 +391,7 @@ const changeStatus = async (row: User.ResUserList) => {
proTable.value?.getTableList()
}
onMounted(() => {
console.log(proTable.value?.tableData)
})
</script>
<style lang="scss" scoped>