<template>
<div>
   
		<div class="mui-content" style="padding-top: 12px;">
			<div class="vongi-qingjiadt mt-10">
				<form class="mui-input-group">
					<div class="mui-input-row">
						<label>补卡班次</label>
						<span>{{adjustShiftDetail.attendanceDate}}</span>
					</div>
					<div class="mui-input-row">
						<label>补卡人员</label>
						<span class="vongi-span">{{adjustShiftDetail.name}}</span>

					</div>
				</form>
			</div>
			<div class="vongi-qingjiadt vongi-hdsq mt-10">
				<form class="mui-input-group vongi-wybx">
					<div class="mui-input-row">
						<label>申请理由</label>
						<span class="vongi-span">{{adjustShiftDetail.reason}}</span>

					</div>
					<div class="mui-input-row padd10">
						<label>图片附件</label>
						<span class="vongi-span vongi-wordcard vongi-meform-pho">
							<div class="fyy-upphoto flew" >
								<template  v-if="adjustShiftDetail.imageUrl">
									<div class="mui-col-xs-3"  v-for="(item,index) in adjustShiftDetail.imageUrl.split(',')">
										<img :src="item" v-viewer />
									</div>
								</template>
								
							
							</div>
						</span>
					</div>

				</form>
			</div>
		 			<div class="vongi-qingjiadt mt-10">
		 				<form class="mui-input-group">
		 					<div class="mui-input-row">
		 						<label>申请时间</label>
		 						<span>{{adjustShiftDetail.createTime}}</span>
		 					</div>
		 					<div class="mui-input-row">
		 						<label>审核状态</label>
								<span class="" :class="{'colorf8b155':adjustShiftDetail.status=='0','color55f868':adjustShiftDetail.status=='1'||adjustShiftDetail.status=='4','colorfe616c':adjustShiftDetail.status=='2'||adjustShiftDetail.status=='3'}">{{adjustShiftDetail.statusName}}</span></span>
								
 		 					</div>
		 
		 				</form>
		 			</div>

			 
		</div>
			<loading :visible="isLoading"></loading>
</div>
</template>


<script>
	import * as API from '@/apis-xsy/applyclass'
	import * as API_sp from '@/apis-xsy/xsy'
import ExamineDetail from '$project/components/ExamineDetail.vue'

	import Common from '$project/components/Common.vue'
	import Loading from '$project/components/Loading.vue'
	import TopHeader from '$project/components/TopHeader.vue'
	import {
		mapGetters,
		mapMutations
	} from 'vuex'

	export default {
		name: '',
		components: {
			Common,
			Loading,
			TopHeader,ExamineDetail
		},
		data() {
			return {
				pageTitle: '申请调班详情',

				isLoading: false,
				id: '',
				adjustShiftDetail: {},
				examineDetail: {},
				only: "test"

			}
		},
		created() {
			this.id = this.$route.query.id;
		},
		methods: {
			allowExamine(op){
				this.$emit('allowExamine',op);
				
			},
			getClass(ac, i) {
				var reclass = ""
				
				if (ac.action == "0") {
					if (this.only == "test") {

						this.only = i;
					}
					if (this.only == i) {
						return "color3385FF"
					} else {
						return "mui-hidden"
					}

				}

				if (ac.action == "3" || ac.action == "2") {
					return "colorfe616c"
				}

				if (ac.action == "1" || ac.action == "4") {
					return "color389E0D"
				}
				return reclass
			},
		 
			getSupplementWorkBatchDetail() {
				this.isLoading = true;

				API.supplementWorkBatchDetail(this.id).then(response => {
					this.adjustShiftDetail = response;
					this.adjustShiftDetail.sp=true;
					this.isLoading = false;
					
					if(this.adjustShiftDetail.status==4){
						this.adjustShiftDetail.text="安排调班"
					}else{
						this.adjustShiftDetail.text="申请调班"
					}
					 this.$emit('getInfo',this.adjustShiftDetail);
					
				}).catch(error => {
					this.isLoading = false;
					mui.toast(error);
				})
			},
			asynCallBack() {

			},
			update() {
				this.adjustShiftDetail.sp=false;
				this.getSupplementWorkBatchDetail();
			 
			}
		},
		mounted() {
			this.getSupplementWorkBatchDetail();
			
		},
		destroyed() {},

	}
</script>

<style src="$project/assets/css/iconfont.css"></style>
<style scoped src="$project/assets/css/xpwyfyy.css"></style>
<style src="$project/assets/css/xsy.css"></style>
<style>
</style>
