diff --git a/src/api/system/attMacManage.js b/src/api/system/attMacManage.js index 11eb71b..5ad9e34 100644 --- a/src/api/system/attMacManage.js +++ b/src/api/system/attMacManage.js @@ -3,7 +3,7 @@ import request from '@/utils/request' // 获取工程和考勤机树形数据 export function getProjectAndMacTreeAPI() { return request({ - url: '/system/attMacManage/tree', + url: '/bmw/kqManager/getProKqjTree', method: 'get', }) } @@ -11,7 +11,7 @@ export function getProjectAndMacTreeAPI() { // 根据考勤机编号获取人员列表 export function getPersonListByMacNoAPI(params) { return request({ - url: '/system/attMacManage/personList', + url: '/bmw/kqManager/getWorkerByDeviceId', method: 'get', params, }) @@ -20,17 +20,18 @@ export function getPersonListByMacNoAPI(params) { // 获取所有人员列表 export function getAllPersonListAPI(params) { return request({ - url: '/system/attMacManage/allPersonList', + url: '/bmw/kqManager/getProDeviceWorker', method: 'get', params, }) } // 删除人员 -export function deletePersonAPI(id) { +export function deletePersonAPI(data) { return request({ - url: '/system/attMacManage/deletePerson/' + id, + url: '/bmw/kqManager/delWorkerByDevice/', method: 'post', + data, }) } @@ -46,7 +47,7 @@ export function batchDeletePersonAPI(ids) { // 下发 export function sendDownAPI(data) { return request({ - url: '/system/attMacManage/sendDown', + url: '/bmw/kqManager/pushWorkerByDevice', method: 'post', data, }) @@ -64,17 +65,17 @@ export function configAPI(data) { // 刷新 export function refreshAPI(macNo) { return request({ - url: '/system/attMacManage/refresh', + url: '/bmw/kqManager/refreshDevice', method: 'post', - data: { macNo }, + data: { deviceCode: macNo }, }) } // 重启 export function restartAPI(macNo) { return request({ - url: '/system/attMacManage/restart', + url: '/bmw/kqManager/restartDevice', method: 'post', - data: { macNo }, + data: { deviceCode: macNo }, }) } diff --git a/src/views/system/AttMacManage/components/leftTree.vue b/src/views/system/AttMacManage/components/leftTree.vue index 0bacb32..e1b98b9 100644 --- a/src/views/system/AttMacManage/components/leftTree.vue +++ b/src/views/system/AttMacManage/components/leftTree.vue @@ -41,7 +41,7 @@ export default { treeData: [], defaultProps: { children: 'children', - label: 'label', + label: 'name', }, } }, @@ -58,6 +58,7 @@ export default { async getTreeData() { try { const res = await getProjectAndMacTreeAPI() + if (res.code === 200) { this.treeData = res.data || [] } @@ -103,7 +104,7 @@ export default { // 树节点过滤 filterNode(value, data) { if (!value) return true - return data.label.indexOf(value) !== -1 + return data.name.indexOf(value) !== -1 }, // 树节点点击事件 handleNodeClick(data) { diff --git a/src/views/system/AttMacManage/components/rightTable.vue b/src/views/system/AttMacManage/components/rightTable.vue index 685a398..a8672c4 100644 --- a/src/views/system/AttMacManage/components/rightTable.vue +++ b/src/views/system/AttMacManage/components/rightTable.vue @@ -1,75 +1,190 @@ - +