Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica-risk-admin
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
com.pica.cloud.education.frontend
pica-risk-admin
提交
f63f15b1
提交
f63f15b1
编写于
12月 14, 2020
作者:
huangwensu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
文件导入
上级
f17156d1
变更
3
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
77 行增加
和
67 行删除
+77
-67
env.js
src/common/env.js
+1
-1
doctor-black.vue
src/views/black-list/doctor-black.vue
+38
-28
empty-phone.vue
src/views/black-list/empty-phone.vue
+38
-38
未找到文件。
src/common/env.js
浏览文件 @
f63f15b1
...
...
@@ -63,7 +63,7 @@ export const getAddress = () => {
// qiniuUrl = "http://10.177.15.154:10203/contents/admin/qiniu/token"; //不再使用middle服务获取七牛token
qiniuUrl
=
"https://dev-sc.yunqueyi.com/contents/admin/qiniu/token"
;
// qiniuFileUrl = "http://10.177.15.154:10203/contents/admin/qiniu/token1";
qiniuFileUrl
=
"http://dev-sc.yunqueyi.com/contents/admin/qiniu/token1"
;
qiniuFileUrl
=
"http
s
://dev-sc.yunqueyi.com/contents/admin/qiniu/token1"
;
qiniuResourceUrl
=
"https://test1-videos.yunqueyi.com"
;
}
else
if
(
isNotEmptyUtils
(
env
))
{
//测试test1 test2 uat
versionUrl
=
'https://'
+
env
+
'-dev.yunqueyi.com'
;
...
...
src/views/black-list/doctor-black.vue
浏览文件 @
f63f15b1
...
...
@@ -86,14 +86,13 @@
<el-upload
class=
"upload-demo"
accept=
".xlsx"
:headers=
"uploadHeaders"
:action=
"returnActionUrl()"
action=
"#"
:before-upload=
"uploadImportFile"
:on-success=
"uploadSuccess"
>
<el-button
type=
"default"
>
点击上传
</el-button>
</el-upload>
<span
v-if=
"tipTextFlag"
style=
"color:red;"
>
请选择上传文件
</span>
<span>
{{importFileName.name}}
</span>
<p
v-if=
"tipTextFlag"
style=
"color:red;"
>
请选择上传文件
</p>
<div
v-if=
"importError"
@
click=
"downloadError"
>
导入的Excel有问题,点击下载查看具体问题
</div>
</el-form-item>
<div
class=
"el-upload__tip"
@
click=
"download"
>
下载导入模板
</div>
...
...
@@ -134,7 +133,8 @@ export default {
importFileName
:
{},
tipTextFlag
:
false
,
importError
:
false
,
importErrorFileUrl
:
''
importErrorFileUrl
:
''
,
filePath
:
''
}
},
filters
:
{
...
...
@@ -149,27 +149,25 @@ export default {
methods
:
{
// 封装一下请求通用的方法
getData
(
type
,
url
,
req
,
callback
)
{
openLoading
(
this
);
//
openLoading(this);
this
.
$axios
[
type
](
localStorage
.
getItem
(
"lectureUrl"
)
+
url
,
req
)
.
then
(
res
=>
{
closeLoading
(
this
);
//
closeLoading(this);
let
data
=
res
.
data
;
if
(
data
.
code
==
"000000"
)
{
if
(
callback
)
callback
(
data
);
}
else
{
this
.
$message
.
error
(
data
.
message
);
}
})
.
catch
(
error
=>
{
closeLoading
(
this
);
this
.
$message
.
error
(
"网络出现点问题"
);
});
},
search
(
param
)
{
openLoading
(
this
);
if
(
param
)
this
.
searchParam
.
pageNo
=
1
;
this
.
getData
(
"get"
,
`/riskcontrol/blacklist/list?searchName=
${
this
.
searchParam
.
searchName
}
&pageNo=
${
this
.
searchParam
.
pageNo
}
&pageSize=
${
this
.
searchParam
.
pageSize
}
`
,
{},
data
=>
{
closeLoading
(
this
);
this
.
tableData
=
data
.
data
.
blackListResps
;
this
.
totalRows
=
data
.
data
.
total
;
}
...
...
@@ -180,36 +178,48 @@ export default {
this
.
importDialogVisible
=
true
;
this
.
tipTextFlag
=
false
;
},
returnActionUrl
()
{
return
localStorage
.
getItem
(
"lectureUrl"
)
+
"/riskcontrol/blacklist/import"
;
},
//
returnActionUrl() {
//
return localStorage.getItem("lectureUrl") + "/riskcontrol/blacklist/import";
//
},
// 判断有没有导入文件
confirmImport
()
{
if
(
!
this
.
importFileName
.
name
)
{
this
.
tipTextFlag
=
true
;
}
else
{
this
.
importDialogVisible
=
false
;
}
let
req
=
{
file
:
this
.
filePath
};
this
.
getData
(
"post"
,
`/riskcontrol/blacklist/import`
,
req
,
data
=>
{
if
(
data
.
code
==
'000000'
)
{
this
.
importDialogVisible
=
false
;
}
else
{
this
.
tipTextFlag
=
true
;
}
}
);
},
// 上传文件
uploadImportFile
(
file
)
{
this
.
tipTextFlag
=
false
;
let
_this
=
this
;
_this
.
tipTextFlag
=
false
;
var
FileExt
=
file
.
name
.
replace
(
/.+
\.
/
,
""
);
if
([
"xls"
,
"xlsx"
].
indexOf
(
FileExt
.
toLowerCase
())
===
-
1
)
{
this
.
$message
({
_
this
.
$message
({
type
:
"warning"
,
message
:
"请上传后缀名为xls,xlsx的原文件!"
,
});
return
false
;
}
this
.
importFileName
=
file
;
},
uploadSuccess
(
res
,
file
,
fileList
)
{
if
(
res
.
data
)
{
// 导入的Excel有问题
this
.
importError
=
true
;
this
.
importErrorFileUrl
=
res
.
data
;
}
_this
.
importFileName
=
file
;
doUpload
(
_this
,
file
,
getFilePath
(
file
,
null
),
'preview4'
,
'progress1'
,
1
).
then
(
path
=>
{
_this
.
filePath
=
path
.
fullPath
;
});
},
// uploadSuccess(res, file, fileList) {
// if(res.data) { // 导入的Excel有问题
// this.importError = true;
// this.importErrorFileUrl = res.data;
// }
// },
// 下载查看导入的有问题Excel
downloadError
()
{
//window.open(this.importErrorFileUrl);
...
...
src/views/black-list/empty-phone.vue
浏览文件 @
f63f15b1
...
...
@@ -86,13 +86,12 @@
<el-upload
class=
"upload-demo"
accept=
".xlsx"
:headers=
"uploadHeaders"
:action=
"returnActionUrl()"
:before-upload=
"uploadImportFile"
:on-success=
"uploadSuccess"
>
action=
"#"
:before-upload=
"uploadImportFile"
>
<el-button
type=
"default"
>
点击上传
</el-button>
</el-upload>
<span
v-if=
"tipTextFlag"
style=
"color:red;"
>
请选择上传文件
</span>
<span>
{{importFileName.name}}
</span>
<p
v-if=
"tipTextFlag"
style=
"color:red;"
>
请选择上传文件
</p>
<div
v-if=
"importError"
@
click=
"downloadError"
>
导入的Excel有问题,点击下载查看具体问题
</div>
</el-form-item>
<div
class=
"el-upload__tip"
@
click=
"download"
>
下载导入模板
</div>
...
...
@@ -128,11 +127,13 @@ export default {
removeTel
:
''
,
importFileName
:
{},
uploadHeaders
:
{
token
:
window
.
localStorage
.
getItem
(
'token'
)
token
:
window
.
localStorage
.
getItem
(
'token'
),
'Content-Type'
:
'multipart/form-data'
},
tipTextFlag
:
false
,
importError
:
false
,
importErrorFileUrl
:
''
importErrorFileUrl
:
''
,
filePath
:
''
}
},
filters
:
{
...
...
@@ -146,27 +147,25 @@ export default {
methods
:
{
// 封装一下请求通用的方法
getData
(
type
,
url
,
req
,
callback
)
{
openLoading
(
this
);
//
openLoading(this);
this
.
$axios
[
type
](
localStorage
.
getItem
(
"lectureUrl"
)
+
url
,
req
)
.
then
(
res
=>
{
closeLoading
(
this
);
let
data
=
res
.
data
;
if
(
data
.
code
==
"000000"
)
{
if
(
callback
)
callback
(
data
);
}
else
{
this
.
$message
.
error
(
data
.
message
);
}
//
closeLoading(this);
let
data
=
res
.
data
;
if
(
data
.
code
==
"000000"
)
{
if
(
callback
)
callback
(
data
);
}
else
{
this
.
$message
.
error
(
data
.
message
);
}
})
.
catch
(
error
=>
{
closeLoading
(
this
);
this
.
$message
.
error
(
"网络出现点问题"
);
});
},
search
(
param
)
{
openLoading
(
this
);
if
(
param
)
this
.
searchParam
.
pageNo
=
1
;
this
.
getData
(
"get"
,
`/riskcontrol/emptyNumber/list?searchName=
${
this
.
searchParam
.
searchName
}
&pageNo=
${
this
.
searchParam
.
pageNo
}
&pageSize=
${
this
.
searchParam
.
pageSize
}
`
,
{},
data
=>
{
closeLoading
(
this
);
this
.
tableData
=
data
.
data
.
blackListResps
;
this
.
totalRows
=
data
.
data
.
total
;
}
...
...
@@ -210,46 +209,47 @@ export default {
this
.
importDialogVisible
=
true
;
this
.
tipTextFlag
=
false
;
},
returnActionUrl
()
{
return
localStorage
.
getItem
(
"lectureUrl"
)
+
"/riskcontrol/emptyNumber/import"
;
},
// 判断有没有导入文件
confirmImport
()
{
if
(
!
this
.
importFileName
.
name
)
{
this
.
tipTextFlag
=
true
;
}
else
{
this
.
importDialogVisible
=
false
;
}
let
req
=
{
file
:
this
.
filePath
};
this
.
getData
(
"post"
,
`/riskcontrol/emptyNumber/import`
,
req
,
data
=>
{
if
(
data
.
code
==
'000000'
)
{
this
.
importDialogVisible
=
false
;
}
else
{
this
.
tipTextFlag
=
true
;
}
}
);
},
// 上传文件
uploadImportFile
(
file
)
{
this
.
tipTextFlag
=
false
;
let
_this
=
this
;
_this
.
tipTextFlag
=
false
;
var
FileExt
=
file
.
name
.
replace
(
/.+
\.
/
,
""
);
if
([
"xls"
,
"xlsx"
].
indexOf
(
FileExt
.
toLowerCase
())
===
-
1
)
{
this
.
$message
({
_
this
.
$message
({
type
:
"warning"
,
message
:
"请上传后缀名为xls,xlsx的原文件!"
,
});
return
false
;
}
this
.
importFileName
=
file
;
},
uploadSuccess
(
res
,
file
,
fileList
)
{
if
(
res
.
data
)
{
// 导入的Excel有问题
this
.
importError
=
true
;
this
.
importErrorFileUrl
=
res
.
data
;
}
_this
.
importFileName
=
file
;
doUpload
(
_this
,
file
,
getFilePath
(
file
,
null
),
'preview4'
,
'progress1'
,
1
).
then
(
path
=>
{
_this
.
filePath
=
path
.
fullPath
;
});
},
// 下载查看导入的有问题Excel
downloadError
()
{
//window.open(this.importErrorFileUrl);
let
a
=
document
.
createElement
(
'a'
);
a
.
setAttribute
(
'href'
,
this
.
importErrorFileUrl
);
a
.
click
();
},
// 下载导入模板
download
()
{
//window.open('https://file.yunqueyi.com/risk/template.xlsx'); // 后台给的导入Excel地址
let
a
=
document
.
createElement
(
'a'
);
a
.
setAttribute
(
'href'
,
'https://file.yunqueyi.com/risk/template.xlsx'
);
a
.
click
();
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录