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