| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155 |
- <template>
- <div>
- <el-row style="margin-bottom:5px;">
- <el-col :span="24">
- <div class="grid-content bg-purple-light">
- <div style="padding:5px;">
- <span style="font-size: 12px;margin-left: 10px;">名称:</span>
- <el-input style="width:130px;" class="kjr-input" size="mini"
- v-model="model_country_name" placeholder="请输入名称查询" @keydown.enter.native="searchByName" clearable>
- </el-input>
-
- <el-button @click="searchByName" size="mini" type="primary">筛选</el-button>
-
- </div>
- <div style="padding:5px;">
- <el-table :data="tableData_countrywaterList" height="510" border stripe
- style="width: 100%" v-loading="loading">
- <el-table-column type="index" min-width="50" label="序号" align="center"
- :index="indexMethod_country">
- </el-table-column>
- <el-table-column align="center" show-overflow-tooltip prop="adNm" label="行政村名(*县*乡镇*村)" min-width="160"></el-table-column>
- <el-table-column align="center" show-overflow-tooltip prop="isPoverty" label="是否贫困村" min-width="80">
- <template slot-scope="scope">
- <span>{{formatRadio(scope.row.isPoverty)}}</span>
- </template>
- </el-table-column>
- <el-table-column align="center" show-overflow-tooltip prop="isFluexc" label="是否氟超标地区" min-width="100">
- <template slot-scope="scope">
- <span>{{formatRadio(scope.row.isFluexc)}}</span>
- </template>
- </el-table-column>
- <el-table-column align="center" show-overflow-tooltip prop="isMtarea" label="是否山区" min-width="70">
- <template slot-scope="scope">
- <span>{{formatRadio(scope.row.isMtarea)}}</span>
- </template>
- </el-table-column>
- <el-table-column align="center" show-overflow-tooltip prop="isCenwtSupply" label="是否集中供水村" min-width="100">
- <template slot-scope="scope">
- <span>{{formatRadio(scope.row.isCenwtSupply)}}</span>
- </template>
- </el-table-column>
- <el-table-column align="center" show-overflow-tooltip prop="watersupplyPer" label="集中供水人口比例" min-width="110">
- <template slot-scope="scope">
- <span>{{scope.row.watersupplyPer ? scope.row.watersupplyPer * 100 + '%' : ''}}</span>
- </template>
- </el-table-column>
- <el-table-column align="center" sortable show-overflow-tooltip prop="visitDate" label="暗访日期" min-width="80"></el-table-column>
- <el-table-column fixed="right" label="操作" min-width="200" align="center">
- <template slot-scope="scope">
- <el-button type="text" size="small" @click="ryInfo(scope.row,'location')">定位</el-button>
- <el-button type="text" size="small" @click="ryInfo(scope.row,'baseInfo')">基础信息</el-button>
- <el-button type="text" size="small" @click="ryInfo(scope.row,'dcInfo')">督查信息</el-button>
- </template>
- </el-table-column>
- </el-table>
- <div class="block" style='margin-top:15px;'>
- <el-pagination background @size-change="handleSizeChange_country"
- @current-change="handleCurrentChange_country" :page-sizes="[10,50, 100, 200]"
- :page-size="15" layout="total,sizes, prev, pager, next"
- :total="recordTotal_country">
- </el-pagination>
- </div>
- </div>
- </div>
- </el-col>
- </el-row>
- </div>
- </template>
- <script>
- import request from '../../../utils/gw_ajax_request.js';
- export default {
- name: "peopleDrink",
- props:["currentAdCode"],
- data() {
- return {
- model_country_name:'',
- tableData_countrywaterList:[],
- pageSize_country: 10,
- pageIndex_country: 1,
- recordTotal_country: 0,
- loading: false,
- objtype: '2'
- }
- },
- mounted(){
- this.loadTableCountry();
- },
- methods:{
- searchByName(){
- this.loadTableCountry();
- },
- loadTableCountry() {
- this.loading = true;
- request.get(`/dc/insp/obj/getPageByPersId`, {
- params: {
- persGuid: localStorage.getItem("userid"),
- objType: this.objtype,
- pageNum: this.pageIndex_country,
- pageSize: this.pageSize_country,
- adName: this.model_country_name,
- adCode: this.currentAdCode
- }
- })
- .then((res) => {
- console.log(res)
- this.loading = false;
- if (res.success) {
- var obj = res.data;
- this.tableData_countrywaterList = obj.list;
- this.recordTotal_country = obj.total;
- }
- })
- },
- location2() {
- },
- indexMethod_country(index) {
- return (index + 1) + this.pageSize_country * (this.pageIndex_country - 1)
- },
- handleSizeChange_country: function (pageSize) {
- this.pageSize_country = pageSize;
- this.loadTableCountry();
- },
- handleCurrentChange_country: function (pageNum) {
- this.pageIndex_country = pageNum;
- this.loadTableCountry();
- },
- ryInfo(row,info){
- this.$emit('ryInfo',row,info)
- },
- formatRadio(val){
- if(val == '1'){
- return '是'
- }else if(val == '0'){
- return '否'
- }else{
- return val
- }
- }
- },
- watch:{
- currentAdCode(){
- this.loadTableCountry();
- }
- }
- }
- </script>
- <style scoped>
- </style>
|