qushaowei
2025-05-30 25fee48ceca7a54bc6008eb2e2fb6d8ea801a50e
src/views/eam/modules/maintenancePlan/EquipmentMaintenancePlanModal.vue
@@ -7,57 +7,62 @@
    switchFullscreen
    @ok="handleOk"
    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
    @cancel="handleCancel">
    <equipment-maintenance-plan-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"/>
    @cancel="handleCancel"
  >
    <equipment-maintenance-plan-form
      ref="realForm"
      @ok="submitCallback"
      :disabled="disableSubmit"
    />
  </j-modal>
</template>
<script>
  import EquipmentMaintenancePlanForm from './EquipmentMaintenancePlanForm'
import EquipmentMaintenancePlanForm from './EquipmentMaintenancePlanForm'
  export default {
    name: 'EquipmentMaintenancePlanModal',
    components: {
      EquipmentMaintenancePlanForm
export default {
  name: 'EquipmentMaintenancePlanModal',
  components: {
    EquipmentMaintenancePlanForm
  },
  data() {
    return {
      title: '',
      width: 800,
      visible: false,
      disableSubmit: false
    }
  },
  methods: {
    add() {
      this.visible = true
      this.$nextTick(() => {
        this.$refs.realForm.add();
      })
    },
    data() {
      return {
        title:'',
        width:800,
        visible: false,
        disableSubmit: false
      }
    edit(record) {
      this.visible = true
      this.$nextTick(() => {
        this.$refs.realForm.edit(record);
      })
    },
    methods:{
      add () {
        this.visible=true
        this.$nextTick(()=>{
          this.$refs.realForm.add();
        })
      },
      edit (record) {
        this.visible=true
        this.$nextTick(()=>{
          this.$refs.realForm.edit(record);
        })
      },
      close () {
        this.$emit('close');
        this.visible = false;
      },
      handleOk () {
        this.$refs.realForm.handleOk();
      },
      submitCallback(){
        this.$emit('ok');
        this.visible = false;
      },
      handleCancel () {
        this.close()
      }
    close() {
      this.$emit('close');
      this.visible = false;
    },
    handleOk() {
      this.$refs.realForm.handleOk();
    },
    submitCallback() {
      this.$emit('ok');
      this.visible = false;
    },
    handleCancel() {
      this.close()
    }
  }
}
</script>
<style scoped>