【修改】 wps出题页面优化
This commit is contained in:

committed by
陆光LG

parent
c0179d9bba
commit
5cd9e9dfbf
@@ -439,9 +439,11 @@ const addPptxInfo = async () => {
|
|||||||
if (filePath == '' || filePath == null) {
|
if (filePath == '' || filePath == null) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const res = await PptxApi.getPptxInfo(filePath)
|
if (pptxPointsList.value.length <= 0) {
|
||||||
pptxPointsList.value = []
|
const res = await PptxApi.getPptxInfo(filePath)
|
||||||
pptxPointsList.value.push(...handleTree(res))
|
pptxPointsList.value = []
|
||||||
|
pptxPointsList.value.push(...handleTree(res))
|
||||||
|
}
|
||||||
dialogFormVisiblePptxInfo.value = true
|
dialogFormVisiblePptxInfo.value = true
|
||||||
}
|
}
|
||||||
const queryParams = reactive({
|
const queryParams = reactive({
|
||||||
|
@@ -265,7 +265,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- 表单弹窗:添加/修改 -->
|
<!-- 表单弹窗:添加/修改 -->
|
||||||
<FileForm ref="FileRef" @success="handleUploadSuccess" />
|
<FileForm ref="FileRef" @success="handleUploadSuccess" />
|
||||||
<el-dialog v-model="dialogFormVisibleWordInfo" title="考点设置(*暂不支持多选)" width="400px">
|
<el-dialog v-model="dialogFormVisibleWordInfo" title="考点设置" width="400px">
|
||||||
<el-skeleton :rows="5" animated v-if="wordPointsList.length < 0 && isLoading" />
|
<el-skeleton :rows="5" animated v-if="wordPointsList.length < 0 && isLoading" />
|
||||||
<el-tree
|
<el-tree
|
||||||
style="max-width: 600px"
|
style="max-width: 600px"
|
||||||
@@ -362,17 +362,13 @@ const wordPointsFun = ref({
|
|||||||
function: ''
|
function: ''
|
||||||
})
|
})
|
||||||
const wordPoints = ref({
|
const wordPoints = ref({
|
||||||
id: '',
|
name: '',
|
||||||
chineseName: '',
|
|
||||||
englishName: '',
|
englishName: '',
|
||||||
filePath: '',
|
filePath: '',
|
||||||
type: '',
|
type: '',
|
||||||
belongTo: '',
|
belongTo: '',
|
||||||
parameter: '',
|
isboo: '',
|
||||||
function: [] as {
|
function: ''
|
||||||
chineseName: string
|
|
||||||
function: string
|
|
||||||
}[]
|
|
||||||
})
|
})
|
||||||
let wordPointsInfosList: (typeof wordPoints)[] = []
|
let wordPointsInfosList: (typeof wordPoints)[] = []
|
||||||
|
|
||||||
@@ -419,18 +415,28 @@ const wordData = reactive({
|
|||||||
})
|
})
|
||||||
|
|
||||||
const handleCheckChange = (data: Tree, checked: boolean, indeterminate: boolean) => {
|
const handleCheckChange = (data: Tree, checked: boolean, indeterminate: boolean) => {
|
||||||
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.belongTo = data.belongTo
|
||||||
wordPoints.value.parameter = data.isboo
|
wordPoints.value.isboo = data.isboo
|
||||||
wordPoints.value.type = data.type
|
wordPoints.value.type = data.type
|
||||||
wordPointsFun.value = {
|
wordPointsInfosList.push(cloneDeep(wordPoints.value))
|
||||||
chineseName: '',
|
|
||||||
function: ''
|
|
||||||
}
|
|
||||||
wordPointsFun.value.chineseName = data.name
|
|
||||||
wordPointsFun.value.function = data.nodeFunction
|
|
||||||
wordPoints.value.function.push(cloneDeep(wordPointsFun.value))
|
|
||||||
console.log(wordPoints)
|
|
||||||
}
|
}
|
||||||
console.log(data, checked, indeterminate)
|
console.log(data, checked, indeterminate)
|
||||||
}
|
}
|
||||||
@@ -448,21 +454,26 @@ const addWordInfo = async () => {
|
|||||||
}
|
}
|
||||||
dialogFormVisibleWordInfo.value = true
|
dialogFormVisibleWordInfo.value = true
|
||||||
isLoading.value = true
|
isLoading.value = true
|
||||||
const res = await WordApi.getWordInfo(filePath)
|
if (wordPointsList.value.length <= 0) {
|
||||||
isLoading.value = false
|
const res = await WordApi.getWordInfo(filePath)
|
||||||
wordPointsList.value = []
|
isLoading.value = false
|
||||||
wordPointsList.value.push(...handleTree(res))
|
wordPointsList.value = []
|
||||||
|
wordPointsList.value.push(...handleTree(res))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
const queryParams = reactive({
|
const queryParams = reactive({
|
||||||
nodeFunction: undefined
|
nodeFunction: undefined
|
||||||
})
|
})
|
||||||
|
const chineseName = ref('')
|
||||||
|
const nodeFunctions = ref('')
|
||||||
|
const englishNames = ref('')
|
||||||
const handleNodelClick = async (row: any) => {
|
const handleNodelClick = async (row: any) => {
|
||||||
|
console.log(row)
|
||||||
queryParams.nodeFunction = row.selectName
|
queryParams.nodeFunction = row.selectName
|
||||||
wordPoints.value.chineseName = row.name.split(':')[0]
|
chineseName.value = '【' + row.name + '】'
|
||||||
wordPoints.value.englishName = row.englishName
|
filePath.value = row.filePath
|
||||||
wordPoints.value.filePath = row.filePath
|
nodeFunctions.value = row.selectName
|
||||||
wordPoints.value.id = row.id
|
englishNames.value = row.englishName
|
||||||
const res = await WordApi.getWordInfos(queryParams)
|
const res = await WordApi.getWordInfos(queryParams)
|
||||||
wordPointsInfoList.value = []
|
wordPointsInfoList.value = []
|
||||||
wordPointsInfoList.value.push(...handleTree(res))
|
wordPointsInfoList.value.push(...handleTree(res))
|
||||||
@@ -478,17 +489,15 @@ const handleDelete = (row) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const submitWordPoints = async () => {
|
const submitWordPoints = async () => {
|
||||||
wordPointsInfosList.push(wordPoints.value)
|
|
||||||
const res = await WordApi.getWordListInfos(wordPointsInfosList)
|
const res = await WordApi.getWordListInfos(wordPointsInfosList)
|
||||||
wordPoints.value = {
|
wordPoints.value = {
|
||||||
id: '',
|
name: '',
|
||||||
chineseName: '',
|
|
||||||
englishName: '',
|
englishName: '',
|
||||||
filePath: '',
|
filePath: '',
|
||||||
type: '',
|
type: '',
|
||||||
belongTo: '',
|
belongTo: '',
|
||||||
parameter: '',
|
isboo: '',
|
||||||
function: []
|
function: ''
|
||||||
}
|
}
|
||||||
wordPointsInfosList = []
|
wordPointsInfosList = []
|
||||||
for (let i = 0; i < res.length; i++) {
|
for (let i = 0; i < res.length; i++) {
|
||||||
|
@@ -76,7 +76,7 @@
|
|||||||
<dict-tag :type="DICT_TYPE.PPTX_ISBOO" :value="scope.row.isboo" />
|
<dict-tag :type="DICT_TYPE.PPTX_ISBOO" :value="scope.row.isboo" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="titleType" label="级别" width="100">
|
<el-table-column prop="titleType" label="级别" width="100">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<dict-tag :type="DICT_TYPE.PPTX_TITLE_TYPE" :value="scope.row.titleType" />
|
<dict-tag :type="DICT_TYPE.PPTX_TITLE_TYPE" :value="scope.row.titleType" />
|
||||||
</template>
|
</template>
|
||||||
|
@@ -69,6 +69,16 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="级别" prop="titleType">
|
||||||
|
<el-select v-model="formData.titleType" clearable placeholder="请选择级别">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in getIntDictOptions(DICT_TYPE.PPTX_TITLE_TYPE)"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
@@ -103,7 +113,8 @@ const formData = ref({
|
|||||||
status: CommonStatusEnum.ENABLE,
|
status: CommonStatusEnum.ENABLE,
|
||||||
type: CommonStatusEnum.ENABLE,
|
type: CommonStatusEnum.ENABLE,
|
||||||
belongTo: CommonStatusEnum.ENABLE,
|
belongTo: CommonStatusEnum.ENABLE,
|
||||||
isboo: CommonStatusEnum.ENABLE
|
isboo: CommonStatusEnum.ENABLE,
|
||||||
|
titleType: CommonStatusEnum.ENABLE
|
||||||
})
|
})
|
||||||
const formRules = reactive<FormRules>({
|
const formRules = reactive<FormRules>({
|
||||||
parentId: [{ required: true, message: '上级Word节点不能为空', trigger: 'blur' }],
|
parentId: [{ required: true, message: '上级Word节点不能为空', trigger: 'blur' }],
|
||||||
@@ -173,7 +184,8 @@ const resetForm = () => {
|
|||||||
status: CommonStatusEnum.ENABLE,
|
status: CommonStatusEnum.ENABLE,
|
||||||
type: CommonStatusEnum.ENABLE,
|
type: CommonStatusEnum.ENABLE,
|
||||||
belongTo: CommonStatusEnum.ENABLE,
|
belongTo: CommonStatusEnum.ENABLE,
|
||||||
isboo: CommonStatusEnum.ENABLE
|
isboo: CommonStatusEnum.ENABLE,
|
||||||
|
titleType: CommonStatusEnum.ENABLE
|
||||||
}
|
}
|
||||||
formRef.value?.resetFields()
|
formRef.value?.resetFields()
|
||||||
}
|
}
|
||||||
|
@@ -76,6 +76,11 @@
|
|||||||
<dict-tag :type="DICT_TYPE.WORD_ISBOO" :value="scope.row.isboo" />
|
<dict-tag :type="DICT_TYPE.WORD_ISBOO" :value="scope.row.isboo" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column prop="titleType" label="级别" width="100">
|
||||||
|
<template #default="scope">
|
||||||
|
<dict-tag :type="DICT_TYPE.PPTX_TITLE_TYPE" :value="scope.row.titleType" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column prop="status" label="状态" width="100">
|
<el-table-column prop="status" label="状态" width="100">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<dict-tag :type="DICT_TYPE.COMMON_STATUS" :value="scope.row.status" />
|
<dict-tag :type="DICT_TYPE.COMMON_STATUS" :value="scope.row.status" />
|
||||||
|
Reference in New Issue
Block a user