index.html
1.9 KB
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
<style>
.custom-row {
min-height: 28px;
overflow: initial;
}
.custom-row:not(:last-child) {
margin-bottom: 6px;
}
.custom-row [role="button"] {
display: none;
}
.el-input-number--small {
width: 100%;
}
.el-input-number.is-controls-right .el-input__inner {
padding-right: 15px;
}
</style>
<div id="app" hidden>
<div>总分: {{totalScore}}</div>
<template>
<el-table :data="tableData" border stripe style="width: 100%">
<el-table-column prop="item_name" label="评分项目" width="180">
</el-table-column>
<el-table-column prop="points" label="评分要点" width="400">
<template slot-scope="{row}">
<div class="custom-row" v-for="(item, index) in row.item_details" :key="index">{{item['name']}}</div>
</template>
</el-table-column>
<el-table-column prop="score_area" label="打分区间">
<template slot-scope="{row}">
<div class="custom-row" v-for="(item, index) in row.item_details" :key="index">0-{{item['score']}}分</div>
</template>
</el-table-column>
<el-table-column prop="address" label="评分分值">
<template slot-scope="{row, $index}">
<div v-for="(v, i) in row.item_details" class="custom-row">
<el-input-number v-model="scores[row.id+'_'+$index+'_'+i]" controls-position="right" :min="0" :max="v.score" size="small" placeholder="请打分"></el-input-number>
</div>
</template>
</el-table-column>
</el-table>
</template>
<el-row type="flex" justify="center" style="margin: 40px 0 30px">
<el-button type="primary" @click="onSave">保存</el-button>
</el-row>
</div>