Commit cdd58528 by xinla

--no commit message

1 parent 9d127dfa
<script> <script>
import { appMsg } from '@/api/internalCollaborate/appManage' import { appMsg } from '@/api/internalCollaborate/appManage'
import MsgForm from '../components/MsgForm'
export default { export default {
name: '', name: '',
components: { MsgForm }, components: {},
props: { props: {
id: { id: {
type: String | Number, type: String | Number,
...@@ -24,7 +23,6 @@ export default { ...@@ -24,7 +23,6 @@ export default {
list: [], list: [],
loading: false, loading: false,
dialogVisible: false,
status: { '': '全部状态', 0: '草稿', 1: '待发送', 2: '已发送', 3: '发送失败', 4: '已撤回' }, status: { '': '全部状态', 0: '草稿', 1: '待发送', 2: '已发送', 3: '发送失败', 4: '已撤回' },
typeDict: { typeDict: {
text: '文本', text: '文本',
......
...@@ -6,7 +6,7 @@ export default { ...@@ -6,7 +6,7 @@ export default {
components: {}, components: {},
props: { props: {
id: { id: {
type: String, type: String | Number,
required: true, required: true,
}, },
}, },
...@@ -21,7 +21,13 @@ export default { ...@@ -21,7 +21,13 @@ export default {
list: [], list: [],
loading: false, loading: false,
dialogVisibleHistoryMsg: false, typeDict: {
text: '文本',
image: '图片',
news: '图文',
video: '视频',
file: '文件',
},
type: [ type: [
'图片', '图片',
'语音', '语音',
...@@ -60,8 +66,8 @@ export default { ...@@ -60,8 +66,8 @@ export default {
this.loading = true this.loading = true
appMsg appMsg
.getList(this.query) .getList(this.query)
.then(({ data, total }) => { .then(({ rows, total }) => {
this.list = data this.list = rows
this.total = +total this.total = +total
}) })
.finally(() => { .finally(() => {
...@@ -70,8 +76,6 @@ export default { ...@@ -70,8 +76,6 @@ export default {
}, },
edit(data, type) { edit(data, type) {
this.form = Object.assign({}, data || {}) this.form = Object.assign({}, data || {})
this.dialogVisible = true
type || !data ? (this.disabled = false) : (this.disabled = true)
}, },
removke(id, action, tip) { removke(id, action, tip) {
// const operIds = id || this.ids + '' // const operIds = id || this.ids + ''
...@@ -95,16 +99,13 @@ export default { ...@@ -95,16 +99,13 @@ export default {
<div> <div>
<el-table v-loading="loading" :data="list"> <el-table v-loading="loading" :data="list">
<el-table-column label="消息标题" align="center" prop="title" /> <el-table-column label="消息标题" align="center" prop="title" />
<el-table-column prop="type" label="类型" align="center"> <el-table-column prop="msgType" label="类型" align="center">
<template slot-scope="{ row }">{{ type[row.type] }}</template> <template slot-scope="{ row }">{{ typeDict[row.msgType] }}</template>
</el-table-column> </el-table-column>
<el-table-column label="发送时间" align="center" prop="groupName" /> <el-table-column label="发送时间" align="center" prop="sendTime" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="{ row }"> <template slot-scope="{ row }">
<!-- <el-button type="text" @click="edit(row, 'detail')">详情</el-button> <el-button type="text" @click="edit(row, 'detail')">详情</el-button>
<el-button v-if="[0, 1].includes(row.status)" type="text" @click="edit(row, 'edit')">编辑</el-button> -->
<el-button v-if="row.status == 2" type="text" @click="removke(row.id, 'revoke', '撤回')">撤回</el-button>
<el-button v-else @click="removke(row.id, 'remove', '删除')" type="text">删除</el-button>
<!-- v-hasPermi="['customerManage:tag:remove']" --> <!-- v-hasPermi="['customerManage:tag:remove']" -->
</template> </template>
</el-table-column> </el-table-column>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!