mirror of
https://github.com/FatttSnake/Pinnacle-OA.git
synced 2026-04-05 23:11:24 +08:00
handle warn
This commit is contained in:
@@ -6,7 +6,3 @@
|
||||
margin-bottom:10px ;
|
||||
}
|
||||
|
||||
#attendanceMain{
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
}
|
||||
@@ -74,7 +74,6 @@ export default {
|
||||
submitForm(form) {
|
||||
this.$refs.ruleForm.validate((valid) => {
|
||||
if (valid) {
|
||||
console.log(form)
|
||||
this.$emit('addAttendance', form)
|
||||
this.resetForm()
|
||||
ElMessage({
|
||||
@@ -99,12 +98,10 @@ export default {
|
||||
created() {
|
||||
if (this.formData) {
|
||||
this.form = this.formData
|
||||
console.log(this.isDisabled)
|
||||
}
|
||||
},
|
||||
updated() {
|
||||
if (this.formData) {
|
||||
console.log(this.isDisabled)
|
||||
this.form = this.formData
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,13 +74,13 @@
|
||||
scope.row.status === 1
|
||||
? 'success'
|
||||
: scope.row.status === 2
|
||||
? 'primary'
|
||||
? ''
|
||||
: scope.row.status === 3
|
||||
? 'warning'
|
||||
: scope.row.status === 1 + ''
|
||||
? 'success'
|
||||
: scope.row.status === 2 + ''
|
||||
? 'primary'
|
||||
? ''
|
||||
: scope.row.status === 3 + ''
|
||||
? 'warning'
|
||||
: 'danger'
|
||||
@@ -217,7 +217,6 @@ export default {
|
||||
request
|
||||
.get('/user')
|
||||
.then((response) => {
|
||||
console.log(response.data.data)
|
||||
this.users = response.data.data
|
||||
})
|
||||
.catch((reportError) => {
|
||||
@@ -229,7 +228,6 @@ export default {
|
||||
request
|
||||
.get('/attendance/findAllAttendance')
|
||||
.then((response) => {
|
||||
console.log(response.data.data)
|
||||
this.tableData = response.data.data
|
||||
})
|
||||
.catch((reportError) => {
|
||||
@@ -237,17 +235,14 @@ export default {
|
||||
})
|
||||
},
|
||||
getAttendancesByTime() {
|
||||
console.log(typeof this.attTime[0])
|
||||
const start = this.handleDateFormatUTC(this.attTime[0])
|
||||
const end = this.handleDateFormatUTC(this.attTime[1])
|
||||
console.log(start + '\t' + end)
|
||||
request
|
||||
.get('/attendance/findAttendanceByTime', {
|
||||
startTime: start,
|
||||
endTime: end
|
||||
})
|
||||
.then((response) => {
|
||||
console.log(response.data.data)
|
||||
this.tableData = response.data.data
|
||||
ElMessage({
|
||||
message: '查询成功',
|
||||
@@ -286,7 +281,6 @@ export default {
|
||||
})
|
||||
},
|
||||
setDialogVisible(dialogVisible) {
|
||||
console.log(dialogVisible)
|
||||
this.dialogFormVisible = dialogVisible
|
||||
this.getAttendances()
|
||||
},
|
||||
@@ -301,8 +295,8 @@ export default {
|
||||
request
|
||||
.post('/attendance/saveAttendance', formData)
|
||||
.then((response) => {
|
||||
console.log(response)
|
||||
this.getAttendances()
|
||||
console.log(response.data.data)
|
||||
})
|
||||
.catch((reportError) => {
|
||||
console.log(reportError)
|
||||
@@ -318,7 +312,6 @@ export default {
|
||||
},
|
||||
addAttendance(formData) {
|
||||
this.doSave(formData)
|
||||
console.log(formData)
|
||||
this.dialogFormVisible = false
|
||||
},
|
||||
// 点击取消
|
||||
@@ -339,11 +332,11 @@ export default {
|
||||
|
||||
// 操作删除
|
||||
handleDelete(id) {
|
||||
console.log(id)
|
||||
request
|
||||
.delete('/attendance/delAttendance/' + id)
|
||||
.then((response) => {
|
||||
if (response) {
|
||||
console.log(response)
|
||||
ElMessage({
|
||||
message: '删除成功',
|
||||
type: 'success'
|
||||
@@ -362,7 +355,6 @@ export default {
|
||||
},
|
||||
// 批量删除
|
||||
handleSelectionChange(val) {
|
||||
console.log(val)
|
||||
this.multipleSelection = val
|
||||
},
|
||||
// 批量删除
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
scope.row.status === 1
|
||||
? 'success'
|
||||
: scope.row.status === 2
|
||||
? 'primary'
|
||||
? ''
|
||||
: scope.row.status === 3
|
||||
? 'warning'
|
||||
: 'danger'
|
||||
@@ -74,17 +74,7 @@
|
||||
</el-table>
|
||||
</div>
|
||||
|
||||
<div class="demo-pagination-block">
|
||||
<el-pagination
|
||||
small
|
||||
:current-page="pageNum"
|
||||
:page-size="pageSize"
|
||||
:page-sizes="[5, 10, 20, 30]"
|
||||
background
|
||||
layout="total,sizes,prev, pager, next,jumper"
|
||||
:total="total"
|
||||
/>
|
||||
</div>
|
||||
<div class="demo-pagination-block"></div>
|
||||
<div>
|
||||
<el-dialog
|
||||
v-model="dialogFormVisible"
|
||||
@@ -187,17 +177,14 @@ export default {
|
||||
},
|
||||
|
||||
getOneAttendancesByTime() {
|
||||
console.log(typeof this.attTimeB[0])
|
||||
const start = this.handleDateFormatUTC(this.attTimeB[0])
|
||||
const end = this.handleDateFormatUTC(this.attTimeB[1])
|
||||
console.log(start + '\t' + end)
|
||||
request
|
||||
.get('/attendance/findOneAttendanceByTime', {
|
||||
startTime: start,
|
||||
endTime: end
|
||||
})
|
||||
.then((response) => {
|
||||
console.log(response.data.data)
|
||||
this.tableData = response.data.data
|
||||
ElMessage({
|
||||
message: '查询成功',
|
||||
@@ -205,7 +192,6 @@ export default {
|
||||
})
|
||||
})
|
||||
.catch((reportError) => {
|
||||
console.log(reportError)
|
||||
ElMessage({
|
||||
message: '查询失败',
|
||||
type: 'error'
|
||||
@@ -217,12 +203,9 @@ export default {
|
||||
request
|
||||
.get('/attendance/selectAttendance')
|
||||
.then((response) => {
|
||||
console.log(response.data.data)
|
||||
this.tableData = response.data.data
|
||||
})
|
||||
.catch((reportError) => {
|
||||
console.log(reportError)
|
||||
})
|
||||
.catch((reportError) => {})
|
||||
},
|
||||
resetForm() {
|
||||
this.$refs.form.resetFields()
|
||||
@@ -242,17 +225,13 @@ export default {
|
||||
.then((response) => {
|
||||
this.dialogFormVisible = false
|
||||
this.getAttendancesByUserId()
|
||||
console.log(response.data.data)
|
||||
})
|
||||
.catch((reportError) => {
|
||||
console.log(reportError)
|
||||
})
|
||||
.catch((reportError) => {})
|
||||
},
|
||||
|
||||
submitForm() {
|
||||
this.$refs.ruleForm.validate((valid) => {
|
||||
if (valid) {
|
||||
console.log(this.form.attTime)
|
||||
this.doSave()
|
||||
ElMessage({
|
||||
message: '操作成功',
|
||||
@@ -281,4 +260,4 @@ export default {
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
<style scoped></style>
|
||||
|
||||
Reference in New Issue
Block a user