【修改】ppt,word出题知识点、审核字段
This commit is contained in:
@@ -17,8 +17,8 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="知识点" prop="pointNames">
|
<el-form-item label="章节名称" prop="chapteridDictText">
|
||||||
<el-input v-model="formData.pointNames" placeholder="请输入知识点" disabled />
|
<el-input v-model="formData.chapteridDictTextVo" placeholder="请输入章节名称" disabled />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@@ -30,9 +30,13 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="题型难度" prop="quLevel">
|
<el-form-item label="题型难度" prop="quLevel">
|
||||||
<el-select v-model="formData.quLevel" placeholder="请选择题型难度">
|
<el-select
|
||||||
|
v-model="formData.quLevel"
|
||||||
|
placeholder="请选择题型难度"
|
||||||
|
clearable
|
||||||
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in getStrDictOptions(DICT_TYPE.EXAM_QUE_DIFF)"
|
v-for="dict in getIntDictOptions(DICT_TYPE.EXAM_QUE_DIFF)"
|
||||||
:key="dict.value"
|
:key="dict.value"
|
||||||
:label="dict.label"
|
:label="dict.label"
|
||||||
:value="dict.value"
|
:value="dict.value"
|
||||||
@@ -48,14 +52,27 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="章节名称" prop="chapteridDictText">
|
<el-form-item label="知识点" prop="pointNames">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="formData.chapteridDictText"
|
v-model="formData.pointNamesVo"
|
||||||
placeholder="请输入章节名称"
|
placeholder="请选择知识点"
|
||||||
disabled
|
readonly
|
||||||
|
@click="openPoints()"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
|
<el-dialog v-model="dialogVisiblePoints" title="选择知识点" width="30%">
|
||||||
|
<el-tree
|
||||||
|
ref="treeRef"
|
||||||
|
:data="deptList"
|
||||||
|
node-key="id"
|
||||||
|
:props="{ label: 'name', children: 'children' }"
|
||||||
|
highlight-current
|
||||||
|
default-expand-all
|
||||||
|
@node-click="handleNodeClick"
|
||||||
|
/>
|
||||||
|
</el-dialog>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
@@ -66,7 +83,7 @@
|
|||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<!-- <el-col :span="12">
|
||||||
<el-form-item label="审核状态" prop="audit">
|
<el-form-item label="审核状态" prop="audit">
|
||||||
<el-select v-model="formData.audit" placeholder="请选择审核状态">
|
<el-select v-model="formData.audit" placeholder="请选择审核状态">
|
||||||
<el-option
|
<el-option
|
||||||
@@ -77,7 +94,7 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div class="edit-bottom">
|
<div class="edit-bottom">
|
||||||
@@ -293,7 +310,7 @@ import * as PptxApi from '@/api/wps/pptx'
|
|||||||
import FileForm from './components/FileForm.vue'
|
import FileForm from './components/FileForm.vue'
|
||||||
import { defaultProps, handleTree } from '@/utils/tree'
|
import { defaultProps, handleTree } from '@/utils/tree'
|
||||||
import { cloneDeep } from 'lodash-es'
|
import { cloneDeep } from 'lodash-es'
|
||||||
|
import * as SpecialtyApi from '@/api/points'
|
||||||
defineOptions({ name: 'WpsPptxFrom' })
|
defineOptions({ name: 'WpsPptxFrom' })
|
||||||
const pptxPointsList = ref<Tree[]>([]) // 树形结构
|
const pptxPointsList = ref<Tree[]>([]) // 树形结构
|
||||||
const pptxPointsInfoList = ref<Tree[]>([]) // 树形结构
|
const pptxPointsInfoList = ref<Tree[]>([]) // 树形结构
|
||||||
@@ -307,6 +324,8 @@ const dialogTitle = ref('') // 弹窗的标题
|
|||||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||||
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
||||||
const formData = ref({
|
const formData = ref({
|
||||||
|
pointNamesVo:'',
|
||||||
|
chapteridDictTextVo:'',
|
||||||
content: '',
|
content: '',
|
||||||
specialtyName: '',
|
specialtyName: '',
|
||||||
courseName: '',
|
courseName: '',
|
||||||
@@ -314,9 +333,8 @@ const formData = ref({
|
|||||||
required: '',
|
required: '',
|
||||||
chapteridDictText: '',
|
chapteridDictText: '',
|
||||||
analysis: '',
|
analysis: '',
|
||||||
quLevel: '',
|
quLevel: 0,
|
||||||
pointNames: '',
|
pointNames: '',
|
||||||
audit: '',
|
|
||||||
subjectName: '',
|
subjectName: '',
|
||||||
status: ' ',
|
status: ' ',
|
||||||
resourceValue: '',
|
resourceValue: '',
|
||||||
@@ -633,9 +651,8 @@ const resetForm = () => {
|
|||||||
required: '',
|
required: '',
|
||||||
chapteridDictText: '',
|
chapteridDictText: '',
|
||||||
analysis: '',
|
analysis: '',
|
||||||
quLevel: '',
|
quLevel: 0,
|
||||||
pointNames: '',
|
pointNames: '',
|
||||||
audit: '',
|
|
||||||
subjectName: '',
|
subjectName: '',
|
||||||
status: '0',
|
status: '0',
|
||||||
resourceValue: '',
|
resourceValue: '',
|
||||||
@@ -691,6 +708,60 @@ const resetForm = () => {
|
|||||||
list.value = []
|
list.value = []
|
||||||
formRef.value?.resetFields()
|
formRef.value?.resetFields()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const dialogVisiblePoints = ref(false)
|
||||||
|
|
||||||
|
// 添加层级信息
|
||||||
|
const handleTreeWithLevel = (list, level = 1) => {
|
||||||
|
return list.map(item => {
|
||||||
|
const node = { ...item, level }
|
||||||
|
if (item.children && item.children.length > 0) {
|
||||||
|
node.children = handleTreeWithLevel(item.children, level + 1)
|
||||||
|
}
|
||||||
|
return node
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 只允许点击第三级节点
|
||||||
|
const treeRef = ref() // 引用 el-tree
|
||||||
|
const handleNodeClick = (data, node) => {
|
||||||
|
if (data.level === 3) {
|
||||||
|
formData.value.pointNames = data.id
|
||||||
|
formData.value.pointNamesVo = data.name
|
||||||
|
|
||||||
|
// 获取父节点(章节名称)
|
||||||
|
const currentNode = treeRef.value.getNode(data)
|
||||||
|
const parentNode = currentNode.parent
|
||||||
|
if (parentNode && parentNode.data) {
|
||||||
|
formData.value.chapteridDictTextVo = parentNode.data.name
|
||||||
|
formData.value.chapteridDictText = parentNode.data.id
|
||||||
|
} else {
|
||||||
|
formData.value.chapteridDictText = ''
|
||||||
|
}
|
||||||
|
|
||||||
|
dialogVisiblePoints.value = false
|
||||||
|
} else {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const deptList = ref<Tree[]>([]) // 树形结构
|
||||||
|
/** 获得部门树 */
|
||||||
|
const getTree = async () => {
|
||||||
|
const res = await SpecialtyApi.listPoints()
|
||||||
|
const tree = handleTree(res)
|
||||||
|
deptList.value = []
|
||||||
|
deptList.value = handleTreeWithLevel(tree)
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
const openPoints = async () => {
|
||||||
|
await getTree();
|
||||||
|
dialogVisiblePoints.value = true;
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.edit-dialog {
|
.edit-dialog {
|
||||||
|
@@ -16,9 +16,10 @@
|
|||||||
<el-input v-model="formData.specialtyName" placeholder="请输入专业" disabled />
|
<el-input v-model="formData.specialtyName" placeholder="请输入专业" disabled />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="知识点" prop="pointNames">
|
<el-form-item label="章节名称" prop="chapteridDictText">
|
||||||
<el-input v-model="formData.pointNames" placeholder="请输入知识点" disabled />
|
<el-input v-model="formData.chapteridDictTextVo" placeholder="请输入章节名称" disabled />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@@ -29,21 +30,20 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="题型难度" prop="quLevel">
|
<el-form-item label="题型难度" prop="quLevel">
|
||||||
<!-- <el-select v-model="formData.quLevel" placeholder="请选择题型难度" clearable>
|
<el-select
|
||||||
<el-option label="简单" :value="'0'" />
|
v-model="formData.quLevel"
|
||||||
<el-option label="一般" :value="'1'" />
|
placeholder="请选择题型难度"
|
||||||
<el-option label="困难" :value="'2'" />
|
clearable
|
||||||
</el-select> -->
|
>
|
||||||
<el-select v-model="formData.quLevel" placeholder="请选择题型难度">
|
<el-option
|
||||||
<el-option
|
v-for="dict in getIntDictOptions(DICT_TYPE.EXAM_QUE_DIFF)"
|
||||||
v-for="dict in getStrDictOptions(DICT_TYPE.EXAM_QUE_DIFF)"
|
:key="dict.value"
|
||||||
:key="dict.value"
|
:label="dict.label"
|
||||||
:label="dict.label"
|
:value="dict.value"
|
||||||
:value="dict.value"
|
/>
|
||||||
/>
|
</el-select>
|
||||||
</el-select>
|
</el-form-item>
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
@@ -53,14 +53,27 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="章节名称" prop="chapteridDictText">
|
<el-form-item label="知识点" prop="pointNames">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="formData.chapteridDictText"
|
v-model="formData.pointNamesVo"
|
||||||
placeholder="请输入章节名称"
|
placeholder="请选择知识点"
|
||||||
disabled
|
readonly
|
||||||
|
@click="openPoints()"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
|
<el-dialog v-model="dialogVisiblePoints" title="选择知识点" width="30%">
|
||||||
|
<el-tree
|
||||||
|
ref="treeRef"
|
||||||
|
:data="deptList"
|
||||||
|
node-key="id"
|
||||||
|
:props="{ label: 'name', children: 'children' }"
|
||||||
|
highlight-current
|
||||||
|
default-expand-all
|
||||||
|
@node-click="handleNodeClick"
|
||||||
|
/>
|
||||||
|
</el-dialog>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
@@ -71,7 +84,7 @@
|
|||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<!-- <el-col :span="12">
|
||||||
<el-form-item label="审核状态" prop="audit">
|
<el-form-item label="审核状态" prop="audit">
|
||||||
<el-select v-model="formData.audit" placeholder="请选择审核状态">
|
<el-select v-model="formData.audit" placeholder="请选择审核状态">
|
||||||
<el-option
|
<el-option
|
||||||
@@ -82,7 +95,7 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div class="edit-bottom">
|
<div class="edit-bottom">
|
||||||
@@ -298,6 +311,7 @@ import * as WordApi from '@/api/wps/word'
|
|||||||
import FileForm from './components/FileForm.vue'
|
import FileForm from './components/FileForm.vue'
|
||||||
import WordInfo from './components/WordInfo.vue'
|
import WordInfo from './components/WordInfo.vue'
|
||||||
import WordInfos from './components/WordInfos.vue'
|
import WordInfos from './components/WordInfos.vue'
|
||||||
|
import * as SpecialtyApi from '@/api/points'
|
||||||
import { defaultProps, handleTree } from '@/utils/tree'
|
import { defaultProps, handleTree } from '@/utils/tree'
|
||||||
import { cloneDeep } from 'lodash-es'
|
import { cloneDeep } from 'lodash-es'
|
||||||
|
|
||||||
@@ -315,6 +329,8 @@ const dialogTitle = ref('') // 弹窗的标题
|
|||||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||||
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
||||||
const formData = ref({
|
const formData = ref({
|
||||||
|
pointNamesVo:'',
|
||||||
|
chapteridDictTextVo:'',
|
||||||
content: '',
|
content: '',
|
||||||
specialtyName: '',
|
specialtyName: '',
|
||||||
courseName: '',
|
courseName: '',
|
||||||
@@ -322,9 +338,8 @@ const formData = ref({
|
|||||||
required: '',
|
required: '',
|
||||||
chapteridDictText: '',
|
chapteridDictText: '',
|
||||||
analysis: '',
|
analysis: '',
|
||||||
quLevel: '',
|
quLevel: 0,
|
||||||
pointNames: '',
|
pointNames: '',
|
||||||
audit: '',
|
|
||||||
subjectName: '',
|
subjectName: '',
|
||||||
status: ' ',
|
status: ' ',
|
||||||
resourceValue: '',
|
resourceValue: '',
|
||||||
@@ -625,8 +640,10 @@ const open = async (queryParams: any, type: string, id?: number) => {
|
|||||||
formData.value.specialtyName = queryParams.specialtyName
|
formData.value.specialtyName = queryParams.specialtyName
|
||||||
formData.value.courseName = queryParams.courseName
|
formData.value.courseName = queryParams.courseName
|
||||||
formData.value.subjectName = queryParams.subjectName
|
formData.value.subjectName = queryParams.subjectName
|
||||||
formData.value.pointNames = queryParams.pointNames
|
formData.value.pointNames=queryParams.pointNamesVo
|
||||||
formData.value.chapteridDictText = queryParams.chapteridDictText
|
formData.value.pointNamesVo=queryParams.pointNames
|
||||||
|
formData.value.chapteridDictText=queryParams.chapteridDictTextVo
|
||||||
|
formData.value.chapteridDictTextVo=queryParams.chapteridDictText
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
||||||
@@ -680,9 +697,8 @@ const resetForm = () => {
|
|||||||
required: '',
|
required: '',
|
||||||
chapteridDictText: '',
|
chapteridDictText: '',
|
||||||
analysis: '',
|
analysis: '',
|
||||||
quLevel: '',
|
quLevel: 0,
|
||||||
pointNames: '',
|
pointNames: '',
|
||||||
audit: '',
|
|
||||||
subjectName: '',
|
subjectName: '',
|
||||||
status: '0',
|
status: '0',
|
||||||
resourceValue: '',
|
resourceValue: '',
|
||||||
@@ -738,6 +754,61 @@ const resetForm = () => {
|
|||||||
list.value = []
|
list.value = []
|
||||||
formRef.value?.resetFields()
|
formRef.value?.resetFields()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const dialogVisiblePoints = ref(false)
|
||||||
|
|
||||||
|
// 添加层级信息
|
||||||
|
const handleTreeWithLevel = (list, level = 1) => {
|
||||||
|
return list.map(item => {
|
||||||
|
const node = { ...item, level }
|
||||||
|
if (item.children && item.children.length > 0) {
|
||||||
|
node.children = handleTreeWithLevel(item.children, level + 1)
|
||||||
|
}
|
||||||
|
return node
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 只允许点击第三级节点
|
||||||
|
const treeRef = ref() // 引用 el-tree
|
||||||
|
const handleNodeClick = (data, node) => {
|
||||||
|
if (data.level === 3) {
|
||||||
|
formData.value.pointNames = data.id
|
||||||
|
formData.value.pointNamesVo = data.name
|
||||||
|
|
||||||
|
// 获取父节点(章节名称)
|
||||||
|
const currentNode = treeRef.value.getNode(data)
|
||||||
|
const parentNode = currentNode.parent
|
||||||
|
if (parentNode && parentNode.data) {
|
||||||
|
formData.value.chapteridDictTextVo = parentNode.data.name
|
||||||
|
formData.value.chapteridDictText = parentNode.data.id
|
||||||
|
} else {
|
||||||
|
formData.value.chapteridDictText = ''
|
||||||
|
}
|
||||||
|
|
||||||
|
dialogVisiblePoints.value = false
|
||||||
|
} else {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const deptList = ref<Tree[]>([]) // 树形结构
|
||||||
|
/** 获得部门树 */
|
||||||
|
const getTree = async () => {
|
||||||
|
const res = await SpecialtyApi.listPoints()
|
||||||
|
const tree = handleTree(res)
|
||||||
|
deptList.value = []
|
||||||
|
deptList.value = handleTreeWithLevel(tree)
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
const openPoints = async () => {
|
||||||
|
await getTree();
|
||||||
|
dialogVisiblePoints.value = true;
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.edit-dialog {
|
.edit-dialog {
|
||||||
|
Reference in New Issue
Block a user