licp
2024-12-26 f0a1d1428a7a258a5493ad5f6c36161ce377c7b0
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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
<template>
  <div class="table-item">
    <p style="text-align: center;margin-bottom: 10px;">{{ entity.departLims }}  {{ Number(entity.month.split('-')[1]) }} 月份组长打分表</p>
    <el-table
    :data="tableData"
    style="width: 100%" height="calc(100% - 20px)" v-loading="loading">
      <el-table-column
        type="index"
        label="序号"
        width="55">
      </el-table-column>
      <el-table-column label="姓名" prop="name">
      </el-table-column>
      <el-table-column label="工作责任心">
        <el-table-column label="25">
          <template slot-scope="scope">
            <el-input-number
            size="small"
            v-model="scope.row.responsibility" @change="m=>handleChange(m,scope.row,'responsibility')" :min="0" :max="25"></el-input-number>
          </template>
        </el-table-column>
      </el-table-column>
      <el-table-column label="服从分工">
        <el-table-column label="25">
          <template slot-scope="scope">
            <el-input-number
            size="small"
            v-model="scope.row.compliance" @change="m=>handleChange(m,scope.row,'compliance')" :min="0" :max="25"></el-input-number>
          </template>
        </el-table-column>
      </el-table-column>
      <el-table-column label="积极性">
        <el-table-column label="20">
          <template slot-scope="scope">
            <el-input-number
            size="small"
            v-model="scope.row.positive" @change="m=>handleChange(m,scope.row,'positive')" :min="0" :max="20"></el-input-number>
          </template>
        </el-table-column>
      </el-table-column>
      <el-table-column label="团结同事">
        <el-table-column label="10">
          <template slot-scope="scope">
            <el-input-number
            size="small"
            v-model="scope.row.solidarity" @change="m=>handleChange(m,scope.row,'solidarity')" :min="0" :max="10"></el-input-number>
          </template>
        </el-table-column>
      </el-table-column>
      <el-table-column label="试验及时性">
        <el-table-column label="10">
          <template slot-scope="scope">
            <el-input-number
            size="small"
            v-model="scope.row.seasonable" @change="m=>handleChange(m,scope.row,'seasonable')" :min="0" :max="10"></el-input-number>
          </template>
        </el-table-column>
      </el-table-column>
      <el-table-column label="结果准确性">
        <el-table-column label="10">
          <template slot-scope="scope">
            <el-input-number
            size="small"
            v-model="scope.row.exact" @change="m=>handleChange(m,scope.row,'exact')" :min="0" :max="10"></el-input-number>
          </template>
        </el-table-column>
      </el-table-column>
      <el-table-column label="得分" prop="total">
      </el-table-column>
  </el-table>
  </div>
</template>
 
<script>
export default {
  props:{
    entity:Object,
  },
  data () {
    return{
      tableData:[
        ],
      loading:false,
    }
  },
  created(){
    this.refreshTable()
  },
  methods:{
    handleChange(value,row,prop){
      row[prop] = Number(value)
      this.$axios.post(this.$api.evaluate.writeEvaluateLeader, {
        ...row
        },{
          headers: {
            'Content-Type': 'application/json'
          },
          noQs:true
        }).then(res => {
          row.total = res.data
        })
    },
    refreshTable(){
      this.loading = true
      this.$axios.post(this.$api.evaluate.getEvaluateLeader, {
        ...this.$parent.entity
        },{
          headers: {
            'Content-Type': 'application/json'
          }
        }).then(res => {
          this.loading = false
          this.tableData = res.data
        })
    },
    refresh(){
      this.refreshTable()
    }
  }
}
</script>
 
<style scoped>
.table-item{
  width: 100%;
  height: 100%;
}
>>>.el-table--border th.el-table__cell, .el-table__fixed-right-patch{
  border-color: rgb(225, 223, 223);
}
>>>.el-table .cell, .el-table--border .el-table__cell .cell{
  text-align: center;
}
.el-input-number{
  width: 110px;
}
</style>