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
提交
c53e4f57
提交
c53e4f57
编写于
1月 03, 2024
作者:
xinglee23
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: 导入人员名单优化
上级
64e82d1a
变更
3
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
240 行增加
和
15 行删除
+240
-15
package.json
package.json
+2
-2
educationApi.js
src/utils/education/educationApi.js
+25
-0
edit-manager.vue
src/views/education/edit-manager.vue
+213
-13
未找到文件。
package.json
浏览文件 @
c53e4f57
...
...
@@ -6,7 +6,7 @@
"private"
:
true
,
"license"
:
"GPL"
,
"scripts"
:
{
"dev"
:
"cross-env BUILD_ENV=
uat
node build/dev-server.js"
,
"dev"
:
"cross-env BUILD_ENV=
dev
node build/dev-server.js"
,
"local"
:
"cross-env BUILD_ENV=development node build/dev-server.js"
,
"build"
:
"node build/build.js"
,
"build:dev"
:
"cross-env BUILD_ENV=dev node build/build.js"
,
...
...
src/utils/education/educationApi.js
浏览文件 @
c53e4f57
...
...
@@ -80,3 +80,28 @@ export const uploadBatchExcel = (data) => {
description
:
"屏蔽机构操作上传文件"
,
});
};
export
const
getUploadExcelProgress
=
(
id
)
=>
{
return
fetch
({
headers
:
{
token
:
localStorage
.
getItem
(
"storageToken"
),
},
url
:
getBaseUrl
(
`portal/new/batch/progress/doctor/
${
id
}
`
),
method
:
"post"
,
description
:
"人员导入核销处理进度,id为批次id"
,
});
};
export
const
uploadPersonExcel2
=
(
data
,
projectId
)
=>
{
return
fetch
({
headers
:
{
"Content-Type"
:
"application/json;charset=UTF-8"
,
sysCode
:
12
,
token
:
localStorage
.
getItem
(
"storageToken"
),
},
url
:
getBaseUrl
(
"portal/new/scope/doctor/v2/"
+
projectId
+
"/import"
),
method
:
"put"
,
data
:
data
,
description
:
"上传excel文件"
,
});
};
\ No newline at end of file
src/views/education/edit-manager.vue
浏览文件 @
c53e4f57
...
...
@@ -501,6 +501,9 @@
<el-form-item
label
>
<el-input
size=
"small"
v-model=
"formPerson.doctorName"
placeholder=
"请输入人员名称"
></el-input>
</el-form-item>
<el-form-item
label
>
<el-input
size=
"small"
v-model=
"formPerson.mobile"
placeholder=
"请输入人员手机号"
></el-input>
</el-form-item>
<el-form-item>
<el-button
size=
"small"
type=
"primary"
@
click=
"searchPeople"
>
搜索
</el-button>
</el-form-item>
...
...
@@ -515,7 +518,7 @@
accept=
".xlsx"
multiple
:limit=
"1"
:before-upload=
"uploadPerson"
:before-upload=
"uploadPerson
2
"
>
<el-button
size=
"small"
>
导入人员名单
</el-button>
<el-button
...
...
@@ -647,7 +650,7 @@
action=
"#"
accept=
".xlsx"
:limit=
"1"
:before-upload=
"uploadPerson"
:before-upload=
"uploadPerson
2
"
>
<el-button
class=
"down-button-close"
...
...
@@ -674,7 +677,7 @@
<el-button
type=
"primary"
size=
"small"
@
click=
"dialogSuccess = false"
>
关闭
</el-button>
</span>
</el-dialog>
<el-dialog
title=
"导入失败"
:visible
.
sync=
"dialogFail"
width=
"30%"
class=
"dialog-fail"
center
>
<
!-- <
el-dialog title="导入失败" :visible.sync="dialogFail" width="30%" class="dialog-fail" center>
<div class="fail-type" v-if="failType == 1">
<p>导入数据量已超限额,请修正后再次导入</p>
<p class="fail-notice">仅支持一次导入5000条数据</p>
...
...
@@ -733,7 +736,7 @@
>重新导入</el-button>
</el-upload>
</span>
</el-dialog>
</el-dialog>
-->
</div>
<div
class=
"third-step"
v-else-if=
"active === 2"
>
<el-form
...
...
@@ -1028,6 +1031,102 @@
</el-form>
</div>
</div>
<!-- 导入结果统计 -->
<el-dialog
class=
"exportlogistics-dialog"
title=
"导入完成"
:visible=
"statFlg"
width=
"600px"
@
close=
"statFlg = false"
>
<div
class=
"stat-container"
>
<div
class=
"stat-title"
>
模板数据共{{ ProgressData.totalNum }}条
</div>
<div
class=
"stat-result"
>
<div
class=
"success"
>
成功:{{ ProgressData.successNum }}条
</div>
<div
class=
"repetition"
>
重复:{{ ProgressData.repeatNum }}条
</div>
<div
class=
"repetition"
>
空行:{{ ProgressData.nullNum }}条
</div>
<div
class=
"failure"
>
失败:{{ ProgressData.failNum }}条
</div>
</div>
</div>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
size=
"small"
@
click=
"statFlg = false"
>
取消
</el-button>
<el-button
size=
"small"
type=
"primary"
@
click=
"showReasonDialog"
>
查看失败原因
</el-button>
</div>
</el-dialog>
<!-- 导出进度loading -->
<el-dialog
class=
"exportlogistics-dialog"
:visible=
"progressFlagDetection"
width=
"600px"
:close-on-click-modal=
"false"
:show-close=
"false"
>
<div>
<div
class=
"progress-container"
>
<div
class=
"progress-tag"
>
{{ ProgressData.doneNum }}/{{ ProgressData.totalNum }}
<div
class=
"popper__arrow"
/>
</div>
<div
class=
"progress-content"
>
正在导入...
</div>
</div>
</div>
</el-dialog>
<!-- 倒入失败原因 -->
<el-dialog
class=
"exportlogistics-dialog"
title=
"失败记录"
:visible=
"failureReasonFlag"
width=
"1000px"
@
close=
"failureReasonFlag = false"
>
<div
class=
"FailureReasonFlag-container"
>
<el-table
:data=
"ProgressData.errorList"
border
height=
"360"
style=
"width: 100%"
>
<el-table-column
prop=
"doctorName"
label=
"人员姓名"
align=
"center"
width=
"110"
/>
<el-table-column
prop=
"mobilePhone"
label=
"手机号"
align=
"center"
/>
<el-table-column
prop=
"failInfo"
label=
"失败原因"
align=
"center"
width=
"110"
/>
<el-table-column
prop=
"operationGuide"
label=
"操作指引"
align=
"center"
/>
</el-table>
</div>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
size=
"small"
style=
"margin-right: 15px"
@
click=
"failureReasonFlag = false"
>
取消
</el-button>
<a
:href=
"ProgressData.errorFileUrl"
>
<el-button
size=
"small"
type=
"primary"
>
导出失败记录
</el-button>
</a>
</div>
</el-dialog>
</div>
</template>
<
script
>
...
...
@@ -1040,15 +1139,15 @@ import * as operationData from "../../utils/operation";
import
{
getExeclUrl
}
from
"@/utils/index"
;
import
{
uploadOrgExcel
,
uploadPersonExcel
uploadPersonExcel
,
uploadPersonExcel2
,
getUploadExcelProgress
}
from
"@/utils/education/educationApi"
;
import
Sortable
from
"sortablejs"
;
let
vm
=
null
;
export
default
{
components
:
{
BreadCrumb
},
components
:
{
BreadCrumb
},
data
()
{
let
checkProjectStr
=
(
rule
,
value
,
callback
)
=>
{
if
(
value
.
indexOf
(
"
\
\"
) != -1) {
...
...
@@ -1214,6 +1313,7 @@ export default {
hospitalId: 0,
departmentId: -1,
doctorName: "",
mobile: "",
hospitalName: "",
pageNum: 1,
pageSize: 10
...
...
@@ -1427,7 +1527,22 @@ export default {
attachmentUrl2: [
{ required: true, message: "
请选择封面
", trigger: "
blur
" }
]
}
},
ProgressData: {
// 倒入相关数据
totalNum: '', // 总数
nullNum: '', // 空白行
status: '', // 1完成 0进行中
doneNum: '', // doneNum 完成数量
successNum: '', // 成功数量
failNum: '', // 失败数量
repeatNum: '',
errorFileUrl: '', // 失败 原因文件
errorList: [], // 失败列表
},
statFlg: false,
failureReasonFlag: false,
progressFlagDetection: false, // 导入检测进度弹窗
};
},
computed: {
...
...
@@ -2357,6 +2472,7 @@ export default {
}
else
if
(
tabName
==
"fourth"
)
{
//设定人员
this
.
formPerson
.
pageNum
=
1
;
this
.
formPerson
.
mobile
=
""
;
this
.
formPerson
.
doctorName
=
""
;
this
.
formPerson
.
hospitalName
=
""
;
// this.getHospital();
...
...
@@ -3032,6 +3148,7 @@ export default {
pageNum
:
this
.
formPerson
.
pageNum
,
pageSize
:
this
.
formPerson
.
pageSize
,
doctorName
:
this
.
formPerson
.
doctorName
,
mobile
:
this
.
formPerson
.
mobile
,
hospitalName
:
this
.
formPerson
.
hospitalName
,
scopeOfAdministrative
:
this
.
getScope
(
"administrative"
),
scopeOfDepartment
:
this
.
getScopeDepartment
()
...
...
@@ -3066,6 +3183,7 @@ export default {
hospitalName
:
""
,
scopeOfAdministrative
:
this
.
getScope
(
"administrative"
),
scopeOfDepartment
:
this
.
getScopeDepartment
(),
doctorMobile
:
this
.
formPerson
.
mobile
,
pageNum
:
this
.
formPerson
.
pageNum
,
pageSize
:
this
.
formPerson
.
pageSize
};
...
...
@@ -3901,7 +4019,42 @@ export default {
};
reader
.
readAsDataURL
(
file
);
},
uploadPerson
(
file
)
{
// uploadPerson(file) {
// vm.dialogFail = false;
// vm.uploadType = "person";
// let arr = file.type.split("/");
// let ext = "." + arr[1];
// let name = file.name;
// let reader = new FileReader();
// reader.onload = function(e) {
// let fileJson = {
// fileName: file.name,
// file: e.target.result.substr(e.target.result.indexOf("base64,") + 7),
// ext: ext
// };
// let fileArray = [
// {
// type: "",
// base64: fileJson
// }
// ];
// let req = {
// fileArray: fileArray,
// scopeOfAdministrative: vm.getScope("administrative"),
// scopeOfDepartment: vm.getScopeDepartment()
// };
// let projectId = vm.projectId;
// console.log("req", req);
// let reqStr = JSON.stringify(req);
// openLoading(vm);
// uploadPersonExcel(reqStr, projectId).then(res => {
// closeLoading(vm);
// vm.setDialog(res);
// });
// };
// reader.readAsDataURL(file);
// },
uploadPerson2
(
file
)
{
vm
.
dialogFail
=
false
;
vm
.
uploadType
=
"person"
;
let
arr
=
file
.
type
.
split
(
"/"
);
...
...
@@ -3929,13 +4082,59 @@ export default {
console
.
log
(
"req"
,
req
);
let
reqStr
=
JSON
.
stringify
(
req
);
openLoading
(
vm
);
uploadPersonExcel
(
reqStr
,
projectId
).
then
(
res
=>
{
// vm.dialogSuccess = true;
uploadPersonExcel2
(
reqStr
,
projectId
).
then
(
res
=>
{
console
.
log
(
'eshfjkleshfkes'
,
res
);
if
(
res
.
code
===
'000000'
)
{
vm
.
getUploadTeamOrderProgress
(
res
.
data
.
batchUploadLogId
,
res
);
closeLoading
(
vm
);
vm
.
setDialog
(
res
);
}
});
};
reader
.
readAsDataURL
(
file
);
},
// 获取物流上传进度
getUploadTeamOrderProgress
(
id
,
resParams
)
{
const
fun
=
getUploadExcelProgress
;
console
.
log
(
fun
,
this
.
ExportType
);
fun
(
id
).
then
((
res
)
=>
{
if
(
res
&&
res
.
code
==
'000000'
)
{
this
.
isLoading
=
false
;
this
.
exportDialog
=
false
;
this
.
progressFlagDetection
=
true
;
this
.
ProgressData
=
res
.
data
;
if
(
res
.
data
.
status
==
1
)
{
const
timer
=
setTimeout
(()
=>
{
clearTimeout
(
timer
);
this
.
progressFlagDetection
=
false
;
if
(
this
.
ProgressData
.
totalNum
&&
this
.
ProgressData
.
totalNum
==
this
.
ProgressData
.
successNum
)
{
vm
.
setDialog
(
resParams
);
this
.
$message
.
success
(
'已全部导入完成'
);
}
else
{
this
.
statFlg
=
true
;
}
// 刷新列表
this
.
searchOrganization
();
},
2000
);
}
else
if
(
res
.
data
.
status
==
0
)
{
const
timer
=
setTimeout
(()
=>
{
clearTimeout
(
timer
);
this
.
getUploadTeamOrderProgress
(
id
);
},
2000
);
}
}
else
{
this
.
isLoading
=
false
;
this
.
$message
.
error
(
res
.
message
);
}
});
},
showReasonDialog
()
{
this
.
statFlg
=
false
;
this
.
failureReasonFlag
=
true
;
},
download
(
type
)
{
let
downloadUrl
=
""
;
if
(
type
==
"organization"
)
{
...
...
@@ -4106,6 +4305,7 @@ export default {
}
else
if
(
type
==
"person"
)
{
vm
.
formPerson
.
hospitalName
=
""
;
vm
.
formPerson
.
doctorName
=
""
;
vm
.
formPerson
.
mobile
=
""
;
vm
.
formPerson
.
pageNum
=
1
;
vm
.
searchPeople
();
}
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录