d3b6a3e273e81a83c73860de1a51779ef893f9be.svn-base 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  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.wintName}}</el-col>
  6. <el-col :span="4" class="nameClass">取水口位置:</el-col>
  7. <el-col :span="8" class="valueClass" :style="{'height':testHeight+'px'}">{{formObj.wintPos}}</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.wintCode}}
  12. </el-col>
  13. <el-col :span="4" class="nameClass">行政区划:</el-col>
  14. <el-col :span="8" class="valueClass" :style="{'height':testHeight+'px'}">{{formObj.adName}}</el-col>
  15. </el-row>
  16. <el-row class="rowClass">
  17. <el-col :span="4" class="nameClass">取水水源名称:</el-col>
  18. <el-col :span="8" class="valueClass" :style="{'height':testHeight+'px'}">{{formObj.wainWasoName}}</el-col>
  19. <el-col :span="4" class="nameClass">取水口类型:</el-col>
  20. <el-col :span="8" class="valueClass" :style="{'height':testHeight+'px'}">{{formObj.wainType | wainType}}</el-col>
  21. </el-row>
  22. <el-row class="rowClass">
  23. <el-col :span="4" class="nameClass">经度:</el-col>
  24. <el-col :span="8" class="valueClass" :style="{'height':testHeight+'px'}">{{formObj.gdX}}</el-col>
  25. <el-col :span="4" class="nameClass">纬度:</el-col>
  26. <el-col :span="8" class="valueClass" :style="{'height':testHeight+'px'}">{{formObj.gdY}}</el-col>
  27. </el-row>
  28. <el-row class="rowClass">
  29. <el-col :span="6" class="nameClass">设计日最大取水量(m3/s):</el-col>
  30. <el-col :span="6" class="valueClass" :style="{'height':testHeight+'px'}">{{formObj.desDayQ}}</el-col>
  31. <el-col :span="6" class="nameClass">设计年取水量(万m3/年):</el-col>
  32. <el-col :span="6" class="valueClass" :style="{'height':testHeight+'px'}">{{formObj.desYearQ}}</el-col>
  33. </el-row>
  34. <el-row class="rowClass">
  35. <el-col :span="6" class="nameClass">设计最大取水流量(m3/s):</el-col>
  36. <el-col :span="6" class="valueClass" :style="{'height':testHeight+'px'}">{{formObj.desQ}}</el-col>
  37. </el-row>
  38. </div>
  39. </template>
  40. <script>
  41. import request from "@util/gw_ajax_request.js"
  42. export default {
  43. components: {
  44. },
  45. props: ["currentResCode"],
  46. data() {
  47. return {
  48. testHeight:(window.innerHeight * 0.5 - 50) / 6,
  49. testHeight1:window.innerHeight * 0.5,
  50. dialogFormVisible:false,
  51. formObj: {},
  52. formLabelWidth: "160px",
  53. loading: true,
  54. currentResCode1: "",
  55. };
  56. },
  57. computed: {
  58. recPersId() {
  59. return localStorage.getItem("userid")
  60. ? localStorage.getItem("userid")
  61. : "";
  62. }
  63. },
  64. mounted() {
  65. this.dialogFormVisible = true;
  66. this.currentResCode1 = this.currentResCode;
  67. this.getBaseInfo();
  68. },
  69. watch: {
  70. currentResCode(n, o) {
  71. this.currentResCode1 = this.currentResCode;
  72. this.getBaseInfo();
  73. }
  74. },
  75. methods: {
  76. showDialog(){
  77. this.dialogFormVisible = true;
  78. },
  79. getBaseInfo() {
  80. var _self = this;
  81. if(_self.currentResCode1 == ""){
  82. return
  83. }
  84. request.get(`/att/wint/base/b/${_self.currentResCode1}`).then(res => {
  85. if (res.data) {
  86. _self.formObj = res.data;
  87. _self.formObj.gdX = _self.formObj.gdX ? _self.formObj.gdX : _self.formObj.wainLong;
  88. _self.formObj.gdY = _self.formObj.gdY ? _self.formObj.gdY : _self.formObj.wainLat;
  89. } else {
  90. _self.formObj = {};
  91. }
  92. }).catch(err =>{
  93. console.log(err);
  94. });
  95. }
  96. },
  97. filters:{
  98. wainType(val){
  99. if(val == '1'){
  100. return '单一用户取水口'
  101. }else if(val == '2'){
  102. return '多用户公用取水口'
  103. }else{
  104. return ''
  105. }
  106. }
  107. }
  108. };
  109. </script>
  110. <style scoped>
  111. @import "../../../assets/css/popup.css";
  112. </style>