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
提交
2fb52c45
提交
2fb52c45
编写于
9月 09, 2019
作者:
zhentian.jia
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
导入模板和下载导入模板问题
上级
3a99537f
变更
4
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
101 行增加
和
22 行删除
+101
-22
educationApi.js
src/utils/education/educationApi.js
+18
-0
env-config.js
src/utils/env-config.js
+4
-0
index.js
src/utils/index.js
+5
-0
item-role.vue
src/views/system/item-role.vue
+74
-22
未找到文件。
src/utils/education/educationApi.js
0 → 100644
浏览文件 @
2fb52c45
import
fetch
from
'../fetch'
;
import
{
getBaseUrl
}
from
'@/utils/index'
;
export
const
uploadExcel
=
(
data
,
projectId
)
=>
{
// return utils.checkAuth(()=>{
return
fetch
({
headers
:
{
sysCode
:
12
,
token
:
localStorage
.
getItem
(
'storageToken'
),
},
url
:
getBaseUrl
(
'portal/portalProjectOrRole/importRoleFile?projectId='
+
projectId
),
method
:
'post'
,
data
:
data
,
description
:
'上传excel文件'
,
})
// })
}
\ No newline at end of file
src/utils/env-config.js
浏览文件 @
2fb52c45
...
@@ -30,6 +30,7 @@ export const envConfig = {
...
@@ -30,6 +30,7 @@ export const envConfig = {
reportUrl
:
'https://dev-sc-report.yunqueyi.com/'
,
reportUrl
:
'https://dev-sc-report.yunqueyi.com/'
,
// reportUrl: 'https://test1-sc-report.yunqueyi.com/',
// reportUrl: 'https://test1-sc-report.yunqueyi.com/',
// reportUrl: 'https://uat-sc-report.yunqueyi.com/',
// reportUrl: 'https://uat-sc-report.yunqueyi.com/',
excelUrl
:
'https://test-file.yunqueyi.com/File/template/onlineExam/'
,
},
},
dev
:
{
dev
:
{
baseUrl
:
'https://dev-sc.yunqueyi.com/'
,
baseUrl
:
'https://dev-sc.yunqueyi.com/'
,
...
@@ -45,6 +46,7 @@ export const envConfig = {
...
@@ -45,6 +46,7 @@ export const envConfig = {
workApiUrl
:
'https://dev-work.yunqueyi.com/web'
,
workApiUrl
:
'https://dev-work.yunqueyi.com/web'
,
workApiSrc
:
'https://dev-work.yunqueyi.com'
,
workApiSrc
:
'https://dev-work.yunqueyi.com'
,
reportUrl
:
'https://dev-sc-report.yunqueyi.com/'
,
reportUrl
:
'https://dev-sc-report.yunqueyi.com/'
,
excelUrl
:
'https://test-file.yunqueyi.com/File/template/onlineExam/'
,
},
},
test
:
{
test
:
{
baseUrl
:
'https://test1-sc.yunqueyi.com/'
,
baseUrl
:
'https://test1-sc.yunqueyi.com/'
,
...
@@ -60,6 +62,7 @@ export const envConfig = {
...
@@ -60,6 +62,7 @@ export const envConfig = {
workApiUrl
:
'https://test1-work.yunqueyi.com/web'
,
workApiUrl
:
'https://test1-work.yunqueyi.com/web'
,
workApiSrc
:
'https://test1-work.yunqueyi.com'
,
workApiSrc
:
'https://test1-work.yunqueyi.com'
,
reportUrl
:
'https://test1-sc-report.yunqueyi.com/'
,
reportUrl
:
'https://test1-sc-report.yunqueyi.com/'
,
excelUrl
:
'https://test-file.yunqueyi.com/File/template/onlineExam/'
,
},
},
test2
:
{
test2
:
{
baseUrl
:
'https://test2-work.yunqueyi.com/sc/'
,
baseUrl
:
'https://test2-work.yunqueyi.com/sc/'
,
...
@@ -74,6 +77,7 @@ export const envConfig = {
...
@@ -74,6 +77,7 @@ export const envConfig = {
workApiUrl
:
'https://test2-work.yunqueyi.com/web'
,
workApiUrl
:
'https://test2-work.yunqueyi.com/web'
,
workApiSrc
:
'https://test2-work.yunqueyi.com'
,
workApiSrc
:
'https://test2-work.yunqueyi.com'
,
reportUrl
:
'https://test2-sc-report.yunqueyi.com/'
,
reportUrl
:
'https://test2-sc-report.yunqueyi.com/'
,
excelUrl
:
'https://test-file.yunqueyi.com/File/template/onlineExam/'
,
},
},
uat
:
{
uat
:
{
baseUrl
:
'https://uat-sc.yunqueyi.com/'
,
baseUrl
:
'https://uat-sc.yunqueyi.com/'
,
...
...
src/utils/index.js
浏览文件 @
2fb52c45
...
@@ -210,4 +210,9 @@ function getConfigByEnvType(urlType) {
...
@@ -210,4 +210,9 @@ function getConfigByEnvType(urlType) {
// 获取report服务器域名地址
// 获取report服务器域名地址
export
function
getReportUrl
(
url
)
{
export
function
getReportUrl
(
url
)
{
return
getConfigByEnvType
(
'reportUrl'
)
+
url
return
getConfigByEnvType
(
'reportUrl'
)
+
url
}
// 获取SC服务器域名地址
export
function
getExeclUrl
(
url
)
{
return
getConfigByEnvType
(
'excelUrl'
)
+
url
}
}
\ No newline at end of file
src/views/system/item-role.vue
浏览文件 @
2fb52c45
...
@@ -89,11 +89,18 @@
...
@@ -89,11 +89,18 @@
<span
v-if=
"scope.row.projeceRole == 'L2'"
>
全部地区
</span>
<span
v-if=
"scope.row.projeceRole == 'L2'"
>
全部地区
</span>
<span
v-if=
"scope.row.projeceRole == 'L4'"
>
-
</span>
<span
v-if=
"scope.row.projeceRole == 'L4'"
>
-
</span>
<span
v-if=
"scope.row.projeceRole == 'L3' && scope.row.regions.length == 0"
>
-
</span>
<span
v-if=
"scope.row.projeceRole == 'L3' && scope.row.regions.length == 0"
>
-
</span>
<span
v-if=
"scope.row.projeceRole == 'L3' && scope.row.regions.length == 1"
>
{{
scope
.
row
.
regions
[
0
]
}}
</span>
<span
<el-popover
v-if=
"scope.row.projeceRole == 'L3' && scope.row.regions.length > 1"
placement=
"bottom"
title
width=
"200"
trigger=
"hover"
class=
"more-text"
>
v-if=
"scope.row.projeceRole == 'L3' && scope.row.regions.length == 1"
<p
class=
"more-text"
>
>
{{
scope
.
row
.
regions
[
0
]
}}
</span>
{{
scope
.
row
.
regions
|
areaList
}}
<el-popover
</p>
v-if=
"scope.row.projeceRole == 'L3' && scope.row.regions.length > 1"
placement=
"bottom"
title
width=
"200"
trigger=
"hover"
class=
"more-text"
>
<p
class=
"more-text"
>
{{
scope
.
row
.
regions
|
areaList
}}
</p>
<p
slot=
"reference"
>
{{
scope
.
row
|
areaText
}}
</p>
<p
slot=
"reference"
>
{{
scope
.
row
|
areaText
}}
</p>
</el-popover>
</el-popover>
</
template
>
</
template
>
...
@@ -272,6 +279,8 @@ import BreadCrumb from "../../components/breadcrumb.vue";
...
@@ -272,6 +279,8 @@ import BreadCrumb from "../../components/breadcrumb.vue";
import
{
create
}
from
"domain"
;
import
{
create
}
from
"domain"
;
import
{
openLoading
,
closeLoading
}
from
"../../utils/utils"
;
import
{
openLoading
,
closeLoading
}
from
"../../utils/utils"
;
import
*
as
commonUtil
from
"../../utils/utils"
;
import
*
as
commonUtil
from
"../../utils/utils"
;
import
{
getExeclUrl
}
from
"@/utils/index"
;
import
{
uploadExcel
}
from
"@/utils/education/educationApi"
;
let
vm
=
null
;
let
vm
=
null
;
export
default
{
export
default
{
components
:
{
components
:
{
...
@@ -310,6 +319,10 @@ export default {
...
@@ -310,6 +319,10 @@ export default {
// label: "内部管理员",
// label: "内部管理员",
// value: "L1"
// value: "L1"
// },
// },
{
label
:
"全部"
,
value
:
""
},
{
{
label
:
"项目负责人"
,
label
:
"项目负责人"
,
value
:
"L2"
value
:
"L2"
...
@@ -351,7 +364,7 @@ export default {
...
@@ -351,7 +364,7 @@ export default {
tagsRegion
:
[],
tagsRegion
:
[],
doctorId
:
""
,
doctorId
:
""
,
allSelectedKeys
:
[],
allSelectedKeys
:
[],
attachRegionId
:
""
,
attachRegionId
:
""
};
};
},
},
created
()
{
created
()
{
...
@@ -364,10 +377,48 @@ export default {
...
@@ -364,10 +377,48 @@ export default {
},
},
methods
:
{
methods
:
{
download
(
type
)
{
download
(
type
)
{
console
.
log
(
"下载"
,
type
);
let
downloadUrl
=
""
;
if
(
type
==
"model"
)
{
downloadUrl
=
getExeclUrl
(
"%E5%AF%BC%E5%85%A5%E9%A2%98%E7%9B%AE%E6%A8%A1%E6%9D%BF.xlsx"
);
}
else
if
(
type
==
"fail"
)
{
}
console
.
log
(
"下载"
,
type
,
downloadUrl
);
setTimeout
(()
=>
{
window
.
open
(
downloadUrl
);
},
500
);
},
},
beforeUpload
(
file
)
{
beforeUpload
(
file
)
{
console
.
log
(
file
);
console
.
log
(
file
);
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
};
let
projectId
=
vm
.
formInline
.
portalProjectId
;
console
.
log
(
"req"
,
req
);
let
reqStr
=
JSON
.
stringify
(
req
);
console
.
log
(
"reqStr"
,
reqStr
);
uploadExcel
(
reqStr
,
projectId
).
then
(
res
=>
{
console
.
log
(
res
);
});
};
reader
.
readAsDataURL
(
file
);
},
},
searchList
()
{
searchList
()
{
this
.
formInline
.
pageNo
=
1
;
this
.
formInline
.
pageNo
=
1
;
...
@@ -629,7 +680,7 @@ export default {
...
@@ -629,7 +680,7 @@ export default {
return
{
type
:
2
,
key
:
key
};
return
{
type
:
2
,
key
:
key
};
}),
}),
allSelectedKeys
=
savedCheckedKeys
.
concat
(
savedHalfCheckedKeys
);
allSelectedKeys
=
savedCheckedKeys
.
concat
(
savedHalfCheckedKeys
);
// console.log('allSelectedKeys值:',allSelectedKeys)
// console.log('allSelectedKeys值:',allSelectedKeys)
return
allSelectedKeys
;
return
allSelectedKeys
;
},
},
// 递归删除列表中所有子节点
// 递归删除列表中所有子节点
...
@@ -763,23 +814,24 @@ export default {
...
@@ -763,23 +814,24 @@ export default {
attachRegionId
:
vm
.
attachRegionId
,
attachRegionId
:
vm
.
attachRegionId
,
doctorId
:
vm
.
doctorId
,
doctorId
:
vm
.
doctorId
,
projectId
:
vm
.
formInline
.
portalProjectId
,
projectId
:
vm
.
formInline
.
portalProjectId
,
scopeOfAdministrative
:
vm
.
getScope
()
,
scopeOfAdministrative
:
vm
.
getScope
()
};
};
console
.
log
(
"req"
,
req
);
console
.
log
(
"req"
,
req
);
vm
.
POST
(
"portal/portalProjectOrRole/insertOrUpdateAttachRegion"
,
req
).
then
(
vm
.
POST
(
res
=>
{
"portal/portalProjectOrRole/insertOrUpdateAttachRegion"
,
if
(
res
.
code
==
"000000"
)
{
req
vm
.
$message
({
).
then
(
res
=>
{
message
:
'设置成功'
,
if
(
res
.
code
==
"000000"
)
{
type
:
'success'
vm
.
$message
({
});
message
:
"设置成功"
,
vm
.
dialogArea
=
false
;
type
:
"success"
vm
.
queryRoleList
();
});
}
else
{
vm
.
dialogArea
=
false
;
vm
.
$message
.
error
(
res
.
message
);
vm
.
queryRoleList
();
}
}
else
{
vm
.
$message
.
error
(
res
.
message
);
}
}
);
}
);
}
}
}
}
};
};
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录