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
提交
d0b5bf0c
提交
d0b5bf0c
编写于
3月 20, 2019
作者:
huangwensu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
禁用启用可编辑
上级
8a7b997a
变更
11
展开全部
隐藏空白字符变更
内嵌
并排
正在显示
11 个修改的文件
包含
74 行增加
和
87 行删除
+74
-87
App.vue
src/App.vue
+1
-0
common.js
src/store/education/common.js
+0
-0
getters.js
src/store/education/getters.js
+7
-0
getters.js
src/store/getters.js
+6
-5
index.js
src/store/index.js
+1
-1
common.scss
src/style/common.scss
+5
-0
fetch.js
src/utils/fetch.js
+0
-3
utils.js
src/utils/utils.js
+5
-0
create-component.vue
src/views/education/create-component.vue
+29
-40
item-component.vue
src/views/education/item-component.vue
+1
-1
slidebar.vue
src/views/layout/slidebar.vue
+19
-37
未找到文件。
src/App.vue
浏览文件 @
d0b5bf0c
...
...
@@ -65,6 +65,7 @@ export default {
if
(
isNotEmptyUtils
(
paramMap
[
"token"
]))
{
vm
.
token
=
paramMap
[
"token"
]
localStorage
.
setItem
(
'storageToken'
,
vm
.
token
)
vm
.
$router
.
push
({
path
:
'home'
})
}
else
{
window
.
location
.
href
=
getLoginUrl
()
// 没有token返回登录页面
return
...
...
src/store/
modules
/common.js
→
src/store/
education
/common.js
浏览文件 @
d0b5bf0c
文件已移动
src/store/education/getters.js
0 → 100644
浏览文件 @
d0b5bf0c
const
getters
=
{
_token
:
state
=>
state
.
common
.
_token
,
idType
:
state
=>
state
.
common
.
idType
}
export
default
getters
src/store/getters.js
浏览文件 @
d0b5bf0c
import
education
from
'./education/getters'
const
getters
=
{
_token
:
state
=>
state
.
common
.
_token
,
idType
:
state
=>
state
.
common
.
idType
}
import
{
containObject
}
from
'../utils/utils'
export
default
getters
const
getters
=
containObject
(
education
)
export
default
getters
\ No newline at end of file
src/store/index.js
浏览文件 @
d0b5bf0c
import
Vue
from
'vue'
import
Vuex
from
'vuex'
import
common
from
'./
modules
/common'
import
common
from
'./
education
/common'
import
getters
from
'./getters'
...
...
src/style/common.scss
浏览文件 @
d0b5bf0c
...
...
@@ -202,6 +202,11 @@ html,body{
background
:
#449284
!
important
;
border
:
1px
solid
#449284
!
important
;
}
.el-button.is-disabled
{
background
:
#449284
!
important
;
border
:
1px
solid
#449284
!
important
;
opacity
:
0
.5
;
}
.el-pagination.is-background
.el-pager
li
:not
(
.disabled
)
.active
{
background
:
#449284
!
important
;
}
...
...
src/utils/fetch.js
浏览文件 @
d0b5bf0c
...
...
@@ -11,9 +11,6 @@ const service = axios.create({
// request拦截器
service
.
interceptors
.
request
.
use
(
config
=>
{
// if(config.data && config.data.token) {
// localStorage.setItem('storageToken',config.data.token)
// }
config
.
headers
[
'sysCode'
]
=
12
config
.
headers
[
'token'
]
=
localStorage
.
getItem
(
'storageToken'
)
config
.
headers
[
'deviceInfo'
]
=
JSON
.
stringify
({
"app_channel"
:
""
,
"app_mac"
:
""
,
"app_uuid"
:
""
,
"app_version"
:
""
,
"device_brand"
:
""
,
"device_ip"
:
""
,
"device_model"
:
""
,
"device_net"
:
""
,
"device_ops"
:
""
,
"resolution_wh"
:
""
,
"system_level"
:
""
,
"device_type"
:
'10'
})
...
...
src/utils/utils.js
浏览文件 @
d0b5bf0c
import
axios
from
'axios'
;
// 对象的合并
export
const
containObject
=
function
(...
obj1
)
{
let
obj
=
Object
.
assign
(...
obj1
)
return
obj
}
//共通函数
Array
.
prototype
.
contains
=
function
(
obj
)
{
if
(
this
.
length
>
0
)
{
...
...
src/views/education/create-component.vue
浏览文件 @
d0b5bf0c
此差异已折叠。
点击以展开。
src/views/education/item-component.vue
浏览文件 @
d0b5bf0c
...
...
@@ -45,7 +45,7 @@
</el-table-column>
<el-table-column
label=
"操作"
fixed=
"right"
align=
"center"
min-width=
"200"
>
<
template
slot-scope=
"scope"
>
<el-button
type=
"primary"
v-if=
"scope.row.status == 1 || scope.row.status == 2"
size=
"small"
@
click=
"editComponentList(scope.row)"
>
编辑
</el-button>
<el-button
type=
"primary"
size=
"small"
@
click=
"editComponentList(scope.row)"
>
编辑
</el-button>
<el-button
type=
"primary"
v-if=
"scope.row.status == 1 || scope.row.status == 2 || scope.row.status == 4"
size=
"small"
@
click=
"enableAndDisable(scope.row,1)"
>
启用
</el-button>
<el-button
type=
"primary"
v-if=
"scope.row.status == 3"
size=
"small"
@
click=
"enableAndDisable(scope.row,2)"
>
禁用
</el-button>
<el-button
type=
"primary"
v-if=
"scope.row.status == 1 || scope.row.status == 2"
size=
"small"
@
click=
"deleteComponent(scope.row)"
>
删除
</el-button>
...
...
src/views/layout/slidebar.vue
浏览文件 @
d0b5bf0c
...
...
@@ -22,7 +22,8 @@
</template>
<
script
>
import
{
mapGetters
}
from
'vuex'
import
{
setTimeout
}
from
'timers'
;
import
{
setTimeout
}
from
'timers'
import
{
isNotEmptyUtils
}
from
'../../utils/utils'
let
vm
=
null
export
default
{
props
:
{
...
...
@@ -36,7 +37,6 @@ export default {
},
data
()
{
return
{
// authList: {},
items
:
[
{
title
:
'数据总览'
,
...
...
@@ -80,43 +80,22 @@ export default {
},
created
()
{
vm
=
this
vm
.
authSelect
()
},
methods
:
{
// 获取菜单数据
authSelect
()
{
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
()
{
if
(
vm
.
authList
&&
vm
.
authList
.
length
>
0
)
{
if
(
!
vm
.
authList
.
P001
)
{
// 项目管理
vm
.
items
[
1
].
subs
[
1
].
index
=
'blank'
}
if
(
!
vm
.
authList
.
P002
)
{
// 组件管理
vm
.
items
[
1
].
subs
[
0
].
index
=
'blank'
}
if
(
!
vm
.
authList
.
P001
)
{
// 角色管理
vm
.
items
[
2
].
subs
[
0
].
index
=
'blank'
}
watch
:
{
authList
(
newVal
,
oldVal
){
if
(
!
newVal
.
P001
)
{
// 项目管理
vm
.
items
[
1
].
subs
[
1
].
index
=
'blank'
}
if
(
!
newVal
.
P002
)
{
// 组件管理
vm
.
items
[
1
].
subs
[
0
].
index
=
'blank'
}
}
if
(
!
newVal
.
P003
)
{
// 角色管理
vm
.
items
[
2
].
subs
[
0
].
index
=
'blank'
}
}
},
methods
:
{
}
}
</
script
>
...
...
@@ -149,6 +128,9 @@ export default {
color
:
#fff
;
background
:
#06232C
;
}
.el-menu-item
:focus
,
.el-menu-item
:hover
{
background
:
#06232C
!
important
;
}
}
}
</
style
>
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录