c1ee9e21703938ea4ed0c5fcdbc534fe6b21a484.svn-base 12 KB

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