Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
JINRUN-PERPOSITION
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xinzhedeai
JINRUN-PERPOSITION
Commits
bc203d29
Commit
bc203d29
authored
Nov 29, 2025
by
xinzhedeai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add:员工接口对接 解绑、绑定 定位卡号列表
parent
716588d1
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
65 deletions
+38
-65
card.js
src/api/jinrun/card.js
+11
-0
fangke.vue
src/views/person/fangke.vue
+3
-1
yuangong.vue
src/views/person/yuangong.vue
+24
-64
No files found.
src/api/jinrun/card.js
View file @
bc203d29
...
...
@@ -11,6 +11,17 @@ export function listCard(query) {
})
}
export
function
listUnboundCard
(
query
)
{
return
request
({
url
:
'
/person/card/getUnboundCardList
'
,
method
:
'
GET
'
,
// data: query
params
:
query
})
}
// 查询人员定位卡详细
export
function
getCard
(
id
)
{
return
request
({
...
...
src/views/person/fangke.vue
View file @
bc203d29
...
...
@@ -233,6 +233,8 @@ import {
getInfo
,
getCardList
,
// 引入获取定位卡号列表的接口
}
from
"
@/api/jinrun/fangke
"
;
import
{
listUnboundCard
}
from
"
@/api/jinrun/card
"
;
// 引入获取未绑定定位卡号列表的接口
import
{
getDict
}
from
"
@/api/jinrun/common
"
;
export
default
{
...
...
@@ -312,7 +314,7 @@ export default {
/** 获取定位卡号列表数据 */
getCardIdList
()
{
getCardList
()
listUnboundCard
()
.
then
((
response
)
=>
{
this
.
cardIdOptions
=
response
.
data
||
[];
})
...
...
src/views/person/yuangong.vue
View file @
bc203d29
...
...
@@ -86,7 +86,7 @@
size=
"small"
icon=
"el-icon-unlock"
v-if=
"scope.row.cardId"
@
click=
"handleUnbindCard(scope.row)"
@
click=
"handleUnbindCard
1
(scope.row)"
>
定位卡解绑
</el-button
>
<el-button
...
...
@@ -293,9 +293,8 @@ import {
addInfo
,
getInfo
,
// 引入获取人员信息的接口
updateInfo
,
unbindCard
,
getCardList
,
// 引入获取定位卡号列表的接口
}
from
"
@/api/jinrun/yuangong
"
;
import
{
listUnboundCard
}
from
"
@/api/jinrun/card
"
;
// 引入获取未绑定定位卡号列表的接口
import
{
getDict
}
from
"
@/api/jinrun/common
"
;
import
{
getDept
,
getPosition
}
from
"
@/api/jinrun/zhongkong
"
;
...
...
@@ -307,16 +306,7 @@ export default {
components
:
{
Treeselect
},
data
()
{
return
{
deptOptions
:
[
{
label
:
"
部门1
"
,
value
:
"
1
"
,
},
{
label
:
"
部门2
"
,
value
:
"
2
"
,
},
],
deptOptions
:
[],
// 绑定卡对话框
bindOpen
:
false
,
// 绑定卡表单
...
...
@@ -512,69 +502,42 @@ export default {
}));
});
},
/** 获取部门列表 */
// getDeptList() {
// getDept({
// pageNum: 1,
// pageSize: 1000,
// }).then((response) => {
// console.log(response.data, "33333");
// this.deptOptions = response.data.data[0].children.map((item) => ({
// label: item.deptName,
// value: item.deptId,
// }));
// });
// },
/** 解绑卡按钮操作 */
handleUnbindCard
(
row
)
{
handleUnbindCard1
(
row
)
{
const
formData
=
{
...
row
};
formData
.
cardId
=
""
;
this
.
$modal
.
confirm
(
"
是否确认
解绑该人员的卡
?
"
)
.
confirm
(
"
是否确认
删除该数据项
?
"
)
.
then
(
function
()
{
return
unbindCard
({
personId
:
row
.
personId
,
personType
:
row
.
personType
,
});
return
updateInfo
(
formData
);
})
.
then
(()
=>
{
this
.
$modal
.
msgSuccess
(
"
解绑成功
"
);
this
.
bindOpen
=
false
;
this
.
getList
();
this
.
$modal
.
msgSuccess
(
"
解绑卡成功
"
);
})
.
catch
(()
=>
{});
},
/** 绑定卡按钮操作 */
handleBindCard
(
row
)
{
this
.
bindForm
=
{
personId
:
row
.
personId
,
realName
:
row
.
realName
,
cardId
:
row
.
cardId
||
null
,
personType
:
row
.
personType
||
"
staff
"
,
};
this
.
bindForm
=
{
...
row
};
this
.
bindOpen
=
true
;
},
/** 取消绑定卡对话框 */
cancelBind
()
{
this
.
bindOpen
=
false
;
this
.
bindForm
=
{
personId
:
null
,
realName
:
null
,
cardId
:
null
,
personType
:
"
staff
"
,
};
this
.
bindForm
=
{};
},
/** 提交绑定卡表单 */
submitBindForm
()
{
this
.
$refs
[
"
bindForm
"
].
validate
((
valid
)
=>
{
if
(
valid
)
{
bindCard
(
this
.
bindForm
)
.
then
((
response
)
=>
{
updateInfo
(
this
.
bindForm
).
then
((
response
)
=>
{
this
.
$modal
.
msgSuccess
(
"
绑定成功
"
);
this
.
bindOpen
=
false
;
this
.
getList
();
})
.
catch
((
error
)
=>
{
this
.
$modal
.
msgError
(
"
绑定失败,请重试
"
);
console
.
error
(
"
绑定卡失败:
"
,
error
);
});
}
});
...
...
@@ -594,13 +557,8 @@ export default {
},
/** 获取定位卡号列表数据 */
getCardIdList
()
{
getCardList
()
.
then
((
response
)
=>
{
listUnboundCard
().
then
((
response
)
=>
{
this
.
cardIdOptions
=
response
.
data
||
[];
})
.
catch
((
error
)
=>
{
this
.
$modal
.
msgError
(
"
获取定位卡号列表失败
"
);
console
.
error
(
"
获取定位卡号列表失败:
"
,
error
);
});
},
...
...
@@ -620,7 +578,9 @@ export default {
},
// 表单重置
reset
()
{
this
.
form
=
{};
this
.
form
=
{
sex
:
"
男
"
,
};
this
.
resetForm
(
"
form
"
);
},
/** 搜索按钮操作 */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment