Commit 64b29bb3 authored by zhengke's avatar zhengke

修改

parent 603f8ee3
......@@ -145,13 +145,3 @@ export function queryQuestionCategory() {
})
}
/**
* 题目上移下移
*/
export function UpdateQuestionSort(data) {
return request({
url: '/Question/UpdateQuestionSort',
method: 'post',
})
}
......@@ -107,7 +107,7 @@
deleteQuestion,
queryDifficultyType,
queryQuestionCategory,
UpdateQuestionSort
setQuestionSort
} from '../../api/question/question';
import questionForm from '../question/question-form';
import questionUpload from '../question/question-upload';
......@@ -322,7 +322,6 @@
},
//上移
getUpStatus(item,num){
console.log(item,'数据');
var QuestionId = item.QuestionId;
var index = -1;
for(var i=0;i<this.data.length;i++){
......@@ -337,13 +336,11 @@
if(num==2){ //下移
var targetQId = this.data[index+1].QuestionId;
}
console.log(targetQId,'targetQId');
var msg = {
curQId:QuestionId,
targetQId:targetQId
}
UpdateQuestionSort(msg).then(res => {
console.log(res,'数据');
setQuestionSort(msg).then(res => {
if (res.Code == 1) {
this.getQuestionList();
}
......
<style>
.page-content p {
margin: 0 !important;
}
.quetion_Title {
background: transparent !important;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
width: 400px;
}
</style>
<template>
<div>
<questionlist-form></questionlist-form>
<div class="page-body">
<div class="page-search row items-center">
<div class="col row wrap q-mr-lg q-col-gutter-md">
<div class="col-3">
<q-input @change="research" clearable standout="bg-primary text-white" v-model="msg.Title" label="关键字"
@clear="research" maxlength="20" />
</div>
</div>
</div>
<div class="page-content">
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat class="sticky-column-table"
separator="none" :data="data" :columns="columns" row-key="name">
<template v-slot:top="props">
<div class="col-2 q-table__title">题库列表</div>
<q-space />
<div class="page-option">
<q-btn color="accent" size="sm" class="q-mr-md" icon="add" @click="isShowQuestionBankForm=true" label="创建新题库"/>
</div>
</template>
<template v-slot:body-cell-Title="props">
<td style="width:400px;">
</td>
</template>
<template v-slot:bottom>
<q-pagination class="full-width justify-end" v-model="msg.pageIndex" color="primary" :max="pageCount"
:input="true" @input="changePage" />
</template>
<template v-slot:body-cell-optioned="props">
<q-td :props="props">
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="编辑" />
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" @click="goQuestionList()" label="管理题目" />
<q-btn flat size="xs" icon="edit" color="negative" style="font-weight:400" label="删除" /></q-btn>
</q-td>
</template>
</q-table>
<questionbank-form v-if="isShowQuestionBankForm" @close="closeQuestionBank"
@success="refreshQuestion">
</questionbank-form>
</div>
</div>
</template>
<script>
import questionlistForm from '../../components/question/questionlist-form';
import questionbankForm from '../../components/question/questionbank-form';
export default {
meta: {
title: "题库列表"
title: "题库管理"
},
components: {
questionlistForm
questionbankForm
},
data() {
return {
pageCount:0,
msg:{
pageIndex:1,
Title:''
},
loading: false,
isShowQuestionBankForm:false,
columns: [{
name: 'Number',
label: '序号',
field: 'Number',
align: 'left'
},
{
name: 'CategoryName',
label: '题库名称',
field: 'CategoryName',
align: 'left',
},
{
name: 'classification',
label: '分类',
field: 'classification',
align: 'left',
},
{
name: 'creater',
label: '创建人',
field: 'creater',
align: 'left'
},
{
name: 'topicNumber',
label: '题量',
field: 'topicNumber',
align: 'left'
},
{
name: 'optioned',
label: '操作',
field: 'QuestionId'
}
],
data: [{
Number: '1',
CategoryName: '日语2',
classification: '',
creater: '张三丰',
topicNumber: 12,
sodium: 87,
}],
}
},
created() {
},
mounted() {
},
methods: {
research(){
},
changePage(){
},
//关闭弹窗
closeQuestionBank(){
this.isShowQuestionBankForm=false;
},
//刷新列表
refreshQuestion(){
},
//跳转至questionlist
goQuestionList(){
var tempStr = '../course/question';
this.$router.push({
path: tempStr
});
}
}
}
</script>
\ No newline at end of file
</script>
<style lang="sass">
@import url('~assets/css/table.sass')
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment