<template>
  <view>
    <view class="card_form" v-if="useModel.formData.value.type === 'RenovationAcceptance'">
      <hs-cell title="验收结果" borderTop required>
        <hs-radio v-model:valueModel="useModel.formData.value.is_passed"
          :Enums="useModel?.HouseWorkOrdersStatusItemEnum?.value" />
      </hs-cell>
    </view>
    <view class="card_form">
      <hs-cell-textarea :title="useModel.formData.value.type === 'RenovationInspection' ? '巡检备注' : '验收说明'"
        :required="useModel.formData.value.type === 'RenovationAcceptance'" placeholder="请详细描述情况，包括具体位置现象等"
        v-model:valueModel="useModel.formData.value.description" />
      <hs-upload borderTop title="上传图片" required :count="6" v-model:valueModel="useModel.formData.value.attachments" />
    </view>

    <hs-footer btnParimaryName="提交" @handleParmaryClick="method?.handleSubmit" />
  </view>
</template>

<script setup lang="ts">
import { onLoad } from '@dcloudio/uni-app'
import method from './method'
import useModel from './model'

onLoad(e => {
  method?.init(e)
})
</script>

<style lang="scss">
@import './style.scss';
</style>
