修改电测听界面的日志
This commit is contained in:
parent
8e9d65980d
commit
b6eee4f0a8
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-model="dialogVisible"
|
||||
title="点测听分析"
|
||||
title="电测听分析"
|
||||
:fullscreen="true"
|
||||
:close-on-click-modal="false"
|
||||
:close-on-press-escape="false"
|
||||
@ -178,35 +178,26 @@ const userInfo = ref<any>(null)
|
||||
|
||||
// 过滤后的诊断模板
|
||||
const filteredDiagnoses = computed(() => {
|
||||
console.log('过滤模板,当前模板数量:', diagnosisTemplates.value.length)
|
||||
console.log('搜索关键词:', searchKeyword.value)
|
||||
|
||||
if (!searchKeyword.value) {
|
||||
return diagnosisTemplates.value
|
||||
}
|
||||
const filtered = diagnosisTemplates.value.filter((template) =>
|
||||
template.content.toLowerCase().includes(searchKeyword.value.toLowerCase())
|
||||
)
|
||||
console.log('过滤后模板数量:', filtered.length)
|
||||
return filtered
|
||||
})
|
||||
|
||||
// 加载诊断模板
|
||||
const loadDiagnosisTemplates = async () => {
|
||||
try {
|
||||
console.log('开始加载诊断模板...')
|
||||
const templates = await TemplateApi.getTemplateList('era')
|
||||
console.log('获取到的模板数据:', templates)
|
||||
|
||||
if (templates && Array.isArray(templates)) {
|
||||
diagnosisTemplates.value = templates
|
||||
console.log('模板加载成功,数量:', templates.length)
|
||||
} else {
|
||||
diagnosisTemplates.value = []
|
||||
console.log('模板数据为空或格式不正确')
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('加载诊断模板失败:', error)
|
||||
ElMessage.error('加载诊断模板失败')
|
||||
diagnosisTemplates.value = []
|
||||
}
|
||||
@ -264,10 +255,6 @@ const loadAnalysisData = async () => {
|
||||
|
||||
// // 调用API获取arterialdata数据
|
||||
const response = await EradataApi.getEradataByRegidAndExamidAndWeartime(regid, examid, weartime)
|
||||
console.log('API响应数据:', response)
|
||||
console.log('response类型:', typeof response)
|
||||
console.log('response.data:', response?.data)
|
||||
console.log('response.data类型:', typeof response?.data)
|
||||
|
||||
if (response) {
|
||||
// 检查响应数据的结构
|
||||
@ -362,7 +349,6 @@ const handleSave = async () => {
|
||||
|
||||
// 更新电测听检测数据诊断
|
||||
await EradataApi.updateEradatawearstarttime(saveData)
|
||||
console.log('保存诊断数据:', saveData)
|
||||
ElMessage.success('诊断结论已保存')
|
||||
} catch (error) {
|
||||
console.error('保存诊断失败:', error)
|
||||
@ -405,7 +391,6 @@ const open = async (rowData?: any) => {
|
||||
try {
|
||||
userInfo.value = await getUserProfile()
|
||||
} catch (error) {
|
||||
console.error('获取用户信息失败:', error)
|
||||
ElMessage.error('获取用户信息失败')
|
||||
}
|
||||
}
|
||||
@ -426,9 +411,7 @@ const open = async (rowData?: any) => {
|
||||
onMounted(async () => {
|
||||
try {
|
||||
userInfo.value = await getUserProfile()
|
||||
} catch (error) {
|
||||
console.error('获取用户信息失败:', error)
|
||||
}
|
||||
} catch (error) {}
|
||||
})
|
||||
|
||||
// 暴露方法给父组件
|
||||
|
||||
Loading…
Reference in New Issue
Block a user