luobisheng
2022-11-29 4641a877cd6a94e4d35dca7f7f14bc1443e2d2ad
src/views/operate/sms/smsTemplate/index.vue
@@ -3,7 +3,6 @@
        <header>
            <div class="header-nav">
                <span class="nav-left">数据筛选</span>
                <span class="nav-right">高级搜索</span>
            </div>
            <div class="header-content">
                <div class="search">
@@ -27,7 +26,7 @@
            <div class="mainContent">
                <div class="main-nav">
                    <span>数据列表</span>
                    <el-button type="primary" icon="el-icon-plus" @click="isShowDialog = true; dialogType = 'created'">添加</el-button>
                    <el-button class="button-addition" type="primary" icon="el-icon-plus" @click="isShowDialog = true; dialogType = 'create'">添加</el-button>
                </div>
                <!-- 数据展示 -->
                <el-table ref="multipleTable"
@@ -54,7 +53,7 @@
                    <el-table-column prop="operation" label="操作" min-width="15">
                        <template slot-scope="scope">
                            <div class="operation">
                                <el-link icon="el-icon-view" :underline="false" @click="handleView(scope.row)">查看</el-link>
                                <el-link icon="el-icon-view" :underline="false" @click="handleView(scope.row, 'view')">查看</el-link>
                                <el-link icon="el-icon-edit" class="leftPx" :underline="false" @click="handleEdit(scope.row)">编辑</el-link>
                                <el-link class="leftPx" icon="el-icon-delete-solid" :underline="false"
                                    @click="handleDelete([scope.row.id])">删除</el-link>
@@ -63,9 +62,10 @@
                    </el-table-column>
                </el-table>
                <!-- 新建消息 -->
                <el-dialog title="新建短信模板" :visible.sync="isShowDialog" v-if="isShowDialog" width="80%"
                <el-dialog :title="dialogType === 'view' ? '查看短信模板' : '更新短信模板'" :visible.sync="isShowDialog" width="80%"
                    :before-close="handleConfirmClose">
                    <MyCreate @closeMyDialog="handleConfirmClose" :dialogType="dialogType" :tableRowData="messageTemplateData"></MyCreate>
                    <MyCreate v-if="isShowDialog" @closeMyDialog="handleConfirmClose" @closeDialog="closeDialog"
                              :dialogType="dialogType" :tableRowData="messageTemplateData"></MyCreate>
                </el-dialog>
                <div class="tools">
                    <div class="funs">
@@ -182,6 +182,9 @@
        },
        // 重置
        handleReset(){
            this.context="";
            this.messageStatus=0;
            this.getMessageList();
        },
        // 查看
        handleView(data){
@@ -211,7 +214,7 @@
        },
        // 获取消息数据
        getMessageList() {
            SMS.getSMSTemplateList({ current: this.currentPage, pageSize: this.pageSize, context: this.context, type: this.messageType })
            SMS.getSMSTemplateList({ current: this.currentPage, pageSize: this.pageSize, title: this.context, type: this.messageStatus })
                .then(({ records, total }) => {
                  this.tableData = records;
                  this.totalNum = total;
@@ -263,7 +266,7 @@
                            }
                        })
                })
                .catch(err => { console.log(err) })
                .catch(err => {  })
        },
        // 表格监听
        tableChange(list) {
@@ -306,7 +309,10 @@
                .then(() => {
                    done();
                })
        }
        },
      closeDialog() {
          this.isShowDialog = false;
      }
    }
}
</script>
@@ -548,7 +554,6 @@
    &::v-deep .el-dialog__close {
        width: 20px;
        height: 20px;
        // color: #fff;
    }
    &::v-deep .el-dialog__body {