| | |
| | | :row-class-name="tableRowClassName"> |
| | | <el-table-column type="selection" :min-width="5"> |
| | | </el-table-column> |
| | | <el-table-column v-for="(item,idx) in option.group" :key="item.prop" :label="item.label" |
| | | <el-table-column v-for="item in option.group" :key="item.prop" :label="item.label" |
| | | :prop="item.prop" :min-width="item['min-width'] ? item['item.min-width']:'10'"> |
| | | <template slot-scope="scope"> |
| | | <div v-if="item.type === 'text'"> |
| | |
| | | </slot> |
| | | <slot name="status" v-else-if="item.type === 'status'" :info="scope"> |
| | | </slot> |
| | | <div class=""></div> |
| | | <slot name='time' v-else-if="item.type === 'time'" :timeobj="scope"> |
| | | |
| | | </slot> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
New file |
| | |
| | | <template> |
| | | <div class="view"> |
| | | <div class="view-data"> |
| | | <el-form :model="sms" label-position="right" ref="viewForm" :rules="Rules" label-width="100px"> |
| | | <div class="data-item"> |
| | | <el-form-item label="ID:"> |
| | | <span class="data-detail">{{sms.messageId}}</span> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="data-item"> |
| | | <el-form-item label="短信标题:"> |
| | | <span class="data-detail">{{sms.title}}</span> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="data-item"> |
| | | <el-form-item label="短信内容:"> |
| | | <span class="data-detail">{{sms.body}}</span> |
| | | </el-form-item> |
| | | </div> |
| | | <!-- 审核意见 --> |
| | | <el-form-item label="审核意见" prop="auditOpinion"> |
| | | <el-input type="textarea" placeholder="请输入审核意见" v-model="sms.auditOpinion"></el-input> |
| | | </el-form-item> |
| | | <div class="el-form-footer"> |
| | | <el-button @click.native.prevent="handleSubmit(0)">不同意</el-button> |
| | | <el-button type="primary" @click.native.prevent="handleSubmit(1)">同意</el-button> |
| | | </div> |
| | | </el-form> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | export default { |
| | | components: { |
| | | |
| | | }, |
| | | data() { |
| | | const checkOpinion = (rule, value, callback) => { |
| | | if (value) { |
| | | callback(); |
| | | } else { |
| | | callback(new Error('审核意见不能为空')) |
| | | } |
| | | } |
| | | return { |
| | | id:{}, |
| | | messageId: {}, |
| | | staus:{}, |
| | | result:{}, |
| | | auditOpinion:{}, |
| | | Rules: { |
| | | auditOpinion: [ |
| | | { required: true, trigger: 'blur', validator: checkOpinion } |
| | | ] |
| | | }, |
| | | } |
| | | }, |
| | | created() { |
| | | const {sms} = this; |
| | | console.log(this.messageData); |
| | | console.log(this.messageData.info); |
| | | this.sms = this.messageData.info.row; |
| | | |
| | | }, |
| | | methods: { |
| | | changeComponent(index) { |
| | | this.activeIndex = index; |
| | | }, |
| | | // 提交审核意见 |
| | | handleSubmit(index) { |
| | | const { sms } = this; |
| | | this.$refs.viewForm.validate((valid) => { |
| | | if (valid) { |
| | | this.$axios({ |
| | | method: 'post', |
| | | url: 'sccg/message_audit/checkSms', |
| | | data: { |
| | | id:sms.id, |
| | | messageId: sms.messageId, |
| | | status:index, |
| | | auditOpinion:sms.auditOpinion, |
| | | result:index === 0 ? '不同意':'同意' |
| | | } |
| | | }) |
| | | .then(res => { |
| | | console.log(res); |
| | | if (res.code === 200) { |
| | | this.$message({ |
| | | type: 'success', |
| | | message: '审核成功' |
| | | }) |
| | | this.$emit('closeDialog', { flag: false, index: 1 }); |
| | | |
| | | } |
| | | |
| | | }) |
| | | .catch(err => { console.log(err) }); |
| | | }else{ |
| | | return false; |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | }, |
| | | props: ['messageData','closeDialog'] |
| | | } |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | .view { |
| | | display: flex; |
| | | padding: 20px; |
| | | |
| | | .view-data { |
| | | color: #4b9bb7; |
| | | flex: 4; |
| | | padding: 20px; |
| | | |
| | | .data-item { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | line-height: 40px; |
| | | } |
| | | |
| | | :deep(.el-form-item__label) { |
| | | color: #4b9bb7; |
| | | } |
| | | |
| | | :deep(.el-textarea__inner) { |
| | | background-color: #17324c; |
| | | color: #4b9bb7; |
| | | } |
| | | |
| | | .el-form-footer { |
| | | display: flex; |
| | | justify-content: flex-end; |
| | | } |
| | | |
| | | border: 1px solid #17324c; |
| | | } |
| | | |
| | | .view-process { |
| | | flex: 6; |
| | | margin-left: 20px; |
| | | |
| | | .process-header { |
| | | display: flex; |
| | | line-height: 40px; |
| | | |
| | | .process-title-item { |
| | | width: 120px; |
| | | text-align: center; |
| | | |
| | | .under-line { |
| | | height: 2px; |
| | | width: 100%; |
| | | } |
| | | |
| | | .title-active { |
| | | color: #4b9bb7; |
| | | } |
| | | |
| | | .line-active { |
| | | background-color: #4b9bb7; |
| | | border-radius: 20px; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .show-item { |
| | | overflow: hidden; |
| | | height: 600px; |
| | | position: relative; |
| | | |
| | | .show-wrap { |
| | | overflow: scroll; |
| | | height: 600px; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | |
| | | </el-radio-group> |
| | | </div> |
| | | <div class="btns"> |
| | | <el-button type="primary" icon="el-icon-search" @click="handleSearch">查询</el-button> |
| | | <el-button icon="el-icon-delete-solid" @click="handleReset">重置</el-button> |
| | | <el-button type="primary" icon="el-icon-search" @click="handleSearch" |
| | | >查询</el-button |
| | | > |
| | | <el-button icon="el-icon-delete-solid" @click="handleReset" |
| | | >重置</el-button |
| | | > |
| | | </div> |
| | | </div> |
| | | </header> |
| | | <main> |
| | | <div class="main-content"> |
| | | <div class="main-title"> |
| | | 数据列表 |
| | | </div> |
| | | <div class="main-title">数据列表</div> |
| | | <!-- 数据展示 --> |
| | | <MyTable :tableOption="tableOption" :tableData="tableData" :pageShow="false"> |
| | | <MyTable |
| | | :tableOption="tableOption" |
| | | :tableData="tableData" |
| | | :pageShow="false" |
| | | > |
| | | <template #operation="info"> |
| | | <el-link :underline="false" style="color:#4b9bb7" @click="handleCheckSms(info)">审核</el-link> |
| | | <el-link |
| | | :underline="false" |
| | | style="color: #4b9bb7" |
| | | @click="handleCheckSms(info)" |
| | | >审核</el-link |
| | | > |
| | | </template> |
| | | <template #time="{timeobj}"> |
| | | <span>{{ changeUpdateTime(timeobj.row.updateTime)}}</span> |
| | | </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 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 |
| | | background |
| | | :current-page="currentPage" |
| | | layout="prev, pager, next" |
| | | :total="totalNum" |
| | | :page-size="pageSize" |
| | | @current-change="changeCurrentPage" |
| | | > |
| | | </el-pagination> |
| | | </div> |
| | | </div> |
| | | <!-- 审核页面 --> |
| | | <el-dialog :visible.sync="dialogCheckSms" width="80%" title="消息详情" v-if="dialogCheckSms" |
| | | :before-close="handleClose"> |
| | | <MyCheckSms :messageData="messageData" @closeDialog="closeDialog"></MyCheckSms> |
| | | <el-dialog |
| | | :visible.sync="dialogCheckSms" |
| | | width="80%" |
| | | title="消息详情" |
| | | v-if="dialogCheckSms" |
| | | :before-close="handleClose" |
| | | > |
| | | <MyCheckSms |
| | | :messageData="messageData" |
| | | @closeDialog="closeDialog" |
| | | ></MyCheckSms> |
| | | </el-dialog> |
| | | </div> |
| | | </main> |
| | | <footer> |
| | | |
| | | </footer> |
| | | <footer></footer> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import MyTable from '@/components/Table'; |
| | | import MyCheckSms from './checkSms'; |
| | | import helper from "@/utils/mydate"; |
| | | import MyTable from "@/components/Table"; |
| | | import MyCheckSms from "./checkSms"; |
| | | export default { |
| | | components: { |
| | | MyTable,MyCheckSms |
| | | MyTable, |
| | | MyCheckSms, |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | tableOption: { |
| | | group: [ |
| | | { |
| | | label: 'ID', |
| | | type: 'text', |
| | | prop: 'messageId', |
| | | 'min-width':8 |
| | | label: "ID", |
| | | type: "text", |
| | | prop: "messageId", |
| | | "min-width": 8, |
| | | }, |
| | | { |
| | | label: '短信标题', |
| | | type: 'text', |
| | | prop: 'title', |
| | | 'min-width':12 |
| | | label: "短信标题", |
| | | type: "text", |
| | | prop: "title", |
| | | "min-width": 12, |
| | | }, |
| | | { |
| | | label: '短信内容', |
| | | type: 'text', |
| | | prop: 'body', |
| | | 'min-width':12 |
| | | label: "短信内容", |
| | | type: "text", |
| | | prop: "body", |
| | | "min-width": 12, |
| | | }, |
| | | { |
| | | label: '短信签名', |
| | | type: 'text', |
| | | prop: 'ipAddress', |
| | | 'min-width':10 |
| | | label: "短信签名", |
| | | type: "text", |
| | | prop: "ipAddress", |
| | | "min-width": 10, |
| | | }, |
| | | { |
| | | label: '审核状态', |
| | | type: 'text', |
| | | prop: 'auditStatus', |
| | | 'min-width':12 |
| | | label: "审核状态", |
| | | type: "text", |
| | | prop: "auditStatusText", |
| | | "min-width": 12, |
| | | }, |
| | | { |
| | | label: '更新时间', |
| | | type: 'time', |
| | | prop: 'updateTime', |
| | | 'min-width':12 |
| | | label: "更新时间", |
| | | type: "time", |
| | | prop: "updateTime", |
| | | "min-width": 12, |
| | | }, |
| | | { |
| | | label: '更新人', |
| | | type: 'text', |
| | | prop: 'auditText', |
| | | 'min-width':8 |
| | | label: "更新人", |
| | | type: "text", |
| | | prop: "realAuditText", |
| | | "min-width": 8, |
| | | }, |
| | | { |
| | | label: '操作', |
| | | type: 'operation', |
| | | prop: 'operation', |
| | | 'min-width':15 |
| | | label: "操作", |
| | | type: "operation", |
| | | prop: "operation", |
| | | "min-width": 15, |
| | | }, |
| | | ] |
| | | ], |
| | | }, |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | | const {setTableData} = this |
| | | const { setTableData } = this; |
| | | this.setTableData(); |
| | | }, |
| | | methods: { |
| | |
| | | this.setTableData(); |
| | | }, |
| | | // 重置 |
| | | handleReset(){ |
| | | |
| | | }, |
| | | handleReset() {}, |
| | | // 设置表格数据 |
| | | async setTableData() { |
| | | const arr = await this.getMessageAuditList(); |
| | |
| | | let arr = []; |
| | | const { currentPage, pageSize,context,status} = this; |
| | | await this.$axios({ |
| | | method: 'post', |
| | | url: 'sccg/message_audit/list', |
| | | method: "post", |
| | | url: "sccg/message_audit/list", |
| | | data: { |
| | | messageId: context, |
| | | auditStatus:status, |
| | | current: currentPage, |
| | | pageSize: pageSize |
| | | } |
| | | }) |
| | | .then(res => { |
| | | pageSize: pageSize, |
| | | }, |
| | | }).then((res) => { |
| | | arr = res.data; |
| | | }) |
| | | }); |
| | | return arr; |
| | | }, |
| | | // 弹窗关闭 |
| | | handleClose(done) { |
| | | this.$confirm('确认关闭?') |
| | | .then(_ => { |
| | | this.$confirm("确认关闭?").then((_) => { |
| | | done(); |
| | | }) |
| | | }); |
| | | }, |
| | | // 当前页改变触发事件 |
| | | changeCurrentPage(page) { |
| | |
| | | // 去审核 |
| | | handleCheckSms(info) { |
| | | this.messageData = info; |
| | | if (this.messageData.info.row.auditStatus === 1) { |
| | | this.$message({ message: "该消息已被审核!" }); |
| | | this.dialogCheckSms = false; |
| | | } else { |
| | | this.dialogCheckSms = true; |
| | | } |
| | | }, |
| | | // 关闭dialog |
| | | closeDialog({flag}){ |
| | | closeDialog({ flag, index }) { |
| | | this.dialogCheckSms = flag; |
| | | if (index === 1) { |
| | | this.setTableData(); |
| | | } |
| | | }, |
| | | // 改变更新时间 |
| | | changeUpdateTime(time) { |
| | | console.log(time) |
| | | if (time) { |
| | | return helper(time); |
| | | } |
| | | } |
| | | return ""; |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | .message { |
| | |
| | | border: 1px solid #17324c; |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | color: #4b9bb7; |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | .pagination { |
| | |
| | | justify-content: center; |
| | | |
| | | .el-pagination { |
| | | |
| | | &::v-deep li, |
| | | &::v-deep .btn-prev, |
| | | &::v-deep .btn-next { |