| | |
| | | } |
| | | export default { |
| | | // 获取短信审核列表 |
| | | getMessageList: (data) => axios({ |
| | | getMessageAuditList: (data) => axios({ |
| | | method: 'post', |
| | | url: baseUrl+'/list', |
| | | headers:{...token}, |
| | |
| | | </el-radio-group> |
| | | </div> |
| | | <div class="btns"> |
| | | <el-button type="primary" icon="el-icon-search">查询</el-button> |
| | | <el-button type="primary" icon="el-icon-search" @click="handleSearch">查询</el-button> |
| | | <el-button icon="el-icon-delete-solid">重置</el-button> |
| | | </div> |
| | | </div> |
| | |
| | | <div class="main-content"> |
| | | <div class="main-title"> |
| | | 数据列表 |
| | | </div> |
| | | </div> |
| | | <!-- 数据展示 --> |
| | | <MyTable :tableOption="tableOption" :tableData="list" :pageShow="false"> |
| | | <MyTable :tableOption="tableOption" :tableData="tableData" :pageShow="false"> |
| | | <template #operation="info"> |
| | | <el-link :underline="false" style="color:#4b9bb7">编辑</el-link> |
| | | </template> |
| | | </MyTable> |
| | | <div class="tools"> |
| | | <div class="funs"> |
| | | <div class="funsItem funs-sp"> |
| | | |
| | | </div> |
| | | <div class="funsItem funs-sp"> |
| | | |
| | | </div> |
| | | <div class="funsItem"> |
| | | </div> |
| | | </div> |
| | | <div class="pagination"> |
| | | <el-pagination background :current-page="currentPage" layout="prev, pager, next" |
| | | :total="totalNum" :page-size="pageSize" @current-change="changeCurrentPage" |
| | | > |
| | | </el-pagination> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </main> |
| | | <footer> |
| | |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import MyTable from '@/components/Table' |
| | | import { myDownLoad } from '@/utils/helper' |
| | | import MyTable from '@/components/Table'; |
| | | import { myDownLoad } from '@/utils/helper'; |
| | | import { createNamespacedHelpers } from "vuex"; |
| | | const { mapActions } = createNamespacedHelpers("shortMessage"); |
| | | export default { |
| | | components: { |
| | | MyTable, |
| | | MyTable |
| | | }, |
| | | data() { |
| | | return { |
| | | context: '', |
| | | tableData: [], |
| | | totalNum: null, |
| | | context: "", |
| | | status:0, |
| | | options: [ |
| | | { |
| | | value: 0, |
| | | label: '离线', |
| | | }, |
| | | { |
| | | value: 1, |
| | | label: '在线', |
| | | } |
| | | ], |
| | | list: [], |
| | | current: 1, |
| | | pageSize: 10, |
| | | total:1, |
| | | currentPage: 1, |
| | | tableOption: { |
| | | group: [ |
| | | { |
| | |
| | | 'min-width':10 |
| | | }, |
| | | { |
| | | label: '审核状态', |
| | | type: 'text', |
| | | prop: 'auditStatus', |
| | | 'min-width':12 |
| | | }, |
| | | { |
| | | label: '更新时间', |
| | | type: 'time', |
| | | prop: 'updateTime', |
| | |
| | | { |
| | | label: '更新人', |
| | | type: 'text', |
| | | prop: 'updateUser', |
| | | prop: 'auditText', |
| | | 'min-width':8 |
| | | }, |
| | | { |
| | |
| | | ] |
| | | }, |
| | | } |
| | | }, |
| | | }, |
| | | created() { |
| | | const { setTableData } = this; |
| | | setTableData(); |
| | | }, |
| | | methods: { |
| | | }, |
| | | methods: { |
| | | handleSearch(){ |
| | | const {setTableData} = this |
| | | setTableData(); |
| | | }, |
| | | // 设置表格数据 |
| | | async setTableData() { |
| | | const arr = await this.getMessageAuditList(); |
| | | this.tableData = arr.records; |
| | | this.totalNum = arr.total; |
| | | }, |
| | | // 获取消息数据 |
| | | async getMessageAuditList() { |
| | | let arr = []; |
| | | const { currentPage, pageSize,context,status} = this; |
| | | await this.$axios({ |
| | | method: 'post', |
| | | url: 'sccg/message_audit/list', |
| | | data: { |
| | | messageId: context, |
| | | auditStatus:status, |
| | | current: currentPage, |
| | | pageSize: pageSize |
| | | } |
| | | }) |
| | | .then(res => { |
| | | arr = res.data; |
| | | }) |
| | | return arr; |
| | | }, |
| | | // 弹窗关闭 |
| | | handleClose(done) { |
| | | this.$confirm('确认关闭?') |
| | |
| | | }) |
| | | }, |
| | | ...mapActions(['getMessageList']), |
| | | // 设置tableData |
| | | async setTableData() { |
| | | const { current, pageSize, context } = this; |
| | | let arr = await this.getMessageList({ |
| | | current,pageSize,messageId:parseFloat(context) |
| | | }) |
| | | this.list = arr.data.data.records |
| | | this.total = arr.data.data.total |
| | | // 当前页改变触发事件 |
| | | changeCurrentPage(page) { |
| | | this.currentPage = page; |
| | | this.setTableData(); |
| | | }, |
| | | } |
| | | } |