dbde25a19d7bef4dd7167d18bec3770201655a7e.svn-base 12 KB

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