diff --git a/src/views/paper/question/WpsPptxForm.vue b/src/views/paper/question/WpsPptxForm.vue
index b1daa78..bb676b3 100644
--- a/src/views/paper/question/WpsPptxForm.vue
+++ b/src/views/paper/question/WpsPptxForm.vue
@@ -17,12 +17,8 @@
-
-
+
+
@@ -34,13 +30,9 @@
-
+
-
+
-
-
-
-
@@ -87,7 +66,7 @@
-
+
@@ -314,7 +293,7 @@ import * as PptxApi from '@/api/wps/pptx'
import FileForm from './components/FileForm.vue'
import { defaultProps, handleTree } from '@/utils/tree'
import { cloneDeep } from 'lodash-es'
-import * as SpecialtyApi from '@/api/points'
+
defineOptions({ name: 'WpsPptxFrom' })
const pptxPointsList = ref([]) // 树形结构
const pptxPointsInfoList = ref([]) // 树形结构
@@ -328,8 +307,6 @@ const dialogTitle = ref('') // 弹窗的标题
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
const formType = ref('') // 表单的类型:create - 新增;update - 修改
const formData = ref({
- pointNamesVo:'',
- chapteridDictTextVo:'',
content: '',
specialtyName: '',
courseName: '',
@@ -337,7 +314,7 @@ const formData = ref({
required: '',
chapteridDictText: '',
analysis: '',
- quLevel: 0,
+ quLevel: '',
pointNames: '',
audit: '',
subjectName: '',
@@ -383,7 +360,8 @@ const pptxPoints = ref({
type: '',
belongTo: '',
isboo: '',
- function: ''
+ function: '',
+ unit: ''
})
let pptxPointsInfosList: (typeof pptxPoints)[] = []
@@ -446,6 +424,7 @@ const handleCheckChange = (data: Tree, checked: boolean, indeterminate: boolean)
pptxPoints.value.belongTo = data.belongTo
pptxPoints.value.isboo = data.isboo
pptxPoints.value.type = data.type
+ pptxPoints.value.unit = data.unit
pptxPointsInfosList.push(cloneDeep(pptxPoints.value))
}
console.log(data, checked, indeterminate)
@@ -654,7 +633,7 @@ const resetForm = () => {
required: '',
chapteridDictText: '',
analysis: '',
- quLevel: 0,
+ quLevel: '',
pointNames: '',
audit: '',
subjectName: '',
@@ -712,56 +691,6 @@ const resetForm = () => {
list.value = []
formRef.value?.resetFields()
}
-
-const dialogVisiblePoints = ref(false)
-const openPoints = async () => {
- await getTree();
- dialogVisiblePoints.value = true;
-}
-// 只允许点击第三级节点
-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([]) // 树形结构
-/** 获得部门树 */
-const getTree = async () => {
- const res = await SpecialtyApi.listPoints()
- const tree = handleTree(res)
- deptList.value = []
- deptList.value = handleTreeWithLevel(tree)
-
-
-}
-
-
-// 添加层级信息
-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
- })
-}
-