13404089107
2025-05-23 5d55874bee62767c1c0debadaf3d794302238072
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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
<template>
    <el-dialog :title="dialogTitle" :visible.sync="visible" width="80%" @open="open" po :close-on-click-modal="false"
        @close="handleClose">
        <div class="approval-dialog">
            <!-- 左侧审批内容 -->
            <div class="approval-content">
                    <template>
                        <el-form ref="form" :model="form" :rules="rules" inline label-position="top">
                            <div style="display: flex;">
                                <div>
                                    <div class="header-title" style="width: 100%;">
                                        <div class="header-title-left">
                                            <img src="@/assets/public/headercard.png" />
                                            <div>报告编号</div>
                                        </div>
                                    </div>
                                    <el-form-item prop="reportCode">
                                        <el-input disabled v-model="form.reportCode" style="width: 100%;"
                                            placeholder="请输入报告编号" />
                                    </el-form-item>
                                </div>
                                <div style="margin-left: 100px;">
                                    <div class="header-title" style="width: 100%;">
                                        <div class="header-title-left">
                                            <img src="@/assets/public/headercard.png" />
                                            <div>报告名称</div>
                                        </div>
                                    </div>
                                    <el-form-item prop="reportName" >
                                        <el-input disabled v-model="form.reportName" style="width: 100%;"
                                            placeholder="请输入报告名称" />
                                    </el-form-item>
                                </div>
                            </div>
 
                            <div class="table">
                                <el-table :data="assessmentTable" border style="width: 100%" :show-summary="true"
                                    :span-method="tableSpanMethod" :summary-method="getTableSummary">
                                    <el-table-column prop="category" label="菌种实验员专业能力考核项" width="180"></el-table-column>
                                    <el-table-column prop="score" label="该项评分" width="120">
                                        <template slot-scope="scope">
                                            <el-radio-group v-if="scope.row.category !== '5.实验失败'"
                                                v-model="scope.row.selectedScore">
                                                <el-radio :label="0">0分</el-radio>
                                                <el-radio :label="1">1分</el-radio>
                                                <el-radio :label="2">2分</el-radio>
                                            </el-radio-group>
                                            <el-radio-group v-else v-model="scope.row.selectedScore">
                                                <el-radio :label="0">否0分</el-radio>
                                                <el-radio :label="-3">是-3分</el-radio>
                                            </el-radio-group>
                                        </template>
                                    </el-table-column>
                                    <el-table-column prop="criteria" label="该项评分参考标准"></el-table-column>
                                    <el-table-column prop="desc" label="评分规则说明">
                                        <template slot-scope="scope">
                                            <p> 【0分】 实验操作失误或实验方案设计无效导致实验失败、数据不可用。</p>
                                            <p> 【1分】存在操作有误及实验过程出现问题,没有严格按照操作规程运行;如实验准备不充分,取样遗漏等。</p>
                                            <p> 【2分】完整按照操作规程及实验室管理制度运行,无任何问题。</p>
                                        </template>
                                    </el-table-column>
                                    <el-table-column prop="rule" label="考评规则">
                                        <template slot-scope="scope">
                                            菌种工程师以分题内容考核菌种实验员。
                                        </template>
                                    </el-table-column>
                                </el-table>
                            </div>
 
 
 
                        </el-form>
                    </template>
                    <!-- <SelectMember ref="selectMember" /> -->
               
            </div>
        </div>
 
        <div slot="footer" class="dialog-footer">
            <el-button type="primary" @click="handleApprove" v-if="!obj.isDetail">提交评定结果</el-button>
        </div>
    </el-dialog>
</template>
 
<script>
import ApprovalProcess from '@/components/approvalProcess'
import AiEditor from '@/components/AiEditor'
// import { getDetail } from '../../service';
 
 
export default {
    name: "ApprovalDialog",
    components: {
        ApprovalProcess,
        AiEditor
    },
    props: {
        visible: {
            type: Boolean,
            default: false,
        },
        type: {
            type: String,
            default: "approve", // approve-审批,view-查看
        },
        obj: {
            type: Object,
            default: () => {
                return {
                    isDetail: false
                }
            },
        },
    },
    data() {
        return {
            form: {
                reportCode: "",
                reportName: "",
                reportText: "",
                teamName: "",
                createBy: "",
                createTime: "",
                status: "",
                approvalComment: "",
                approver: "",
                approveTime: "",
                processData: [],
                updateBy: "",
                auditRemark: "",
                auditPersonName: "",
                auditTime: ""
            },
            assessmentTable: [
                {
                    category: '1.该分题的菌种专业知识',
                    selectedScore: 0,
                    criteria: '1.1 能讲生物学基础,掌握各类微生物形态特性、生化特性及鉴定方法。1.2 菌种选育技术,了解掌握自然选育、诱变选育、基因工程育种。',
                    desc: '',
                    rule: ''
                },
                {
                    category: '2.操作能力',
                    selectedScore: 0,
                    criteria: '1.菌种分离无菌操作规范 2.菌种培养无菌操作规范 3.菌种保存无菌操作规范 4.菌种鉴定无菌操作规范',
                    desc: '',
                    rule: ''
                },
                {
                    category: '3.仪器设备使用',
                    selectedScore: 0,
                    criteria: '能正确使用实验仪器,如移液器、恒温箱等,操作规范。',
                    desc: '',
                    rule: ''
                },
                {
                    category: '4.实验数据记录与分析',
                    selectedScore: 0,
                    criteria: '实验数据记录及时、准确、完整,能简单分析数据。',
                    desc: '',
                    rule: ''
                },
                {
                    category: '5.实验失败',
                    selectedScore: 0,
                    criteria: '无论何种原因,本次实验失败。',
                    desc: '',
                    rule: ''
                }
            ],
            tableData: [],
            rules: {},
            status: "2",
            remark: "",
        };
    },
    computed: {
        dialogTitle() {
            return this.type === "approve" ? "菌种工程师操作评定" : "菌种工程师操作评定详情";
        },
        totalScore() {
            return this.assessmentTable.reduce((sum, item) => sum + (item.selectedScore || 0), 0);
        }
    },
    methods: {
        open() {
 
 
        },
        handleClose() {
            this.$emit("close");
            this.form.approvalComment = "";
        },
        tableSpanMethod({ row, column, rowIndex, columnIndex }) {
            // 评分规则说明(desc)和考评规则(rule)列合并所有行
            // desc列索引为3,rule列索引为4(从0开始)
            if (columnIndex === 3 || columnIndex === 4) {
                if (rowIndex === 0) {
                    return [this.assessmentTable.length, 1]; // 合并所有行
                } else {
                    return [0, 0]; // 其他行隐藏
                }
            }
            return [1, 1];
        },
        getTableSummary(param) {
            const { columns } = param;
            const sums = [];
            columns.forEach((column, index) => {
                if (index === 0) {
                    sums[index] = '合计';
                } else if (index === 1) {
                    sums[index] = this.totalScore + '分';
                } else {
                    sums[index] = '';
                }
            });
            return sums;
        },
        handleApprove() {
            this.$emit("approve", {
                ...this.form,
                statuss: this.status,
                remark: this.remark
            });
        },
 
        handleCurrentChange(page) {
            this.form.pageNum = page
            this.getList()
        },
        handleSizeChange(size) {
            this.form.pageSize = size
            this.getList()
        },
    },
};
</script>
 
