8f6ad1accba7e05ef5c2d71f71f6f354f5c2cd64.svn-base 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. <template>
  2. <div>
  3. <el-row style="margin-bottom:5px;">
  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. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  14. </div>
  15. <div style="padding:5px;">
  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='margin-top:15px;'>
  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. export default {
  72. name: "peopleDrink",
  73. props:["currentAdCode"],
  74. data() {
  75. return {
  76. model_country_name:'',
  77. tableData_countrywaterList:[],
  78. pageSize_country: 10,
  79. pageIndex_country: 1,
  80. recordTotal_country: 0,
  81. loading: false,
  82. objtype: '2'
  83. }
  84. },
  85. mounted(){
  86. this.loadTableCountry();
  87. },
  88. methods:{
  89. searchByName(){
  90. this.loadTableCountry();
  91. },
  92. loadTableCountry() {
  93. this.loading = true;
  94. request.get(`/dc/insp/obj/getPageByPersId`, {
  95. params: {
  96. persGuid: localStorage.getItem("userid"),
  97. objType: this.objtype,
  98. pageNum: this.pageIndex_country,
  99. pageSize: this.pageSize_country,
  100. adName: this.model_country_name,
  101. adCode: this.currentAdCode
  102. }
  103. })
  104. .then((res) => {
  105. console.log(res)
  106. this.loading = false;
  107. if (res.success) {
  108. var obj = res.data;
  109. this.tableData_countrywaterList = obj.list;
  110. this.recordTotal_country = obj.total;
  111. }
  112. })
  113. },
  114. location2() {
  115. },
  116. indexMethod_country(index) {
  117. return (index + 1) + this.pageSize_country * (this.pageIndex_country - 1)
  118. },
  119. handleSizeChange_country: function (pageSize) {
  120. this.pageSize_country = pageSize;
  121. this.loadTableCountry();
  122. },
  123. handleCurrentChange_country: function (pageNum) {
  124. this.pageIndex_country = pageNum;
  125. this.loadTableCountry();
  126. },
  127. ryInfo(row,info){
  128. this.$emit('ryInfo',row,info)
  129. },
  130. formatRadio(val){
  131. if(val == '1'){
  132. return '是'
  133. }else if(val == '0'){
  134. return '否'
  135. }else{
  136. return val
  137. }
  138. }
  139. },
  140. watch:{
  141. currentAdCode(){
  142. this.loadTableCountry();
  143. }
  144. }
  145. }
  146. </script>
  147. <style scoped>
  148. </style>