b6453be8d58919e847dafd12fea493be4c6914b2.svn-base 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. <template>
  2. <j-modal
  3. :title="title"
  4. :width="width"
  5. :visible="visible"
  6. :confirmLoading="confirmLoading"
  7. switchFullscreen
  8. @ok="handleOk"
  9. @cancel="handleCancel"
  10. cancelText="关闭">
  11. <a-spin :spinning="confirmLoading">
  12. <a-form-model ref="form" :model="model" :rules="validatorRules">
  13. <a-row>
  14. <a-col :span="24">
  15. <a-form-model-item label="涉河类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="shlx">
  16. <j-dict-select-tag type="list" v-model="model.shlx" dictCode="" placeholder="请选择涉河类型" />
  17. </a-form-model-item>
  18. </a-col>
  19. <a-col :span="24">
  20. <a-form-model-item label="工程布置简况" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="gcbzqk">
  21. <a-input v-model="model.gcbzqk"placeholder="请输入工程布置简况" ></a-input>
  22. </a-form-model-item>
  23. </a-col>
  24. <a-col :span="24">
  25. <a-form-model-item label="建设状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="jszt">
  26. <j-dict-select-tag type="list" v-model="model.jszt" dictCode="" placeholder="请选择建设状态" />
  27. </a-form-model-item>
  28. </a-col>
  29. <a-col :span="24">
  30. <a-form-model-item label="工期计划" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="gqjh">
  31. <j-date placeholder="请选择工期计划" v-model="model.gqjh" style="width: 100%" />
  32. </a-form-model-item>
  33. </a-col>
  34. <a-col :span="24">
  35. <a-form-model-item label="河道岸线利用情况" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="hdaxlyqk">
  36. <a-input v-model="model.hdaxlyqk"placeholder="请输入河道岸线利用情况" ></a-input>
  37. </a-form-model-item>
  38. </a-col>
  39. <a-col :span="24">
  40. <a-form-model-item label="占用河道管理范围情况" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="zyhdglfw">
  41. <a-input v-model="model.zyhdglfw"placeholder="请输入占用河道管理范围情况" ></a-input>
  42. </a-form-model-item>
  43. </a-col>
  44. <a-col :span="24">
  45. <a-form-model-item label="建设期临时设施情况" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="jsqlsssqk">
  46. <a-input v-model="model.jsqlsssqk"placeholder="请输入建设期临时设施情况" ></a-input>
  47. </a-form-model-item>
  48. </a-col>
  49. <a-col :span="24">
  50. <a-form-model-item label="现场联系人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="xclxr">
  51. <a-input v-model="model.xclxr"placeholder="请输入现场联系人" ></a-input>
  52. </a-form-model-item>
  53. </a-col>
  54. <a-col :span="24">
  55. <a-form-model-item label="电话" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="dh">
  56. <a-input v-model="model.dh"placeholder="请输入电话" ></a-input>
  57. </a-form-model-item>
  58. </a-col>
  59. <a-col :span="24">
  60. <a-form-model-item label="其他" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="qt">
  61. <a-input v-model="model.qt"placeholder="请输入其他" ></a-input>
  62. </a-form-model-item>
  63. </a-col>
  64. </a-row>
  65. </a-form-model>
  66. </a-spin>
  67. </j-modal>
  68. </template>
  69. <script>
  70. import { httpAction } from '@/api/manage'
  71. import { validateDuplicateValue } from '@/utils/util'
  72. export default {
  73. name: "RmAxshbfgcxxbModal",
  74. components: {
  75. },
  76. props:{
  77. mainId:{
  78. type:String,
  79. required:false,
  80. default:''
  81. }
  82. },
  83. data () {
  84. return {
  85. title:"操作",
  86. width:800,
  87. visible: false,
  88. model:{
  89. },
  90. labelCol: {
  91. xs: { span: 24 },
  92. sm: { span: 5 },
  93. },
  94. wrapperCol: {
  95. xs: { span: 24 },
  96. sm: { span: 16 },
  97. },
  98. confirmLoading: false,
  99. validatorRules: {
  100. },
  101. url: {
  102. add: "/hzz.axgh.axzyxm/rmAxzyxmb/addRmAxshbfgcxxb",
  103. edit: "/hzz.axgh.axzyxm/rmAxzyxmb/editRmAxshbfgcxxb",
  104. }
  105. }
  106. },
  107. created () {
  108. //备份model原始值
  109. this.modelDefault = JSON.parse(JSON.stringify(this.model));
  110. },
  111. methods: {
  112. add () {
  113. this.edit(this.modelDefault);
  114. },
  115. edit (record) {
  116. this.model = Object.assign({}, record);
  117. this.visible = true;
  118. },
  119. close () {
  120. this.$emit('close');
  121. this.visible = false;
  122. this.$refs.form.clearValidate();
  123. },
  124. handleOk () {
  125. const that = this;
  126. // 触发表单验证
  127. this.$refs.form.validate(valid => {
  128. if (valid) {
  129. that.confirmLoading = true;
  130. let httpurl = '';
  131. let method = '';
  132. if(!this.model.id){
  133. httpurl+=this.url.add;
  134. method = 'post';
  135. }else{
  136. httpurl+=this.url.edit;
  137. method = 'post';
  138. }
  139. this.model['mainId'] = this.mainId
  140. httpAction(httpurl,this.model,method).then((res)=>{
  141. if(res.success){
  142. that.$message.success(res.message);
  143. that.$emit('ok');
  144. }else{
  145. that.$message.warning(res.message);
  146. }
  147. }).finally(() => {
  148. that.confirmLoading = false;
  149. that.close();
  150. })
  151. }else{
  152. return false
  153. }
  154. })
  155. },
  156. handleCancel () {
  157. this.close()
  158. },
  159. }
  160. }
  161. </script>