消息修改
This commit is contained in:
+1
-1
@@ -33,7 +33,7 @@ export function httpAction(url,parameter,method) {
|
||||
export function putAction(url,parameter) {
|
||||
return axios({
|
||||
url: url,
|
||||
method:'put',
|
||||
method:'post',
|
||||
data: parameter
|
||||
})
|
||||
}
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 851 B |
@@ -9,61 +9,23 @@
|
||||
:overlayStyle="{ width: '300px', top: '50px' }">
|
||||
<template slot="content">
|
||||
<a-spin :spinning="loadding">
|
||||
<a-tabs>
|
||||
<a-tab-pane :tab="msg1Title" key="1">
|
||||
<!--<a-list>
|
||||
<a-list-item>
|
||||
<a-list-item-meta title="你收到了 14 份新周报" description="一年前">
|
||||
<a-avatar style="background-color: white" slot="avatar" src="https://gw.alipayobjects.com/zos/rmsportal/ThXAXghbEsBCCSDihZxY.png"/>
|
||||
</a-list-item-meta>
|
||||
</a-list-item>
|
||||
<a-list-item>
|
||||
<a-list-item-meta title="你推荐的 IT大牛 已通过第三轮面试" description="一年前">
|
||||
<a-avatar style="background-color: white" slot="avatar" src="https://gw.alipayobjects.com/zos/rmsportal/OKJXDXrmkNshAMvwtvhu.png"/>
|
||||
</a-list-item-meta>
|
||||
</a-list-item>
|
||||
<a-list-item>
|
||||
<a-list-item-meta title="这种模板可以区分多种通知类型" description="一年前">
|
||||
<a-avatar style="background-color: white" slot="avatar" src="https://gw.alipayobjects.com/zos/rmsportal/kISTdvpyTAhtGxpovNWd.png"/>
|
||||
</a-list-item-meta>
|
||||
</a-list-item>
|
||||
</a-list>-->
|
||||
<a-list>
|
||||
<a-list-item :key="index" v-for="(record, index) in announcement1">
|
||||
<div style="margin-left: 5%;width: 80%">
|
||||
<p><a @click="showAnnouncement(record)">{{ record.titile }}</a></p>
|
||||
<p style="color: rgba(0,0,0,.45);margin-bottom: 0px">{{ record.createTime }} 发布</p>
|
||||
</div>
|
||||
<div style="text-align: right">
|
||||
<a-tag @click="showAnnouncement(record)" v-if="record.priority === 'L'" color="blue">一般消息</a-tag>
|
||||
<a-tag @click="showAnnouncement(record)" v-if="record.priority === 'M'" color="orange">重要消息</a-tag>
|
||||
<a-tag @click="showAnnouncement(record)" v-if="record.priority === 'H'" color="red">紧急消息</a-tag>
|
||||
</div>
|
||||
</a-list-item>
|
||||
<div style="margin-top: 5px;text-align: center">
|
||||
<a-button @click="toMyAnnouncement()" type="dashed" block>查看更多</a-button>
|
||||
</div>
|
||||
</a-list>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane :tab="msg2Title" key="2">
|
||||
<a-list>
|
||||
<a-list-item :key="index" v-for="(record, index) in announcement2">
|
||||
<div style="margin-left: 5%;width: 80%">
|
||||
<p><a @click="showAnnouncement(record)">{{ record.titile }}</a></p>
|
||||
<p style="color: rgba(0,0,0,.45);margin-bottom: 0px">{{ record.createTime }} 发布</p>
|
||||
</div>
|
||||
<div style="text-align: right">
|
||||
<a-tag @click="showAnnouncement(record)" v-if="record.priority === 'L'" color="blue">一般消息</a-tag>
|
||||
<a-tag @click="showAnnouncement(record)" v-if="record.priority === 'M'" color="orange">重要消息</a-tag>
|
||||
<a-tag @click="showAnnouncement(record)" v-if="record.priority === 'H'" color="red">紧急消息</a-tag>
|
||||
</div>
|
||||
</a-list-item>
|
||||
<div style="margin-top: 5px;text-align: center">
|
||||
<a-button @click="toMyAnnouncement()" type="dashed" block>查看更多</a-button>
|
||||
</div>
|
||||
</a-list>
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
<div class="notice-title">系统通知</div>
|
||||
<a-list>
|
||||
<a-list-item :key="index" v-for="(record, index) in announcement2">
|
||||
<div style="margin-left: 5%;width: 80%">
|
||||
<p><a @click="showAnnouncement(record)">{{ record.titile }}</a></p>
|
||||
<p style="color: rgba(0,0,0,.45);margin-bottom: 0px">{{ record.createTime }} 发布</p>
|
||||
</div>
|
||||
<div style="text-align: right">
|
||||
<a-tag @click="showAnnouncement(record)" v-if="record.priority === 'L'" color="blue">一般消息</a-tag>
|
||||
<a-tag @click="showAnnouncement(record)" v-if="record.priority === 'M'" color="orange">重要消息</a-tag>
|
||||
<a-tag @click="showAnnouncement(record)" v-if="record.priority === 'H'" color="red">紧急消息</a-tag>
|
||||
</div>
|
||||
</a-list-item>
|
||||
<div style="margin-top: 5px;text-align: center">
|
||||
<a-button @click="toMyAnnouncement()" type="dashed" block>查看更多</a-button>
|
||||
</div>
|
||||
</a-list>
|
||||
</a-spin>
|
||||
</template>
|
||||
<span @click="fetchNotice" class="header-notice">
|
||||
@@ -212,7 +174,7 @@
|
||||
//心跳检测重置
|
||||
//this.heartCheck.reset().start();
|
||||
},
|
||||
websocketOnerror: function (e) {
|
||||
websocketOnerror: function () {
|
||||
console.log('WebSocket连接发生错误')
|
||||
this.reconnect()
|
||||
},
|
||||
@@ -290,7 +252,7 @@
|
||||
return this
|
||||
},
|
||||
start: function(){
|
||||
var self = this
|
||||
// var self = this
|
||||
this.timeoutObj = setTimeout(function(){
|
||||
//这里发送一个心跳,后端收到后,返回一个心跳消息,
|
||||
//onmessage拿到返回的心跳就说明连接正常
|
||||
@@ -326,6 +288,12 @@
|
||||
}
|
||||
</style>
|
||||
<style lang="less" scoped>
|
||||
.notice-title {
|
||||
text-align: center;
|
||||
padding: 3px 0;
|
||||
border-bottom: 1px solid #e8e8e8;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
.header-notice{
|
||||
display: inline-block;
|
||||
transition: all 0.3s;
|
||||
|
||||
@@ -6,39 +6,28 @@
|
||||
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
||||
<a-row :gutter="24">
|
||||
|
||||
<a-col :md="6" :sm="8">
|
||||
<a-col :xl="6" :lg="8" :md="8" :sm="24">
|
||||
<a-form-item label="模板CODE">
|
||||
<a-input placeholder="请输入模板CODE" v-model="queryParam.templateCode"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<a-col :xl="6" :lg="8" :md="8" :sm="24">
|
||||
<a-form-item label="模板内容">
|
||||
<a-input placeholder="请输入模板内容" v-model="queryParam.templateContent"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<template v-if="toggleSearchStatus">
|
||||
<a-col :md="6" :sm="8">
|
||||
|
||||
<a-col :xl="6" :lg="8" :md="8" :sm="24">
|
||||
<a-form-item label="模板标题">
|
||||
<a-input placeholder="请输入模板标题" v-model="queryParam.templateName"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
<a-form-item label="模板类型">
|
||||
<a-input placeholder="请输入模板类型" v-model="queryParam.templateType"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</template>
|
||||
<a-col :md="6" :sm="8">
|
||||
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||
<span class="table-page-search-submitButtons">
|
||||
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
|
||||
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
|
||||
<a @click="handleToggleSearch" style="margin-left: 8px">
|
||||
{{ toggleSearchStatus ? '收起' : '展开' }}
|
||||
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
|
||||
</a>
|
||||
<a-button @click="searchReset" icon="reload" class="reset-button" style="margin-left: 8px">重置</a-button>
|
||||
</span>
|
||||
</a-col>
|
||||
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
@@ -46,32 +35,10 @@
|
||||
<!-- 操作按钮区域 -->
|
||||
<div class="table-operator">
|
||||
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
|
||||
<a-button type="primary" icon="download" @click="handleExportXls('消息模板')">导出</a-button>
|
||||
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl"
|
||||
@change="handleImportExcel">
|
||||
<a-button type="primary" icon="import">导入</a-button>
|
||||
</a-upload>
|
||||
<a-dropdown v-if="selectedRowKeys.length > 0">
|
||||
<a-menu slot="overlay">
|
||||
<a-menu-item key="1" @click="batchDel">
|
||||
<a-icon type="delete"/>
|
||||
删除
|
||||
</a-menu-item>
|
||||
</a-menu>
|
||||
<a-button style="margin-left: 8px"> 批量操作
|
||||
<a-icon type="down"/>
|
||||
</a-button>
|
||||
</a-dropdown>
|
||||
</div>
|
||||
|
||||
<!-- table区域-begin -->
|
||||
<div>
|
||||
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
|
||||
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{
|
||||
selectedRowKeys.length }}</a>项
|
||||
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
|
||||
</div>
|
||||
|
||||
<a-table
|
||||
ref="table"
|
||||
size="middle"
|
||||
@@ -82,31 +49,27 @@
|
||||
:pagination="ipagination"
|
||||
:loading="loading"
|
||||
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
|
||||
class="j-table-force-nowrap"
|
||||
@change="handleTableChange">
|
||||
|
||||
<!-- 字符串超长截取省略号显示-->
|
||||
<span slot="templateContent" slot-scope="text">
|
||||
<j-ellipsis :value="text" :length="25" />
|
||||
<a-tooltip>
|
||||
<template slot="title">
|
||||
<span v-html="text"></span>
|
||||
</template>
|
||||
<span v-html="myEllipsis(text,40)"></span>
|
||||
</a-tooltip>
|
||||
</span>
|
||||
|
||||
<template slot="text" slot-scope="text">
|
||||
<j-ellipsis v-if="text" :length="20" :value="text"></j-ellipsis>
|
||||
<span v-else></span>
|
||||
</template>
|
||||
|
||||
<span slot="action" slot-scope="text, record">
|
||||
<span slot="action" class="action-span-cell" slot-scope="text, record">
|
||||
<a @click="handleEdit(record)">编辑</a>
|
||||
|
||||
<a-divider type="vertical"/>
|
||||
<a-dropdown>
|
||||
<a class="ant-dropdown-link">更多 <a-icon type="down"/></a>
|
||||
<a-menu slot="overlay">
|
||||
<a-menu-item>
|
||||
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
|
||||
<a>删除</a>
|
||||
</a-popconfirm>
|
||||
</a-menu-item>
|
||||
<a-menu-item>
|
||||
<a @click="handleTest(record)">发送测试</a>
|
||||
</a-menu-item>
|
||||
</a-menu>
|
||||
</a-dropdown>
|
||||
<a @click="handleDelete(record.id)">删除</a>
|
||||
</span>
|
||||
|
||||
</a-table>
|
||||
@@ -121,133 +84,139 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import SysMessageTemplateModal from './modules/SysMessageTemplateModal'
|
||||
import SysMessageTestModal from './modules/SysMessageTestModal'
|
||||
import {JeroListMixin} from '@/mixins/JeroListMixin'
|
||||
import JEllipsis from '@/components/jero/JEllipsis'
|
||||
import SysMessageTemplateModal from './modules/SysMessageTemplateModal'
|
||||
import SysMessageTestModal from './modules/SysMessageTestModal'
|
||||
import {JeroListMixin} from '@/mixins/JeroListMixin'
|
||||
import JEllipsis from '@/components/jero/JEllipsis'
|
||||
import '@/assets/less/TableExpand.less'
|
||||
|
||||
export default {
|
||||
name: 'SysMessageTemplateList',
|
||||
mixins: [JeroListMixin],
|
||||
components: {
|
||||
JEllipsis,
|
||||
SysMessageTemplateModal,
|
||||
SysMessageTestModal
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
description: '消息模板管理页面',
|
||||
// 表头
|
||||
columns: [
|
||||
{
|
||||
title: '#',
|
||||
dataIndex: '',
|
||||
key: 'rowIndex',
|
||||
width: 60,
|
||||
align: 'center',
|
||||
customRender: function (t, r, index) {
|
||||
return parseInt(index) + 1
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '模板CODE',
|
||||
align: 'center',
|
||||
dataIndex: 'templateCode'
|
||||
},
|
||||
{
|
||||
title: '模板标题',
|
||||
align: 'center',
|
||||
dataIndex: 'templateName'
|
||||
},
|
||||
{
|
||||
title: '模板内容',
|
||||
align: 'center',
|
||||
dataIndex: 'templateContent',
|
||||
scopedSlots: {customRender: 'templateContent'},
|
||||
},
|
||||
{
|
||||
title: '模板类型',
|
||||
align: 'center',
|
||||
dataIndex: 'templateType',
|
||||
customRender: function (text) {
|
||||
if(text=='1') {
|
||||
return '短信'
|
||||
}
|
||||
if(text=='2') {
|
||||
return '邮件'
|
||||
}
|
||||
if(text=='3') {
|
||||
return '微信'
|
||||
}
|
||||
if(text=='4') {
|
||||
return '系统'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
dataIndex: 'action',
|
||||
align: 'center',
|
||||
scopedSlots: {customRender: 'action'},
|
||||
export default {
|
||||
name: 'SysMessageTemplateList',
|
||||
mixins: [JeroListMixin],
|
||||
components: {
|
||||
SysMessageTemplateModal,
|
||||
SysMessageTestModal,
|
||||
JEllipsis
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
description: '消息模板管理页面',
|
||||
// 表头
|
||||
columns: [
|
||||
{
|
||||
title: '序号',
|
||||
dataIndex: '',
|
||||
key: 'rowIndex',
|
||||
width: 60,
|
||||
align: 'center',
|
||||
customRender: function (t, r, index) {
|
||||
return parseInt(index) + 1
|
||||
}
|
||||
],
|
||||
url: {
|
||||
list: '/sys/message/sysMessageTemplate/page',
|
||||
delete: '/sys/message/sysMessageTemplate/delete',
|
||||
deleteBatch: '/sys/message/sysMessageTemplate/deleteBatch',
|
||||
exportXlsUrl: 'sys/message/sysMessageTemplate/exportXls',
|
||||
importExcelUrl: 'sys/message/sysMessageTemplate/importExcel',
|
||||
},
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
importExcelUrl: function () {
|
||||
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleTest(record){
|
||||
this.$refs.testModal.open(record)
|
||||
this.$refs.testModal.title = '发送测试'
|
||||
}
|
||||
{
|
||||
title: '模板CODE',
|
||||
align: 'center',
|
||||
dataIndex: 'templateCode',
|
||||
scopedSlots: {customRender: 'text'},
|
||||
width: 300,
|
||||
},
|
||||
{
|
||||
title: '模板标题',
|
||||
align: 'center',
|
||||
dataIndex: 'templateName',
|
||||
scopedSlots: {customRender: 'text'},
|
||||
width: 200,
|
||||
},
|
||||
{
|
||||
title: '模板内容',
|
||||
align: 'center',
|
||||
dataIndex: 'templateContent',
|
||||
scopedSlots: {customRender: 'templateContent'},
|
||||
width: 500,
|
||||
},
|
||||
{
|
||||
title: '模板类型',
|
||||
align: 'center',
|
||||
dataIndex: 'templateType',
|
||||
// 只有一个 类型 就写死了 如果新增类型 需要改
|
||||
customRender: function () { return '系统'},
|
||||
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
dataIndex: 'action',
|
||||
align: 'center',
|
||||
scopedSlots: {customRender: 'action'},
|
||||
width: 160,
|
||||
}
|
||||
],
|
||||
url: {
|
||||
list: '/sys/message/sysMessageTemplate/page',
|
||||
delete: '/sys/message/sysMessageTemplate/delete',
|
||||
deleteBatch: '/sys/message/sysMessageTemplate/deleteBatch',
|
||||
exportXlsUrl: 'sys/message/sysMessageTemplate/exportXls',
|
||||
importExcelUrl: 'sys/message/sysMessageTemplate/importExcel',
|
||||
},
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
importExcelUrl: function () {
|
||||
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleTest(record) {
|
||||
this.$refs.testModal.open(record)
|
||||
this.$refs.testModal.title = '发送测试'
|
||||
},
|
||||
myEllipsis (value, vlength = 25) {
|
||||
if(!value){
|
||||
return value
|
||||
}
|
||||
if (value.length > vlength) {
|
||||
return value.slice(0, vlength) + '...'
|
||||
}
|
||||
return value
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
/** Button按钮间距 */
|
||||
.ant-btn {
|
||||
margin-left: 3px
|
||||
}
|
||||
@import '~@assets/less/common.less';
|
||||
/** Button按钮间距 */
|
||||
.ant-btn {
|
||||
margin-left: 3px
|
||||
}
|
||||
|
||||
.ant-card-body .table-operator {
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
.ant-card-body .table-operator {
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
|
||||
.ant-table-tbody .ant-table-row td {
|
||||
padding-top: 15px;
|
||||
padding-bottom: 15px;
|
||||
}
|
||||
.ant-table-tbody .ant-table-row td {
|
||||
padding-top: 15px;
|
||||
padding-bottom: 15px;
|
||||
}
|
||||
|
||||
.anty-row-operator button {
|
||||
margin: 0 5px
|
||||
}
|
||||
.anty-row-operator button {
|
||||
margin: 0 5px
|
||||
}
|
||||
|
||||
.ant-btn-danger {
|
||||
background-color: #ffffff
|
||||
}
|
||||
.ant-btn-danger {
|
||||
background-color: #ffffff
|
||||
}
|
||||
|
||||
.ant-modal-cust-warp {
|
||||
height: 100%
|
||||
}
|
||||
.ant-modal-cust-warp {
|
||||
height: 100%
|
||||
}
|
||||
|
||||
.ant-modal-cust-warp .ant-modal-body {
|
||||
height: calc(100% - 110px) !important;
|
||||
overflow-y: auto
|
||||
}
|
||||
.ant-modal-cust-warp .ant-modal-body {
|
||||
height: calc(100% - 110px) !important;
|
||||
overflow-y: auto
|
||||
}
|
||||
|
||||
.ant-modal-cust-warp .ant-modal-content {
|
||||
height: 90% !important;
|
||||
overflow-y: hidden
|
||||
}
|
||||
.ant-modal-cust-warp .ant-modal-content {
|
||||
height: 90% !important;
|
||||
overflow-y: hidden
|
||||
}
|
||||
</style>
|
||||
@@ -21,6 +21,7 @@
|
||||
<a-input
|
||||
:disabled="disable"
|
||||
placeholder="请输入模板编码"
|
||||
@change="event => event.target.value = event.target.value.trim()" :maxLength="50"
|
||||
v-decorator="['templateCode', validatorRules.templateCode ]"
|
||||
/>
|
||||
</a-form-item>
|
||||
@@ -30,8 +31,9 @@
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
label="模板类型">
|
||||
<j-dict-select-tag @change="handleChangeTemplateType" :triggerChange="true" dictCode="msgType" v-decorator="['templateType', validatorRules.templateType ]" placeholder="请选择模板类型">
|
||||
</j-dict-select-tag>
|
||||
<!-- <j-dict-select-tag :triggerChange="true" dictCode="msgType" v-decorator="['templateType', validatorRules.templateType ]" placeholder="请选择模板类型">-->
|
||||
<!-- </j-dict-select-tag>-->
|
||||
<j-multi-select-tag :triggerChange="true" dictCode="msgType" v-decorator="['templateType', validatorRules.templateType ]" placeholder="请选择模板类型"></j-multi-select-tag>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
@@ -42,30 +44,25 @@
|
||||
:wrapperCol="wrapperCol"
|
||||
label="模板标题"
|
||||
style="margin-left: -15px">
|
||||
<a-input
|
||||
placeholder="请输入模板标题"
|
||||
v-decorator="['templateName', validatorRules.templateName]"
|
||||
style="width: 122%"
|
||||
/>
|
||||
<j-dict-select-tag :triggerChange="true" dictCode="notice_type" v-decorator="['templateName', validatorRules.templateName ]" placeholder="请选择模板类型"></j-dict-select-tag>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<!-- <a-row class="form-row" :gutter="24">-->
|
||||
<!-- <a-col :span="24" pull="4">-->
|
||||
<!-- <a-form-item-->
|
||||
<!-- v-show="!useEditor"-->
|
||||
<!-- :labelCol="labelCol"-->
|
||||
<!-- :wrapperCol="wrapperCol"-->
|
||||
<!-- label="模板内容"-->
|
||||
<!-- style="margin-left: 4px;width: 126%">-->
|
||||
<!-- <a-textarea @change="event => event.target.value = event.target.value.trim()" :maxLength="200" placeholder="请输入模板内容" v-decorator="['templateContent', validatorRules.templateContent ]" :auto-size="{ minRows: 8, maxRows: 8 }"/>-->
|
||||
<!-- </a-form-item>-->
|
||||
<!-- </a-col>-->
|
||||
<!-- </a-row>-->
|
||||
<a-row class="form-row" :gutter="24">
|
||||
<a-col :span="24" pull="4">
|
||||
<a-form-item
|
||||
v-show="!useEditor"
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
label="模板内容"
|
||||
style="margin-left: 4px;width: 126%">
|
||||
<a-textarea placeholder="请输入模板内容" v-decorator="['templateContent', validatorRules.templateContent ]" :auto-size="{ minRows: 8, maxRows: 8 }"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row class="form-row" :gutter="24">
|
||||
<a-col :span="24" pull="4">
|
||||
<a-form-item
|
||||
v-show="useEditor"
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
label="模板内容"
|
||||
@@ -87,11 +84,15 @@
|
||||
import JEditor from '@/components/jero/JEditor'
|
||||
import { encryption } from '@/utils/encryption/aesEncrypt'
|
||||
import { getKeyIv } from '@/api/api'
|
||||
import JMultiSelectTag from '@comp/dict/JMultiSelectTag'
|
||||
import JDictSelectTag from '@comp/dict/JDictSelectTag'
|
||||
|
||||
export default {
|
||||
name: 'SysMessageTemplateModal',
|
||||
components:{
|
||||
JEditor
|
||||
JEditor,
|
||||
JMultiSelectTag,
|
||||
JDictSelectTag
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -114,7 +115,7 @@
|
||||
templateCode: {rules: [{required: true, message: '请输入模板CODE!' }]},
|
||||
templateName: {rules: [{required: true, message: '请输入模板标题!'}]},
|
||||
templateContent: {rules: []},
|
||||
templateType: {rules: [{required: true, message: '请输入模板类型!'}]},
|
||||
templateType: {rules: [{required: true, message: '请选择模板类型!'}]},
|
||||
},
|
||||
url: {
|
||||
add: '/sys/message/sysMessageTemplate/add',
|
||||
@@ -225,10 +226,10 @@
|
||||
handleCancel() {
|
||||
this.close()
|
||||
},
|
||||
handleChangeTemplateType(value){
|
||||
//如果是邮件类型那么则改变模板内容是富文本编辑器
|
||||
this.useEditor = (value==2 || value==4)
|
||||
}
|
||||
// handleChangeTemplateType(value){
|
||||
// //如果是邮件类型那么则改变模板内容是富文本编辑器
|
||||
// this.useEditor = (value==2 || value==4)
|
||||
// }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,21 +5,34 @@
|
||||
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
||||
<a-row :gutter="24">
|
||||
|
||||
<a-col :span="6">
|
||||
<a-form-item label="标题">
|
||||
<a-input placeholder="请输入标题" v-model="queryParam.titile"></a-input>
|
||||
<a-col :xl="7" :lg="8" :md="8" :sm="24">
|
||||
<a-form-item label="提醒类型">
|
||||
<j-dict-select-tag dict-code="message_type" placeholder="请选择提醒类型"
|
||||
v-model="queryParam.titile"></j-dict-select-tag>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="6">
|
||||
<a-form-item label="发布人">
|
||||
<a-input placeholder="请输入发布人" v-model="queryParam.sender"></a-input>
|
||||
<a-col :xl="10" :lg="11" :md="12" :sm="24">
|
||||
<a-form-item label="提醒时间">
|
||||
<j-date
|
||||
placeholder="请选择开始日期"
|
||||
class="query-group-cust"
|
||||
v-model="queryParam.meetingStartTime"
|
||||
:disabled-date="disabledStartDate">
|
||||
</j-date>
|
||||
<span class="query-group-split-cust"></span>
|
||||
<j-date
|
||||
placeholder="请选择结束日期"
|
||||
class="query-group-cust"
|
||||
v-model="queryParam.meetingEndTime"
|
||||
:disabled-date="disabledEndDate">
|
||||
</j-date>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
||||
<a-col :span="8" >
|
||||
<a-col :xl="6" :lg="8" :md="8" :sm="24">
|
||||
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
||||
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
|
||||
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
|
||||
<a-button class="reset-button" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
|
||||
</span>
|
||||
</a-col>
|
||||
|
||||
@@ -27,10 +40,6 @@
|
||||
</a-form>
|
||||
</div>
|
||||
|
||||
<div class="table-operator">
|
||||
<a-button type="primary" @click="readAll" icon="book">全部标注已读</a-button>
|
||||
</div>
|
||||
|
||||
<a-table
|
||||
ref="table"
|
||||
size="default"
|
||||
@@ -40,10 +49,26 @@
|
||||
:dataSource="dataSource"
|
||||
:pagination="ipagination"
|
||||
:loading="loading"
|
||||
class="j-table-force-nowrap"
|
||||
@change="handleTableChange">
|
||||
<span slot="action" slot-scope="text, record">
|
||||
<span slot="action" class="action-span-cell" slot-scope="text, record">
|
||||
<a @click="showAnnouncement(record)">查看</a>
|
||||
<a @click="haveRead(record)">已读</a>
|
||||
</span>
|
||||
|
||||
<span slot="templateContent" slot-scope="text">
|
||||
<a-tooltip>
|
||||
<template slot="title">
|
||||
<span v-html="text"></span>
|
||||
</template>
|
||||
<span v-html="myEllipsis(text,40)"></span>
|
||||
</a-tooltip>
|
||||
</span>
|
||||
|
||||
<template slot="text" slot-scope="text">
|
||||
<j-ellipsis v-if="text" :value="text" :length="20"></j-ellipsis>
|
||||
<span v-else></span>
|
||||
</template>
|
||||
</a-table>
|
||||
<show-announcement ref="ShowAnnouncement"></show-announcement>
|
||||
<dynamic-notice ref="showDynamNotice" :path="openPath" :formData="formData"/>
|
||||
@@ -51,140 +76,169 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAction,putAction } from '@/api/manage'
|
||||
import ShowAnnouncement from '@/components/tools/ShowAnnouncement'
|
||||
import {JeroListMixin} from '@/mixins/JeroListMixin'
|
||||
import DynamicNotice from '../../components/tools/DynamicNotice'
|
||||
import {getAction, putAction} from '@/api/manage'
|
||||
import ShowAnnouncement from '@/components/tools/ShowAnnouncement'
|
||||
import {JeroListMixin} from '@/mixins/JeroListMixin'
|
||||
import {RangeDateMixin} from '@/mixins/RangeDateMixin'
|
||||
import DynamicNotice from '../../components/tools/DynamicNotice'
|
||||
import JDictSelectTag from '@comp/dict/JDictSelectTag'
|
||||
import '@/assets/less/TableExpand.less'
|
||||
import JDate from '@comp/tools/JDate'
|
||||
|
||||
export default {
|
||||
name: 'UserAnnouncementList',
|
||||
mixins: [JeroListMixin],
|
||||
components: {
|
||||
DynamicNotice,
|
||||
ShowAnnouncement
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
description: '系统通告表管理页面',
|
||||
queryParam: {},
|
||||
columns: [{
|
||||
title: '标题',
|
||||
align:'center',
|
||||
dataIndex: 'titile'
|
||||
},{
|
||||
title: '消息类型',
|
||||
export default {
|
||||
name: 'UserAnnouncementList',
|
||||
mixins: [JeroListMixin, RangeDateMixin],
|
||||
components: {
|
||||
DynamicNotice,
|
||||
ShowAnnouncement,
|
||||
JDictSelectTag,
|
||||
JDate
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
description: '系统通告表管理页面',
|
||||
queryParam: {},
|
||||
columns: [
|
||||
{
|
||||
title: '序号',
|
||||
dataIndex: '',
|
||||
key: 'rowIndex',
|
||||
width: 80,
|
||||
align: 'center',
|
||||
dataIndex: 'msgCategory',
|
||||
customRender: function (text) {
|
||||
if (text == '1') {
|
||||
return '通知公告'
|
||||
} else if (text == '2') {
|
||||
return '系统消息'
|
||||
} else {
|
||||
return text
|
||||
}
|
||||
customRender: function (t, r, index) {
|
||||
return parseInt(index) + 1
|
||||
}
|
||||
},{
|
||||
title: '发布人',
|
||||
align:'center',
|
||||
dataIndex: 'sender'
|
||||
},{
|
||||
title: '发布时间',
|
||||
align:'center',
|
||||
dataIndex: 'sendTime'
|
||||
},{
|
||||
title: '优先级',
|
||||
align:'center',
|
||||
dataIndex: 'priority',
|
||||
customRender:function (text) {
|
||||
if(text=='L'){
|
||||
return '低'
|
||||
}else if(text=='M'){
|
||||
return '中'
|
||||
}else if(text=='H'){
|
||||
return '高'
|
||||
} else {
|
||||
return text
|
||||
}
|
||||
}
|
||||
},{
|
||||
title: '阅读状态',
|
||||
align:'center',
|
||||
dataIndex: 'readFlag',
|
||||
customRender:function (text) {
|
||||
if(text=='0'){
|
||||
return '未读'
|
||||
}else if(text=='1'){
|
||||
return '已读'
|
||||
} else {
|
||||
return text
|
||||
}
|
||||
}
|
||||
},{
|
||||
},
|
||||
{
|
||||
title: '提醒类型',
|
||||
align: 'center',
|
||||
dataIndex: 'titile_dictText',
|
||||
scopedSlots: {customRender: 'text'},
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
title: '提醒内容',
|
||||
align: 'center',
|
||||
dataIndex: 'msgContent',
|
||||
scopedSlots: {customRender: 'templateContent'},
|
||||
},
|
||||
{
|
||||
title: '提醒时间',
|
||||
align: 'center',
|
||||
dataIndex: 'sendTime',
|
||||
scopedSlots: {customRender: 'text'},
|
||||
width: 200
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
dataIndex: 'action',
|
||||
align:'center',
|
||||
scopedSlots: { customRender: 'action' },
|
||||
}], url: {
|
||||
list: '/sys/sysAnnouncementSend/getMyAnnouncementSend',
|
||||
editCementSend:'sys/sysAnnouncementSend/editByAnntIdAndUserId',
|
||||
readAllMsg:'sys/sysAnnouncementSend/readAll',
|
||||
},
|
||||
loading:false,
|
||||
openPath:'',
|
||||
formData:''
|
||||
align: 'center',
|
||||
scopedSlots: {customRender: 'action'},
|
||||
width: 120
|
||||
}
|
||||
],
|
||||
url: {
|
||||
list: '/sys/sysAnnouncementSend/getMyAnnouncementSend',
|
||||
editCementSend: 'sys/sysAnnouncementSend/editByAnntIdAndUserId',
|
||||
readAllMsg: 'sys/sysAnnouncementSend/readAll',
|
||||
},
|
||||
dateKeyObj: {
|
||||
beginKey: 'meetingStartTime',
|
||||
endKey: 'meetingEndTime'
|
||||
},
|
||||
loading: false,
|
||||
openPath: '',
|
||||
formData: ''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleDetail: function (record) {
|
||||
this.$refs.sysAnnouncementModal.detail(record)
|
||||
this.$refs.sysAnnouncementModal.title = '查看'
|
||||
},
|
||||
showAnnouncement(record) {
|
||||
putAction(this.url.editCementSend, {anntId: record.anntId}).then((res) => {
|
||||
if (res.success) {
|
||||
this.loadData()
|
||||
this.syncHeadNotic(record.anntId)
|
||||
}
|
||||
})
|
||||
if (record.openType === 'component') {
|
||||
this.openPath = record.openPage
|
||||
this.formData = {id: record.busId}
|
||||
this.$refs.showDynamNotice.detail()
|
||||
} else if(record.openType === 'url1') {
|
||||
this.$router.push({
|
||||
path:record.openPage
|
||||
})
|
||||
}else {
|
||||
this.$refs.ShowAnnouncement.detail(record)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleDetail: function(record){
|
||||
this.$refs.sysAnnouncementModal.detail(record)
|
||||
this.$refs.sysAnnouncementModal.title='查看'
|
||||
},
|
||||
showAnnouncement(record){
|
||||
putAction(this.url.editCementSend,{anntId:record.anntId}).then((res)=>{
|
||||
if(res.success){
|
||||
this.loadData()
|
||||
this.syncHeadNotic(record.anntId)
|
||||
}
|
||||
})
|
||||
if(record.openType==='component'){
|
||||
this.openPath = record.openPage
|
||||
this.formData = {id:record.busId}
|
||||
this.$refs.showDynamNotice.detail()
|
||||
}else{
|
||||
this.$refs.ShowAnnouncement.detail(record)
|
||||
syncHeadNotic(anntId) {
|
||||
getAction('sys/annountCement/syncNotic', {anntId: anntId})
|
||||
},
|
||||
readAll() {
|
||||
var that = this
|
||||
that.$confirm({
|
||||
title: '确认操作',
|
||||
content: '是否全部标注已读?',
|
||||
onOk: function () {
|
||||
putAction(that.url.readAllMsg).then((res) => {
|
||||
if (res.success) {
|
||||
that.$message.success(res.message)
|
||||
that.loadData()
|
||||
that.syncHeadNotic()
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
syncHeadNotic(anntId){
|
||||
getAction('sys/annountCement/syncNotic',{anntId:anntId})
|
||||
},
|
||||
readAll(){
|
||||
var that = this
|
||||
that.$confirm({
|
||||
title:'确认操作',
|
||||
content:'是否全部标注已读?',
|
||||
onOk: function(){
|
||||
putAction(that.url.readAllMsg).then((res)=>{
|
||||
if(res.success){
|
||||
that.$message.success(res.message)
|
||||
that.loadData()
|
||||
that.syncHeadNotic()
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
})
|
||||
},
|
||||
haveRead() {
|
||||
console.log('已读')
|
||||
},
|
||||
/*
|
||||
* 字符串截取
|
||||
* */
|
||||
myEllipsis (value, vlength = 25) {
|
||||
if(!value){
|
||||
return value
|
||||
}
|
||||
if (value.length > vlength) {
|
||||
return value.slice(0, vlength) + '...'
|
||||
}
|
||||
return value
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.ant-card-body .table-operator{
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
.anty-row-operator button{margin: 0 5px}
|
||||
.ant-btn-danger{background-color: #ffffff}z
|
||||
@import '~@assets/less/common.less';
|
||||
|
||||
.ant-modal-cust-warp{height: 100%}
|
||||
.ant-modal-cust-warp .ant-modal-body{height:calc(100% - 110px) !important;overflow-y: auto}
|
||||
.ant-modal-cust-warp .ant-modal-content{height:90% !important;overflow-y: hidden}
|
||||
.ant-card-body .table-operator {
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
|
||||
.anty-row-operator button {
|
||||
margin: 0 5px
|
||||
}
|
||||
|
||||
.ant-btn-danger {
|
||||
background-color: #ffffff
|
||||
}
|
||||
|
||||
z
|
||||
.ant-modal-cust-warp {
|
||||
height: 100%
|
||||
}
|
||||
|
||||
.ant-modal-cust-warp .ant-modal-body {
|
||||
height: calc(100% - 110px) !important;
|
||||
overflow-y: auto
|
||||
}
|
||||
|
||||
.ant-modal-cust-warp .ant-modal-content {
|
||||
height: 90% !important;
|
||||
overflow-y: hidden
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user