yujialong 6 months ago
parent babfe30a92
commit 1db6084af8
  1. 1
      src/api/index.js
  2. 7
      src/libs/util.js
  3. 78
      src/pages/ques/detail/index.vue
  4. 10
      src/pages/ques/list/index.vue
  5. 25
      src/pages/quesBankType/index.vue
  6. 8
      src/pages/testPaper/detail/auto.vue
  7. 169
      src/pages/testPaper/detail/index.vue
  8. 12
      src/pages/testPaper/detail/repeatQues.vue
  9. 8
      src/pages/testPaperLibrary/index.vue
  10. 3
      src/pages/testPaperLibraryType/index.vue
  11. 9
      src/styles/common.scss

@ -39,6 +39,7 @@ export default {
paperLibrarySave: `/exam/exam/paperLibrary/save`,
paperLibraryUpdate: `/exam/exam/paperLibrary/update`,
paperLibraryDisable: `/exam/exam/paperLibrary/updateStatus`,
copyExamPaperLibrary: `/exam/exam/paperLibrary/copyExamPaperLibrary`,
examClassificationDel: `/exam/exam/classification/delete`,
examClassificationSave: `/exam/exam/classification/save`,

@ -176,6 +176,13 @@ const util = {
resolve(new Date(data.currentTime))
})
},
getUuid () {
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
var r = Math.random() * 16 | 0,
v = c == 'x' ? r : (r & 0x3 | 0x8);
return v.toString(16);
})
}
};
export default util;

