生成试卷调整
This commit is contained in:
parent
04bf8a9dda
commit
23c49b965d
@ -4,7 +4,7 @@
|
||||
class="xian-02__system train-move"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="360px"
|
||||
width="760px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
@ -15,20 +15,29 @@
|
||||
<el-col :span="12">追踪号:</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-input :id="domIdInput" v-model="addModel.groupNumber" style="width: 100px;" @change="inputGroupNumber" />
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-input :id="domIdInput" v-model="addModel.groupNumber" style="width: 100px;" @change="inputGroupNumber" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">实际的DID</el-col>
|
||||
<el-col :span="12">
|
||||
<el-input :id="domIdInput" v-model="addModel.groupNumber" @change="inputGroupNumber" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">车站</el-col>
|
||||
<el-col :span="11" :offset="1">车次窗</el-col>
|
||||
<el-col :span="12">被请求的DID</el-col>
|
||||
<el-col :span="12">
|
||||
<el-input :id="domIdInput" v-model="addModel.groupNumber" @change="inputGroupNumber" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">DID浏览选项</el-col>
|
||||
<el-col :span="12">
|
||||
<el-input v-model="addModel.stationName" :disabled="true" />
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-input v-model="addModel.trainWindowCode" :disabled="true" />
|
||||
<el-input :id="domIdInput" v-model="addModel.groupNumber" @change="inputGroupNumber" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
|
@ -13,6 +13,7 @@
|
||||
<el-table
|
||||
:data="theoryQuestionList"
|
||||
style="width: 100%"
|
||||
height="100%"
|
||||
>
|
||||
<el-table-column
|
||||
prop="type"
|
||||
@ -57,6 +58,7 @@
|
||||
<el-table
|
||||
:data="operateQuestionList"
|
||||
style="width: 100%"
|
||||
height="100%"
|
||||
>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
@ -80,7 +82,7 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
<set-exam-time ref="setExamTime" />
|
||||
<set-exam-time ref="setExamTime" :theory-question-list="theoryQuestionList" :operate-question-list="operateQuestionList" />
|
||||
<theory-review ref="theoryReview" :theory-question-list="theoryQuestionList" />
|
||||
<theory-question ref="theoryQuestion" :theory-index-list="theoryIndexList" @addQuestion="addTheoryQuestionList" @removeQuestion="removeTheoryQuestion" />
|
||||
<operate-question ref="operateQuestion" :operate-index-list="operateIndexList" @addQuestion="addOperateQuestionList" @removeQuestion="removeOperateQuestion" />
|
||||
@ -163,5 +165,8 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
/deep/
|
||||
.el-card__body{
|
||||
height: calc(100% - 50px);
|
||||
}
|
||||
</style>
|
||||
|
@ -8,7 +8,7 @@
|
||||
<el-input-number v-model="form.operateExamTime" controls-position :min="1" /><span>  分</span>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="handleClose">导出</el-button>
|
||||
<el-button type="primary" @click="handleExport">导出</el-button>
|
||||
<el-button @click="handleClose">取消</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@ -17,12 +17,19 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getRaceById } from '@/api/competition';
|
||||
export default {
|
||||
mixins: [
|
||||
// WindowResizeHandler
|
||||
],
|
||||
props: {
|
||||
operateIndexList: {
|
||||
operateQuestionList: {
|
||||
type: Array,
|
||||
default() {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
theoryQuestionList: {
|
||||
type: Array,
|
||||
default() {
|
||||
return [];
|
||||
@ -60,6 +67,29 @@ export default {
|
||||
},
|
||||
handleClose() {
|
||||
this.dialogVisible = false;
|
||||
},
|
||||
handleExport() {
|
||||
getRaceById(this.$route.query.raceId).then(resp => {
|
||||
const exportData = {
|
||||
operateQuestionList: this.operateQuestionList,
|
||||
theoryQuestionList: this.theoryQuestionList,
|
||||
raceId: this.$route.query.raceId,
|
||||
theoryExamTime: this.form.theoryExamTime,
|
||||
operateExamTime: this.form.operateExamTime
|
||||
};
|
||||
console.log(exportData, '11111111');
|
||||
const content = new Blob([JSON.stringify(exportData)]);
|
||||
const urlObject = window.URL || window.webkitURL || window;
|
||||
const url = urlObject.createObjectURL(content);
|
||||
const el = document.createElement('a');
|
||||
el.href = url;
|
||||
el.download = `${resp.data.name}试卷.json`;
|
||||
el.click();
|
||||
urlObject.revokeObjectURL(url);
|
||||
this.dialogVisible = false;
|
||||
}).catch(()=> {
|
||||
this.$message.error('查询竞赛详情失败!');
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user