Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica.cloud.web-education-admin
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
提交
打开侧边栏
com.pica.cloud.education.frontend
pica.cloud.web-education-admin
提交
30ce6581
提交
30ce6581
编写于
6月 19, 2020
作者:
guangjun.yang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
新建按钮相关
上级
7a1f8841
变更
9
展开全部
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
2044 行增加
和
85 行删除
+2044
-85
edit-course-dialog copy 2.vue
...s/education/custom-resource/edit-course-dialog copy 2.vue
+578
-0
edit-course-dialog copy 3.vue
...s/education/custom-resource/edit-course-dialog copy 3.vue
+717
-0
edit-course-dialog.vue
...mponents/education/custom-resource/edit-course-dialog.vue
+188
-49
preview-protocol.vue
...components/education/custom-resource/preview-protocol.vue
+25
-20
course-list copy.vue
src/components/education/custom/course-list copy.vue
+393
-0
course-list.vue
src/components/education/custom/course-list.vue
+8
-1
select-course-comp.vue
src/components/education/custom/select-course-comp.vue
+5
-2
fetch.js
src/utils/fetch.js
+2
-9
edit-custom.vue
src/views/education/edit-custom.vue
+128
-4
未找到文件。
src/components/education/custom-resource/edit-course-dialog copy 2.vue
0 → 100644
浏览文件 @
30ce6581
此差异已折叠。
点击以展开。
src/components/education/custom-resource/edit-course-dialog copy 3.vue
0 → 100644
浏览文件 @
30ce6581
此差异已折叠。
点击以展开。
src/components/education/custom-resource/edit-course-dialog.vue
浏览文件 @
30ce6581
此差异已折叠。
点击以展开。
src/components/education/custom-resource/preview-protocol.vue
浏览文件 @
30ce6581
...
...
@@ -12,9 +12,10 @@
<div
slot=
"title"
style=
"text-align: left;"
>
<span
style=
"font-weight: 700;"
>
用户协议
</span>
</div>
<div
v-html=
"protocol
Info.contents
"
></div>
<div
v-html=
"protocol
Content
"
></div>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"close"
>
确 定
</el-button>
<el-button
@
click=
"close"
>
不同意
</el-button>
<el-button
type=
"primary"
@
click=
"signProtocol"
>
同意
</el-button>
</div>
</el-dialog>
</div>
...
...
@@ -23,9 +24,7 @@
export
default
{
data
()
{
return
{
protocolInfo
:
{
contents
:
''
}
};
},
props
:
{
...
...
@@ -35,35 +34,41 @@ export default {
},
protocolId
:
{
type
:
String
|
Number
,
default
:
0
}
},
watch
:
{
protocolId
(
newVal
)
{
if
(
newVal
)
{
this
.
getProtocolInfoById
(
newVal
);
}
default
:
1
},
protocolContent
:
{
type
:
String
,
default
:
''
}
},
computed
:
{
},
mounted
()
{
// this.getProtocolInfoById();
},
methods
:
{
// 查询列表
getProtocolInfoById
(
protocolId
)
{
// 签署协议
signProtocol
()
{
let
req
=
{
protocolId
:
protocolId
setEntry
:
true
,
};
this
.
GET
(
"smartcontract/protocolManage/protocol"
,
req
).
then
(
res
=>
{
this
.
POST
(
"smartcontract/protocol/sign?type="
+
this
.
protocolId
,
req
).
then
(
res
=>
{
if
(
res
.
code
==
"000000"
)
{
this
.
protocolInfo
=
res
.
data
;
this
.
close
(
true
);
}
else
{
vm
.
$message
.
info
(
res
.
message
);
this
.
close
(
false
);
}
}).
catch
(
err
=>
{
vm
.
$message
.
warning
(
"请稍后重试"
);
this
.
close
(
false
);
});
},
close
()
{
this
.
$emit
(
'close'
);
close
(
status
)
{
this
.
$emit
(
'close'
,
status
);
},
}
};
...
...
src/components/education/custom/course-list copy.vue
0 → 100644
浏览文件 @
30ce6581
此差异已折叠。
点击以展开。
src/components/education/custom/course-list.vue
浏览文件 @
30ce6581
...
...
@@ -61,7 +61,10 @@
<div
v-else
class=
"no-list"
>
<img
src=
"../../../assets/custom/icon/img-no-content.png"
alt
/>
<span
class=
"tips"
>
没有找到相关结果,请重新查询
</span>
<el-button
v-show=
"kind == 1"
type=
"primary"
icon=
"el-icon-plus"
@
click=
"showOrgCourse"
>
创建机构课程
</el-button>
</div>
<el-button
type=
"primary"
icon=
"el-icon-plus"
@
click=
"showOrgCourse"
>
创建机构课程
</el-button>
<div
class=
"page-wrapper"
>
<div
class=
"page"
>
...
...
@@ -109,6 +112,7 @@ export default {
},
methods
:
{
...
mapActions
([
"setCartList"
,
"setSearchParam"
,
"setSearchParamOrg"
]),
toggleOrder
()
{
this
.
isRise
=
!
this
.
isRise
;
let
dir
=
this
.
isRise
?
1
:
2
;
...
...
@@ -150,7 +154,10 @@ export default {
}
this
.
setCartList
(
this
.
cartList
);
this
.
$forceUpdate
();
}
},
showOrgCourse
()
{
this
.
$emit
(
'showOrgCourse'
,
'add'
);
},
}
};
</
script
>
...
...
src/components/education/custom/select-course-comp.vue
浏览文件 @
30ce6581
...
...
@@ -10,7 +10,7 @@
</el-tab-pane>
</el-tabs>
<div
class=
"top-line"
style=
"margin-top: 20px;"
></div>
<CourseList></CourseList>
<CourseList
@
showOrgCourse=
"showOrgCourse"
></CourseList>
</div>
</
template
>
<
script
>
...
...
@@ -36,7 +36,10 @@ export default {
...
mapActions
([
'setKind'
]),
handleClick
()
{
this
.
setKind
(
this
.
activeName
);
}
},
showOrgCourse
(
type
)
{
this
.
$emit
(
'showOrgCourse'
,
type
);
},
},
}
</
script
>
...
...
src/utils/fetch.js
浏览文件 @
30ce6581
...
...
@@ -54,21 +54,14 @@ service.interceptors.request.use(config => {
}
if
(
process
.
env
.
BUILD_ENV
==
"development"
){
// 本地开发环境
// console.log('环境变量>>>> ', process.env.BUILD_ENV);
config
.
headers
[
'token'
]
=
'
F37DD4A8C9094A89A0C7EF84E4303CC9
'
;
config
.
headers
[
'token'
]
=
'
BCBEB604699441FE86DDB0C5C19A852B
'
;
// config.headers['token'] = localStorage.getItem('storageToken')
}
else
{
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'
})
}
// if (config.data && config.data.setEntry) {
// config.headers['sysCode'] = config.data.sysCode || 10
// if(config.data.token){
// config.headers['token'] = config.data.token || '63C3FA92AF8A45A48B31EB7FD97B95EB'
// }
// 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' })
// }
return
config
},
error
=>
{
// logger.debug('service.interceptors.request: ', error)
...
...
src/views/education/edit-custom.vue
浏览文件 @
30ce6581
...
...
@@ -34,7 +34,7 @@
<!-- 选择课程 -->
<div
v-if=
"active == 0"
class=
"tpl-main"
>
<SelectCourseComp></SelectCourseComp>
<SelectCourseComp
@
showOrgCourse=
"showOrgCourse"
></SelectCourseComp>
</div>
<!-- 填写项目信息-->
...
...
@@ -70,6 +70,17 @@
<dialog-componet
:dialogObj=
"dialogObj"
@
hide=
"hide"
></dialog-componet>
<dialog-componet
:dialogObj=
"sendObj"
@
hide=
"hidefn"
@
confirm=
"confirmFn"
></dialog-componet>
<PreviewEditCourse
:dialogVisible=
"isPreviewEditCourse"
:addOrUpdate=
"addOrUpdate"
@
close=
"closeEditCourse"
/>
<PreviewProtocol
:dialogVisible=
"isPreviewProtocol"
:protocolId=
"protocolId"
:protocolContent=
"protocolContent"
@
close=
"closeProtocol"
/>
</div>
</
template
>
...
...
@@ -82,6 +93,8 @@ import selectRegion from "@/components/education/template/selectRegion";
import
setOrganization
from
"@/components/education/template/setOrganization"
;
import
SelectCourseComp
from
"@/components/education/custom/select-course-comp"
;
import
dialog
from
"@/components/education/template/dialog"
;
import
PreviewEditCourse
from
"@/components/education/custom-resource/edit-course-dialog"
;
import
PreviewProtocol
from
"@/components/education/custom-resource/preview-protocol"
;
import
{
openLoading
,
closeLoading
,
resizeHeight
}
from
"@/utils/utils"
;
import
{
mapGetters
,
mapActions
}
from
"vuex"
;
...
...
@@ -157,6 +170,13 @@ export default {
isPreview
:
0
,
// 1表示是查看信息
maxLimitCreatedCustomProjectCountInYear
:
20
,
// 同一个用户每年能够创建的项目数
allSubList
:
[],
isPreviewEditCourse
:
false
,
addOrUpdate
:
'add'
,
isPreviewProtocol
:
false
,
protocolId
:
5
,
protocolContent
:
''
,
};
},
computed
:
{
...
...
@@ -190,7 +210,9 @@ export default {
selectRegion
,
setOrganization
,
dialogComponet
:
dialog
,
SelectCourseComp
SelectCourseComp
,
PreviewEditCourse
,
PreviewProtocol
},
created
()
{
vm
=
this
;
...
...
@@ -399,6 +421,7 @@ export default {
hidefn
()
{
vm
.
regionComplete
(
vm
.
changeStatus
);
},
// 选择学元范围暂存
regionComplete
(
fishFn
)
{
let
req
=
{
...
...
@@ -553,9 +576,110 @@ export default {
// 从子组件(项目信息)获取项目状态是否为上架
setStatus4Flag
(
s
)
{
vm
.
status4Flag
=
s
;
}
},
/*
展示添加机构课程弹框
如果已经加入机构,1:没有同意过协议,则打开协议弹框;2:已经加入,时直接打开添加弹框
如果没有加入机构,则直接弹出提示(我知道了)
*/
showOrgCourse
(
addOrUpdate
)
{
// this.checkProtocol();
this
.
checkHospital
();
this
.
addOrUpdate
=
addOrUpdate
},
// 创建机构课程前校验机构
// TODO 各个状态与数据结构
checkHospital
()
{
openLoading
(
vm
);
let
req
=
{
setEntry
:
true
}
vm
.
GET
(
`portal/portalCustom/checkHospital`
,
req
)
.
then
(
res
=>
{
closeLoading
(
vm
);
if
(
res
.
code
==
"000000"
)
{
console
.
log
(
res
);
if
(
res
.
data
==
0
)
{
this
.
checkProtocol
();
}
else
{
vm
.
dialogObj
=
Object
.
assign
(
vm
.
dialogObj
,
vm
.
statusObj
[
`status_
${
res
.
data
}
`
]
);
vm
.
dialogObj
.
visible
=
true
;
}
}
else
{
vm
.
$message
.
info
(
res
.
message
);
}
})
.
catch
(
err
=>
{
closeLoading
(
vm
);
vm
.
$message
.
warning
(
"请稍后重试"
);
});
},
// 判断用户是否签署了最新版协议
// 如果没有签署,则打开协议签署弹框
checkProtocol
()
{
// openLoading(vm);
let
req
=
{
setEntry
:
true
,
type
:
this
.
protocolId
}
vm
.
GET
(
`smartcontract/protocol/sign/check`
,
req
)
.
then
(
res
=>
{
// closeLoading(vm);
if
(
res
.
code
==
"000000"
)
{
if
(
!
res
.
data
)
{
// 没有签署,打开协议签署弹框
this
.
getProtocolInfoById
();
}
else
{
this
.
isPreviewEditCourse
=
true
;
}
}
else
{
vm
.
$message
.
info
(
res
.
message
);
}
})
.
catch
(
err
=>
{
closeLoading
(
vm
);
vm
.
$message
.
warning
(
"请稍后重试"
);
});
},
// 根据协议获取内容
getProtocolInfoById
()
{
let
req
=
{
type
:
this
.
protocolId
};
// this.GET("smartcontract/protocolManage/protocol", req).then(res => {
this
.
GET
(
"smartcontract/protocol/content"
,
req
).
then
(
res
=>
{
if
(
res
.
code
==
"000000"
)
{
// this.protocolContent = res.data.contents;
this
.
protocolContent
=
res
.
data
;
this
.
isPreviewProtocol
=
true
;
}
else
{
vm
.
$message
.
info
(
res
.
message
);
}
}).
catch
(
err
=>
{
vm
.
$message
.
warning
(
"请稍后重试"
);
});
},
// 关闭编辑课程弹框
closeEditCourse
()
{
this
.
isPreviewEditCourse
=
false
;
},
// 关闭预览协议弹框
closeProtocol
(
needShowAdd
)
{
if
(
needShowAdd
)
{
this
.
isPreviewEditCourse
=
true
;
}
this
.
isPreviewProtocol
=
false
;
},
}
}
;
}
</
script
>
<
style
lang=
"scss"
>
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录