<template>
  <view class="orderDetail">
    <!-- 头部 -->
    <view class="orderDetail_header">
      <view class="orderDetail_header_item">
        工单信息
      </view>
      <view class="orderDetail_header_item">
        流程信息
      </view>
      <view class="orderDetail_header_item">
        业务信息
      </view>
    </view>
  </view>
</template>

<script>
  import {
    reqFetchData,
  } from "../../request/api.js";
  export default {
    data() {
      return {
        // 工单详情信息
        orderInfo: {},
      };
    },
    methods: {
      init(queryParams) {
        this.getData(queryParams);
      },
      //获取详情页数据
      getData(queryParams) {
        reqFetchData('api', 'workOrder', queryParams.id).then(res => {
          if (res.status == 200) {
            this.orderInfo = res.data;
          } else {
            this.$refs.seiminModel.show({
              skin: 'toast',
              icon: 'error',
              content: '请求失败',
            })
          }
        })
      },
    },
    onLoad(queryParams) {
      console.log(queryParams);
      this.init(queryParams);
    }
  }
</script>

<style lang="scss" scoped>
  .orderDetail {
    padding-bottom: 108rpx;

    .orderDetail_header {
      height: 88rpx;
      @include flex;

      .orderDetail_header_item {
        flex: 1;
        @include border(right);
        @include flex(center, center);

        &.active {
          color: $defaultColor;
        }
      }
    }
  }
</style>
