yujialong 3 months ago
parent 2a049f380e
commit 05840159d0
  1. 3
      src/components/ueditorPlus/index.vue
  2. 20
      src/pages/ques/detail/index.vue
  3. 27
      src/pages/ques/list/index.vue
  4. 68
      src/pages/testPaper/detail/auto.vue
  5. 17
      src/pages/testPaper/detail/index.vue
  6. 368
      src/pages/testPaper/detail/manual.vue
  7. 2
      src/pages/testPaperLibrary/index.vue
  8. 1
      src/router/permission.js
  9. 2
      src/setting.js

@ -48,11 +48,12 @@ export default {
},
methods: {
initEditor () {
const host = Setting.isPro ? location.origin : `http://121.37.12.51`
this.$nextTick(() => {
// eslint-disable-next-line no-undef
this.instance = UE.getEditor(this.randomId, {
UEDITOR_HOME_URL: Setting.isDev ? '/static/ueditorPlus/' : '/examination/static/ueditorPlus/',
serverUrl: "http://121.37.12.51/exam/exam/upload/configAndUpload",
serverUrl: host + `/exam/exam/upload/configAndUpload`,
plugins: 'gapfilling',
...this.config
})

@ -22,7 +22,7 @@
<el-form-item prop="knowledgePointIds" label="所属知识点">
<el-cascader placeholder="请选择所属知识点" v-model="form.knowledgePointIds" :options="knowledges"
:props="{ value: 'id', label: 'name', multiple: true, checkStrictly: true }" :show-all-levels="false"
clearable></el-cascader>
filterable clearable></el-cascader>
</el-form-item>
</div>
<div class="item-line">
@ -155,10 +155,8 @@
<el-button v-if="detailType === 1" type="primary" :loading="submiting && keep === 0"
@click="submit(1)">保存</el-button>
<template v-else>
<el-button type="primary" :loading="submiting && keep === 0" @click="submit(0)">{{ questionId ? '仅更新此题' :
'保存'
}}</el-button>
<el-button type="primary" :loading="submiting && keep === 1" @click="submit(1)">{{ questionId ? '同步更新相似题'
<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>
</template>
@ -166,7 +164,8 @@
</div>
<el-dialog title="提示" :visible.sync="repeatVisible" width="800px" :close-on-click-modal="false">
<el-alert title="与当前题库中已有的试题重复(如下),是否继续保存?" type="warning" effect="dark" :closable="false" />
<el-alert title="您确定要保存对本题所做的更改吗?更新后,所有关联的试卷将会自动更新" type="warning" effect="dark" :closable="false" />
<p class="m-t-10 m-b-10 fs-12">系统已经识别出题库中有与本题相似的其他题目如果您选择同步更新这些相似题目那么所有关联的试卷将会自动更新</p>
<el-table class="m-t-10" :data="repeats" stripe header-align="center" row-key="id">
<el-table-column type="index" width="60" label="序号" align="center"></el-table-column>
<el-table-column prop="name" label="题型" align="center" min-width="120">
@ -299,12 +298,15 @@ export default {
},
},
mounted () {
const { query } = this.$route
this.crumbs = [
{
name: '试题管理',
route: 'list',
query: {
id: this.questionBankId
questionBankId: query.questionBankId,
questionBankName: query.questionBankName,
questionBankCategory: query.questionBankCategory,
}
},
{
@ -636,7 +638,7 @@ export default {
} else {
//
try {
await this.$confirm(`<p style="margin-bottom: 10px;">确认仅更新此题吗?</p>${this.detailType === 4 ? '' : '<p>更新后,相关试卷自动同步</p>'}`, '提示', {
await this.$confirm(`<p style="margin-bottom: 10px;">您确定要保存对本题所做的更改吗?</p>${this.detailType === 4 ? '' : '<p>保存后,所有关联的试卷将会自动更新</p>'}`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
@ -669,7 +671,7 @@ export default {
type === 4 && this.$emit('updateQues', this.tempForm, res.questionVersionId)
Util.successMsg('保存成功')
!form.questionId && this.keep ? this.init() : this.back()
!form.questionId && this.keep ? '' : this.back()
this.repeatVisible = false
} finally {
this.submiting = false

@ -127,7 +127,7 @@
<el-button type="text" :disabled="!isKnowLedge" @click="remove(scope.row)">移除</el-button>
<el-button type="text" @click="del([scope.row])">删除</el-button>
<el-switch v-model="scope.row.status" :active-value="1" :inactive-value="0" style="margin: 0 10px 0 5px"
:active-text="scope.row.status ? '开' : '关'"
:active-text="scope.row.status ? '启用' : '禁用'"
@change="switchOff($event, scope.row, scope.$index)"></el-switch>
</template>
</el-table-column>
@ -247,7 +247,7 @@ export default {
givenYearSort: '',
difficultySort: '',
correctRateSort: '',
updateTimeSort: 'desc',
updateTimeSort: '',
referenceCountSort: '',
},
list: [],
@ -324,7 +324,10 @@ export default {
},
//
toSet () {
this.$router.push(`/knowledge?questionBankId=${this.questionBankId}&questionBankName=${this.questionBankName}`)
this.$router.push({
path: '/knowledge',
query: this.$route.query
})
},
//
typeChange () {
@ -419,11 +422,25 @@ export default {
//
add () {
const knowledgeCheck = this.$refs.typeTree.getCurrentNode()
this.$router.push(`detail?questionBankId=${this.questionBankId}&questionBankName=${this.questionBankName}&questionBankCategory=${this.questionBankCategory}&path=${knowledgeCheck && knowledgeCheck.type ? knowledgeCheck.path : ''}`)
this.$router.push({
path: 'detail',
query: {
...this.$route.query,
path: knowledgeCheck && knowledgeCheck.type ? knowledgeCheck.path : ''
}
})
},
// / type: 123
toDetail (row, type) {
this.$router.push(`detail?questionId=${row.questionId}&version=${row.version}&questionBankId=${this.questionBankId}&questionBankName=${this.questionBankName}&questionBankCategory=${this.questionBankCategory}&detailType=${type}`)
this.$router.push({
path: 'detail',
query: {
...this.$route.query,
questionId: row.questionId,
version: row.version,
detailType: type
}
})
},
//
async remove (row) {

@ -63,7 +63,7 @@
<label>题库分类</label>
<el-cascader style="width: 240px;" placeholder="请选择题库分类" v-model="quesBankTypeVal"
:options="quesBankTypes" :props="{ value: 'id', label: 'name', checkStrictly: true }" clearable
@change="getQuesBank"></el-cascader>
@change="initQuesBank"></el-cascader>
</li>
<li>
<el-input placeholder="请输入题库名称" prefix-icon="el-icon-search" v-model="quesBankKeyword" clearable />
@ -76,9 +76,9 @@
<span>题库名称</span>
</div>
<div class="lines">
<div v-for="(item, i) in quesBanks" :key="i"
:class="['line able-check', { active: curQuesBank.id === item.id }]" @click="questionBankClick(item)">
<div class="able-check">
<div v-for="(item, i) in quesBanks" :key="i" :class="['line', { active: curQuesBank.id === item.id }]"
@click="questionBankClick(item)">
<span class="serial first">{{ i + 1 }}</span>
<p class="stem" :title="item.questionBankName">{{ item.questionBankName }}</p>
</div>
@ -142,16 +142,18 @@
</p>
</div>
<div v-for="(item, i) in checked" :key="i" class="j-between m-b-10">
<div class="flex a-center">
题库{{ item.quesBank.questionBankName }}
<i class="el-icon-delete action-icon m-l-10" @click="delQuesBank(i)"></i>
</div>
<div class="knowledges">
<el-tag v-for="(tag, j) in item.knowledges" :key="tag.name" class="m-r-8 m-b-8" closable
@close="delKnowledge(i, j, item, tag)">{{ tag.name }}</el-tag>
<template v-for="(item, i) in checked">
<div :key="i" class="j-between m-b-10">
<div class="flex a-center">
题库{{ item.quesBank.questionBankName }}
<i class="el-icon-delete action-icon m-l-10" @click="delQuesBank(i)"></i>
</div>
<div class="knowledges">
<el-tag v-for="(tag, j) in item.knowledges" :key="tag.name" class="m-r-8 m-b-8" closable
@close="delKnowledge(i, j, item, tag)">{{ tag.name }}</el-tag>
</div>
</div>
</div>
</template>
</div>
</div>
@ -194,7 +196,6 @@ export default {
quesBankTypes: [],
quesBankKeyword: '',
quesAllCheck: false,
quesBanks: [],
pageQuesBank: 1,
pageSizeQuesBank: 10,
@ -209,6 +210,7 @@ export default {
pageSizeKn: 10,
totalKn: 0,
checkedKeyword: '',
checked: [],
list: [],
years: ['暂无年份', '2024', '2023', '2022', '2021', '2020', '2019', '2018', '2017', '2016', '更早'],
@ -229,7 +231,7 @@ export default {
watch: {
'quesBankKeyword': function (val) {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(this.getQuesBank, 500)
this.searchTimer = setTimeout(this.initQuesBank, 500)
},
'knowledgeKeyword': function (val) {
clearTimeout(this.searchTimer)
@ -249,7 +251,7 @@ export default {
this.yearCheck = this.years
this.handleQuesList()
this.getQuesBankType()
this.getQuesBank()
this.initQuesBank()
this.difficult = this.$parent.form.difficult
this.difficult && this.difficultChange(this.difficult)
},
@ -279,6 +281,11 @@ export default {
this.totalQuesBank = res.message.total
} catch (e) { }
},
initQuesBank () {
this.curQuesBank = {}
this.pageQuesBank = 1
this.getQuesBank()
},
//
currentChangeQuesBank (val) {
this.pageQuesBank = val
@ -316,16 +323,19 @@ export default {
//
async getKnowledge () {
try {
const type = this.knowledgeTypeVal
const res = await this.$post(this.api.knowledgeHierarchyList, {
pageNum: this.pageKn,
pageSize: this.pageSizeKn,
questionBankId: this.curQuesBank.id,
knowledgePointCategoryId: type.length ? type[type.length - 1] : '',
name: this.knowledgeKeyword,
})
this.knowledges = res.message.records
this.totalKn = res.message.total
const { id } = this.curQuesBank
if (id) {
const type = this.knowledgeTypeVal
const res = await this.$post(this.api.knowledgeHierarchyList, {
pageNum: this.pageKn,
pageSize: this.pageSizeKn,
questionBankId: id,
knowledgePointCategoryId: type.length ? type[type.length - 1] : '',
name: this.knowledgeKeyword,
})
this.knowledges = res.message.records
this.totalKn = res.message.total
}
} catch (e) { }
},
//
@ -617,13 +627,15 @@ export default {
margin-top: 10px;
}
.line {
display: flex;
padding: 5px 0;
color: #333;
&.able-check {
}
.able-check {
.line {
cursor: pointer;
&:hover {

@ -165,7 +165,8 @@
<div class="actions">
<div class="sort">
<span>排序</span>
<el-input class="l-input sort-input" v-model="ques.serialNumber" />
<el-input class="l-input sort-input" v-model="ques.serialNumber"
@change="sortChange(item, ques)" />
</div>
<el-button type="text" @click="toQues(item, j, ques)">编辑试题</el-button>
<el-button type="text" @click="showManualDia(item, j, ques)">更换试题</el-button>
@ -370,7 +371,8 @@ export default {
const paper = r.paperOutline
paper.map(e => {
e.shrink = false
e.examQuestions.map(n => {
e.examQuestions.map((n, j) => {
n.originSort = j + 1
Object.assign(n, n.question)
})
@ -638,6 +640,17 @@ export default {
this.$set(e, 'serialNumber', i + 1)
})
},
//
sortChange (item, ques) {
item.examQuestions.sort((a, b) => {
if (a.serialNumber == b.serialNumber && (a.questionVersionId === ques.questionVersionId || b.questionVersionId === ques.questionVersionId)) return b.originSort - a.originSort
return a.serialNumber - b.serialNumber
})
item.examQuestions.map((e, i) => {
e.originSort = i + 1
e.serialNumber = i + 1
})
},
//
async delQues (item, i) {
try {

@ -6,33 +6,63 @@
<!-- 题库 -->
<div class="item">
<p class="total m-b-10">题库</p>
<el-input class="m-b-10" placeholder="请输入题库分类/题库名称" prefix-icon="el-icon-search" v-model="quesBankKeyword"
clearable />
<el-tree :key="key" node-key="id" default-expand-all ref="quesBank" :data="quesBanks"
:props="{ label: 'name' }" @node-click="getKnowledge" @check-change="quesBankCheck"></el-tree>
</div>
<!-- 知识点 -->
<div class="item">
<p class="total m-b-10">知识点框架</p>
<el-input class="m-b-10" placeholder="请输入知识点分类/知识点名称" prefix-icon="el-icon-search" v-model="knowledgeKeyword"
clearable />
<el-tree :data="knowledges" default-expand-all ref="knowledge" node-key="id" highlight-current
:expand-on-click-node="false" @node-click="getQues" @check-change="knowledgeCheck"
:props="{ label: 'name' }">
<span class="custom-tree-node" slot-scope="{ node, data }">
<img v-if="data.type" class="m-r-5" src="@/assets/images/knowledge.svg" alt="">
<span class="org-name">{{ data.name }}</span>
</span>
</el-tree>
<ul class="filter">
<li class="m-b-10">
<label>题库分类</label>
<el-cascader style="width: 240px;" placeholder="请选择题库分类" v-model="quesBankTypeVal"
:options="quesBankTypes" :props="{ value: 'id', label: 'name', checkStrictly: true }" clearable
@change="initQuesBank"></el-cascader>
</li>
<li>
<el-input placeholder="请输入题库名称" prefix-icon="el-icon-search" v-model="quesBankKeyword" clearable />
</li>
</ul>
<template v-if="quesBanks.length">
<div class="line">
<span class="serial">序号</span>
<span>题库名称</span>
</div>
<div class="able-check">
<div v-for="(item, i) in quesBanks" :key="i" :class="['line', { active: curQuesBank.id === item.id }]"
@click="questionBankClick(item)">
<span class="serial">{{ i + 1 }}</span>
<p class="quesBank" :title="item.questionBankName">{{ item.questionBankName }}</p>
</div>
</div>
<div class="pagination">
<el-pagination background @current-change="currentChangeQuesBank" small :current-page="pageQuesBank"
layout="total, prev, pager, next" :total="totalQuesBank"></el-pagination>
</div>
</template>
<div v-else class="empty">
<img class="icon" src="@/assets/images/empty.svg" alt="">
<p>暂无数据</p>
</div>
</div>
<!-- 题目 -->
<div class="item">
<p class="total">{{ questionTypeName }}{{ ques.length }}道题</p>
<div class="ques">
<p class="total m-b-10">{{ questionTypeName }}{{ ques.length }}道题</p>
<ul class="filter">
<li class="m-b-10">
<label>知识点</label>
<el-cascader style="width: 240px;" placeholder="请选择知识点" v-model="knowledgeVal" :options="knowledges"
:props="{ value: 'id', label: 'name', multiple: true }" clearable @change="getQues"></el-cascader>
</li>
<li>
<el-input placeholder="请输入题干" prefix-icon="el-icon-search" v-model="knowledgeKeyword" clearable />
</li>
</ul>
<template v-if="ques.length">
<div class="line">
<el-checkbox v-model="quesAllCheck" @change="quesAllCheckChange"></el-checkbox>
<span class="serial">序号</span>
<span>题干</span>
<span class="stem">题干</span>
<span class="kl">知识点</span>
</div>
<div v-for="(item, i) in ques" :key="i" class="line">
@ -40,9 +70,16 @@
@change="val => quesChange(val, item)"></el-checkbox>
<span class="serial">{{ i + 1 }}</span>
<el-tooltip effect="dark" :content="item.stemText" placement="top-start">
<p class="stem" :title="item.stemText">{{ item.stemText }}</p>
<p class="stem">{{ item.stemText }}</p>
</el-tooltip>
<el-tooltip effect="dark" :content="item.knowledgePointName" placement="top-start">
<p class="kl">{{ item.knowledgePointName }}</p>
</el-tooltip>
</div>
</template>
<div v-else class="empty">
<img class="icon" src="@/assets/images/empty.svg" alt="">
<p>暂无数据</p>
</div>
</div>
<!-- 已选试题 -->
@ -57,30 +94,47 @@
<p v-else class="total">已选试题{{ checkedLen }}道题</p>
<el-button type="text" @click="batchDelChecked">批量移除</el-button>
</div>
<div class="ques">
<div class="line">
<el-checkbox v-model="checkedAllCheck" @change="checkedAllCheckChange"></el-checkbox>
<span class="serial">序号</span>
<span>题干</span>
</div>
<div v-for="(item, i) in checked" :key="i" class="line j-between">
<div class="check-left">
<el-checkbox v-model="item.check"></el-checkbox>
<span class="serial">{{ i + 1 }}</span>
<el-tooltip effect="dark" :content="item.stemText" placement="top-start">
<p class="checked-stem" :title="item.stemText">{{ item.stemText }}</p>
</el-tooltip>
<el-input class="m-t-10 m-b-10" placeholder="请输入题干/知识点" prefix-icon="el-icon-search" v-model="checkedKeyword"
clearable />
<template v-if="checked.length">
<div class="ques">
<div class="line">
<el-checkbox v-model="checkedAllCheck" @change="checkedAllCheckChange"></el-checkbox>
<span class="serial">序号</span>
<span class="stem">题干</span>
<span class="kl">知识点</span>
</div>
<i class="el-icon-delete action-icon" @click="delChecked(item)"></i>
<template v-for="(item, i) in checked">
<div v-if="item.stemText.includes(checkedKeyword) || item.knowledgePointName.includes(checkedKeyword)"
:key="i" class="line j-between">
<div class="check-left">
<el-checkbox v-model="item.check"></el-checkbox>
<span class="serial">{{ i + 1 }}</span>
<el-tooltip effect="dark" :content="item.stemText" placement="top-start">
<p class="checked-stem">{{ item.stemText }}</p>
</el-tooltip>
<el-tooltip effect="dark" :content="item.knowledgePointName" placement="top-start">
<p class="kl checked-kl">{{ item.knowledgePointName }}</p>
</el-tooltip>
</div>
<i class="el-icon-delete action-icon" @click="delChecked(item)"></i>
</div>
</template>
</div>
</template>
<div v-else class="empty">
<img class="icon" src="@/assets/images/empty.svg" alt="">
<p>暂无数据</p>
</div>
</div>
</div>
<div class="flex j-between p-l-10 p-r-10">
<div class="flex j-between p-l-20 p-r-20">
<p>未找到试题<a class="link" @click="toAddQues">去新增</a></p>
<p>已选题数/目标题数{{ checkedLen }}/{{ $parent.curType.questionNum }}&emsp;&emsp;
<!-- <a class="link" @click="toEditQues">修改目标</a> -->
<p>已选题数/目标题数{{ checkedLen }}/{{ $parent.curType.questionNum }}
<!-- &emsp;&emsp;<a class="link" @click="toEditQues">修改目标</a> -->
</p>
</div>
@ -101,17 +155,26 @@ export default {
data () {
return {
selectQuesVisible: false,
searchTimer: null,
quesBankKeyword: '',
curQuesBank: {},
quesBankTypeVal: [],
quesBankTypes: [],
quesBanks: [],
pageQuesBank: 1,
pageSizeQuesBank: 10,
totalQuesBank: 0,
knowledgeKeyword: '',
searchTimer: null,
key: 1,
quesBanks: [],
knowledgeVal: [],
knowledges: [],
quesAllCheck: false,
ques: [],
checkedAllCheck: false,
checked: [],
curCheckQues: [],
checkedKeyword: '',
submiting: false,
quesVisible: false,
@ -141,11 +204,11 @@ export default {
watch: {
'quesBankKeyword': function (val) {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(this.getQuesBank, 500)
this.searchTimer = setTimeout(this.initQuesBank, 500)
},
'knowledgeKeyword': function (val) {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(this.getKnowledge, 500)
this.searchTimer = setTimeout(this.getQues, 500)
},
visible () {
this.selectQuesVisible = this.visible
@ -171,69 +234,109 @@ export default {
const parent = this.$parent.curType
this.curCheckQues = parent.examQuestions
this.getQuesBank()
this.getQuesBankType()
this.initQuesBank()
},
//
async getQuesBankType () {
try {
const { data } = await this.$post(this.api.getAllQuestionBankCategories, {
createSource: 1,
status: 1,
})
this.handleList(data)
this.quesBankTypes = data
} catch (e) { }
},
//
async getQuesBank () {
try {
const { list } = await this.$post(this.api.questionBankStructureLevel, {
keyword: this.quesBankKeyword,
createSource: 1,
const type = this.quesBankTypeVal
const res = await this.$post(this.api.questionBankList, {
status: 1,
pageNum: this.pageQuesBank,
pageSize: this.pageSizeQuesBank,
questionCategoryId: type.length ? type[type.length - 1] : '',
name: this.quesBankKeyword
})
this.quesBanks = list
const { records } = res.message
this.quesBanks = records
this.totalQuesBank = res.message.total
records.length && this.questionBankClick(records[0])
} catch (e) { }
},
initQuesBank () {
this.curQuesBank = {}
this.pageQuesBank = 1
this.getQuesBank()
},
//
currentChangeQuesBank (val) {
this.pageQuesBank = val
this.getQuesBank()
},
//
questionBankClick (item) {
this.curQuesBank = item
this.knowledgeCheck = false
this.getKnowledge()
this.getQues()
this.quesAllCheck = false
},
//
handleList (list) {
list.map(e => {
if (e.children && e.children.length) {
this.handleList(e.children)
} else {
delete e.children
}
})
},
//
async getKnowledge () {
try {
const id = this.$refs.quesBank.getCurrentKey()
const { id } = this.curQuesBank
if (id) {
const { data } = await this.$post(this.api.TreeStructure, {
createSource: 1,
questionBankId: id,
keyword: this.knowledgeKeyword,
keyword: '',
})
this.handleList(data)
this.knowledges = data
}
} catch (e) { }
},
//
async getQues () {
let k = this.$refs.knowledge.getCurrentNode() //
// debugger
//
if (k && k.type) {
const { id } = this.curQuesBank
let k = this.knowledgeVal //
k = k.map(e => {
return e[e.length - 1]
})
if (id) {
const { list } = await this.$post(this.api.findAllByQuestionBank, {
status: 1,
questionBankId: this.$refs.quesBank.getCurrentKey(),
knowledgePointIds: [k.id],
questionBankIds: [id],
knowledgePointIds: k,
questionTypes: this.questionType ? [this.questionType] : [],
keyword: this.knowledgeKeyword,
})
const data = list
const checked = this.curCheckQues
const { curCheckQues, checked } = this
data.map(e => {
const el = document.createElement('div')
el.innerHTML = e.stem
e.stemText = el.innerText
e.check = !!this.checked.find(n => n.questionVersionId === e.questionVersionId)
e.disabled = !!checked.find(n => n.questionVersionId === e.questionVersionId)
const quesChecked = !!curCheckQues.find(n => n.questionVersionId === e.questionVersionId)
e.disabled = quesChecked
e.check = !!checked.find(n => n.questionVersionId === e.questionVersionId) || quesChecked
})
this.ques = data
}
},
//
quesBankCheck (data, checked) {
// debugger
if (checked) {
// this.$refs.quesBank.setCurrentKey(data.id)
this.getKnowledge()
}
this.$refs.knowledge.setCheckedNodes(checked ? this.knowledges : [])
},
//
knowledgeClick (data) {
},
//
knowledgeCheck () {
@ -242,8 +345,10 @@ export default {
//
quesAllCheckChange (val) {
this.ques.map(e => {
e.check = val
this.quesChange(val, e)
if (!e.disabled) {
e.check = val
this.quesChange(val, e)
}
})
},
//
@ -270,7 +375,7 @@ export default {
try {
const checked = this.checked.filter(e => e.check)
if (checked.length) {
await this.$confirm(`确认要除吗?`, '提示', {
await this.$confirm(`确认要除吗?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
@ -293,12 +398,12 @@ export default {
//
async delChecked (item) {
try {
// await this.$confirm(``, '', {
// confirmButtonText: '',
// cancelButtonText: '',
// type: 'warning',
// closeOnClickModal: false,
// })
await this.$confirm(`确认要移除吗?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
closeOnClickModal: false,
})
const cur = this.ques.find(e => e.questionVersionId === item.questionVersionId)
if (cur) cur.check = false
this.checked.splice(this.checked.findIndex(e => e.questionVersionId === item.questionVersionId), 1)
@ -377,16 +482,28 @@ export default {
margin-bottom: 10px;
border: 1px solid #eee;
.filter {
margin-bottom: 15px;
li {
display: flex;
align-items: center;
}
label {
margin-right: 10px;
font-size: 14px;
color: #333;
white-space: nowrap;
}
}
.item {
width: 25%;
max-height: calc(100vh - 190px);
width: 38%;
height: calc(100vh - 173px);
padding: 15px;
border-right: 1px solid #eee;
overflow: auto;
&:last-child {
border-right: 0;
}
}
.total {
@ -394,40 +511,69 @@ export default {
color: #333;
}
.ques {
margin-top: 10px;
.line {
display: flex;
padding: 5px 0;
color: #333;
}
.able-check {
.line {
display: flex;
margin: 8px 0;
}
cursor: pointer;
.serial {
width: 32px;
margin: 0 12px;
text-align: center;
white-space: nowrap;
}
&:hover {
background-color: #f5f5f5;
}
.stem {
max-width: calc(100% - 71px);
@include ellipsis;
&.active {
background-color: #e5e5e5;
}
}
}
.checked-stem {
max-width: 165px;
@include ellipsis;
}
.serial {
width: 32px;
margin: 0 12px;
text-align: center;
white-space: nowrap;
}
.check-left {
display: inline-flex;
align-items: center;
}
.quesBank {
width: calc(100% - 71px);
@include ellipsis;
}
.action-icon {
font-size: 14px;
.stem {
width: calc(100% - 210px);
margin-right: 20px;
@include ellipsis;
}
.kl {
width: 120px;
@include ellipsis;
&.checked-kl {
width: 90px;
margin-right: 10px;
}
}
.checked-stem {
max-width: 165px;
margin-right: 20px;
@include ellipsis;
}
.check-left {
display: inline-flex;
align-items: center;
}
.action-icon {
font-size: 14px;
}
}
.link {

@ -58,7 +58,7 @@
<el-table-column prop="examPaperNum" label="试卷数量" align="center" width="100"
sortable="custom"></el-table-column>
<el-table-column prop="createTime" label="创建时间" align="center" width="160" sortable="custom"></el-table-column>
<el-table-column prop="createUserName" label="创建人" align="center" width="100"></el-table-column>
<el-table-column prop="createUser" label="创建人" align="center" width="100"></el-table-column>
<el-table-column label="操作" align="center" width="280">
<template slot-scope="scope">
<el-button type="text" @click="toTestPaper(scope.row)">试卷管理</el-button>

@ -4,5 +4,6 @@ import util from '@/libs/util'
router.beforeEach((to, from, next) => {
document.title = Setting.titleSuffix
localStorage.setItem('examPath', to.fullPath)
next()
});

@ -2,6 +2,7 @@
* 业务配置
* */
const isDev = process.env.NODE_ENV === 'development' // 开发环境
const isPro = location.host.includes('huorantech.cn') //正式服
let host = location.origin
if (isDev) {
host = 'http://192.168.31.51:9000'
@ -22,6 +23,7 @@ const Setting = {
errorModalType: "Message", // 接口请求返回错误时,弹窗的类型,可选值为 Message 或 Notice
tokenExpires: 1296000000, // token在localStorage的时间(毫秒)
isDev,
isPro,
/**
* 路由白名单
* */

Loading…
Cancel
Save