| | |
| | | this.editor.customConfig.colors = ['#4b9bb7', '#09152f']; |
| | | this.editor.customConfig.placeholder = '请输入'; |
| | | this.editor.customConfig.onchangeTimeout = 500; |
| | | this.editor.customConfig.onfocus = () => { |
| | | this.editor.customConfig.placeholder = ''; |
| | | } |
| | | this.editor.create(); |
| | | }, |
| | | beforeDestroy() { |
| | |
| | | </el-table> |
| | | <el-dialog |
| | | :visible.sync="isShowUploadDialog" |
| | | :destroy-on-close="true" |
| | | :key="dialogType" |
| | | width="40%" |
| | | :title="getDialogTitle" |
| | | > |
| | |
| | | <!-- 提醒方式 --> |
| | | <el-form-item class="optionItem" label="提醒方式:" prop="channelCode"> |
| | | <el-radio-group v-model="role.channelCode"> |
| | | <el-radio label="01" value="01">站内信</el-radio> |
| | | <el-radio label="02" value="02">邮件</el-radio> |
| | | <el-radio value="01">站内信</el-radio> |
| | | <el-radio value="03">邮件</el-radio> |
| | | </el-radio-group> |
| | | <span class="message-tip">(短信可用数: 1000条)</span> |
| | | </el-form-item> |
| | |
| | | channelCode: |
| | | channelCode === "01" |
| | | ? "站内信" |
| | | : channelCode === "02" |
| | | : channelCode === "03" |
| | | ? "邮件" |
| | | : "短信", |
| | | messageType: this.role.messageType, |
| | |
| | | <header> |
| | | <div class="headerContent"> |
| | | <div class="search"> |
| | | <span>筛选条件:</span> |
| | | <el-input placeholder="请输入内容" v-model="context"></el-input> |
| | | <span>事件编号:</span> |
| | | <el-input placeholder="请输入事件编号" v-model="context"></el-input> |
| | | <div class="findBtn"> |
| | | <el-button type="primary" @click="getTableData">查询</el-button> |
| | | </div> |
| | |
| | | <el-table-column prop="code" label="事件编号" min-width="10"> |
| | | </el-table-column> |
| | | <el-table-column prop="eventSource" label="问题来源" min-width="10"> |
| | | <template slot-scope="scope"> |
| | | <span>{{scope.row}}</span> |
| | | <template slot-scope="scope" v-if="scope.row"> |
| | | <span>{{ getEventSource(scope.row.eventSource)?.label }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="category" label="问题类别" min-width="10"> |
| | | <template slot-scope="scope"> |
| | | <span>{{scope.row}}</span> |
| | | <template slot-scope="scope" v-if="scope.row"> |
| | | <span>{{ getCategory(scope.row.category)?.label }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="createTime" label="创建时间" min-width="10"> |
| | | <template slot-scope="scope"> |
| | | <span>{{changeTime(scope.row)}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="type" label="剩余时间" min-width="10"> |
| | | <template slot-scope="scope"> |
| | | <span>{{getRestTime(scope.row)}}</span> |
| | | </template> |
| | | <el-table-column prop="limitTime" label="剩余时间" min-width="10"> |
| | | </el-table-column> |
| | | <el-table-column prop="stepName" label="问题状态" min-width="10"> |
| | | </el-table-column> |
| | |
| | | </el-table> |
| | | <!-- 查看修改页面 --> |
| | | <el-dialog :visible.sync="dialogUpdate" width="45%" :title="updateFlag ? '权限设置' :'查看角色信息'" |
| | | v-if="dialogUpdate" :before-close="handleClose"> |
| | | :destroy-on-close="true" :key="updateFlag" :before-close="handleClose"> |
| | | <updateUser :updateFlag="updateFlag" :userInfo=userInfo |
| | | :getTableData=" context ? getTableData : getTableData" @changeDialog="changeDialog" /> |
| | | </el-dialog> |
| | |
| | | </div> |
| | | <div class="pagination"> |
| | | <el-pagination background :current-page="currentPage" layout="prev, pager, next" |
| | | :total="totalNum" :page-size="pageSize" @current-change="changeCurrentPage" |
| | | @prev-click="handlePrev" @next-click="handleNext"> |
| | | :total="totalNum" :page-size="pageSize" @current-change="changeCurrentPage"> |
| | | </el-pagination> |
| | | </div> |
| | | </div> |
| | |
| | | import {computeTime} from '@/utils/helper' |
| | | import filterTime from '@/utils/mydate' |
| | | import myWait from "@/api/operate/myWait"; |
| | | import { CATEGOTY, RESOURCE_TYPE } from "@/utils/helper"; |
| | | |
| | | export default { |
| | | components: { |
| | |
| | | data() { |
| | | return { |
| | | tableData: [], |
| | | context: "", |
| | | context: null, |
| | | dialogCreate: false, |
| | | dialogUpdate: false, |
| | | updateFlag: false, |
| | |
| | | myWait.getMybackLog({ num: this.context }) |
| | | .then(res => { |
| | | this.tableData = res; |
| | | this.tableData = this.tableData.filter(item => !!item); |
| | | }) |
| | | .catch(err => this.$message({ type: 'error', message: err })) |
| | | }, |
| | |
| | | }, |
| | | // 设置表格斑马纹 |
| | | tableRowClassName({ row, rowIndex }) { |
| | | if ((rowIndex + 1) % 2 == 0) { |
| | | if ((rowIndex + 1) % 2 === 0) { |
| | | return 'warning-row'; |
| | | } else { |
| | | return 'success-row'; |
| | |
| | | this.currentPage = page; |
| | | this.getTableData(); |
| | | }, |
| | | // 上一页点击事件 |
| | | handlePrev(page) { |
| | | this.currentPage = page; |
| | | this.getTableData(); |
| | | }, |
| | | // 下一页点击事件 |
| | | handleNext(page) { |
| | | this.currentPage = page; |
| | | this.getTableData(); |
| | | }, |
| | | changeDialog(val) { |
| | | this.dialogUpdate = val.dialogUpdate; |
| | | console.log(val); |
| | | }, |
| | | handleClose(done) { |
| | | this.$confirm('确认关闭?') |
| | | .then(_ => { |
| | | .then(() => { |
| | | this.dialogCreate = false; |
| | | this.dialogUpdate = false; |
| | | done(); |
| | | }) |
| | | .catch(_ => { }); |
| | | .catch(() => { }); |
| | | }, |
| | | // 计算时间 |
| | | getRestTime(time2){ |
| | |
| | | if(time){ |
| | | return filterTime(time); |
| | | } |
| | | } |
| | | }, |
| | | getCategory(code) { |
| | | return CATEGOTY.find(item => item.value === code); |
| | | }, |
| | | |
| | | getEventSource(code) { |
| | | return RESOURCE_TYPE.find(item => item.value === code); |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | |
| | | header { |
| | | background-color: #09152f; |
| | | border: 1pox solid #fff; |
| | | |
| | | .headerContent { |
| | | padding: 0 40px; |
| | |
| | | background-color: #09152f; |
| | | margin-top: 20px; |
| | | padding-bottom: 50px; |
| | | border: 1pox solid #fff; |
| | | |
| | | .mainTitle { |
| | | line-height: 60px; |
| | |
| | | </el-form-item> |
| | | <!-- 消息内容 --> |
| | | <el-form-item class="optionItem" label="消息内容:" prop="body"> |
| | | <MyEditor ref="edit" @getMyBody="getMyBody"></MyEditor> |
| | | <MyEditor ref="edit"></MyEditor> |
| | | </el-form-item> |
| | | |
| | | <el-form-item> |
| | | <div class="optionBtn"> |
| | | <el-button messageType="primary" @click.native.prevent="handleSubmit(1)" class="btn submit">发布</el-button> |
| | | <el-button type="primary" @click.native.prevent="handleSubmit(1)" class="btn submit">发布</el-button> |
| | | <el-button class="btn cancel" @click.native.prevent="handleReset">重置</el-button> |
| | | </div> |
| | | </el-form-item> |
| | |
| | | callback(); |
| | | } |
| | | } |
| | | |
| | | return { |
| | | role: { |
| | | messageType: '', |
| | |
| | | targetTo: '', |
| | | targetFrom: null, |
| | | body: '', |
| | | channelCode: '03' |
| | | channelCode: '02' |
| | | }, |
| | | rules: { |
| | | messageType: [ |
| | |
| | | }, |
| | | // 新建/保存消息(1:新建,0保存消息) |
| | | handleSubmit(mystatus) { |
| | | this.$refs.user.validate((valid) => { |
| | | this.role.body = this.$refs.edit.editor.txt.html(); |
| | | this.$refs.user.validate((valid) => { |
| | | if (valid) { |
| | | const params = Object.assign({}, this.role); |
| | | params.targetTo = this.checkedList.join(','); |
| | |
| | | }) |
| | | .catch(err => this.$message({ type: 'error', message: err })); |
| | | } else { |
| | | return false; |
| | | this.$message.warning('请检查必填项'); |
| | | } |
| | | }) |
| | | }, |
| | | // 获得消息体 |
| | | getMyBody(obj) { |
| | | this.role.body = obj; |
| | | }, |
| | | // 重置表单 |
| | | handleReset() { |
| | |
| | | this.role.targetFrom = res.data.userId |
| | | this.sendUser = res.data.username |
| | | }) |
| | | }, |
| | | // 消息预览 |
| | | handleView() { |
| | | this.$refs.user.validate((valid) => { |
| | | if (valid) { |
| | | this.dialogView = true; |
| | | this.info = { |
| | | messageType: this.getColText(role.messageType), |
| | | body: this.role.body, |
| | | head: this.role.head, |
| | | targetTo: this.tempNameArr, |
| | | targetFrom: this.sendUser |
| | | }; |
| | | } else { |
| | | return false |
| | | } |
| | | }) |
| | | }, |
| | | // 获得栏目消息 |
| | | getColText(id){ |
| | | const {colList} = this |
| | | let str = '' |
| | | colList.forEach(item=>{ |
| | | item.id === id ? str = item.columnName : '' |
| | | }) |
| | | return str |
| | | } |
| | | }, |
| | | props: ['closeMyDialog'] |
| | | } |
| | | } |
| | | </script> |
| | | <style lang="scss" scoped> |
| | |
| | | <div class="message-status"> |
| | | <span>短信回执:</span> |
| | | <el-select v-model="messageStatus" placeholder="请选择"> |
| | | <el-option v-for="item in statusList" :key="item.value" :label="item.label" :value="item.value"> |
| | | <el-option v-for="item in statusList" :key="item.value" :label="item.label" :value="item.label"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | <div class="find"> |
| | | <el-button type="primary" icon="el-icon-search" @click="handleSearch">查询</el-button> |
| | | <el-button type="primary" icon="el-icon-search" @click="getTableData">查询</el-button> |
| | | <el-button icon="el-icon-delete-solid" @click="handleReset">重置</el-button> |
| | | </div> |
| | | </div> |
| | |
| | | @selection-change="tableChange"> |
| | | <el-table-column type="selection" min-width="5"> |
| | | </el-table-column> |
| | | <el-table-column label="ID" min-width="5"> |
| | | <el-table-column label="ID" min-width="5" prop="id"> |
| | | <template slot-scope="scope">{{ scope.row.id }}</template> |
| | | </el-table-column> |
| | | <el-table-column prop="head" label="标题" min-width="10"> |
| | | </el-table-column> |
| | | <el-table-column prop="updateTime" label="发送时间" min-width="10"> |
| | | <template slot-scope="scope"> |
| | | <span>{{changeTime(scope.row)}}</span> |
| | | </template> |
| | | <el-table-column prop="createTime" label="发送时间" min-width="10"> |
| | | </el-table-column> |
| | | <el-table-column prop="targetFrom" label="发送账号" min-width="15"> |
| | | </el-table-column> |
| | | <el-table-column prop="status" label="发布状态" min-width="5"> |
| | | <template slot-scope="scope"> |
| | | {{scope.row.status === 0 ? '发送失败' :'发送成功'}} |
| | | </template> |
| | | <template slot-scope="scope"> |
| | | <span>{{ statusList.find(item => item.value === scope.row.status).label }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="operation" label="操作" min-width="15"> |
| | | <template slot-scope="scope"> |
| | | <div class="operation"> |
| | | <el-link class="leftPx" icon="el-icon-delete-solid" :underline="false" |
| | | @click="handleDelete([scope.row.id])">删除</el-link> |
| | | <el-link icon="el-icon-edit" class="leftPx" :underline="false" @click="handleEdit(scope.row)">重新发送</el-link> |
| | | <el-link icon="el-icon-edit" class="leftPx" :underline="false" @click="resend(scope.row)">重新发送</el-link> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <!-- 新建消息 --> |
| | | <el-dialog title="新建消息" :visible.sync="isShowDialog" width="80%" |
| | | <el-dialog title="新建消息" :destroy-on-close="true" :key="dialogType" :visible.sync="isShowDialog" width="80%" |
| | | :before-close="handleConfirmClose"> |
| | | <MyCreate @closeMyDialog="closeDialog" :type="dialogType"></MyCreate> |
| | | </el-dialog> |
| | |
| | | <script> |
| | | import helper from '@/utils/mydate' |
| | | import MyCreate from './createSms' |
| | | import { getMessageList, deleteMessage } from "@/api/operate/messageManagement"; |
| | | import {getMessageList, deleteMessage, sendMessage} from "@/api/operate/messageManagement"; |
| | | |
| | | export default { |
| | | components: { |
| | |
| | | data() { |
| | | return { |
| | | tableData: [], |
| | | context: "", |
| | | dialogEdit:false, |
| | | context: null, |
| | | isShowDialog: false, |
| | | dialogView: false, |
| | | totalNum: null, |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | |
| | | } |
| | | ], |
| | | tempList: [], |
| | | messageStatus: 2, |
| | | messageStatus: '全部', |
| | | messageKind: '00', |
| | | statusList: [ |
| | | { |
| | |
| | | this.getTableData(); |
| | | }, |
| | | methods: { |
| | | // 查询 |
| | | handleSearch(){ |
| | | this.getTableData(); |
| | | }, |
| | | // 重置 |
| | | handleReset(){ |
| | | |
| | | this.context = null; |
| | | this.currentPage = 1; |
| | | this.messageStatus = '全部'; |
| | | this.getTableData(); |
| | | }, |
| | | // 删除信息 |
| | | handleDelete(ids) { |
| | | this.$confirm('确认删除?') |
| | | .then(() => { |
| | | deleteMessage(ids) |
| | | deleteMessage({ ids: ids.join(',')}) |
| | | .then(() => { |
| | | this.$message({ type: 'success', message: '操作成功' }); |
| | | this.getTableData(); |
| | |
| | | }, |
| | | |
| | | getTableData() { |
| | | getMessageList() |
| | | const respondResult = this.messageStatus === '全部' ? null : this.messageStatus; |
| | | getMessageList({ channelCode: '03', current: this.currentPage, |
| | | respondResult, pageSize: this.pageSize, head: this.context }) |
| | | .then(({ records, total }) => { |
| | | this.tableData = records; |
| | | this.totalNum = total; |
| | |
| | | this.$message({ type: 'error', message: err }); |
| | | }) |
| | | }, |
| | | |
| | | resend(data) { |
| | | if (data.status === 1) { |
| | | return; |
| | | } |
| | | sendMessage(data) |
| | | .then(() => { |
| | | this.$message.success('操作成功'); |
| | | this.getTableData(); |
| | | }) |
| | | .catch(err => this.$message.error(`${err}`)) |
| | | }, |
| | | |
| | | // 批量下拉框操作 |
| | | async selectChange(list) { |
| | | if (this.tempList.length !== 0) { |
| | |
| | | // 当前页改变触发事件 |
| | | changeCurrentPage(page) { |
| | | this.currentPage = page; |
| | | this.setTableData(); |
| | | this.getTableData(); |
| | | }, |
| | | // 确认关闭弹窗 |
| | | handleConfirmClose(done) { |
| | |
| | | <!-- 查看修改页面 --> |
| | | <el-dialog |
| | | :visible.sync="isShowDialog" |
| | | :destroy-on-close="true" |
| | | :key="dialogTitle" |
| | | width="40%" |
| | | :title="dialogTitle"> |
| | | <updateInterface :isUpdate="isUpdate" :dialogData="dialogData" @closeDialog="closeDialog" /> |