瀏覽代碼

公告详情标题修改

cfort 2 年之前
父節點
當前提交
4bbb041542

+ 4 - 2
src/views/system/dashboard/components/util.js

@@ -355,8 +355,10 @@ export function buildComponent (name, column, preview, vm) {
                     this.$emit('action-event', command, ...Array.from(arguments).slice(1))
                 },
                 // 公告栏目点击事件
-                handleApprove (id) {
-                    this.$emit('action-event', 'approve', id)
+                handleApprove (id, title) {
+                    this.$emit('action-event', 'approve', {
+                        id, title
+                    })
                 },
                 handleUnreadMessage (id) {
                     this.$emit('action-event', 'unRead', id)

+ 1 - 1
src/views/system/dashboard/templates/notice.vue

@@ -23,7 +23,7 @@
                     <ibps-list-item
                         v-for="(n, index) in data"
                         :key="index"
-                        @click.native="handleApprove(n.id)"
+                        @click.native="handleApprove(n.id, n.title)"
                     >
                         <ibps-list-item-meta>
                             <!-- <div slot="avatar"><ibps-icon name="bolt" style="color:#5cb85c;margin: 5px 0 0 5px;" /></div> -->

+ 5 - 3
src/views/system/homepage/index.vue

@@ -32,7 +32,7 @@
 
         <ibps-news-dialog
             :id="newsEditId"
-            title="公告栏目明细"
+            :title="newsTitle"
             :visible="ibpsNewsDialogVisible"
             :readonly="true"
             @close="visible => (ibpsNewsDialogVisible = visible)"
@@ -167,6 +167,7 @@ export default {
             taskId: '',
             ibpsNewsDialogVisible: false,
             newsEditId: '',
+            newsTitle: '公告明细',
             showRepost: true,
 
             ibpsMessageDialogVisible: false,
@@ -357,9 +358,10 @@ export default {
             const deleteIndex = this.layout.findIndex(item => item.i === '0')
             this.layout.splice(deleteIndex, 1)
         },
-        handleApprove (id) {
+        handleApprove (params) {
             this.ibpsNewsDialogVisible = true
-            this.newsEditId = id
+            this.newsEditId = params.id || params
+            this.newsTitle = params.title || this.newsTitle
         },
         handleUnreadMessage (id) {
             this.ibpsMessageDialogVisible = true