优化运营后台状态展示

This commit is contained in:
lifenlong
2021-06-23 00:21:17 +08:00
parent 8e239a5bbf
commit 5b3c89886e
19 changed files with 101 additions and 305 deletions

View File

@@ -131,13 +131,14 @@ export default {
key: "couponType",
width: 120,
render: (h, params) => {
let text = "未知";
let text = "";
if (params.row.couponType === "DISCOUNT") {
text = "打折";
return h("Tag", {props: {color: "blue",},}, "打折");
} else if (params.row.couponType === "PRICE") {
text = "减免现金";
return h("Tag", {props: {color: "geekblue",},}, "减免现金");
}else {
return h("Tag", {props: {color: "purple",},}, "未知");
}
return h("div", [text]);
},
},
{
@@ -184,7 +185,7 @@ export default {
color = "red";
if (params.row.promotionStatus == "NEW") {
text = "未开始";
color = "default";
color = "geekblue";
} else if (params.row.promotionStatus == "START") {
text = "已开始";
color = "green";

View File

@@ -132,19 +132,19 @@ export default {
minWidth: 60,
render: (h, params) => {
let text = "未知",
color = "default";
color = "purple";
if (params.row.promotionStatus == "NEW") {
text = "未开始";
color = "default";
color = "geekblue";
} else if (params.row.promotionStatus == "START") {
text = "已开始";
color = "green";
color = "blue";
} else if (params.row.promotionStatus == "END") {
text = "已结束";
color = "blue";
color = "green";
} else if (params.row.promotionStatus == "CLOSE") {
text = "已关闭";
color = "red";
color = "volcano";
}
return h("div", [
h(

View File

@@ -122,16 +122,16 @@ export default {
color = "";
if (params.row.promotionStatus == "NEW") {
text = "未开始";
color = "default";
color = "geekblue";
} else if (params.row.promotionStatus == "START") {
text = "已开始";
color = "green";
color = "blue";
} else if (params.row.promotionStatus == "END") {
text = "已结束";
color = "blue";
color = "green";
} else if (params.row.promotionStatus == "CLOSE") {
text = "已关闭";
color = "red";
color = "volcano";
}
return h("div", [
h(

View File

@@ -92,7 +92,7 @@
<div>{{ row.startTime }}</div>
<div>{{ row.endTime }}</div>
</template>
<template slot-scope="{ row }" slot="action">
<Button
v-if="row.promotionStatus == 'NEW'"
@@ -213,16 +213,16 @@ export default {
color = "";
if (params.row.promotionStatus == "NEW") {
text = "未开始";
color = "default";
color = "geekblue";
} else if (params.row.promotionStatus == "START") {
text = "已开始";
color = "green";
color = "blue";
} else if (params.row.promotionStatus == "END") {
text = "已结束";
color = "blue";
color = "green";
} else if (params.row.promotionStatus == "CLOSE") {
text = "已关闭";
color = "red";
color = "volcano";
}
return h("div", [h("Tag", { props: { color: color } }, text)]);
},

View File

@@ -145,41 +145,13 @@ export default {
width: 100,
render: (h, params) => {
if (params.row.promotionStatus == "NEW") {
return h("div", [
h("Badge", {
props: {
status: "error",
text: "新建",
},
}),
]);
return h("Tag", {props: {color: "volcano",},},"新建");
} else if (params.row.promotionStatus == "START") {
return h("div", [
h("Badge", {
props: {
status: "success",
text: "开始",
},
}),
]);
return h("Tag", {props: {color: "blue",},},"开始");
} else if (params.row.promotionStatus == "END") {
return h("div", [
h("Badge", {
props: {
status: "error",
text: "结束",
},
}),
]);
return h("Tag", {props: {color: "green",},},"结束");
} else if (params.row.promotionStatus == "CLOSE") {
return h("div", [
h("Badge", {
props: {
status: "error",
text: "废弃",
},
}),
]);
return h("Tag", {props: {color: "volcano",},},"结束");
}
},
},