提交 48da751f 编写于 作者: zhentian.jia's avatar zhentian.jia

添加项目管理中的操作状态

上级 f11396c3
......@@ -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();
......
......@@ -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 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册