From 7c0b59a30b7b3e46f90d9726999b3a007f9fc666 Mon Sep 17 00:00:00 2001
From: odc.xiaohui <xiaohui@Q1>
Date: 星期一, 09 一月 2023 18:05:47 +0800
Subject: [PATCH] Merge branch 'dev1.0' of http://42.193.1.25:9521/r/sccg_ui into dev1.0

---
 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