<template>
	<view>
		<view class="container" v-html="taskContentHtml"></view>
		<view class="footer col-24">
			<button type="primary" @click="handleSign">任务签收</button>
		</view>
	</view>
</template>

<script>
	import {
		getInspection,
		signInspection
	} from '@/api/inspection'
	export default {
		data() {
			return {
				taskContentHtml: ''
			}
		},
		onLoad() {
			getInspection(this.$page.options.taskId).then(data => {
				this.taskContentHtml = data.taskContentHtml
			})
			
		},
		methods: {
			handleSign() {
				signInspection(this.$page.options.taskId).then(() => {
					uni.navigateTo({
						url: '/pages/task/inspection/list?taskId=' + this.$page.options.taskId
					});
				})
				
			}
		}
	}
</script>

<style lang="scss">

</style>