<template>
	<view>
		<view class="padding">
			<view class="cu-form-group border-ddd border-rad margin-top-sm">
				<view class="title">拆下日期:</view>
				<view class="title">{{ pdetails_arr.zchdt }}</view>
			</view>
			<view class="cu-form-group border-ddd border-rad margin-top">
				<view class="title">短机号:</view>
				<view class="title">{{ pdetails_arr.zmsgrp }}</view>
			</view>
			<view class="cu-form-group border-ddd border-rad margin-top">
				<view class="title">件号:</view>
				<view class="title">{{ pdetails_arr.matnr }}</view>
			</view>
			<view class="cu-form-group border-ddd border-rad margin-top">
				<view class="title">序号:</view>
				<view class="title">{{ pdetails_arr.sernr }}</view>
			</view>
			<view v-if="pdetails_arr.workerType == '1'">
				<!-- <view class="titles">787/737/737MAX机型:</view> -->
				<view class="titles">{{ pdetails_arr.mpActype }}机型:</view>
				<view class="cu-form-group border-ddd border-rad margin-top-sm flex-direction align-start">
					<view class="title">
						中心维护计算机（CMC）故障代码：
					</view>
					<view class="margin-top-xs flex flex-wrap">
                        <image @click="open(item.folder)" v-for="(item,i) in pdetails_arr.ZNFFJW1" :key="i" class="pic" :src="item.folder"></image>
					</view>
				</view>
				<view class="cu-form-group border-ddd border-rad margin-top-sm flex-direction align-start">
					<view class="title">
						航材内置测试设备BITE出现的故障代码：
					</view>
					<view class="margin-top-xs flex flex-wrap">
						<image @click="open(item.folder)" v-for="(item,i) in pdetails_arr.ZNFFJW2" :key="i" class="pic" :src="item.folder"></image>
					</view>
				</view>
				<view class="cu-form-group border-ddd border-rad margin-top-sm flex-direction align-start">
					<view class="title">
						该部件拆下所依据的故障清除手册维护流程：
					</view>
					<view class="margin-top-xs flex flex-wrap">
						<image @click="open(item.folder)" v-for="(item,i) in pdetails_arr.ZNFFJW3" :key="i" class="pic" :src="item.folder"></image>
					</view>
				</view>
				<view class="cu-form-group border-ddd border-rad margin-top-sm flex-direction align-start">
					<view class="title">
						故障的状态信息/咨询信息,以及关联的维护信息：
					</view>
					<view class="margin-top-xs flex flex-wrap">
						<image @click="open(item.folder)" v-for="(item,i) in pdetails_arr.ZNFFJW4" :key="i" class="pic" :src="item.folder"></image>
					</view>
				</view>
			</view>
			<view v-if="pdetails_arr.workerType == '2'">
				<!-- <view class="titles">330/320机型:</view> -->
				<view class="titles">{{ pdetails_arr.mpActype }}机型:</view>
				<view class="cu-form-group border-ddd border-rad margin-top-sm flex-direction align-start">
					<view class="title">
						PFR、TSD/BITE测试相关信息：
					</view>
					<view class="margin-top-xs flex flex-wrap">
                        <image @click="open(item.folder)" v-for="(item,i) in pdetails_arr.ZNFFJW5" :key="i" class="pic" :src="item.folder"></image>
					</view>
				</view>
				<view class="cu-form-group border-ddd border-rad margin-top-sm flex-direction align-start">
					<view class="title">
						排故记录(英文版)：
					</view>
					<view class="margin-top-xs flex flex-wrap">
						<image @click="open(item.folder)" v-for="(item,i) in pdetails_arr.ZNFFJW6" :key="i" 
						class="pic" :src="item.folder"></image>
					</view>
				</view>
			</view>

			<view class="flex justify-center margin-top-xl">
				<button class="main-button font30" @click="cancellation" style="width: 100%;">取消</button>
			</view>

			<uni-popup ref="popup" type="center" style="text-align: center; width: 100%;">
				<img style="width: 60%;" :src="testImg" alt="">
			</uni-popup>
		</view>
		<q-loading mask="true" click="true" ref="loading"></q-loading>
	</view>
