<template>
	<view class="container">
		<tui-list-cell :hover="false">
			<view class="fs-flex__between"><view>问题单号</view><view>{{info.problemNo}}</view></view>
		</tui-list-cell>
		<tui-list-cell :hover="false">
			<view class="fs-flex__between"><view>道路名称</view><view>{{info.roadName}}</view></view>
		</tui-list-cell>
		<tui-list-cell :hover="false">
			<view class="fs-flex__between"><view>养护级别</view><view>{{info.curingLevelName}}</view></view>
		</tui-list-cell>
		<tui-list-cell :hover="false">
			<view class="fs-flex__between"><view>养护类型</view><view>{{info.maintainTypeName}}</view></view>
		</tui-list-cell>
    <tui-list-cell :hover="false">
      <view class="fs-flex__between fs-ellipsis"><view>植物类型</view><view class="fs-ml20  fs-ellipsis">{{info.plantTypeName}}</view></view>
    </tui-list-cell>
		<tui-list-cell :hover="false">
			<view class="fs-flex__between"><view>养护组长</view><view>{{info.userName}}</view></view>
		</tui-list-cell>
		<tui-list-cell :hover="false">
			<view class="fs-flex__between">
				<view>紧急程度</view>
				<view>
					<tui-text v-if="info.pressingType == 1" type="primary" text="特急"></tui-text>
					<tui-text v-else-if="info.pressingType == 2" type="primary" text="紧急"></tui-text>
					<tui-text v-else-if="info.pressingType == 3" type="primary" text="一般"></tui-text>
				</view>
			</view>
		</tui-list-cell>
		<tui-list-cell :hover="false">
			<view class="fs-flex__between">
				<view>任务状态</view>
				<view>							
					<tui-text v-if="info.taskStatus == 1" text="处理中" type="danger"></tui-text>
					<tui-text v-else-if="info.taskStatus == 2" text="已处理" type="primary"></tui-text>
					<tui-text v-else-if="info.taskStatus == 3" text="已确认" type="success"></tui-text>
					<tui-text v-else-if="info.taskStatus == 4" text="已驳回" type="danger"></tui-text>
					<tui-text v-else-if="info.taskStatus == 5" text="已拒绝" type="danger"></tui-text>
				</view>
			</view>
		</tui-list-cell>
		<tui-list-cell :hover="false">
			<view class="fs-flex__between"><view>处理人</view><view>{{info.procUserName}}</view></view>
		</tui-list-cell>
		<tui-list-cell :hover="false">
			<view class="fs-flex__between"><view>提交日期</view><view>{{info.createTime}}</view></view>
		</tui-list-cell>
		<tui-list-cell :hover="false" unlined>
			<view class="fs-flex__between"><view class="basis">任务描述</view><view>{{info.taskRemark}}</view></view>
		</tui-list-cell>
	</view>
</template>

<script>
import { apiTaskDetail } from '@/api/work'
export default {
	data() {
		return {
			info: {}
		}
	},
	onLoad(options) {
		this.getCaseDetail(options.id)
	},
	methods: {
		// 获取任务详情
		getCaseDetail(id) {
			apiTaskDetail({data:{id}}).then(res => {
				this.info = res.data
			})
		}
	}
}
</script>

<style lang="scss" scoped>
.basis {
	flex-basis: 180rpx;
	flex-shrink: 0;
}
</style>
