فهرست منبع

出差与外出

wgl 4 سال پیش
والد
کامیت
85c48306c7

+ 23 - 5
src/components/Common.vue

@@ -1,11 +1,14 @@
 <template>
-	<div></div>
+	<div>
+		<loading :visible="isLoading" :doLoading="doLoading"></loading>
+	</div>
 </template>
 
 <script>
 	const projectName = require('$root/config/project');
 	import * as API_WeiXin from '$project/apis/weixin'
 	import * as API_User from '$project/apis/user'
+	import Loading from '$project/components/Loading.vue'
 	import {
 		getUrlParam,
 		getWeixinRedirectURI,
@@ -19,7 +22,9 @@
 	import * as Dictionaries from '$project/utils/dictionaries'
 	export default {
 		name: 'Common',
-		components: {},
+		components: {
+			Loading,
+		},
 		props: {
 			//是否获取openid
 			checkOpenId: {
@@ -36,9 +41,15 @@
 				require: false,
 				default: true,
 			},
+			doLoading: {
+				require: false,
+				default: false,
+			},
 		},
 		data() {
-			return {}
+			return {
+				isLoading: false,
+			}
 		},
 		created() {
 			//公共组件的执行方法放在created中执行,父组件的create放在motuned中执行
@@ -102,8 +113,13 @@
 			},
 			//获取用户详情
 			getUserInfoByOpenId() {
+				this.isLoading = true;
+				
 				var type = type || '';
 				API_WeiXin.getDataByOpenId(this.openId).then(response => {
+					
+					this.isLoading = false;
+					
 					//console.log(response)
 
 					var token = response ? response.token : '';
@@ -135,9 +151,11 @@
 			},
 			//获取所有功能列表
 			getAllFunList() {
+				this.isLoading = true;
 				API_User.getAllFunList().then(response => {
-					console.log('response');
-					console.log(response);
+					
+					this.isLoading = false;
+					
 					if (response && response.allIcon) {
 						var allIcon = response.allIcon;
 						this.set_fun_list(allIcon);

+ 6 - 2
src/components/Loading.vue

@@ -1,7 +1,7 @@
 <template>
 	<div>
-		<div :class="visible?'mui-loading z-loading':'mui-loading'">
-			<div v-show="visible"><img src="~$project/assets/img/xxd_loading.gif" /></div>
+		<div :class="(visible && doLoading)?'mui-loading z-loading':'mui-loading'">
+			<div v-show="visible && doLoading"><img src="~$project/assets/img/xxd_loading.gif" /></div>
 		</div>
 	</div>
 </template>
@@ -14,6 +14,10 @@
 				require: false,
 				default: false,
 			},
+			doLoading: {
+				require: false,
+				default: true,
+			}
 		},
 		methods: {},
 		mounted() {}

+ 2 - 0
src/projects/business/views/Master/Attendance/Sign.vue

@@ -56,6 +56,8 @@
 				</button>
 			</div>
 		</div>
+
+		<loading :visible="isLoading"></loading>
 	</div>
 </template>
 

+ 3 - 1
src/projects/business/views/Master/BusinessTravel/Form.vue

@@ -172,7 +172,9 @@
 						mui.toast('提交成功');
 						this.$router.push({
 							name: 'MasterBusinessTravelInfo',
-							id: response.id
+							query:{
+								id: response.id
+							}
 						})
 					}).catch(error => {
 						this.isLoading = false;

+ 3 - 3
src/projects/business/views/Master/BusinessTravel/Info.vue

@@ -1,12 +1,12 @@
 <template>
 	<div>
-		<common @asynCallBack="asynCallBack"></common>
+		<common @asynCallBack="asynCallBack" :doLoading="true"></common>
 		<top-header :pageTitle="pageTitle"></top-header>
 
-		<div class="mui-content vongi-qingjiadt">
+		<div v-if="detail.personName" class="mui-content vongi-qingjiadt">
 			<div class="vongi-qingjiadt-head flew-sp">
 				<div class="flew-items">
-					<div class="flew"><img :src="detail.faceImageUrl" width="50" /></div>
+					<div class="flew"><img :src="detail.faceImageUrl" width="50" v-viewer /></div>
 					<h4>{{detail.personName}} 申请 <span class="color4fc5f7" v-text="detail.typeN"></span></h4>
 				</div>
 				<button class="mui-btn  mui-btn-primary mui-btn-outlined" :style="getColor(detail.status)" v-text="detail.statusN"></button>

+ 3 - 1
src/projects/business/views/Master/BusinessTravel/List.vue

@@ -20,10 +20,12 @@
 							</p>
 						</router-link>
 					</li>
-
 				</ul>
 			</div>
 		</div>
+		
+		<NullList :remark="'暂无申请记录'" v-if="!recordList.length"></NullList>
+		
 		<div class="fyy-footer">
 			<div class="bindfyy-btn" @click="goToForm"><button type="submit" class="mui-btn mui-btn-primary ">填写出差申请单</button></div>
 		</div>

+ 1 - 1
src/projects/business/views/Master/BusinessTravel/VerifyInfo.vue

@@ -1,6 +1,6 @@
 <template>
 	<div>
-		<common @asynCallBack="asynCallBack"></common>
+		<common @asynCallBack="asynCallBack" :doLoading="true"></common>
 		<top-header :pageTitle="pageTitle"></top-header>
 
 		<div class="mui-content vongi-wordcard">

+ 15 - 10
src/projects/business/views/Master/BusinessTravel/VerifyList.vue

@@ -4,17 +4,22 @@
 		<top-header :pageTitle="pageTitle"></top-header>
 
 		<div class="mui-content vongi-wordcard-sp">
-			<div id="slider" class="mui-slider mui-fullscreen vongi-over">
-				<div id="sliderSegmentedControl" class="mui-scroll-wrapper mui-slider-indicator mui-segmented-control mui-segmented-control-inverted">
-					<div class="mui-scroll">
-						<a @click="reloadList('0')" :class="'mui-control-item '+(listForm.status=='0'?'mui-active':'')">
-							<span class="fyy-badge">待处理<span class="mui-badge" v-if="firstRecordsTotal" v-text="firstRecordsTotal"></span></span>
-						</a>
-						<a @click="reloadList('1')" :class="'mui-control-item '+(listForm.status=='1'?'mui-active':'')">
-							已处理
-						</a>
-					</div>
+			
+			<div id="sliderSegmentedControl" class="mui-scroll-wrapper mui-slider-indicator mui-segmented-control mui-segmented-control-inverted">
+				<div class="mui-scroll">
+					<a @click="reloadList('0')" :class="'mui-control-item '+(listForm.status=='0'?'mui-active':'')">
+						<span class="fyy-badge">待处理<span class="mui-badge" v-if="firstRecordsTotal" v-text="firstRecordsTotal"></span></span>
+					</a>
+					<a @click="reloadList('1')" :class="'mui-control-item '+(listForm.status=='1'?'mui-active':'')">
+						已处理
+					</a>
 				</div>
+			</div>
+			
+			<NullList :remark="'暂无申请记录'" v-if="!recordList.length"></NullList>
+			
+			<div id="slider" class="mui-slider mui-fullscreen vongi-over">
+				
 				<div class="mui-slider-group vongi-cchai">
 					<div v-if="listForm.status=='0'" class="mui-slider-item mui-control-content mui-active">
 						<div class="mui-scroll-wrapper vongi-over-hei">

+ 3 - 1
src/projects/business/views/Master/Egress/Form.vue

@@ -172,7 +172,9 @@
 						mui.toast('提交成功');
 						this.$router.push({
 							name: 'MasterEgressInfo',
-							id: response.id
+							query: {
+								id: response.id
+							}
 						})
 					}).catch(error => {
 						this.isLoading = false;

+ 3 - 3
src/projects/business/views/Master/Egress/Info.vue

@@ -1,12 +1,12 @@
 <template>
 	<div>
-		<common @asynCallBack="asynCallBack"></common>
+		<common @asynCallBack="asynCallBack" :doLoading="true"></common>
 		<top-header :pageTitle="pageTitle"></top-header>
 
-		<div class="mui-content vongi-qingjiadt">
+		<div v-if="detail.personName" class="mui-content vongi-qingjiadt">
 			<div class="vongi-qingjiadt-head flew-sp">
 				<div class="flew-items">
-					<div class="flew"><img :src="detail.faceImageUrl" width="50" /></div>
+					<div class="flew"><img :src="detail.faceImageUrl" width="50" v-viewer /></div>
 					<h4>{{detail.personName}} 申请 <span class="color4fc5f7" v-text="detail.typeN"></span></h4>
 				</div>
 				<button class="mui-btn  mui-btn-primary mui-btn-outlined" :style="getColor(detail.status)" v-text="detail.statusN"></button>

+ 3 - 0
src/projects/business/views/Master/Egress/List.vue

@@ -22,6 +22,9 @@
 				</ul>
 			</div>
 		</div>
+		
+		<NullList :remark="'暂无申请记录'" v-if="!recordList.length"></NullList>
+		
 		<div class="fyy-footer">
 			<div class="bindfyy-btn"><button @click="goToForm" type="submit" class="mui-btn mui-btn-primary ">填写外出申请单</button></div>
 		</div>

+ 1 - 1
src/projects/business/views/Master/Egress/VerifyInfo.vue

@@ -1,6 +1,6 @@
 <template>
 	<div>
-		<common @asynCallBack="asynCallBack"></common>
+		<common @asynCallBack="asynCallBack" :doLoading="true"></common>
 		<top-header :pageTitle="pageTitle"></top-header>
 
 		<div class="mui-content vongi-wordcard">

+ 15 - 10
src/projects/business/views/Master/Egress/VerifyList.vue

@@ -4,17 +4,22 @@
 		<top-header :pageTitle="pageTitle"></top-header>
 
 		<div class="mui-content vongi-wordcard-sp">
-			<div id="slider" class="mui-slider mui-fullscreen vongi-over">
-				<div id="sliderSegmentedControl" class="mui-scroll-wrapper mui-slider-indicator mui-segmented-control mui-segmented-control-inverted">
-					<div class="mui-scroll">
-						<a @click="reloadList('0')" :class="'mui-control-item '+(listForm.status=='0'?'mui-active':'')">
-							<span class="fyy-badge">待处理<span class="mui-badge" v-if="firstRecordsTotal" v-text="firstRecordsTotal"></span></span>
-						</a>
-						<a @click="reloadList('1')" :class="'mui-control-item '+(listForm.status=='1'?'mui-active':'')">
-							已处理
-						</a>
-					</div>
+			
+			<div id="sliderSegmentedControl" class="mui-scroll-wrapper mui-slider-indicator mui-segmented-control mui-segmented-control-inverted">
+				<div class="mui-scroll">
+					<a @click="reloadList('0')" :class="'mui-control-item '+(listForm.status=='0'?'mui-active':'')">
+						<span class="fyy-badge">待处理<span class="mui-badge" v-if="firstRecordsTotal" v-text="firstRecordsTotal"></span></span>
+					</a>
+					<a @click="reloadList('1')" :class="'mui-control-item '+(listForm.status=='1'?'mui-active':'')">
+						已处理
+					</a>
 				</div>
+			</div>
+			
+			<NullList :remark="'暂无申请记录'" v-if="!recordList.length"></NullList>
+			
+			<div id="slider" class="mui-slider mui-fullscreen vongi-over">
+				
 				<div class="mui-slider-group vongi-cchai">
 					<div v-if="listForm.status=='0'" class="mui-slider-item mui-control-content mui-active">
 						<div id="scroll1" class="mui-scroll-wrapper vongi-over-hei">