2c5a435770d93ba92b90965ca8449b2953f73139.svn-base 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272
  1. <template>
  2. <j-modal
  3. :title="title"
  4. :width="width"
  5. :visible="visible"
  6. :confirmLoading="confirmLoading"
  7. switchFullscreen
  8. @ok="handleOk"
  9. :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
  10. @cancel="handleCancel"
  11. cancelText="关闭">
  12. <a-tabs default-active-key="attrs" >
  13. <a-tab-pane key="attrs" tab="属性信息">
  14. <a-spin :spinning="confirmLoading">
  15. <j-form-container :disabled="disableSubmit">
  16. <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
  17. <a-row>
  18. <a-col :span="12">
  19. <a-form-model-item label="项目名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="xmmc">
  20. <a-input v-model="model.xmmc" placeholder="请输入项目名称"></a-input>
  21. </a-form-model-item>
  22. </a-col>
  23. <a-col :span="12">
  24. <a-form-model-item label="所在水系" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="szsx">
  25. <j-dict-select-tag type="list" v-model="model.szsx" dictCode="shuixi"
  26. placeholder="请选择所在水系"/>
  27. </a-form-model-item>
  28. </a-col>
  29. <a-col :span="12">
  30. <a-form-model-item label="行政区划" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="xzqh">
  31. <!-- <a-input v-model="model.xzqh" placeholder="请输入行政区划" ></a-input>-->
  32. <j-area-linkage type="cascader" v-model="model.xzqh" placeholder="请输入省市区"
  33. @change="xzqhChange"/>
  34. </a-form-model-item>
  35. </a-col>
  36. <a-col :span="12">
  37. <a-form-model-item label="区划代码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="xjqhdm">
  38. <a-input v-model="model.xjqhdm" placeholder="请输入区划代码" disabled></a-input>
  39. </a-form-model-item>
  40. </a-col>
  41. <a-col :span="12">
  42. <a-form-model-item label="主要工程位置经度" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="hzb">
  43. <a-input-number v-model="model.hzb" placeholder="请输入经度" style="width: 100%" />
  44. </a-form-model-item>
  45. </a-col>
  46. <a-col :span="12">
  47. <a-form-model-item label="主要工程位置纬度" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="zzb">
  48. <a-input-number v-model="model.zzb" placeholder="请输入纬度" style="width: 100%" />
  49. </a-form-model-item>
  50. </a-col>
  51. <a-col :span="12">
  52. <a-form-model-item label="项目负责人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="xmfzr">
  53. <a-input v-model="model.xmfzr" placeholder="请输入项目负责人"></a-input>
  54. </a-form-model-item>
  55. </a-col>
  56. <a-col :span="12">
  57. <a-form-model-item label="电话" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="dh">
  58. <a-input v-model="model.dh" placeholder="请输入电话"></a-input>
  59. </a-form-model-item>
  60. </a-col>
  61. <a-col :span="12">
  62. <a-form-model-item label="审批文号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="spwh">
  63. <a-input v-model="model.spwh" placeholder="请输入审批文号"></a-input>
  64. </a-form-model-item>
  65. </a-col>
  66. <a-col :span="12">
  67. <a-form-model-item label="立项情况" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="lxqk">
  68. <a-input v-model="model.lxqk" placeholder="请输入立项情况"></a-input>
  69. </a-form-model-item>
  70. </a-col>
  71. <a-col :span="12">
  72. <a-form-model-item label="审批年度" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="spnd">
  73. <j-year-picker placeholder="请选择审批年度" v-model="model.spnd"
  74. style="width: 100%"></j-year-picker>
  75. </a-form-model-item>
  76. </a-col>
  77. <a-col :span="12">
  78. <a-form-model-item label="防洪标准" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="fhbz">
  79. <a-input v-model="model.fhbz" placeholder="请输入防洪标准"></a-input>
  80. </a-form-model-item>
  81. </a-col>
  82. <a-col :span="12">
  83. <a-form-model-item label="审批单位" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="spdw">
  84. <a-input v-model="model.spdw" placeholder="请输入审批单位"></a-input>
  85. </a-form-model-item>
  86. </a-col>
  87. <a-col :span="12">
  88. <a-form-model-item label="建设状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="jszt">
  89. <j-dict-select-tag type="list" v-model="model.jszt" dictCode="gcjsqk"
  90. placeholder="请选择建设状态"/>
  91. </a-form-model-item>
  92. </a-col>
  93. <a-col :span="12">
  94. <a-form-model-item label="审批情况" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="spzt">
  95. <j-dict-select-tag type="list" v-model="model.spzt" dictCode="spzt"
  96. placeholder="请选择审批情况"/>
  97. </a-form-model-item>
  98. </a-col>
  99. <!-- <a-col :span="24">-->
  100. <!-- <a-form-model-item label="是否批建不符" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sfpjbf">-->
  101. <!-- <j-dict-select-tag type="list" v-model="model.sfpjbf" dictCode="yn" placeholder="请选择是否批建不符" />-->
  102. <!-- </a-form-model-item>-->
  103. <!-- </a-col>-->
  104. <!-- <a-col :span="24">-->
  105. <!-- <a-form-model-item label="是否为无审批" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sfpjbf">-->
  106. <!-- <j-dict-select-tag type="list" v-model="model.sfwsp" dictCode="yn" placeholder="请选择是否无审批" />-->
  107. <!-- </a-form-model-item>-->
  108. <!-- </a-col>-->
  109. <!-- <a-col :span="24">-->
  110. <!-- <a-form-model-item label="是否补办审批" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sfbbsp">-->
  111. <!-- <j-dict-select-tag type="list" v-model="model.sfbbsp" dictCode="yn" placeholder="请选择是否补办审批" />-->
  112. <!-- </a-form-model-item>-->
  113. <!-- </a-col>-->
  114. <a-col :span="12">
  115. <a-form-model-item label="总体布置简述" :labelCol="labelCol" :wrapperCol="wrapperCol"
  116. prop="ztbzjs">
  117. <a-input v-model="model.ztbzjs" placeholder="请输入总体布置简述"></a-input>
  118. </a-form-model-item>
  119. </a-col>
  120. <a-col :span="12">
  121. <a-form-model-item label="审批级别" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="spjb">
  122. <j-dict-select-tag type="list" v-model="model.spjb" dictCode="spjb"
  123. placeholder="请选择审批级别"/>
  124. </a-form-model-item>
  125. </a-col>
  126. <a-col :span="12">
  127. <a-form-model-item label="其他" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="qt">
  128. <a-input v-model="model.qt" placeholder="请输入其他" rows="4"></a-input>
  129. </a-form-model-item>
  130. </a-col>
  131. <a-col :span="12">
  132. <a-form-model-item label="审批文件" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="wjsc">
  133. <j-upload biz-path="xmrk" v-model="model.wjsc"></j-upload>
  134. </a-form-model-item>
  135. </a-col>
  136. <a-col :span="12">
  137. <a-form-model-item label="防洪(输水)影响评价报告" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="fhpjbg">
  138. <j-upload biz-path="xmrk" v-model="model.fhpjbg"></j-upload>
  139. </a-form-model-item>
  140. </a-col>
  141. </a-row>
  142. </a-form-model>
  143. </j-form-container>
  144. </a-spin>
  145. </a-tab-pane>
  146. <a-tab-pane key="map" tab="位置信息">
  147. <basic-map ref="locMap" layersUrl='/resManager.catalog/rescatalog/resList' :model="{...model,layerName:''}"></basic-map>
  148. </a-tab-pane>
  149. </a-tabs>
  150. <span class="message">注意:填写完项目信息后,请继续填写单位信息,河段主要指标,涉河工程主要指标,涉河工程主要指标,分析计算主要成果,影响情况及消除或减轻影响措施信息表</span>
  151. </j-modal>
  152. </template>
  153. <script>
  154. import {httpAction} from '@/api/manage'
  155. import {validateDuplicateValue} from '@/utils/util'
  156. import JYearPicker from "@comp/jeecg/JYearPicker";
  157. import BasicMap from "../../../../../components/BasicMap/BasicMap";
  158. export default {
  159. name: "RmAxxmxxModal",
  160. components: {
  161. JYearPicker,
  162. BasicMap
  163. },
  164. data() {
  165. return {
  166. title: "操作",
  167. width: 1200,
  168. visible: false,
  169. model: {},
  170. disableSubmit: false,
  171. labelCol: {
  172. xs: {span: 24},
  173. sm: {span: 5},
  174. },
  175. wrapperCol: {
  176. xs: {span: 24},
  177. sm: {span: 16},
  178. },
  179. confirmLoading: false,
  180. validatorRules: {},
  181. url: {
  182. add: "/hzz.shjsgc.xmrk/rmAxxmxx/add",
  183. edit: "/hzz.shjsgc.xmrk/rmAxxmxx/edit",
  184. }
  185. }
  186. },
  187. created() {
  188. //备份model原始值
  189. this.modelDefault = JSON.parse(JSON.stringify(this.model));
  190. },
  191. methods: {
  192. add() {
  193. this.edit(this.modelDefault);
  194. },
  195. edit(record) {
  196. this.model = Object.assign({}, record);
  197. this.visible = true;
  198. },
  199. close() {
  200. this.$emit('close');
  201. this.visible = false;
  202. this.$refs.form.clearValidate();
  203. },
  204. handleOk() {
  205. const that = this;
  206. // 触发表单验证
  207. this.$refs.form.validate(valid => {
  208. if (valid) {
  209. that.confirmLoading = true;
  210. let httpurl = '';
  211. let method = '';
  212. if (!this.model.id) {
  213. httpurl += this.url.add;
  214. method = 'post';
  215. } else {
  216. httpurl += this.url.edit;
  217. method = 'post';
  218. }
  219. httpAction(httpurl, this.model, method).then((res) => {
  220. if (res.success) {
  221. that.$message.success(res.message);
  222. that.$emit('ok');
  223. } else {
  224. that.$message.warning(res.message);
  225. }
  226. }).finally(() => {
  227. that.confirmLoading = false;
  228. that.close();
  229. })
  230. } else {
  231. return false
  232. }
  233. })
  234. },
  235. handleCancel() {
  236. this.close()
  237. },
  238. tabsChange(key) {
  239. let that = this;
  240. if (key == "map") {
  241. this.$nextTick(() => {
  242. this.$refs.locMap.locateByCoords({...this.model});
  243. })
  244. }
  245. },
  246. locateByCoords() {
  247. let loc_x = this.hzb;
  248. let loc_y = this.zzb;
  249. this.$refs.locMap.locateByCoords(loc_x, loc_y);
  250. },
  251. xzqhChange(value) {
  252. this.model.xjqhdm = value;
  253. },
  254. }
  255. }
  256. </script>
  257. <style type="text/css">
  258. .message {margin-left: 20%;
  259. color:red
  260. }
  261. </style>