2db47680
hexiaodong
chore: 初始提交 php 遗...
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
|
<div>
<!--统计信息-->
<div class="margin-bottom">
<el-row :gutter="24">
<el-col :span="6">
<div>
<el-statistic title="总题数/分数">
<template slot="formatter"> {{materialSummary.total_quantity}}/{{materialSummary.total_score}} </template>
</el-statistic>
</div>
</el-col>
<el-col :span="6">
<div>
<el-statistic title="判断题数/分数">
<template slot="formatter"> {{materialSummary.judge_quantity}}/{{materialSummary.judge_score}} </template>
</el-statistic>
</div>
</el-col>
<el-col :span="6">
<div>
<el-statistic title="单选题数/分数">
<template slot="formatter"> {{materialSummary.single_quantity}}/{{materialSummary.single_score}} </template>
</el-statistic>
</div>
</el-col>
<el-col :span="6">
<div>
<el-statistic title="多选题数/分数">
<template slot="formatter"> {{materialSummary.multi_quantity}}/{{materialSummary.multi_score}} </template>
</el-statistic>
</div>
</el-col>
</el-row>
<el-row :gutter="24" class="m-t-5">
<el-col :span="6">
<div>
<el-statistic title="填空题数/分数">
<template slot="formatter"> {{materialSummary.fill_quantity}}/{{materialSummary.fill_score}} </template>
</el-statistic>
</div>
</el-col>
<el-col :span="6">
<div>
<el-statistic title="简答题数/分数">
<template slot="formatter"> {{materialSummary.short_quantity}}/{{materialSummary.short_score}} </template>
</el-statistic>
</div>
</el-col>
</el-row>
</div>
<!--试题列表-->
<el-table :data="materialQuestions" height="350" border style="width: 100%">
<el-table-column prop="id" label="ID" width="80"></el-table-column>
<el-table-column prop="cates.name" label="分类" width="120">
<template slot-scope="scope">
<span v-if="scope.row.cate">{{scope.row.cate.name}}</span>
<span v-else-if="scope.row.cates">{{scope.row.cates.name}}</span>
</template>
</el-table-column>
<el-table-column prop="title" label="标题"></el-table-column>
<el-table-column prop="kind" label="题型" width="80">
<template slot-scope="scope">
<el-tag size="small" effect="plain" v-if="scope.row.kind == 'JUDGE'">判断题</el-tag>
<el-tag size="small" effect="plain" v-else-if="scope.row.kind == 'SINGLE'" type="success">单选题</el-tag>
<el-tag size="small" effect="plain" v-else-if="scope.row.kind == 'MULTI'" type="info">多选题</el-tag>
<el-tag size="small" effect="plain" v-else-if="scope.row.kind == 'FILL'" type="warning">填空题</el-tag>
<el-tag size="small" effect="plain" v-else-if="scope.row.kind == 'SHORT'" type="danger">简答题</el-tag>
</template>
</el-table-column>
<el-table-column prop="score" label="分数" align="center">
<template slot-scope="scope">
<div v-if="scope.row.kind == 'SHORT'">
<!--简答题最大分数-->
<div>
<span>最大得分数</span>
<el-input-number size="mini" v-model="scope.row.score" :min="1" step-strictly @change="scoreChange(scope.$index)"></el-input-number>
</div>
<div class="m-t-5">
<!--设置简答题各关键词分数-->
<el-button size="small" type="primary" @click="openShortScoreDialog(scope.row, scope.$index)">设置关键词分数</el-button>
</div>
</div>
<div v-else>
<el-input-number size="mini" v-model="scope.row.score" :min="1" step-strictly @change="scoreChange(scope.$index)"></el-input-number>
</div>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="100">
<template slot-scope="scope">
<el-button type="danger" icon="el-icon-delete" size="small" @click="deleteQuestion(scope.$index)">删除</el-button>
</template>
</el-table-column>
</el-table>
<button id="valid" type="button" @click="valid()" class="hide">验证</button>
<input type="hidden" name="row[material_questions]" id="c-material_questions">
</div>
<!--简答题关键词分数设置弹窗-->
<el-dialog title="简答题关键词分数设置" :visible.sync="shortScoreDialogVisible" width="50%">
<el-table :data="shortScoreConfig" height="350" border style="width: 100%">
<el-table-column prop="answer" label="关键词"></el-table-column>
<el-table-column prop="score" label="得分数">
<template slot-scope="scope">
<el-input-number size="mini" v-model="scope.row.score" :min="1" step-strictly></el-input-number>
</template>
</el-table-column>
</el-table>
<div slot="footer" class="dialog-footer">
<el-button @click="shortScoreDialogVisible = false">取 消</el-button>
<el-button type="primary" @click="shortScoreDialogVisible = false; shortScoreSubmit()">确 定</el-button>
</div>
</el-dialog>
|