f236e63e9bb89314b59521b1c804f393bb08b98e.svn-base 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  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'}"><div>{{formObj.rsName}}</div></el-col>
  6. <el-col :span="4" class="nameClass">水库编码:</el-col>
  7. <el-col :span="8" class="valueClass" :style="{'height':testHeight+'px'}">{{formObj.rsCode}}</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'}"><div>{{formObj.rsAdmName}}</div></el-col>
  12. <el-col :span="4" class="nameClass">所在地点:</el-col>
  13. <el-col :span="8" class="valueClass" :style="{'height':testHeight+'px'}"><div>{{formObj.location}}</div></el-col>
  14. </el-row>
  15. <el-row class="rowClass">
  16. <el-col :span="4" class="nameClass">工程规模:</el-col>
  17. <el-col :span="8" class="valueClass" :style="{'height':testHeight+'px'}"><div>{{formObj.engScal1}}</div></el-col>
  18. <el-col :span="4" class="nameClass">总库容(万m3):</el-col>
  19. <el-col :span="8" class="valueClass" :style="{'height':testHeight+'px'}"><div>{{formObj.totCap}}</div></el-col>
  20. </el-row>
  21. <el-row class="rowClass">
  22. <el-col :span="4" class="nameClass">最大坝高(m):</el-col>
  23. <el-col :span="8" class="valueClass" :style="{'height':testHeight+'px'}"><div>{{formObj.damSizeHig}}</div></el-col>
  24. <el-col :span="4" class="nameClass">主坝坝型:</el-col>
  25. <el-col :span="8" class="valueClass" :style="{'height':testHeight+'px'}"><div>{{formObj.damTypeStr1}}</div></el-col>
  26. </el-row>
  27. <el-row class="rowClass">
  28. <el-col :span="4" class="nameClass">经度:</el-col>
  29. <el-col :span="8" class="valueClass" :style="{'height':testHeight+'px'}"><div>{{formObj.longitude}}</div></el-col>
  30. <el-col :span="4" class="nameClass">纬度:</el-col>
  31. <el-col :span="8" class="valueClass" :style="{'height':testHeight+'px'}"><div>{{formObj.latitude}}</div></el-col>
  32. </el-row>
  33. </div>
  34. </template>
  35. <script>
  36. import inputWith from "../../../../../widgets/inuptWith.vue";
  37. import request from "../../../../../utils/gw_ajax_request.js";
  38. import { getrgstrIdObject1 } from "../../../../../api/duChaTianBao.js";
  39. import { dateFormat } from "../../../../../utils/gw_date.js";
  40. export default {
  41. components: {
  42. inputWith: inputWith
  43. },
  44. props: ["currentObjectRgstrId", "currentResCode", "currentObjectId","dialogHeightA"],
  45. data() {
  46. return {
  47. testHeight:(window.innerHeight * 0.5 - 114) / 6,
  48. testHeight1:window.innerHeight * 0.5,
  49. formObj: {
  50. rsName: "",
  51. rsAdmName: "",
  52. rsLoc: "",
  53. intm: "",
  54. engScal: "",
  55. totCap: "",
  56. damMaxHigh: "",
  57. damTypeStr: "",
  58. regCode: "",
  59. rsvrLong: "",
  60. rsvrLat: "",
  61. resCreateTime: ""
  62. },
  63. dialogFormVisible: false,
  64. formLabelWidth: "160px",
  65. loading: true,
  66. operationType1: "",
  67. currentResCode1: "",
  68. currentObjectId1: "",
  69. value1: ""
  70. };
  71. },
  72. computed: {
  73. recPersId() {
  74. return localStorage.getItem("userid")? localStorage.getItem("userid"): "";
  75. }
  76. },
  77. mounted() {
  78. this.currentResCode1 = this.currentResCode;
  79. this.currentObjectId1 = this.currentObjectId;
  80. this.getRgstridObj();
  81. },
  82. watch: {
  83. currentObjectRgstrId(n, o) {
  84. this.getRgstridObj();
  85. }
  86. },
  87. methods: {
  88. getRgstridObj() {
  89. var _self = this;
  90. getrgstrIdObject1(_self.currentResCode1).then(res => {
  91. if (res.data) {
  92. _self.formObj = res.data;
  93. _self.formObj["damTypeStr1"] = _self.formatdamType(_self.formObj.damTypeStr);
  94. _self.formObj["engScal1"] = _self.formatEngScal(_self.formObj.engScal);
  95. } else {
  96. _self.formObj = {};
  97. }
  98. },err => {
  99. });
  100. },
  101. addHandler() {
  102. var _self = this;
  103. _self.formObj["resCreateTime"] = _self.value1;
  104. _self.formObj.objId = _self.currentObjectId1;
  105. console.log(_self.formObj);
  106. try {
  107. request.post("/dc/att/rsBase/update", _self.formObj).then(res => {
  108. if (res.success) {
  109. _self.$message.success("修改成功");
  110. _self.$emit("addShuiKuSuccess");
  111. }
  112. });
  113. } catch (e) {}
  114. this.$emit("cancelHandler");
  115. },
  116. cancelHandler() {
  117. this.$emit("cancelHandler");
  118. },
  119. formatRadio(val) {
  120. if (val == "1") {
  121. return "是";
  122. } else if (val == "0") {
  123. return "否";
  124. } else {
  125. return val;
  126. }
  127. },
  128. formatEngScal(val) {
  129. switch (val) {
  130. case "1":
  131. val = "大(1)型";
  132. break;
  133. case "2":
  134. val = "大(2)型";
  135. break;
  136. case "3":
  137. val = "中型";
  138. break;
  139. case "4":
  140. val = "小(1)型";
  141. break;
  142. case "5":
  143. val = "小(2)型";
  144. break;
  145. case "9":
  146. val = "其他";
  147. break;
  148. }
  149. return val;
  150. },
  151. formatdamType(val) {
  152. switch (val) {
  153. case "1":
  154. val = "混凝土坝";
  155. break;
  156. case "2":
  157. val = "碾压混凝土坝";
  158. break;
  159. case "3":
  160. val = "浆砌石坝";
  161. break;
  162. case "4":
  163. val = "土坝";
  164. break;
  165. case "5":
  166. val = "堆石坝";
  167. break;
  168. case "6":
  169. val = "挡水坝";
  170. break;
  171. case "7":
  172. val = "其它";
  173. break;
  174. }
  175. return val;
  176. }
  177. }
  178. };
  179. </script>
  180. <style scoped>
  181. @import "../../../assets/css/popup.css";
  182. </style>