| | |
| | | <el-form-item> |
| | | <el-button type="cyan" icon="el-icon-search" size="mini" @click="reGetList">搜索</el-button> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetHandle">重置</el-button> |
| | | <el-button type="primary" icon="el-icon-download" size="mini" @click="exportList">下载发送模板</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <!-- 搜索区 ↑↑↑↑↑↑↑↑↑↑ --> |
| | |
| | | <el-table-column label="发送总数" prop="sendTotal" align="center" /> |
| | | <el-table-column label="状态" prop="status" align="center"> |
| | | <template slot-scope="scope"> |
| | | <span v-if="scope.row.isUp == 0">待执行</span> |
| | | <span v-if="scope.row.isUp == 1">执行中</span> |
| | | <span v-if="scope.row.isUp == 2">完成</span> |
| | | <span v-if="scope.row.isUp == 3">取消</span> |
| | | <span v-if="scope.row.isUp == 4">失败</span> |
| | | <span v-if="scope.row.status == 0">待执行</span> |
| | | <span v-if="scope.row.status == 1">执行中</span> |
| | | <span v-if="scope.row.status == 2">完成</span> |
| | | <span v-if="scope.row.status == 3">取消</span> |
| | | <span v-if="scope.row.status == 4">失败</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="短信模内容" prop="smsTemplate" align="center" min-width="160"> |
| | |
| | | /> |
| | | </template> |
| | | </el-table-column> --> |
| | | <!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="120"> |
| | | <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="120"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | <!-- <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-edit" |
| | | @click="showEditDialog(scope.row)" |
| | | >编辑</el-button> |
| | | >编辑</el-button> --> |
| | | <el-button |
| | | size="mini" |
| | | type="text warn" |
| | | icon="el-icon-delete" |
| | | @click="handleDelete(scope.row)" |
| | | >删除</el-button> |
| | | >取消批次</el-button> |
| | | </template> |
| | | </el-table-column> --> |
| | | </el-table-column> |
| | | </el-table> |
| | | |
| | | <!-- 新增&编辑 --> |
| | |
| | | |
| | | <script> |
| | | import BackToTop from '@/components/BackToTop' |
| | | import { getToken } from '@/utils/auth' // get token from session |
| | | // import WangEnduit from '@/components/WangEnduit' // 富文本 |
| | | export default { |
| | | name: 'Index', |
| | |
| | | // 删除 |
| | | handleDelete(item) { |
| | | // 打开二次确认弹窗 |
| | | this.$confirm('是否确认删除该' + this.objectName + '?', '提示', { |
| | | this.$confirm('是否确认取消该短信批次?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | // 确定回调 |
| | | // TODO url |
| | | this.postFN({ |
| | | url: 'xxx', |
| | | url: 'send-general/cancel', |
| | | header: { 'Content-Type': 'application/json;charset=UTF-8' }, |
| | | params: { |
| | | id: item.id |
| | | }, |
| | |
| | | } |
| | | }, () => { |
| | | this.getList() |
| | | this.$messageSuc('删除成功') |
| | | this.$messageSuc('取消成功') |
| | | }) |
| | | }).catch(() => {}) |
| | | }, |
| | |
| | | const a = filename.split('').reverse().join('') |
| | | const b = a.substring(0, a.search(/\./)).split('').reverse().join('') |
| | | return b |
| | | } |
| | | }, |
| | | // 上传文件 ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑ |
| | | // 导出列表 |
| | | exportList() { |
| | | var adminToken = getToken() |
| | | const path = `${window.location.protocol}//${window.location.host}/sms/send-general/get/temp?adminToken=${adminToken}` |
| | | console.log('path', path) |
| | | window.location.href = path |
| | | } |
| | | } |
| | | } |
| | | </script> |