| | |
| | | </el-table-column> |
| | | <el-table-column prop="channelCode" label="消息分类" min-width="10"> |
| | | <template slot-scope="scope"> |
| | | <span>{{scope.row.channelCode === '01' ? '站内信':scope.row.channelCode ==='02'?"邮件":'短信'}}</span> |
| | | <span>{{scope.row.channelCode === '01' ? '站内信':scope.row.channelCode |
| | | ==='02'?"邮件":'短信'}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="status" label="发布状态" min-width="5"> |
| | |
| | | <div class="operation"> |
| | | <el-link icon="el-icon-view" :underline="false" @click="dialogView = true">查看</el-link> |
| | | <el-link icon="el-icon-edit" class="leftPx" :underline="false">编辑</el-link> |
| | | <el-link class="leftPx" icon="el-icon-delete-solid" :underline="false" @click="handleDelete([scope.row.id])">删除</el-link> |
| | | <el-link class="leftPx" icon="el-icon-delete-solid" :underline="false" |
| | | @click="handleDelete([scope.row.id])">删除</el-link> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | <!-- 新建消息 --> |
| | | <el-dialog title="新建消息" :visible.sync="dialogCreate" v-if="dialogCreate" width="80%" |
| | | :before-close="handleConfirmClose"> |
| | | <MyCreate></MyCreate> |
| | | <MyCreate @closeMyDialog="closeDialog"></MyCreate> |
| | | </el-dialog> |
| | | <!-- 消息详情 --> |
| | | <el-dialog title="消息详情" :visible.sync="dialogView" v-if="dialogView" width="45%" |
| | |
| | | <!-- tools --> |
| | | <div class="tools"> |
| | | <div class="funs"> |
| | | <div class="funsItem"> |
| | | <div class="funsItem funs-sp"> |
| | | <el-checkbox v-model="all" @change="selectAll()">全选</el-checkbox> |
| | | </div> |
| | | <div class="funsItem"> |
| | | <div class="funsItem funs-sp"> |
| | | <el-checkbox v-model="unsame" @change="disSame(tableData)">反选</el-checkbox> |
| | | </div> |
| | | <div class="funsItem"> |
| | |
| | | import MyCreate from './createUser' |
| | | export default { |
| | | components: { |
| | | MyView,MyCreate |
| | | MyView, MyCreate |
| | | }, |
| | | data() { |
| | | return { |
| | | tableData: [], |
| | | context: "", |
| | | dialogCreate:false, |
| | | dialogView:false, |
| | | dialogCreate: false, |
| | | dialogView: false, |
| | | totalNum: null, |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | |
| | | this.setTableData(); |
| | | }, |
| | | methods: { |
| | | handleDelete(idarr){ |
| | | handleDelete(idarr) { |
| | | this.$axios({ |
| | | method:'post', |
| | | url:'sccg/message/delete?ids='+idarr, |
| | | method: 'post', |
| | | url: 'sccg/message/delete?ids=' + idarr, |
| | | }) |
| | | .then(res=>{ |
| | | if(res.code===200){ |
| | | this.$message({ |
| | | type:'success', |
| | | message:'删除成功', |
| | | }) |
| | | this.setTableData(); |
| | | }else{ |
| | | this.$message({ |
| | | type:'error', |
| | | message:res.message |
| | | }) |
| | | } |
| | | }) |
| | | .then(res => { |
| | | if (res.code === 200) { |
| | | this.$message({ |
| | | type: 'success', |
| | | message: '删除成功', |
| | | }) |
| | | this.setTableData(); |
| | | } else { |
| | | this.$message({ |
| | | type: 'error', |
| | | message: res.message |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | // 设置表格数据 |
| | | async setTableData() { |
| | |
| | | // 获取消息数据 |
| | | async getMessageList() { |
| | | let arr = []; |
| | | const {currentPage,pageSize} = this; |
| | | const { currentPage, pageSize } = this; |
| | | await this.$axios({ |
| | | method: 'post', |
| | | url: 'sccg/message/list', |
| | |
| | | this.search(); |
| | | }, |
| | | // 关闭弹窗 |
| | | handleClose(done){ |
| | | handleClose(done) { |
| | | done(); |
| | | }, |
| | | // 确认关闭弹窗 |
| | | handleConfirmClose(done){ |
| | | handleConfirmClose(done) { |
| | | this.$confirm('确认关闭?') |
| | | .then(_=>{ |
| | | done(); |
| | | }) |
| | | .catch(err=>{ |
| | | console.log(err); |
| | | }) |
| | | .then(_ => { |
| | | done(); |
| | | }) |
| | | .catch(err => { |
| | | console.log(err); |
| | | }) |
| | | }, |
| | | // 自定义关闭弹窗 |
| | | closeDialog({flag,index}){ |
| | | closeDialog({ flag, index }) { |
| | | this.dialogCreate = flag; |
| | | this.dialogView = flag; |
| | | if(index ===1 ){ |
| | | if (index === 1) { |
| | | this.setTableData(); |
| | | } |
| | | } |
| | |
| | | margin-top: 20px; |
| | | padding-bottom: 50px; |
| | | border: 1pox solid #fff; |
| | | .el-link{ |
| | | |
| | | .el-link { |
| | | color: #4b9bb7; |
| | | } |
| | | .leftPx{ |
| | | |
| | | .leftPx { |
| | | margin-left: 10px; |
| | | } |
| | | |
| | | .mainTitle { |
| | | line-height: 60px; |
| | | } |
| | |
| | | .funs { |
| | | display: flex; |
| | | |
| | | .funs-sp { |
| | | border: 1px solid #17324c; |
| | | } |
| | | |
| | | .funsItem { |
| | | line-height: 28px; |
| | | display: flex; |
| | | align-items: center; |
| | | border: 1px solid #17324c; |
| | | |
| | | border-radius: 4px; |
| | | font-size: 12px; |
| | | margin-left: 10px; |