Explorar el Código

病理人员修改考试tab

cyy hace 1 año
padre
commit
d3890b43fe

+ 47 - 0
src/views/component/personnelFile/components/dialogDeltail.vue

@@ -63,6 +63,9 @@
                         {{ enumeratedArray[e.assemble][e.contant] }}
 
                     </div>
+                    <div v-else-if="e.type==='secondaryTreatment'" class="contant">
+                        <div v-html="treatment(e.field, e.allData)" />
+                    </div>
                 </div>
             </el-col>
         </el-row>
@@ -112,6 +115,50 @@ export default {
                 }
             }
         }
+    },
+    methods: {
+        treatment (val, data) {
+            switch (val) {
+                case 'panduandefen':
+                    return data.hasOwnProperty('scoringType')
+                        ? data['scoringType'] === '平均分'
+                            ? (data['averageScore'] * 1).toFixed(2)
+                            : data['scoringType'] === '最高分'
+                                ? (data['maxScore'] * 1).toFixed(2)
+                                : data['scoringType'] === '最近得分'
+                                    ? (data['recentScore'] * 1).toFixed(2)
+                                    : ''
+                        : ''
+                case 'panduanexamDesc':
+                    if (data['paperState'] === '已完成') {
+                        // 计算是否达标
+                        const passScore =
+                    (+data['totalScore'] * +data['qualifiedRadio']) / 100
+                        let curScore = null
+                        if (data['scoringType'] === '平均分') {
+                            curScore = +data['averageScore']
+                        }
+                        if (data['scoringType'] === '最高分') {
+                            curScore = +data['maxScore']
+                        }
+                        if (data['scoringType'] === '最近得分') {
+                            curScore = +data['recentScore']
+                        }
+                        if (curScore >= passScore) {
+                            return `<div style="color:#67c23a;">已达标</div>`
+                        }
+                        return `<div style="color:#f43636;">未达标</div>`
+                    } else {
+                        // 未完成分两种:未开始和待批阅
+                        if (data['submittedCount'] > 0) {
+                            return `<div style="color:#ffa500;">待批阅</div>`
+                        }
+                        return '/'
+                    }
+                default:
+                    break
+            }
+        }
     }
 }
 </script>

+ 63 - 12
src/views/component/personnelFile/components/publicList.vue

@@ -84,6 +84,9 @@
                             </div>
                             <p class="ellipsis" @mouseover="inputOnMouseOver($event)">{{ scope.row.hasOwnProperty(item.field) > 0 ? enumeratedArray[item.assemble][scope.row[item.field]]:'/' }}</p>
                         </el-tooltip>
+                        <div v-else-if="item.type==='secondaryTreatment'" class="grid-content bg-purple-light">
+                            <div v-html="treatment(item.field, scope.row)" />
+                        </div>
                         <div v-else>/</div>
 
                     </template>
@@ -225,15 +228,59 @@ export default {
                 if (item.length > 1) {
                     item.forEach(it => {
                         it.contant = val[it.field]
+                        it.allData = val
                     })
                 } else {
                     item[0].contant = val[item[0].field]
+                    item[0].allData = val
                 }
             })
             console.log(this.dialogData)
         },
         changeDetails (val) {
             this.dialogDetails = val
+        },
+        treatment (val, data) {
+            switch (val) {
+                case 'panduandefen':
+                    return data.hasOwnProperty('scoringType')
+                        ? data['scoringType'] === '平均分'
+                            ? (data['averageScore'] * 1).toFixed(2)
+                            : data['scoringType'] === '最高分'
+                                ? (data['maxScore'] * 1).toFixed(2)
+                                : data['scoringType'] === '最近得分'
+                                    ? (data['recentScore'] * 1).toFixed(2)
+                                    : ''
+                        : ''
+                case 'panduanexamDesc':
+                    if (data['paperState'] === '已完成') {
+                        // 计算是否达标
+                        const passScore =
+                    (+data['totalScore'] * +data['qualifiedRadio']) / 100
+                        let curScore = null
+                        if (data['scoringType'] === '平均分') {
+                            curScore = +data['averageScore']
+                        }
+                        if (data['scoringType'] === '最高分') {
+                            curScore = +data['maxScore']
+                        }
+                        if (data['scoringType'] === '最近得分') {
+                            curScore = +data['recentScore']
+                        }
+                        if (curScore >= passScore) {
+                            return `<div style="color:#67c23a;">已达标</div>`
+                        }
+                        return `<div style="color:#f43636;">未达标</div>`
+                    } else {
+                        // 未完成分两种:未开始和待批阅
+                        if (data['submittedCount'] > 0) {
+                            return `<div style="color:#ffa500;">待批阅</div>`
+                        }
+                        return '/'
+                    }
+                default:
+                    break
+            }
         }
     }
 }
