Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica-admin-consultation
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
com.pica.cloud.education.frontend
pica-admin-consultation
提交
f9fddc27
提交
f9fddc27
编写于
3月 14, 2019
作者:
huangwensu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
返回登录
上级
e3a6d58a
变更
7
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
171 行增加
和
66 行删除
+171
-66
App.vue
src/App.vue
+15
-5
common.scss
src/style/common.scss
+18
-3
envConfig.js
src/utils/envConfig.js
+19
-9
index.js
src/utils/index.js
+8
-0
create-component.vue
src/views/education/create-component.vue
+37
-24
header.vue
src/views/layout/header.vue
+17
-5
slidebar.vue
src/views/layout/slidebar.vue
+57
-20
未找到文件。
src/App.vue
浏览文件 @
f9fddc27
<
template
>
<div>
<v-header
:userName=
"userName"
:portrait=
"portrait"
></v-header>
<v-header
:userName=
"userName"
:portrait=
"portrait"
:idType=
"idType"
></v-header>
<v-slidebar
:authList=
"authList"
:tokenValue=
"token"
></v-slidebar>
<el-container>
<div
class=
"content"
id=
"body-content"
>
...
...
@@ -22,8 +22,9 @@
import
VHeader
from
'./views/layout/header.vue'
import
VSlidebar
from
'./views/layout/slidebar.vue'
import
VFooter
from
'./views/layout/footer.vue'
import
{
base64decode
}
from
"./utils/utils.js"
import
{
base64decode
,
isNotEmptyUtils
,
getUrlParamsMap
}
from
"./utils/utils.js"
import
{
mapActions
}
from
'vuex'
import
{
getLoginUrl
}
from
'./utils/index.js'
let
vm
=
null
export
default
{
components
:{
...
...
@@ -33,6 +34,7 @@ export default {
},
data
()
{
return
{
idType
:
0
,
token
:
''
,
userName
:
''
,
portrait
:
''
,
...
...
@@ -55,8 +57,15 @@ export default {
let
offset
=
href
.
indexOf
(
"?"
)
if
(
offset
!==
-
1
)
{
let
paramStr
=
href
.
substring
(
offset
+
1
,
href
.
length
)
let
pars
=
base64decode
(
paramStr
).
split
(
"&"
)[
0
].
split
(
"="
)[
1
]
vm
.
token
=
pars
let
pars
=
base64decode
(
paramStr
)
let
paramMap
=
getUrlParamsMap
(
pars
,
"&"
)
if
(
isNotEmptyUtils
(
paramMap
[
"token"
]))
{
vm
.
token
=
paramMap
[
"token"
]
}
else
{
window
.
location
.
href
=
getInnerLoginUrl
()
// 没有token返回登录页面
}
}
else
{
window
.
location
.
href
=
getInnerLoginUrl
()
// 没有token返回登录页面
}
vm
.
changeToken
(
vm
.
token
)
vm
.
getUserAuth
(
vm
.
token
)
...
...
@@ -78,7 +87,8 @@ export default {
getUserAuth
(
token
)
{
vm
.
GET
(
'common/v1/role'
,{
token
:
token
}).
then
((
res
)
=>
{
if
(
res
.
code
==
'000000'
)
{
vm
.
changeIdType
(
res
.
data
.
idType
)
vm
.
changeIdType
(
res
.
data
.
idType
)
vm
.
idType
=
res
.
data
.
idType
vm
.
userName
=
res
.
data
.
name
vm
.
portrait
=
res
.
data
.
imageUrl
vm
.
authList
=
res
.
data
.
auth
...
...
src/style/common.scss
浏览文件 @
f9fddc27
...
...
@@ -175,10 +175,25 @@ html,body{
top
:
130px
!
important
;
}
// 按钮样式
.el-button--default
{
// 弹框按钮样式
.el-message-box
{
width
:
360px
;
height
:
160px
;
.el-message-box__header
{
text-align
:
center
;
}
.el-message-box__status
{
display
:
none
;
}
.el-message-box__btns
{
text-align
:
center
!
important
;
button
{
height
:
32px
;
width
:
78px
;
}
}
}
.el-button--primary
{
line-height
:
40px
;
background
:
#449284
!
important
;
...
...
src/utils/envConfig.js
浏览文件 @
f9fddc27
...
...
@@ -13,13 +13,15 @@ export const envConfig = {
// apiUrl: 'https://test1-api.yunqueyi.com/',
// webPageUrl: 'https://test1-phome.yunqueyi.com/'
//baseUrl: 'https://uat-sc.yunqueyi.com/',
baseUrl
:
'http://
192.168.110.226
:11905/portal/'
,
baseUrl
:
'http://
localhost
:11905/portal/'
,
apiUrl
:
'https://uat-api.yunqueyi.com/'
,
webPageUrl
:
'https://uat-phome.yunqueyi.com/'
,
qiniuUrl
:
"http://localhost:10201/contents/admin/qiniu/token"
,
qiniuFileUrl
:
"http://localhost:10201/contents/admin/qiniu/token1"
,
qiniuResourceUrl
:
"https://test1-videos.yunqueyi.com"
,
qiniuImgUrl
:
"https://test1-file.yunqueyi.com"
qiniuImgUrl
:
"https://test1-file.yunqueyi.com"
,
loginUrl
:
'https://dev-saas.yunqueyi.com/pica-login/work_station.html'
,
innerLoginUrl
:
'http://localhost:8090/PICA_SSO_FE/html/pica_login.html'
},
dev
:
{
baseUrl
:
'https://dev-sc.yunqueyi.com/portal/'
,
...
...
@@ -28,33 +30,41 @@ export const envConfig = {
qiniuUrl
:
"http://localhost:11905/contents/admin/qiniu/token"
,
qiniuFileUrl
:
"http://localhost:11905/contents/admin/qiniu/token1"
,
qiniuResourceUrl
:
"https://test1-videos.yunqueyi.com"
,
qiniuImgUrl
:
"https://test1-file.yunqueyi.com"
qiniuImgUrl
:
"https://test1-file.yunqueyi.com"
,
loginUrl
:
'https://dev-saas.yunqueyi.com/pica-login/work_station.html'
,
innerLoginUrl
:
'https://dev-sso.yunqueyi.com/PICA_SSO_FE/html/pica_login.html'
},
test
:
{
baseUrl
:
'https://test1-sc.yunqueyi.com/portal'
,
baseUrl
:
'https://test1-sc.yunqueyi.com/portal
/
'
,
apiUrl
:
'https://test1-api.yunqueyi.com/'
,
webPageUrl
:
'https://test1-phome.yunqueyi.com/'
,
qiniuUrl
:
"https://test1-sc.yunqueyi.com/contents/admin/qiniu/token"
,
qiniuFileUrl
:
"https://test1-sc.yunqueyi.com/contents/admin/qiniu/token1"
,
qiniuResourceUrl
:
"https://test1-videos.yunqueyi.com"
,
qiniuImgUrl
:
"https://test1-file.yunqueyi.com"
qiniuImgUrl
:
"https://test1-file.yunqueyi.com"
,
loginUrl
:
'https://test1-saas.yunqueyi.com/pica-login/work_station.html'
,
innerLoginUrl
:
'https://test1-sso.yunqueyi.com/PICA_SSO_FE/html/pica_login.html'
},
uat
:
{
baseUrl
:
'https://uat-sc.yunqueyi.com/portal'
,
baseUrl
:
'https://uat-sc.yunqueyi.com/portal
/
'
,
apiUrl
:
'https://uat-api.yunqueyi.com/'
,
webPageUrl
:
'https://uat-phome.yunqueyi.com/'
,
qiniuUrl
:
"https://uat-sc.yunqueyi.com/contents/admin/qiniu/token"
,
qiniuFileUrl
:
"https://uat-sc.yunqueyi.com/contents/admin/qiniu/token1"
,
qiniuResourceUrl
:
"https://videos.yunqueyi.com"
,
// 视频
qiniuImgUrl
:
"https://file.yunqueyi.com"
qiniuImgUrl
:
"https://file.yunqueyi.com"
,
loginUrl
:
'https://uat-saas.yunqueyi.com/pica-login/work_station.html'
,
innerLoginUrl
:
'https://uat-sso.yunqueyi.com/PICA_SSO_FE/html/pica_login.html'
},
pro
:
{
baseUrl
:
'https://sc.yunqueyi.com/portal'
,
baseUrl
:
'https://sc.yunqueyi.com/portal
/
'
,
apiUrl
:
'https://api.yunqueyi.com/'
,
webPageUrl
:
'https://phome.yunqueyi.com/'
,
qiniuUrl
:
"https://sc.yunqueyi.com/contents/admin/qiniu/token"
,
qiniuFileUrl
:
"https://sc.yunqueyi.com/contents/admin/qiniu/token1"
,
qiniuResourceUrl
:
"https://videos.yunqueyi.com"
,
qiniuImgUrl
:
"https://file.yunqueyi.com"
qiniuImgUrl
:
"https://file.yunqueyi.com"
,
loginUrl
:
'https://saas.yunqueyi.com/pica-login/work_station.html'
,
innerLoginUrl
:
'https://sso.yunqueyi.com/PICA_SSO_FE/html/pica_login.html'
}
}
src/utils/index.js
浏览文件 @
f9fddc27
...
...
@@ -164,6 +164,14 @@ export function getQiniuToken1() {
return
getConfigByEnvType
(
'qiniuFileUrl'
)
}
// 登录URL
export
function
getLoginUrl
()
{
return
getConfigByEnvType
(
'loginUrl'
)
}
export
function
getInnerLoginUrl
()
{
return
getConfigByEnvType
(
'innerLoginUrl'
)
}
// 七牛上传视频和图片
export
function
uploadVideo
()
{
return
getConfigByEnvType
(
'qiniuResourceUrl'
)
...
...
src/views/education/create-component.vue
浏览文件 @
f9fddc27
...
...
@@ -84,7 +84,7 @@
</div>
<div
class=
""
v-if=
"stepNum == 2"
>
<div
class=
"model-btn"
>
<el-button
type=
"primary"
size=
"small"
@
click=
"addModule"
>
添加空白模块
</el-button>
<el-button
v-if=
"idType == 1"
type=
"primary"
size=
"small"
@
click=
"addModule"
>
添加空白模块
</el-button>
<el-button
type=
"primary"
size=
"small"
@
click=
"addFromModule"
style=
"margin-left:0;"
>
从预设模块添加
</el-button>
</div>
<div
class=
"tab-content"
>
...
...
@@ -98,7 +98,7 @@
<el-input
v-model=
"item.name"
size=
"mini"
placeholder=
"请选择模块名称"
style=
"width:288px;"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"10"
>
<el-col
:span=
"10"
v-if=
"idType == 1"
>
<el-form-item
label=
"是否对外开放"
prop=
"openFlag"
>
<el-radio-group
v-model=
"item.openFlag"
@
change=
"selectIsOpen(index)"
:disabled=
"item.moduleType == 2 || (componentId && item.openFlag == 2)"
>
<el-radio
:label=
"2"
@
change=
"moduleOpenChange"
>
是
</el-radio>
...
...
@@ -108,7 +108,7 @@
</el-col>
</el-row>
</el-form>
<div
class=
"template-btn"
>
<div
class=
"template-btn"
v-if=
"idType == 1"
>
<span
class=
"word-size"
>
添加一个模板
</span>
<el-button
:disabled=
"item.moduleType == 2 || (componentId && item.openFlag == 2)"
...
...
@@ -170,7 +170,7 @@
</el-radio-group>
</el-form-item>
</el-col>
<el-col
:span=
"10"
v-if=
"item3.c
ontent3
"
class=
"item-icon"
>
<el-col
:span=
"10"
v-if=
"item3.c
ertificateFlag == 2
"
class=
"item-icon"
>
<span
class=
"require"
>
*
</span>
<el-form-item
label=
"选择证书"
>
<el-select
v-model=
"item3.content3"
:disabled=
"item.moduleType == 2 || (componentId && item.openFlag == 2)"
size=
"mini"
placeholder=
"请选择证书"
style=
"width:288px;"
>
...
...
@@ -238,7 +238,7 @@
</el-form-item>
</el-form>
<div
class=
"default-module"
v-for=
"(item,index) in dialogData.templetModelList"
:key=
"index"
>
<el-form
ref=
"dialogEmplateForm"
:model=
"item"
label-suffix=
":"
label-width=
"80px"
style=
"width:100%;"
>
<el-form
ref=
"dialogEmplateForm"
label-suffix=
":"
label-width=
"80px"
style=
"width:100%;"
>
<div
class=
"dialog-template-content"
>
<div
v-for=
"(item1,index1) in item.partModelList"
:key=
"index1"
>
<!-- 考试 -->
...
...
@@ -641,7 +641,7 @@ export default {
},
// 通过编辑获取模块信息
getModuleData
()
{
vm
.
GET
(
'portalComponent/ModuleList'
).
then
((
res
)
=>
{
vm
.
GET
(
'portalComponent/ModuleList'
,{
componentId
:
vm
.
componentId
}
).
then
((
res
)
=>
{
if
(
res
.
code
==
'000000'
)
{
vm
.
componentList
.
moduleModelList
=
res
.
data
.
moduleModelList
}
...
...
@@ -650,6 +650,7 @@ export default {
// 模块是否对外开放
selectIsOpen
(
index
)
{
vm
.
moduleIndex
=
index
vm
.
componentList
.
moduleModelList
[
index
].
openFlag
=
vm
.
componentList
.
moduleModelList
[
index
].
openFlag
==
1
?
2
:
1
},
moduleOpenChange
(
value
)
{
for
(
let
i
=
0
;
i
<
vm
.
componentList
.
moduleModelList
.
length
;
i
++
)
{
...
...
@@ -921,31 +922,43 @@ export default {
},
// 选择资源包
selectChange
(
val
)
{
for
(
let
i
=
0
;
i
<
vm
.
resourceArray
.
length
;
i
++
)
{
if
(
val
==
vm
.
resourceArray
[
i
].
id
)
{
vm
.
dialogData
=
vm
.
resourceArray
[
i
]
break
if
(
vm
.
resourceArray
&&
vm
.
resourceArray
.
length
>
0
)
{
for
(
let
i
=
0
;
i
<
vm
.
resourceArray
.
length
;
i
++
)
{
if
(
val
==
vm
.
resourceArray
[
i
].
id
)
{
vm
.
dialogData
=
vm
.
resourceArray
[
i
]
break
}
}
}
},
// 确定选择模板
submitDialog
()
{
vm
.
columnFormVisible
=
false
vm
.
dialogData
.
moduleType
=
2
for
(
let
i
=
0
;
i
<
vm
.
componentList
.
moduleModelList
.
length
;
i
++
)
{
if
(
vm
.
componentList
.
moduleModelList
[
i
].
id
==
vm
.
dialogData
.
id
)
{
vm
.
$confirm
(
'该模块已经被添加到本组件,是否还需要再添加一次?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
vm
.
componentList
.
moduleModelList
.
push
(
vm
.
dialogData
)
}).
catch
(()
=>
{
vm
.
$message
({
type
:
'info'
,
message
:
'已取消选择'
let
flag
=
false
if
(
vm
.
dialogData
&&
vm
.
dialogData
.
length
>
0
)
{
for
(
let
i
=
0
;
i
<
vm
.
componentList
.
moduleModelList
.
length
;
i
++
)
{
if
(
vm
.
componentList
.
moduleModelList
[
i
].
id
==
vm
.
dialogData
.
id
)
{
flag
=
true
vm
.
$confirm
(
'该模块已经被添加到本组件,是否还需要再添加一次?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
showClose
:
false
,
type
:
'warning'
}).
then
(()
=>
{
vm
.
dialogData
.
moduleType
=
2
vm
.
componentList
.
moduleModelList
.
push
(
vm
.
dialogData
)
}).
catch
(()
=>
{
vm
.
$message
({
type
:
'info'
,
message
:
'已取消选择'
})
})
})
break
}
}
if
(
!
flag
)
{
vm
.
dialogData
.
moduleType
=
2
vm
.
componentList
.
moduleModelList
.
push
(
vm
.
dialogData
)
}
}
}
...
...
src/views/layout/header.vue
浏览文件 @
f9fddc27
...
...
@@ -12,13 +12,15 @@
</div>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-item
command=
"logout"
>
注销
</el-dropdown-item>
<el-dropdown-item
@
click
=
"forward"
>
返回云鹊医首页
</el-dropdown-item>
<el-dropdown-item
command
=
"forward"
>
返回云鹊医首页
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
</div>
</
template
>
<
script
>
import
{
getLoginUrl
,
getInnerLoginUrl
}
from
'../../utils/index.js'
let
vm
=
null
export
default
{
props
:
{
portrait
:
{
...
...
@@ -26,6 +28,9 @@ export default {
},
userName
:
{
type
:
String
},
idType
:
{
type
:
Number
}
},
data
()
{
...
...
@@ -35,14 +40,21 @@ export default {
}
},
computed
:
{},
created
()
{
vm
=
this
},
methods
:
{
handleCommand
(
command
)
{
if
(
command
===
'logout'
)
{
if
(
vm
.
idType
==
1
)
{
// 内部
window
.
location
.
href
=
getInnerLoginUrl
()
}
else
{
window
.
location
.
href
=
getLoginUrl
()
}
}
if
(
command
===
'forward'
)
{
window
.
location
.
href
=
'https://www.yunqueyi.com/'
}
},
forward
()
{
window
.
location
.
href
=
'https://www.yunqueyi.com/'
}
}
}
...
...
src/views/layout/slidebar.vue
浏览文件 @
f9fddc27
...
...
@@ -37,7 +37,40 @@ export default {
data
()
{
return
{
// authList: {},
items
:
[]
items
:
[
{
title
:
'数据总览'
,
icon
:
'el-icon-menu'
,
index
:
'home'
},{
title
:
'教培项目'
,
icon
:
'el-icon-message'
,
index
:
'item'
,
subs
:
[
{
title
:
'项目组件'
,
icon
:
'el-icon-setting'
,
index
:
'item-component'
},
{
title
:
'项目管理'
,
icon
:
'el-icon-setting'
,
index
:
'item-manager'
}
]
},{
title
:
'系统管理'
,
icon
:
'el-icon-menu'
,
index
:
'system'
,
subs
:
[
{
title
:
'角色管理'
,
icon
:
'el-icon-setting'
,
index
:
'role'
}
]
}
]
}
},
computed
:
{
...
...
@@ -53,19 +86,22 @@ export default {
methods
:
{
// 获取菜单数据
authSelect
()
{
let
req
=
{
"token"
:
vm
.
tokenValue
,
"system_type"
:
"25"
}
vm
.
POST
(
'portalComponent/menu/list'
,
req
).
then
((
res
)
=>
{
if
(
res
.
code
==
'000000'
)
{
vm
.
items
=
res
.
data
.
picapMenuModels
vm
.
$nextTick
(()
=>
{
vm
.
getUserAuth
()
})
}
vm
.
$nextTick
(()
=>
{
vm
.
getUserAuth
()
})
// let req = {
// "token": vm.tokenValue,
// "system_type": "25"
// }
// vm.POST('portalComponent/menu/list',req).then((res) => {
// if( res.code == '000000') {
// vm.items = res.data.picapMenuModels
// vm.$nextTick(() => {
// vm.getUserAuth()
// })
// }
// })
},
// 获取用户权限
getUserAuth
()
{
...
...
@@ -104,14 +140,15 @@ export default {
}
.el-menu-item.is-active
{
color
:
#fff
;
background
:
#509284
;
background
:
#509284
!
important
}
.el-menu-item
:hover
,
.el-submenu__title
:hover
,
.slidebar-container
.el-menu
.el-menu-item
:hover
,
.slidebar-container
.el-menu
.el-submenu__title
:hover
{
color
:
#fff
;
background
:
#06232C
;
}
// .el-menu-item:focus, .el-menu-item:hover,
// .el-submenu__title:hover,.slidebar-container .el-menu .el-menu-item:focus,
// .slidebar-container .el-menu .el-menu-item:hover,
// .slidebar-container .el-menu .el-submenu__title:hover {
// background: #06232C;
// }
}
}
</
style
>
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录