From 4eac422e52a4d28fb651b75d0f054697c7a2c0fa Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期一, 09 二月 2026 15:14:13 +0800
Subject: [PATCH] 优化
---
admin/src/views/business/labelsYunFee.vue | 115 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 115 insertions(+), 0 deletions(-)
diff --git a/admin/src/views/business/labelsYunFee.vue b/admin/src/views/business/labelsYunFee.vue
new file mode 100644
index 0000000..5e7d17c
--- /dev/null
+++ b/admin/src/views/business/labelsYunFee.vue
@@ -0,0 +1,115 @@
+<template>
+ <TableLayout :permissions="['business:labels:query']">
+ <!-- 鎼滅储琛ㄥ崟 -->
+ <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline>
+ <el-form-item label="鍚嶇О" prop="name">
+ <el-input v-model="searchForm.name" placeholder="璇疯緭鍏ュ悕绉�" @keypress.enter.native="search"></el-input>
+ </el-form-item>
+ <section>
+ <el-button type="primary" @click="search">鎼滅储</el-button>
+ <el-button @click="reset">閲嶇疆</el-button>
+ </section>
+ </el-form>
+ <!-- 琛ㄦ牸鍜屽垎椤� -->
+ <template v-slot:table-wrap>
+ <ul class="toolbar" v-permissions="['business:labels:create', 'business:labels:delete']">
+ <li><el-button type="primary" @click="$refs.operaLabelsWindow.open('鏂板缓杩愯垂閰嶇疆淇℃伅')" icon="el-icon-plus" v-permissions="['business:labels:create']">鏂板缓</el-button></li>
+ <li><el-button type="danger" @click="deleteByIdInBatch" icon="el-icon-delete" v-permissions="['business:labels:delete']">鍒犻櫎</el-button></li>
+ </ul>
+ <el-table
+ v-loading="isWorking.search"
+ :data="tableData.list"
+ border
+ stripe
+ @selection-change="handleSelectionChange"
+ >
+ <el-table-column type="selection" width="55"></el-table-column>
+ <el-table-column prop="name" label="鍚嶇О" min-width="100px"></el-table-column>
+ <el-table-column prop="areas" label="鍖呭惈鍦板尯" min-width="200px" align="center">
+ <template slot-scope="{row}">
+ <div v-if="row.areaList && row.areaList.length" >
+ <span v-for="item in row.areaList">{{item.name}}锛�</span>
+ </div>
+ </template>
+ </el-table-column>
+ <el-table-column prop="status" label="鐘舵��" min-width="100px">
+ <template slot-scope="{row}">
+ <el-switch
+ v-model="row.status"
+ :active-value="1"
+ :inactive-value="0"
+ active-color="#13ce66"
+ inactive-color="#ff4949"
+ @change="statusChange(row)"
+ ></el-switch>
+ </template>
+ </el-table-column>
+ <el-table-column prop="sortnum" label="鎺掑簭鐮�" min-width="100px"></el-table-column>
+ <el-table-column prop="editDate" label="鏈�杩戞洿鏂版椂闂�" min-width="100px"></el-table-column>
+ <el-table-column
+ v-if="containPermissions(['business:labels:update', 'business:labels:delete'])"
+ label="鎿嶄綔"
+ min-width="120"
+ fixed="right"
+ >
+ <template slot-scope="{row}">
+ <el-button type="text" @click="$refs.operaLabelsWindow.open('缂栬緫杩愯垂淇℃伅', row)" icon="el-icon-edit" v-permissions="['business:labels:update']">缂栬緫</el-button>
+ <el-button type="text" style="color: red" @click="deleteById(row)" icon="el-icon-delete" v-permissions="['business:labels:delete']">鍒犻櫎</el-button>
+ </template>
+ </el-table-column>
+ </el-table>
+ <pagination
+ @size-change="handleSizeChange"
+ @current-change="handlePageChange"
+ :pagination="tableData.pagination"
+ >
+ </pagination>
+ </template>
+ <!-- 鏂板缓/淇敼 -->
+ <OperaLabelsFeeAreaWindow ref="operaLabelsWindow" @success="handlePageChange"/>
+ </TableLayout>
+</template>
+
+<script>
+import BaseTable from '@/components/base/BaseTable'
+import TableLayout from '@/layouts/TableLayout'
+import Pagination from '@/components/common/Pagination'
+import OperaLabelsFeeAreaWindow from '@/components/business/OperaLabelsFeeAreaWindow'
+export default {
+ name: 'Labels',
+ extends: BaseTable,
+ components: { OperaLabelsFeeAreaWindow, TableLayout, Pagination },
+ data () {
+ return {
+ // 鎼滅储
+ searchForm: {
+ name: '',
+ type: 16
+ }
+ }
+ },
+ created () {
+ this.config({
+ module: '鏍囩淇℃伅琛�',
+ api: '/business/labels',
+ 'field.id': 'id',
+ 'field.main': 'id'
+ })
+ this.search()
+ },
+ methods: {
+ statusChange (row) {
+ this.api.updateStatusById({ id: row.id, status: row.status })
+ .then(() => {
+ this.$message.success('鎿嶄綔鎴愬姛')
+ })
+ .catch(e => {
+ this.$message.error('鎿嶄綔鎴愬姛')
+ })
+ .then(() => {
+ this.handlePageChange()
+ })
+ }
+ }
+}
+</script>
--
Gitblit v1.9.3