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
提交
82de5d95
提交
82de5d95
编写于
9月 09, 2019
作者:
zhentian.jia
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
数据导入问题
上级
2fb52c45
变更
3
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
54 行增加
和
4 行删除
+54
-4
educationApi.js
src/utils/education/educationApi.js
+1
-0
env-config.js
src/utils/env-config.js
+2
-0
item-role.vue
src/views/system/item-role.vue
+51
-4
未找到文件。
src/utils/education/educationApi.js
浏览文件 @
82de5d95
...
...
@@ -6,6 +6,7 @@ export const uploadExcel = (data,projectId) => {
// return utils.checkAuth(()=>{
return
fetch
({
headers
:
{
'Content-Type'
:
'application/json;charset=UTF-8'
,
sysCode
:
12
,
token
:
localStorage
.
getItem
(
'storageToken'
),
},
...
...
src/utils/env-config.js
浏览文件 @
82de5d95
...
...
@@ -93,6 +93,7 @@ export const envConfig = {
workApiUrl
:
'https://uat-work.yunqueyi.com/web'
,
workApiSrc
:
'https://uat-work.yunqueyi.com'
,
reportUrl
:
'https://uat-sc-report.yunqueyi.com/'
,
excelUrl
:
'https://test-file.yunqueyi.com/File/template/onlineExam/'
,
},
pro
:
{
baseUrl
:
'https://sc.yunqueyi.com/'
,
...
...
@@ -108,5 +109,6 @@ export const envConfig = {
workApiUrl
:
'https://work.yunqueyi.com/web'
,
workApiSrc
:
'https://work.yunqueyi.com'
,
reportUrl
:
'https://sc-report.yunqueyi.com/'
,
excelUrl
:
'https://test-file.yunqueyi.com/File/template/onlineExam/'
,
}
}
src/views/system/item-role.vue
浏览文件 @
82de5d95
...
...
@@ -224,7 +224,12 @@
:limit=
"1"
:before-upload=
"beforeUpload"
>
<el-button
type=
"primary"
size=
"small"
>
重新导入
</el-button>
<el-button
stype=
"position: absolute;top: -14px;"
type=
"primary"
size=
"small"
@
click=
"updateAgain()"
>
重新导入
</el-button>
</el-upload>
</span>
</el-dialog>
...
...
@@ -348,10 +353,11 @@ export default {
dialogFull
:
false
,
scopeRow
:
{},
activeUser
:
""
,
updateNum
:
5
0
,
updateNum
:
0
,
dialogSuccess
:
false
,
failType
:
2
,
failNum
:
2
,
failExcelUrl
:
""
,
dialogFail
:
false
,
defaultProps
:
{
...
...
@@ -376,6 +382,9 @@ export default {
commonUtil
.
resizeHeight
();
},
methods
:
{
updateAgain
()
{
vm
.
dialogFail
=
false
;
},
download
(
type
)
{
let
downloadUrl
=
""
;
if
(
type
==
"model"
)
{
...
...
@@ -383,6 +392,7 @@ export default {
"%E5%AF%BC%E5%85%A5%E9%A2%98%E7%9B%AE%E6%A8%A1%E6%9D%BF.xlsx"
);
}
else
if
(
type
==
"fail"
)
{
downloadUrl
=
vm
.
failExcelUrl
;
}
console
.
log
(
"下载"
,
type
,
downloadUrl
);
setTimeout
(()
=>
{
...
...
@@ -390,6 +400,8 @@ export default {
},
500
);
},
beforeUpload
(
file
)
{
vm
.
dialogFail
=
false
;
console
.
log
(
file
);
let
arr
=
file
.
type
.
split
(
"/"
);
let
ext
=
"."
+
arr
[
1
];
...
...
@@ -403,7 +415,7 @@ export default {
};
let
fileArray
=
[
{
type
:
""
,
type
:
6
,
base64
:
fileJson
}
];
...
...
@@ -414,7 +426,36 @@ export default {
console
.
log
(
"req"
,
req
);
let
reqStr
=
JSON
.
stringify
(
req
);
console
.
log
(
"reqStr"
,
reqStr
);
openLoading
(
vm
);
uploadExcel
(
reqStr
,
projectId
).
then
(
res
=>
{
closeLoading
(
vm
);
if
(
res
.
code
==
"000000"
)
{
if
(
res
.
data
.
success
==
true
)
{
//导入成功
vm
.
dialogSuccess
=
true
;
vm
.
updateNum
=
res
.
data
.
total
;
vm
.
queryRoleList
();
}
else
{
if
(
res
.
data
.
outCount
==
true
)
{
//导入数据超5000
vm
.
failType
=
1
;
vm
.
dialogFail
=
true
;
vm
.
failNum
=
res
.
data
.
total
;
vm
.
failExcelUrl
=
res
.
data
.
url
;
}
else
{
//导入失败
setTimeout
(
function
()
{
vm
.
failType
=
2
;
vm
.
dialogFail
=
true
;
vm
.
failNum
=
res
.
data
.
total
;
vm
.
failExcelUrl
=
res
.
data
.
url
;
},
700
);
}
}
}
else
{
//接口失败
vm
.
$message
.
error
(
res
.
message
);
}
console
.
log
(
res
);
});
};
...
...
@@ -442,7 +483,8 @@ export default {
vm
.
tableData
=
res
.
data
.
projectRoleInfoModels
;
vm
.
totalRows
=
res
.
data
.
total
;
vm
.
activeUser
=
res
.
data
.
activeUser
;
console
.
log
(
"activeUser"
,
vm
.
activeUser
);
vm
.
creator
=
res
.
data
.
creator
;
console
.
log
(
"activeUser"
,
vm
.
activeUser
,
"vm.creator"
,
vm
.
creator
);
//this.roleList = setRoleList(res.data.roleList);
this
.
organizationList
=
res
.
data
.
organizationList
;
this
.
departmentsList
=
res
.
data
.
departmentsList
;
...
...
@@ -527,6 +569,11 @@ export default {
if
(
projeceRole
==
"L2"
||
projeceRole
==
"L3"
)
{
flag
=
true
;
}
}
else
if
(
row
.
projeceRole
==
"L2"
&&
vm
.
creator
==
true
)
{
//创建项目项目管理员可以修改其他项目管理员
if
(
projeceRole
==
"L0"
)
{
flag
=
true
;
}
}
}
else
if
(
vm
.
activeUser
==
"L3"
)
{
//当前次级负责人
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录