</template>

<script>
	import {
		requestWithFile,
		ipConfig,
		request
	} from '../../../../utils/request';
	import DateFormat from '@/js_sdk/xfl-DateFormat/DateFormat.js';
	import dictionaryApi from '../../../../utils/dictionary';

	export default {
		data() {
			return {
				workerType: '1',
				// testImg: require('../../../../static/img/login/logo.png'),
				testImg: '',
			};
		},
		props: {
			pdetails_arr: {
				type: Object,
				default: {}
			},
			type: {
				type: String,
				default: ''
			}
		},
		watch: {
		},
		methods: {
			open(row){
				if(row){
					this.testImg = row
					this.$refs.popup.open()
				}
			},
			cancellation(){
				this.$emit("detailsChange",1)
			},
		},
		onShow() {
			// 监听回调
		},
		mounted() {
			// this.username = uni.getStorageSync('username');
		},
		onLoad() {},
		onReady() {}
	};
</script>

<style lang="less" scoped>
	.title {
		flex-shrink: 0;
		height: auto !important;
		line-height: 1.5em !important;
	}

	.state-bar {
		padding-top: 30rpx;
		padding-bottom: 20rpx;
	}

	.yellow {
		color: rgb(255, 170, 0);
		background: linear-gradient(rgba(255, 170, 0, 0.8), #fdfdff);
	}

	.green {
		color: green;
		background: linear-gradient(rgba(4, 177, 44, 0.8), #fdfdff);
	}

	.item-center-btn {
		width: 30%;
		margin: 0 10rpx;
		height: 66rpx;
	}

	.uni-searchbar {
		width: 100%;
		padding: 0rpx 0rpx 20rpx 0rpx !important;

	}

	.rotate-right {
		transform: rotate(-90deg);
	}

	.clearImg {
		height: 70rpx;
		width: 70rpx;
		flex-shrink: 0;
	}

	.i-point {
		width: 20rpx;
		height: 20rpx;
	}

	.i-down {
		width: 32rpx;
		height: 32rpx;
		transition: all 0.2s linear;
	}

	.rotate {
		transform: rotate(180deg);
	}

	.prop-text {
		width: 20%;
		display: inline-flex;
	}

	.cu-form-group uni-picker {
		padding-right: 0rpx;
	}

	.picker-after::after {
		display: none;
	}

	.picker-text {
		padding-right: 8rpx;
	}

	.i-photo {
		width: 140rpx;
		height: 140rpx;
	}

	/deep/.uni-drawer--right {
		/* #ifdef H5 */
		padding-top: 45px;
		/* #endif */
		/* #ifdef APP-PLUS */
		padding-top: 90px;
		/* #endif */
		box-sizing: border-box;
	}

	.radio-wrap {
		width: 100%;
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		justify-content: flex-start;
		box-sizing: border-box;
		padding: 0 20rpx;

		.radio-cover {
			width: 100%;
			display: flex;
			align-items: center;
			margin-bottom: 20rpx;
			padding-bottom: 20rpx;
			border-bottom: 1rpx solid #DDDDDD;

			&:last-child {
				border-bottom: 0px;
			}

			uni-radio {
				margin-right: 10rpx;
			}
		}
	}

	/deep/.checklist-group {
		justify-content: flex-end;

		.checklist-box {
			margin-right: 0rpx !important;
			margin-left: 20rpx !important;
		}
	}
	/deep/ .uni-popup__wrapper-box{
		width: 100%;
	}
	.titles{
		margin-top: 30rpx;
    	font-weight: bold;
	}
    .pic{
        height: 80px;
        width: 80px;
    }
</style>
