2be25a86aff64697593b72ef0330ba0a9840be2a.svn-base 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  1. <template>
  2. <div>
  3. <!-- <el-dialog :title="'责任人填报'" :visible.sync="dialogFormVisible"> -->
  4. <el-container :style="{'max-height':this.dialogHeightA+'px'}">
  5. <el-main style="border:1px solid #d5d5ff;margin-left:5px;padding:0px;overflow-x: hidden;">
  6. <p style="font-weight:bolder;background-color:#d5d5ff;padding:3px;">详情</p>
  7. <el-row :gutter="5" style="padding:10px;">
  8. <el-col :span="8" style="color:#409EFF;text-align:right;font-weight:bold;">水库名称:</el-col>
  9. <el-col :span="16" style="text-align:left;">{{formObj.rsName}}</el-col>
  10. </el-row>
  11. <el-row :gutter="5" style="padding:10px;">
  12. <el-col :span="8" style="color:#409EFF;text-align:right;font-weight:bold;">管理机构:</el-col>
  13. <el-col :span="16" style="text-align:left;">{{formObj.rsAdmName}}</el-col>
  14. </el-row>
  15. <el-row :gutter="5" style="padding:10px;">
  16. <el-col :span="8" style="color:#409EFF;text-align:right;font-weight:bold;">行政区划:</el-col>
  17. <el-col :span="16" style="text-align:left;">{{formObj.location}}</el-col>
  18. </el-row>
  19. <el-row :gutter="5" style="padding:10px;">
  20. <el-col :span="8" style="color:#409EFF;text-align:right;font-weight:bold;">所在地点:</el-col>
  21. <el-col :span="16" style="text-align:left;">{{formObj.rsLoc}}</el-col>
  22. </el-row>
  23. <el-row :gutter="5" style="padding:10px;">
  24. <el-col :span="8" style="color:#409EFF;text-align:right;font-weight:bold;">建成时间:</el-col>
  25. <el-col :span="16" style="text-align:left;">{{formObj.value1}}</el-col>
  26. </el-row>
  27. <el-row :gutter="5" style="padding:10px;">
  28. <el-col :span="8" style="color:#409EFF;text-align:right;font-weight:bold;">工程规模:</el-col>
  29. <el-col :span="16" style="text-align:left;">{{formObj.engScal1}}</el-col>
  30. </el-row>
  31. <el-row :gutter="5" style="padding:10px;">
  32. <el-col :span="8" style="color:#409EFF;text-align:right;font-weight:bold;">总库容:</el-col>
  33. <el-col :span="16" style="text-align:left;">{{formObj.totCap}}</el-col>
  34. </el-row>
  35. <el-row :gutter="5" style="padding:10px;">
  36. <el-col :span="8" style="color:#409EFF;text-align:right;font-weight:bold;">最大坝高:</el-col>
  37. <el-col :span="16" style="text-align:left;">{{formObj.damSizeHig}}</el-col>
  38. </el-row>
  39. <el-row :gutter="5" style="padding:10px;">
  40. <el-col :span="8" style="color:#409EFF;text-align:right;font-weight:bold;">主坝坝型:</el-col>
  41. <el-col :span="16" style="text-align:left;">{{formObj.damTypeStr1}}</el-col>
  42. </el-row>
  43. <el-row :gutter="5" style="padding:10px;">
  44. <el-col :span="8" style="color:#409EFF;text-align:right;font-weight:bold;">注册登记号:</el-col>
  45. <el-col :span="16" style="text-align:left;">{{formObj.regCode}}</el-col>
  46. </el-row>
  47. <el-row :gutter="5" style="padding:10px;">
  48. <el-col :span="8" style="color:#409EFF;text-align:right;font-weight:bold;">经度:</el-col>
  49. <el-col :span="16" style="text-align:left;">{{formObj.longitude}}</el-col>
  50. </el-row>
  51. <el-row :gutter="5" style="padding:10px;">
  52. <el-col :span="8" style="color:#409EFF;text-align:right;font-weight:bold;">纬度:</el-col>
  53. <el-col :span="16" style="text-align:left;">{{formObj.latitude}}</el-col>
  54. </el-row>
  55. </el-main>
  56. </el-container>
  57. <!-- </el-dialog> -->
  58. </div>
  59. </template>
  60. <script>
  61. import inputWith from "../../widgets/inuptWith.vue";
  62. import request from "../../utils/gw_ajax_request.js";
  63. import { getrgstrIdObject1 } from "../../api/duChaTianBao.js";
  64. import { dateFormat } from "../../utils/gw_date.js";
  65. export default {
  66. components: {
  67. inputWith: inputWith
  68. },
  69. props: ["currentObjectRgstrId", "currentResCode", "currentObjectId","dialogHeightA"],
  70. data() {
  71. return {
  72. formObj: {
  73. rsName: "",
  74. rsAdmName: "",
  75. rsLoc: "",
  76. intm: "",
  77. engScal: "",
  78. totCap: "",
  79. damMaxHigh: "",
  80. damTypeStr: "",
  81. regCode: "",
  82. rsvrLong: "",
  83. rsvrLat: "",
  84. resCreateTime: ""
  85. },
  86. dialogFormVisible: false,
  87. formLabelWidth: "160px",
  88. loading: true,
  89. operationType1: "",
  90. currentResCode1: "",
  91. currentObjectId1: "",
  92. value1: ""
  93. };
  94. },
  95. computed: {
  96. recPersId() {
  97. return localStorage.getItem("userid")
  98. ? localStorage.getItem("userid")
  99. : "";
  100. }
  101. },
  102. mounted() {
  103. this.currentResCode1 = this.currentResCode;
  104. this.currentObjectId1 = this.currentObjectId;
  105. this.getRgstridObj();
  106. },
  107. watch: {
  108. currentObjectRgstrId(n, o) {
  109. this.getRgstridObj();
  110. }
  111. },
  112. methods: {
  113. getRgstridObj() {
  114. var _self = this;
  115. getrgstrIdObject1(_self.currentResCode1).then(
  116. res => {
  117. if (res.data) {
  118. _self.formObj = res.data;
  119. _self.formObj["damTypeStr1"] = _self.formatdamType(
  120. _self.formObj.damTypeStr
  121. );
  122. _self.formObj["engScal1"] = _self.formatEngScal(
  123. _self.formObj.engScal
  124. );
  125. // _self.value1 = dateFormat(res.data.compDate, "yyyy-MM-dd");
  126. } else {
  127. _self.formObj = {};
  128. }
  129. },
  130. err => {}
  131. );
  132. },
  133. addHandler() {
  134. var _self = this;
  135. _self.formObj["resCreateTime"] = _self.value1;
  136. _self.formObj.objId = _self.currentObjectId1;
  137. console.log(_self.formObj);
  138. try {
  139. request.post("/dc/att/rsBase/update", _self.formObj).then(res => {
  140. if (res.success) {
  141. _self.$message.success("修改成功");
  142. _self.$emit("addShuiKuSuccess");
  143. }
  144. });
  145. } catch (e) {}
  146. this.$emit("cancelHandler");
  147. },
  148. cancelHandler() {
  149. this.$emit("cancelHandler");
  150. },
  151. formatRadio(val) {
  152. if (val == "1") {
  153. return "是";
  154. } else if (val == "0") {
  155. return "否";
  156. } else {
  157. return val;
  158. }
  159. },
  160. formatEngScal(val) {
  161. switch (val) {
  162. case "1":
  163. val = "大(1)型";
  164. break;
  165. case "2":
  166. val = "大(2)型";
  167. break;
  168. case "3":
  169. val = "中型";
  170. break;
  171. case "4":
  172. val = "小(1)型";
  173. break;
  174. case "5":
  175. val = "小(2)型";
  176. break;
  177. case "9":
  178. val = "其他";
  179. break;
  180. }
  181. return val;
  182. },
  183. formatdamType(val) {
  184. switch (val) {
  185. case "1":
  186. val = "混凝土坝";
  187. break;
  188. case "2":
  189. val = "碾压混凝土坝";
  190. break;
  191. case "3":
  192. val = "浆砌石坝";
  193. break;
  194. case "4":
  195. val = "土坝";
  196. break;
  197. case "5":
  198. val = "堆石坝";
  199. break;
  200. case "6":
  201. val = "挡水坝";
  202. break;
  203. case "7":
  204. val = "其它";
  205. break;
  206. }
  207. return val;
  208. }
  209. }
  210. };
  211. </script>
  212. <style>
  213. #dcdxHeader {
  214. padding: 15px 20px;
  215. }
  216. #dxdcFooter {
  217. text-align: center;
  218. }
  219. #dxdcAside {
  220. border: 1px solid #d5d5ff;
  221. }
  222. .el-dialog__wrapper .el-treeWhite {
  223. /* max-height: 260px !important; */
  224. }
  225. </style>