<template>
    <view class="page-css">
        <view class="info">
            <view class="info_title">基本信息</view>
            <view class="info_item">
                <text class="item_left_txt">单位名称：</text>
                <text class="item_right_txt">张三</text>
            </view>
            <view class="info_item">
                <text class="item_left_txt">巡检项目名称：</text>
                <text class="item_right_txt">张三</text>
            </view>
            <view class="info_item">
                <text class="item_left_txt">项目地址：</text>
                <text class="item_right_txt">张三</text>
            </view>
        </view>
        <view class="info">
            <view class="info_title">巡检配置</view>
            <view class="info_item">
                <text class="item_left_txt">巡检内容：</text>
                <text class="item_right_txt">张三</text>
            </view>
            <view class="info_item">
                <text class="item_left_txt">任务开始时间：</text>
                <text class="item_right_txt">张三</text>
            </view>
            <view class="info_item">
                <text class="item_left_txt">预约上门时间：</text>
                <text class="item_right_txt">张三</text>
            </view>
        </view>
        <view class="info">
            <view class="info_title">巡检任务</view>
            <detailsCollapse></detailsCollapse>
        </view>
        <view class="repair-btn" style="margin-right: 32rpx;width:100%">
            <u-button size="medium">保存</u-button>
            <u-button size="medium" type="primary">提交</u-button>
        </view>
    </view>
</template>
<script>
import detailsCollapse from './components/detailsCollapse.vue'
export default {
    components: {
        detailsCollapse,
    },
    computed: {
        dataTypes() {
            return this.$store.state.dataType
        },
    },
    data() {
        return {
            detailForm: {},
            optionsType: '',//可操作类型
        }
    },
    onLoad(options) {
        this.optionsType = options.type
        this.getDetails()
    },
    methods: {
        getDetails() {
            this.$u.api.getTaskDetail().then(res => {
                if (res.code == 200) {
                    this.detailForm = res.data
                }
            })
        }
    }
}
</script>
<style lang="scss" scoped>
.page-css {
    width: 100%;
    padding: 0;
    padding-top: 26rpx;

    .info {
        margin: 0 24rpx 20rpx;
        border-radius: 20rpx;
        background-color: rgba(255, 255, 255, 1);
        padding: 6rpx 0 34rpx;

        .info_title {
            line-height: 60rpx;
            color: rgba(0, 0, 0, 1);
            font-size: 32rpx;
            text-align: left;
            font-family: SourceHanSansSC-bold;
            margin: 18rpx 0 0rpx 20rpx;
            font-weight: bold;
        }

        .info_item {
            padding: 4rpx 20rpx 0;

            display: flex;
            align-items: center;
            justify-content: space-between;

            .item_left_txt {
                color: rgba(108, 108, 108, 1);
                font-size: 28rpx;
                text-align: left;
                font-family: SourceHanSansSC-regular;
                width: 210rpx;
                margin-right: 20rpx;
                line-height: 60rpx;
            }

            .item_right_txt {
                max-width: calc(100% - 220rpx);
                color: rgba(0, 0, 0, 1);
                font-size: 28rpx;
                // text-align: left;
                text-align: justify;
                font-family: SourceHanSansSC-regular;
            }
        }
    }

    .repair-btn {
        width: 100%;
        height: 150rpx;
        display: flex;
        justify-content: space-between;
        /* 水平均匀分布 */
        margin-top: 32rpx;
        padding: 0 32rpx;

        /deep/.u-btn {
            width: 48%;
        }
    }
}
</style>