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
提交
f8857843
提交
f8857843
编写于
3月 11, 2019
作者:
zhentian.jia
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
对接项目管理 新建项目后端接口
上级
f0f99394
变更
5
展开全部
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
198 行增加
和
94 行删除
+198
-94
fetch.js
src/utils/fetch.js
+1
-1
filter.js
src/utils/filter.js
+15
-0
add-manager.vue
src/views/education/add-manager.vue
+144
-76
item-manager.vue
src/views/education/item-manager.vue
+29
-16
test.js
src/views/education/test.js
+9
-1
未找到文件。
src/utils/fetch.js
浏览文件 @
f8857843
...
...
@@ -12,7 +12,7 @@ const service = axios.create({
// request拦截器
service
.
interceptors
.
request
.
use
(
config
=>
{
config
.
headers
[
'sysCode'
]
=
12
config
.
headers
[
'token'
]
=
'
C1C5360EEC754092B9EC244147B35BB7
'
config
.
headers
[
'token'
]
=
'
AB14D7D7675E4D09B4B1566170076122
'
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
...
...
src/utils/filter.js
浏览文件 @
f8857843
...
...
@@ -124,6 +124,21 @@ const vueFilter = {
}
else
{
return
'已禁用'
}
},
statusProject
:
(
value
)
=>
{
if
(
value
==
1
)
{
return
'草稿'
}
else
if
(
value
==
2
)
{
return
'未上架'
}
else
if
(
value
==
3
)
{
return
'审批中'
}
else
if
(
value
==
4
)
{
return
'已上架'
}
else
if
(
value
==
5
)
{
return
'已下架'
}
else
{
return
'已拒绝'
}
}
}
export
default
vueFilter
\ No newline at end of file
src/views/education/add-manager.vue
浏览文件 @
f8857843
此差异已折叠。
点击以展开。
src/views/education/item-manager.vue
浏览文件 @
f8857843
...
...
@@ -42,12 +42,16 @@
<el-table-column
prop=
"projectIntro"
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=
"projectStatus"
label=
"状态"
></el-table-column>
<el-table-column
prop=
"projectStatus"
label=
"状态"
>
<template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
projectStatus
|
statusProject
}}
</span>
</
template
>
</el-table-column>
<el-table-column
fixed=
"right"
label=
"操作"
width=
"200"
>
<
template
slot-scope=
"scope"
>
<el-button
class=
"title"
type=
"text"
size=
"small"
>
编辑
</el-button>
<el-button
class=
"title"
type=
"text"
size=
"small"
>
发布
</el-button>
<el-button
class=
"title"
type=
"text"
size=
"small"
>
删除
</el-button>
<el-button
@
click=
"editItem(scope.row)"
class=
"title"
type=
"text"
size=
"small"
>
编辑
</el-button>
<el-button
@
click=
"releaseItem(scope.row)"
class=
"title"
type=
"text"
size=
"small"
>
发布
</el-button>
<el-button
@
click=
"delItem(scope.row)"
class=
"title"
type=
"text"
size=
"small"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -57,7 +61,7 @@
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page=
"searchParam.pageNo"
:page-sizes=
"[1
5
, 30, 50, 100]"
:page-sizes=
"[1
0
, 30, 50, 100]"
:page-size=
"searchParam.pageSize"
layout=
"total, sizes, prev, pager, next, jumper"
:total=
"totalRows"
...
...
@@ -148,32 +152,41 @@ export default {
},
//查询项目列表
getProjectList
()
{
console
.
log
(
"数据请求"
);
let
req
=
{
pageNo
:
this
.
searchParam
.
pageNo
,
pageSize
:
this
.
searchParam
.
page
No
pageSize
:
this
.
searchParam
.
page
Size
,
};
vm
.
GET
(
"portalInfo/getProjectList"
,
req
).
then
(
res
=>
{
if
(
res
.
code
==
"000000"
)
{
vm
.
tableData
=
res
.
data
.
data
;
vm
.
totalRows
=
res
.
data
.
data
.
length
;
vm
.
totalRows
=
res
.
data
.
totalRows
;
}
});
},
editItem
(
row
)
{
},
releaseItem
(
row
)
{
},
delItem
(
row
)
{
},
handleSizeChange
(
val
)
{
console
.
log
(
`每页
${
val
}
条`
);
this
.
pageSize
=
val
;
this
.
handleCurrentChange
(
this
.
currentPage
);
this
.
searchParam
.
pageSize
=
val
;
this
.
handleCurrentChange
(
this
.
searchParam
.
pageNo
);
},
handleCurrentChange
(
val
)
{
console
.
log
(
`当前页:
${
val
}
`
);
this
.
currentPage
=
val
;
this
.
searchParam
.
pageNo
=
val
;
this
.
getProjectList
();
//需要判断是否检索
if
(
!
this
.
flag
)
{
this
.
currentChangePage
(
this
.
tableDataEnd
);
}
else
{
this
.
currentChangePage
(
this
.
filterTableDataEnd
);
}
//
if (!this.flag) {
//
this.currentChangePage(this.tableDataEnd);
//
} else {
//
this.currentChangePage(this.filterTableDataEnd);
//
}
},
//组件自带监控当前页码
currentChangePage
(
list
)
{
let
from
=
(
this
.
currentPage
-
1
)
*
this
.
pageSize
;
...
...
src/views/education/test.js
浏览文件 @
f8857843
...
...
@@ -25,7 +25,15 @@ let data = {
"kind"
:
3
}
]
}
};
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}]'
};
/**
projectModel
ProjectBegintime ProjectEndtime 开始结束时间
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录