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
提交
c2b3d18c
提交
c2b3d18c
编写于
3月 08, 2019
作者:
zhentian.jia
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
对接接口
上级
67cb46c3
变更
4
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
103 行增加
和
10 行删除
+103
-10
envConfig.js
src/utils/envConfig.js
+1
-1
add-manager.vue
src/views/education/add-manager.vue
+57
-6
item-manager.vue
src/views/education/item-manager.vue
+3
-3
test.js
src/views/education/test.js
+42
-0
未找到文件。
src/utils/envConfig.js
浏览文件 @
c2b3d18c
...
@@ -13,7 +13,7 @@ export const envConfig = {
...
@@ -13,7 +13,7 @@ export const envConfig = {
// apiUrl: 'https://test1-api.yunqueyi.com/',
// apiUrl: 'https://test1-api.yunqueyi.com/',
// webPageUrl: 'https://test1-phome.yunqueyi.com/'
// webPageUrl: 'https://test1-phome.yunqueyi.com/'
//baseUrl: 'https://uat-sc.yunqueyi.com/',
//baseUrl: 'https://uat-sc.yunqueyi.com/',
baseUrl
:
'http://1
0.177.15.169
:11905/portal/'
,
baseUrl
:
'http://1
92.168.110.226
:11905/portal/'
,
apiUrl
:
'https://uat-api.yunqueyi.com/'
,
apiUrl
:
'https://uat-api.yunqueyi.com/'
,
webPageUrl
:
'https://uat-phome.yunqueyi.com/'
,
webPageUrl
:
'https://uat-phome.yunqueyi.com/'
,
qiniuUrl
:
"http://localhost:10201/contents/admin/qiniu/token"
,
qiniuUrl
:
"http://localhost:10201/contents/admin/qiniu/token"
,
...
...
src/views/education/add-manager.vue
浏览文件 @
c2b3d18c
...
@@ -58,6 +58,24 @@
...
@@ -58,6 +58,24 @@
>
</el-input>
>
</el-input>
</el-col>
</el-col>
</el-form-item>
</el-form-item>
<el-form-item
label=
"列表图片:"
>
<el-upload
v-model=
"formData.listUrl"
class=
"bg-uploader"
action=
"#"
:show-file-list=
"false"
:before-upload=
"beforeUploadListPic"
>
<img
v-if=
"formData.listUrl"
:src=
"formData.listUrl"
class=
"bg-img"
>
<img
v-if=
"!formData.listUrl"
class=
"bg-img"
src=
"../../assets/image/small.png"
>
<i
v-else
class=
"el-icon-plus avatar-uploader-icon"
></i>
<div
class=
"limit-text"
>
<p>
尺寸大小:750*420
</p>
<p>
限制大小: 2.0 Mb
</p>
<p>
支持.jpg,.png格式
</p>
</div>
</el-upload>
</el-form-item>
<el-form-item
label=
"封面类型:"
>
<el-form-item
label=
"封面类型:"
>
<el-radio-group
v-model=
"formData.type"
>
<el-radio-group
v-model=
"formData.type"
>
<el-radio
:label=
"1"
>
图片
</el-radio>
<el-radio
:label=
"1"
>
图片
</el-radio>
...
@@ -70,7 +88,7 @@
...
@@ -70,7 +88,7 @@
class=
"bg-uploader"
class=
"bg-uploader"
action=
"#"
action=
"#"
:show-file-list=
"false"
:show-file-list=
"false"
:before-upload=
"before
AvatarUpload
"
:before-upload=
"before
UploadCoverPic
"
>
>
<img
v-if=
"formData.coverUrl"
:src=
"formData.coverUrl"
class=
"bg-img"
>
<img
v-if=
"formData.coverUrl"
:src=
"formData.coverUrl"
class=
"bg-img"
>
<img
v-if=
"!formData.coverUrl"
class=
"bg-img"
src=
"../../assets/image/small.png"
>
<img
v-if=
"!formData.coverUrl"
class=
"bg-img"
src=
"../../assets/image/small.png"
>
...
@@ -85,11 +103,10 @@
...
@@ -85,11 +103,10 @@
<el-form-item
label=
"可下载附件:"
>
<el-form-item
label=
"可下载附件:"
>
<el-col
:span=
"10"
>
<el-col
:span=
"10"
>
<el-upload
<el-upload
v-model=
"formData.pdfUrl"
class=
"upload-pdf"
class=
"upload-pdf"
action=
"https://jsonplaceholder.typicode.com/posts/"
action=
"#"
:on-preview=
"handlePreview"
:before-upload=
"beforeUploadPDF"
:on-remove=
"handleRemove"
:before-remove=
"beforeRemove"
multiple
multiple
:limit=
"3"
:limit=
"3"
:on-exceed=
"handleExceed"
:on-exceed=
"handleExceed"
...
@@ -345,7 +362,9 @@ export default {
...
@@ -345,7 +362,9 @@ export default {
date2
:
""
,
date2
:
""
,
desc
:
""
,
desc
:
""
,
type
:
1
,
type
:
1
,
coverUrl
:
""
listUrl
:
""
,
coverUrl
:
""
,
pdfUrl
:
""
,
},
},
fileList
:
[
fileList
:
[
{
{
...
@@ -536,9 +555,27 @@ export default {
...
@@ -536,9 +555,27 @@ export default {
});
});
return
flag
;
return
flag
;
},
},
//重置表单
resetForm
(
formName
)
{
resetForm
(
formName
)
{
this
.
$refs
[
formName
].
resetFields
();
this
.
$refs
[
formName
].
resetFields
();
},
},
//编辑/更新 基础信息
insertOrUpdate
()
{
console
.
log
(
this
.
formData
);
let
req
=
{
"projectModel"
:
"{
\"
id
\"
:6,
\"
projectBegintime
\"
:1551853576789,
\"
projectEndtime
\"
:1551853576789,
\"
projectIntro
\"
:
\"
测试用例
\"
,
\"
projectName
\"
:
\"
testProjectName
\"
}"
,
"attachmentModel"
:
"[{
\"
attachmentType
\"
:1,
\"
attachmentUrl
\"
:
\"
www.baidu.com
\"
,
\"
kind
\"
:1,
\"
portalProjectId
\"
:6,
\"
seqNo
\"
:1},{
\"
attachmentType
\"
:2,
\"
attachmentUrl
\"
:
\"
www.qq.com
\"
,
\"
kind
\"
:2,
\"
portalProjectId
\"
:6,
\"
seqNo
\"
:1}]"
,
"attachmentPDFModel"
:
"[{
\"
attachmentType
\"
:3,
\"
attachmentUrl
\"
:
\"
www.pdf.com
\"
,
\"
kind
\"
:3,
\"
portalProjectId
\"
:6},{
\"
attachmentType
\"
:3,
\"
attachmentUrl
\"
:
\"
www.pdf.com
\"
,
\"
kind
\"
:3,
\"
portalProjectId
\"
:6}]"
};
vm
.
POST
(
"portalInfo/insertOrUpdate"
,
req
).
then
(
res
=>
{
if
(
res
.
code
==
"000000"
)
{
console
.
log
(
res
)
}
});
},
//步骤style
//步骤style
changeOnStep
(
active
)
{
changeOnStep
(
active
)
{
if
(
active
==
0
)
{
if
(
active
==
0
)
{
...
@@ -563,6 +600,7 @@ export default {
...
@@ -563,6 +600,7 @@ export default {
let
formName
=
"formData"
;
let
formName
=
"formData"
;
let
removeState
=
this
.
submitForm
(
formName
);
let
removeState
=
this
.
submitForm
(
formName
);
console
.
log
(
"判断移动"
+
removeState
);
console
.
log
(
"判断移动"
+
removeState
);
this
.
insertOrUpdate
();
if
(
removeState
===
true
)
{
if
(
removeState
===
true
)
{
//移动到第二页 选择范围
//移动到第二页 选择范围
this
.
active
++
;
this
.
active
++
;
...
@@ -583,6 +621,19 @@ export default {
...
@@ -583,6 +621,19 @@ export default {
handleAvatarSuccess
(
res
,
file
)
{
handleAvatarSuccess
(
res
,
file
)
{
this
.
imageUrl
=
URL
.
createObjectURL
(
file
.
raw
);
this
.
imageUrl
=
URL
.
createObjectURL
(
file
.
raw
);
},
},
//上传列表图片
beforeUploadListPic
(
file
)
{
this
.
beforeAvatarUpload
(
file
);
},
//上传封面图片
beforeUploadCoverPic
(
file
)
{
this
.
beforeAvatarUpload
(
file
);
},
//上传PDF
beforeUploadPDF
(
file
)
{
console
.
log
(
file
);
},
//上传图片校验
beforeAvatarUpload
(
file
)
{
beforeAvatarUpload
(
file
)
{
const
isJPG
=
file
.
type
===
"image/jpeg"
;
const
isJPG
=
file
.
type
===
"image/jpeg"
;
const
isPNG
=
file
.
type
===
"image/png"
;
const
isPNG
=
file
.
type
===
"image/png"
;
...
...
src/views/education/item-manager.vue
浏览文件 @
c2b3d18c
...
@@ -40,7 +40,6 @@
...
@@ -40,7 +40,6 @@
<el-table-column
prop=
"projectName"
label=
"项目名称"
width=
"120"
></el-table-column>
<el-table-column
prop=
"projectName"
label=
"项目名称"
width=
"120"
></el-table-column>
<el-table-column
prop=
"createdName"
label=
"创建人"
></el-table-column>
<el-table-column
prop=
"createdName"
label=
"创建人"
></el-table-column>
<el-table-column
prop=
"projectIntro"
label=
"项目简介"
></el-table-column>
<el-table-column
prop=
"projectIntro"
label=
"项目简介"
></el-table-column>
<el-table-column
prop=
"address"
label=
"所属地区"
></el-table-column>
<el-table-column
prop=
"projectBegintime"
label=
"项目开始时间"
></el-table-column>
<el-table-column
prop=
"projectBegintime"
label=
"项目开始时间"
></el-table-column>
<el-table-column
prop=
"projectEndtime"
label=
"项目结束时间"
></el-table-column>
<el-table-column
prop=
"projectEndtime"
label=
"项目结束时间"
></el-table-column>
<el-table-column
prop=
"projectStatus"
label=
"状态"
></el-table-column>
<el-table-column
prop=
"projectStatus"
label=
"状态"
></el-table-column>
...
@@ -93,7 +92,7 @@ export default {
...
@@ -93,7 +92,7 @@ export default {
name
:
""
,
name
:
""
,
status
:
""
,
status
:
""
,
pageNo
:
1
,
pageNo
:
1
,
pageSize
:
1
5
pageSize
:
1
0
},
},
tableData
:
[],
tableData
:
[],
totalRows
:
0
,
totalRows
:
0
,
...
@@ -151,7 +150,8 @@ export default {
...
@@ -151,7 +150,8 @@ export default {
getProjectList
()
{
getProjectList
()
{
console
.
log
(
"数据请求"
);
console
.
log
(
"数据请求"
);
let
req
=
{
let
req
=
{
token
:
""
pageNo
:
this
.
searchParam
.
pageNo
,
pageSize
:
this
.
searchParam
.
pageNo
};
};
vm
.
GET
(
"portalInfo/getProjectList"
,
req
).
then
(
res
=>
{
vm
.
GET
(
"portalInfo/getProjectList"
,
req
).
then
(
res
=>
{
if
(
res
.
code
==
"000000"
)
{
if
(
res
.
code
==
"000000"
)
{
...
...
src/views/education/test.js
0 → 100644
浏览文件 @
c2b3d18c
let
data
=
{
"projectModel"
:
{
"projectBegintime"
:
1551948983468
,
"projectEndtime"
:
1551948983468
,
"projectIntro"
:
"测试用例"
,
"projectName"
:
"testProjectName"
},
"attachmentModel"
:
[
{
"attachmentType"
:
1
,
"attachmentUrl"
:
"www.baidu.com"
,
"kind"
:
1
,
"seqNo"
:
1
},
{
"attachmentType"
:
2
,
"attachmentUrl"
:
"www.qq.com"
,
"kind"
:
2
,
"seqNo"
:
1
}
],
"attachmentPDFModel"
:
[
{
"attachmentType"
:
3
,
"attachmentUrl"
:
"www.pdf.com"
,
"kind"
:
3
}
]
}
/**
projectModel
ProjectBegintime ProjectEndtime 开始结束时间
projectIntro 项目简介 test
ProjectName 项目名称
attachmentModel 附件信息
attachmentType 1:项目列表 2:封面信息(图片和视频) 3:PDF
attachmenturl 链接
kind 1:图片 2:视频 3:PDF
attachmentName 附件名称
attachment_ext 附件格式
attachment_size 附件大小
*/
\ No newline at end of file
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录