caf34879 by liangyifan

待办箱

1 parent d74dee29
......@@ -66,19 +66,7 @@ export default {
computed: {
...mapGetters(['dictData']),
},
mounted () {
sendThis(this);
let that = this
document.addEventListener('visibilitychange', function() {
var isHidden = document.hidden;
if (isHidden) {//切离该页面时执行
//页面切换时,处理逻辑
} else {//切换到该页面时执行
console.log('让我看看')
that.fetchData()
}
});
},
data () {
return {
......@@ -99,8 +87,27 @@ export default {
},
};
},
mounted () {
sendThis(this);
let that = this
window.addEventListener('visibilitychange',this.init,true)
},
destroyed(){
window.removeEventListener('visibilitychange',this.init,true)
},
created () { },
methods: {
init(e){
var isHidden = document.hidden;
if (isHidden) {//切离该页面时执行
//页面切换时,处理逻辑
} else {//切换到该页面时执行
if(window.location.hash=='#/ywbl/dbx'){
console.log('让我看看',window.location)
that.fetchData()
}
}
},
// 列表渲染接口
fetchData () {
searchTaskToDo({ ...this.queryForm, ...this.pageData }).then(res => {
......
......@@ -27,7 +27,7 @@
@click=" () => {
this.isShowdrawer = !this.isShowdrawer;}">
</div>
<ul v-if='this.isShowdrawer'>
<ul v-if='this.isShowdrawer&&unitData.length>1'>
<p>受理单元列表({{unitData.length}})</p>
<div v-for='(item,index) in unitData' :key='index'>
<li @click='unitClick(item)'>{{item.bdcdyh}}</li>
......