| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239 |
- <template>
- <div>
- <el-row>
- <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>
- <el-button @click="exPort" size="mini" type="success">导出</el-button>
- </div>
- <div style="padding:0px;">
- <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 prop="waterSourceNm" label="水源地名称" min-width="90"
- show-overflow-tooltip
- align="center"
- ></el-table-column>
- <el-table-column prop="villageNm" label="所在地(*县*乡镇*村)" min-width="150"
- show-overflow-tooltip
- align="center"
- ></el-table-column>
- <el-table-column prop="cwsCode" label="供水工程名称" min-width="100"
- show-overflow-tooltip
- align="center"
- ></el-table-column>
- <el-table-column prop="planInsAmount" label="设计取水规模(m³/d)" min-width="160"
- show-overflow-tooltip
- align="center"
- ></el-table-column>
- <el-table-column prop="sourceType" label="水源类型" min-width="100"
- show-overflow-tooltip
- align="center"
- >
- <template slot-scope="scope">
- <span v-if="scope.row.sourceType">{{formatSourceType(scope.row.sourceType)}}</span>
- </template>
- </el-table-column>
- <el-table-column prop="waterQuality" label="水源水质评价" min-width="100"
- show-overflow-tooltip
- align="center"
- >
- <template slot-scope="scope">
- <span v-if="scope.row.waterQuality">{{formatWaterQuality(scope.row.waterQuality)}}</span>
- </template>
- </el-table-column>
- <el-table-column prop="isProtectArea" label="是否划定水源保护区或保护范围" min-width="125"
- show-overflow-tooltip
- align="center"
- >
- <template slot-scope="scope">
- <span v-if="scope.row.isProtectArea">{{formatBoo(scope.row.isProtectArea)}}</span>
- </template>
- </el-table-column>
- <el-table-column prop="isProtectMark" label="是否有水源保护标志" min-width="100"
- show-overflow-tooltip
- align="center"
- >
- <template slot-scope="scope">
- <span v-if="scope.row.isProtectMark">{{formatBoo(scope.row.isProtectMark)}}</span>
- </template>
- </el-table-column>
- <el-table-column prop="isPollSource" label="周边是否有污染源" min-width="100"
- show-overflow-tooltip
- align="center"
- >
- <template slot-scope="scope">
- <span v-if="scope.row.isPollSource">{{formatBoo(scope.row.isPollSource)}}</span>
- </template>
- </el-table-column>
- <el-table-column prop="isSpare" label="是否有应急备用水源" min-width="100"
- show-overflow-tooltip
- align="center"
- >
- <template slot-scope="scope">
- <span v-if="scope.row.isSpare">{{formatBoo(scope.row.isSpare)}}</span>
- </template>
- </el-table-column>
- <el-table-column sortable prop="visitDate" label="暗访日期" min-width="100"
- show-overflow-tooltip></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='text-align: center;'>
- <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';
- import {exportModel} from "@util/gw_exportModel";
- 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:'22'
- }
- },
- mounted(){
- this.loadTableCountry();
- },
- methods:{
- searchByName(){
- this.loadTableCountry();
- },
- async exPort(){
- this.exportLoading = true;
- let url = `/pdcApi/dc/insp/obj/getObjByPersId?persGuid=${localStorage.getItem("userid")}&objType=${this.objtype}&adName=${this.model_country_name}&adCode=${this.currentAdCode}&isExport=1`;
- let downloadName = "人饮水源地.xls";
- let type = "get";
- let result = await exportModel(type,url,downloadName);
- this.exportLoading = result;
- },
- 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) => {
- 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)
- },
- formatter_country_xzqh(row, column) {
- switch (row.adGrad) {
- case "1":
- return "中国"
- break;
- case "2":
- return "省级"
- break;
- case "3":
- return "市级"
- break;
- case "4":
- return "县级"
- break;
- case "5":
- return "乡级"
- break;
- case "6":
- return "乡级"
- break;
- default:
- return "--"
- break;
- }
- },
- 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)
- },
- formatSourceType(value){
- switch (value) {
- case 'A': value = 'A-地表水';break;
- case 'B': value = 'B-地下水';break;
- case 'C': value = 'C-混合';break;
- }
- return value;
- },
- formatWaterQuality(value){
- switch (value) {
- case 'A': value = 'A-Ⅰ至Ⅲ类';break;
- case 'B': value = 'B-Ⅳ类及以下';break;
- }
- return value;
- },
- formatBoo(value) {
- return value == '1' ? '是' : '否';
- },
- },
- watch:{
- currentAdCode(){
- this.loadTableCountry();
- }
- }
- }
- </script>
- <style scoped>
- </style>
|