b9dffae27469b02e1e9e44e336b3aec0d6afb589.svn-base 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437
  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;">
  6. 信息填报
  7. </p>
  8. <el-form :model="formObj" :label-width="formLabelWidth">
  9. <p style="margin-top:10px;margin-bottom: 10px;">
  10. <i class="left-vertical"></i>
  11. <span>基本信息</span>
  12. <el-button
  13. type="warning"
  14. style="float: right;"
  15. @click="recentAppearance"
  16. >近期面貌</el-button
  17. >
  18. <el-button
  19. type="warning"
  20. style="float: right; margin-right: 10px;"
  21. @click="imageClick"
  22. >影像
  23. </el-button>
  24. <span class="hrs"></span>
  25. </p>
  26. <el-form-item label="单位名称" required>
  27. <el-input
  28. v-model="formObj.name"
  29. autocomplete="off"
  30. style="width:70%;"
  31. ></el-input>
  32. </el-form-item>
  33. <el-form-item label="行政区划" required>
  34. <div v-if="showLocSelect">
  35. <el-select
  36. v-model="provName"
  37. placeholder="选择省"
  38. @change="provChange"
  39. style="width:20%"
  40. >
  41. <el-option
  42. v-for="item in provList"
  43. :key="item.adCode"
  44. :label="item.adName"
  45. :value="item.adCode"
  46. >
  47. </el-option>
  48. </el-select>
  49. <el-select
  50. v-model="cityName"
  51. placeholder="选择市"
  52. @change="cityChange"
  53. style="width:20%"
  54. >
  55. <el-option
  56. v-for="item in cityList"
  57. :key="item.adCode"
  58. :label="item.adName"
  59. :value="item.adCode"
  60. >
  61. </el-option>
  62. </el-select>
  63. <el-select
  64. v-model="countryName"
  65. placeholder="选择县"
  66. @change="countryChange"
  67. style="width:20%"
  68. >
  69. <el-option
  70. v-for="item in countryList"
  71. :key="item.adCode"
  72. :label="item.adName"
  73. :value="item.adCode"
  74. >
  75. </el-option>
  76. </el-select>
  77. &#x3000;<span
  78. v-if="showLocSelect"
  79. @click="showLocSelect = false"
  80. style="color: #009fff;font-size:12px;cursor:pointer"
  81. >取消</span
  82. >
  83. </div>
  84. <div v-else>
  85. <el-input
  86. v-model="formObj.adName"
  87. readonly
  88. autocomplete="off"
  89. style="width:70%;"
  90. ></el-input
  91. >&#x3000;<span
  92. @click="showLocSelect = true"
  93. v-if="openType"
  94. style="color: #009fff;font-size:12px;cursor:pointer"
  95. >更改</span
  96. >
  97. </div>
  98. </el-form-item>
  99. <!-- <el-form-item label="注册地址">
  100. <el-input v-model="formObj.regAddr" autocomplete="off" style="width:70%;"></el-input>
  101. </el-form-item> -->
  102. <el-form-item label="地址">
  103. <el-input
  104. v-model="formObj.busAddr"
  105. autocomplete="off"
  106. style="width:70%;"
  107. ></el-input>
  108. </el-form-item>
  109. <el-form-item label="联系人">
  110. <el-input
  111. v-model="formObj.conPers"
  112. autocomplete="off"
  113. style="width:70%;"
  114. >
  115. </el-input>
  116. </el-form-item>
  117. <el-form-item label="联系人电话">
  118. <el-input
  119. v-model="formObj.conPersTel"
  120. autocomplete="off"
  121. style="width:70%;"
  122. ></el-input>
  123. </el-form-item>
  124. <el-form-item label="经度">
  125. <el-input
  126. v-model="formObj.centerX"
  127. autocomplete="off"
  128. style="width:70%;"
  129. ></el-input>
  130. </el-form-item>
  131. <el-form-item label="纬度">
  132. <el-input
  133. v-model="formObj.centerY"
  134. autocomplete="off"
  135. style="width:70%;"
  136. ></el-input>
  137. </el-form-item>
  138. <el-form-item label="是否符合申请条件">
  139. <el-radio-group v-model="formObj.isCnfm">
  140. <el-radio label="1">符合</el-radio>
  141. <el-radio label="2">不符合</el-radio>
  142. </el-radio-group>
  143. </el-form-item>
  144. <el-form-item label="">
  145. <!-- <el-button @click="cancelHandler">取 消</el-button> -->
  146. <el-button type="primary" @click="addHandler" v-if="openType"
  147. >保 存</el-button
  148. >
  149. </el-form-item>
  150. </el-form>
  151. </el-main>
  152. </el-container>
  153. <theRecentAppearance
  154. v-if="xcztShow"
  155. @jqmmDialogClose="jqmmDialog"
  156. :jqmmShow="xcztShow"
  157. :openType="openType"
  158. :jqmmEngId="currentObjectRgstrId"
  159. :dialogTitle="currentObjectName + '近期面貌'"
  160. style="z-index: 9999;"
  161. ></theRecentAppearance>
  162. <!--影像弹窗-->
  163. <el-dialog
  164. :title="currentObjectName + '影像'"
  165. :visible.sync="imageShow"
  166. append-to-body
  167. :close-on-click-modal="false"
  168. width="60%"
  169. >
  170. <div style="height: 60vh;">
  171. <mapLocation
  172. ref="mapRef"
  173. v-if="imageShow"
  174. :gdX="centerX"
  175. :gdY="centerY"
  176. ></mapLocation>
  177. </div>
  178. </el-dialog>
  179. </div>
  180. </template>
  181. <script>
  182. import inputWith from "@widget/inuptWith.vue";
  183. import request from "@util/gw_ajax_request.js";
  184. import theRecentAppearance from "../../duChaDuiXiang/theRecentAppearance";
  185. import unlimitDatePicker from "@baseWidget/unLimitdatePicker.vue";
  186. import mapLocation from "../mapLocation";
  187. export default {
  188. components: {
  189. inputWith: inputWith,
  190. unlimitDatePicker: unlimitDatePicker,
  191. theRecentAppearance,
  192. mapLocation
  193. },
  194. props: [
  195. "id",
  196. "currentObjectRgstrId",
  197. "currentResCode",
  198. "currentObjectId",
  199. "currentObjectName",
  200. "openType"
  201. ],
  202. data() {
  203. return {
  204. formObj: {
  205. adCode: "",
  206. adName: "",
  207. name: "",
  208. busAddr: "",
  209. conPersTel: "",
  210. // 'regAddr': '',
  211. conPers: "",
  212. centerX: "",
  213. centerY: ""
  214. },
  215. dialogFormVisible: false,
  216. formLabelWidth: "160px",
  217. loading: true,
  218. operationType1: "",
  219. currentResCode1: "",
  220. currentObjectId1: "",
  221. value1: "",
  222. provList: [],
  223. cityList: [],
  224. countryList: [],
  225. provName: "",
  226. cityName: "",
  227. countryName: "",
  228. provNames: "",
  229. cityNames: "",
  230. countryNames: "",
  231. curSelectItem: 0,
  232. showLocSelect: false,
  233. locat: {
  234. location: "",
  235. admDiv: ""
  236. },
  237. xcztShow: false,
  238. imageShow: false,
  239. xcztEngId: "",
  240. centerX: 0,
  241. centerY: 0
  242. };
  243. },
  244. computed: {
  245. recPersId() {
  246. return localStorage.getItem("userid")
  247. ? localStorage.getItem("userid")
  248. : "";
  249. }
  250. },
  251. mounted() {
  252. this.currentResCode1 = this.currentResCode;
  253. this.currentObjectId1 = this.currentObjectId;
  254. this.getRgstridObj();
  255. this.getAreaList();
  256. },
  257. watch: {
  258. id(n, o) {
  259. this.getRgstridObj();
  260. },
  261. showLocSelect(val) {
  262. if (!val) {
  263. this.formObj.rvLoc = this.locat.location;
  264. this.formObj.admDiv = this.locat.admDiv;
  265. this.provName = "";
  266. this.cityName = "";
  267. this.countryName = "";
  268. }
  269. }
  270. },
  271. methods: {
  272. getRgstridObj() {
  273. var _self = this;
  274. request.get(`/att/fjsdu/base/getObjId/${_self.currentObjectId}`).then(
  275. res => {
  276. if (res.data) {
  277. _self.formObj = res.data;
  278. _self.centerX = res.data.centerX;
  279. _self.centerY = res.data.centerY;
  280. } else {
  281. _self.formObj = {};
  282. }
  283. },
  284. err => {}
  285. );
  286. },
  287. addHandler() {
  288. var _self = this;
  289. _self.formObj["persId"] = _self.recPersId;
  290. _self.formObj.objId = _self.currentObjectId1;
  291. _self.formObj.id = _self.currentObjectRgstrId;
  292. try {
  293. this.$confirm("确认保存基础信息?", "提示", {
  294. confirmButtonText: "确定",
  295. cancelButtonText: "取消",
  296. type: "warning"
  297. }).then(() => {
  298. request.post("/bis/insp/fjsdu", _self.formObj).then(res => {
  299. if (res.success) {
  300. _self.$emit("addShuiKuSuccess");
  301. _self.showLocSelect = false;
  302. _self.getRgstridObj();
  303. _self.$message.success("修改成功");
  304. } else {
  305. _self.$emit("cancelHandler");
  306. }
  307. });
  308. });
  309. } catch (e) {}
  310. },
  311. cancelHandler() {
  312. this.$emit("cancelHandler");
  313. },
  314. getAreaList(val) {
  315. let areaParams = {
  316. adName: "",
  317. id: this.dczId,
  318. pageNum: 1,
  319. pageSize: 10000
  320. };
  321. let adCode = "";
  322. if (!val) {
  323. adCode = "000000000000";
  324. } else {
  325. adCode = val;
  326. }
  327. request
  328. .get("/dc/ad/base/getAdData", { params: { adCode: adCode } })
  329. .then(res => {
  330. if (res.success) {
  331. if (this.curSelectItem == 1) {
  332. this.cityList = res.data;
  333. } else if (this.curSelectItem == 2) {
  334. this.countryList = res.data;
  335. } else {
  336. this.provList = res.data;
  337. }
  338. }
  339. });
  340. },
  341. provChange(val) {
  342. this.curSelectItem = 1;
  343. this.cityName = "";
  344. this.countryName = "";
  345. this.formObj.admDiv = val;
  346. this.provList.forEach(ele => {
  347. if (ele.adCode == this.provName) {
  348. this.provNames = ele.adName;
  349. }
  350. });
  351. this.formObj.adName = this.provNames;
  352. this.getAreaList(val);
  353. },
  354. RsvrTypeChange(val) {},
  355. cityChange(val) {
  356. this.curSelectItem = 2;
  357. if (val && val != "") {
  358. this.formObj.admDiv = val;
  359. this.countryName = "";
  360. this.cityList.forEach(ele => {
  361. if (ele.adCode == this.cityName) {
  362. this.cityNames = ele.adName;
  363. }
  364. });
  365. this.formObj.adName = this.provNames + this.cityNames;
  366. this.getAreaList(val);
  367. }
  368. },
  369. countryChange(val) {
  370. if (val && val != "") {
  371. this.formObj.admDiv = val;
  372. this.countryList.forEach(ele => {
  373. if (ele.adCode == this.countryName) {
  374. this.countryNames = ele.adName;
  375. }
  376. });
  377. this.formObj.adName =
  378. this.provNames + this.cityNames + this.countryNames;
  379. }
  380. },
  381. // 近期面貌
  382. recentAppearance() {
  383. this.xcztShow = true;
  384. },
  385. jqmmDialog() {
  386. this.xcztShow = false;
  387. },
  388. //影像
  389. imageClick() {
  390. if (!this.centerX && !this.centerY) {
  391. this.$message.warning("暂无经纬度信息!");
  392. return false;
  393. }
  394. this.imageShow = true;
  395. }
  396. }
  397. };
  398. </script>
  399. <style>
  400. #dcdxHeader {
  401. padding: 15px 20px;
  402. }
  403. #dxdcFooter {
  404. text-align: center;
  405. }
  406. #dxdcAside {
  407. border: 1px solid #d5d5ff;
  408. }
  409. .el-dialog__wrapper .el-treeWhite {
  410. /* max-height: 260px !important; */
  411. }
  412. .left-vertical {
  413. width: 8px;
  414. height: 17px;
  415. background: rgb(250, 205, 145);
  416. display: inline-block;
  417. vertical-align: bottom;
  418. }
  419. .hrs {
  420. display: inline-block;
  421. width: calc(100% - 40px);
  422. margin-left: 10px;
  423. height: 1px;
  424. vertical-align: middle;
  425. background-color: #ddd;
  426. }
  427. </style>