@@ -265,13 +312,17 @@ export default {
     }
     .contentAll{
         height: 85%;
-        overflow-y: auto;
+        width: 99.5%;
+        overflow-y: hidden;
+        overflow-x: auto;
         ::v-deep .ibps-attachment-selector{
             min-width: 0;
         }
         .tableCol{
             height: 92%;
-            overflow-y: auto;
+            overflow-y: hidden;
+            overflow-x: auto;
+
             ::v-deep .el-table__fixed-right{
                 .el-table__fixed-body-wrapper{
                     .el-table__body{
@@ -290,17 +341,17 @@ export default {
                     }
                 }
             }
-            ::v-deep .el-table__body-wrapper::-webkit-scrollbar {
-                display: none; /* for Chrome, Safari, and Opera */
-            }
+            // ::v-deep .el-table__body-wrapper::-webkit-scrollbar {
+            //     display: none; /* for Chrome, Safari, and Opera */
+            // }
 
-            ::v-deep .el-table__body-wrapper {
-                -ms-overflow-style: none;  /* for Internet Explorer, Edge */
-                scrollbar-width: none;  /* for Firefox */
-            }
-            ::v-deep .el-table__fixed-right-patch{
-                width: 0 !important;
-            }
+            // ::v-deep .el-table__body-wrapper {
+            //     -ms-overflow-style: none;  /* for Internet Explorer, Edge */
+            //     scrollbar-width: none;  /* for Firefox */
+            // }
+            // ::v-deep .el-table__fixed-right-patch{
+            //     width: 0 !important;
+            // }
         }
         .tableCol::-webkit-scrollbar{
             display: none;

+ 18 - 15
src/views/component/personnelFile/constants/simulated.js

@@ -526,24 +526,27 @@ export const correlationConfig = {
     },
     kaoshijilu: {
         config: [
-            { label: '考试名称', width: '25%', type: 'text', field: 'examName' },
-            { label: '考试类型', width: '15%', type: 'text', field: 'examType' },
-            { label: '考试达标状态', width: '15%', type: 'text', field: 'examDesc' },
-            { label: '开始时间', width: '20%', type: 'text', field: 'startDate' },
-            { label: '考试总分', width: '15%', type: 'text', field: 'totalScore' }
+            { label: '考试名称', width: '15%', type: 'text', field: 'examName' },
+            { label: '考试题库', width: '15%', type: 'text', field: 'bankName' },
+            { label: '题库类型', width: '15%', type: 'text', field: 'bankType' },
+            { label: '考试题数', width: '10%', type: 'text', field: 'questionCount' },
+            { label: '考试总分', width: '10%', type: 'text', field: 'totalScore' },
+            { label: '得分', width: '10%', type: 'secondaryTreatment', field: 'panduandefen' },
+            { label: '考试达标状态', width: '10%', type: 'secondaryTreatment', field: 'panduanexamDesc' },
+            { label: '开始时间', width: '15%', type: 'text', field: 'startDate' },
+            { label: '参考次数', width: '10%', type: 'text', field: 'submittedCount' },
+            { label: '完成次数', width: '10%', type: 'text', field: 'completedCount' },
+            { label: '达标分值占比', width: '10%', type: 'text', field: 'qualifiedRadio' },
+            { label: '计分方式', width: '10%', type: 'text', field: 'scoringType' }
 
         ],
         dialog: [
-            [{ name: '考试名称', field: 'examName', type: 'text' }, { name: '考试类型', field: 'examType', type: 'text' }],
-            [{ name: '是否随机', field: 'isRandom', type: 'enumeration', assemble: 'numberBoolean' }, { name: '计分方式', field: 'scoringType', type: 'text' }],
-            [{ name: '考试题库', field: 'bankName', type: 'text' }, { name: '题库类型', field: 'bankType', type: 'text' }],
-            [{ name: '考试题数', field: 'questionCount', type: 'text' }, { name: '考试总分', field: 'totalScore', type: 'text' }],
-            [{ name: '考试时长', field: 'duration', type: 'text' }, { name: '考试状态', field: 'examState', type: 'text' }],
-            [{ name: '考试完成状态', field: 'paperState', type: 'text' }, { name: '考试达标状态', field: 'examDesc', type: 'text' }],
-            [{ name: '开始时间', field: 'startDate', type: 'text' }, { name: '限考时间', field: 'limitDate', type: 'text' }],
-            [{ name: '限考次数', field: 'limitCount', type: 'text' }, { name: '达标占比', field: 'qualifiedRadio', type: 'text' }],
-            [{ name: '最高得分', field: 'maxScore', type: 'text' }, { name: '最近得分', field: 'recentScore', type: 'text' }],
-            [{ name: '平均得分', field: 'averageScore', type: 'text' }]
+            [{ name: '考试名称', field: 'examName', type: 'text' }, { name: '考试达标状态', field: 'panduanexamDesc', type: 'secondaryTreatment' }],
+            [{ name: '考试题库', field: 'bankName', type: 'text' }, { name: '开始时间', field: 'startDate', type: 'text' }],
+            [{ name: '题库类型', field: 'bankType', type: 'text' }, { name: '参考次数', field: 'submittedCount', type: 'text' }],
+            [{ name: '考试题数', field: 'questionCount', type: 'text' }, { name: '完成次数', field: 'completedCount', type: 'text' }],
+            [{ name: '考试总分', field: 'totalScore', type: 'text' }, { name: '达标分值占比', field: 'qualifiedRadio', type: 'text' }],
+            [{ name: '得分', field: 'panduandefen', type: 'secondaryTreatment' }, { name: '计分方式', field: 'scoringType', type: 'text' }]
         ]
     },
     tjbgb: {