Commit 17059d3d authored by 黄奎's avatar 黄奎

1

parent 6bff6db5
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
<script> <script>
export default { export default {
name: "App", name: "App",
mounted() { mounted() {
if ( if (
navigator.userAgent.match( navigator.userAgent.match(
...@@ -26,27 +27,34 @@ export default { ...@@ -26,27 +27,34 @@ export default {
<style> <style>
@import url("//at.alicdn.com/t/font_2077629_3u1r9gsz178.css"); @import url("//at.alicdn.com/t/font_2077629_3u1r9gsz178.css");
@font-face { @font-face {
font-family: "din"; font-family: "din";
src: url("./assets/font/DIN-Bold.otf") format("opentype"); src: url("./assets/font/DIN-Bold.otf") format("opentype");
font-weight: normal; font-weight: normal;
font-style: normal; font-style: normal;
} }
.border-radius { .border-radius {
border-radius: 5px; border-radius: 5px;
} }
.din { .din {
font-family: din !important; font-family: din !important;
} }
.q-scrollarea__thumb { .q-scrollarea__thumb {
z-index: 999999 !important; z-index: 999999 !important;
} }
body { body {
/* min-width: 1360px !important; */ /* min-width: 1360px !important; */
} }
header { header {
min-width: 1360px; min-width: 1360px;
} }
html, html,
body, body,
#q-app { #q-app {
...@@ -58,124 +66,156 @@ body, ...@@ -58,124 +66,156 @@ body,
"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
color: #3f4254; color: #3f4254;
} }
.q-position-engine { .q-position-engine {
z-index: 9999; z-index: 9999;
} }
.el-date-picker, .el-date-picker,
.time-select { .time-select {
z-index: 999999 !important; z-index: 999999 !important;
} }
.remark-font { .remark-font {
font-size: 12px; font-size: 12px;
font-family: Poppins, Helvetica, sans-serif; font-family: Poppins, Helvetica, sans-serif;
font-weight: 400; font-weight: 400;
color: #b5b5c3 !important; color: #b5b5c3 !important;
} }
.svg-icon.svg-icon-primary g [fill] { .svg-icon.svg-icon-primary g [fill] {
transition: fill 0.3s ease; transition: fill 0.3s ease;
fill: var(--q-color-primary) !important; fill: var(--q-color-primary) !important;
} }
.svg-icon.svg-icon-secondary g [fill] { .svg-icon.svg-icon-secondary g [fill] {
transition: fill 0.3s ease; transition: fill 0.3s ease;
fill: var(--q-color-secondary) !important; fill: var(--q-color-secondary) !important;
} }
.svg-icon.svg-icon-grey g [fill] { .svg-icon.svg-icon-grey g [fill] {
transition: fill 0.3s ease; transition: fill 0.3s ease;
fill: #ccc !important; fill: #ccc !important;
} }
.svg-icon.svg-icon-warning g [fill] { .svg-icon.svg-icon-warning g [fill] {
transition: fill 0.3s ease; transition: fill 0.3s ease;
fill: var(--q-color-warning) !important; fill: var(--q-color-warning) !important;
} }
.svg-icon.svg-icon-negative g [fill] { .svg-icon.svg-icon-negative g [fill] {
transition: fill 0.3s ease; transition: fill 0.3s ease;
fill: var(--q-color-negative) !important; fill: var(--q-color-negative) !important;
} }
.svg-icon.svg-icon-accent g [fill] { .svg-icon.svg-icon-accent g [fill] {
transition: fill 0.3s ease; transition: fill 0.3s ease;
fill: var(--q-color-accent) !important; fill: var(--q-color-accent) !important;
} }
.svg-icon.svg-icon-dark g [fill] { .svg-icon.svg-icon-dark g [fill] {
transition: fill 0.3s ease; transition: fill 0.3s ease;
fill: var(--q-color-dark) !important; fill: var(--q-color-dark) !important;
} }
.svg-icon.svg-icon-orange g [fill] { .svg-icon.svg-icon-orange g [fill] {
transition: fill 0.3s ease; transition: fill 0.3s ease;
fill: rgb(255, 152, 0) !important; fill: rgb(255, 152, 0) !important;
} }
.svg-icon.svg-icon-positive g [fill] { .svg-icon.svg-icon-positive g [fill] {
transition: fill 0.3s ease; transition: fill 0.3s ease;
fill: "#C9F7F5" !important; fill: "#C9F7F5" !important;
} }
.svg-icon.svg-icon-white g [fill] { .svg-icon.svg-icon-white g [fill] {
transition: fill 0.3s ease; transition: fill 0.3s ease;
fill: white !important; fill: white !important;
} }
.svg-icon.svg-icon-g-p g [fill] { .svg-icon.svg-icon-g-p g [fill] {
transition: fill 0.3s ease; transition: fill 0.3s ease;
fill: grey !important; fill: grey !important;
} }
.svg-icon.svg-icon-g-p { .svg-icon.svg-icon-g-p {
cursor: pointer; cursor: pointer;
} }
.svg-icon.svg-icon-g-p:hover g [fill] { .svg-icon.svg-icon-g-p:hover g [fill] {
transition: fill 0.3s ease; transition: fill 0.3s ease;
fill: var(--q-color-primary) !important; fill: var(--q-color-primary) !important;
} }
.svg-icon.svg-icon-b-p g [fill] { .svg-icon.svg-icon-b-p g [fill] {
transition: fill 0.3s ease; transition: fill 0.3s ease;
fill: #000 !important; fill: #000 !important;
} }
.svg-icon.svg-icon-b-p { .svg-icon.svg-icon-b-p {
cursor: pointer; cursor: pointer;
} }
.svg-icon.svg-icon-b-p:hover g [fill] { .svg-icon.svg-icon-b-p:hover g [fill] {
transition: fill 0.3s ease; transition: fill 0.3s ease;
fill: var(--q-color-primary) !important; fill: var(--q-color-primary) !important;
} }
.hover-primary:hover .svg-icon g [fill] { .hover-primary:hover .svg-icon g [fill] {
transition: fill 0.3s ease; transition: fill 0.3s ease;
fill: white !important; fill: white !important;
} }
.hover-primary:hover .q-avatar { .hover-primary:hover .q-avatar {
background-color: var(--q-color-primary) !important; background-color: var(--q-color-primary) !important;
} }
.hover-primary:hover { .hover-primary:hover {
color: var(--q-color-primary) !important; color: var(--q-color-primary) !important;
} }
.hover-d-p { .hover-d-p {
cursor: pointer; cursor: pointer;
color: var(--q-color-dark) !important; color: var(--q-color-dark) !important;
} }
.hover-d-p .svg-icon g [fill] { .hover-d-p .svg-icon g [fill] {
transition: fill 0.3s ease; transition: fill 0.3s ease;
fill: var(--q-color-dark) !important; fill: var(--q-color-dark) !important;
} }
.hover-d-p:hover { .hover-d-p:hover {
color: var(--q-color-primary) !important; color: var(--q-color-primary) !important;
} }
.hover-d-p:hover .svg-icon g [fill] { .hover-d-p:hover .svg-icon g [fill] {
transition: fill 0.3s ease; transition: fill 0.3s ease;
fill: var(--q-color-primary) !important; fill: var(--q-color-primary) !important;
} }
.hover-g-p { .hover-g-p {
cursor: pointer; cursor: pointer;
color: #ccc !important; color: #ccc !important;
} }
.hover-g-p .svg-icon g [fill] { .hover-g-p .svg-icon g [fill] {
transition: fill 0.3s ease; transition: fill 0.3s ease;
fill: #ccc !important; fill: #ccc !important;
} }
.hover-g-p:hover { .hover-g-p:hover {
color: var(--q-color-primary) !important; color: var(--q-color-primary) !important;
} }
.hover-g-p:hover .svg-icon g [fill] { .hover-g-p:hover .svg-icon g [fill] {
transition: fill 0.3s ease; transition: fill 0.3s ease;
fill: var(--q-color-primary) !important; fill: var(--q-color-primary) !important;
} }
.text-muted { .text-muted {
color: #b5b5c3 !important; color: #b5b5c3 !important;
} }
.page-body { .page-body {
border-radius: 8px; border-radius: 8px;
background: #fff; background: #fff;
...@@ -214,10 +254,12 @@ body, ...@@ -214,10 +254,12 @@ body,
.micfont { .micfont {
font-family: perfectFont !important; font-family: perfectFont !important;
} }
.fixed-right, .fixed-right,
.absolute-right { .absolute-right {
overflow: unset; overflow: unset;
} }
.dialog-out-close { .dialog-out-close {
background: var(--q-color-primary); background: var(--q-color-primary);
position: absolute !important; position: absolute !important;
...@@ -232,56 +274,71 @@ body, ...@@ -232,56 +274,71 @@ body,
border-bottom-left-radius: 4px !important; border-bottom-left-radius: 4px !important;
cursor: pointer; cursor: pointer;
} }
.q-dialog__backdrop { .q-dialog__backdrop {
background: rgba(0, 0, 0, 0.1); background: rgba(0, 0, 0, 0.1);
} }
/***************************************************** Begin 重写ElementUI 抽屉效果 ***************************************************************/ /***************************************************** Begin 重写ElementUI 抽屉效果 ***************************************************************/
.el-drawer__wrapper { .el-drawer__wrapper {
top: 61px !important; top: 61px !important;
} }
.v-modal { .v-modal {
display: none !important; display: none !important;
} }
.el-drawer__wrapper .drawerTop { .el-drawer__wrapper .drawerTop {
background: none !important; background: none !important;
border-bottom: 1px solid #f5f5f5; border-bottom: 1px solid #f5f5f5;
} }
.el-drawer__wrapper .drawerTop .drawer_Span { .el-drawer__wrapper .drawerTop .drawer_Span {
font-size: 18px !important; font-size: 18px !important;
font-weight: 500 !important; font-weight: 500 !important;
font-family: perfectFont !important; font-family: perfectFont !important;
} }
.el-drawer__wrapper .drawerTop .icon-guanbi { .el-drawer__wrapper .drawerTop .icon-guanbi {
display: none !important; display: none !important;
} }
.el-tabs__item.is-active { .el-tabs__item.is-active {
color: var(--q-color-primary) !important; color: var(--q-color-primary) !important;
} }
.el-tabs__active-bar { .el-tabs__active-bar {
background-color: var(--q-color-primary) !important; background-color: var(--q-color-primary) !important;
} }
.page-body { .page-body {
padding: 15px !important; padding: 15px !important;
min-height: calc(100% - 30px); min-height: calc(100% - 30px);
margin: 15px !important; margin: 15px !important;
} }
.q-table__top { .q-table__top {
padding: 0 0 12px 0px !important; padding: 0 0 12px 0px !important;
} }
.q-btn__wrapper .row, .q-btn__wrapper .row,
.q-btn__wrapper .column, .q-btn__wrapper .column,
.q-btn__wrapper .flex { .q-btn__wrapper .flex {
flex-wrap: nowrap !important; flex-wrap: nowrap !important;
} }
.q-toolbar__title { .q-toolbar__title {
flex: unset !important; flex: unset !important;
} }
button.bg-accent { button.bg-accent {
background: linear-gradient(90deg, #37adf7, #2961fe) !important; background: linear-gradient(90deg, #37adf7, #2961fe) !important;
} }
button.bg-accent:active { button.bg-accent:active {
background: linear-gradient(270deg, #37adf7, #2961fe) !important; background: linear-gradient(270deg, #37adf7, #2961fe) !important;
} }
/*.q-avatar__content{ /*.q-avatar__content{
font-family: perfectFont !important; font-family: perfectFont !important;
font-size: 14px !important; font-size: 14px !important;
...@@ -309,16 +366,20 @@ button.bg-accent:active { ...@@ -309,16 +366,20 @@ button.bg-accent:active {
min-height: 32px !important; min-height: 32px !important;
border-radius: 4px !important; border-radius: 4px !important;
} }
.left-menu-box a.q-item.q-router-link--active, .left-menu-box a.q-item.q-router-link--active,
.left-menu-box .q-item--active { .left-menu-box .q-item--active {
background: #ecf1ff !important; background: #ecf1ff !important;
color: var(--q-color-primary) !important; color: var(--q-color-primary) !important;
} }
.big-dialog .q-dialog__inner--minimized > div {
.big-dialog .q-dialog__inner--minimized>div {
max-width: unset !important; max-width: unset !important;
} }
.f12 { .f12 {
font-size: 12px; font-size: 12px;
} }
/***************************************************** End 重写ElementUI 抽屉效果 ***************************************************************/ /***************************************************** End 重写ElementUI 抽屉效果 ***************************************************************/
</style> </style>
...@@ -325,4 +325,3 @@ export function downLoadBank(data) { ...@@ -325,4 +325,3 @@ export function downLoadBank(data) {
data data
}) })
} }
\ No newline at end of file
<style> <style>
.page-content p { .page-content p {
margin: 0 !important; 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> </style>
<template> <template>
<div class="page-body"> <div class="page-body">
...@@ -74,178 +73,178 @@ ...@@ -74,178 +73,178 @@
</div> </div>
</template> </template>
<script> <script>
import { import {
queryQuestionBankPage, queryQuestionBankPage,
RemoveQuestionBank, RemoveQuestionBank,
downLoadBank downLoadBank
} from '../../api/question/question'; } from '../../api/question/question';
import { import {
EduDownLoad EduDownLoad
} from "../../api/common/common"; } from "../../api/common/common";
import questionbankForm from '../../components/question/questionbank-form'; import questionbankForm from '../../components/question/questionbank-form';
export default { export default {
meta: { meta: {
title: "题库管理" title: "题库管理"
}, },
components: { components: {
questionbankForm questionbankForm
}, },
data() { data() {
return { return {
pageCount: 0, pageCount: 0,
msg: { msg: {
pageIndex: 1, pageIndex: 1,
pageSize: 12, pageSize: 12,
rowsPerPage: 12, rowsPerPage: 12,
BankName: '' 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,
}
this.loading = true;
downLoadBank(msg).then(res => {
this.loading = false;
if (res.Code == 1) {
let cApiUrl = process.env.API.replace('/api','') + res.Data;
let link = document.createElement('a');
link.href = cApiUrl;
link.setAttribute("download", item.BankName + ".zip");
document.body.appendChild(link);
link.click();
}
})
}, },
research() { loading: false,
this.getQuestionBankPage(); isShowQuestionBankForm: false,
questionBankObj: null, //传入参数
columns: [{
name: 'RowNum',
label: '编号',
field: 'RowNum',
align: 'left'
}, },
//翻页 {
changePage(val) { name: 'BankNo',
this.msg.pageIndex = val; label: '题库序号',
this.getQuestionBankPage() field: 'BankNo',
align: 'left',
}, },
//关闭弹窗 {
closeQuestionBank() { name: 'BankName',
this.isShowQuestionBankForm = false; label: '题库名称',
field: 'BankName',
align: 'left',
}, },
//获取题库分页列表 {
getQuestionBankPage() { name: 'BankTypeName',
this.loading = true; label: '等级',
queryQuestionBankPage(this.msg).then(res => { field: 'BankTypeName',
this.loading = false; align: 'left',
if (res.Code == 1) {
this.data = res.Data.PageData;
this.pageCount = res.Data.PageCount;
}
})
}, },
//刷新列表 {
refreshQuestion() { name: 'CreateByName',
this.getQuestionBankPage(); label: '创建人',
field: 'CreateByName',
align: 'left'
}, },
//编辑题库 {
EditQuestion(obj) { name: 'QuestionCount',
if (obj) { label: '题量',
this.questionBankObj = obj field: 'QuestionCount',
} else { align: 'left'
this.questionBankObj = null
}
this.isShowQuestionBankForm = true
}, },
//删除问题 {
deleteQuestionBank(item) { name: 'optioned',
let delMsg = { label: '操作',
bankId: item.BankId, field: 'QuestionId'
status: 1 }
}; ],
this.$q.dialog({ data: [],
title: '提示信息', }
message: '是否确定删除该题库?', },
cancel: true, created() { },
persistent: true, mounted() {
ok: "确定", this.getQuestionBankPage();
cancel: "取消", },
}).onOk(() => { methods: {
RemoveQuestionBank(delMsg).then(res => { //下载
if (res.Code == 1) { downloads(item) {
this.$q.notify({ let msg = {
icon: 'iconfont icon-chenggong', BankId: item.BankId,
color: 'accent', }
timeout: 2000, this.loading = true;
message: '删除成功!', downLoadBank(msg).then(res => {
position: 'top' this.loading = false;
}) if (res.Code == 1) {
this.getQuestionBankPage(); let cApiUrl = process.env.API.replace('/api', '') + res.Data;
}
})
}).onCancel(() => {
}); let link = document.createElement('a');
}, link.href = cApiUrl;
//跳转至questionlist link.setAttribute("download", item.BankName + ".zip");
goQuestionList(item) { document.body.appendChild(link);
var tempStr = '../course/question?BankId=' + item.BankId; link.click();
this.$router.push({ }
path: tempStr })
}); },
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.data = res.Data.PageData;
this.pageCount = res.Data.PageCount;
}
})
},
//刷新列表
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
});
} }
} }
}
</script> </script>
<style lang="sass"> <style lang="sass">
......
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