|
@@ -96,23 +96,19 @@
|
|
|
color: white;
|
|
|
background: #1D6BD0;
|
|
|
}
|
|
|
+
|
|
|
.el-radio:last-child {
|
|
|
- margin-right:32px;
|
|
|
+ margin-right: 32px;
|
|
|
}
|
|
|
</style>
|
|
|
{/block}
|
|
|
{block name="body"}
|
|
|
-<div class="step">
|
|
|
- <el-steps style="width: 600px" :active="active" align-center>
|
|
|
- <el-step title="基础信息"></el-step>
|
|
|
- <el-step title="测评试卷"></el-step>
|
|
|
- </el-steps>
|
|
|
-</div>
|
|
|
-
|
|
|
<div class="base-info" v-show="active == 0">
|
|
|
+ <h2 style="text-align: center;padding-bottom: 20px;">基础信息</h2>
|
|
|
{include file="officer/answer_base"/}
|
|
|
</div>
|
|
|
<div class="evaluate" v-show="active == 1">
|
|
|
+ <h2 style="text-align: center;padding-bottom: 20px;">测评试卷</h2>
|
|
|
<div class="title">
|
|
|
{{list[index].section}}
|
|
|
</div>
|
|
@@ -134,25 +130,27 @@
|
|
|
</el-radio-group>
|
|
|
</fieldset>
|
|
|
</el-col>
|
|
|
-<!-- <el-col :span="7" style="height:600px;">-->
|
|
|
-<!-- <div class="title-list">-->
|
|
|
-<!-- <ul>-->
|
|
|
-<!-- <li-->
|
|
|
-<!-- class="num"-->
|
|
|
-<!-- :class="{finish:answer_detail[item.no] > 0,current:i==index}"-->
|
|
|
-<!-- :key="item.id"-->
|
|
|
-<!-- v-for="(item,i) in list"-->
|
|
|
-<!-- @click="changeTitle(i)"-->
|
|
|
-<!-- >{{item.no}}-->
|
|
|
-<!-- </li>-->
|
|
|
-<!-- </ul>-->
|
|
|
-<!-- </div>-->
|
|
|
-<!-- </el-col>-->
|
|
|
+ <!-- <el-col :span="7" style="height:600px;">-->
|
|
|
+ <!-- <div class="title-list">-->
|
|
|
+ <!-- <ul>-->
|
|
|
+ <!-- <li-->
|
|
|
+ <!-- class="num"-->
|
|
|
+ <!-- :class="{finish:answer_detail[item.no] > 0,current:i==index}"-->
|
|
|
+ <!-- :key="item.id"-->
|
|
|
+ <!-- v-for="(item,i) in list"-->
|
|
|
+ <!-- @click="changeTitle(i)"-->
|
|
|
+ <!-- >{{item.no}}-->
|
|
|
+ <!-- </li>-->
|
|
|
+ <!-- </ul>-->
|
|
|
+ <!-- </div>-->
|
|
|
+ <!-- </el-col>-->
|
|
|
</el-row>
|
|
|
</div>
|
|
|
<div class="info-btn mt-50">
|
|
|
<el-button type="primary" size="large" @click="onNext" v-show="index + 1 != list.length">下一题</el-button>
|
|
|
- <el-button type="primary" size="large" @click="onSubmit" v-loading="loading" v-show="index + 1 == list.length">提交</el-button>
|
|
|
+ <el-button type="primary" size="large" @click="onSubmit" v-loading="loading" v-show="index + 1 == list.length">
|
|
|
+ 提交
|
|
|
+ </el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
{/block}
|
|
@@ -161,10 +159,18 @@
|
|
|
function v_setup() {
|
|
|
const base = answer_base();
|
|
|
|
|
|
+ const aid = {$aid};
|
|
|
+ if (aid > 0) {
|
|
|
+ base.aid = Vue.ref(aid);
|
|
|
+ base.active = Vue.ref(1);
|
|
|
+ } else {
|
|
|
+ base.active = Vue.ref(0);
|
|
|
+ }
|
|
|
base.list = {$list};
|
|
|
- base.active = Vue.ref(0);
|
|
|
base.answer_detail = Vue.ref({});
|
|
|
base.index = Vue.ref(0);
|
|
|
+
|
|
|
+
|
|
|
base.selectTile = () => {
|
|
|
if (base.index.value + 1 == base.list.length) {
|
|
|
return false;
|
|
@@ -176,6 +182,10 @@
|
|
|
}
|
|
|
base.loading = Vue.ref(false);
|
|
|
base.onNext = () => {
|
|
|
+ if (!base.answer_detail.value[base.list[base.index.value].no]) {
|
|
|
+ ElementPlus.ElMessage.error('必须选择一个选项');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
postJson("{:url('officer/answerDetailPost')}", {
|
|
|
id: {$id},
|
|
|
index: base.answer_detail.value[base.list[base.index.value].no],
|
|
@@ -189,6 +199,11 @@
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
+ if (!base.answer_detail.value[base.list[base.index.value].no]) {
|
|
|
+ ElementPlus.ElMessage.error('必须选择一个选项');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
postJson("{:url('officer/answerDetailPost')}", {
|
|
|
id: {$id},
|
|
|
index: base.answer_detail.value[base.list[base.index.value].no],
|
|
@@ -196,11 +211,16 @@
|
|
|
no: base.list[base.index.value].no,
|
|
|
}).then(() => {
|
|
|
postJson("{:url('officer/answerFinish')}", {
|
|
|
+ id: {$id},
|
|
|
aid: base.aid.value,
|
|
|
- }).then((data) => {
|
|
|
+ }).then(({data}) => {
|
|
|
base.loading.value = false;
|
|
|
ElementPlus.ElMessage.success('提交成功');
|
|
|
- location.href = "{:url('officer/finish')}";
|
|
|
+ if (data > 0) {
|
|
|
+ location.href = "{:url('officer/index')}?id=" + data + "&aid=" + base.aid.value;
|
|
|
+ } else {
|
|
|
+ location.href = "{:url('officer/finish')}";
|
|
|
+ }
|
|
|
})
|
|
|
})
|
|
|
|