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 {
...
@@ -65,6 +65,7 @@ export default {
if
(
isNotEmptyUtils
(
paramMap
[
"token"
]))
{
if
(
isNotEmptyUtils
(
paramMap
[
"token"
]))
{
vm
.
token
=
paramMap
[
"token"
]
vm
.
token
=
paramMap
[
"token"
]
localStorage
.
setItem
(
'storageToken'
,
vm
.
token
)
localStorage
.
setItem
(
'storageToken'
,
vm
.
token
)
vm
.
$router
.
push
({
path
:
'home'
})
}
else
{
}
else
{
window
.
location
.
href
=
getLoginUrl
()
// 没有token返回登录页面
window
.
location
.
href
=
getLoginUrl
()
// 没有token返回登录页面
return
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
=
{
import
{
containObject
}
from
'../utils/utils'
_token
:
state
=>
state
.
common
.
_token
,
idType
:
state
=>
state
.
common
.
idType
}
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
Vue
from
'vue'
import
Vuex
from
'vuex'
import
Vuex
from
'vuex'
import
common
from
'./
modules
/common'
import
common
from
'./
education
/common'
import
getters
from
'./getters'
import
getters
from
'./getters'
...
...
src/style/common.scss
浏览文件 @
d0b5bf0c
...
@@ -202,6 +202,11 @@ html,body{
...
@@ -202,6 +202,11 @@ html,body{
background
:
#449284
!
important
;
background
:
#449284
!
important
;
border
:
1px
solid
#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
{
.el-pagination.is-background
.el-pager
li
:not
(
.disabled
)
.active
{
background
:
#449284
!
important
;
background
:
#449284
!
important
;
}
}
...
...
src/utils/fetch.js
浏览文件 @
d0b5bf0c
...
@@ -11,9 +11,6 @@ const service = axios.create({
...
@@ -11,9 +11,6 @@ const service = axios.create({
// request拦截器
// request拦截器
service
.
interceptors
.
request
.
use
(
config
=>
{
service
.
interceptors
.
request
.
use
(
config
=>
{
// if(config.data && config.data.token) {
// localStorage.setItem('storageToken',config.data.token)
// }
config
.
headers
[
'sysCode'
]
=
12
config
.
headers
[
'sysCode'
]
=
12
config
.
headers
[
'token'
]
=
localStorage
.
getItem
(
'storageToken'
)
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'
})
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'
;
import
axios
from
'axios'
;
// 对象的合并
export
const
containObject
=
function
(...
obj1
)
{
let
obj
=
Object
.
assign
(...
obj1
)
return
obj
}
//共通函数
//共通函数
Array
.
prototype
.
contains
=
function
(
obj
)
{
Array
.
prototype
.
contains
=
function
(
obj
)
{
if
(
this
.
length
>
0
)
{
if
(
this
.
length
>
0
)
{
...
...
src/views/education/create-component.vue
浏览文件 @
d0b5bf0c
...
@@ -17,8 +17,8 @@
...
@@ -17,8 +17,8 @@
<div
class=
"btn-container"
>
<div
class=
"btn-container"
>
<el-button
v-if=
"stepNum == 1 && (componentStatus == 1 || !componentStatus)"
@
click=
"storageAndNext(1)"
type=
"default"
size=
"small"
>
暂存
</el-button>
<el-button
v-if=
"stepNum == 1 && (componentStatus == 1 || !componentStatus)"
@
click=
"storageAndNext(1)"
type=
"default"
size=
"small"
>
暂存
</el-button>
<el-button
v-if=
"stepNum == 1"
@
click=
"storageAndNext(2)"
type=
"primary"
size=
"small"
style=
"margin-left:0;"
>
下一步
</el-button>
<el-button
v-if=
"stepNum == 1"
@
click=
"storageAndNext(2)"
type=
"primary"
size=
"small"
style=
"margin-left:0;"
>
下一步
</el-button>
<el-button
v-if=
"stepNum == 2 && (componentStatus == 1 || !componentStatus)"
@
click=
"finishConponent(1)"
type=
"default"
size=
"small"
>
暂存
</el-button>
<el-button
v-if=
"stepNum == 2 && (componentStatus == 1 || !componentStatus)"
:disabled=
"conditionSelect"
@
click=
"finishConponent(1)"
type=
"default"
size=
"small"
>
暂存
</el-button>
<el-button
v-if=
"stepNum == 2"
@
click=
"finishConponent(2)"
type=
"primary"
size=
"small"
style=
"margin-left:0;"
>
完成
</el-button>
<el-button
v-if=
"stepNum == 2"
@
click=
"finishConponent(2)"
:disabled=
"conditionSelect"
type=
"primary"
size=
"small"
style=
"margin-left:0;"
>
完成
</el-button>
</div>
</div>
</div>
</div>
<div
class=
"first-step"
v-if=
"stepNum == 1"
>
<div
class=
"first-step"
v-if=
"stepNum == 1"
>
...
@@ -84,23 +84,23 @@
...
@@ -84,23 +84,23 @@
</div>
</div>
<div
class=
""
v-if=
"stepNum == 2"
>
<div
class=
""
v-if=
"stepNum == 2"
>
<div
class=
"model-btn"
>
<div
class=
"model-btn"
>
<el-button
v-if=
"idType == 1"
type=
"primary"
size=
"small"
@
click=
"addModule"
>
添加空白模块
</el-button>
<el-button
v-if=
"idType == 1"
:disabled=
"conditionSelect"
type=
"primary"
size=
"small"
@
click=
"addModule"
>
添加空白模块
</el-button>
<el-button
type=
"primary"
size=
"small"
@
click=
"addFromModule"
style=
"margin-left:0;"
>
从预设模块添加
</el-button>
<el-button
:disabled=
"conditionSelect"
type=
"primary"
size=
"small"
@
click=
"addFromModule"
style=
"margin-left:0;"
>
从预设模块添加
</el-button>
</div>
</div>
<div
class=
"tab-content"
>
<div
class=
"tab-content"
>
<el-tabs
type=
"card"
v-model=
"firstTab"
closable
@
tab-remove=
"removeTab"
>
<el-tabs
type=
"card"
v-model=
"firstTab"
:closable=
"!conditionSelect"
@
tab-remove=
"removeTab"
>
<el-tab-pane
v-for=
"(item,index) in componentList.moduleModelList"
:key=
"index"
:label=
"'模块' + parseInt(index + 1)"
:name=
'"" + parseInt(index + 1)'
>
<el-tab-pane
v-for=
"(item,index) in componentList.moduleModelList"
:key=
"index"
:label=
"'模块' + parseInt(index + 1)"
:name=
'"" + parseInt(index + 1)'
>
<div>
<div>
<el-form
ref=
"moduleForm"
:model=
"item"
:rules=
"moduleRules"
label-suffix=
":"
label-width=
"130px"
style=
"width:100%;"
>
<el-form
ref=
"moduleForm"
:model=
"item"
:rules=
"moduleRules"
label-suffix=
":"
label-width=
"130px"
style=
"width:100%;"
>
<el-row>
<el-row>
<el-col
:span=
"10"
>
<el-col
:span=
"10"
>
<el-form-item
label=
"模块名称"
prop=
"name"
>
<el-form-item
label=
"模块名称"
prop=
"name"
>
<el-input
v-model=
"item.name"
:disabled=
"idType == 2 || item.moduleType == 2 || (item.id != '' && item.openFlag == 2)"
size=
"mini"
placeholder=
"请选择模块名称"
style=
"width:288px;"
></el-input>
<el-input
v-model=
"item.name"
:disabled=
"
conditionSelect ||
idType == 2 || item.moduleType == 2 || (item.id != '' && item.openFlag == 2)"
size=
"mini"
placeholder=
"请选择模块名称"
style=
"width:288px;"
></el-input>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"10"
v-if=
"idType == 1"
>
<el-col
:span=
"10"
v-if=
"idType == 1"
>
<el-form-item
label=
"是否对外开放"
prop=
"openFlag"
>
<el-form-item
label=
"是否对外开放"
prop=
"openFlag"
>
<el-radio-group
v-model=
"item.openFlag"
@
change=
"selectIsOpen(index)"
:disabled=
"item.moduleType == 2 || (item.id != '' && item.openFlag == 2)"
>
<el-radio-group
v-model=
"item.openFlag"
@
change=
"selectIsOpen(index)"
:disabled=
"
conditionSelect ||
item.moduleType == 2 || (item.id != '' && item.openFlag == 2)"
>
<el-radio
:label=
"2"
@
change=
"moduleOpenChange"
>
是
</el-radio>
<el-radio
:label=
"2"
@
change=
"moduleOpenChange"
>
是
</el-radio>
<el-radio
:label=
"1"
@
change=
"moduleOpenChange"
>
否
</el-radio>
<el-radio
:label=
"1"
@
change=
"moduleOpenChange"
>
否
</el-radio>
</el-radio-group>
</el-radio-group>
...
@@ -111,7 +111,7 @@
...
@@ -111,7 +111,7 @@
<div
class=
"template-btn"
v-if=
"idType == 1"
>
<div
class=
"template-btn"
v-if=
"idType == 1"
>
<span
class=
"word-size"
>
添加一个模板
</span>
<span
class=
"word-size"
>
添加一个模板
</span>
<el-button
<el-button
:disabled=
"item.moduleType == 2 || (item.id != '' && item.openFlag == 2)"
:disabled=
"
conditionSelect ||
item.moduleType == 2 || (item.id != '' && item.openFlag == 2)"
v-for=
"(_item,_index) in templateDataList"
v-for=
"(_item,_index) in templateDataList"
:key=
"_index"
:key=
"_index"
type=
"primary"
type=
"primary"
...
@@ -125,7 +125,7 @@
...
@@ -125,7 +125,7 @@
<div
class=
"template-content-div"
>
<div
class=
"template-content-div"
>
<div
class=
"title"
>
<div
class=
"title"
>
{{
item1
.
name
}}
{{
item1
.
name
}}
<span
v-if=
"item.moduleType == 1 && (item.id == '' || (item.id != '' && item.openFlag == 1)) && idType == 1"
>
<span
v-if=
"
conditionAnd &&
item.moduleType == 1 && (item.id == '' || (item.id != '' && item.openFlag == 1)) && idType == 1"
>
变更顺序:
变更顺序:
<i
class=
"el-icon-caret-bottom"
@
click=
"sortUp(index,index1)"
style=
"font-size:17px;"
></i>
<i
class=
"el-icon-caret-bottom"
@
click=
"sortUp(index,index1)"
style=
"font-size:17px;"
></i>
<i
class=
"el-icon-caret-top"
@
click=
"sortDown(index,index1)"
style=
"font-size:17px;"
></i>
<i
class=
"el-icon-caret-top"
@
click=
"sortDown(index,index1)"
style=
"font-size:17px;"
></i>
...
@@ -141,15 +141,15 @@
...
@@ -141,15 +141,15 @@
<el-col
:span=
"10"
class=
"item-icon"
>
<el-col
:span=
"10"
class=
"item-icon"
>
<span
class=
"require"
>
*
</span>
<span
class=
"require"
>
*
</span>
<el-form-item
label=
"考试名称"
>
<el-form-item
label=
"考试名称"
>
<el-input
v-model=
"item3.content1"
:disabled=
"item.moduleType == 2 || (item.id != '' && item.openFlag == 2) || idType == 2"
size=
"mini"
maxlength=
'30'
placeholder=
"请输入考试名称"
style=
"width:288px;"
></el-input>
<el-input
v-model=
"item3.content1"
:disabled=
"
conditionSelect ||
item.moduleType == 2 || (item.id != '' && item.openFlag == 2) || idType == 2"
size=
"mini"
maxlength=
'30'
placeholder=
"请输入考试名称"
style=
"width:288px;"
></el-input>
<span
v-if=
"item2.numFlag == 2 && index3 == 0 && item.moduleType == 1 && idType == 1 && (item.id == '' || (item.id != '' && item.openFlag == 1))"
><i
class=
"el-icon-circle-plus"
@
click=
"addMatterCourse(index,index1,index2)"
style=
"color:#449284;"
></i></span>
<span
v-if=
"
conditionAnd &&
item2.numFlag == 2 && index3 == 0 && item.moduleType == 1 && idType == 1 && (item.id == '' || (item.id != '' && item.openFlag == 1))"
><i
class=
"el-icon-circle-plus"
@
click=
"addMatterCourse(index,index1,index2)"
style=
"color:#449284;"
></i></span>
<span
v-if=
"item2.numFlag == 2 && index3 > 0 && item.moduleType == 1 && idType == 1 && (item.id == '' || (item.id != '' && item.openFlag == 1))"
><i
class=
"el-icon-delete"
@
click=
"deleteMatterCourse(index,index1,index2,index3)"
style=
"color:red;"
></i></span>
<span
v-if=
"
conditionAnd &&
item2.numFlag == 2 && index3 > 0 && item.moduleType == 1 && idType == 1 && (item.id == '' || (item.id != '' && item.openFlag == 1))"
><i
class=
"el-icon-delete"
@
click=
"deleteMatterCourse(index,index1,index2,index3)"
style=
"color:red;"
></i></span>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"10"
class=
"item-icon"
>
<el-col
:span=
"10"
class=
"item-icon"
>
<span
class=
"require"
>
*
</span>
<span
class=
"require"
>
*
</span>
<el-form-item
label=
"关联考试"
>
<el-form-item
label=
"关联考试"
>
<el-select
v-model=
"item3.content2"
@
focus=
"examIDfocus(index,index1,index2,index3)"
@
change=
"changeExamID"
:disabled=
"item.moduleType == 2 || idType == 2 || (item.id != '' && item.openFlag == 2)"
size=
"mini"
placeholder=
"请选择考试ID"
style=
"width:288px;"
>
<el-select
v-model=
"item3.content2"
@
focus=
"examIDfocus(index,index1,index2,index3)"
@
change=
"changeExamID"
:disabled=
"
conditionSelect ||
item.moduleType == 2 || idType == 2 || (item.id != '' && item.openFlag == 2)"
size=
"mini"
placeholder=
"请选择考试ID"
style=
"width:288px;"
>
<el-option
<el-option
v-for=
"(itemTest,indexTest) in testIdSelect"
v-for=
"(itemTest,indexTest) in testIdSelect"
:key=
"indexTest"
:key=
"indexTest"
...
@@ -164,7 +164,7 @@
...
@@ -164,7 +164,7 @@
<el-col
:span=
"10"
class=
"item-icon"
>
<el-col
:span=
"10"
class=
"item-icon"
>
<span
class=
"require"
>
*
</span>
<span
class=
"require"
>
*
</span>
<el-form-item
label=
"配置证书"
>
<el-form-item
label=
"配置证书"
>
<el-radio-group
v-model=
"item3.certificateFlag"
:disabled=
"item.moduleType == 2 || idType == 2 || (item.id != '' && item.openFlag == 2)"
>
<el-radio-group
v-model=
"item3.certificateFlag"
:disabled=
"
conditionSelect ||
item.moduleType == 2 || idType == 2 || (item.id != '' && item.openFlag == 2)"
>
<el-radio
:label=
"2"
>
是
</el-radio>
<el-radio
:label=
"2"
>
是
</el-radio>
<el-radio
:label=
"1"
>
否
</el-radio>
<el-radio
:label=
"1"
>
否
</el-radio>
</el-radio-group>
</el-radio-group>
...
@@ -173,7 +173,7 @@
...
@@ -173,7 +173,7 @@
<el-col
:span=
"10"
v-if=
"item3.certificateFlag == 2"
class=
"item-icon"
>
<el-col
:span=
"10"
v-if=
"item3.certificateFlag == 2"
class=
"item-icon"
>
<span
class=
"require"
>
*
</span>
<span
class=
"require"
>
*
</span>
<el-form-item
label=
"选择证书"
>
<el-form-item
label=
"选择证书"
>
<el-select
v-model=
"item3.content3"
:disabled=
"item.moduleType == 2 || idType == 2 || (item.id != '' && item.openFlag == 2)"
size=
"mini"
placeholder=
"请选择证书"
style=
"width:288px;"
>
<el-select
v-model=
"item3.content3"
:disabled=
"
conditionSelect ||
item.moduleType == 2 || idType == 2 || (item.id != '' && item.openFlag == 2)"
size=
"mini"
placeholder=
"请选择证书"
style=
"width:288px;"
>
<el-option
<el-option
v-for=
"(itemCertificate,indexCertificate) in certificateIdSelect"
v-for=
"(itemCertificate,indexCertificate) in certificateIdSelect"
:key=
"indexCertificate"
:key=
"indexCertificate"
...
@@ -193,15 +193,15 @@
...
@@ -193,15 +193,15 @@
<el-col
:span=
"10"
class=
"item-icon"
>
<el-col
:span=
"10"
class=
"item-icon"
>
<span
class=
"require"
>
*
</span>
<span
class=
"require"
>
*
</span>
<el-form-item
label=
"课程名称"
>
<el-form-item
label=
"课程名称"
>
<el-input
v-model=
"item3.content1"
:disabled=
"item.moduleType == 2 || idType == 2 || (item.id != '' && item.openFlag == 2)"
size=
"mini"
maxlength=
'30'
placeholder=
"请输入课程名称"
style=
"width:288px;"
></el-input>
<el-input
v-model=
"item3.content1"
:disabled=
"
conditionSelect ||
item.moduleType == 2 || idType == 2 || (item.id != '' && item.openFlag == 2)"
size=
"mini"
maxlength=
'30'
placeholder=
"请输入课程名称"
style=
"width:288px;"
></el-input>
<span
v-if=
"item2.numFlag == 2 && index3 == 0 && item.moduleType == 1 && idType == 1 && (item.id == '' || (item.id != '' && item.openFlag == 1))"
><i
class=
"el-icon-circle-plus"
@
click=
"addMatterCourse(index,index1,index2)"
style=
"color:#449284;"
></i></span>
<span
v-if=
"
conditionAnd &&
item2.numFlag == 2 && index3 == 0 && item.moduleType == 1 && idType == 1 && (item.id == '' || (item.id != '' && item.openFlag == 1))"
><i
class=
"el-icon-circle-plus"
@
click=
"addMatterCourse(index,index1,index2)"
style=
"color:#449284;"
></i></span>
<span
v-if=
"item2.numFlag == 2 && index3 > 0 && item.moduleType == 1 && idType == 1 && (item.id == '' || (item.id != '' && item.openFlag == 1))"
><i
class=
"el-icon-delete"
@
click=
"deleteMatterCourse(index,index1,index2,index3)"
style=
"color:red;"
></i></span>
<span
v-if=
"
conditionAnd &&
item2.numFlag == 2 && index3 > 0 && item.moduleType == 1 && idType == 1 && (item.id == '' || (item.id != '' && item.openFlag == 1))"
><i
class=
"el-icon-delete"
@
click=
"deleteMatterCourse(index,index1,index2,index3)"
style=
"color:red;"
></i></span>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"10"
class=
"item-icon"
>
<el-col
:span=
"10"
class=
"item-icon"
>
<span
class=
"require"
>
*
</span>
<span
class=
"require"
>
*
</span>
<el-form-item
label=
"关联课程"
>
<el-form-item
label=
"关联课程"
>
<el-select
v-model=
"item3.content2"
@
focus=
"courseIDfocus(index,index1,index2,index3)"
@
change=
"changeCourseID"
:disabled=
"item.moduleType == 2 || idType == 2 || (item.id != '' && item.openFlag == 2)"
size=
"mini"
placeholder=
"请选择课程ID"
style=
"width:288px;"
>
<el-select
v-model=
"item3.content2"
@
focus=
"courseIDfocus(index,index1,index2,index3)"
@
change=
"changeCourseID"
:disabled=
"
conditionSelect ||
item.moduleType == 2 || idType == 2 || (item.id != '' && item.openFlag == 2)"
size=
"mini"
placeholder=
"请选择课程ID"
style=
"width:288px;"
>
<el-option
<el-option
v-for=
"(itemCourse,indexCourse) in courseIdSelect"
v-for=
"(itemCourse,indexCourse) in courseIdSelect"
:key=
"indexCourse"
:key=
"indexCourse"
...
@@ -320,7 +320,7 @@ let validateRepeatWord = function(rule, value, callback, message) {
...
@@ -320,7 +320,7 @@ let validateRepeatWord = function(rule, value, callback, message) {
let
validateModuleName
=
function
(
rule
,
value
,
callback
,
message
)
{
let
validateModuleName
=
function
(
rule
,
value
,
callback
,
message
)
{
const
reg
=
/^
[\u
4e00-
\u
9fa5
]{2,20}
$/
const
reg
=
/^
[\u
4e00-
\u
9fa5
]{2,20}
$/
if
(
!
reg
.
test
(
value
))
{
if
(
!
reg
.
test
(
value
))
{
callback
(
new
Error
(
'输入长度为2-20个
中文
'
))
callback
(
new
Error
(
'输入长度为2-20个
字符
'
))
return
return
}
}
for
(
let
i
=
0
;
i
<
vm
.
componentList
.
moduleModelList
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
vm
.
componentList
.
moduleModelList
.
length
;
i
++
)
{
...
@@ -362,6 +362,8 @@ export default {
...
@@ -362,6 +362,8 @@ export default {
componentId
:
''
,
componentId
:
''
,
componentStatus
:
''
,
componentStatus
:
''
,
resultFlag
:
''
,
resultFlag
:
''
,
conditionSelect
:
false
,
conditionAnd
:
false
,
isStorage
:
false
,
isStorage
:
false
,
dialogTitle
:
'选择模板'
,
dialogTitle
:
'选择模板'
,
curmbFirst
:
'教培项目'
,
curmbFirst
:
'教培项目'
,
...
@@ -411,7 +413,7 @@ export default {
...
@@ -411,7 +413,7 @@ export default {
"name"
:
[
"name"
:
[
{
required
:
true
,
message
:
'输入组件名称'
,
trigger
:
'blur'
},
{
required
:
true
,
message
:
'输入组件名称'
,
trigger
:
'blur'
},
{
validator
:
function
(
rule
,
value
,
callback
)
{
{
validator
:
function
(
rule
,
value
,
callback
)
{
validateRepeatWord
(
rule
,
value
,
callback
,
'输入长度为2-20个
中文
'
)
validateRepeatWord
(
rule
,
value
,
callback
,
'输入长度为2-20个
字符
'
)
},
},
trigger
:
'blur'
}
trigger
:
'blur'
}
],
],
...
@@ -455,10 +457,12 @@ export default {
...
@@ -455,10 +457,12 @@ export default {
created
()
{
created
()
{
vm
=
this
vm
=
this
vm
.
componentId
=
vm
.
$route
.
query
.
id
vm
.
componentId
=
vm
.
$route
.
query
.
id
vm
.
componentStatus
=
vm
.
$route
.
query
.
status
vm
.
componentStatus
=
vm
.
$route
.
query
.
status
// 3 启用 4 禁用
vm
.
resultFlag
=
vm
.
$route
.
query
.
resultFlag
// 判断可编辑范围是基础信息还是全部信息 1 为全部 2 为基础
vm
.
resultFlag
=
vm
.
$route
.
query
.
resultFlag
// 判断可编辑范围是基础信息还是全部信息 1 为全部 2 为基础
vm
.
getCertificateList
()
// 获取证书列表
vm
.
getCertificateList
()
// 获取证书列表
vm
.
componentBasicInfo
()
// 根据ID查询组件基本信息
vm
.
componentBasicInfo
()
// 根据ID查询组件基本信息
vm
.
conditionSelect
=
vm
.
resultFlag
==
2
||
vm
.
componentStatus
==
3
||
vm
.
componentStatus
==
4
vm
.
conditionAnd
=
vm
.
resultFlag
==
1
&&
vm
.
componentStatus
!=
3
&&
vm
.
componentStatus
!=
4
},
},
methods
:
{
methods
:
{
// 根据ID查询组件基本信息
// 根据ID查询组件基本信息
...
@@ -679,10 +683,6 @@ export default {
...
@@ -679,10 +683,6 @@ export default {
for
(
let
i
=
0
;
i
<
vm
.
componentList
.
moduleModelList
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
vm
.
componentList
.
moduleModelList
.
length
;
i
++
)
{
if
((
targetName
-
1
)
==
i
)
{
if
((
targetName
-
1
)
==
i
)
{
if
(
vm
.
componentList
.
moduleModelList
[
i
].
id
)
{
if
(
vm
.
componentList
.
moduleModelList
[
i
].
id
)
{
if
(
vm
.
resultFlag
==
2
)
{
vm
.
$message
.
info
(
"已关联项目只能编辑组件基础信息"
)
return
}
if
(
vm
.
componentList
.
moduleModelList
[
i
].
templetModelList
)
{
if
(
vm
.
componentList
.
moduleModelList
[
i
].
templetModelList
)
{
vm
.
$confirm
(
'删除模块会将改模块下已有模板同时删除,确认需要删除吗?'
,
'提示'
,
{
vm
.
$confirm
(
'删除模块会将改模块下已有模板同时删除,确认需要删除吗?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
...
@@ -785,10 +785,6 @@ export default {
...
@@ -785,10 +785,6 @@ export default {
for
(
let
i
=
0
;
i
<
vm
.
componentList
.
moduleModelList
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
vm
.
componentList
.
moduleModelList
.
length
;
i
++
)
{
if
(
index
==
i
)
{
if
(
index
==
i
)
{
if
(
vm
.
componentList
.
moduleModelList
[
i
].
templetModelList
[
index1
].
id
)
{
if
(
vm
.
componentList
.
moduleModelList
[
i
].
templetModelList
[
index1
].
id
)
{
if
(
vm
.
resultFlag
==
2
)
{
vm
.
$message
.
info
(
"已关联项目只能编辑组件基础信息"
)
return
}
vm
.
GET
(
'portalComponent/deletePortalTemplateById'
,{
id
:
vm
.
componentList
.
moduleModelList
[
i
].
templetModelList
[
index1
].
id
}).
then
((
res
)
=>
{
vm
.
GET
(
'portalComponent/deletePortalTemplateById'
,{
id
:
vm
.
componentList
.
moduleModelList
[
i
].
templetModelList
[
index1
].
id
}).
then
((
res
)
=>
{
if
(
res
.
code
==
'000000'
)
{
if
(
res
.
code
==
'000000'
)
{
vm
.
$message
.
info
(
'成功删除模板!'
)
vm
.
$message
.
info
(
'成功删除模板!'
)
...
@@ -835,13 +831,10 @@ export default {
...
@@ -835,13 +831,10 @@ export default {
for
(
let
q
=
0
;
q
<
vm
.
componentList
.
moduleModelList
[
i
].
templetModelList
[
j
].
partModelList
.
length
;
q
++
){
for
(
let
q
=
0
;
q
<
vm
.
componentList
.
moduleModelList
[
i
].
templetModelList
[
j
].
partModelList
.
length
;
q
++
){
if
(
index2
==
q
)
{
if
(
index2
==
q
)
{
if
(
vm
.
componentList
.
moduleModelList
[
i
].
templetModelList
[
j
].
partModelList
[
q
].
partContentModelList
[
index3
].
id
)
{
if
(
vm
.
componentList
.
moduleModelList
[
i
].
templetModelList
[
j
].
partModelList
[
q
].
partContentModelList
[
index3
].
id
)
{
if
(
vm
.
resultFlag
==
2
)
{
vm
.
$message
.
info
(
"已关联项目只能编辑组件基础信息"
)
return
}
vm
.
GET
(
'portalComponent/deletePortalPartById'
,{
id
:
vm
.
componentList
.
moduleModelList
[
i
].
templetModelList
[
j
].
partModelList
[
q
].
partContentModelList
[
index3
].
id
}).
then
((
res
)
=>
{
vm
.
GET
(
'portalComponent/deletePortalPartById'
,{
id
:
vm
.
componentList
.
moduleModelList
[
i
].
templetModelList
[
j
].
partModelList
[
q
].
partContentModelList
[
index3
].
id
}).
then
((
res
)
=>
{
if
(
res
.
code
==
'000000'
)
{
if
(
res
.
code
==
'000000'
)
{
vm
.
$message
.
info
(
'成功删除模板元件内容!'
)
vm
.
$message
.
info
(
'成功删除模板元件内容!'
)
vm
.
getModuleData
()
}
}
})
})
}
else
{
}
else
{
...
@@ -885,10 +878,6 @@ export default {
...
@@ -885,10 +878,6 @@ export default {
},
},
// 完成(暂存)
// 完成(暂存)
finishConponent
(
flag
)
{
finishConponent
(
flag
)
{
if
(
vm
.
resultFlag
==
2
)
{
vm
.
$message
.
info
(
"已关联项目只能编辑组件基础信息"
)
return
}
let
req
=
null
let
req
=
null
if
(
vm
.
componentList
.
moduleModelList
&&
vm
.
componentList
.
moduleModelList
.
length
>
0
)
{
if
(
vm
.
componentList
.
moduleModelList
&&
vm
.
componentList
.
moduleModelList
.
length
>
0
)
{
for
(
let
i
=
0
;
i
<
vm
.
componentList
.
moduleModelList
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
vm
.
componentList
.
moduleModelList
.
length
;
i
++
)
{
...
@@ -902,7 +891,7 @@ export default {
...
@@ -902,7 +891,7 @@ export default {
return
return
}
}
if
(
isEmptyList
(
vm
.
componentList
.
moduleModelList
[
i
].
templetModelList
))
{
if
(
isEmptyList
(
vm
.
componentList
.
moduleModelList
[
i
].
templetModelList
))
{
vm
.
$message
.
info
(
"
请给第"
+
parseInt
(
i
+
1
)
+
"个模块添加有效模板后再保存
"
)
vm
.
$message
.
info
(
"
模块内容不能为空
"
)
return
return
}
}
for
(
let
j
=
0
;
j
<
vm
.
componentList
.
moduleModelList
[
i
].
templetModelList
.
length
;
j
++
)
{
for
(
let
j
=
0
;
j
<
vm
.
componentList
.
moduleModelList
[
i
].
templetModelList
.
length
;
j
++
)
{
...
...
src/views/education/item-component.vue
浏览文件 @
d0b5bf0c
...
@@ -45,7 +45,7 @@
...
@@ -45,7 +45,7 @@
</el-table-column>
</el-table-column>
<el-table-column
label=
"操作"
fixed=
"right"
align=
"center"
min-width=
"200"
>
<el-table-column
label=
"操作"
fixed=
"right"
align=
"center"
min-width=
"200"
>
<
template
slot-scope=
"scope"
>
<
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 == 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 == 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>
<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 @@
...
@@ -22,7 +22,8 @@
</template>
</template>
<
script
>
<
script
>
import
{
mapGetters
}
from
'vuex'
import
{
mapGetters
}
from
'vuex'
import
{
setTimeout
}
from
'timers'
;
import
{
setTimeout
}
from
'timers'
import
{
isNotEmptyUtils
}
from
'../../utils/utils'
let
vm
=
null
let
vm
=
null
export
default
{
export
default
{
props
:
{
props
:
{
...
@@ -36,7 +37,6 @@ export default {
...
@@ -36,7 +37,6 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
// authList: {},
items
:
[
items
:
[
{
{
title
:
'数据总览'
,
title
:
'数据总览'
,
...
@@ -80,43 +80,22 @@ export default {
...
@@ -80,43 +80,22 @@ export default {
},
},
created
()
{
created
()
{
vm
=
this
vm
=
this
vm
.
authSelect
()
},
},
methods
:
{
watch
:
{
// 获取菜单数据
authList
(
newVal
,
oldVal
){
authSelect
()
{
if
(
!
newVal
.
P001
)
{
// 项目管理
vm
.
$nextTick
(()
=>
{
vm
.
items
[
1
].
subs
[
1
].
index
=
'blank'
vm
.
getUserAuth
()
}
})
if
(
!
newVal
.
P002
)
{
// 组件管理
// let req = {
vm
.
items
[
1
].
subs
[
0
].
index
=
'blank'
// "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'
}
}
}
}
if
(
!
newVal
.
P003
)
{
// 角色管理
vm
.
items
[
2
].
subs
[
0
].
index
=
'blank'
}
}
},
methods
:
{
}
}
}
}
</
script
>
</
script
>
...
@@ -149,6 +128,9 @@ export default {
...
@@ -149,6 +128,9 @@ export default {
color
:
#fff
;
color
:
#fff
;
background
:
#06232C
;
background
:
#06232C
;
}
}
.el-menu-item
:focus
,
.el-menu-item
:hover
{
background
:
#06232C
!
important
;
}
}
}
}
}
</
style
>
</
style
>
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录