2149c643628151ee6a190450560c90381dbb49e8.svn-base 1.2 KB

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