diff --git a/src/views/paper/question/EmailForm.vue b/src/views/paper/question/EmailForm.vue index 0d5532a..94bb9a3 100644 --- a/src/views/paper/question/EmailForm.vue +++ b/src/views/paper/question/EmailForm.vue @@ -126,7 +126,7 @@ @@ -394,70 +394,11 @@ const documentList = ref([ } ]) const dialogFormVisibleWordInfo = ref(false) -const dialogFormVisibleWordInfos = ref(false) -const nodeFunction = ref('') -const titles = ref('') -const englishName = ref('') -const filePath = ref('') -const upFilePath = ref('') -const functionList = ref([]) -const wordData = reactive({ - chineseName: '', - englishName: '', - filePath: '', - function: [] as string[] -}) -const handleCheckChange = (data: Tree, checked: boolean, indeterminate: boolean) => { - // 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.isboo = data.isboo - wordPoints.value.type = data.type - wordPoints.value.unit = data.unit - wordPoints.value.isExam = '0' - wordPointsInfosList.push(cloneDeep(wordPoints.value)) - } - console.log(data, checked, indeterminate) -} - -const addWordInfo = async () => { +const addEmailInfo = async () => { dialogFormVisibleWordInfo.value = true } -const queryParams = reactive({ - nodeFunction: undefined -}) -const chineseName = ref('') -const nodeFunctions = ref('') -const englishNames = ref('') -const handleNodelClick = async (row: any) => { - queryParams.nodeFunction = row.selectName - 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)) - dialogFormVisibleWordInfos.value = true -} const handleDelete = (row) => { console.log(row) for (let i = 0; i < list.value.length; i++) { @@ -466,40 +407,6 @@ const handleDelete = (row) => { } } } - -const submitWordPoints = async () => { - const res = await WordApi.getWordListInfos(wordPointsInfosList) - wordPoints.value = { - name: '', - englishName: '', - filePath: '', - type: '', - belongTo: '', - isboo: '', - function: '', - unit: '', - isExam: '' - } - let index = 0 - wordPointsInfosList = [] - for (let i = 0; i < res.length; i++) { - var indexFlag = false - for (let x = 0; x < list.value.length; x++) { - if (res[i].content == list.value[x].content) { - // 如果存在相同的数据话 不进入 - indexFlag = true - } - } - if (!indexFlag) { - index += 1 - res[i].sort = index - list.value.push(res[i]) - } - } - dialogFormVisibleWordInfo.value = false - dialogFormVisibleWordInfos.value = false - wordPointsList.value = [] -} const formRules = reactive({ status: [{ required: true, message: '启用状态必填', trigger: 'blur' }] })