caf34879 by liangyifan

待办箱

1 parent d74dee29
...@@ -66,19 +66,7 @@ export default { ...@@ -66,19 +66,7 @@ export default {
66 computed: { 66 computed: {
67 ...mapGetters(['dictData']), 67 ...mapGetters(['dictData']),
68 }, 68 },
69 mounted () { 69
70 sendThis(this);
71 let that = this
72 document.addEventListener('visibilitychange', function() {
73 var isHidden = document.hidden;
74 if (isHidden) {//切离该页面时执行
75 //页面切换时,处理逻辑
76 } else {//切换到该页面时执行
77 console.log('让我看看')
78 that.fetchData()
79 }
80 });
81 },
82 70
83 data () { 71 data () {
84 return { 72 return {
...@@ -99,8 +87,27 @@ export default { ...@@ -99,8 +87,27 @@ export default {
99 }, 87 },
100 }; 88 };
101 }, 89 },
90 mounted () {
91 sendThis(this);
92 let that = this
93 window.addEventListener('visibilitychange',this.init,true)
94 },
95 destroyed(){
96 window.removeEventListener('visibilitychange',this.init,true)
97 },
102 created () { }, 98 created () { },
103 methods: { 99 methods: {
100 init(e){
101 var isHidden = document.hidden;
102 if (isHidden) {//切离该页面时执行
103 //页面切换时,处理逻辑
104 } else {//切换到该页面时执行
105 if(window.location.hash=='#/ywbl/dbx'){
106 console.log('让我看看',window.location)
107 that.fetchData()
108 }
109 }
110 },
104 // 列表渲染接口 111 // 列表渲染接口
105 fetchData () { 112 fetchData () {
106 searchTaskToDo({ ...this.queryForm, ...this.pageData }).then(res => { 113 searchTaskToDo({ ...this.queryForm, ...this.pageData }).then(res => {
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
27 @click=" () => { 27 @click=" () => {
28 this.isShowdrawer = !this.isShowdrawer;}"> 28 this.isShowdrawer = !this.isShowdrawer;}">
29 </div> 29 </div>
30 <ul v-if='this.isShowdrawer'> 30 <ul v-if='this.isShowdrawer&&unitData.length>1'>
31 <p>受理单元列表({{unitData.length}})</p> 31 <p>受理单元列表({{unitData.length}})</p>
32 <div v-for='(item,index) in unitData' :key='index'> 32 <div v-for='(item,index) in unitData' :key='index'>
33 <li @click='unitClick(item)'>{{item.bdcdyh}}</li> 33 <li @click='unitClick(item)'>{{item.bdcdyh}}</li>
......