Files
laws_chery_client/src/views/system/notSentSuccessfullyMessage/NotSentSuccessfullyMessage.vue
T

167 lines
4.9 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<template>
<!-- OA飞书未成功发送的消息 -->
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<!-- 消息类型 -->
<a-col :md="6" :sm="8">
<a-form-item :label="$t('system.notSentMessage.messageType')">
<j-dict-select-tag :placeholder="$t('pleaseSelect') + $t('system.notSentMessage.messageType')"
dict-code="message_type"
v-model="queryParam.messageType"/>
</a-form-item>
</a-col>
<!-- 状态 -->
<a-col :md="6" :sm="8">
<a-form-item :label="$t('status')">
<j-dict-select-tag :placeholder="$t('pleaseSelect') + $t('status')"
dict-code="message_state"
v-model="queryParam.state"/>
</a-form-item>
</a-col>
<!-- 标题 -->
<a-col :md="6" :sm="8">
<a-form-item :label="$t('title')">
<j-input :placeholder="$t('pleaseSelect') + $t('title')"
v-model="queryParam.title"></j-input>
</a-form-item>
</a-col>
<div style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">{{ $t('query') }}</a-button>
<a-button type="primary" @click="searchReset" icon="reload" ghost style="margin-left: 8px">{{ $t('reset') }}</a-button>
</div>
</a-row>
</a-form>
</div>
<!-- table区域-begin -->
<div>
<j-table
:can-drag="true"
:scroll="{x: '100%', y: yScrollHeight}"
ref="table"
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:operationList="operationList"
@operationClick="operationClick"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
@change="handleTableChange">
</j-table>
</div>
<!-- table区域-end -->
</a-card>
</template>
<script>
import { JeroListMixin } from '../../../mixins/JeroListMixin'
import { resendMessage } from '../../../api/api'
export default {
name: 'NotSentSuccessfullyMessage',
mixins: [JeroListMixin],
data () {
return {
// 表头
columns: [
{
title: this.$t('serialNumber'),
dataIndex: '',
key: 'rowIndex',
width: 60,
align: 'center',
customRender: function (t, r, index) {
return parseInt(index) + 1
}
},
{ // 消息类型
title: this.$t('system.notSentMessage.messageType'),
align: 'center',
width: 180,
dataIndex: 'messageType_dictText',
scopedSlots: { customRender: 'text' }
},
{ // 状态
title: this.$t('status'),
align: 'center',
width: 180,
dataIndex: 'state_dictText',
scopedSlots: { customRender: 'text' }
},
{ // 标题
title: this.$t('title'),
align: 'center',
width: 180,
dataIndex: 'title',
scopedSlots: { customRender: 'text' }
},
{ // 推送内容
title: this.$t('system.notSentMessage.pushContent'),
align: 'center',
width: 180,
dataIndex: 'jsonStr',
scopedSlots: { customRender: 'text' }
},
{ // 推送地址
title: this.$t('system.notSentMessage.pushAddress'),
align: 'center',
width: 180,
dataIndex: 'url',
scopedSlots: { customRender: 'text' }
},
{
title: this.$t('operation'),
dataIndex: 'action',
width: 180,
align: 'center',
scopedSlots: { customRender: 'action' }
}
],
operationList: [
// 重新发送
{
text: this.$t('system.notSentMessage.resend'),
clickEvent: 'handleResend'
}
],
url: {
list: '/lawsUnifiedTodoLog/page'
},
filters: {
state: '2'
}
}
},
methods: {
// 重新发送
handleResend (record) {
this.$confirm({
title: this.$t('system.notSentMessage.resend'),
content: this.$t('system.notSentMessage.areYouSureResend'),
onOk: () => {
resendMessage({id: record.id}).then(res => {
if (res.success) {
this.$message.success(res.message)
this.loadData()
} else {
this.$message.warning(res.message)
}
})
}
})
}
}
}
</script>
<style scoped>
</style>