| | |
| | | <div class="mainContent"> |
| | | <div class="main-nav"> |
| | | <span>数据列表</span> |
| | | <el-button type="primary" icon="el-icon-plus" @click="dialogCreate = true">添加</el-button> |
| | | <el-button class="button-addition" type="primary" icon="el-icon-plus" @click="dialogCreate = true">添加</el-button> |
| | | </div> |
| | | <!-- 数据展示 --> |
| | | <el-table ref="multipleTable" |
| | | :header-cell-style="{background:'#06122c','font-size':'12px',color:'#4b9bb7','font-weight':'650','line-height':'45px'}" |
| | | :header-cell-style="{background:'white','font-weight':'650','line-height':'45px'}" |
| | | :data="tableData" style="width: 100%" :row-class-name="tableRowClassName" |
| | | @selection-change="tableChange"> |
| | | <el-table-column type="selection" min-width="5"> |
| | |
| | | tableData: [], |
| | | dialogCreate: false, |
| | | dialogEdit:false, |
| | | totalNum: null, |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | all: false, |
| | |
| | | }, |
| | | // 删除数据 |
| | | handleDelete(idArr) { |
| | | console.log(idArr); |
| | | this.$confirm('是否确定确定删除栏目?') |
| | | .then(_ => { |
| | | this.$axios({ |
| | |
| | | }) |
| | | }) |
| | | .catch(err=>{ |
| | | console.log(err); |
| | | }) |
| | | }, |
| | | // 修改栏目状态 |
| | | handleChangeStatus({ id, status }) { |
| | | console.log(id, status); |
| | | status === true ? status = 1 : status = 0; |
| | | handleChangeStatus({ id, isShow }) { |
| | | this.$axios({ |
| | | method: 'post', |
| | | url: `sccg/message_column/update/${id}`, |
| | | data: { |
| | | isShow: status, |
| | | isShow: Number(isShow), |
| | | } |
| | | }) |
| | | .then(res => { |
| | |
| | | item.isShow === 1 ? item.isShow = true : item.isShow = false; |
| | | }) |
| | | arr = res.data |
| | | // console.log(res); |
| | | }) |
| | | return arr; |
| | | }, |
| | | // 设置表格数据 |
| | | async setTableData() { |
| | | this.tableData = await this.getColumnList(); |
| | | this.totalNum = this.tableData.length; |
| | | }, |
| | | // 下拉框监听 |
| | | async selectChange(list) { |
| | | console.log(this.tempList); |
| | | if (this.tempList.length !== 0) { |
| | | this.preMyIdx = list; |
| | | if (list === 3) { |
| | |
| | | message: res.message |
| | | }) |
| | | } |
| | | console.log(res); |
| | | }) |
| | | }) |
| | | .catch(err => { console.log(err) }) |
| | | .catch(err => { }) |
| | | }, |
| | | // 表格状态监听 |
| | | tableChange(list) { |
| | |
| | | done(); |
| | | }) |
| | | .catch(err => { |
| | | console.log(err); |
| | | }) |
| | | }, |
| | | // 自定义关闭弹窗 |
| | |
| | | .userList { |
| | | text-align: left; |
| | | margin: 10px 20px; |
| | | color: #4b9bb7; |
| | | color: #606266; |
| | | |
| | | main { |
| | | background-color: #09152f; |
| | | background-color: white; |
| | | margin-top: 20px; |
| | | padding-bottom: 50px; |
| | | border: 1pox solid #fff; |
| | | border: 1px solid #fff; |
| | | |
| | | .mainTitle { |
| | | line-height: 60px; |
| | |
| | | |
| | | &::v-deep .el-input__inner { |
| | | border: none; |
| | | background-color: #09152f; |
| | | //background-color: #09152f; |
| | | } |
| | | |
| | | &:hover { |
| | |
| | | line-height: 50px; |
| | | justify-content: center; |
| | | |
| | | .el-pagination { |
| | | |
| | | &::v-deep li, |
| | | &::v-deep .btn-prev, |
| | | &::v-deep .btn-next { |
| | | background-color: #071f39; |
| | | color: #4b9bb7; |
| | | } |
| | | |
| | | &::v-deep .active { |
| | | background-color: #409eff; |
| | | color: #fff; |
| | | } |
| | | } |
| | | //.el-pagination { |
| | | // |
| | | // &::v-deep li, |
| | | // &::v-deep .btn-prev, |
| | | // &::v-deep .btn-next { |
| | | // background-color: #071f39; |
| | | // color: #4b9bb7; |
| | | // } |
| | | // |
| | | // &::v-deep .active { |
| | | // background-color: #409eff; |
| | | // color: #fff; |
| | | // } |
| | | //} |
| | | } |
| | | } |
| | | |
| | | .el-table { |
| | | color: #4b9bb7; |
| | | font-size: 10px; |
| | | // color: #606266; |
| | | // font-size: 10px; |
| | | |
| | | &::v-deep .el-table__empty-block { |
| | | background-color: #09152f; |
| | | //background-color: #09152f; |
| | | } |
| | | |
| | | &::v-deep .el-table__empty-block { |
| | |
| | | } |
| | | } |
| | | |
| | | .el-table::v-deep .warning-row { |
| | | background: #06122c; |
| | | } |
| | | |
| | | .el-table::v-deep .success-row { |
| | | background: #071f39; |
| | | } |
| | | //.el-table::v-deep .warning-row { |
| | | // background: #06122c; |
| | | //} |
| | | // |
| | | //.el-table::v-deep .success-row { |
| | | // background: #071f39; |
| | | //} |
| | | |
| | | &::v-deep .switchStyle .el-switch__label { |
| | | position: absolute; |
| | |
| | | } |
| | | } |
| | | |
| | | &::v-deep .el-dialog__header, |
| | | &::v-deep .el-dialog__body { |
| | | background-color: #06122c; |
| | | } |
| | | //&::v-deep .el-dialog__header, |
| | | //&::v-deep .el-dialog__body { |
| | | // background-color: #06122c; |
| | | //} |
| | | |
| | | &::v-deep .el-dialog__header { |
| | | display: flex; |
| | |
| | | } |
| | | |
| | | &::v-deep .el-dialog__title { |
| | | color: #4b9bb7; |
| | | color: #606266; |
| | | } |
| | | |
| | | &::v-deep .el-dialog__close { |
| | |
| | | padding: 0; |
| | | } |
| | | } |
| | | </style> |
| | | </style> |