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
ec13edd4
Commit
ec13edd4
authored
Nov 27, 2025
by
xinzhedeai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add:人员接口对接,员工页面开发
parent
d9d7c7a4
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
148 additions
and
91 deletions
+148
-91
renyuan.js
src/api/jinrun/renyuan.js
+1
-9
card.vue
src/views/device/card.vue
+16
-0
renyuan.vue
src/views/person/renyuan.vue
+2
-18
yuangong.vue
src/views/person/yuangong.vue
+129
-64
No files found.
src/api/jinrun/renyuan.js
View file @
ec13edd4
...
...
@@ -3,19 +3,11 @@ import request from '@/utils/request'
// 查询人员信息列表
export
function
listInfo
(
query
)
{
return
request
({
url
:
'
/person/info/get
RemotePersonInfo
List
'
,
url
:
'
/person/info/get
Person
List
'
,
method
:
'
get
'
,
params
:
query
})
}
// 解绑卡
export
function
unbindCard
(
data
)
{
return
request
({
url
:
'
/person/info/unbindCard
'
,
method
:
'
put
'
,
data
:
data
})
}
// 新增人员信息
export
function
addInfo
(
data
)
{
...
...
src/views/device/card.vue
View file @
ec13edd4
...
...
@@ -68,6 +68,8 @@
</el-tag>
</
template
>
</el-table-column>
<el-table-column
label=
"姓名"
align=
"center"
prop=
"realName"
/>
<el-table-column
label=
"身份证号"
align=
"center"
prop=
"idNumber"
/>
<el-table-column
label=
"备注"
align=
"center"
prop=
"remark"
/>
<el-table-column
label=
"操作"
...
...
@@ -75,6 +77,20 @@
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-link"
@
click=
"handleBindCard(scope.row)"
>
定位卡绑定
</el-button
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-unlock"
@
click=
"handleUnbindCard(scope.row)"
>
定位卡解绑
</el-button
>
<el-button
size=
"small"
type=
"primary"
...
...
src/views/person/renyuan.vue
View file @
ec13edd4
...
...
@@ -90,13 +90,7 @@
</
template
>
<
script
>
import
{
listInfo
,
delInfo
,
addInfo
,
updateInfo
,
unbindCard
,
}
from
"
@/api/jinrun/renyuan
"
;
import
{
listInfo
}
from
"
@/api/jinrun/renyuan
"
;
import
{
getDict
}
from
"
@/api/jinrun/common
"
;
export
default
{
...
...
@@ -234,7 +228,7 @@ export default {
getList
()
{
this
.
loading
=
true
;
listInfo
(
this
.
queryParams
).
then
((
response
)
=>
{
this
.
infoList
=
response
.
data
;
this
.
infoList
=
response
.
records
;
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
});
...
...
@@ -415,16 +409,6 @@ export default {
})
.
catch
(()
=>
{});
},
/** 导出按钮操作 */
handleExport
()
{
this
.
download
(
"
system/info/export
"
,
{
...
this
.
queryParams
,
},
`info_
${
new
Date
().
getTime
()}
.xlsx`
);
},
},
};
</
script
>
...
...
src/views/person/yuangong.vue
View file @
ec13edd4
...
...
@@ -63,7 +63,7 @@
<el-table-column
label=
"联系方式"
align=
"center"
prop=
"phone"
/>
<el-table-column
label=
"身份证号"
align=
"center"
prop=
"idCard"
/>
<el-table-column
label=
"所在部门1"
align=
"center"
prop=
"dept"
/>
<el-table-column
label=
"岗位名称"
align=
"center"
prop=
"idCard"
/>
<el-table-column
label=
"岗位名称
1
"
align=
"center"
prop=
"idCard"
/>
<el-table-column
label=
"定位卡号"
align=
"center"
prop=
"cardId"
/>
<el-table-column
label=
"操作"
...
...
@@ -73,10 +73,19 @@
width=
"180"
>
<template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-link"
v-if=
"!scope.row.cardId"
@
click=
"handleBindCard(scope.row)"
>
定位卡绑定
</el-button
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-unlock"
v-if=
"scope.row.cardId"
@
click=
"handleUnbindCard(scope.row)"
>
定位卡解绑
</el-button
>
...
...
@@ -106,8 +115,7 @@
@
pagination=
"getList"
/>
<!-- 添加或修改人员信息对话框 -->
<!-- 添加或修改人员信息对话框 -->
<!-- 添加或修改员工信息对话框 -->
<el-dialog
:title=
"title"
:visible.sync=
"open"
width=
"700px"
append-to-body
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
<!-- 使用el-row和el-col实现一行两列布局 -->
...
...
@@ -210,7 +218,7 @@
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"
工龄
"
prop=
"seniority"
>
<el-form-item
label=
"
家庭住址11
"
prop=
"seniority"
>
<el-input
v-model=
"form.seniority"
placeholder=
""
/>
</el-form-item>
</el-col>
...
...
@@ -238,6 +246,47 @@
<el-button
@
click=
"cancel"
>
关 闭
</el-button>
</div>
</el-dialog>
<!-- 定位卡绑定对话框 -->
<el-dialog
:title=
"'定位卡绑定 - ' + bindForm.realName"
:visible.sync=
"bindOpen"
width=
"500px"
append-to-body
>
<el-form
ref=
"bindForm"
:model=
"bindForm"
:rules=
"bindRules"
label-width=
"80px"
>
<el-form-item
label=
"姓名"
prop=
"realName"
>
<el-input
v-model=
"bindForm.realName"
disabled
placeholder=
"人员姓名"
/>
</el-form-item>
<el-form-item
label=
"定位卡号"
prop=
"cardId"
>
<el-select
v-model=
"bindForm.cardId"
placeholder=
"请选择定位卡号"
clearable
>
<el-option
v-for=
"item in cardIdOptions"
:key=
"item.cardId"
:label=
"item.cardId"
:value=
"item.cardId"
></el-option>
</el-select>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"submitBindForm"
>
确 定
</el-button>
<el-button
@
click=
"cancelBind"
>
关 闭
</el-button>
</div>
</el-dialog>
</div>
</template>
...
...
@@ -256,6 +305,21 @@ export default {
name
:
"
Info
"
,
data
()
{
return
{
// 绑定卡对话框
bindOpen
:
false
,
// 绑定卡表单
bindForm
:
{
personId
:
null
,
realName
:
null
,
cardId
:
null
,
personType
:
"
staff
"
,
},
// 绑定卡表单校验
bindRules
:
{
cardId
:
[
{
required
:
true
,
message
:
"
请选择定位卡号
"
,
trigger
:
"
change
"
},
],
},
dialogType
:
""
,
// 人员类型下拉列表数据
personTypeOptions
:
[],
...
...
@@ -271,7 +335,7 @@ export default {
showSearch
:
true
,
// 总条数
total
:
0
,
//
人员
信息表格数据
//
员工
信息表格数据
infoList
:
[],
// 弹出层标题
title
:
""
,
...
...
@@ -310,6 +374,61 @@ export default {
},
methods
:
{
/** 解绑卡按钮操作 */
handleUnbindCard
(
row
)
{
this
.
$modal
.
confirm
(
"
是否确认解绑该人员的卡?
"
)
.
then
(
function
()
{
return
unbindCard
({
personId
:
row
.
personId
,
personType
:
row
.
personType
,
});
})
.
then
(()
=>
{
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
.
bindOpen
=
true
;
},
/** 提交绑定卡表单 */
submitBindForm
()
{
this
.
$refs
[
"
bindForm
"
].
validate
((
valid
)
=>
{
if
(
valid
)
{
bindCard
(
this
.
bindForm
)
.
then
((
response
)
=>
{
this
.
$modal
.
msgSuccess
(
"
绑定成功
"
);
this
.
bindOpen
=
false
;
this
.
getList
();
})
.
catch
((
error
)
=>
{
this
.
$modal
.
msgError
(
"
绑定失败,请重试
"
);
console
.
error
(
"
绑定卡失败:
"
,
error
);
});
}
});
},
/** 取消绑定卡对话框 */
cancelBind
()
{
this
.
bindOpen
=
false
;
this
.
bindForm
=
{
personId
:
null
,
realName
:
null
,
cardId
:
null
,
personType
:
"
staff
"
,
};
},
/** 查看按钮操作 */
handleView
(
row
)
{
this
.
reset
();
...
...
@@ -320,7 +439,7 @@ export default {
}).
then
((
response
)
=>
{
this
.
form
=
response
.
data
[
0
];
this
.
open
=
true
;
this
.
title
=
"
查看
人员
信息
"
;
this
.
title
=
"
查看
员工
信息
"
;
this
.
dialogType
=
"
view
"
;
});
},
...
...
@@ -357,7 +476,7 @@ export default {
};
reader
.
readAsDataURL
(
file
.
raw
);
},
/** 查询
人员
信息列表 */
/** 查询
员工
信息列表 */
getList
()
{
this
.
loading
=
true
;
listInfo
(
this
.
queryParams
).
then
((
response
)
=>
{
...
...
@@ -474,7 +593,7 @@ export default {
handleAdd
()
{
this
.
reset
();
this
.
open
=
true
;
this
.
title
=
"
添加
人员
信息
"
;
this
.
title
=
"
添加
员工
信息
"
;
this
.
dialogType
=
"
add
"
;
},
/** 修改按钮操作 */
...
...
@@ -487,7 +606,7 @@ export default {
}).
then
((
response
)
=>
{
this
.
form
=
response
.
data
[
0
];
this
.
open
=
true
;
this
.
title
=
"
修改
人员
信息
"
;
this
.
title
=
"
修改
员工
信息
"
;
this
.
dialogType
=
"
update
"
;
});
...
...
@@ -513,22 +632,7 @@ export default {
}
});
},
/** 解绑卡按钮操作 */
handleUnbindCard
(
row
)
{
this
.
$modal
.
confirm
(
"
是否确认解绑该人员的卡?
"
)
.
then
(
function
()
{
return
unbindCard
({
personId
:
row
.
personId
,
personType
:
row
.
personType
,
});
})
.
then
(()
=>
{
this
.
getList
();
this
.
$modal
.
msgSuccess
(
"
解绑卡成功
"
);
})
.
catch
(()
=>
{});
},
/** 删除按钮操作 */
handleDelete
(
row
)
{
this
.
$modal
...
...
@@ -545,47 +649,8 @@ export default {
})
.
catch
(()
=>
{});
},
/** 导出按钮操作 */
handleExport
()
{
this
.
download
(
"
system/info/export
"
,
{
...
this
.
queryParams
,
},
`info_
${
new
Date
().
getTime
()}
.xlsx`
);
},
},
};
</
script
>
<
style
scoped
>
/* 照片上传样式 */
.avatar-uploader
.el-upload
{
border
:
1px
dashed
#d9d9d9
;
border-radius
:
6px
;
cursor
:
pointer
;
position
:
relative
;
overflow
:
hidden
;
}
.avatar-uploader
.el-upload
:hover
{
border-color
:
#409eff
;
}
.avatar-uploader-icon
{
font-size
:
28px
;
color
:
#8c939d
;
width
:
150px
;
height
:
150px
;
line-height
:
150px
;
text-align
:
center
;
}
.avatar
{
width
:
150px
;
height
:
150px
;
display
:
block
;
}
.upload-tip
{
margin-top
:
10px
;
color
:
#909399
;
font-size
:
12px
;
}
</
style
>
\ No newline at end of file
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