Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
data_management_system
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
张伯涛
data_management_system
Commits
84ce6792
Commit
84ce6792
authored
Dec 03, 2022
by
张伯涛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
1b54cf30
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
183 additions
and
5 deletions
+183
-5
jcglry.js
ruoyi-ui/src/api/system/jcglry.js
+18
-0
index.vue
ruoyi-ui/src/views/system/fcry/index.vue
+2
-2
index.vue
ruoyi-ui/src/views/system/gldry/index.vue
+2
-2
index.vue
ruoyi-ui/src/views/system/jcglry/index.vue
+161
-1
No files found.
ruoyi-ui/src/api/system/jcglry.js
View file @
84ce6792
...
...
@@ -8,6 +8,24 @@ export function listJcglry(query) {
params
:
query
})
}
// 下载导入模板
export
function
importTemplate
(
params
)
{
return
request
({
url
:
'/system/jcglry/importTemplate'
,
method
:
'post'
,
responseType
:
'blob'
,
params
})
}
// 导入用户信息
export
function
importExcel
(
data
)
{
return
request
({
url
:
'/system/jcglry/importData'
,
method
:
'post'
,
responseType
:
'blob'
,
data
})
}
// 查询解除隔离人员详细
export
function
getJcglry
(
id
)
{
...
...
ruoyi-ui/src/views/system/fcry/index.vue
View file @
84ce6792
...
...
@@ -351,8 +351,8 @@
<el-col
:span=
"12"
>
<el-form-item
label=
"是否阳性"
prop=
"isPositive"
>
<el-select
v-model=
"form.isPositive"
placeholder=
"请选择是否疾控判定阳性"
style=
"width: 100%"
>
<el-option
value=
"
'1'
"
label=
"是"
></el-option>
<el-option
value=
"
'0'
"
label=
"否"
></el-option>
<el-option
value=
"
1
"
label=
"是"
></el-option>
<el-option
value=
"
0
"
label=
"否"
></el-option>
</el-select>
</el-form-item>
</el-col>
...
...
ruoyi-ui/src/views/system/gldry/index.vue
View file @
84ce6792
...
...
@@ -328,8 +328,8 @@
<el-col
v-if=
"title === '查看隔离点人员'"
:span=
"12"
>
<el-form-item
label=
"是否阳性"
prop=
"isYx"
>
<el-select
v-model=
"form.isYx"
placeholder=
"请选择是否阳性"
style=
"width: 100%"
>
<el-option
value=
"
0
"
label=
"阳"
></el-option>
<el-option
value=
"
1
"
label=
"未阳"
></el-option>
<el-option
value=
"
1
"
label=
"阳"
></el-option>
<el-option
value=
"
0
"
label=
"未阳"
></el-option>
</el-select>
</el-form-item>
</el-col>
...
...
ruoyi-ui/src/views/system/jcglry/index.vue
View file @
84ce6792
...
...
@@ -141,6 +141,16 @@
>
删除
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"info"
plain
icon=
"el-icon-upload2"
size=
"mini"
@
click=
"handleImport"
v-hasPermi=
"['system:jcglry:import']"
>
导入
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"warning"
...
...
@@ -467,12 +477,46 @@
<
el
-
button
@
click
=
"cancel"
>
取
消
<
/el-button
>
<
/div
>
<
/el-dialog
>
<!--
导入对话框
-->
<
el
-
dialog
:
before
-
close
=
"closeFileDialog"
:
title
=
"upload.title"
:
close
-
on
-
click
-
modal
=
"false"
:
visible
.
sync
=
"upload.open"
width
=
"400px"
append
-
to
-
body
>
<
el
-
upload
accept
=
".xlsx, .xls"
:
headers
=
"upload.headers"
:
action
=
"upload.url + '?updateSupport=' + upload.updateSupport"
:
disabled
=
"upload.isUploading"
:
on
-
progress
=
"handleFileUploadProgress"
:
on
-
success
=
"handleFileSuccess"
:
auto
-
upload
=
"false"
:
on
-
change
=
"employeeUpload"
:
on
-
remove
=
"handleRemove"
:
before
-
remove
=
"beforeRemove"
:
on
-
preview
=
"handlePreview"
:
file
-
list
=
"fileList"
drag
>
<
i
class
=
"el-icon-upload"
/>
<
div
class
=
"el-upload__text"
>
将文件拖到此处,或
<
em
>
点击上传
<
/em
>
<
/div
>
<
div
slot
=
"tip"
class
=
"el-upload__tip"
>
<!--
<
el
-
checkbox
v
-
model
=
"upload.updateSupport"
/>
是否更新已经存在的用户数据
-->
<
span
type
=
"info"
style
=
"font-size: 14px; color: #0A82D2; cursor: pointer"
@
click
=
"importTemplate"
>
下载模板
<
/span
>
<
/div
>
<
div
slot
=
"tip"
class
=
"el-upload__tip"
style
=
"color:#333; margin-top: 16px;"
>
提示:仅允许导入“
xls
”或“
xlsx
”格式文件!
<
/div
>
<
/el-upload
>
<
div
slot
=
"footer"
class
=
"dialog-footer"
>
<
el
-
button
@
click
=
"closeFileDialog"
>
取
消
<
/el-button
>
<
el
-
button
:
loading
=
"importLoading"
type
=
"primary"
@
click
=
"submitFileForm"
>
确
定
<
/el-button
>
<
/div
>
<
/el-dialog
>
<
/div
>
<
/template
>
<
script
>
import
{
listJcglry
,
getJcglry
,
delJcglry
,
addJcglry
,
updateJcglry
,
getDictData
}
from
'@/api/system/jcglry'
import
{
listJcglry
,
getJcglry
,
delJcglry
,
addJcglry
,
updateJcglry
,
getDictData
,
importTemplate
,
importExcel
}
from
'@/api/system/jcglry'
import
{
getYcsb
}
from
'@/api/system/ycsb'
import
{
getToken
}
from
'@/utils/auth'
export
default
{
name
:
'Jcglry'
,
...
...
@@ -519,6 +563,23 @@ export default {
bzAddress
:
null
,
status
:
null
}
,
importLoading
:
false
,
// 导入列表
fileList
:
[],
upload
:
{
// 是否显示弹出层(用户导入)
open
:
false
,
// 弹出层标题(用户导入)
title
:
""
,
// 是否禁用上传
isUploading
:
false
,
// 是否更新已经存在的用户数据
updateSupport
:
0
,
// 设置上传的请求头部
headers
:
{
Authorization
:
"Bearer "
+
getToken
()
}
,
// 上传的地址
url
:
process
.
env
.
VUE_APP_BASE_API
+
"/system/jcglry/importTemplate"
}
,
// 表单参数
form
:
{
rylb
:
'阳转阴'
...
...
@@ -964,6 +1025,105 @@ export default {
}
).
catch
(()
=>
{
}
)
}
,
/** 导入按钮操作 */
handleImport
()
{
this
.
importLoading
=
false
this
.
upload
.
title
=
"解除隔离人员入"
;
this
.
upload
.
open
=
true
;
}
,
// 提交上传文件
submitFileForm
()
{
this
.
importLoading
=
true
if
(
this
.
fileList
.
length
===
0
)
{
this
.
$message
.
warning
(
'请上传文件'
)
// 导入成功后关闭弹出框
this
.
importLoading
=
false
this
.
upload
.
open
=
true
}
else
{
// 根据后台需求数据格式
var
formData
=
new
FormData
()
// 当前为空
formData
.
append
(
'file'
,
this
.
fileList
)
importExcel
(
formData
).
then
(
res
=>
{
if
(
res
.
size
>
0
)
{
this
.
getList
();
const
blob
=
new
Blob
([
res
])
const
downloadElement
=
document
.
createElement
(
'a'
)
const
href
=
window
.
URL
.
createObjectURL
(
blob
)
// 创建下载的链接
downloadElement
.
href
=
href
downloadElement
.
download
=
'错误数据'
+
'.xls'
// 下载后文件名
document
.
body
.
appendChild
(
downloadElement
)
downloadElement
.
click
()
// 点击下载
document
.
body
.
removeChild
(
downloadElement
)
// 下载完成移除元素
window
.
URL
.
revokeObjectURL
(
href
)
// 释放掉blob对象
// this.download(response.msg);
this
.
$message
.
info
(
'导入数据中有错误数据,已下载请重新填写'
)
this
.
importLoading
=
false
}
else
{
this
.
$message
.
success
(
'导入成功'
)
this
.
fileList
=
[]
// 导入成功后关闭弹出框
this
.
importLoading
=
false
this
.
upload
.
open
=
false
// 导入成功后刷新页面
this
.
getList
()
this
.
importLoading
=
false
}
}
).
catch
(
err
=>
{
this
.
importLoading
=
false
}
)
}
}
,
closeFileDialog
()
{
this
.
upload
.
open
=
false
this
.
fileList
=
[]
}
,
// 文件上传中处理
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
.
getList
()
}
,
employeeUpload
(
file
,
fileList
)
{
console
.
log
(
'file'
,
file
)
this
.
$nextTick
(
_
=>
{
const
a
=
document
.
querySelectorAll
(
'.el-upload-list__item-name'
)
a
[
0
].
title
=
file
.
name
console
.
log
(
a
)
}
)
if
(
fileList
.
length
>
1
)
{
fileList
.
splice
(
0
,
1
)
}
this
.
fileList
=
fileList
[
0
].
raw
}
,
handleRemove
(
file
,
fileList
)
{
this
.
fileList
=
[]
}
,
beforeRemove
(
file
,
fileList
)
{
this
.
fileList
=
[]
}
,
/* 上传文件所需求 */
handlePreview
(
file
)
{
}
,
/** 下载模板操作 */
importTemplate
()
{
importTemplate
().
then
(
response
=>
{
const
blob
=
new
Blob
([
response
])
const
downloadElement
=
document
.
createElement
(
'a'
)
const
href
=
window
.
URL
.
createObjectURL
(
blob
)
// 创建下载的链接
downloadElement
.
href
=
href
downloadElement
.
download
=
'解除隔离人员导入模板'
+
'.xls'
// 下载后文件名
document
.
body
.
appendChild
(
downloadElement
)
downloadElement
.
click
()
// 点击下载
document
.
body
.
removeChild
(
downloadElement
)
// 下载完成移除元素
window
.
URL
.
revokeObjectURL
(
href
)
// 释放掉blob对象
// this.download(response.msg);
}
)
}
,
/** 导出按钮操作 */
handleExport
()
{
this
.
download
(
'system/jcglry/export'
,
{
...
...
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