6f5d34a67a3a178fcecc067b0043b9e5e775530d.svn-base 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359
  1. <template>
  2. <div>
  3. <el-container>
  4. <el-main style="border:1px solid #d5d5ff;margin-left:5px;padding:0px;">
  5. <p style="font-weight:bolder;background-color:#d5d5ff;padding:3px;">信息填报</p>
  6. <el-form :model="formObj" :label-width="formLabelWidth">
  7. <p style="margin-top:10px;margin-bottom: 10px;overflow: hidden;"><i class="el-icon-caret-right"></i><span
  8. style="width:120px;padding-left: 10px">基本信息</span><span class="hrs"></span>
  9. <el-button type="warning" style="float: right;" @click="recentAppearance">近期面貌</el-button>
  10. <el-button type="warning" style="float: right; margin-right: 10px;" @click="imageClick">影像</el-button>
  11. </p>
  12. <el-form-item label="工程名称" required>
  13. <el-input v-model="formObj.nm" autocomplete="off" style="width:70%;"></el-input>
  14. </el-form-item>
  15. <el-form-item label="行政区划" required>
  16. <div v-if="showLocSelect">
  17. <el-select v-model="provName" placeholder="选择省" @change="provChange" style="width:20%">
  18. <el-option
  19. v-for="item in provList"
  20. :key="item.adCode"
  21. :label="item.adName"
  22. :value="item.adCode">
  23. </el-option>
  24. </el-select>
  25. <el-select v-model="cityName" placeholder="选择市" @change="cityChange" style="width:20%">
  26. <el-option
  27. v-for="item in cityList"
  28. :key="item.adCode"
  29. :label="item.adName"
  30. :value="item.adCode">
  31. </el-option>
  32. </el-select>
  33. <el-select v-model="countryName" placeholder="选择县" @change="countryChange" style="width:20%">
  34. <el-option
  35. v-for="item in countryList"
  36. :key="item.adCode"
  37. :label="item.adName"
  38. :value="item.adCode">
  39. </el-option>
  40. </el-select>
  41. &#x3000;<span v-if="showLocSelect" @click="showLocSelect = false"
  42. style="color: #009fff;font-size:12px;cursor:pointer">取消</span>
  43. </div>
  44. <div v-else>
  45. <el-input v-model="formObj.adName" readonly autocomplete="off"
  46. style="width:70%;"></el-input>&#x3000;<span @click="showLocSelect = true" v-if="openType"
  47. style="color: #009fff;font-size:12px;cursor:pointer">更改</span>
  48. </div>
  49. </el-form-item>
  50. <el-form-item label="项目地址">
  51. <el-input v-model="formObj.loc" autocomplete="off" style="width:70%;"></el-input>
  52. </el-form-item>
  53. <el-form-item label="工程类别">
  54. <el-select v-model="formObj.prjType" placeholder="请选择">
  55. <el-option value="1" label="172项重点工程"></el-option>
  56. <el-option value="2" label="省属"></el-option>
  57. <el-option value="3" label="市属"></el-option>
  58. <el-option value="4" label="县属"></el-option>
  59. <el-option value="5" label="其他"></el-option>
  60. </el-select>
  61. </el-form-item>
  62. <el-form-item label="工程类型">
  63. <el-select v-model="formObj.prjCtgy" placeholder="请选择">
  64. <el-option value="1" label="新(扩)建水库"></el-option>
  65. <el-option value="2" label="水库除险加固"></el-option>
  66. <el-option value="3" label="水闸"></el-option>
  67. <el-option value="4" label="引水"></el-option>
  68. <el-option value="5" label="其他"></el-option>
  69. </el-select>
  70. </el-form-item>
  71. <el-form-item label="所包含危险性较大工程">
  72. <el-checkbox-group v-model="prjRisk">
  73. <el-checkbox label="1" name="type">隧洞工程</el-checkbox>
  74. <el-checkbox label="2" name="type">高边坡</el-checkbox>
  75. <el-checkbox label="3" name="type">深基坑</el-checkbox>
  76. <el-checkbox label="4" name="type">高大模板</el-checkbox>
  77. <el-checkbox label="5" name="type">其他</el-checkbox>
  78. </el-checkbox-group>
  79. </el-form-item>
  80. <el-form-item label="经度">
  81. <el-input v-model="formObj.centerX" autocomplete="off" style="width:70%;"></el-input>
  82. </el-form-item>
  83. <el-form-item label="纬度">
  84. <el-input v-model="formObj.centerY" autocomplete="off" style="width:70%;"></el-input>
  85. </el-form-item>
  86. <el-form-item label="" style="text-align: center">
  87. <!-- <el-button @click="cancelHandler">取 消</el-button> -->
  88. <el-button type="primary" @click="addHandler" v-if="openType">保 存</el-button>
  89. </el-form-item>
  90. </el-form>
  91. </el-main>
  92. </el-container>
  93. <theRecentAppearance v-if="xcztShow" @jqmmDialogClose="jqmmDialog" :jqmmShow="xcztShow" :openType="openType"
  94. :jqmmEngId="currentObjectRgstrId" :dialogTitle="currentObjectName + '近期面貌'"
  95. style="z-index: 9999;"></theRecentAppearance>
  96. <!--影像弹窗-->
  97. <el-dialog :title="currentObjectName + '影像'" :visible.sync="imageShow" append-to-body :close-on-click-modal="false"
  98. width="60%">
  99. <div style="height: 60vh;">
  100. <mapLocation ref="mapRef" v-if="imageShow" :gdX="centerX" :gdY="centerY"></mapLocation>
  101. </div>
  102. </el-dialog>
  103. </div>
  104. </template>
  105. <script>
  106. import inputWith from "@widget/inuptWith.vue"
  107. import request from "@util/gw_ajax_request.js"
  108. import theRecentAppearance from '../../duChaDuiXiang/theRecentAppearance'
  109. import unlimitDatePicker from '@baseWidget/unLimitdatePicker.vue'
  110. import mapLocation from '../mapLocation'
  111. import {
  112. getrgstrIdObject_slxmaqscxj_state
  113. } from "@api/duChaTianBao.js"
  114. import {
  115. dateFormat
  116. } from "@util/gw_date.js"
  117. export default {
  118. components: {
  119. inputWith: inputWith,
  120. unlimitDatePicker: unlimitDatePicker,
  121. theRecentAppearance,
  122. mapLocation
  123. },
  124. props: ['id','currentObjectRgstrId', 'currentResCode', 'currentObjectId', 'currentObjectName','openType'],
  125. data() {
  126. return {
  127. prjRisk:[],
  128. formObj: {
  129. adCode:"",
  130. adName:"",
  131. nm:"",
  132. loc:"",
  133. prjType:"",
  134. prjCtgy:"",
  135. prjRisk:"",
  136. note:"",
  137. centerX:"",
  138. centerY:""
  139. },
  140. dialogFormVisible: false,
  141. formLabelWidth: '160px',
  142. loading: true,
  143. operationType1: '',
  144. currentResCode1: '',
  145. currentObjectId1: '',
  146. value1: '',
  147. provList: [],
  148. cityList: [],
  149. countryList: [],
  150. provName: '',
  151. cityName: '',
  152. countryName: '',
  153. provNames: '',
  154. cityNames: '',
  155. countryNames: '',
  156. curSelectItem: 0,
  157. showLocSelect: false,
  158. locat: {
  159. location: "",
  160. admDiv: ""
  161. },
  162. xcztShow: false,
  163. imageShow: false,
  164. xcztEngId: '',
  165. centerX: 0,
  166. centerY: 0
  167. }
  168. },
  169. computed: {
  170. recPersId() {
  171. return localStorage.getItem("userid") ? localStorage.getItem("userid") : ''
  172. }
  173. },
  174. mounted() {
  175. this.currentObjectId1 = this.currentObjectId;
  176. this.getRgstridObj();
  177. this.getAreaList()
  178. },
  179. watch: {
  180. id(n, o) {
  181. this.getRgstridObj();
  182. },
  183. showLocSelect(val) {
  184. if (!val) {
  185. this.formObj.rvLoc = this.locat.location
  186. this.formObj.admDiv = this.locat.admDiv
  187. this.provName = ''
  188. this.cityName = ''
  189. this.countryName = ''
  190. }
  191. }
  192. },
  193. methods: {
  194. getRgstridObj() {
  195. var _self = this;
  196. getrgstrIdObject_slxmaqscxj_state(_self.currentObjectRgstrId).then(
  197. (res) => {
  198. if (res.data) {
  199. _self.formObj = res.data;
  200. _self.prjRisk = _self.formObj.prjRisk.split(",");
  201. } else {
  202. _self.formObj = {};
  203. }
  204. },
  205. (err) => {
  206. }
  207. );
  208. },
  209. addHandler() {
  210. var _self = this;
  211. _self.formObj['persId'] = _self.recPersId;
  212. _self.formObj.objId = _self.currentObjectId1;
  213. _self.formObj.adCode = _self.countryName;
  214. _self.formObj.prjRisk = _self.prjRisk.join(",");
  215. try {
  216. this.$confirm('确认保存基础信息?', '提示', {
  217. confirmButtonText: '确定',
  218. cancelButtonText: '取消',
  219. type: 'warning'
  220. }).then(() => {
  221. request.post('/bis/insp/wtprj', _self.formObj).then((res) => {
  222. if (res.success) {
  223. _self.$emit("close");
  224. _self.showLocSelect = false
  225. _self.getRgstridObj()
  226. _self.$message.success("修改成功");
  227. } else {
  228. _self.$emit('close');
  229. }
  230. });
  231. })
  232. } catch (e) {
  233. }
  234. },
  235. cancelHandler() {
  236. this.$emit('cancelHandler');
  237. },
  238. formatRadio(val) {
  239. if (val == '1') {
  240. return '是'
  241. } else if (val == '0') {
  242. return '否'
  243. } else {
  244. return val
  245. }
  246. },
  247. getAreaList(val) {
  248. let areaParams = {
  249. adName: "",
  250. id: this.dczId,
  251. pageNum: 1,
  252. pageSize: 10000
  253. }
  254. let adCode = ''
  255. if (!val) {
  256. adCode = '000000000000'
  257. } else {
  258. adCode = val
  259. }
  260. request.get('/dc/ad/base/getAdData', {params: {'adCode': adCode}}).then(res => {
  261. if (res.success) {
  262. if (this.curSelectItem == 1) {
  263. this.cityList = res.data
  264. } else if (this.curSelectItem == 2) {
  265. this.countryList = res.data
  266. } else {
  267. this.provList = res.data
  268. }
  269. }
  270. })
  271. },
  272. provChange(val) {
  273. this.curSelectItem = 1
  274. this.cityName = ''
  275. this.countryName = ''
  276. this.formObj.admDiv = val
  277. this.provList.forEach(ele => {
  278. if (ele.adCode == this.provName) {
  279. this.provNames = ele.adName
  280. }
  281. })
  282. this.formObj.adName = this.provNames
  283. this.getAreaList(val)
  284. },
  285. RsvrTypeChange(val) {
  286. },
  287. cityChange(val) {
  288. this.curSelectItem = 2
  289. if (val && val != '') {
  290. this.formObj.admDiv = val
  291. this.countryName = ''
  292. this.cityList.forEach(ele => {
  293. if (ele.adCode == this.cityName) {
  294. this.cityNames = ele.adName
  295. }
  296. })
  297. this.formObj.adName = this.provNames + this.cityNames
  298. this.getAreaList(val)
  299. }
  300. },
  301. countryChange(val) {
  302. if (val && val != '') {
  303. this.formObj.admDiv = val
  304. this.countryList.forEach(ele => {
  305. if (ele.adCode == this.countryName) {
  306. this.countryNames = ele.adName
  307. }
  308. })
  309. this.formObj.adName = this.provNames + this.cityNames + this.countryNames
  310. this.formObj.adCode = val
  311. }
  312. },
  313. // 近期面貌
  314. recentAppearance() {
  315. this.xcztShow = true;
  316. },
  317. jqmmDialog() {
  318. this.xcztShow = false;
  319. },
  320. //影像
  321. imageClick() {
  322. if (!this.centerX && !this.centerY) {
  323. this.$message.warning('暂无经纬度信息!');
  324. return false;
  325. }
  326. this.imageShow = true;
  327. }
  328. },
  329. }
  330. </script>
  331. <style>
  332. #dcdxHeader {
  333. padding: 15px 20px;
  334. }
  335. #dxdcFooter {
  336. text-align: center;
  337. }
  338. #dxdcAside {
  339. border: 1px solid #d5d5ff;
  340. }
  341. .el-dialog__wrapper .el-treeWhite {
  342. /* max-height: 260px !important; */
  343. }
  344. </style>