<template>
  <div>
    <LHeader :text="text"></LHeader>
    <van-form
      @submit="onSubmit"
      :show-error-message="false"
      :scroll-to-error="true"
    >
      <van-field
        v-model="value"
        label="隐患整改描述"
        name="隐患整改描述"
        rows="3"
        type="textarea"
        placeholder="请输入"
        :rules="[{ required: true, message: '隐患整改详情描述不能为空' }]"
      />

      <van-field
        name="uploader"
        label="整改照片"
        :rules="[{ required: true, message: '请上传图像' }]"
      >
        <template #input>
          <van-uploader v-model="uploaderImg" />
        </template>
      </van-field>

      <van-field name="uploader2" label="整改视频">
        <template #input>
          <van-uploader v-model="uploaderVideo" />
        </template>
      </van-field>

      <div style="margin: 16px;">
        <van-button round block type="info" native-type="submit"
          >保存</van-button
        >
      </div>
    </van-form>
    <div style="margin:10px 16px 0px;padding-bottom:16px">
      <van-button round block type="warning" @click.native="cancel"
        >取消</van-button
      >
    </div>
  </div>
</template>

<script>
import LHeader from "@/components/header.vue";
export default {
  components: {
    LHeader
  },
  data() {
    return {
      text: "隐患确认",
      value: "",
      uploaderImg: [], //图像上传
      uploaderVideo: [] //视频上传
    };
  },
  mounted() {},
  methods: {
    onSubmit(values) {
      console.log("submit", values);
    },
    cancel() {
      this.$router.go(-1);
    }
  }
};
</script>
<style lang="less" scoped>
/* @import url(); 引入css类 */
</style>
