mirror of
https://github.com/kuaifan/dootask.git
synced 2026-02-27 12:20:43 +00:00
fix:审批中心 - 添加loading效果
This commit is contained in:
parent
b16b214099
commit
7582727753
@ -7,7 +7,7 @@
|
||||
<div class="approve-nav">
|
||||
<h1>{{$L('审批中心')}}</h1>
|
||||
</div>
|
||||
<Button type="primary" @click="addApply">{{$L("添加申请")}}</Button>
|
||||
<Button :loading="addLoadIng" type="primary" @click="addApply">{{$L("添加申请")}}</Button>
|
||||
</div>
|
||||
|
||||
<Tabs :value="tabsValue" @on-click="tabsClick" style="margin: 0 20px;height: 100%;" size="small">
|
||||
@ -19,7 +19,7 @@
|
||||
</Select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="noData" v-if="unreadList.length==0">{{$L('暂无数据')}}</div>
|
||||
<div v-if="unreadList.length==0" class="noData" >{{$L('暂无数据')}}</div>
|
||||
<div v-else class="approve-mains">
|
||||
<div class="approve-main-left">
|
||||
<div class="approve-main-list">
|
||||
@ -65,7 +65,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="noData" v-if="notifyList.length==0">{{$L('暂无数据')}}</div>
|
||||
<div v-if="notifyList.length==0" class="noData">{{$L('暂无数据')}}</div>
|
||||
<div v-else class="approve-mains">
|
||||
<div class="approve-main-left">
|
||||
<div class="approve-main-list">
|
||||
@ -90,7 +90,7 @@
|
||||
</Select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="noData" v-if="initiatedList.length==0">{{$L('暂无数据')}}</div>
|
||||
<div v-if="notifyList.length==0" class="noData">{{$L('暂无数据')}}</div>
|
||||
<div v-else class="approve-mains">
|
||||
<div class="approve-main-left">
|
||||
<div class="approve-main-list">
|
||||
@ -205,6 +205,7 @@ export default {
|
||||
total: 0,
|
||||
noText: '',
|
||||
loadIng: false,
|
||||
addLoadIng: false,
|
||||
|
||||
tabsValue: "",
|
||||
//
|
||||
@ -320,7 +321,9 @@ export default {
|
||||
return;
|
||||
}
|
||||
this.__tabsClick = setTimeout(() => { this.__tabsClick =null; },time)
|
||||
|
||||
if(time == 0){
|
||||
this.loadIng = true;
|
||||
}
|
||||
this.tabsValue = val || this.tabsValue
|
||||
if(val!=""){
|
||||
this.approvalType = this.searchState = "all"
|
||||
@ -392,7 +395,7 @@ export default {
|
||||
}).catch(({msg}) => {
|
||||
$A.modalError(msg);
|
||||
}).finally(_ => {
|
||||
this.loadIng--;
|
||||
this.loadIng = false;
|
||||
});
|
||||
},
|
||||
|
||||
@ -425,7 +428,7 @@ export default {
|
||||
}).catch(({msg}) => {
|
||||
$A.modalError(msg);
|
||||
}).finally(_ => {
|
||||
this.loadIng--;
|
||||
this.loadIng = false;
|
||||
});
|
||||
},
|
||||
|
||||
@ -458,7 +461,7 @@ export default {
|
||||
}).catch(({msg}) => {
|
||||
$A.modalError(msg);
|
||||
}).finally(_ => {
|
||||
this.loadIng--;
|
||||
this.loadIng = false;
|
||||
});
|
||||
},
|
||||
|
||||
@ -492,12 +495,13 @@ export default {
|
||||
}).catch(({msg}) => {
|
||||
$A.modalError(msg);
|
||||
}).finally(_ => {
|
||||
this.loadIng--;
|
||||
this.loadIng = false;
|
||||
});
|
||||
},
|
||||
|
||||
// 添加申请
|
||||
addApply(){
|
||||
this.addLoadIng = true;
|
||||
this.$store.dispatch("call", {
|
||||
url: 'users/basic',
|
||||
data: {
|
||||
@ -516,12 +520,11 @@ export default {
|
||||
}).catch(({msg}) => {
|
||||
$A.modalError(msg);
|
||||
}).finally(_ => {
|
||||
this.loadIng--;
|
||||
this.addLoadIng = false;
|
||||
});
|
||||
}).catch(({msg}) => {
|
||||
this.addLoadIng = false;
|
||||
$A.modalError(msg);
|
||||
}).finally(_ => {
|
||||
this.loadIng--;
|
||||
});
|
||||
},
|
||||
|
||||
@ -529,7 +532,7 @@ export default {
|
||||
onInitiate(){
|
||||
this.$refs.initiateRef.validate((valid) => {
|
||||
if (valid) {
|
||||
this.loadIng = 1;
|
||||
this.loadIng = true;
|
||||
var obj = JSON.parse(JSON.stringify(this.addData))
|
||||
|
||||
obj.startTime = obj.startTime +" "+ obj.startTimeHour + ":" + obj.startTimeMinute;
|
||||
@ -557,14 +560,12 @@ export default {
|
||||
}).catch(({msg}) => {
|
||||
$A.modalError(msg);
|
||||
}).finally(_ => {
|
||||
this.loadIng--;
|
||||
this.loadIng = false;
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user