Commit d9074ba6 authored by 黄奎's avatar 黄奎

冲突修改

parents b67d9667 64b29bb3
...@@ -107,7 +107,7 @@ ...@@ -107,7 +107,7 @@
deleteQuestion, deleteQuestion,
queryDifficultyType, queryDifficultyType,
queryQuestionCategory, queryQuestionCategory,
UpdateQuestionSort setQuestionSort
} from '../../api/question/question'; } from '../../api/question/question';
import questionForm from '../question/question-form'; import questionForm from '../question/question-form';
import questionUpload from '../question/question-upload'; import questionUpload from '../question/question-upload';
...@@ -322,7 +322,6 @@ ...@@ -322,7 +322,6 @@
}, },
//上移 //上移
getUpStatus(item,num){ getUpStatus(item,num){
console.log(item,'数据');
var QuestionId = item.QuestionId; var QuestionId = item.QuestionId;
var index = -1; var index = -1;
for(var i=0;i<this.data.length;i++){ for(var i=0;i<this.data.length;i++){
...@@ -337,13 +336,11 @@ ...@@ -337,13 +336,11 @@
if(num==2){ //下移 if(num==2){ //下移
var targetQId = this.data[index+1].QuestionId; var targetQId = this.data[index+1].QuestionId;
} }
console.log(targetQId,'targetQId');
var msg = { var msg = {
curQId:QuestionId, curQId:QuestionId,
targetQId:targetQId targetQId:targetQId
} }
UpdateQuestionSort(msg).then(res => { setQuestionSort(msg).then(res => {
console.log(res,'数据');
if (res.Code == 1) { if (res.Code == 1) {
this.getQuestionList(); 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> <template>
<div> <div class="page-body">
<questionlist-form></questionlist-form> <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> </div>
</template> </template>
<script> <script>
import questionlistForm from '../../components/question/questionlist-form'; import questionbankForm from '../../components/question/questionbank-form';
export default { export default {
meta: { meta: {
title: "题库列表" title: "题库管理"
}, },
components: { components: {
questionlistForm questionbankForm
}, },
data() { data() {
return { 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() { created() {
}, },
mounted() { mounted() {
}, },
methods: { methods: {
research(){
},
changePage(){
},
//关闭弹窗
closeQuestionBank(){
this.isShowQuestionBankForm=false;
},
//刷新列表
refreshQuestion(){
},
//跳转至questionlist
goQuestionList(){
var tempStr = '../course/question';
this.$router.push({
path: tempStr
});
}
} }
} }
</script> </script>
\ No newline at end of file <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