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
716588d1
Commit
716588d1
authored
Nov 28, 2025
by
xinzhedeai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add:访客页面
parent
b800848e
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
56 additions
and
256 deletions
+56
-256
.env.development
.env.development
+1
-1
.env.production
.env.production
+1
-1
.env.staging
.env.staging
+1
-1
fangke.js
src/api/jinrun/fangke.js
+13
-9
fangke.vue
src/views/person/fangke.vue
+40
-244
No files found.
.env.development
View file @
716588d1
# 页面标题
VUE_APP_TITLE =
高区应急管理平台
VUE_APP_TITLE =
人员定位系统
# 开发环境配置
ENV = 'development'
...
...
.env.production
View file @
716588d1
# 页面标题
VUE_APP_TITLE =
高区应急管理平台
VUE_APP_TITLE =
人员定位系统
# 生产环境配置
ENV = 'production'
...
...
.env.staging
View file @
716588d1
# 页面标题
VUE_APP_TITLE =
高区应急管理平台
VUE_APP_TITLE =
人员定位系统
BABEL_ENV = production
...
...
src/api/jinrun/fangke.js
View file @
716588d1
...
...
@@ -3,26 +3,24 @@ import request from '@/utils/request'
// 查询人员信息列表
export
function
listInfo
(
query
)
{
return
request
({
url
:
'
/person/info/get
RemoteVisitorInfo
List
'
,
url
:
'
/person/info/get
Person
List
'
,
method
:
'
get
'
,
params
:
query
})
}
// 解绑卡
export
function
unbindCard
(
data
)
{
return
request
({
url
:
'
/person/info/
giveback
'
,
url
:
'
/person/info/
unbindCard
'
,
method
:
'
put
'
,
data
:
data
})
}
// 新增人员信息
export
function
addInfo
(
data
)
{
return
request
({
url
:
'
/person/info/add
RemoteVisitorInfo
'
,
url
:
'
/person/info/add
Person
'
,
method
:
'
post
'
,
data
:
data
})
...
...
@@ -31,17 +29,23 @@ export function addInfo(data) {
// 修改人员信息
export
function
updateInfo
(
data
)
{
return
request
({
url
:
'
/person/info/update
RemoteVisitorInfo
'
,
url
:
'
/person/info/update
Person
'
,
method
:
'
put
'
,
data
:
data
})
}
export
function
getInfo
(
id
)
{
return
request
({
url
:
'
/person/info/getPersonById/
'
+
id
,
method
:
'
get
'
})
}
// 删除人员信息
export
function
delInfo
(
data
)
{
export
function
delInfo
(
id
)
{
return
request
({
url
:
'
/person/info/delete
RemoteVisitorInfo
'
,
url
:
'
/person/info/delete
Person/
'
+
id
,
method
:
'
delete
'
,
data
:
data
})
}
src/views/person/fangke.vue
View file @
716588d1
...
...
@@ -72,10 +72,12 @@
<el-table-column
label=
"性别"
align=
"center"
prop=
"sex"
/>
<el-table-column
label=
"身份证号"
align=
"center"
prop=
"idCard"
/>
<el-table-column
label=
"联系方式"
align=
"center"
prop=
"phone"
/>
<el-table-column
label=
"来访单位
1"
align=
"center"
prop=
"dept
"
/>
<el-table-column
label=
"来访单位
"
align=
"center"
prop=
"company
"
/>
<el-table-column
label=
"定位卡号"
align=
"center"
prop=
"cardId"
/>
<el-table-column
label=
"来访时间1"
align=
"center"
prop=
"dept"
/>
<el-table-column
label=
"离开时间1"
align=
"center"
prop=
"idCard"
/>
<el-table-column
label=
"来访时间"
align=
"center"
prop=
"visitTime"
/>
<el-table-column
label=
"离开时间"
align=
"center"
prop=
"leaveTime"
/>
<el-table-column
label=
"来访状态"
align=
"center"
prop=
"visitorStatus"
/>
<el-table-column
label=
"操作"
align=
"center"
...
...
@@ -85,7 +87,7 @@
>
<template
slot-scope=
"scope"
>
<el-button
v-if=
"scope.row.
laifang
Status == 'Y'"
v-if=
"scope.row.
visitor
Status == 'Y'"
size=
"mini"
type=
"text"
icon=
"el-icon-link"
...
...
@@ -93,7 +95,7 @@
>
离开
</el-button
>
<el-button
v-if=
"scope.row.
laifang
Status == 'N'"
v-if=
"scope.row.
visitor
Status == 'N'"
size=
"mini"
type=
"text"
icon=
"el-icon-unlock"
...
...
@@ -162,10 +164,10 @@
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"出生日期"
prop=
"birth"
>
<el-form-item
label=
"出生日期"
prop=
"birth
Time
"
>
<el-date-picker
clearable
v-model=
"form.birth"
v-model=
"form.birth
Time
"
type=
"date"
value-format=
"yyyy-MM-dd"
placeholder=
""
...
...
@@ -185,24 +187,28 @@
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"来访单位"
prop=
"
seniorit
y"
>
<el-input
v-model=
"form.
seniorit
y"
placeholder=
""
/>
<el-form-item
label=
"来访单位"
prop=
"
compan
y"
>
<el-input
v-model=
"form.
compan
y"
placeholder=
""
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"来访时间"
prop=
"
hireDat
e"
>
<el-date
time
-picker
<el-form-item
label=
"来访时间"
prop=
"
visitTim
e"
>
<el-date-picker
clearable
v-model=
"form.hireDate"
type=
"date"
value-format=
"yyyy-MM-dd"
placeholder=
"请选择入职日期"
v-model=
"form.visitTime"
type=
"datetime"
value-format=
"yyyy-MM-dd HH:mm:ss"
format=
"yyyy-MM-dd HH:mm:ss"
placeholder=
"请选择来访时间"
:picker-options=
"visitTimeOptions"
default-time=
"00:00:00"
style=
"width: 100%"
>
</el-date
time
-picker>
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row
v-if=
"dialogType !== 'dimission' && dialogType !== 'return'"
>
<el-row>
<el-col
:span=
"24"
>
<el-form-item
label=
"备注"
prop=
"remark"
>
<el-input
v-model=
"form.remark"
type=
"textarea"
placeholder=
""
/>
...
...
@@ -215,47 +221,6 @@
<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>
...
...
@@ -265,7 +230,7 @@ import {
delInfo
,
addInfo
,
updateInfo
,
unbindCard
,
getInfo
,
getCardList
,
// 引入获取定位卡号列表的接口
}
from
"
@/api/jinrun/fangke
"
;
import
{
getDict
}
from
"
@/api/jinrun/common
"
;
...
...
@@ -274,34 +239,6 @@ export default {
name
:
"
Info
"
,
data
()
{
return
{
deptOptions
:
[
{
label
:
"
部门1
"
,
value
:
"
1
"
,
},
{
label
:
"
部门2
"
,
value
:
"
2
"
,
},
],
// 绑定卡对话框
bindOpen
:
false
,
// 绑定卡表单
bindForm
:
{
personId
:
null
,
realName
:
null
,
cardId
:
null
,
personType
:
"
staff
"
,
},
// 绑定卡表单校验
bindRules
:
{
cardId
:
[
{
required
:
true
,
message
:
"
请选择定位卡号
"
,
trigger
:
"
change
"
},
],
},
dialogType
:
""
,
// 人员类型下拉列表数据
personTypeOptions
:
[],
// 遮罩层
loading
:
true
,
// 选中数组
...
...
@@ -324,21 +261,18 @@ export default {
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
personType
:
"
staff
"
,
personType
:
"
2
"
,
realName
:
null
,
cardId
:
null
,
jobNumber
:
null
,
},
// 表单参数
form
:
{
personType
:
"
staff
"
,
personType
:
"
2
"
,
sex
:
"
男
"
,
// 默认选择男
},
// 表单校验
rules
:
{
personType
:
[
{
required
:
true
,
message
:
"
人员类型不能为空
"
,
trigger
:
"
change
"
},
],
realName
:
[
{
required
:
true
,
message
:
"
姓名不能为空
"
,
trigger
:
"
blur
"
},
],
...
...
@@ -347,21 +281,23 @@ export default {
},
created
()
{
this
.
getList
();
this
.
getPersonTypeOptions
();
// 获取定位卡号列表
this
.
getCardIdList
();
},
methods
:
{
/** 解绑卡按钮操作 */
// 来访时间选择器配置
visitTimeOptions
:
{
// 设置可选择的时间范围为当前时间之前
disabledDate
(
time
)
{
return
time
.
getTime
()
>
Date
.
now
();
},
// 可以根据需要添加更多配置
},
handleLeave
(
row
)
{
this
.
$modal
.
confirm
(
"
是否确认离开?
"
)
.
then
(
function
()
{
return
unbindCard
({
personId
:
row
.
personId
,
personType
:
row
.
personType
,
});
return
unbindCard
(
row
.
personId
);
})
.
then
(()
=>
{
this
.
getList
();
...
...
@@ -369,52 +305,11 @@ export default {
})
.
catch
(()
=>
{});
},
/** 绑定卡按钮操作 */
handleHistory
(
row
)
{
// 跳转到李麒麟页面
window
.
open
(
"
https://www.baidu.com
"
);
},
/** 取消绑定卡对话框 */
cancelBind
()
{
this
.
bindOpen
=
false
;
this
.
bindForm
=
{
personId
:
null
,
realName
:
null
,
cardId
:
null
,
personType
:
"
staff
"
,
};
},
/** 提交绑定卡表单 */
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
);
});
}
});
},
/** 获取人员类型下拉列表数据 */
getPersonTypeOptions
()
{
// 调用数据字典接口
getDict
({
dictType
:
"
staff_type
"
})
.
then
((
response
)
=>
{
this
.
personTypeOptions
=
response
.
data
;
})
.
catch
((
error
)
=>
{
this
.
$modal
.
msgError
(
"
获取人员类型数据失败
"
);
console
.
error
(
"
获取人员类型数据失败:
"
,
error
);
});
},
/** 获取定位卡号列表数据 */
getCardIdList
()
{
getCardList
()
...
...
@@ -431,7 +326,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
;
});
...
...
@@ -444,83 +339,7 @@ export default {
// 表单重置
reset
()
{
this
.
form
=
{
createBy
:
null
,
createTime
:
null
,
updateTime
:
null
,
remark
:
null
,
personId
:
null
,
personType
:
null
,
personTypeName
:
null
,
staffType
:
null
,
staffTypeName
:
null
,
positionIconType
:
null
,
positionIconTypeName
:
null
,
realName
:
null
,
phone
:
null
,
sex
:
"
男
"
,
birth
:
null
,
email
:
null
,
nativePlace
:
null
,
nation
:
null
,
maritalStatus
:
null
,
politicsStatus
:
null
,
healthStatus
:
null
,
idType
:
null
,
idNumber
:
null
,
personIc
:
null
,
personCode
:
null
,
personSource
:
null
,
company
:
null
,
companyName
:
null
,
administratorName
:
null
,
administratorPhone
:
null
,
jobNumber
:
null
,
jobStatus
:
null
,
hireDate
:
null
,
hireDateAlias
:
null
,
dimissionDate
:
null
,
officePhone
:
null
,
duty
:
null
,
professionalTitle
:
null
,
professionalTitleNumber
:
null
,
seniority
:
null
,
experience
:
null
,
yearPlusExperience
:
null
,
highestEducation
:
null
,
highestDegree
:
null
,
profession
:
null
,
school
:
null
,
diplomaNumber
:
null
,
cengNumber
:
null
,
accessory
:
null
,
accessoryList
:
null
,
contractorId
:
null
,
contractorName
:
null
,
receiveLeader
:
null
,
receivePhone
:
null
,
gateThrough
:
null
,
leaveTime
:
null
,
visitorStatus
:
null
,
visitTime
:
null
,
process
:
null
,
lastUpdateDate
:
null
,
lastCreateDate
:
null
,
updateFail
:
null
,
onlineStatus
:
null
,
inOutStatus
:
null
,
cardType
:
null
,
cardTypeName
:
null
,
cardId
:
null
,
icCardId
:
null
,
cardPower
:
null
,
personPhoto
:
null
,
photoSign
:
null
,
deptName
:
null
,
reservationEntryStartTime
:
null
,
reservationEntryEndTime
:
null
,
reservationVisitingTime
:
null
,
curUserName
:
null
,
visitorId
:
null
,
sex
:
"
男
"
,
// 默认选择男
};
this
.
resetForm
(
"
form
"
);
},
...
...
@@ -550,41 +369,21 @@ export default {
/** 修改按钮操作 */
handleUpdate
(
row
)
{
this
.
reset
();
listInfo
({
pageNum
:
1
,
pageSize
:
1
,
personId
:
row
.
personId
,
}).
then
((
response
)
=>
{
getInfo
(
row
.
personId
).
then
((
response
)
=>
{
this
.
form
=
response
.
data
[
0
];
this
.
open
=
true
;
this
.
title
=
"
修改员工信息
"
;
this
.
dialogType
=
"
update
"
;
});
},
/** 提交按钮 */
submitForm
()
{
this
.
$refs
[
"
form
"
].
validate
((
valid
)
=>
{
if
(
valid
)
{
this
.
form
.
personType
=
"
staff
"
;
this
.
form
.
personType
=
"
2
"
;
// 访客
// 创建一个表单数据的副本,避免直接修改原表单
const
formData
=
{
...
this
.
form
};
// 根据 deptId 查找对应的部门名称
if
(
formData
.
deptId
&&
this
.
deptOptions
&&
this
.
deptOptions
.
length
>
0
)
{
const
deptItem
=
this
.
deptOptions
.
find
(
(
item
)
=>
item
.
value
===
formData
.
deptId
);
if
(
deptItem
)
{
formData
.
deptName
=
deptItem
.
label
;
// 添加部门名称参数
}
}
if
(
formData
.
personId
!=
null
)
{
updateInfo
(
formData
).
then
((
response
)
=>
{
this
.
$modal
.
msgSuccess
(
"
修改成功
"
);
...
...
@@ -607,10 +406,7 @@ export default {
this
.
$modal
.
confirm
(
"
是否确认删除该数据项?
"
)
.
then
(
function
()
{
return
delInfo
({
personIds
:
[
row
.
personId
],
personType
:
row
.
personType
,
});
return
delInfo
(
row
.
personId
);
})
.
then
(()
=>
{
this
.
getList
();
...
...
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