| | |
| | | <el-dialog :visible.sync="channelSettingVisible" width="25%" title="消息栏目设置" v-if="channelSettingVisible" |
| | | :before-close="handleChannelClose"> |
| | | <el-table |
| | | ref="multipleTable" |
| | | ref="multipleTable" |
| | | :header-cell-style="{ |
| | | 'font-size': '14px', |
| | | 'font-weight': '650', |
| | |
| | | }" |
| | | :data="channelData" |
| | | style="width: 100%" |
| | | |
| | | @selection-change="handleSelectionChange" |
| | | > <el-table-column |
| | | type="selection" |
| | | width="55" |
| | |
| | | <!-- <template slot-scope="scope">{{ scope.row.id }}</template> --> |
| | | </el-table-column> |
| | | </el-table> |
| | | <el-button type="button" @click="channelSetting">更新</el-button> |
| | | |
| | | <el-button type="button" @click="channelSetting">取消</el-button> |
| | | </el-dialog> |
| | | <el-dialog :visible.sync="updatePasswordDialog" width="40%" title="修改密码" v-if="updatePasswordDialog" |
| | |
| | | <script> |
| | | import updatePassword from "./updatePassword"; |
| | | import users from "@/api/users"; |
| | | import { Message } from "element-ui"; |
| | | |
| | | export default { |
| | | components: { |
| | |
| | | messageCounts: 0, |
| | | keyword: '', |
| | | info: null, |
| | | show: false |
| | | show: false, |
| | | messageColumnSet:{ |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | | this.setLoginInfo(); |
| | | }, |
| | | methods: { |
| | | 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.isReceive=1 |
| | | } |
| | | if(val[0].isReceive==1){ |
| | | this.messageColumnSet.isReceive=0 |
| | | } |
| | | if(val[0].isReceive==0){ |
| | | this.messageColumnSet.isReceive=1 |
| | | } |
| | | this.$axios({ |
| | | method: 'post', |
| | | url: 'sccg/message_column_set/update', |
| | | data: this.messageColumnSet |
| | | }).then(res=>{ |
| | | this.$message.success("订阅成功") |
| | | }) |
| | | }, |
| | | baseInfo() { |
| | | this.baseInformationVisible = true; |
| | | const name = sessionStorage.getItem('name'); |
| | |
| | | this.info = res.data.user; |
| | | }) |
| | | }, |
| | | channelSetting(){ |
| | | channelSetting(row){ |
| | | this.channelSettingVisible=true; |
| | | const userInfo = JSON.parse(sessionStorage.getItem('user')); |
| | | this.$axios({ |
| | |
| | | }) |
| | | .then(res => { |
| | | this.channelData=res.data |
| | | // this.channelData.forEach(item=>{this.$refs.multipleTable.toggleRowSelection(item,true);console.log(this.$refs.multipleTable.toggleRowSelection(item,true))}) |
| | | }) |
| | | }, |
| | | handleChannelClose(done) { |