qushaowei
2024-07-25 52190152691bc217844d4f87b700274c297b104e
src/views/eam/ABC/modules/StreamModal.vue
@@ -1,64 +1,69 @@
<template>
  <j-modal
    :title="title"
    :width="1200"
    :width="1500"
    :visible="visible"
    :maskClosable="false"
    switchFullscreen
    :fullscreen="true"
    :fullscreen="false"
    @ok="handleOk"
    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
    @cancel="handleCancel">
    <stream-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"/>
    @cancel="handleCancel"
  >
    <stream-form
      ref="realForm"
      @ok="submitCallback"
      :disabled="disableSubmit"
    />
  </j-modal>
</template>
<script>
  import StreamForm from './StreamForm'
import StreamForm from './StreamForm'
  export default {
    name: 'StreamModal',
    components: {
      StreamForm
export default {
  name: 'StreamModal',
  components: {
    StreamForm
  },
  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>