Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica.cloud.web-education-admin
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
创建新议题
提交
议题看板
打开侧边栏
jingqi.liu
pica.cloud.web-education-admin
提交
a48c7f48
提交
a48c7f48
编写于
12月 31, 2021
作者:
changdi.hao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
测试上传exel
上级
60b91d40
变更
2
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
237 行增加
和
5 行删除
+237
-5
educationApi.js
src/utils/education/educationApi.js
+23
-1
item-shield.vue
src/views/education/item-shield.vue
+214
-4
未找到文件。
src/utils/education/educationApi.js
浏览文件 @
a48c7f48
...
@@ -57,4 +57,26 @@ export const uploadShieldExcel = (data, projectId) => {
...
@@ -57,4 +57,26 @@ export const uploadShieldExcel = (data, projectId) => {
data
:
data
,
data
:
data
,
description
:
'上传excel文件'
,
description
:
'上传excel文件'
,
})
})
}
}
\ No newline at end of file
export
const
uploadMateExcel
=
(
data
)
=>
{
return
fetch
({
headers
:
{
token
:
localStorage
.
getItem
(
"storageToken"
),
},
url
:
getBaseUrl
(
"portal/black/transferHospitalInfo"
),
method
:
"post"
,
data
:
data
,
description
:
"转换机构信息上传文件"
,
});
};
export
const
uploadBatchExcel
=
(
data
)
=>
{
return
fetch
({
headers
:
{
token
:
localStorage
.
getItem
(
"storageToken"
),
},
url
:
getBaseUrl
(
"portal/black/setHospitalBlackStatus/batch"
),
method
:
"post"
,
data
:
data
,
description
:
"屏蔽机构操作上传文件"
,
});
};
src/views/education/item-shield.vue
浏览文件 @
a48c7f48
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
</el-radio-group>
</el-radio-group>
<!--
<el-button
class=
"complete"
type=
"primary"
size=
"small"
@
click=
"complete"
>
完成
</el-button>
-->
<!--
<el-button
class=
"complete"
type=
"primary"
size=
"small"
@
click=
"complete"
>
完成
</el-button>
-->
<el-row
:gutter=
"30"
class=
"row"
type=
"flex"
style=
"margin-top: 10px"
>
<el-row
:gutter=
"30"
class=
"row"
type=
"flex"
style=
"margin-top: 10px"
>
<el-form
:model=
"formInline"
ref=
"formInline"
label-width=
"75px"
class=
"form-inline"
style=
"
;
width:1000px;"
>
<el-form
:model=
"formInline"
ref=
"formInline"
label-width=
"75px"
class=
"form-inline"
style=
"width:1000px;"
>
<el-col
:span=
"6"
v-if=
" shieldType == 0"
>
<el-col
:span=
"6"
v-if=
" shieldType == 0"
>
<el-form-item
label=
"地区:"
>
<el-form-item
label=
"地区:"
>
<el-cascader
<el-cascader
...
@@ -47,12 +47,16 @@
...
@@ -47,12 +47,16 @@
</el-select>
</el-select>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"6"
style=
"padding:0;text-align:right;
padding-right:10px;
"
>
<el-col
:span=
"6"
style=
"padding:0;text-align:right;"
>
<el-button
type=
"primary"
size=
"small"
@
click=
"searchList()"
>
搜索
</el-button>
<el-button
type=
"primary"
size=
"small"
@
click=
"searchList()"
>
搜索
</el-button>
<el-button
type=
"primary"
size=
"small"
@
click=
"importOrder()"
v-if=
"shieldType == 1"
>
批量导入
</el-button>
<el-button
type=
"primary"
size=
"small"
@
click=
"importOrder()"
v-if=
"shieldType == 1"
>
批量导入
</el-button>
</el-col>
</el-col>
</el-form>
</el-form>
</el-row>
</el-row>
<el-row
justify=
"end"
class=
"row"
type=
"flex"
style=
"margin: 5px 0 10px;width:1000px;"
v-if=
"shieldType == 0"
>
<el-button
type=
"primary"
size=
"small"
@
click=
"importMate()"
>
机构匹配
</el-button>
<el-button
type=
"primary"
size=
"small"
@
click=
"importBatch()"
>
批量屏蔽
</el-button>
</el-row>
<el-table
:data=
"tableData"
style=
"width: 100%"
>
<el-table
:data=
"tableData"
style=
"width: 100%"
>
<el-table-column
v-if=
"shieldType == 0"
prop=
"hospitalName"
label=
"医院名称"
align=
"center"
></el-table-column>
<el-table-column
v-if=
"shieldType == 0"
prop=
"hospitalName"
label=
"医院名称"
align=
"center"
></el-table-column>
<el-table-column
<el-table-column
...
@@ -151,13 +155,103 @@
...
@@ -151,13 +155,103 @@
>
>
</div>
</div>
</el-dialog>
</el-dialog>
<!-- 导入匹配机构名单 -->
<el-dialog
class=
"exportlogistics-dialog"
title=
"匹配机构导入"
:visible=
"isShowMate"
@
close=
"isShowMate = false"
width=
"600px"
>
<el-form
label-width=
"120px"
>
<el-form-item
label=
"导入文档:"
>
<el-upload
class=
"upload-excel"
action=
"#"
accept=
".xlsx"
multiple
:limit=
"1"
:show-file-list=
"true"
:before-upload=
"uploadMateFile"
>
<div
class=
"upload-container"
>
<el-input
class=
"file-name"
v-model=
"mateFileData.fileName"
size=
"mini"
readonly
></el-input
>
<el-button
type=
"primary"
size=
"mini"
>
选择文件
</el-button>
</div>
</el-upload>
</el-form-item>
<el-form-item
label=
"模板:"
>
<a
class=
"import-url"
:href=
"mateTmpUrl"
style=
"color: #449284"
>
导入匹配机构模板.xlxs
</a>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
size=
"small"
@
click=
"cancelMateImport"
>
取消
</el-button>
<el-button
size=
"small"
:loading=
"isLoading"
type=
"primary"
@
click=
"confirmMateImport"
>
确认
</el-button
>
</div>
</el-dialog>
<!-- 导入匹配机构名单 -->
<el-dialog
class=
"exportlogistics-dialog"
title=
"匹配机构导入"
:visible=
"isShowBatch"
@
close=
"isShowBatch = false"
width=
"600px"
>
<el-form
label-width=
"120px"
>
<el-form-item
label=
"导入文档:"
>
<el-upload
class=
"upload-excel"
action=
"#"
accept=
".xlsx"
multiple
:limit=
"1"
:show-file-list=
"true"
:before-upload=
"uploadBatchFile"
>
<div
class=
"upload-container"
>
<el-input
class=
"file-name"
v-model=
"batchFileData.fileName"
size=
"mini"
readonly
></el-input
>
<el-button
type=
"primary"
size=
"mini"
>
选择文件
</el-button>
</div>
</el-upload>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
size=
"small"
@
click=
"cancelBatchImport"
>
取消
</el-button>
<el-button
size=
"small"
:loading=
"isLoading"
type=
"primary"
@
click=
"confirmBatchImport"
>
确认
</el-button
>
</div>
</el-dialog>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
BreadCrumb
from
"../../components/breadcrumb.vue"
;
import
BreadCrumb
from
"../../components/breadcrumb.vue"
;
import
{
mapGetters
}
from
"vuex"
;
import
{
mapGetters
}
from
"vuex"
;
import
{
openLoading
,
closeLoading
}
from
"../../utils/utils"
;
import
{
openLoading
,
closeLoading
}
from
"../../utils/utils"
;
import
{
uploadShieldExcel
}
from
"@/utils/education/educationApi"
;
import
{
uploadShieldExcel
,
uploadMateExcel
,
uploadBatchExcel
}
from
"@/utils/education/educationApi"
;
import
*
as
commonUtil
from
"../../utils/utils"
;
import
*
as
commonUtil
from
"../../utils/utils"
;
import
*
as
operationData
from
"../../utils/operation"
;
import
*
as
operationData
from
"../../utils/operation"
;
let
vm
=
null
;
let
vm
=
null
;
...
@@ -215,6 +309,17 @@ export default {
...
@@ -215,6 +309,17 @@ export default {
shieldBlock
:
""
,
shieldBlock
:
""
,
scopeRow
:
{},
scopeRow
:
{},
administrativeValue
:
""
,
administrativeValue
:
""
,
isShowMate
:
false
,
isShowBatch
:
false
,
mateFileData
:
{
file
:
""
,
fileName
:
""
,
},
batchFileData
:
{
file
:
""
,
fileName
:
""
,
},
mateTmpUrl
:
'https://files.yunqueyi.com/template/org_template.xlsx'
,
props
:
{
props
:
{
lazy
:
true
,
lazy
:
true
,
lazyLoad
(
node
,
resolve
)
{
lazyLoad
(
node
,
resolve
)
{
...
@@ -523,7 +628,112 @@ export default {
...
@@ -523,7 +628,112 @@ export default {
console
.
log
(
`当前页:
${
val
}
`
);
console
.
log
(
`当前页:
${
val
}
`
);
this
.
formInline
.
pageNo
=
val
;
this
.
formInline
.
pageNo
=
val
;
this
.
search
();
this
.
search
();
}
},
download
()
{
const
downloadUrl
=
'https://files.yunqueyi.com/template/org_template.xlsx'
;
setTimeout
(()
=>
{
window
.
open
(
downloadUrl
);
},
500
);
},
importMate
()
{
this
.
isShowMate
=
true
;
},
importBatch
()
{
this
.
isShowBatch
=
true
},
uploadMateFile
(
file
)
{
this
.
mateFileData
.
fileName
=
file
.
name
;
const
formData
=
new
FormData
();
formData
.
append
(
"file"
,
file
)
this
.
mateFileData
.
file
=
formData
;
},
// 确认导入
confirmMateImport
()
{
this
.
isLoading
=
true
;
let
parmas
=
{
file
:
this
.
mateFileData
.
file
,
projectId
:
this
.
projectId
}
uploadMateExcel
(
parmas
).
then
(
res
=>
{
if
(
res
.
code
==
'000000'
)
{
if
(
res
.
data
)
{
this
.
isLoading
=
false
;
this
.
isShowMate
=
false
;
let
a
=
document
.
createElement
(
'a'
);
let
href
=
res
.
data
;
a
.
setAttribute
(
'href'
,
href
);
a
.
click
();
this
.
$message
({
message
:
'导入成功,您上传的机构信息已匹配完成,请确认后进行批量屏蔽'
,
type
:
'success'
});
}
else
{
this
.
isLoading
=
false
;
this
.
$message
.
error
(
res
.
message
);
}
}
else
{
this
.
isLoading
=
false
;
this
.
$message
.
error
(
res
.
message
);
}
}).
catch
(
error
=>
{
this
.
isLoading
=
false
;
this
.
$message
.
error
(
error
.
message
);
})
},
// 取消导入
cancelMateImport
()
{
this
.
mateFileData
=
{
file
:
""
,
fileName
:
""
,
};
this
.
isShowMate
=
false
;
},
uploadBatchFile
(
file
)
{
this
.
batchFileData
.
fileName
=
file
.
name
;
const
formData
=
new
FormData
();
formData
.
append
(
"file"
,
file
)
this
.
batchFileData
.
file
=
formData
;
},
// 确认导入
confirmBatchImport
()
{
this
.
isLoading
=
true
;
let
parmas
=
{
file
:
this
.
batchFileData
.
file
,
projectId
:
this
.
projectId
}
uploadBatchExcel
(
parmas
).
then
(
res
=>
{
if
(
res
.
code
==
'000000'
)
{
if
(
res
.
data
)
{
this
.
isLoading
=
false
;
this
.
isShowMate
=
false
;
let
a
=
document
.
createElement
(
'a'
);
let
href
=
res
.
data
;
a
.
setAttribute
(
'href'
,
href
);
a
.
click
();
this
.
$message
({
message
:
'导入成功,您上传的机构信息已匹配完成,请确认后进行批量屏蔽'
,
type
:
'success'
});
}
else
{
this
.
isLoading
=
false
;
this
.
$message
.
error
(
res
.
message
);
}
}
else
{
this
.
isLoading
=
false
;
this
.
$message
.
error
(
res
.
message
);
}
}).
catch
(
error
=>
{
this
.
isLoading
=
false
;
this
.
$message
.
error
(
error
.
message
);
})
},
cancelBatchImport
()
{
this
.
batchFileData
=
{
file
:
""
,
fileName
:
""
,
};
this
.
isShowBatch
=
false
;
},
}
}
};
};
</
script
>
</
script
>
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录