zouyu
2025-03-18 bc44c8e3c9d85691ce3fa73ef1300a6fae46e365
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
146
147
148
149
150
151
152
153
154
155
<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="380"
      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>
import {
  writeEvaluateLeader,
  getEvaluateLeader,
} from "../../../api/cnas/performance/staffEvaluate";
 
export default {
  props: {
    entity: Object,
  },
  data() {
    return {
      tableData: [],
      loading: false,
    };
  },
  created() {
    this.refreshTable();
  },
  methods: {
    handleChange(value, row, prop) {
      row[prop] = Number(value);
      writeEvaluateLeader({ ...row }).then((res) => {
        row.total = res.data;
      });
    },
    refreshTable() {
      this.loading = true;
      getEvaluateLeader(this.entity).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>