a858b771ed8b3eac66f087f4ffe9cdf1b8b0761b.svn-base 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <template>
  2. <div class="popupContentClass" :style="{'height':testHeight1+'px'}">
  3. <el-row class="rowClass">
  4. <el-col :span="4" class="nameClass">行政区划:</el-col>
  5. <el-col :span="8" class="valueClass" :style="{'height':testHeight+'px'}">{{formObj.adName}}</el-col>
  6. <el-col :span="4" class="nameClass">编码:</el-col>
  7. <el-col :span="8" class="valueClass" :style="{'height':testHeight+'px'}">{{formObj.adCode}}</el-col>
  8. </el-row>
  9. <el-row class="rowClass">
  10. <el-col :span="4" class="nameClass">经度:</el-col>
  11. <el-col :span="8" class="valueClass" :style="{'height':testHeight+'px'}">{{formObj.lgtd}}</el-col>
  12. <el-col :span="4" class="nameClass">纬度:</el-col>
  13. <el-col :span="8" class="valueClass" :style="{'height':testHeight+'px'}">{{formObj.lttd}}</el-col>
  14. </el-row>
  15. <el-row class="rowClass">
  16. <el-col :span="4" class="nameClass">全称:</el-col>
  17. <el-col :span="20" class="valueClass" :style="{'height':testHeight+'px'}">{{formObj.adFullName}}</el-col>
  18. </el-row>
  19. </div>
  20. </template>
  21. <script>
  22. import request from "@util/gw_ajax_request.js"
  23. export default {
  24. components: {
  25. },
  26. props: ["currentJysglAdCode"],
  27. data() {
  28. return {
  29. testHeight:(window.innerHeight * 0.5 - 50) / 6,
  30. testHeight1:window.innerHeight * 0.5,
  31. dialogFormVisible:false,
  32. formObj: {},
  33. formLabelWidth: "160px",
  34. loading: true,
  35. currentJysglAdCode1: "",
  36. };
  37. },
  38. computed: {
  39. recPersId() {
  40. return localStorage.getItem("userid")
  41. ? localStorage.getItem("userid")
  42. : "";
  43. }
  44. },
  45. mounted() {
  46. this.dialogFormVisible = true;
  47. this.currentJysglAdCode1 = this.currentJysglAdCode;
  48. this.getBaseInfo();
  49. },
  50. watch: {
  51. currentJysglAdCode(n, o) {
  52. this.currentJysglAdCode1 = this.currentJysglAdCode;
  53. this.getBaseInfo();
  54. }
  55. },
  56. methods: {
  57. showDialog(){
  58. this.dialogFormVisible = true;
  59. },
  60. getBaseInfo() {
  61. var _self = this;
  62. if(_self.currentJysglAdCode1 == ""){
  63. return
  64. }
  65. request.get(`/dc/insp/base/getCityByCode?code=${_self.currentJysglAdCode1}`).then(res => {
  66. if (res.data) {
  67. _self.formObj = res.data;
  68. } else {
  69. _self.formObj = {};
  70. }
  71. }).catch(err =>{
  72. console.log(err);
  73. });
  74. }
  75. },
  76. filters:{
  77. }
  78. };
  79. </script>
  80. <style scoped>
  81. @import "../../../assets/css/popup.css";
  82. </style>