Commit e06a0d26 authored by 黄奎's avatar 黄奎

页面修改

parent 7bf1e583
...@@ -264,9 +264,11 @@ ...@@ -264,9 +264,11 @@
color: #555; color: #555;
font-weight: normal; font-weight: normal;
} }
.checkedExam{
background: #9cf!important; .checkedExam {
background: #9cf !important;
} }
</style> </style>
<template> <template>
<div class="examPaper page-body"> <div class="examPaper page-body">
...@@ -302,7 +304,7 @@ ...@@ -302,7 +304,7 @@
<span>题量:<i>{{examNum}}</i></span> <span>题量:<i>{{examNum}}</i></span>
<span>总分:<i>{{examScore.toFixed(2)}}</i></span> <span>总分:<i>{{examScore.toFixed(2)}}</i></span>
</div> </div>
<div> <div v-if="DataObj.GroupType==2">
<q-btn-dropdown color="primary" label="添加分类" size="sm"> <q-btn-dropdown color="primary" label="添加分类" size="sm">
<q-list> <q-list>
<q-item clickable v-close-popup @click="onCategoryItemClick(item)" <q-item clickable v-close-popup @click="onCategoryItemClick(item)"
...@@ -321,15 +323,25 @@ ...@@ -321,15 +323,25 @@
<div class="List-bt"> <div class="List-bt">
<div class="paperEdit_Top" :class="{'checkedExam':clickIndex==gIndex}"> <div class="paperEdit_Top" :class="{'checkedExam':clickIndex==gIndex}">
<template v-if="!gItem.isShowEdit"> <template v-if="!gItem.isShowEdit">
<div @click="GetGroupItem(gItem,gIndex)" style="display:flex;padding-left:5px;"> <template v-if="DataObj.GroupType==2">
<div>{{gIndex+1}}</div>&nbsp; <div @click="GetGroupItem(gItem,gIndex)" style="display:flex;padding-left:5px;cursor:pointer">
<div class="paper_GroupName" :title="gItem.GroupName">{{gItem.GroupName}}</div> <div>{{gIndex+1}}</div>&nbsp;
<div>(共{{ gItem.DetailsList?gItem.DetailsList.length:0 }}题,{{gItem.GScore}}分)</div> <div class="paper_GroupName" :title="gItem.GroupName">{{gItem.GroupName}}</div>
</div> <div>(共{{ gItem.DetailsList?gItem.DetailsList.length:0 }}题,{{gItem.GScore}}分)</div>
</div>
</template>
<template v-else>
<div style="display:flex;padding-left:5px;">
<div>{{gIndex+1}}</div>&nbsp;
<div class="paper_GroupName" :title="gItem.GroupName">{{gItem.GroupName}}</div>
<div>(共{{ gItem.DetailsList?gItem.DetailsList.length:0 }}题,{{gItem.GScore}}分)</div>
</div>
</template>
</template> </template>
<template v-else> <template v-else>
<el-input v-model="gItem.GroupName" size="small" maxlength="50" <el-input v-model="gItem.GroupName" size="small" maxlength="50"
style="width:160px;margin-right:10px;"></el-input> style="width:160px;margin-right:10px;">
</el-input>
<el-input v-model="gItem.GScore" size="small" maxlength="6" style="width:80px;" <el-input v-model="gItem.GScore" size="small" maxlength="6" style="width:80px;"
@keyup.native="checkPrice(gItem,'GScore')" @change="changeGroupScore(gItem)"></el-input> @keyup.native="checkPrice(gItem,'GScore')" @change="changeGroupScore(gItem)"></el-input>
</template> </template>
...@@ -601,7 +613,7 @@ ...@@ -601,7 +613,7 @@
GroupList: [], //试卷答题分类 GroupList: [], //试卷答题分类
IsOpen: 1, //(1-私有,2-开放) IsOpen: 1, //(1-私有,2-开放)
GroupType: 1, //组卷类型 GroupType: 1, //组卷类型
PaperScore:0,//试卷总分数 PaperScore: 0, //试卷总分数
}, },
//点击问题对象 //点击问题对象
ChooseItem: null, ChooseItem: null,
...@@ -621,7 +633,7 @@ ...@@ -621,7 +633,7 @@
savePaperLoading: false, savePaperLoading: false,
isShowPoint: false, //选择知识点 isShowPoint: false, //选择知识点
clickGroupItem: null, //选择的分组 clickGroupItem: null, //选择的分组
clickIndex:-1 clickIndex: -1
} }
}, },
computed: { computed: {
...@@ -665,7 +677,7 @@ ...@@ -665,7 +677,7 @@
} }
}, },
methods: { methods: {
GetGroupItem(gItem,gIndex) { GetGroupItem(gItem, gIndex) {
this.clickIndex = gIndex; this.clickIndex = gIndex;
this.clickGroupItem = gItem; this.clickGroupItem = gItem;
}, },
...@@ -933,7 +945,7 @@ ...@@ -933,7 +945,7 @@
this.$q.notify({ this.$q.notify({
type: 'negative', type: 'negative',
position: "top", position: "top",
message: `请选择左侧分类!` message: `请先点击左侧分类!在添加问题`
}) })
} else { } else {
this.clickGroupItem.DetailsList.push(qItem); this.clickGroupItem.DetailsList.push(qItem);
...@@ -1105,7 +1117,7 @@ ...@@ -1105,7 +1117,7 @@
//保存题目 //保存题目
SavePaper() { SavePaper() {
if (this.validateType()) { if (this.validateType()) {
this.DataObj.PaperScore=this.examScore; this.DataObj.PaperScore = this.examScore;
this.savePaperLoading = true; this.savePaperLoading = true;
savePaperInfo(this.DataObj).then(res => { savePaperInfo(this.DataObj).then(res => {
this.savePaperLoading = false; this.savePaperLoading = false;
......
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