Commit 6806b00d authored by 徐一鸣's avatar 徐一鸣

服务管理up

parent 95488142
...@@ -265,7 +265,7 @@ export default { ...@@ -265,7 +265,7 @@ export default {
label: "删除", label: "删除",
callback: this.deleteItem, callback: this.deleteItem,
disabledRule(item) { disabledRule(item) {
return item.approval_status === 1; return item.service_apply_info.approval_status === 1;
}, },
}, },
], ],
...@@ -931,11 +931,25 @@ export default { ...@@ -931,11 +931,25 @@ export default {
.post(`/apaas/service/v3/service/manager/send/downnotice`, { .post(`/apaas/service/v3/service/manager/send/downnotice`, {
id: item.id, id: item.id,
}) })
.then((response) => { .then(({ data }) => {
console.log("已申请下架" + item.name); if (data.success) {
this.$message({
message: data.errMsg,
type: "success",
});
} else {
this.$message({
message: data.errMsg,
type: "warn",
});
}
}) })
.catch((error) => { .catch((error) => {
console.log(error); console.log(error);
this.$message({
message: "申请${item.name}失败",
type: "warn",
});
}); });
}; };
this.showDialog(); this.showDialog();
...@@ -951,10 +965,24 @@ export default { ...@@ -951,10 +965,24 @@ export default {
id: item.id, id: item.id,
}) })
.then((response) => { .then((response) => {
console.log("已申请上架" + item.name); if (data.success) {
this.$message({
message: data.errMsg,
type: "success",
});
} else {
this.$message({
message: data.errMsg,
type: "warn",
});
}
}) })
.catch((error) => { .catch((error) => {
console.log(error); console.log(error);
this.$message({
message: "申请${item.name}失败",
type: "warn",
});
}); });
}; };
this.showDialog(); this.showDialog();
...@@ -968,15 +996,28 @@ export default { ...@@ -968,15 +996,28 @@ export default {
this.$http this.$http
.delete(this.deleteUrl, { .delete(this.deleteUrl, {
params: { params: {
id: item.id, id: this.type == 1 ? item.service_apply_info.id : item.id,
}, },
}) })
.then((response) => { .then(({ data }) => {
this.initDatas(this.tempFliter); if (data.success) {
console.log("已删除" + item.name); this.$message({
message: data.errMsg,
type: "success",
});
this.initDatas(this.tempFliter);
} else {
this.$message({
message: data.errMsg,
type: "warn",
});
}
}) })
.catch((error) => { .catch((error) => {
console.log(error); this.$message({
message: `删除${item.name}失败.`,
type: "warn",
});
}); });
}; };
this.showDialog(); this.showDialog();
...@@ -986,7 +1027,7 @@ export default { ...@@ -986,7 +1027,7 @@ export default {
}, },
approvalItem(item) { approvalItem(item) {
this.$router.push( this.$router.push(
`/fwgl/${this.level}/${this.type}/approvalserviceedit/${item.id}` `/fwgl/${this.level}/${this.type}/approvalserviceedit/${item.service_apply_info.id}`
); );
}, },
allotItem(item) { allotItem(item) {
...@@ -1003,12 +1044,25 @@ export default { ...@@ -1003,12 +1044,25 @@ export default {
.post(`/apaas/service/v3/service/manager/down`, { .post(`/apaas/service/v3/service/manager/down`, {
id: item.id, id: item.id,
}) })
.then((response) => { .then(({ data }) => {
this.initDatas(this.tempFliter); if (data.success) {
console.log("已下架" + item.name); this.$message({
message: data.errMsg,
type: "success",
});
this.initDatas(this.tempFliter);
} else {
this.$message({
message: data.errMsg,
type: "warn",
});
}
}) })
.catch((error) => { .catch((error) => {
console.log(error); this.$message({
message: `下架${item.name}失败.`,
type: "warn",
});
}); });
}; };
this.showDialog(); this.showDialog();
...@@ -1023,12 +1077,25 @@ export default { ...@@ -1023,12 +1077,25 @@ export default {
.post(`/apaas/service/v3/service/manager/up`, { .post(`/apaas/service/v3/service/manager/up`, {
id: item.id, id: item.id,
}) })
.then((response) => { .then(({ data }) => {
this.initDatas(this.tempFliter); if (data.success) {
console.log("已下架" + item.name); this.$message({
message: data.errMsg,
type: "success",
});
this.initDatas(this.tempFliter);
} else {
this.$message({
message: data.errMsg,
type: "warn",
});
}
}) })
.catch((error) => { .catch((error) => {
console.log(error); this.$message({
message: `上架${item.name}失败.`,
type: "warn",
});
}); });
}; };
this.showDialog(); this.showDialog();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment