Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
refined-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
refined-platform
Commits
d83cebef
Commit
d83cebef
authored
Apr 16, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改人员导出
parent
13eb2d69
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
115 additions
and
6 deletions
+115
-6
refined-manager-ui/admin/src/views/person/list.vue
refined-manager-ui/admin/src/views/person/list.vue
+115
-6
No files found.
refined-manager-ui/admin/src/views/person/list.vue
View file @
d83cebef
<
template
>
<
template
>
<div
class=
"page"
>
<div
class=
"page"
>
<LayoutTable
:data=
"tableData"
:config=
"tableConfig"
>
<LayoutTable
:data=
"tableData"
:config=
"tableConfig"
>
<el-button
slot=
"table-head-left2"
style=
"margin-left: 10px"
icon=
"el-icon-tickets"
size=
"mini"
@
click=
"handleImport"
>
导入
</el-button>
<el-button
slot=
"table-head-left2"
style=
"margin-left: 10px"
icon=
"el-icon-tickets"
size=
"mini"
@
click=
"doExport"
:disabled=
"isExport"
>
导出
</el-button>
</LayoutTable>
</LayoutTable>
<!-- 注册人员导入对话框 -->
<el-dialog
:title=
"upload.title"
:visible.sync=
"upload.open"
width=
"400px"
append-to-body
>
<el-upload
ref=
"upload"
:limit=
"1"
accept=
".xlsx, .xls"
:headers=
"upload.headers"
:action=
"upload.url + '?updateSupport=' + upload.updateSupport"
:disabled=
"upload.isUploading"
:on-progress=
"handleFileUploadProgress"
:on-success=
"handleFileSuccess"
:auto-upload=
"false"
drag
>
<i
class=
"el-icon-upload"
></i>
<div
class=
"el-upload__text"
>
将文件拖到此处,或
<em>
点击上传
</em>
</div>
<div
class=
"el-upload__tip"
slot=
"tip"
>
<el-checkbox
v-model=
"upload.updateSupport"
/>
是否更新已经存在的数据
<el-link
type=
"primary"
style=
"font-size: 14px"
@
click=
"downloadTemplate"
>
下载模板
</el-link
>
</div>
<div
class=
"el-upload__tip"
style=
"color: red"
slot=
"tip"
>
提示:仅允许导入“xls”或“xlsx”格式文件!
</div>
</el-upload>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"submitFileForm"
>
确 定
</el-button>
<el-button
@
click=
"upload.open = false"
>
取 消
</el-button>
</div>
</el-dialog>
<dialog-show
ref=
"dialogform"
@
ok=
"getData"
/>
<dialog-show
ref=
"dialogform"
@
ok=
"getData"
/>
</div>
</div>
...
@@ -21,6 +77,47 @@ export default {
...
@@ -21,6 +77,47 @@ export default {
created
()
{
created
()
{
},
},
methods
:
{
methods
:
{
/** 导入 */
handleImport
()
{
this
.
upload
.
title
=
"
注册人员导入
"
;
this
.
upload
.
open
=
true
;
},
/** 下载模板操作 */
downloadTemplate
()
{
this
.
isExport
=
true
;
this
.
$download
(
"
/person/downloadTemplate
"
,
{},
{
type
:
"
excel
"
})
.
then
(()
=>
(
this
.
isExport
=
false
))
.
catch
((
error
)
=>
{
this
.
isExport
=
false
;
this
.
$message
.
error
(
error
.
message
);
});
},
/** 文件上传中处理 */
handleFileUploadProgress
(
event
,
file
,
fileList
)
{
this
.
upload
.
isUploading
=
true
;
},
/** 文件上传成功处理 */
handleFileSuccess
(
response
,
file
,
fileList
)
{
this
.
upload
.
open
=
false
;
this
.
upload
.
isUploading
=
false
;
this
.
$refs
.
upload
.
clearFiles
();
this
.
$alert
(
response
.
msg
,
"
导入结果
"
,
{
dangerouslyUseHTMLString
:
true
});
this
.
getData
();
},
/** 提交上传文件 */
submitFileForm
()
{
this
.
$refs
.
upload
.
submit
();
},
/** 导出Excel */
doExport
()
{
this
.
isExport
=
true
;
this
.
$download
(
"
/person/exportExcel
"
,
{
"
idList
"
:
this
.
selection
,
},
{
type
:
"
excel
"
}).
then
(()
=>
this
.
isExport
=
false
).
catch
(
error
=>
{
this
.
isExport
=
false
;
this
.
$message
.
error
(
error
.
message
);
});
},
/** 重写新增方法 */
/** 重写新增方法 */
toAdd
(
row
)
{
toAdd
(
row
)
{
this
.
$refs
.
dialogform
.
add
(
row
);
this
.
$refs
.
dialogform
.
add
(
row
);
...
@@ -37,6 +134,20 @@ export default {
...
@@ -37,6 +134,20 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
// 用户导入参数
upload
:
{
// 是否显示弹出层(注册人员导入)
open
:
false
,
// 弹出层标题(注册人员导入)
title
:
"
导入注册人员数据
"
,
// 是否禁用上传
isUploading
:
false
,
// 是否更新已经存在的数据
updateSupport
:
0
,
// 上传的地址
url
:
"
/m/person/importData
"
,
},
isExport
:
false
,
config
:
{
config
:
{
search
:
[
search
:
[
],
],
...
@@ -44,6 +155,10 @@ export default {
...
@@ -44,6 +155,10 @@ export default {
{
type
:
"
selection
"
,
width
:
60
},
{
type
:
"
selection
"
,
width
:
60
},
{
type
:
"
index
"
,
label
:
"
序号
"
,
width
:
50
},
{
type
:
"
index
"
,
label
:
"
序号
"
,
width
:
50
},
{
label
:
"
站点Id
"
,
prop
:
"
siteId
"
,
formatter
:
this
.
formatter
},
{
label
:
"
站点名称
"
,
prop
:
"
siteName
"
},
{
label
:
"
身份证号码
"
,
prop
:
"
idCard
"
},
{
label
:
"
身份证号码
"
,
prop
:
"
idCard
"
},
{
label
:
"
性别
"
,
prop
:
"
gender
"
,
formatter
:
this
.
formatter
},
{
label
:
"
性别
"
,
prop
:
"
gender
"
,
formatter
:
this
.
formatter
},
...
@@ -52,12 +167,6 @@ export default {
...
@@ -52,12 +167,6 @@ export default {
{
label
:
"
家庭住址
"
,
prop
:
"
address
"
},
{
label
:
"
家庭住址
"
,
prop
:
"
address
"
},
{
label
:
"
照片路径
"
,
prop
:
"
photo
"
},
{
label
:
"
注册人员来源
"
,
prop
:
"
source
"
,
formatter
:
this
.
formatter
},
{
label
:
"
是否添加到海康人脸库
"
,
prop
:
"
inFaceHk
"
,
formatter
:
this
.
formatter
},
{
label
:
"
创建用户
"
,
prop
:
"
createUserId
"
,
formatter
:
this
.
formatter
},
{
label
:
"
创建用户
"
,
prop
:
"
createUserId
"
,
formatter
:
this
.
formatter
},
{
{
label
:
"
操作
"
,
label
:
"
操作
"
,
...
...
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