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
提交
48da751f
提交
48da751f
编写于
3月 13, 2019
作者:
zhentian.jia
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
添加项目管理中的操作状态
上级
f11396c3
变更
2
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
115 行增加
和
25 行删除
+115
-25
item-manager.vue
src/views/education/item-manager.vue
+99
-25
mock.js
src/views/mock.js
+16
-0
未找到文件。
src/views/education/item-manager.vue
浏览文件 @
48da751f
...
...
@@ -27,11 +27,11 @@
<el-form-item
label=
"发布状态:"
>
<el-select
v-model=
"formInline.projectStatus"
placeholder=
"请选择发布状态"
>
<el-option
v-for=
"item in optionStatus"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
></el-option>
v-for=
"item in optionStatus"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
></el-option>
</el-select>
</el-form-item>
</el-form>
...
...
@@ -59,14 +59,65 @@
<el-table-column
fixed=
"right"
label=
"操作"
min-width=
"200"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<el-button
@
click=
"
editItem(scope.row
)"
v-show=
"showButton(scope.row,
'edit'
)"
@
click=
"
changeStatus(scope.row,0
)"
v-show=
"showButton(scope.row,
0
)"
type=
"primary"
size=
"small"
>
编辑
</el-button>
<el-button
@
click=
"storage(scope.row)"
type=
"primary"
size=
"small"
>
暂存
</el-button>
<el-button
@
click=
"completeItem(scope.row)"
type=
"primary"
size=
"small"
>
完成
</el-button>
<el-button
@
click=
"delItem(scope.row)"
type=
"primary"
size=
"small"
>
删除
</el-button>
<el-button
@
click=
"changeStatus(scope.row,1)"
v-show=
"showButton(scope.row,1)"
type=
"primary"
size=
"small"
>
暂存
</el-button>
<el-button
@
click=
"changeStatus(scope.row,2)"
v-show=
"showButton(scope.row,2)"
type=
"primary"
size=
"small"
>
完成
</el-button>
<el-button
@
click=
"changeStatus(scope.row,3)"
v-show=
"showButton(scope.row,3)"
type=
"primary"
size=
"small"
>
上架
</el-button>
<el-button
@
click=
"changeStatus(scope.row,4)"
v-show=
"showButton(scope.row,4)"
type=
"primary"
size=
"small"
>
通过
</el-button>
<el-button
@
click=
"changeStatus(scope.row,5)"
v-show=
"showButton(scope.row,5)"
type=
"primary"
size=
"small"
>
下架
</el-button>
<el-button
@
click=
"changeStatus(scope.row,7)"
v-show=
"showButton(scope.row,7)"
type=
"primary"
size=
"small"
>
提醒审核
</el-button>
<el-button
@
click=
"changeStatus(scope.row,8)"
v-show=
"showButton(scope.row,8)"
type=
"primary"
size=
"small"
>
取消审核
</el-button>
<el-button
@
click=
"changeStatus(scope.row,6)"
v-show=
"showButton(scope.row,6)"
type=
"primary"
size=
"small"
>
拒绝
</el-button>
<el-button
@
click=
"delItem(scope.row,9)"
v-show=
"showButton(scope.row,9)"
type=
"primary"
size=
"small"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -88,6 +139,7 @@
<
script
>
import
BreadCrumb
from
"../../components/breadcrumb.vue"
;
import
{
create
}
from
"domain"
;
import
{
returnData
}
from
"../mock"
;
let
vm
=
null
;
export
default
{
components
:
{
...
...
@@ -150,13 +202,6 @@ export default {
this
.
getProjectList
();
},
methods
:
{
showButton
(
row
)
{
let
projectStatus
=
row
.
projectStatus
;
let
flag
=
false
;
flag
=
true
;
//console.log('状态:'+projectStatus)
return
flag
;
},
toPage
()
{
this
.
$router
.
push
(
"add-manager"
);
},
...
...
@@ -198,18 +243,47 @@ export default {
}
});
},
editItem
(
row
)
{},
upperItem
(
row
)
{},
showButton
(
row
,
type
)
{
// 按钮type类型: 0-编辑
// 1-暂存 2-完成 3-上架 4-通过 5-下架 6-拒绝
// 7- 提醒审核 8(5)-取消审核 9-删除
let
projectStatus
=
row
.
projectStatus
;
let
level
=
row
.
level
;
let
flag
=
false
;
let
typeStr
=
parseInt
(
type
);
//console.log("状态:"+projectStatus+ "等级:" + level + " 按钮类型:" + type);
let
buttonStatus
=
returnData
().
buttonStatus
;
let
statusSet
=
buttonStatus
[
projectStatus
-
1
][
level
];
let
flagValue
=
statusSet
.
indexOf
(
typeStr
);
// console.log(
// "所有状态:" +
// statusSet +
// " 当前状态" +
// typeStr +
// " 展示情况:" +
// flagValue
// );
if
(
flagValue
>=
0
)
{
flag
=
true
;
}
else
{
flag
=
false
;
}
//flag = true;
return
flag
;
},
//改变状态
changeStatus
(
row
,
type
)
{
},
delItem
(
row
)
{
let
req
=
{
//id: row.id,
};
let
req
=
{};
let
that
=
this
;
vm
.
DELETE
(
"portalInfo/delete/"
+
row
.
id
,
req
).
then
(
res
=>
{
vm
.
DELETE
(
"portalInfo/delete/"
+
row
.
id
,
req
).
then
(
res
=>
{
if
(
res
.
code
==
"000000"
)
{
this
.
$notify
({
title
:
'删除项目'
,
message
:
'ID为:'
+
row
.
id
+
'的项目删除成功'
title
:
"删除项目"
,
message
:
"ID为:"
+
row
.
id
+
"的项目删除成功"
});
this
.
loading
=
true
;
that
.
getProjectList
();
...
...
src/views/mock.js
浏览文件 @
48da751f
...
...
@@ -99,10 +99,26 @@ let treeData = [
]
}
];
let
buttonStatus
=
[
//L1 内部管理员 L2项目负责人 L3次级负责人
//草稿
{
L1
:
""
,
L2
:
"09"
,
L3
:
""
},
//未上架
{
L1
:
"09"
,
L2
:
"039"
,
L3
:
"0"
},
//待审批、审批中
{
L1
:
"46"
,
L2
:
"78"
,
L3
:
""
},
//已上架
{
L1
:
"05"
,
L2
:
"05"
,
L3
:
"5"
},
//已下架
{
L1
:
"03"
,
L2
:
"03"
,
L3
:
"0"
},
//已拒绝/未上架
{
L1
:
"09"
,
L2
:
"039"
,
L3
:
"0"
},
];
export
function
returnData
()
{
let
data
=
{};
data
.
tableOrganization
=
tableOrganization
;
data
.
tablePerson
=
tablePerson
;
data
.
treeData
=
treeData
;
data
.
buttonStatus
=
buttonStatus
;
return
data
;
}
\ No newline at end of file
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录