QcSsgqzysytdqkModal2.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <template>
  2. <j-modal
  3. :title="title"
  4. :width="width"
  5. :visible="visible"
  6. switchFullscreen
  7. @ok="handleOk"
  8. okText="保存"
  9. :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
  10. @cancel="handleCancel"
  11. cancelText="关闭"
  12. footer=""
  13. >
  14. <!-- 邱东宝 增加modal按钮调整到顶部 1-->
  15. <template>
  16. <div style="position: absolute;left: 10%;top:13px;">
  17. <a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;margin-right: 8px">保存
  18. </a-button>
  19. <a-button @click="handleCancel">
  20. 关闭
  21. </a-button>
  22. <a-button v-if="this.result.sfsb == 3" @click="handleWCSH()" style=" margin-bottom: 0;margin-left: 8px">完成审核
  23. </a-button>
  24. </div>
  25. </template>
  26. <!--邱东宝 增加modal按钮调整到顶部 end-->
  27. <!-- <qc-ssgqzysytdqk-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></qc-ssgqzysytdqk-form>-->
  28. <qc-ssgqzysytdqk-detail title="省直单位占有使用土地情况调查统计表" ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></qc-ssgqzysytdqk-detail>
  29. </j-modal>
  30. </template>
  31. <script>
  32. import {getAction} from '@api/manage'
  33. import QcSsgqzysytdqkForm from './QcSsgqzysytdqkForm2'
  34. import qcSsgqzysytdqkDetail from '../../qcsb/modules/QcSsgqzysytdqkDetail.vue'
  35. export default {
  36. name: 'QcSsgqzysytdqkModal',
  37. components: {
  38. QcSsgqzysytdqkForm,
  39. qcSsgqzysytdqkDetail
  40. },
  41. data() {
  42. return {
  43. title: '',
  44. result: {},
  45. width: 896,
  46. visible: false,
  47. disableSubmit: false
  48. }
  49. },
  50. methods: {
  51. add() {
  52. this.visible = true
  53. this.$nextTick(() => {
  54. this.$refs.realForm.add();
  55. })
  56. },
  57. handleWCSH() {
  58. new Promise((resolve, reject) => {
  59. this.handleOk()
  60. resolve()
  61. }).then(() => {
  62. debugger
  63. getAction("/qcsb/qcSsgqzysytdqk/wcsh", {id: this.result.id}).then(res => {
  64. if (res.success) {
  65. this.visible = false
  66. this.loadData();
  67. }
  68. })
  69. })
  70. },
  71. edit(record) {
  72. this.result = record
  73. this.visible = true
  74. this.$nextTick(() => {
  75. this.$refs.realForm.edit(record);
  76. })
  77. },
  78. close() {
  79. this.$emit('close');
  80. this.visible = false;
  81. },
  82. handleOk() {
  83. this.disableSubmit = true
  84. this.$refs.realForm.submitForm();
  85. },
  86. submitCallback() {
  87. this.$emit('ok');
  88. this.visible = false;
  89. },
  90. handleCancel() {
  91. this.close()
  92. }
  93. }
  94. }
  95. </script>