fangyuan
2022-12-16 9ff66017debadfc89bc0c1b796684a4d1dbe2bc3
src/views/operate/message/mycontrol/index.vue
@@ -4,7 +4,7 @@
            <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"
@@ -69,7 +69,6 @@
            tableData: [],
            dialogCreate: false,
            dialogEdit:false,
            totalNum: null,
            pageSize: 10,
            currentPage: 1,
            all: false,
@@ -110,7 +109,6 @@
        },
        // 删除数据
        handleDelete(idArr) {
            console.log(idArr);
            this.$confirm('是否确定确定删除栏目?')
                .then(_ => {
                    this.$axios({
@@ -128,18 +126,15 @@
                        })
                })
                .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 => {
@@ -160,18 +155,15 @@
                        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) {
@@ -211,10 +203,9 @@
                                    message: res.message
                                })
                            }
                            console.log(res);
                        })
                })
                .catch(err => { console.log(err) })
                .catch(err => {  })
        },
        // 表格状态监听
        tableChange(list) {
@@ -273,7 +264,6 @@
                    done();
                })
                .catch(err => {
                    console.log(err);
                })
        },
        // 自定义关闭弹窗