考勤机管理接口调试
This commit is contained in:
parent
a05ea7ebc9
commit
0a8e5e5f8c
|
|
@ -108,10 +108,10 @@ export function getTaskHistoryListAPI(params) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 批量删除任务
|
// 批量删除任务
|
||||||
export function batchDeleteTaskAPI(ids) {
|
export function batchDeleteTaskAPI(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/system/attMacManage/delHisTaskById',
|
url: '/bmw/kqManager/delHisTaskById',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: { ids },
|
data,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,10 +7,22 @@
|
||||||
:columnsList="columnsList"
|
:columnsList="columnsList"
|
||||||
:request-api="requestApi"
|
:request-api="requestApi"
|
||||||
:showOperation="false"
|
:showOperation="false"
|
||||||
:isSelectShow="false"
|
:isSelectShow="true"
|
||||||
:sendParams="sendParams"
|
:sendParams="sendParams"
|
||||||
ref="tableRef"
|
ref="tableRef"
|
||||||
|
@selection-change="handleSelectionChange"
|
||||||
>
|
>
|
||||||
|
<template slot="btn">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="danger"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
:disabled="selectedData.length === 0"
|
||||||
|
@click="handleBatchDelete"
|
||||||
|
>
|
||||||
|
批量删除
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
<template slot="transStatus" slot-scope="{ data }">
|
<template slot="transStatus" slot-scope="{ data }">
|
||||||
<el-tag
|
<el-tag
|
||||||
size="mini"
|
size="mini"
|
||||||
|
|
@ -58,7 +70,10 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import TableModel from '@/components/TableModel'
|
import TableModel from '@/components/TableModel'
|
||||||
import { getTaskHistoryListAPI } from '@/api/system/attMacManage.js'
|
import {
|
||||||
|
getTaskHistoryListAPI,
|
||||||
|
batchDeleteTaskAPI,
|
||||||
|
} from '@/api/system/attMacManage.js'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TaskHistoryList',
|
name: 'TaskHistoryList',
|
||||||
|
|
@ -155,6 +170,7 @@ export default {
|
||||||
t_props: 'msg',
|
t_props: 'msg',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
selectedData: [],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
@ -189,6 +205,36 @@ export default {
|
||||||
this.$refs.tableRef.getTableList()
|
this.$refs.tableRef.getTableList()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
handleSelectionChange(val) {
|
||||||
|
this.selectedData = val
|
||||||
|
},
|
||||||
|
handleBatchDelete() {
|
||||||
|
if (this.selectedData.length === 0) {
|
||||||
|
this.$modal.msgWarning('请选择要删除的数据')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.$modal
|
||||||
|
.confirm(
|
||||||
|
'确定要删除选中的 ' +
|
||||||
|
this.selectedData.length +
|
||||||
|
' 条数据吗?',
|
||||||
|
)
|
||||||
|
.then(() => {
|
||||||
|
const ids = this.selectedData.map((item) => item.taskId)
|
||||||
|
batchDeleteTaskAPI({
|
||||||
|
taskId: ids.join(','),
|
||||||
|
})
|
||||||
|
.then((res) => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
this.$modal.msgSuccess('批量删除成功')
|
||||||
|
this.$refs.tableRef.getTableList()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(() => {})
|
||||||
|
})
|
||||||
|
.catch(() => {})
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
:columnsList="columnsList"
|
:columnsList="columnsList"
|
||||||
:request-api="requestApi"
|
:request-api="requestApi"
|
||||||
:showOperation="false"
|
:showOperation="false"
|
||||||
:isSelectShow="false"
|
:isSelectShow="true"
|
||||||
:sendParams="sendParams"
|
:sendParams="sendParams"
|
||||||
ref="tableRef"
|
ref="tableRef"
|
||||||
@selection-change="handleSelectionChange"
|
@selection-change="handleSelectionChange"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue