ItdmSampleExpireModal1.vue 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <template>
  2. <j-modal
  3. :title="title"
  4. :width="width"
  5. :visible="visible"
  6. switchFullscreen
  7. @ok="handleOk"
  8. :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
  9. @cancel="handleCancel"
  10. cancelText="关闭">
  11. <itdm-sample-expire-form1 ref="realForm" @ok="submitCallback" :disabled="disableSubmit" :editdisabled="editdisabled"></itdm-sample-expire-form1>
  12. </j-modal>
  13. </template>
  14. <script>
  15. import ItdmSampleExpireForm1 from './ItdmSampleExpireForm1'
  16. export default {
  17. name: 'ItdmSampleExpireModal1',
  18. components: {
  19. ItdmSampleExpireForm1,
  20. },
  21. data () {
  22. return {
  23. title:'',
  24. width:800,
  25. visible: false,
  26. disableSubmit: false,
  27. editdisabled:false,
  28. }
  29. },
  30. methods: {
  31. add () {
  32. this.visible=true
  33. this.$nextTick(()=>{
  34. this.$refs.realForm.add();
  35. })
  36. },
  37. edit (record) {
  38. this.editdisabled=true
  39. this.visible=true
  40. this.$nextTick(()=>{
  41. this.$refs.realForm.edit(record);
  42. })
  43. },
  44. close () {
  45. this.$emit('close');
  46. this.visible = false;
  47. },
  48. handleOk () {
  49. this.$refs.realForm.submitForm();
  50. },
  51. submitCallback(){
  52. this.$emit('ok');
  53. this.visible = false;
  54. },
  55. handleCancel () {
  56. this.close()
  57. }
  58. }
  59. }
  60. </script>