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