Merge remote-tracking branch 'origin/feature_dev_20221025_message' into feature_dev_20221025_message

This commit is contained in:
CD
2022-10-25 14:02:24 +08:00
3 changed files with 109 additions and 33 deletions
+11 -3
View File
@@ -15,7 +15,7 @@
<a-list-item :key="index" v-for="(record, index) in announcement1" v-if="index <= 4">
<div style="margin-left: 5%;width: 80%;">
<p style="overflow: hidden; text-overflow: ellipsis;white-space: nowrap;color:#00B3BE">
<a :title="record.titile" @click="showAnnouncement(record)">{{ record.titile }}</a>
<a :title="record.msgContent" @click="showAnnouncement(record)">{{ record.msgContent }}</a>
</p>
</div>
</a-list-item>
@@ -110,6 +110,11 @@
// clearInterval(this.timer)
// },
methods: {
getText(str) {
let words = str.replace(/<[^<>]+>/g, '').replace(/&nbsp;/gi, '') //这里是去除标签
//.replace(/\s/g, '') //这里是去除空格
return words
},
loadData() {
getAction(this.url.listCementByUser).then((res) => {
if (res.success) {
@@ -134,9 +139,12 @@
showAnnouncement(record) {
getAction(this.url.readAllMsg, { ids: record.id }).then((res) => {
})
localStorage.setItem('msgContent', record.msgContent)
this.$router.push({
path: '/system/MessageDetails',
query: record
path: '/isps/userAnnouncement',
query: {
Date: Date.now()
}
})
},
toMyAnnouncement() {
@@ -11,8 +11,8 @@
<div class="myNews-box-content-box" v-for="(item,index) in dataSource" :key="index" @click="magClick(item)">
<img src="../../../assets/wdxx.png" alt="">
<div class="content-box">
<div class="top" :title="item.titile">
{{item.titile}}
<div class="top" :title="item.msgContent">
{{item.msgContent}}
</div>
<div class="botton">
{{item.sendTime}}
@@ -69,9 +69,12 @@
magClick(row) {
getAction(this.url.readAllMsg, { ids: row.id }).then((res) => {
})
localStorage.setItem('msgContent', row.msgContent)
this.$router.push({
path: '/system/MessageDetails',
query: row
path: '/isps/userAnnouncement',
query: {
Date: Date.now()
}
})
},
moreClick() {
@@ -6,12 +6,12 @@
<a-row :gutter="24">
<a-col :md="6" :sm="8" style="line-height: 48px">
<div class="box-title-text">
<div class="title-text" :title="$t('MessageTitle')">
<span>{{this.$t('MessageTitle')}}</span>
<div class="title-text" :title="$t('MessageContent')">
<span>{{this.$t('MessageContent')}}</span>
</div>
<a-input class="box-input"
:placeholder="$t('pleaseEnter')+$t('MessageTitle')"
v-model="queryParam.titile">
:placeholder="$t('pleaseEnter')+$t('MessageContent')"
v-model="queryParam.msgContent">
</a-input>
</div>
</a-col>
@@ -63,18 +63,28 @@
:dataSource="dataSource"
:scroll="{x: '100%'}"
:pagination="ipagination"
:expandIconAsCell='false'
:expandIconColumnIndex="5"
:expandIcon="expandIcon"
:loading="loading"
@expand="expandChange"
@change="handleTableChange">
<span slot="msgTitile" slot-scope="text,scope">
<a :style="{'color':scope.readFlag == 0 ? 'red':'#00A0E9'}" :title="text" @click="msgContentClick(scope)">
<!-- @click="msgContentClick(scope)"-->
<a :style="{'color':scope.readFlag == 0 ? 'red':'#00A0E9'}" :title="text">
{{text}}
</a>
</span>
<span slot="msgCategory" slot-scope="text,scope">
<a :style="{'color':scope.readFlag == 0 ? 'red':'#00A0E9'}" @click="msgContentClick(scope)">
<!-- :style="{'color':scope.readFlag == 0 ? 'red':'#00A0E9'}" @click="msgContentClick(scope)"-->
<span :title="msgCategoryQuery[text]">
{{msgCategoryQuery[text]}}
</a>
</span>
</span>
<p slot="expandedRowRender" slot-scope="record" style="margin: 0;padding-left: 58px;">
<span v-html="record.msgContentInfo">
</span>
</p>
</a-table>
<show-announcement ref="ShowAnnouncement"></show-announcement>
<dynamic-notice ref="showDynamNotice" :path="openPath" :formData="formData"/>
@@ -104,8 +114,8 @@
msgCategoryQuery: {
'1': this.$t('SubscriptionNotification'),
'2': this.$t('warningInformation'),
'3': this.$t('ForwardPush'),
'4': this.$t('CollectinguthenticationParameters'),
'3': this.$t('ForwardPush')
// '4': this.$t('CollectinguthenticationParameters'),
// '6':this.$t('RegulationListConfirmationTask'),
// '7':this.$t('RegulationListConfirmationNotification'),
// '8':this.$t('RegulationTaskConfirmation'),
@@ -115,39 +125,48 @@
// '12':this.$t('DesignComplianceNotification'),
// '13':this.$t('PreHomoNotification'),
// '14':this.$t('ValidationComplianceNotification'),
'15':this.$t('RegulationTaskConfirmationNotification'),
'17':this.$t('listConfirmation'),
'18':this.$t('taskAffirm'),
'19':this.$t('complianceConfirmation'),
'20':this.$t('collectionLegislativeComments'),
'21':this.$t('regulatoryAndTechnicalAssessment'),
// '15':this.$t('RegulationTaskConfirmationNotification'),
// '17':this.$t('listConfirmation'),
// '18':this.$t('taskAffirm'),
// '19':this.$t('complianceConfirmation'),
// '20':this.$t('collectionLegislativeComments'),
// '21':this.$t('regulatoryAndTechnicalAssessment'),
},
columns: [
{
title: this.$t('MessageTitle'),
align: 'center',
dataIndex: 'titile',
title: this.$t('MessageContent'),
align: 'left',
dataIndex: 'msgContent',
ellipsis: true,
scopedSlots: { customRender: 'msgTitile' }
},
{
title: this.$t('Sponsor'),
align: 'center',
align: 'left',
ellipsis: true,
dataIndex: 'initiator',
width: 200,
width: 200
},
{
title: this.$t('MessageType'),
align: 'center',
align: 'left',
ellipsis: true,
dataIndex: 'msgCategory',
width: 200,
scopedSlots: { customRender: 'msgCategory' }
},
{
title: this.$t('NotificationTime'),
align: 'center',
align: 'left',
ellipsis: true,
width: 200,
dataIndex: 'sendTime'
},
{
title:'',
align: 'left',
ellipsis: true,
width: 50,
}
],
url: {
@@ -161,7 +180,42 @@
formData: ''
}
},
watch: {
$route: function(res) {
console.log(res)
this.loadData()
}
},
methods: {
expandIcon(props) {
if (props.expanded) {
return <a-icon type='down' onClick={e => {
props.onExpand(props.record, e);
}}/>;
} else {
return <a-icon type='right' onClick={e => {
props.onExpand(props.record, e);
}}/>;
}
},
getQueryParams() {
//获取查询条件
let sqp = {}
if (this.superQueryParams) {
sqp['superQueryParams'] = encodeURI(this.superQueryParams)
sqp['superQueryMatchType'] = this.superQueryMatchType
}
if (localStorage.getItem('msgContent')) {
this.queryParam.msgContent = localStorage.getItem('msgContent')
this.queryParam = { ...this.queryParam }
localStorage.removeItem('msgContent')
}
var param = Object.assign(sqp, this.queryParam, this.isorter, this.filters)
param.field = this.getQueryField()
param.pageNo = this.ipagination.current
param.pageSize = this.ipagination.pageSize
return filterObj(param)
},
showAnnouncement(record) {
putAction(this.url.editCementSend, { anntId: record.anntId }).then((res) => {
if (res.success) {
@@ -177,6 +231,13 @@
this.$refs.ShowAnnouncement.detail(record)
}
},
expandChange(isTrue, val) {
if (isTrue) {
if (val.readFlag == '0') {
this.msgContentClick(val)
}
}
},
readAll() {
var that = this
if (this.selectedRowKeys.length > 0) {
@@ -204,11 +265,12 @@
},
msgContentClick(row) {
getAction(this.url.readAllMsg, { ids: row.id }).then((res) => {
// this.loadData()
})
this.$router.push({
path: '/system/MessageDetails',
query: row
})
// this.$router.push({
// path: '/system/MessageDetails',
// query: row
// })
},
handleDel() {
var that = this
@@ -297,6 +359,9 @@
height: 38px;
/*margin-top: 2px;*/
}
::v-deep .ant-table .ant-table-row-indent + .ant-table-row-expand-icon{
margin-right: 0;
}
</style>
<style>
.box-input .ant-select-selection {