From 0f4440dfeba189b0e56ccad8672b0fedc93826c1 Mon Sep 17 00:00:00 2001
From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com>
Date: Mon, 1 Dec 2025 18:20:58 +0800
Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=80=83=E5=8B=A4=E6=9C=BA?=
=?UTF-8?q?=E7=AE=A1=E7=90=86=E6=8E=A5=E5=8F=A3=E8=B0=83=E8=AF=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/system/attMacManage.js | 21 +-
.../AttMacManage/components/leftTree.vue | 5 +-
.../AttMacManage/components/rightTable.vue | 416 +++++++++++++++---
src/views/system/AttMacManage/index.vue | 226 +---------
4 files changed, 382 insertions(+), 286 deletions(-)
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 @@
-
-
-
-
-
- 批量删除
+
+
+
+
+
+
+ 批量删除
+
+
+ 下发
+
+
+ 配置
+
+
+ 刷新
+
+
+ 重启
+
+
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
- 删除
-
-
-
-
-
+
+
+
+
-
+