Browse Source

Merge branch 'master' of http://139.196.39.194:9021/chenc/cd-work-flow-web

jbb 2 years ago
parent
commit
392e5e5ec6
2 changed files with 10 additions and 4 deletions
  1. 7 2
      src/components/tools/HeaderNotice.vue
  2. 3 2
      src/views/system/UserAnnouncementList.vue

+ 7 - 2
src/components/tools/HeaderNotice.vue

@@ -96,7 +96,7 @@ import { getAction, putAction } from '@/api/manage'
 import ShowAnnouncement from './ShowAnnouncement'
 import store from '@/store/'
 import DynamicNotice from './DynamicNotice'
-
+import Utils from '../../api/util.js';
 export default {
     name: 'HeaderNotice',
     components: {
@@ -129,9 +129,14 @@ export default {
     computed: {
         msgTotal () {
             return parseInt(this.msg1Count) + parseInt(this.msg2Count)
-        }
+        },
     },
     mounted () {
+        var that = this;
+        Utils.$on('demo', function (msg) {
+            // console.log(msg);
+            that.timerFun();
+        })
         this.loadData()
         // this.timerFun();
         this.initWebSocket()

+ 3 - 2
src/views/system/UserAnnouncementList.vue

@@ -49,14 +49,13 @@
     <dynamic-notice ref="showDynamNotice" :path="openPath" :formData="formData"/>
   </a-card>
 </template>
-
 <script>
   import { filterObj } from '@/utils/util'
   import { getAction,putAction } from '@/api/manage'
   import ShowAnnouncement from '@/components/tools/ShowAnnouncement'
   import {JeecgListMixin} from '@/mixins/JeecgListMixin'
   import DynamicNotice from '../../components/tools/DynamicNotice'
-
+  import Utils from '../../api/util.js';
   export default {
     name: "UserAnnouncementList",
     mixins: [JeecgListMixin],
@@ -143,9 +142,11 @@
         this.$refs.sysAnnouncementModal.title="查看";
       },
       showAnnouncement(record){
+        
         putAction(this.url.editCementSend,{anntId:record.anntId}).then((res)=>{
           if(res.success){
             this.loadData();
+            Utils.$emit('demo','msg');
           }
         });
         if(record.openType==='component'){