From e4a06e0730dc0aa6ced97cbb3362d6b8ef473d39 Mon Sep 17 00:00:00 2001 From: jiangping <jp@doumee.com> Date: 星期四, 27 三月 2025 15:56:34 +0800 Subject: [PATCH] 最新版本541200007 --- admin/src/views/system/smsMessage.vue | 60 +++++++++++++++++++++++++++++++++++++++++++++--------------- 1 files changed, 45 insertions(+), 15 deletions(-) diff --git a/admin/src/views/system/smsMessage.vue b/admin/src/views/system/smsMessage.vue index 9b1052e..e9addea 100644 --- a/admin/src/views/system/smsMessage.vue +++ b/admin/src/views/system/smsMessage.vue @@ -1,20 +1,22 @@ <template> <div class="main_app"> - <QueryForm v-model="filters" :query-form-config="queryFormConfig" @handleQuery="getList(1)" - @clear="clear"> + <QueryForm v-model="filters" :query-form-config="queryFormConfig" @handleQuery="getList(1)" @clear="clear"> </QueryForm> - <!-- <div class="pt16"> - <el-button :loading="exLoading" @click="handleEx" - v-permissions="['business:platformjob:exportExcel']">瀵煎嚭</el-button> - </div> --> - <el-table class="mb20" v-loading="loading" :data="list" stripe> + <div class="pt16 mb10"> + <el-button type="primary" @click="batchStatus(0)" v-permissions="['business:platformjob:update']">鎵归噺鍚敤</el-button> + <el-button @click="batchStatus(1)" v-permissions="['business:platformjob:update']">鎵归噺绂佺敤</el-button> + </div> + <el-table :height="tableHeightNew" @selection-change="handleSelectionChange" class="mb40" v-loading="loading" :data="list" stripe> + <el-table-column align="center" type="selection" width="55"> + </el-table-column> <el-table-column prop="name" label="娑堟伅鏍囬" min-width="160" show-overflow-tooltip /> <el-table-column prop="code" label="娑堟伅缂栫爜" min-width="150" show-overflow-tooltip /> <el-table-column prop="content" label="娑堟伅妯℃澘" min-width="300" show-overflow-tooltip /> <el-table-column label="鐘舵��" width="120" align="center" fixed="right"> <template v-slot="scope"> - <el-switch v-model="scope.row.status" @change="changeStatus(scope.row)" :active-value="0" :inactive-value="1"> - </el-switch> + <el-switch v-permissions="['business:platformjob:update']" v-model="scope.row.status" + @change="changeStatus(scope.row)" :active-value="0" :inactive-value="1"> + </el-switch> </template> </el-table-column> </el-table> @@ -25,12 +27,14 @@ <script> import Pagination from '@/components/common/Pagination' import QueryForm from '@/components/common/QueryForm' -import { getSmsList, SmsStatusUpdate } from '@/api/system/sms' +import { getSmsList, SmsStatusUpdate, SmsStatussUpdate } from '@/api/system/sms' import GlobalWindow from '@/components/common/GlobalWindow' import { Message } from 'element-ui' +import BaseComputHeight from '@/components/base/BaseComputHeight' import dayjs from 'dayjs' export default { + extends: BaseComputHeight, components: { Pagination, QueryForm, @@ -38,6 +42,7 @@ }, data() { return { + ids: [], isShowDetail: false, exLoading: false, loading: false, @@ -78,8 +83,32 @@ this.getList() }, methods: { + handleSelectionChange(val) { + this.ids = val.map(i => i.id) + console.log('ids', this.ids) + }, + batchStatus(status) { + const { ids } = this + if (ids.length == 0) return Message.error('璇峰厛閫夋嫨瑕佹洿鏀圭殑鐭俊閫氱煡') + this.$confirm(`纭畾${status == 0 ? '鍚敤' : '绂佺敤'}閫変腑鐨勬墍鏈夌煭淇¢�氱煡鍚�?`, '鎻愮ず', { + confirmButtonText: '纭畾', + cancelButtonText: '鍙栨秷', + type: 'warning' + }).then(() => { + SmsStatussUpdate({ + ids: ids.join(','), + status + }).then(res => { + Message.success('鎵归噺鏇存柊鎴愬姛') + this.getList() + }, () => { + this.getList() + }) + }) + + }, changeStatus(row) { - console.log('row', row); + console.log('row', row) SmsStatusUpdate({ ...row }).then(res => { @@ -109,15 +138,16 @@ this.loading = false }) }, - - + + clear() { this.pagination.page = 1 this.filters = {} - this.getList() + this.getList(1) }, handleSizeChange(capacity) { this.pagination.pageSize = capacity + this.getList(1) } } } @@ -129,4 +159,4 @@ color: #000000; margin-bottom: 15px; } -</style> \ No newline at end of file +</style> -- Gitblit v1.9.3