licp
2024-12-31 5c8aaba66c16b1a143fdec27e29ad36eaefd1e3a
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
138
139
140
141
142
143
144
145
<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="20">
          <template slot-scope="scope">
            <el-input-number
            size="small"
            v-model="scope.row.skill" @change="m=>handleChange(m,scope.row,'skill')" :min="0" :max="20"></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.compliance" @change="m=>handleChange(m,scope.row,'compliance')" :min="0" :max="20"></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="5S-3定">
        <el-table-column label="10">
          <template slot-scope="scope">
            <el-input-number
            size="small"
            v-model="scope.row.tidy" @change="m=>handleChange(m,scope.row,'tidy')" :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.discipline" @change="m=>handleChange(m,scope.row,'discipline')" :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.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.proposal" @change="m=>handleChange(m,scope.row,'proposal')" :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.writeEvaluateCompetent, {
        ...row
        },{
          headers: {
            'Content-Type': 'application/json'
          },
          noQs:true
        }).then(res => {
          row.total = res.data
        })
    },
    refreshTable(){
      this.loading = true
      this.$axios.post(this.$api.evaluate.getEvaluateCompetent, {
        ...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>