Commit eb9de802 authored by 黄奎's avatar 黄奎

页面修改

parent bd006a7f
<style>
.page-content p {
margin: 0 !important;
}
.page-content p {
margin: 0 !important;
}
.quetion_Title {
background: transparent !important;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
width: 400px;
.quetion_Title {
background: transparent !important;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
width: 400px;
}
}
</style>
<template>
<div class="page-body">
......@@ -61,7 +62,7 @@
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" @click="goQuestionList(props.row)"
label="管理题目" />
<q-btn flat size="xs" icon="edit" color="negative" style="font-weight:400"
@click="deleteQuestionBank(props.row)" label="删除" />
@click="deleteQuestionBank(props.row)" label="删除">
</q-btn>
</q-td>
</template>
......@@ -73,167 +74,177 @@
</div>
</template>
<script>
import {
queryQuestionBankPage,
RemoveQuestionBank,
DownLoadBank
} from '../../api/question/question';
import questionbankForm from '../../components/question/questionbank-form';
export default {
meta: {
title: "题库管理"
},
components: {
questionbankForm
},
data() {
return {
pageCount: 0,
msg: {
pageIndex: 1,
pageSize: 12,
rowsPerPage: 12,
BankName: ''
},
loading: false,
isShowQuestionBankForm: false,
questionBankObj: null, //传入参数
columns: [{
name: 'RowNum',
label: '编号',
field: 'RowNum',
align: 'left'
},
{
name: 'BankNo',
label: '题库序号',
field: 'BankNo',
align: 'left',
},
{
name: 'BankName',
label: '题库名称',
field: 'BankName',
align: 'left',
},
{
name: 'BankTypeName',
label: '等级',
field: 'BankTypeName',
align: 'left',
},
{
name: 'CreateByName',
label: '创建人',
field: 'CreateByName',
align: 'left'
},
{
name: 'QuestionCount',
label: '题量',
field: 'QuestionCount',
align: 'left'
},
{
name: 'optioned',
label: '操作',
field: 'QuestionId'
}
],
data: [],
}
},
created() { },
mounted() {
this.getQuestionBankPage();
},
methods: {
//下载
downloads(item) {
let msg = {
BankId: item.BankId,
}
DownLoadBank(msg).then(res => {
if (res.Code == 1) {
}
})
import {
queryQuestionBankPage,
RemoveQuestionBank,
DownLoadBank
} from '../../api/question/question';
import {
EduDownLoad
} from "../../api/common/common";
import questionbankForm from '../../components/question/questionbank-form';
export default {
meta: {
title: "题库管理"
},
research() {
this.getQuestionBankPage();
components: {
questionbankForm
},
//翻页
changePage(val) {
this.msg.pageIndex = val;
this.getQuestionBankPage()
},
//关闭弹窗
closeQuestionBank() {
this.isShowQuestionBankForm = false;
},
//获取题库分页列表
getQuestionBankPage() {
this.loading = true;
queryQuestionBankPage(this.msg).then(res => {
this.loading = false;
if (res.Code == 1) {
this.data = res.Data.PageData;
this.pageCount = res.Data.PageCount;
}
})
data() {
return {
pageCount: 0,
msg: {
pageIndex: 1,
pageSize: 12,
rowsPerPage: 12,
BankName: ''
},
loading: false,
isShowQuestionBankForm: false,
questionBankObj: null, //传入参数
columns: [{
name: 'RowNum',
label: '编号',
field: 'RowNum',
align: 'left'
},
{
name: 'BankNo',
label: '题库序号',
field: 'BankNo',
align: 'left',
},
{
name: 'BankName',
label: '题库名称',
field: 'BankName',
align: 'left',
},
{
name: 'BankTypeName',
label: '等级',
field: 'BankTypeName',
align: 'left',
},
{
name: 'CreateByName',
label: '创建人',
field: 'CreateByName',
align: 'left'
},
{
name: 'QuestionCount',
label: '题量',
field: 'QuestionCount',
align: 'left'
},
{
name: 'optioned',
label: '操作',
field: 'QuestionId'
}
],
data: [],
}
},
//刷新列表
refreshQuestion() {
created() {},
mounted() {
this.getQuestionBankPage();
},
//编辑题库
EditQuestion(obj) {
if (obj) {
this.questionBankObj = obj
} else {
this.questionBankObj = null
}
this.isShowQuestionBankForm = true
},
//删除问题
deleteQuestionBank(item) {
let delMsg = {
bankId: item.BankId,
status: 1
};
this.$q.dialog({
title: '提示信息',
message: '是否确定删除该题库?',
cancel: true,
persistent: true,
ok: "确定",
cancel: "取消",
}).onOk(() => {
RemoveQuestionBank(delMsg).then(res => {
methods: {
//下载
downloads(item) {
let msg = {
BankId: item.BankId,
}
var fileName = item.BankName + ".doc";
this.loading=true;
EduDownLoad(
"/Question/DownLoadBank",
msg,
fileName, res => {
this.loading=false;
}
);
},
research() {
this.getQuestionBankPage();
},
//翻页
changePage(val) {
this.msg.pageIndex = val;
this.getQuestionBankPage()
},
//关闭弹窗
closeQuestionBank() {
this.isShowQuestionBankForm = false;
},
//获取题库分页列表
getQuestionBankPage() {
this.loading = true;
queryQuestionBankPage(this.msg).then(res => {
this.loading = false;
if (res.Code == 1) {
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: '删除成功!',
position: 'top'
})
this.getQuestionBankPage();
this.data = res.Data.PageData;
this.pageCount = res.Data.PageCount;
}
})
}).onCancel(() => {
},
//刷新列表
refreshQuestion() {
this.getQuestionBankPage();
},
//编辑题库
EditQuestion(obj) {
if (obj) {
this.questionBankObj = obj
} else {
this.questionBankObj = null
}
this.isShowQuestionBankForm = true
},
//删除问题
deleteQuestionBank(item) {
let delMsg = {
bankId: item.BankId,
status: 1
};
this.$q.dialog({
title: '提示信息',
message: '是否确定删除该题库?',
cancel: true,
persistent: true,
ok: "确定",
cancel: "取消",
}).onOk(() => {
RemoveQuestionBank(delMsg).then(res => {
if (res.Code == 1) {
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: '删除成功!',
position: 'top'
})
this.getQuestionBankPage();
}
})
}).onCancel(() => {
});
},
//跳转至questionlist
goQuestionList(item) {
var tempStr = '../course/question?BankId=' + item.BankId;
this.$router.push({
path: tempStr
});
});
},
//跳转至questionlist
goQuestionList(item) {
var tempStr = '../course/question?BankId=' + item.BankId;
this.$router.push({
path: tempStr
});
}
}
}
}
</script>
<style lang="sass">
@import url('~assets/css/table.sass')
</style>
\ No newline at end of file
</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