<style scoped lang="less">
::v-deep .el-dialog__header {
    border-bottom: 1px solid #e4e7ed;
}
 
.approval-dialog {
 
    .approval-content {
        background: #ffffff;
        border-radius: 10px;
    }
 
    .approval-flow {
        padding: 40px 20px;
        // width: 405px;
        flex: 2;
        background: #ffffff;
        border-radius: 10px;
 
        .flow-title {
            font-size: 16px;
            font-weight: bold;
            margin-bottom: 20px;
            color: #303133;
        }
 
        .flow-content {
            height: calc(100% - 40px);
            overflow-y: auto;
 
            .el-form--inline .el-form-item {
                margin-right: 83px;
            }
        }
    }
}
 
.approval-content-card {
    box-shadow: none !important;
}
 
.header-title {
    // display: flex;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
    gap: 13px;
 
    .header-title-left {
        display: flex;
        align-items: center;
        gap: 13px;
        margin-top: 38px;
 
        img {
            width: 12px;
            height: 19px;
        }
 
        div {
            flex-shrink: 0;
            font-weight: bold;
            font-size: 18px;
            color: #222222;
            line-height: 27px;
            font-family: "Source Han Sans CN Bold Bold";
 
            &:before {
                content: "*";
                color: #f56c6c;
                margin-right: 4px;
            }
        }
 
        span {
            flex-shrink: 0;
            font-weight: bold;
            font-size: 18px;
            color: #222222;
            line-height: 27px;
            font-family: "Source Han Sans CN Bold Bold";
        }
    }
 
    .header-title-left :first-child {
        margin-top: 0;
    }
}
 
.header-title:first-child {
    .header-title-left {
        margin-top: 0;
    }
}
 
.item-title {
    padding-left: 25px;
 
    span {
        flex-shrink: 0;
        font-weight: bold;
        font-size: 14px;
        color: #222222;
        line-height: 27px;
        font-family: "Source Han Sans CN Bold Bold";
        margin: 18px 0;
 
        &:before {
            content: "*";
            color: #f56c6c;
            margin-right: 4px;
        }
    }
}
 
.approval-dialog-approve {
    align-content: center;
 
    .status {
        margin-right: 40px;
        max-width: 60%;
    }
 
    //   align-items: center;
    .status-title {
        color: #222222;
        font-family: "SourceHanSansCN-Medium";
        line-height: 14px;
        margin-bottom: 16px;
    }
 
    .status-content {
        display: flex;
        align-items: center;
        width: 100%;
        gap: 16px;
        background: #ffffff;
        border-radius: 10px;
        border: 1px solid rgba(4, 156, 154, 0.5);
 
        .resolve {
            border-radius: 10px;
            flex: 1;
            font-size: 16px;
            // padding: 5px 55px;
            font-weight: 400;
            color: #333333;
            cursor: pointer;
            line-height: 32px;
            display: flex;
            align-items: center;
            justify-content: center
        }
 
        .reject {
            flex: 1;
            border-radius: 10px;
            font-size: 16px;
            line-height: 32px;
            // padding: 5px 55px;
            font-weight: 400;
            color: #333333;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center
        }
 
        .activeStatus {
            background: #ebfefd;
            color: #049c9a;
            box-shadow: 0px 0px 6px 0px rgba(10, 109, 108, 0.25);
            border-radius: 10px;
        }
    }
 
    .remark-title {
        color: #222222;
        font-family: "SourceHanSansCN-Medium";
        line-height: 14px;
        margin-bottom: 16px;
    }
}
 
.dialog-footer {
    align-items: center;
    display: flex;
    justify-content: center;
    gap: 20px;
 
    button {
        width: 150px;
    }
}
</style>