From cc293fa784ef19dd88477fc2d763a93bd8c2d6ce Mon Sep 17 00:00:00 2001
From: gzw <1571020389@qq.com>
Date: Thu, 8 Jun 2023 00:40:01 +0800
Subject: [PATCH] Split the punch card assembly
---
.../{ => attendance}/EditAttendance.vue | 2 +-
.../attendance/EditOneAttendance.vue | 80 +++++++++++++++++++
ui/src/pages/attendance/AttendanceHome.vue | 2 +
ui/src/pages/attendance/UserAttendance.vue | 57 ++-----------
4 files changed, 89 insertions(+), 52 deletions(-)
rename ui/src/components/{ => attendance}/EditAttendance.vue (98%)
create mode 100644 ui/src/components/attendance/EditOneAttendance.vue
diff --git a/ui/src/components/EditAttendance.vue b/ui/src/components/attendance/EditAttendance.vue
similarity index 98%
rename from ui/src/components/EditAttendance.vue
rename to ui/src/components/attendance/EditAttendance.vue
index c37351f..da55599 100644
--- a/ui/src/components/EditAttendance.vue
+++ b/ui/src/components/attendance/EditAttendance.vue
@@ -1,6 +1,6 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ui/src/pages/attendance/AttendanceHome.vue b/ui/src/pages/attendance/AttendanceHome.vue
index a951a0e..f91dc8d 100644
--- a/ui/src/pages/attendance/AttendanceHome.vue
+++ b/ui/src/pages/attendance/AttendanceHome.vue
@@ -130,6 +130,7 @@
width="25% "
:close-on-click-modal="false"
:show-close="false"
+ style="min-width: 320px"
>
+
-
-
-
-
-
-
-
-
-
+
@@ -113,11 +103,7 @@ export default {
attTime: [],
attTimeB: [],
status: '',
- pageNum: 1,
- pageSize: 10,
- total: 0,
nowTime: new Date(),
- formLabelWidth: '80px',
dataLoading: true,
value1: '',
form: {
@@ -152,6 +138,10 @@ export default {
newFormat = yy + '-' + mm + '-' + dd + ' ' + hh + ':' + mf + ':' + ss
return newFormat
},
+ setDialogVisible(dialogVisible) {
+ this.dialogFormVisible = dialogVisible
+ this.getAttendancesByUserId()
+ },
// 重置参数
resetParam() {
@@ -215,44 +205,9 @@ export default {
handleAdd() {
this.dialogFormVisible = true
// this.getNowDate()
- this.nowTime = new Date()
- this.form.attTime = this.nowTime
this.$nextTick(() => {
this.form.userId = this.userId + ''
})
- },
- doSave() {
- request
- .post('/attendance/saveOneAttendance', this.form)
- .then((response) => {
- this.dialogFormVisible = false
- this.getAttendancesByUserId()
- })
- .catch((reportError) => {})
- },
-
- submitForm() {
- this.$refs.ruleForm.validate((valid) => {
- if (valid) {
- this.doSave()
- ElMessage({
- message: '操作成功',
- type: 'success'
- })
- } else {
- ElMessage.error('操作失败')
- return false
- }
- })
- },
- // 点击取消
- cancel() {
- this.dialogFormVisible = false
- ElMessage({
- message: '取消操作',
- type: 'warning'
- })
- this.getAttendancesByUserId()
}
},