From 5cd9e9dfbfb1a5ee451e99fe4206293762e44544 Mon Sep 17 00:00:00 2001 From: "DESKTOP-932OMT8\\REN" Date: Thu, 5 Jun 2025 16:21:57 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91=20wps?= =?UTF-8?q?=E5=87=BA=E9=A2=98=E9=A1=B5=E9=9D=A2=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/paper/question/WpsPptxForm.vue | 8 ++- src/views/paper/question/WpsWordForm.vue | 73 +++++++++++++----------- src/views/wps/pptx/index.vue | 2 +- src/views/wps/word/WordForm.vue | 16 +++++- src/views/wps/word/index.vue | 5 ++ 5 files changed, 66 insertions(+), 38 deletions(-) diff --git a/src/views/paper/question/WpsPptxForm.vue b/src/views/paper/question/WpsPptxForm.vue index 6f4b6d5..8d7779a 100644 --- a/src/views/paper/question/WpsPptxForm.vue +++ b/src/views/paper/question/WpsPptxForm.vue @@ -439,9 +439,11 @@ const addPptxInfo = async () => { if (filePath == '' || filePath == null) { return } - const res = await PptxApi.getPptxInfo(filePath) - pptxPointsList.value = [] - pptxPointsList.value.push(...handleTree(res)) + if (pptxPointsList.value.length <= 0) { + const res = await PptxApi.getPptxInfo(filePath) + pptxPointsList.value = [] + pptxPointsList.value.push(...handleTree(res)) + } dialogFormVisiblePptxInfo.value = true } const queryParams = reactive({ diff --git a/src/views/paper/question/WpsWordForm.vue b/src/views/paper/question/WpsWordForm.vue index a0990b3..93e07e4 100644 --- a/src/views/paper/question/WpsWordForm.vue +++ b/src/views/paper/question/WpsWordForm.vue @@ -265,7 +265,7 @@ - + { - if (checked || indeterminate) { + // if (checked || indeterminate) { + // wordPoints.value.belongTo = data.belongTo + // wordPoints.value.parameter = data.isboo + // wordPoints.value.type = data.type + // wordPointsFun.value = { + // chineseName: '', + // function: '' + // } + // wordPointsFun.value.chineseName = data.toChinese + // wordPointsFun.value.function = data.nodeFunction + // wordPoints.value.function.push(cloneDeep(wordPointsFun.value)) + // console.log(wordPoints) + // } + if (data.titleType == '2') { + wordPoints.value.name = chineseName.value + data.toChinese + wordPoints.value.filePath = filePath.value + wordPoints.value.function = englishNames.value + data.nodeFunction + wordPoints.value.englishName = englishNames.value wordPoints.value.belongTo = data.belongTo - wordPoints.value.parameter = data.isboo + wordPoints.value.isboo = data.isboo wordPoints.value.type = data.type - wordPointsFun.value = { - chineseName: '', - function: '' - } - wordPointsFun.value.chineseName = data.name - wordPointsFun.value.function = data.nodeFunction - wordPoints.value.function.push(cloneDeep(wordPointsFun.value)) - console.log(wordPoints) + wordPointsInfosList.push(cloneDeep(wordPoints.value)) } console.log(data, checked, indeterminate) } @@ -448,21 +454,26 @@ const addWordInfo = async () => { } dialogFormVisibleWordInfo.value = true isLoading.value = true - const res = await WordApi.getWordInfo(filePath) - isLoading.value = false - wordPointsList.value = [] - wordPointsList.value.push(...handleTree(res)) + if (wordPointsList.value.length <= 0) { + const res = await WordApi.getWordInfo(filePath) + isLoading.value = false + wordPointsList.value = [] + wordPointsList.value.push(...handleTree(res)) + } } const queryParams = reactive({ nodeFunction: undefined }) - +const chineseName = ref('') +const nodeFunctions = ref('') +const englishNames = ref('') const handleNodelClick = async (row: any) => { + console.log(row) queryParams.nodeFunction = row.selectName - wordPoints.value.chineseName = row.name.split(':')[0] - wordPoints.value.englishName = row.englishName - wordPoints.value.filePath = row.filePath - wordPoints.value.id = row.id + chineseName.value = '【' + row.name + '】' + filePath.value = row.filePath + nodeFunctions.value = row.selectName + englishNames.value = row.englishName const res = await WordApi.getWordInfos(queryParams) wordPointsInfoList.value = [] wordPointsInfoList.value.push(...handleTree(res)) @@ -478,17 +489,15 @@ const handleDelete = (row) => { } const submitWordPoints = async () => { - wordPointsInfosList.push(wordPoints.value) const res = await WordApi.getWordListInfos(wordPointsInfosList) wordPoints.value = { - id: '', - chineseName: '', + name: '', englishName: '', filePath: '', type: '', belongTo: '', - parameter: '', - function: [] + isboo: '', + function: '' } wordPointsInfosList = [] for (let i = 0; i < res.length; i++) { diff --git a/src/views/wps/pptx/index.vue b/src/views/wps/pptx/index.vue index 81ce1a3..4bbaac2 100644 --- a/src/views/wps/pptx/index.vue +++ b/src/views/wps/pptx/index.vue @@ -76,7 +76,7 @@ - + diff --git a/src/views/wps/word/WordForm.vue b/src/views/wps/word/WordForm.vue index fc14d74..5379750 100644 --- a/src/views/wps/word/WordForm.vue +++ b/src/views/wps/word/WordForm.vue @@ -69,6 +69,16 @@ /> + + + + + + + +