Quellcode durchsuchen

考勤功能-限制补卡上传附件数量为5

zhonghuizhen vor 1 Jahr
Ursprung
Commit
5f92d6c017

+ 2 - 0
src/views/business/attendance/makeUpEdit.vue

@@ -78,6 +78,7 @@
                     :download="true"
                     multiple
                     accept="*"
+                    :limit="attachmentLimit"
                     :placeholder="readonly? '' : '请上传附件'"
                     :disabled="readonly"
                     style="width:100%"
@@ -131,6 +132,7 @@ export default {
             buKaBanCiOptions: [],
             fileList: [],
             yichangdata: [],
+            attachmentLimit: 5,
             rules: {
                 buKaRiQi: [{ required: true, message: '请选择补卡日期', trigger: 'change' }],
                 buKaBanCi: [{ required: true, message: '请选择补卡班次', trigger: 'change' }],

+ 1 - 1
src/views/business/attendance/makeUpRecords.vue

@@ -119,7 +119,7 @@ export default {
                     item.userName = this.getUserLabel(item.yong_hu_id_)
                     item.deptName = this.getDeptLabel(item.bu_men_)
                 })
-                this.pagination.totalCount = this.listData[0].total_count
+                this.pagination.totalCount = this.listData[0]?.total_count
             }).finally(() => {
                 this.loading = false
             })