From 28db820caf0ed90f4326d29cb0fa7a19cba92775 Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期五, 27 二月 2026 16:33:03 +0800
Subject: [PATCH] 经销商管理
---
admin/src/views/business/banner.vue | 59 +++++++++++++++++++++++++++++++++++++++++++----------------
1 files changed, 43 insertions(+), 16 deletions(-)
diff --git a/admin/src/views/business/banner.vue b/admin/src/views/business/banner.vue
index 6e53154..bf0c8c8 100644
--- a/admin/src/views/business/banner.vue
+++ b/admin/src/views/business/banner.vue
@@ -55,7 +55,18 @@
<el-image :src="row.imgFullUrl" :preview-src-list="[row.imgFullUrl]"></el-image>
</template>
</el-table-column>
- <el-table-column prop="cityName" label="灞曠ず鍩庡競" align="center" min-width="100px"></el-table-column>
+ <el-table-column prop="status" label="鐘舵��" align="center" min-width="100px">
+ <template slot-scope="{row}">
+ <el-switch
+ v-model="row.status"
+ active-color="#13ce66"
+ inactive-color="#999"
+ :active-value="0"
+ :inactive-value="1"
+ @change="statusChange(row)"
+ ></el-switch>
+ </template>
+ </el-table-column>
<el-table-column prop="type" label="璺宠浆鍔熻兘" align="center" min-width="100px">
<template slot-scope="{row}">
{{ typeToStr(row.type) }}
@@ -64,9 +75,10 @@
<el-table-column prop="content" label="鍐呭" align="center" min-width="100px">
<template slot-scope="{row}">
<el-button v-if="row.type==0" type="text" @click="$refs.showRich.open('璇︽儏',row)">鏌ョ湅璇︽儏</el-button>
- <template v-else>
+ <el-button v-if="row.type==1 && row.content" type="text" @click="goLink(row)" :title="row.content">璺宠浆澶栭摼</el-button>
+<!-- <template v-else>
{{ row.content }}
- </template>
+ </template>-->
</template>
</el-table-column>
<el-table-column prop="sortnum" label="鎺掑簭鐮�" align="center" min-width="100px"></el-table-column>
@@ -113,27 +125,27 @@
// 鎼滅储
searchForm: {
position: '',
- type: '',
+ type: ''
},
postions: [
// 0棣栭〉 1鎺ㄨ崘搴楅摵 2鍟嗗煄棣栭〉
{ label: '棣栭〉', id: 0 },
{ label: '鎺ㄨ崘搴楅摵', id: 1 },
- { label: '鍟嗗煄棣栭〉', id: 2 },
+ { label: '鍟嗗煄棣栭〉', id: 2 }
],
types: [
// 0瀵屾枃鏈� 1澶栭摼 2娲诲姩 3鍟嗗
{ label: '瀵屾枃鏈�', id: 0 },
- { label: '澶栭摼', id: 1 },
- { label: '娲诲姩', id: 2 },
- { label: '鍟嗗', id: 3 },
+ { label: '澶栭摼', id: 1 }
+ /* { label: '娲诲姩', id: 2 },
+ { label: '鍟嗗', id: 3 }, */
]
}
},
- provide() {
+ provide () {
return {
postions: () => this.postions,
- types: () => this.types,
+ types: () => this.types
}
},
created () {
@@ -146,15 +158,30 @@
this.search()
},
methods: {
- postionToStr(postion) {
+ statusChange (row) {
+ this.api.updateStatus(row)
+ .then(() => {
+ this.$tip.success('鎿嶄綔鎴愬姛')
+ })
+ .catch(e => {
+ this.$tip.error(e)
+ })
+ .finally(() => {
+ this.handlePageChange()
+ })
+ },
+ goLink(row){
+ window.open(row.content)
+ },
+ postionToStr (postion) {
// console.log(postion);
- let temp = this.postions.find(item => item.id == postion)
+ const temp = this.postions.find(item => item.id == postion)
return temp ? temp.label : '-'
},
- typeToStr(type) {
- let temp = this.types.find(item => item.id == type)
+ typeToStr (type) {
+ const temp = this.types.find(item => item.id == type)
return temp ? temp.label : '-'
- },
- },
+ }
+ }
}
</script>
--
Gitblit v1.9.3