<template>
	<view>
		<view>
			<hs-show label="申请人" :data="data.formData.apply_user_name"></hs-show>
			<hs-show label="部门" :data="data.formData.department" mode="dept"></hs-show>
			<hs-show label="使用形式" :data="data.formData.us_a" mode="dict" dictKey="hzl_seal_use_type"></hs-show>
			<hs-show label="印章类别" :data="data.formData.us_b" mode="dict" dictKey="seal_type"></hs-show>
			<hs-show label="使用地点" :data="data.formData.us_e" mode="dict" dictKey="hzl_seal_use_address"></hs-show>
			<hs-show label="用印开始时间" :data="data.formData.us_f_time"></hs-show>
			<hs-show label="用印结束时间 " :data="data.formData.us_d_time"></hs-show>
			<hs-show label="归还时间" :data="data.formData.us_j_time"></hs-show>
			<hs-show label="文件类型" :data="data.formData.so_g" mode="dict" dictKey="hzl_file_type"></hs-show>
			<hs-show label="文件名称" :data="data.formData.so_h"></hs-show>
			<hs-show label="文件份数" :data="data.formData.so_i"></hs-show>
			<view class="desc">
				文件预览图片
			</view>
			<view class="desc">
				<uni-file-picker :value="data.formData.photos" file-mediatype="image" readonly>
				</uni-file-picker>
			</view>
			<hs-show label="申请原因" :data="data.formData.conclusion"></hs-show>
			<hs-show label="备注" :data="data.formData.remark"></hs-show>
		</view>
		<ge :isEnd="1"></ge>
	</view>
</template>

<script>
	import ge from '../components/ge'
	export default {
		components: {
			ge
		},
		data() {
			return {
				data: uni.getStorageSync("approval"),
			}
		},
		mounted() {
			this.data.formData.photos = JSON.parse(this.data.formData.photos)
		},
		methods: {
			confirm1(e) {
				let that = this;
				uni.showModal({
					title: "提醒",
					content: "确定在当前节点同意并结束吗？",
					success(res) {
						if (res.confirm) {
							that.$httpRequest({
								url: '/app/useSealEnd?taskId=' + that.data.id,
								method: 'get'
							}).then((res) => {
								if (res.data.code === 200) {
									uni.showModal({
										title: "结束成功",
										icon: "OK",
										showCancel: false,
										success() {
											uni.navigateBack()
										}
									})
								} else {
									uni.showModal({
										title: "结束失败",
										content: res.msg,
										showCancel: false,
										success() {
											uni.navigateBack()
										}
									})
								}
							})
						}
					}
				})
			},
		}
	}
</script>

<style>
	.desc {
		padding: 10rpx 30rpx;
		color: #818181;
	}

	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.touch {
		position: fixed;
		right: -5rpx;
		bottom: 60rpx;
		width: 105rpx;
		height: 105rpx;
		padding: 5rpx;
		background-color: rgb(10, 185, 156);
		border-top-left-radius: 50%;
		border-bottom-left-radius: 50%;
		color: #fff;
		font-size: 50rpx;
		/* 去除标签点击事件高亮效果 */
		-webkit-tap-highlight-color: transparent;
		/* 使用transform: translate3d 处理性能高 GUP */
	}
</style>