去除日志,表格宽度
This commit is contained in:
@@ -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连接已关闭')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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[]
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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(() => {
|
||||
|
||||
Reference in New Issue
Block a user