【修改】换题界面搜索试题关键字改为试题内容
【新增】出题界面排序,修改图标
This commit is contained in:
@@ -244,7 +244,7 @@
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="60" />
|
||||
<el-table-column prop="scoreRate" label="权值" width="90" />
|
||||
<el-table-column prop="content" label="文件/文件夹名(带后缀)" width="260" />
|
||||
<el-table-column prop="content" label="文件/文件夹名(带后缀)" width="180" />
|
||||
<el-table-column prop="contentIn" label="考察类型" width="300" />
|
||||
</el-table>
|
||||
</div>
|
||||
@@ -266,9 +266,9 @@
|
||||
row-key="answerId"
|
||||
:default-expand-all="false"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="60" />
|
||||
<el-table-column type="index" label="序号" />
|
||||
|
||||
<el-table-column label="文件/文件夹名(带后缀)" width="260">
|
||||
<el-table-column label="文件/文件夹名(带后缀)" >
|
||||
<template #default="scope">
|
||||
<el-input
|
||||
v-model="scope.row.content"
|
||||
@@ -279,7 +279,7 @@
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="权值" width="100">
|
||||
<el-table-column label="权值" >
|
||||
<template #default="scope">
|
||||
<el-input
|
||||
v-model="scope.row.scoreRate"
|
||||
@@ -289,7 +289,7 @@
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="考察类型" width="300">
|
||||
<el-table-column label="考察类型" >
|
||||
<template #default="scope">
|
||||
<el-select
|
||||
v-model="scope.row.contentIn"
|
||||
@@ -303,40 +303,50 @@
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="100">
|
||||
<template #default="scope">
|
||||
<el-table-column label="操作" width="160">
|
||||
<template #default="{ $index }">
|
||||
<el-button
|
||||
:icon="ArrowUp"
|
||||
circle
|
||||
size="small"
|
||||
@click="moveUp($index)"
|
||||
title="上移"
|
||||
/>
|
||||
<el-button
|
||||
:icon="ArrowDown"
|
||||
circle
|
||||
size="small"
|
||||
@click="moveDown($index)"
|
||||
title="下移"
|
||||
/>
|
||||
<el-button
|
||||
:icon="Delete"
|
||||
circle
|
||||
type="danger"
|
||||
size="small"
|
||||
@click="removeKaodian(scope.$index)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
@click="removeKaodian($index)"
|
||||
title="删除"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
<!-- 增加按钮 -->
|
||||
<div style="margin-top: 12px; text-align: center;">
|
||||
<el-button type="primary" @click="setKaodianRow">
|
||||
导入考点
|
||||
</el-button>
|
||||
<el-button type="primary" @click="addKaodianRow">
|
||||
添加考点
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- 增加按钮 -->
|
||||
<div style="margin-top: 12px; text-align: center;">
|
||||
<el-button type="primary" @click="setKaodianRow">
|
||||
导入考点
|
||||
</el-button>
|
||||
<el-button type="primary" @click="addKaodianRow">
|
||||
添加考点
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<template #footer>
|
||||
|
||||
|
||||
<el-button @click="kaoDialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="confirmKao">确定</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<el-button @click="kaoDialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="confirmKao">确定</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
|
||||
@@ -459,6 +469,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
|
||||
import { FormRules } from 'element-plus'
|
||||
import { ArrowUp, ArrowDown, Delete } from '@element-plus/icons-vue'
|
||||
import * as QuestionApi from '@/api/paper/question'
|
||||
import FileForm from './components/FileForm.vue';
|
||||
import { defaultProps, handleTree } from '@/utils/tree'
|
||||
@@ -662,7 +673,29 @@ function addKaodianRow() {
|
||||
function removeKaodian(index: number) {
|
||||
kaodiaRefList.value.splice(index, 1)
|
||||
}
|
||||
// 上移
|
||||
function moveUp(index) {
|
||||
if (index === 0) return;
|
||||
const temp = this.kaodiaRefList[index];
|
||||
this.kaodiaRefList.splice(index, 1);
|
||||
this.kaodiaRefList.splice(index - 1, 0, temp);
|
||||
this.updateSort();
|
||||
}
|
||||
|
||||
// 下移
|
||||
function moveDown(index) {
|
||||
if (index === this.kaodiaRefList.length - 1) return;
|
||||
const temp = this.kaodiaRefList[index];
|
||||
this.kaodiaRefList.splice(index, 1);
|
||||
this.kaodiaRefList.splice(index + 1, 0, temp);
|
||||
this.updateSort();
|
||||
}
|
||||
// 重新赋值 sort 字段(保持顺序)
|
||||
function updateSort() {
|
||||
this.kaodiaRefList.forEach((item, index) => {
|
||||
item.sort = index + 1;
|
||||
});
|
||||
}
|
||||
const setKaodianRow =async () => {
|
||||
const uploads = formData.value.fileUploads;
|
||||
|
||||
|
Reference in New Issue
Block a user