1c18e2f82c29e005a6ad0e2677dbdeab08375c29.svn-base 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  1. <template>
  2. <div id="swzMain" v-loading='exportLoading'>
  3. <el-row style="margin-bottom:5px;">
  4. <el-col :span="24">
  5. <div class="grid-content bg-purple-light">
  6. <div style="padding:15px 5px 5px 5px;">
  7. <span style="font-size: 12px;margin-left: 10px;">名称:</span>
  8. <el-input style="width:150px;" class="kjr-input" size="mini" v-model="model_shuiwenzhan_name"
  9. placeholder="请输入名称查询" @keydown.enter.native="searchByName" clearable>
  10. </el-input>
  11. &nbsp;&nbsp;&nbsp;
  12. <el-button @click="searchByName" size="mini" type="primary">查询</el-button>
  13. <el-button @click="exPort" size="mini" type="success">导出</el-button>
  14. </div>
  15. <div style="padding:5px;">
  16. <el-col :span="5">
  17. <div style="height: 500px;overflow: auto">
  18. <provTreeList :rootCode="rootCode" :rootType="rootType"
  19. @provTreeSelectChange="provTreeSelectChangeHandler"
  20. >
  21. </provTreeList>
  22. </div>
  23. </el-col>
  24. <el-col :span="19">
  25. <el-table :data="tableData_shuiwenzhanList" v-loading="loading" height="500" border stripe style="width: 100%">
  26. <el-table-column type="index" width="50" label="序号" align="center" :index="indexMethod_country">
  27. </el-table-column>
  28. <el-table-column prop="stnm" label="测站名称" width="150" align="center" show-overflow-tooltip>
  29. </el-table-column>
  30. <el-table-column prop="rvnm" label="河流名称" width="150" align="center" show-overflow-tooltip></el-table-column>
  31. <el-table-column prop="hnnm" label="水系名称" width="200" align="center" show-overflow-tooltip></el-table-column>
  32. <el-table-column prop="bsnm" label="流域名称" width="150" align="center" show-overflow-tooltip>
  33. </el-table-column>
  34. <el-table-column prop="stlc" label="站址" width="200" align="center" show-overflow-tooltip>
  35. </el-table-column>
  36. <el-table-column label="基面名称" prop="dtmnm" width="110" align="center">
  37. </el-table-column>
  38. <el-table-column label="基面高程" width="160" align="center" prop="dtmel">
  39. </el-table-column>
  40. <el-table-column prop="sttp" label="站类" width="100" align="center" show-overflow-tooltip>
  41. </el-table-column>
  42. <el-table-column prop="dfrtms" label="报汛段次" width="200" align="center" show-overflow-tooltip>
  43. </el-table-column>
  44. <el-table-column prop="frgrd" label="报汛等级
  45. " width="200" align="center" show-overflow-tooltip>
  46. </el-table-column>
  47. <el-table-column prop="bgfrym" label="始报年月
  48. " width="200" align="center" show-overflow-tooltip>
  49. </el-table-column>
  50. <el-table-column prop="edfrym" label="终报报年月" width="200" align="center" show-overflow-tooltip>
  51. </el-table-column>
  52. <el-table-column prop="admauth" label="信息管理单位
  53. " width="200" align="center" show-overflow-tooltip>
  54. </el-table-column>
  55. <el-table-column prop="stbk" label="测站岸别
  56. " width="200" align="center" show-overflow-tooltip>
  57. </el-table-column>
  58. <el-table-column prop="esstym" label="建站年月
  59. " width="200" align="center" show-overflow-tooltip>
  60. </el-table-column>
  61. <el-table-column prop="phcd" label="拼音码
  62. " width="200" align="center" show-overflow-tooltip>
  63. </el-table-column>
  64. <el-table-column prop="locality" label="交换管理单位" width="100" align="center" show-overflow-tooltip>
  65. </el-table-column>
  66. <el-table-column prop="drna" label="集水面积" width="100" align="center" show-overflow-tooltip>
  67. </el-table-column>
  68. <el-table-column prop="dtpr" label="基面修正值" width="200" align="center" show-overflow-tooltip>
  69. </el-table-column>
  70. <el-table-column prop="atcunit" label="隶属行业单位" width="200" align="center" show-overflow-tooltip>
  71. </el-table-column>
  72. <el-table-column prop="stazt" label="测站方位
  73. " width="200" align="center" show-overflow-tooltip>
  74. </el-table-column>
  75. <el-table-column label="至河口距离" width="160" align="center" prop="dstrvm"></el-table-column>
  76. <el-table-column prop="usfl" label="启用标志" width="200" align="center" show-overflow-tooltip>
  77. </el-table-column>
  78. <el-table-column fixed="right" label="操作" min-width="200" align="center">
  79. <template slot-scope="scope">
  80. <el-button type="text" size="small" @click="SwzInfo(scope.row,'location')">定位</el-button>
  81. <el-button type="text" size="small" @click="SwzInfo(scope.row,'baseInfo')">基础信息</el-button>
  82. </template>
  83. </el-table-column>
  84. </el-table>
  85. <div class="block" style="text-align: center;">
  86. <el-pagination background @size-change="handleSizeChange_QuShuiKou"
  87. @current-change="handleCurrentChange_QuShuiKou" :page-sizes="[10,50, 100, 200]"
  88. :page-size="15" layout="total,sizes, prev, pager, next" :pager-count="5"
  89. :total="recordTotal_shuiwenzhan">
  90. </el-pagination>
  91. </div>
  92. </el-col>
  93. </div>
  94. </div>
  95. </el-col>
  96. </el-row>
  97. </div>
  98. </template>
  99. <script>
  100. import provTreeList from '../../../widgets/provTreeListAndChina'
  101. import request from '../../../utils/gw_ajax_request.js';
  102. import {exportModel} from "@util/gw_exportModel";
  103. export default {
  104. name: "InfoSurfaceWater",
  105. components:{
  106. provTreeList
  107. },
  108. props:["dcztStatus","dcztDisabled","currentAdCode"],
  109. data() {
  110. return {
  111. rootCode:'000000',
  112. rootType:'2',
  113. model_shuiwenzhan_name:'',
  114. recordTotal_dxs:'',
  115. tableData_shuiwenzhanList:[],
  116. recordTotal_shuiwenzhan:0,
  117. pageSize_shuiwenzhan: 10,
  118. pageIndex_shuiwenzhan: 1,
  119. loading: false,
  120. adCode:'',
  121. exportLoading:false,
  122. }
  123. },
  124. computed: {
  125. recPersId() {
  126. return localStorage.getItem("userid") ? localStorage.getItem("userid") : ''
  127. }
  128. },
  129. mounted(){
  130. let _this = this;
  131. _this.dczt = _this.dcztStatus;
  132. _this.loadTableQuShuiKou();
  133. },
  134. methods:{
  135. indexMethod_country(index) {
  136. return (index + 1) + this.pageSize_shuiwenzhan * (this.pageIndex_shuiwenzhan - 1)
  137. },
  138. provTreeSelectChangeHandler(params) {
  139. if(params.code == '000000000000'){
  140. this.adCode = '';
  141. }else{
  142. this.adCode = params.code;
  143. }
  144. this.$nextTick(()=>{
  145. this.pageSize_shuiwenzhan = 10;
  146. this.pageIndex_shuiwenzhan = 1;
  147. this.loadTableQuShuiKou();
  148. })
  149. },
  150. searchByName() {
  151. this.loadTableQuShuiKou();
  152. },
  153. async exPort(){
  154. let _self = this;
  155. this.exportLoading = true;
  156. let data = {};
  157. data.stnm = _self.model_shuiwenzhan_name;
  158. data.adCode = _self.adCode;
  159. data.isExport = '1';
  160. let datas = JSON.stringify(data);
  161. let url = `/pdcApi/st/stbprp/base/findPageList`;
  162. let downloadName = "水文站.xls";
  163. let type = "post";
  164. let result = await exportModel(type,url,downloadName,datas);
  165. this.exportLoading = result;
  166. },
  167. loadTableQuShuiKou() {
  168. let _this = this;
  169. _this.loading = true;
  170. request.post(`/st/stbprp/base/findPageList`, {
  171. stnm: _this.model_shuiwenzhan_name,
  172. pageNum: _this.pageIndex_shuiwenzhan,
  173. pageSize: _this.pageSize_shuiwenzhan,
  174. adCode: _this.adCode,
  175. // count: false
  176. }).then((res) => {
  177. if (res.success) {
  178. _this.$nextTick(function () {
  179. _this.loading = false;
  180. var obj = res.data;
  181. _this.tableData_shuiwenzhanList = obj.list;
  182. _this.recordTotal_shuiwenzhan = obj.total;
  183. })
  184. }
  185. })
  186. },
  187. handleSizeChange_QuShuiKou (pageSize) {
  188. this.pageSize_shuiwenzhan = pageSize;
  189. this.loadTableQuShuiKou();
  190. },
  191. handleCurrentChange_QuShuiKou (pageNum) {
  192. this.pageIndex_shuiwenzhan = pageNum;
  193. this.loadTableQuShuiKou();
  194. },
  195. bShuikuStatistic(){
  196. },
  197. SwzInfo(row,info){
  198. this.$emit('SwzInfo',row,info);
  199. },
  200. },
  201. watch:{
  202. currentAdCode(n,o){
  203. if(n == '0000000000'){
  204. n = '';
  205. }
  206. this.adCode = n;
  207. this.loadTableQuShuiKou();
  208. }
  209. }
  210. }
  211. </script>
  212. <style>
  213. #swzMain .el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content {
  214. background-color: #558ed0;
  215. }
  216. </style>