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