e0246e12453156918c4e2969c836cb350c99402d.svn-base 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. <template>
  2. <div v-loading='exportLoading'>
  3. <el-row>
  4. <el-col :span="24">
  5. <div class="grid-content bg-purple-light">
  6. <div style="padding:5px;">
  7. <span style="font-size: 12px;margin-left: 10px;">名称:</span>
  8. <el-input style="width:130px;" class="kjr-input" size="mini"
  9. v-model="model_country_name" 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:0px;">
  16. <el-table :data="tableData_countrywaterList" height="510" border stripe
  17. style="width: 100%" v-loading="loading">
  18. <el-table-column type="index" min-width="50" label="序号" align="center"
  19. :index="indexMethod_country">
  20. </el-table-column>
  21. <el-table-column align="center" show-overflow-tooltip prop="adNm" label="行政村名(*县*乡镇*村)" min-width="160"></el-table-column>
  22. <el-table-column align="center" show-overflow-tooltip prop="isPoverty" label="是否贫困村" min-width="80">
  23. <template slot-scope="scope">
  24. <span>{{formatRadio(scope.row.isPoverty)}}</span>
  25. </template>
  26. </el-table-column>
  27. <el-table-column align="center" show-overflow-tooltip prop="isFluexc" label="是否氟超标地区" min-width="100">
  28. <template slot-scope="scope">
  29. <span>{{formatRadio(scope.row.isFluexc)}}</span>
  30. </template>
  31. </el-table-column>
  32. <el-table-column align="center" show-overflow-tooltip prop="isMtarea" label="是否山区" min-width="70">
  33. <template slot-scope="scope">
  34. <span>{{formatRadio(scope.row.isMtarea)}}</span>
  35. </template>
  36. </el-table-column>
  37. <el-table-column align="center" show-overflow-tooltip prop="isCenwtSupply" label="是否集中供水村" min-width="100">
  38. <template slot-scope="scope">
  39. <span>{{formatRadio(scope.row.isCenwtSupply)}}</span>
  40. </template>
  41. </el-table-column>
  42. <el-table-column align="center" show-overflow-tooltip prop="watersupplyPer" label="集中供水人口比例" min-width="110">
  43. <template slot-scope="scope">
  44. <span>{{scope.row.watersupplyPer ? scope.row.watersupplyPer * 100 + '%' : ''}}</span>
  45. </template>
  46. </el-table-column>
  47. <el-table-column align="center" sortable show-overflow-tooltip prop="visitDate" label="暗访日期" min-width="80"></el-table-column>
  48. <el-table-column fixed="right" label="操作" min-width="200" align="center">
  49. <template slot-scope="scope">
  50. <el-button type="text" size="small" @click="ryInfo(scope.row,'location')">定位</el-button>
  51. <!-- <el-button type="text" size="small" @click="ryInfo(scope.row,'baseInfo')">基础信息</el-button> -->
  52. <el-button type="text" size="small" @click="ryInfo(scope.row,'dcInfo')">督查信息</el-button>
  53. </template>
  54. </el-table-column>
  55. </el-table>
  56. <div class="block" style='text-align: center;'>
  57. <el-pagination background @size-change="handleSizeChange_country"
  58. @current-change="handleCurrentChange_country" :page-sizes="[10,50, 100, 200]"
  59. :page-size="15" layout="total,sizes, prev, pager, next"
  60. :total="recordTotal_country">
  61. </el-pagination>
  62. </div>
  63. </div>
  64. </div>
  65. </el-col>
  66. </el-row>
  67. </div>
  68. </template>
  69. <script>
  70. import request from '../../../utils/gw_ajax_request.js';
  71. import {exportModel} from "@util/gw_exportModel";
  72. export default {
  73. name: "peopleDrink",
  74. props:["currentAdCode"],
  75. data() {
  76. return {
  77. model_country_name:'',
  78. tableData_countrywaterList:[],
  79. pageSize_country: 10,
  80. pageIndex_country: 1,
  81. recordTotal_country: 0,
  82. loading: false,
  83. objtype: '2',
  84. exportLoading:false,
  85. }
  86. },
  87. mounted(){
  88. this.loadTableCountry();
  89. },
  90. methods:{
  91. searchByName(){
  92. this.loadTableCountry();
  93. },
  94. async exPort(){
  95. this.exportLoading = true;
  96. let url = `/pdcApi/dc/insp/obj/getObjByPersId?persGuid=${localStorage.getItem("userid")}&objType=${this.objtype}&adName=${this.model_country_name}&adCode=${this.currentAdCode}&isExport=1`;
  97. let downloadName = "督查行政村.xls";
  98. let type = "get";
  99. let result = await exportModel(type,url,downloadName);
  100. this.exportLoading = result;
  101. },
  102. loadTableCountry() {
  103. this.loading = true;
  104. request.get(`/dc/insp/obj/getPageByPersId`, {
  105. params: {
  106. persGuid: localStorage.getItem("userid"),
  107. objType: this.objtype,
  108. pageNum: this.pageIndex_country,
  109. pageSize: this.pageSize_country,
  110. adName: this.model_country_name,
  111. adCode: this.currentAdCode
  112. }
  113. })
  114. .then((res) => {
  115. console.log(res)
  116. this.loading = false;
  117. if (res.success) {
  118. var obj = res.data;
  119. this.tableData_countrywaterList = obj.list;
  120. this.recordTotal_country = obj.total;
  121. }
  122. })
  123. },
  124. location2() {
  125. },
  126. indexMethod_country(index) {
  127. return (index + 1) + this.pageSize_country * (this.pageIndex_country - 1)
  128. },
  129. handleSizeChange_country: function (pageSize) {
  130. this.pageSize_country = pageSize;
  131. this.loadTableCountry();
  132. },
  133. handleCurrentChange_country: function (pageNum) {
  134. this.pageIndex_country = pageNum;
  135. this.loadTableCountry();
  136. },
  137. ryInfo(row,info){
  138. this.$emit('ryInfo',row,info)
  139. },
  140. formatRadio(val){
  141. if(val == '1'){
  142. return '是'
  143. }else if(val == '0'){
  144. return '否'
  145. }else{
  146. return val
  147. }
  148. }
  149. },
  150. watch:{
  151. currentAdCode(){
  152. this.loadTableCountry();
  153. }
  154. }
  155. }
  156. </script>
  157. <style scoped>
  158. </style>