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
4f0c45ba
Commit
4f0c45ba
authored
Nov 29, 2025
by
xinzhedeai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add:访客信息page接口对接 历史轨迹page跳转待处理
parent
51d6b595
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
69 additions
and
33 deletions
+69
-33
fangke.vue
src/views/person/fangke.vue
+69
-33
No files found.
src/views/person/fangke.vue
View file @
4f0c45ba
...
@@ -54,7 +54,6 @@
...
@@ -54,7 +54,6 @@
<el-col
:span=
"1.5"
>
<el-col
:span=
"1.5"
>
<el-button
<el-button
type=
"primary"
type=
"primary"
plain
icon=
"el-icon-plus"
icon=
"el-icon-plus"
size=
"mini"
size=
"mini"
@
click=
"handleAdd"
@
click=
"handleAdd"
...
@@ -68,50 +67,69 @@
...
@@ -68,50 +67,69 @@
:data=
"infoList"
:data=
"infoList"
@
selection-change=
"handleSelectionChange"
@
selection-change=
"handleSelectionChange"
>
>
<el-table-column
label=
"姓名"
align=
"center"
prop=
"realName"
/>
<el-table-column
label=
"姓名"
align=
"center"
prop=
"realName"
width=
"85"
/>
<el-table-column
label=
"性别"
align=
"center"
prop=
"sex"
/>
<el-table-column
label=
"性别"
align=
"center"
prop=
"sex"
width=
"55"
/>
<el-table-column
label=
"身份证号"
align=
"center"
prop=
"id
Card
"
/>
<el-table-column
label=
"身份证号"
align=
"center"
prop=
"id
Number
"
/>
<el-table-column
label=
"联系方式"
align=
"center"
prop=
"phone"
/>
<el-table-column
label=
"联系方式"
align=
"center"
prop=
"phone"
/>
<el-table-column
label=
"来访单位"
align=
"center"
prop=
"company"
/>
<el-table-column
label=
"来访单位"
align=
"center"
prop=
"company"
/>
<el-table-column
label=
"定位卡号"
align=
"center"
prop=
"cardId"
/>
<el-table-column
label=
"定位卡号"
align=
"center"
prop=
"cardId"
/>
<el-table-column
label=
"来访时间"
align=
"center"
prop=
"visitTime"
/>
<el-table-column
<el-table-column
label=
"离开时间"
align=
"center"
prop=
"leaveTime"
/>
label=
"来访时间"
<el-table-column
label=
"来访状态"
align=
"center"
prop=
"visitorStatus"
/>
align=
"center"
prop=
"visitTime"
width=
"150"
/>
<el-table-column
label=
"离开时间"
align=
"center"
prop=
"leaveTime"
width=
"150"
/>
<el-table-column
label=
"来访状态"
align=
"center"
width=
"85"
prop=
"visitorStatus"
>
<template
slot-scope=
"scope"
>
{{
scope
.
row
.
visitorStatus
===
1
?
"
未离开
"
:
"
已离开
"
}}
</
template
>
</el-table-column>
<el-table-column
<el-table-column
label=
"操作"
label=
"操作"
align=
"center"
align=
"center"
class-name=
"small-padding fixed-width"
class-name=
"small-padding fixed-width"
fixed=
"right"
fixed=
"right"
width=
"
1
80"
width=
"
3
80"
>
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
<el-button
v-if=
"scope.row.visitorStatus ==
'Y'
"
v-if=
"scope.row.visitorStatus ==
1
"
size=
"
mini
"
size=
"
small
"
type=
"
text
"
type=
"
warning
"
icon=
"el-icon-
link
"
icon=
"el-icon-
circle-close
"
@
click=
"handleLeave(scope.row)"
@
click=
"handleLeave(scope.row)"
>
离开
</el-button
>
离开
</el-button
>
>
<el-button
<el-button
v-if=
"scope.row.visitorStatus ==
'N'
"
v-if=
"scope.row.visitorStatus ==
0
"
size=
"
mini
"
size=
"
small
"
type=
"
text
"
type=
"
success
"
icon=
"el-icon-
unlock
"
icon=
"el-icon-
circle-close
"
@
click=
"handleHistory(scope.row)"
@
click=
"handleHistory(scope.row)"
>
历史轨迹
</el-button
>
历史轨迹
</el-button
>
>
<el-button
<el-button
size=
"
mini
"
size=
"
small
"
type=
"
text
"
type=
"
primary
"
icon=
"el-icon-edit"
icon=
"el-icon-edit"
@
click=
"handleUpdate(scope.row)"
@
click=
"handleUpdate(scope.row)"
>
修改
</el-button
>
修改
</el-button
>
>
<el-button
<el-button
size=
"
mini
"
size=
"
small
"
type=
"
text
"
type=
"
danger
"
icon=
"el-icon-delete"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
@
click=
"handleDelete(scope.row)"
>
删除
</el-button
>
删除
</el-button
...
@@ -128,7 +146,7 @@
...
@@ -128,7 +146,7 @@
@
pagination=
"getList"
@
pagination=
"getList"
/>
/>
<!-- 添加或修改
员工
信息对话框 -->
<!-- 添加或修改
访客
信息对话框 -->
<el-dialog
:title=
"title"
:visible.sync=
"open"
width=
"700px"
append-to-body
>
<el-dialog
:title=
"title"
:visible.sync=
"open"
width=
"700px"
append-to-body
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
<!-- 使用el-row和el-col实现一行两列布局 -->
<!-- 使用el-row和el-col实现一行两列布局 -->
...
@@ -170,7 +188,7 @@
...
@@ -170,7 +188,7 @@
v-model=
"form.birthTime"
v-model=
"form.birthTime"
type=
"date"
type=
"date"
value-format=
"yyyy-MM-dd"
value-format=
"yyyy-MM-dd"
placeholder=
""
placeholder=
"
请选择出生日期
"
>
>
</el-date-picker>
</el-date-picker>
</el-form-item>
</el-form-item>
...
@@ -178,17 +196,17 @@
...
@@ -178,17 +196,17 @@
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"身份证号"
prop=
"idNumber"
>
<el-form-item
label=
"身份证号"
prop=
"idNumber"
>
<el-input
v-model=
"form.idNumber"
placeholder=
""
/>
<el-input
v-model=
"form.idNumber"
placeholder=
"
请输入身份证号
"
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"联系方式"
prop=
"phone"
>
<el-form-item
label=
"联系方式"
prop=
"phone"
>
<el-input
v-model=
"form.phone"
placeholder=
""
/>
<el-input
v-model=
"form.phone"
placeholder=
"
请输入联系方式
"
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"来访单位"
prop=
"company"
>
<el-form-item
label=
"来访单位"
prop=
"company"
>
<el-input
v-model=
"form.company"
placeholder=
""
/>
<el-input
v-model=
"form.company"
placeholder=
"
请输入来访单位
"
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
...
@@ -211,7 +229,11 @@
...
@@ -211,7 +229,11 @@
<el-row>
<el-row>
<el-col
:span=
"24"
>
<el-col
:span=
"24"
>
<el-form-item
label=
"备注"
prop=
"remark"
>
<el-form-item
label=
"备注"
prop=
"remark"
>
<el-input
v-model=
"form.remark"
type=
"textarea"
placeholder=
""
/>
<el-input
v-model=
"form.remark"
type=
"textarea"
placeholder=
"请输入备注"
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
...
@@ -253,7 +275,7 @@ export default {
...
@@ -253,7 +275,7 @@ export default {
showSearch
:
true
,
showSearch
:
true
,
// 总条数
// 总条数
total
:
0
,
total
:
0
,
//
员工
信息表格数据
//
访客
信息表格数据
infoList
:
[],
infoList
:
[],
// 弹出层标题
// 弹出层标题
title
:
""
,
title
:
""
,
...
@@ -295,15 +317,29 @@ export default {
...
@@ -295,15 +317,29 @@ export default {
},
},
// 可以根据需要添加更多配置
// 可以根据需要添加更多配置
},
},
/** 解绑卡按钮操作 */
handleLeave
(
row
)
{
handleLeave
(
row
)
{
const
formData
=
{
...
row
};
// 获取当前系统时间并格式化为yyyy-MM-dd HH:mm:ss格式
const
now
=
new
Date
();
const
year
=
now
.
getFullYear
();
const
month
=
String
(
now
.
getMonth
()
+
1
).
padStart
(
2
,
"
0
"
);
const
day
=
String
(
now
.
getDate
()).
padStart
(
2
,
"
0
"
);
const
hours
=
String
(
now
.
getHours
()).
padStart
(
2
,
"
0
"
);
const
minutes
=
String
(
now
.
getMinutes
()).
padStart
(
2
,
"
0
"
);
const
seconds
=
String
(
now
.
getSeconds
()).
padStart
(
2
,
"
0
"
);
formData
.
leaveTime
=
`
${
year
}
-
${
month
}
-
${
day
}
${
hours
}
:
${
minutes
}
:
${
seconds
}
`
;
formData
.
visitorStatus
=
0
;
this
.
$modal
this
.
$modal
.
confirm
(
"
是否确认离开?
"
)
.
confirm
(
"
是否确认离开?
"
)
.
then
(
function
()
{
.
then
(
function
()
{
return
u
nbindCard
(
row
.
personId
);
return
u
pdateInfo
(
formData
);
})
})
.
then
(()
=>
{
.
then
(()
=>
{
this
.
getList
();
this
.
$modal
.
msgSuccess
(
"
操作成功
"
);
this
.
$modal
.
msgSuccess
(
"
操作成功
"
);
this
.
getList
();
})
})
.
catch
(()
=>
{});
.
catch
(()
=>
{});
},
},
...
@@ -324,7 +360,7 @@ export default {
...
@@ -324,7 +360,7 @@ export default {
});
});
},
},
/** 查询
员工
信息列表 */
/** 查询
访客
信息列表 */
getList
()
{
getList
()
{
this
.
loading
=
true
;
this
.
loading
=
true
;
listInfo
(
this
.
queryParams
).
then
((
response
)
=>
{
listInfo
(
this
.
queryParams
).
then
((
response
)
=>
{
...
@@ -365,16 +401,16 @@ export default {
...
@@ -365,16 +401,16 @@ export default {
handleAdd
()
{
handleAdd
()
{
this
.
reset
();
this
.
reset
();
this
.
open
=
true
;
this
.
open
=
true
;
this
.
title
=
"
添加
员工
信息
"
;
this
.
title
=
"
添加
访客
信息
"
;
this
.
dialogType
=
"
add
"
;
this
.
dialogType
=
"
add
"
;
},
},
/** 修改按钮操作 */
/** 修改按钮操作 */
handleUpdate
(
row
)
{
handleUpdate
(
row
)
{
this
.
reset
();
this
.
reset
();
getInfo
(
row
.
personId
).
then
((
response
)
=>
{
getInfo
(
row
.
personId
).
then
((
response
)
=>
{
this
.
form
=
response
.
data
[
0
]
;
this
.
form
=
response
;
this
.
open
=
true
;
this
.
open
=
true
;
this
.
title
=
"
修改
员工
信息
"
;
this
.
title
=
"
修改
访客
信息
"
;
});
});
},
},
/** 提交按钮 */
/** 提交按钮 */
...
...
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