diff --git a/jero-web/src/components/tools/HeaderNotice.vue b/jero-web/src/components/tools/HeaderNotice.vue index 8ff499e95..e3ea56c27 100644 --- a/jero-web/src/components/tools/HeaderNotice.vue +++ b/jero-web/src/components/tools/HeaderNotice.vue @@ -15,7 +15,7 @@

- {{ record.titile }} + {{ record.msgContent }}

@@ -110,6 +110,11 @@ // clearInterval(this.timer) // }, methods: { + getText(str) { + let words = str.replace(/<[^<>]+>/g, '').replace(/ /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() { diff --git a/jero-web/src/views/dashboard/components/myNews.vue b/jero-web/src/views/dashboard/components/myNews.vue index f1d76361c..719748291 100644 --- a/jero-web/src/views/dashboard/components/myNews.vue +++ b/jero-web/src/views/dashboard/components/myNews.vue @@ -11,8 +11,8 @@
-
- {{item.titile}} +
+ {{item.msgContent}}
{{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() { diff --git a/jero-web/src/views/system/UserAnnouncementList.vue b/jero-web/src/views/system/UserAnnouncementList.vue index cd35b34c8..fbb96c3d5 100644 --- a/jero-web/src/views/system/UserAnnouncementList.vue +++ b/jero-web/src/views/system/UserAnnouncementList.vue @@ -6,12 +6,12 @@
-
- {{this.$t('MessageTitle')}} +
+ {{this.$t('MessageContent')}}
+ :placeholder="$t('pleaseEnter')+$t('MessageContent')" + v-model="queryParam.msgContent">
@@ -63,18 +63,28 @@ :dataSource="dataSource" :scroll="{x: '100%'}" :pagination="ipagination" + :expandIconAsCell='false' + :expandIconColumnIndex="5" + :expandIcon="expandIcon" :loading="loading" + @expand="expandChange" @change="handleTableChange"> - + + {{text}} - + + {{msgCategoryQuery[text]}} - + +

+ + +

@@ -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 { + props.onExpand(props.record, e); + }}/>; + } else { + return { + 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; + }