Browse Source

提交代码

zlwu 1 year ago
parent
commit
8b57a2722b
1 changed files with 3 additions and 6 deletions
  1. 3 6
      web/src/views/xskh/disciplineRecord/index.vue

+ 3 - 6
web/src/views/xskh/disciplineRecord/index.vue

@@ -18,8 +18,7 @@
               <el-col :span="6">
                 <el-form-item label="违纪来源" prop="violationSource">
                   <el-select v-model="queryParams.violationSource" placeholder="请选择违纪来源" clearable>
-                    <el-option label="宿舍卫生检查" value="1" />
-                    <el-option label="其他来源" value="2" />
+                    <el-option v-for="dict in xskh_violation_source" :key="dict.value" :label="dict.label" :value="dict.value" />
                   </el-select>
                 </el-form-item>
               </el-col>
@@ -91,9 +90,7 @@
         <el-table-column label="违纪处分类型" align="center" prop="disciplineTypeName" min-width="140" show-overflow-tooltip />
         <el-table-column label="违纪来源" align="center" prop="violationSource" min-width="120">
           <template #default="scope">
-            <el-tag v-if="scope.row.violationSource === '1'" type="warning" size="small">宿舍卫生检查</el-tag>
-            <el-tag v-else-if="scope.row.violationSource === '2'" type="info" size="small">其他来源</el-tag>
-            <span v-else>-</span>
+            <dict-tag :options="xskh_violation_source" :value="scope.row.violationSource" />
           </template>
         </el-table-column>
         <el-table-column label="违纪处分日期" align="center" prop="disciplineDate" min-width="130" />
@@ -159,7 +156,7 @@ import {
 import DisciplineRecordForm from './DisciplineRecordForm.vue';
 
 const { proxy } = getCurrentInstance() as ComponentInternalInstance;
-const { student_discipline_status } = toRefs<any>(proxy?.useDict('student_discipline_status'));
+const { student_discipline_status, xskh_violation_source } = toRefs<any>(proxy?.useDict('student_discipline_status', 'xskh_violation_source'));
 
 const disciplineRecordList = ref<DisciplineRecordVO[]>([]);
 const loading = ref(true);