From 3250e7729c2660a1f8951d35d1163b702efd9b4f Mon Sep 17 00:00:00 2001
From: wl <173@qq.com>
Date: 星期三, 04 一月 2023 14:01:28 +0800
Subject: [PATCH] fix:消息保存消息发送
---
src/views/layout/components/Header/index.vue | 28 +++++++++++++++-------------
1 files changed, 15 insertions(+), 13 deletions(-)
diff --git a/src/views/layout/components/Header/index.vue b/src/views/layout/components/Header/index.vue
index 53c8a62..8426f6d 100644
--- a/src/views/layout/components/Header/index.vue
+++ b/src/views/layout/components/Header/index.vue
@@ -66,23 +66,23 @@
<el-table-column prop="columnName" label="鍏ㄩ儴" min-width="5" align="center">
<!-- <template slot-scope="scope">{{ scope.row.id }}</template> -->
</el-table-column>
- <el-table-column prop="isReceive" label="鍚敤" min-width="5">
+ <el-table-column label="鍚敤" min-width="5">
<template slot-scope="scope">
<!-- @change="handleChangeStatus(scope.row)" -->
<el-switch class="switchStyle"
v-model="scope.row.isReceive"
active-color="#3fef9a"
inactive-color="#000212"
- active-value="1"
- inactive-value="0">
- </el-switch>
- {{ scope.row.isReceive}}
+ :active-value="1"
+ :inactive-value="0"
+ @change="handleSelectionChange(scope.row)">
+ </el-switch>
</template>
</el-table-column>
</el-table>
- <el-button type="button" @click="channelSetting">鍙栨秷</el-button>
+ <el-button type="button" @click="cancelChannel">鍙栨秷</el-button>
</el-dialog>
<el-dialog :visible.sync="updatePasswordDialog" width="40%" title="淇敼瀵嗙爜" v-if="updatePasswordDialog"
@@ -170,19 +170,21 @@
this.setLoginInfo();
},
methods: {
+ cancelChannel(){
+ this.channelSettingVisible=false
+ },
handleSelectionChange(val) {
const userInfo = JSON.parse(sessionStorage.getItem('user'));
- console.log(val[0])
this.messageColumnSet.userId = userInfo.user.id
- this.messageColumnSet.messageColumnId = val[0].id
- if (val[0].isReceive == null) {
+ this.messageColumnSet.messageColumnId = val.id
+ if (val.isReceive == null) {
this.messageColumnSet.isReceive = 1
}
- if (val[0].isReceive == 1) {
+ if (val.isReceive == 1) {
+ this.messageColumnSet.isReceive = 1
+ }
+ else if (val.isReceive == 0) {
this.messageColumnSet.isReceive = 0
- }
- if (val[0].isReceive == 0) {
- this.messageColumnSet.isReceive = 1
}
this.$axios({
method: 'post',
--
Gitblit v1.8.0