<template>
  <el-dialog
    :visible.sync="equipmentdialog"
    :before-close="handleClose"
    :close-on-click-modal="true"
    :close-on-press-escape="false"
    append-to-body
    width="90%"
  >
  </el-dialog>
</template>

<script>
  export default {
    props: {
      // workListIds: {
      //   type: Array,
      //   default() {
      //     return [];
      //   }
      // },
      // activeName: {
      //   type: String
      // },
      // reportNeedFeed: {}
      workListIds: {
        type: Array,
        default() {
          return [];
        }
      },
      taskId: {
        type: String,
        default() {
          return null;
        }
      }
    },

    data() {
      const defaultForm = function () {
        return {
          code: '',
          qualityType: null,
          qualityModeproduceRoutingId: '',
          produceRoutingName: '',
          produceTaskId: '',
          produceTaskName: '',
          productName: '',
          productCode: '',
          batchNo: '',
          specification: '',
          modelType: '',
          brandNo: '',
          total: '',
          qualifiedNumber: '',
          noQualifiedNumber: '',
          groupId: '',
          groupName: '',
          qualityId: '',
          qualityName: '',
          qualityTime: '',
          hours: '',
          qualificationRate: '',
          noQualificationRate: '',
          totalWeight: '',
          sampleNumber: '',
          imgUrl: [],
          qualityTimeStart: '',
          qualityTimeEnd: '',

          sampleMeasureUnit: '',
          conditionType: null
        };
      };
      return {
        defaultForm,
        // 表单数据
        form: { ...defaultForm() },
        voList: [],

        // 表单验证规则
        categoryParamList: [],
        type: '',
        title: '',
        loading: false,

        tabTaskId: null,
        equipmentdialog: false,
        // activeName: '2',

        packingList: [],
        sampleList: [],
        schemeList: [],
        activeName: null,

        isValid: true,
        isStatus: true,
        SampleListbyReportList: [],
        qualityTimeStart: '',
        isReportProcessProduce: false,
        addStatus: []
      };
    },
    // watch: {
    //   workListIds: {
    //     handler(id) {
    //       if (id) {
    //         this.getDetail();
    //       } else {
    //         this.form = { ...defaultForm() };
    //       }
    //     }
    //   }
    // },

    created() {
      // this.open();
      // console.log(11111);
      // console.log(this.workListIds[0]);
      // if (this.workListIds[0]) {
      //   this.getDetail();
      // }
    },
    methods: {
      open() {
        console.log(11111);
        this.equipmentdialog = true;
      },

      handleClose() {
        this.equipmentdialog = false;
        this.$emit('close', false);
        // this.$refs.equiTable.clearSelection();
      }
    }
  };
</script>

<style lang="scss" scoped></style>
