rk
2026-04-28 a59ff44b2eaa7020f0529632d9ec064c4dc38e27
admin/src/views/business/bannerList.vue
@@ -31,6 +31,7 @@
              v-if="row.imgurlFull"
              style="width: 80px; height: 40px"
              :src="row.imgurlFull"
              :preview-src-list="[row.imgurlFull]"
              fit="contain"
            ></el-image>
            <span v-else>-</span>
@@ -57,8 +58,8 @@
        <el-table-column prop="updateTime" label="修改时间" min-width="160px"></el-table-column>
        <el-table-column label="操作" min-width="150" fixed="right">
          <template slot-scope="{row}">
            <el-button type="text" @click="handleEdit(row)">编辑</el-button>
            <el-button type="text" @click="deleteById(row.id)">删除</el-button>
            <el-button type="text" @click="$refs.operaBannerEditWindow.open('编辑轮播图', row,searchForm.type)" >编辑</el-button>
            <el-button type="text" style="color: red;" @click="deleteById(row)">删除</el-button>
          </template>
        </el-table-column>
      </el-table>
@@ -68,7 +69,7 @@
        :pagination="tableData.pagination"
      ></pagination>
    </template>
    <OperaBannerEditWindow ref="operaBannerEditWindow" @success="search" />
    <OperaBannerEditWindow ref="operaBannerEditWindow" @success="handlePageChange" />
  </TableLayout>
</template>
@@ -77,8 +78,6 @@
import TableLayout from '@/layouts/TableLayout'
import Pagination from '@/components/common/Pagination'
import OperaBannerEditWindow from '@/components/business/OperaBannerEditWindow'
import { updateById, deleteById } from '@/api/business/banner'
export default {
  name: 'BannerList',
  extends: BaseTable,
@@ -86,13 +85,13 @@
  data () {
    return {
      positionOptions: {
        0: '首页',
        1: '店铺首页'
        0: '会员端首页轮播',
        1: '司机APP引导页'
      },
      jumpTypeOptions: {
        0: '无',
        1: '会员端首页轮播',
        2: '司机APP引导页'
        1: '富文本',
        2: '外链'
      },
      searchForm: {
        title: ''
@@ -107,26 +106,8 @@
    this.search()
  },
  methods: {
    loadTableData (resolve) {
      this.isWorking.search = true
      list(this.getTableParams())
        .then(data => {
          this.tableData.list = data.list || []
          this.tableData.pagination.total = data.total || 0
          if (resolve) resolve(data)
        })
        .catch(e => {
          this.$tip.apiFailed(e, '加载失败')
        })
        .finally(() => {
          this.isWorking.search = false
        })
    },
    handleEdit (row) {
      this.$refs.operaBannerEditWindow.open('编辑轮播图', row)
    },
    handleStatusChange (val, row) {
      updateStatus({ id: row.id, status: val }).then(res => {
      this.api.updateStatus({ id: row.id, status: val }).then(res => {
        this.$tip.apiSuccess(res || '修改成功')
      }).catch(e => {
        row.status = val === 1 ? 0 : 1