<script setup>
import { ref } from "vue";
import { onLoad } from "@dcloudio/uni-app";
import Form from "./components/form.vue";

// 当前查看的任务 id
const id = ref(null);

// 从路由参数读取详情 id
onLoad((options) => {
  id.value = Number(options.id) || null;
});
</script>

<template>
  <view class="page">
    <scroll-view scroll-y="true" style="height: 100%">
      <!-- 详情页复用同一表单组件，只读展示 -->
      <Form type="detail" :id="id"></Form>
    </scroll-view>
  </view>
</template>

<style lang="scss" scoped>
@import "@/style/work-order-segmented.scss";

.page {
  padding-bottom: 0;
}
</style>
