Commit d33837f3 authored by 徐一鸣's avatar 徐一鸣

Merge branch 'dev' of cloud.wodcloud.com:apaas/apaas-v3-ui into dev

parents 7dd89557 2efd4440
......@@ -106,6 +106,7 @@ export default {
msg: "",
submit: null,
},
useItem:'',
topFilter: {
name: "",
state: "",
......@@ -199,14 +200,14 @@ export default {
},
{
label: "上架",
callback: this.upAction,
callback: this.upActionBtn,
disabledRule(item) {
return item.state == 1 || item.state == 3;
},
},
{
label: "下架",
callback: this.downAction,
callback: this.downActionBtn,
disabledRule(item) {
return item.state == 2 || item.state == 3;
},
......@@ -214,7 +215,7 @@ export default {
{
label: "删除",
class: "warn",
callback: this.deleteAction,
callback: this.deleteActionBtn,
disabledRule(item) {
return item.state == 1;
},
......@@ -292,10 +293,35 @@ export default {
editAction(item) {
this.$router.push("/message/banner_edit?id=" + item.serial_num);
},
upAction(item) {
upActionBtn(item){
this.useItem = item;
this.dialogInfo={
msg: "是否上架到首页banner区域",
submit: this.upAction,
}
this.$refs.dialog.show();
},
deleteActionBtn(item){
this.useItem = item;
this.dialogInfo={
msg: "删除后无法撤销,您确定删除吗",
submit: this.deleteAction,
}
this.$refs.dialog.show();
},
downActionBtn(item){
this.useItem = item;
this.dialogInfo={
msg: "下架后首页banner区域将不再显示",
submit: this.downAction,
}
this.$refs.dialog.show();
},
upAction() {
this.$refs.dialog.hide();
this.$http
.post("/apaas/service/v3/recommend/manage/banners/up", {
serial_num: item.serial_num,
serial_num: this.useItem.serial_num,
})
.then(({ data }) => {
if (data.success == 1) {
......@@ -311,10 +337,11 @@ export default {
this.$message.warning("上架失败");
});
},
downAction(item) {
downAction() {
this.$refs.dialog.hide();
this.$http
.post("/apaas/service/v3/recommend/manage/banners/down", {
serial_num: item.serial_num,
serial_num: this.useItem.serial_num,
})
.then(({ data }) => {
if (data.success == 1) {
......@@ -330,11 +357,11 @@ export default {
this.$message.warning("下架失败");
});
},
deleteAction(item) {
// console.log(`删除${item.name}`);
deleteAction() {
this.$refs.dialog.hide();
this.$http
.post("/apaas/service/v3/recommend/manage/banners/del", [
item.serial_num,
this.useItem.serial_num,
])
.then(({ data }) => {
if (data.success == 1) {
......
......@@ -41,7 +41,7 @@
<table-um
slot="fw_table"
:headers="header_fw_arr"
url="fw_rank_arr"
:datas="fw_data"
:stripe="true"
:paginationShow="true"
@detail="detail"
......@@ -171,7 +171,7 @@
</template>
</nor-card>
<nor-card title="服务设置" flag="true">
<nor-card title="服务设置" flag="true" v-show="is_current_user">
<div class="addimage">多版本回滚</div>
<p class="imagebox">
<span
......@@ -284,6 +284,7 @@ import norCard from "@/components/card";
import waveIcon from "@/components/general/wave_icon";
import Topology from "@/components/topology.vue";
import apassDialog from '@/components/apass-dialog'
import tableUm from '@/components/table/table-um'
import { getRole } from "@/utils/common";
import { mapGetters, mapState } from "vuex";
export default {
......@@ -295,7 +296,8 @@ export default {
norCard,
Topology,
waveIcon,
apassDialog
apassDialog,
tableUm
},
data() {
return {
......@@ -303,6 +305,7 @@ export default {
buy_style: 0,
image_select: 0,
oldpag_name: "镜像文件002.rar",
fw_data:[],
imgList: [],
imgList1: [],
header_data:"",
......@@ -513,6 +516,7 @@ export default {
public_form: false,
now_tag:'',
up_flag:false,
is_current_user:0,
};
},
computed: {
......@@ -862,6 +866,7 @@ export default {
let data = response.data.data;
this.header_data = data
this.public_flag = false
this.is_current_user = data.is_current_user
if(data.is_apply==0&&(data.type==2||data.type==3)){
this.public_flag = true
}
......
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