@ -4,7 +4,7 @@
<p class="page-name mb">试题</p>
<div v-loading="loading">
<el-form :model="form" :rules="rules" :class="['input-form model', { paper: paperType }]" ref="form"
label-width="110px" :disabled="detailType === 2">
label-width="110px" :disabled="isDisabled">
<div class="item-line">
<template v-if="paperType === 1">
<el-form-item prop="questionBankTypeId" label="题库分类">
@ -13,7 +13,8 @@
@change="getQuesBank"></el-cascader>
</el-form-item>
<el-form-item prop="questionBankId" label="题库">
<el-select v-model="form.questionBankId" filterable placeholder="请选择题库" @change="getKnowledge">
<el-select v-model="form.questionBankId" filterable placeholder="请选择题库"
:disabled="!form.questionBankTypeId.length" @change="getKnowledge">
<el-option v-for="(item, i) in questionBanks" :key="i" :label="item.questionBankName"
:value="item.id"></el-option>
</el-select>
@ -90,7 +91,7 @@
</div>
<UeditorPlus v-else class="opt-editor" :ref="'opt' + item.optionNumber" :config="editorConfig"
v-model="item.optionText" @ready="editor => optReady(editor, item)" />
<template v-if="form.questionType !== 'judgement'">
<template v-if="form.questionType !== 'judgement' && !isDisabled">
<i class="icon el-icon-circle-plus-outline m-t-8" @click="addOpt(i)"></i>
<i v-if="form.questionAnswerVersions.length > 2" class="icon el-icon-remove-outline m-t-8"
@click="delOpt(i)"></i>
@ -179,17 +180,18 @@
@click="submit(0)">保存</el-button>
<template v-else>
<el-button type="primary" :loading="submiting && keep === 0" @click="submit(0)">保存</el-button>
<el-button type="primary" :loading="submiting && keep === 1" @click="submit(1)">{{ questionId ? '保存并同步更新相似题'
:
'保存并继续新增' }}</el-button>
<el-button v-if="!questionId" type="primary" :loading="submiting && keep === 1" @click="submit(1)">{{
questionId ? '保存并同步更新相似题'
:
'保存并继续新增' }}</el-button>
</template>
</template>
<el-button @click="back">{{ detailType !== 2 ? '取消' : '返回' }}</el-button>
</div>
</div>
<el-dialog title="提示" :visible.sync="repeatVisible" width="800px" :close-on-click-modal="false">
<template v-if="form.questionBankId">
<el-dialog title="提示" :visible.sync="repeatVisible" width="800px" :close-on-click-modal="false" append-to-body>
<template v-if="form.questionId">
<el-alert title="您确定要保存对本题所做的更改吗?更新后,所有关联的试卷将会自动更新" type="warning" effect="dark" :closable="false" />
<p class="m-t-10 m-b-10 fs-12">系统已经识别出题库中有与本题相似的其他题目如果您选择同步更新这些相似题目那么所有关联的试卷将会自动更新</p>
</template>
@ -197,7 +199,7 @@
<el-table class="m-t-10" :data="repeats" stripe header-align="center" @selection-change="handleSelectionChange"
row-key="id">
<el-table-column v-if="form.questionBankId" type="selection" width="45" align="center"
<el-table-column v-if="form.questionId" type="selection" width="45" align="center"
:reserve-selection="true"></el-table-column>
<el-table-column type="index" width="60" label="序号" align="center"></el-table-column>
<el-table-column prop="name" label="题型" align="center" min-width="120">
@ -248,7 +250,7 @@ export default {
questionBankId: this.$route.query.questionBankId, // id
questionBankName: this.$route.query.questionBankName,
questionBankCategory: this.$route.query.questionBankCategory,
detailType: +this.$route.query.detailType,
detailType: +this.$route.query.detailType, // 1()23paperTypetype123
numToLetter: Util.numToLetter,
loading: false,
questionBankTypes: [],
@ -274,7 +276,7 @@ export default {
fillBlanks: [],
uploadList: [],
form: {
questionBankTypeId: '',
questionBankTypeId: [],
difficulty: '',
givenYear: new Date(),
knowledgePointIds: [],
@ -331,6 +333,10 @@ export default {
'编辑' :
'') + '试题'
},
//
isDisabled () {
return this.detailType === 2
},
},
mounted () {
const { query } = this.$route
@ -374,7 +380,6 @@ export default {
const type = this.detailType
if (this.paperType === 1) {
this.getQuesBankType()
this.getQuesBank()
} else if (!type) {
//
const { path } = this.$route.query
@ -392,6 +397,8 @@ export default {
//
if (v) {
const { form, beforeSubmitForm: before } = this
form.questionBankTypeId = v.questionBankTypeId
form.questionBankId = v.questionBankId
form.difficulty = v.difficulty
form.givenYear = v.givenYear
form.knowledgePointIds = this.beforeSubmitForm.knowledgePointIds
@ -516,16 +523,20 @@ export default {
//
async getQuesBank () {
try {
let type
const val = this.form.questionBankTypeId
if (val.length) type = val[val.length - 1]
const res = await this.$post(this.api.questionBankList, {
status: 1,
pageNum: 1,
pageSize: 1000,
questionCategoryId: type || '',
})
this.questionBanks = res.message.records
if (val.length) {
let type = val[val.length - 1]
const res = await this.$post(this.api.questionBankList, {
status: 1,
pageNum: 1,
pageSize: 1000,
questionCategoryId: type || '',
})
this.questionBanks = res.message.records
} else {
this.questionBanks = []
}
this.form.questionBankId = ''
} catch (e) { }
},
//
@ -574,22 +585,26 @@ export default {
},
//
stemReady (editor) {
editor.addListener('contentChange', () => {
this.questionItemReset(editor.getContent())
})
if (this.isDisabled) {
editor.setDisabled()
} else {
editor.addListener('contentChange', () => {
this.questionItemReset(editor.getContent())
})
}
editor.setContent(this.form.stem)
},
//
answerAnalysisReady (editor) {
editor.setContent(this.answerAnalysis)
this.isDisabled ? editor.setDisabled() : editor.setContent(this.answerAnalysis)
},
//
uploadInstructionsReady (editor) {
editor.setContent(this.form.uploadInstructions)
this.isDisabled ? editor.setDisabled() : editor.setContent(this.form.uploadInstructions)
},
//
referenceAnswerReady (editor) {
editor.setContent(this.form.questionAnswerVersions[0].referenceAnswer)
this.isDisabled ? editor.setDisabled() : editor.setContent(this.form.questionAnswerVersions[0].referenceAnswer)
},
//
correctChange (i) {
@ -610,9 +625,11 @@ export default {
},
//
optFocus (e) {
const opts = this.form.questionAnswerVersions
opts.map(n => n.focus = 0)
e.focus = 1
if (!this.isDisabled) {
const opts = this.form.questionAnswerVersions
opts.map(n => n.focus = 0)
e.focus = 1
}
},
//
optReady (editor, opt) {
@ -766,7 +783,6 @@ export default {
const form = this.tempForm
const type = this.detailType
const paperEdit = this.curQues //
// type: 1()234
await this.$post(this.api[type === 1 || !form.questionId ? 'addQuestion' : 'updateQuestion'], form)
paperEdit && this.$emit('updateQues', form)

@ -107,8 +107,10 @@
<template slot-scope="scope">{{ questionTypes.find(e => e.id === scope.row.questionType) ?
questionTypes.find(e => e.id === scope.row.questionType).name : '' }}</template>
</el-table-column>
<el-table-column prop="professionalName" label="专业" align="center" min-width="100"></el-table-column>
<el-table-column prop="knowledgePointName" label="知识点" align="center" min-width="100"></el-table-column>
<el-table-column prop="professionalName" label="专业" align="center" min-width="100"
show-overflow-tooltip></el-table-column>
<el-table-column prop="knowledgePointName" label="知识点" align="center" min-width="100"
show-overflow-tooltip></el-table-column>
<el-table-column prop="givenYear" label="年份" align="center" width="70" sortable="custom"></el-table-column>
<el-table-column prop="difficulty" label="难度" align="center" width="70" sortable="custom">
<template slot-scope="scope">{{ difficults.find(e => e.id === scope.row.difficulty) ? difficults.find(e =>
@ -534,8 +536,8 @@ export default {
async switchOff (val, row) {
try {
row.status = val ? 0 : 1 //
if (!val) {
await this.$confirm(`<p>确认要禁用【${row.stem}】吗?</p><p style="color: #f56c6c;">禁用后已引用该试题的试卷将会变成草稿,再次启用后,试卷将自动发布</p>`, '提示', {
if (!val && row.referenceCount) {
await this.$confirm(`<p>确认要禁用【${row.stem}】吗?</p><p style="color: #f56c6c;">禁用后已引用该试题的试卷将会变成草稿</p>`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',

@ -177,17 +177,20 @@ export default {
//
async typeSubmit () {
if (this.submiting) return false
const { form, parentId } = this
if (!form.name) return Util.warningMsg('请输入题库分类名称')
this.submiting = true
if (parentId.length) form.parentId = parentId[parentId.length - 1]
// form.systemId = this.systemId
form.createSource = 1
await this.$post(this.api.categoriesSave, form)
Util.successMsg('保存成功')
this.typeVisible = false
this.submiting = false
this.getData()
try {
const { form, parentId } = this
if (!form.name) return Util.warningMsg('请输入题库分类名称')
this.submiting = true
if (parentId.length) form.parentId = parentId[parentId.length - 1]
// form.systemId = this.systemId
form.createSource = 1
await this.$post(this.api.categoriesSave, form)
Util.successMsg('保存成功')
this.typeVisible = false
this.getData()
} finally {
this.submiting = false
}
},
//
del (row) {

@ -260,10 +260,10 @@ export default {
methods: {
//
init () {
this.handleQuesList()
if (!this.loaded) {
this.loaded = 1
this.yearCheck = this.years
this.handleQuesList()
this.getQuesBankType()
this.initQuesBank()
this.difficult = this.$parent.form.difficult
@ -393,6 +393,7 @@ export default {
//
handleQuesList () {
this.list = _.cloneDeep(this.$parent.form.paperOutline)
console.log("🚀 ~ handleQuesList ~ this.list:", this.list)
},
//
async clearChecked () {
@ -507,13 +508,15 @@ export default {
let total = Decimal(e.basicDifficulty || 0).add(e.normalDifficulty || 0).add(e.hardDifficulty || 0).add(e.veryHardDifficulty || 0).toNumber() // 4
if (total) { // 41
this.$set(e, 'randomDifficulty', 0)
} else {
total = +e.randomDifficulty || 0
}
if (total > e.questionNum) {
Util.warningMsg(`${name}的小题总数大于目标题数,请重新输入`)
invalid = 1
break
}
total = Decimal(total).add(e.randomDifficulty || 0).toNumber()
e.count = total
totalCount = Decimal(totalCount).add(total).toNumber()
}
@ -536,7 +539,6 @@ export default {
}
})
list.map(e => {
// e.randomDifficulty = 0
e.givenYears = years
e.knowledgePointsIds = k
})

@ -155,15 +155,15 @@
<p v-if="item.questionType !== 'fill_blank'" class="m-r-10 input-wrap">
<el-input class="l-input" placeholder="请输入分值" v-model="ques.score" /></p>
<el-popover v-else placement="bottom" width="400" trigger="click">
<div v-if="ques.fillScores" class="fill-scores">
<el-popover v-else-if="ques.fillScores" placement="bottom" width="350" trigger="click">
<div class="fill-scores">
<p class="fill-title">每空分值</p>
<div v-for="(score, k) in ques.fillScores" :key="k" class="input-wrap">
<el-input class="l-input" placeholder="请输入分值" v-model="score.val"
@change="fillScoreChange(ques)" />
&emsp;填空项{{ k + 1 }}
<span
v-if="ques.answerData && ques.answerData.length && ques.answerData[k]">&emsp;建议分值占比{{
v-if="ques.answerData && ques.answerData.length && ques.answerData[k] && ques.answerData[k].scoreProportion != 0">&emsp;建议分值占比{{
ques.answerData[k].scoreProportion }}%</span>
</div>
</div>
@ -171,7 +171,7 @@
查看每空分值<el-input class="l-input" placeholder="请输入分值" v-model="ques.score" readonly />
</div>
</el-popover>
<el-button v-if="!ques.isDel" type="text" @click="toQues(item, j, ques, 1)">编辑试题</el-button>
<el-button v-if="!ques.isDel" type="text" @click="toQues(item, j, ques, 2)">编辑试题</el-button>
<el-button type="text" @click="showManualDia(item, j, ques)">更换试题</el-button>
<el-button type="text" @click="showManualDia(item, j)">添加试题</el-button>
<el-button type="text" @click="delQues(item, j)">移除试题</el-button>
@ -223,33 +223,29 @@
</div>
</div>
<draggable v-if="form.paperOutline && form.paperOutline.length">
<!-- <transition-group :key="1"> -->
<div class="layer" id="layer" ref="layer">
<table class="table">
<thead>
<tr>
<th width="30%">大题</th>
<th width="35%">已添加题数/目标题数</th>
<th width="35%">已分配分值/目标分值</th>
</tr>
</thead>
<tbody>
<tr v-for="(item, i) in form.paperOutline" :key="i">
<td>{{ arabicToChinese(i + 1) }}大题</td>
<td>{{ item.examQuestions.length }}/{{ item.questionNum }}</td>
<td>{{ item.examQuestions.reduce((e, j) => (e += +j.score), 0) || 0 }}/{{ item.targetScore }}</td>
</tr>
<tr>
<td>总计</td>
<td>{{ overview.alreadyQuesCount }}/{{ overview.questionCount }}</td>
<td>{{ overview.alreadyScore }}/{{ overview.totalScore }}</td>
</tr>
</tbody>
</table>
</div>
<!-- </transition-group> -->
</draggable>
<div v-if="form.paperOutline && form.paperOutline.length" class="layer" id="layer">
<table class="table">
<thead>
<tr>
<th width="30%">大题</th>
<th width="35%">已添加题数/目标题数</th>
<th width="35%">已分配分值/目标分值</th>
</tr>
</thead>
<tbody>
<tr v-for="(item, i) in form.paperOutline" :key="i">
<td>{{ arabicToChinese(i + 1) }}大题</td>
<td>{{ item.examQuestions.length }}/{{ item.questionNum }}</td>
<td>{{ item.examQuestions.reduce((e, j) => (e += +j.score), 0) || 0 }}/{{ item.targetScore }}</td>
</tr>
<tr>
<td>总计</td>
<td>{{ overview.alreadyQuesCount }}/{{ overview.questionCount }}</td>
<td>{{ overview.alreadyScore }}/{{ overview.totalScore }}</td>
</tr>
</tbody>
</table>
</div>
<Template :visible.sync="templateVisible" />
<Manual :visible.sync="manualVisible" :questionType.sync="curType.questionType" />
@ -265,7 +261,6 @@
</template>
<script>
import Draggable from 'vuedraggable'
import Sortable from 'sortablejs'
import UeditorPlus from '@/components/ueditorPlus'
import Breadcrumb from '@/components/breadcrumb'
import Template from './template'
@ -454,11 +449,8 @@ export default {
name: '创建试卷'
},
]
// console.log(44, Sortable, document.querySelector('#layer'))
// new Sortable(document.querySelector('#layer'), {
// group: "name",
// sort: true,
// })
this.drag()
this.getDetail()
this.getType()
this.getProfessional()
@ -490,8 +482,9 @@ export default {
if (r.particularYear) r.particularYear = r.particularYear + ''
r.professionalId = r.professionalId ? r.professionalId.split(',').map(e => +e) : []
this.form = r
this.loading = false
}
} finally {
} catch (e) {
this.loading = false
}
},
@ -602,7 +595,7 @@ export default {
async fillBlankAllocation (list) {
const param = list.map(e => {
let { answerData } = e
if (answerData) {
if (answerData && e.questionAnswerVersionsList) {
return {
questionType: e.questionType,
answerData: e.questionAnswerVersionsList[0].answerData,
@ -659,6 +652,7 @@ export default {
},
//
getCorrectAnswer (e) {
const opts = e.questionAnswerVersionsList
if (e.questionType === 'fill_blank') { //
// answerData
let data = e.answerData
@ -671,10 +665,10 @@ export default {
}
return ''
} else if (e.questionType === 'essay') { //
return e.questionAnswerVersionsList[0].referenceAnswer || '暂无'
if (opts) return opts[0].referenceAnswer || '暂无'
} else {
if (e.questionAnswerVersionsList) {
const correct = e.questionAnswerVersionsList.filter(e => e.answerIsCorrect)
if (opts) {
const correct = opts.filter(e => e.answerIsCorrect)
return correct ? (e.questionType === 'judgement' ? correct[0].optionText : correct.map(e => Util.numToLetter(e.optionNumber - 1)).join('')) : '' // ABC
}
}
@ -742,10 +736,12 @@ export default {
this.addQuesVisible = false
},
//
updateQues (ques, id) {
updateQues (ques) {
ques.questionAnswerVersionsList = ques.questionAnswerVersions
delete ques.questionAnswerVersions
ques.score = ''
this.curType.examQuestions[this.curQuesIndex] = Object.assign(this.curRow, ques)
this.handleQuesInfo(this.curType.examQuestions[this.curQuesIndex])
this.calcDifficult()
},
@ -814,46 +810,39 @@ export default {
},
//
hasRepeatQues (list) {
const result = []
list.forEach(e => {
list.forEach(n => {
if (e.questionVersionId !== n.questionVersionId && !e.repeat) {
// ++
let diff = 0
// ++/+
if (e.questionType !== 'fill_blank' && e.questionType !== 'essay') {
//
const opts = e.questionAnswerVersionsList
if (opts) {
let diff = 0
for (const j in opts) {
// debugger
if (!n.questionAnswerVersionsList || !n.questionAnswerVersionsList[j] || n.questionAnswerVersionsList[j].optionText !== opts[j].optionText) {
diff = 1
break
}
}
if (e.questionType === n.questionType && e.stem === n.stem && !diff) {
e.repeat = true
n.repeat = true
}
}
} else {
// /+
if (e.questionType === n.questionType && e.stem === n.stem) {
}
if (e.questionType === n.questionType && e.stem === n.stem && !diff) {
const i = result.findIndex(m => m.questionVersionId === e.questionVersionId || m.questionVersionId === n.questionVersionId)
if (!e.repeat) {
i === -1 ? result.push(e) : result.splice(i, 0, e)
e.repeat = true
}
if (!n.repeat) {
i === -1 ? result.push(n) : result.splice(i, 0, n)
n.repeat = true
}
}
}
})
})
const result = list.filter(e => e.repeat)
//
if (result.length) {
this.repeatVisible = true
this.repeatQues = result
return true
}
return false
return result
},
//
submit (status) {
@ -889,6 +878,7 @@ export default {
async validForm (status) {
if (this.submiting) return false
const { isCopy, overview } = this //
const { getUuid } = Util
const form = _.cloneDeep(this.form)
const paper = form.paperOutline
const allQues = []
@ -897,6 +887,8 @@ export default {
if (status) {
if (isNaN(form.suggestTime) || form.suggestTime < 1 || form.suggestTime % 1) return Util.warningMsg('估计用时请输入正整数')
let invalid = 0
loop1:
for (const i in paper) {
const e = paper[i]
const chineseNum = this.arabicToChinese(+i + 1)
@ -931,14 +923,21 @@ export default {
//
if (e.questionType === 'fill_blank') {
let totalScore = 0
e.examQuestions.map(n => {
for (const j in e.examQuestions) {
const n = e.examQuestions[j]
const { fillScores } = n
if (fillScores) {
for (const e of fillScores) {
if (e.val === '' || e.val === undefined || e.val === null) {
Util.warningMsg(`${chineseNum}大题的第${this.arabicToChinese(+j + 1)}小题填空分数未填写完成,请重新修改`)
invalid = 1
break loop1
}
totalScore = Decimal(totalScore).add(e.val || 0).toNumber()
}
}
})
}
if (+e.targetScore !== totalScore) {
Util.warningMsg(`${chineseNum}大题的小题总分跟目标分值不一致,请重新修改`)
@ -959,6 +958,7 @@ export default {
break
}
e.examQuestions.map((n, j) => {
e.uuid = getUuid()
n.outlineName = e.outlineName
n.paperIndex = i
n.quesIndex = j
@ -1014,7 +1014,15 @@ export default {
if (isCopy) form.paperId = ''
this.tempForm = form
if (this.hasRepeatQues(allQues)) return false
//
const repeats = this.hasRepeatQues(allQues)
if (repeats.length) {
this.repeatVisible = true
this.repeatQues = repeats
return false
}
this.saveTestPaper()
},
//
@ -1024,7 +1032,35 @@ export default {
//
back () {
this.$router.back()
}
},
//
drag () {
const el = document.querySelector('#layer')
if (el) {
const drag = e => {
e.stopPropagation && e.stopPropagation()
e.preventDefault && e.preventDefault()
e.cancelBubble = true
e.returnValue = false
let x = e.clientX - el.offsetLeft
let y = e.clientY - el.offsetTop
let left = 0
let top = 0
document.onmousemove = function (eve) {
left = eve.clientX - x
top = eve.clientY - y
el.style.left = left + 'px'
el.style.top = top + 'px'
}
document.onmouseup = e => {
document.onmousemove = null
document.onmouseup = null
}
}
el.onmousedown = drag
}
},
}
};
</script>
@ -1270,6 +1306,7 @@ export default {
background-color: #fff;
box-shadow: 0 0 7px rgba(235, 235, 235, .8);
overflow: auto;
cursor: move;
.table {
text-align: center;

@ -3,7 +3,7 @@
:show-close="false" custom-class="ques-dia" @closed="closeDia">
<div class="wrap p-20">
<el-alert title="以下试题在试卷中疑似出现重复,是否要继续发布!" type="warning" effect="dark" :closable="false" />
<el-table class="m-t-10" :data="data" stripe header-align="center" row-key="id">
<el-table class="m-t-10" :data="data" stripe header-align="center" row-key="uuid">
<el-table-column prop="outlineName" label="大题名称" align="center" width="90"></el-table-column>
<el-table-column prop="serialNumber" label="题号" align="center" width="60"></el-table-column>
<el-table-column prop="stem" label="题干" align="center" min-width="120">
@ -65,7 +65,11 @@ export default {
closeOnClickModal: false,
})
this.$parent.delQues(this.$parent.form.paperOutline[row.paperIndex], row.quesIndex, 1)
this.data.splice(i, 1)
const { data } = this
data.splice(i, 1)
data.map(e => e.repeat = false)
this.data = this.$parent.hasRepeatQues(data)
} catch (e) { }
},
//
@ -76,10 +80,10 @@ export default {
},
//
async check () {
const { list } = this
const { data } = this
this.$parent.form.paperOutline.map(e => {
e.examQuestions.map(n => {
if (list.find(m => m.questionVersionId === n.questionVersionId)) this.$set(n, 'repeat', true)
this.$set(n, 'repeat', !!data.find(m => m.questionVersionId === n.questionVersionId))
})
})
this.$parent.submiting = false

@ -78,7 +78,7 @@
<el-dialog :title="isCopy ? '复制试卷库' : !form.libraryId ? '创建试卷库' : '编辑试卷库'" :visible.sync="quesBankVisible"
width="400px" :close-on-click-modal="false">
<p v-if="isCopy" style="margin: -10px 0 20px;font-size: 12px;color: #f00;">您将复制当前试卷库中的所有题目到新试卷库请输入新试卷库名称</p>
<p v-if="isCopy" style="margin: -10px 0 20px;font-size: 12px;color: #f00;">您将复制当前试卷库中的所有试卷到新试卷库请输入新试卷库名称</p>
<el-form :model="form" :rules="rules" label-width="100px">
<el-form-item prop="userName" label="分类">
<el-cascader placeholder="请选择试卷库分类" v-model="libraryClassificationId" :options="enableTypes"
@ -333,7 +333,11 @@ export default {
// form.systemId = this.systemId
form.createSource = 1
try {
await this.$post(this.api[this.isCopy ? 'copyQuestionBank' : form.libraryId ? 'paperLibraryUpdate' : 'paperLibrarySave'], form)
if (this.isCopy) {
form.copyLibraryId = form.libraryId
form.libraryId = ''
}
await this.$post(this.api[this.isCopy ? 'copyExamPaperLibrary' : form.libraryId ? 'paperLibraryUpdate' : 'paperLibrarySave'], form)
Util.successMsg(this.isCopy ? '复制成功' : '保存成功')
this.quesBankVisible = false
this.submiting = false

@ -204,9 +204,8 @@ export default {
await this.$post(this.api[form.libraryClassificationId ? 'libraryClassificationUpdate' : 'libraryClassificationSave'], form)
Util.successMsg('保存成功')
this.typeVisible = false
this.submiting = false
this.getData()
} catch (e) {
} finally {
this.submiting = false
}
},

@ -382,13 +382,8 @@
.el-switch__label span {
font-size: 12px;
}
.el-tooltip__popper[x-placement^="top"] {
.popper__arrow {
border-top-color: #fff;
&:after {
border-top-color: #fff;
}
}
.el-tooltip__popper {
max-width: 100%;
}
.tox-notifications-container {
display: none;

Loading…
Cancel
Save