From a0436685d963dd19e0df70d1447ad5efafbfb36e Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期一, 14 四月 2025 17:07:35 +0800
Subject: [PATCH] 代码初始化
---
admin/src/views/business/managersSheNotice.vue | 43 +++++++++++++++++++++++++++++++++++++++----
1 files changed, 39 insertions(+), 4 deletions(-)
diff --git a/admin/src/views/business/managersSheNotice.vue b/admin/src/views/business/managersSheNotice.vue
index 0f8f3a3..44b59bd 100644
--- a/admin/src/views/business/managersSheNotice.vue
+++ b/admin/src/views/business/managersSheNotice.vue
@@ -3,8 +3,8 @@
<!-- 鎼滅储琛ㄥ崟 -->
<div slot="search-form">
<el-form ref="searchForm" :model="searchForm" label-width="100px" inline>
- <el-form-item label="浜哄憳鎼滅储 " prop="memberName">
- <el-input v-model="searchForm.memberName" placeholder="鍙緭鍏ュ鍚�/鎵嬫満鍙�/閮ㄩ棬" @keypress.enter.native="search"></el-input>
+ <el-form-item label="浜哄憳鎼滅储 " prop="keyword">
+ <el-input v-model="searchForm.keyword" placeholder="鍙緭鍏ュ鍚�/鎵嬫満鍙�/閮ㄩ棬" @keypress.enter.native="search"></el-input>
</el-form-item>
<section>
<el-button type="primary" @click="search">鎼滅储</el-button>
@@ -30,8 +30,18 @@
<el-table-column prop="memberPhone" label="浜哄憳鎵嬫満鍙�" min-width="100px"></el-table-column>
<el-table-column prop="memberEmail" label="浜哄憳閭" min-width="100px"></el-table-column>
<el-table-column prop="companyName" label="鎵�灞為儴闂�" min-width="100px"></el-table-column>
+ <el-table-column prop="isQw" label="浼佸井閫氱煡" min-width="80px">
+ <template slot-scope="{row}">
+ <el-switch v-model="row.isQw" :active-value="1" :inactive-value="0" @change="updateInfo(row)"/>
+ </template>
+ </el-table-column>
+ <el-table-column prop="isQw" label="閭欢閫氱煡" min-width="80px">
+ <template slot-scope="{row}">
+ <el-switch v-model="row.isEmail" :active-value="1" :inactive-value="0" @change="updateEmailInfo(row)"/>
+ </template>
+ </el-table-column>
<el-table-column prop="editorName" label="鎿嶄綔浜�" min-width="100px"></el-table-column>
- <el-table-column prop="editDate" label="鏇存柊鏃堕棿" min-width="100px"></el-table-column>
+ <el-table-column prop="editDate" label="鏇存柊鏃堕棿" min-width="150px"></el-table-column>
<el-table-column prop="remark" label="澶囨敞" min-width="100px"></el-table-column>
<el-table-column
v-if="containPermissions(['business:managers:update', 'business:managers:delete'])"
@@ -71,8 +81,9 @@
data () {
return {
// 鎼滅储
+ updating: false,
searchForm: {
- memberName: '',
+ keyword: '',
type: 3
}
}
@@ -85,6 +96,30 @@
'field.main': 'id'
})
this.search()
+ },
+ methods: {
+ updateInfo (row) {
+ const newValue = row.isQw
+ row.isQw = !row.isQw
+ // 寮�鍚�
+ this.api.updateById({ id: row.id, isQw: newValue }).then(() => {
+ this.$tip.success('璁剧疆鎴愬姛锛�')
+ this.search()
+ }).final(() => {
+ this.updating = false
+ })
+ },
+ updateEmailInfo (row) {
+ const newValue = row.isEmail
+ row.isEmail = !row.isEmail
+ // 寮�鍚�
+ this.api.updateById({ id: row.id, isEmail: newValue }).then(() => {
+ this.$tip.success('璁剧疆鎴愬姛锛�')
+ this.search()
+ }).finally(() => {
+ this.updating = false
+ })
+ }
}
}
</script>
--
Gitblit v1.9.3