【新增】 WPS相关提交
This commit is contained in:
@@ -18,7 +18,11 @@
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="章节名称" prop="chapteridDictText">
|
||||
<el-input v-model="formData.chapteridDictTextVo" placeholder="请输入章节名称" disabled />
|
||||
<el-input
|
||||
v-model="formData.chapteridDictTextVo"
|
||||
placeholder="请输入章节名称"
|
||||
disabled
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -30,11 +34,7 @@
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="题型难度" prop="quLevel">
|
||||
<el-select
|
||||
v-model="formData.quLevel"
|
||||
placeholder="请选择题型难度"
|
||||
clearable
|
||||
>
|
||||
<el-select v-model="formData.quLevel" placeholder="请选择题型难度" clearable>
|
||||
<el-option
|
||||
v-for="dict in getIntDictOptions(DICT_TYPE.EXAM_QUE_DIFF)"
|
||||
:key="dict.value"
|
||||
@@ -140,8 +140,8 @@
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<!-- <el-table-column type="selection" width="55" /> -->
|
||||
<el-table-column label="考点" align="center" prop="contentIn" width="360px"/>
|
||||
<el-table-column label="权值" align="center" prop="scoreRate" width="100px"/>
|
||||
<el-table-column label="考点" align="center" prop="contentIn" width="360px" />
|
||||
<el-table-column label="权值" align="center" prop="scoreRate" width="100px" />
|
||||
<el-table-column label="操作" align="center" width="100px">
|
||||
<template #default="scope">
|
||||
<el-button type="primary" link @click="handleDelete(scope.row)">
|
||||
@@ -324,8 +324,8 @@ const dialogTitle = ref('') // 弹窗的标题
|
||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
||||
const formData = ref({
|
||||
pointNamesVo:'',
|
||||
chapteridDictTextVo:'',
|
||||
pointNamesVo: '',
|
||||
chapteridDictTextVo: '',
|
||||
content: '',
|
||||
specialtyName: '',
|
||||
courseName: '',
|
||||
@@ -371,16 +371,19 @@ const pptxPointsFun = ref({
|
||||
chineseName: '',
|
||||
function: ''
|
||||
})
|
||||
|
||||
const pptxPoints = ref({
|
||||
name: '',
|
||||
englishName: '',
|
||||
filePath: '',
|
||||
fileNama: '',
|
||||
chineseName: '',
|
||||
paragraph: '',
|
||||
title: '',
|
||||
valueList: '',
|
||||
type: '',
|
||||
belongTo: '',
|
||||
isboo: '',
|
||||
function: '',
|
||||
unit: ''
|
||||
isText: '',
|
||||
isTrue: '',
|
||||
isParameter: ''
|
||||
})
|
||||
|
||||
let pptxPointsInfosList: (typeof pptxPoints)[] = []
|
||||
|
||||
const handleDelete = (row) => {
|
||||
@@ -435,14 +438,15 @@ const pptxData = reactive({
|
||||
|
||||
const handleCheckChange = (data: Tree, checked: boolean, indeterminate: boolean) => {
|
||||
if (data.titleType == '2') {
|
||||
pptxPoints.value.name = chineseName.value + data.toChinese
|
||||
pptxPoints.value.filePath = filePath.value
|
||||
pptxPoints.value.function = nodeFunctions.value + data.nodeFunction
|
||||
pptxPoints.value.englishName = englishNames.value
|
||||
pptxPoints.value.belongTo = data.belongTo
|
||||
pptxPoints.value.isboo = data.isboo
|
||||
pptxPoints.value.type = data.type
|
||||
pptxPoints.value.unit = data.unit
|
||||
pptxPoints.value.chineseName = chineseName.value + data.chineseName
|
||||
pptxPoints.value.fileNama = englishNames.value
|
||||
pptxPoints.value.paragraph = paragraph.value
|
||||
pptxPoints.value.title = data.title
|
||||
pptxPoints.value.valueList = data.valueList
|
||||
pptxPoints.value.type = data.dataType
|
||||
pptxPoints.value.isText = data.isText
|
||||
pptxPoints.value.isTrue = data.isTrue
|
||||
pptxPoints.value.isParameter = data.isParameter
|
||||
pptxPointsInfosList.push(cloneDeep(pptxPoints.value))
|
||||
}
|
||||
console.log(data, checked, indeterminate)
|
||||
@@ -466,9 +470,6 @@ const addPptxInfo = async () => {
|
||||
}
|
||||
dialogFormVisiblePptxInfo.value = true
|
||||
}
|
||||
const queryParams = reactive({
|
||||
nodeFunction: undefined
|
||||
})
|
||||
const handleSpecialtyNodeClick = async (row: any) => {
|
||||
titles.value = row.name
|
||||
englishName.value = row.englishName
|
||||
@@ -477,15 +478,15 @@ const handleSpecialtyNodeClick = async (row: any) => {
|
||||
dialogFormVisiblePptxInfos.value = true
|
||||
}
|
||||
const chineseName = ref('')
|
||||
const nodeFunctions = ref('')
|
||||
const paragraph = 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
|
||||
paragraph.value = row.selectName
|
||||
englishNames.value = row.englishName
|
||||
const res = await PptxApi.getPptxInfos(queryParams)
|
||||
const res = await PptxApi.getPptxInfos(row.title)
|
||||
pptxPointsInfoList.value = []
|
||||
pptxPointsInfoList.value.push(...handleTree(res))
|
||||
dialogFormVisiblePptxInfos.value = true
|
||||
@@ -495,14 +496,17 @@ const submitPptxPoints = async () => {
|
||||
pptxPointsInfosList = []
|
||||
console.log(list.value)
|
||||
var indexFlag = false
|
||||
let index = 0
|
||||
for (let i = 0; i < res.length; i++) {
|
||||
for (let x = 0; x < list.value.length; x++) {
|
||||
if (res[i].content == list.value[x].content) {
|
||||
if (res[i].contentIn == list.value[x].contentIn) {
|
||||
// 如果存在相同的数据话 不进入
|
||||
indexFlag = true
|
||||
}
|
||||
}
|
||||
if (!indexFlag) {
|
||||
index += 1;
|
||||
res[i].sort = index;
|
||||
list.value.push(res[i])
|
||||
}
|
||||
}
|
||||
@@ -709,12 +713,11 @@ const resetForm = () => {
|
||||
formRef.value?.resetFields()
|
||||
}
|
||||
|
||||
|
||||
const dialogVisiblePoints = ref(false)
|
||||
|
||||
// 添加层级信息
|
||||
const handleTreeWithLevel = (list, level = 1) => {
|
||||
return list.map(item => {
|
||||
return list.map((item) => {
|
||||
const node = { ...item, level }
|
||||
if (item.children && item.children.length > 0) {
|
||||
node.children = handleTreeWithLevel(item.children, level + 1)
|
||||
@@ -745,23 +748,18 @@ const handleNodeClick = (data, node) => {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
const deptList = ref<Tree[]>([]) // 树形结构
|
||||
/** 获得部门树 */
|
||||
const getTree = async () => {
|
||||
const res = await SpecialtyApi.listPoints()
|
||||
const tree = handleTree(res)
|
||||
deptList.value = []
|
||||
deptList.value = handleTreeWithLevel(tree)
|
||||
|
||||
|
||||
const tree = handleTree(res)
|
||||
deptList.value = []
|
||||
deptList.value = handleTreeWithLevel(tree)
|
||||
}
|
||||
const openPoints = async () => {
|
||||
await getTree();
|
||||
dialogVisiblePoints.value = true;
|
||||
await getTree()
|
||||
dialogVisiblePoints.value = true
|
||||
}
|
||||
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.edit-dialog {
|
||||
|
Reference in New Issue
Block a user