ae7f8c00b20be5edf565b53dae462de6222fb706.svn-base 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. <template>
  2. <div id="fpxMain">
  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_fpx_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. </div>
  14. <div style="padding:5px;">
  15. <el-col :span="5">
  16. <div style="height: 500px;overflow: auto">
  17. <provTreeList :rootCode="rootCode" :rootType="rootType"
  18. @provTreeSelectChange="provTreeSelectChangeHandler"
  19. >
  20. </provTreeList>
  21. </div>
  22. </el-col>
  23. <el-col :span="19">
  24. <el-table :data="tableData_fpxList" v-loading="loading" height="500" border stripe style="width: 100%">
  25. <el-table-column type="index" width="50" label="序号" align="center" :index="indexMethod_country">
  26. </el-table-column>
  27. <el-table-column prop="name" label="名称" width="150" align="center" show-overflow-tooltip>
  28. </el-table-column>
  29. <el-table-column prop="code" label="编码" width="150" align="center" show-overflow-tooltip>
  30. </el-table-column>
  31. <el-table-column fixed="right" label="操作" min-width="200" align="center">
  32. <template slot-scope="scope">
  33. <el-button type="text" size="small" @click="SwzInfo(scope.row,'location')">定位</el-button>
  34. <!-- <el-button type="text" size="small" @click="SwzInfo(scope.row,'baseInfo')">基础信息</el-button> -->
  35. </template>
  36. </el-table-column>
  37. </el-table>
  38. <div class="block">
  39. <el-pagination background @size-change="handleSizeChange_fpx"
  40. @current-change="handleCurrentChange_fpx" :page-sizes="[10,50, 100, 200]"
  41. :page-size="15" layout="total,sizes, prev, pager, next" :pager-count="5"
  42. :total="recordTotal_fpx">
  43. </el-pagination>
  44. </div>
  45. </el-col>
  46. </div>
  47. </div>
  48. </el-col>
  49. </el-row>
  50. </div>
  51. </template>
  52. <script>
  53. import provTreeList from '../../../widgets/provTreeListAndChina'
  54. import request from '../../../utils/gw_ajax_request.js';
  55. import {getFuPinXianPage} from '../../../api/zhxxAPI.js'
  56. export default {
  57. name: "InfoSurfaceWater",
  58. components:{
  59. provTreeList
  60. },
  61. props:["dcztStatus","dcztDisabled","currentAdCode","layerId"],
  62. data() {
  63. return {
  64. currentType:'',
  65. rootCode:'350000',
  66. rootType:'2',
  67. model_fpx_name:'',
  68. recordTotal_dxs:'',
  69. tableData_fpxList:[],
  70. recordTotal_fpx:0,
  71. pageSize_fpx: 10,
  72. pageIndex_fpx: 1,
  73. loading: false,
  74. adCode:'',
  75. }
  76. },
  77. computed: {
  78. recPersId() {
  79. return localStorage.getItem("userid") ? localStorage.getItem("userid") : ''
  80. }
  81. },
  82. mounted(){
  83. this.adCode = this.currentAdCode;
  84. this.rootCode = this.currentAdCode;
  85. let _this = this;
  86. if(_this.layerId == 'mapServer_fpx'){//扶贫县 全部
  87. _this.currentType = 'fpx';
  88. }else if(_this.layerId == 'mapServer_zdx'){//重点扶贫县
  89. _this.currentType = 'zdx';
  90. }else if(_this.layerId == 'mapServer_bjx'){//边境扶贫县
  91. _this.currentType = 'bjx';
  92. }else if(_this.layerId == 'mapServer_tcx'){//天窗扶贫县
  93. _this.currentType = 'tcx';
  94. }else if(_this.layerId == 'mapServer_ddfp'){//定点扶贫县
  95. _this.currentType = 'ddfp';
  96. }
  97. _this.dczt = _this.dcztStatus;
  98. _this.loadTableFpx();
  99. },
  100. methods:{
  101. indexMethod_country(index) {
  102. return (index + 1) + this.pageSize_fpx * (this.pageIndex_fpx - 1)
  103. },
  104. provTreeSelectChangeHandler(params) {
  105. if(params.code == '000000000000'){
  106. this.adCode = '';
  107. }else{
  108. this.adCode = params.code;
  109. }
  110. this.$nextTick(()=>{
  111. this.pageSize_fpx = 10;
  112. this.pageIndex_fpx = 1;
  113. this.loadTableFpx();
  114. })
  115. },
  116. searchByName() {
  117. this.loadTableFpx();
  118. },
  119. loadTableFpx() {
  120. let _this = this;
  121. _this.loading = true;
  122. let str = _this.currentType;
  123. let obj = {
  124. 'code':_this.adCode,
  125. 'name':_this.model_fpx_name,
  126. 'pageNum': _this.pageIndex_fpx,
  127. 'pageSize': _this.pageSize_fpx,
  128. }
  129. obj[_this.currentType] = '1';
  130. getFuPinXianPage(obj).then((res)=>{
  131. if (res.success) {
  132. _this.$nextTick(function () {
  133. _this.loading = false;
  134. var obj = res.data;
  135. _this.tableData_fpxList = obj.list;
  136. _this.recordTotal_fpx = obj.total;
  137. })
  138. }
  139. })
  140. },
  141. handleSizeChange_fpx (pageSize) {
  142. this.pageSize_fpx = pageSize;
  143. this.loadTableFpx();
  144. },
  145. handleCurrentChange_fpx (pageNum) {
  146. this.pageIndex_fpx = pageNum;
  147. this.loadTableFpx();
  148. },
  149. bShuikuStatistic(){
  150. },
  151. SwzInfo(row,info){
  152. this.$emit('SwzInfo',row,info);
  153. },
  154. },
  155. watch:{
  156. currentAdCode(n,o){
  157. if(n == '0000000000'){
  158. n = '';
  159. }
  160. this.adCode = n;
  161. this.loadTableFpx();
  162. }
  163. }
  164. }
  165. </script>
  166. <style>
  167. #fpxMain .el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content {
  168. background-color: #558ed0;
  169. }
  170. </style>