3756b1d2cf0fb15cdc508541d1f4d9e2cb968537.svn-base 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239
  1. <template>
  2. <div>
  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 prop="waterSourceNm" label="水源地名称" min-width="90"
  22. show-overflow-tooltip
  23. align="center"
  24. ></el-table-column>
  25. <el-table-column prop="villageNm" label="所在地(*县*乡镇*村)" min-width="150"
  26. show-overflow-tooltip
  27. align="center"
  28. ></el-table-column>
  29. <el-table-column prop="cwsCode" label="供水工程名称" min-width="100"
  30. show-overflow-tooltip
  31. align="center"
  32. ></el-table-column>
  33. <el-table-column prop="planInsAmount" label="设计取水规模(m³/d)" min-width="160"
  34. show-overflow-tooltip
  35. align="center"
  36. ></el-table-column>
  37. <el-table-column prop="sourceType" label="水源类型" min-width="100"
  38. show-overflow-tooltip
  39. align="center"
  40. >
  41. <template slot-scope="scope">
  42. <span v-if="scope.row.sourceType">{{formatSourceType(scope.row.sourceType)}}</span>
  43. </template>
  44. </el-table-column>
  45. <el-table-column prop="waterQuality" label="水源水质评价" min-width="100"
  46. show-overflow-tooltip
  47. align="center"
  48. >
  49. <template slot-scope="scope">
  50. <span v-if="scope.row.waterQuality">{{formatWaterQuality(scope.row.waterQuality)}}</span>
  51. </template>
  52. </el-table-column>
  53. <el-table-column prop="isProtectArea" label="是否划定水源保护区或保护范围" min-width="125"
  54. show-overflow-tooltip
  55. align="center"
  56. >
  57. <template slot-scope="scope">
  58. <span v-if="scope.row.isProtectArea">{{formatBoo(scope.row.isProtectArea)}}</span>
  59. </template>
  60. </el-table-column>
  61. <el-table-column prop="isProtectMark" label="是否有水源保护标志" min-width="100"
  62. show-overflow-tooltip
  63. align="center"
  64. >
  65. <template slot-scope="scope">
  66. <span v-if="scope.row.isProtectMark">{{formatBoo(scope.row.isProtectMark)}}</span>
  67. </template>
  68. </el-table-column>
  69. <el-table-column prop="isPollSource" label="周边是否有污染源" min-width="100"
  70. show-overflow-tooltip
  71. align="center"
  72. >
  73. <template slot-scope="scope">
  74. <span v-if="scope.row.isPollSource">{{formatBoo(scope.row.isPollSource)}}</span>
  75. </template>
  76. </el-table-column>
  77. <el-table-column prop="isSpare" label="是否有应急备用水源" min-width="100"
  78. show-overflow-tooltip
  79. align="center"
  80. >
  81. <template slot-scope="scope">
  82. <span v-if="scope.row.isSpare">{{formatBoo(scope.row.isSpare)}}</span>
  83. </template>
  84. </el-table-column>
  85. <el-table-column sortable prop="visitDate" label="暗访日期" min-width="100"
  86. show-overflow-tooltip></el-table-column>
  87. <el-table-column fixed="right" label="操作" min-width="200" align="center">
  88. <template slot-scope="scope">
  89. <el-button type="text" size="small" @click="ryInfo(scope.row,'location')">定位</el-button>
  90. <!-- <el-button type="text" size="small" @click="ryInfo(scope.row,'baseInfo')">基础信息</el-button> -->
  91. <el-button type="text" size="small" @click="ryInfo(scope.row,'dcInfo')">督查信息</el-button>
  92. </template>
  93. </el-table-column>
  94. </el-table>
  95. <div class="block" style='text-align: center;'>
  96. <el-pagination background @size-change="handleSizeChange_country"
  97. @current-change="handleCurrentChange_country" :page-sizes="[10,50, 100, 200]"
  98. :page-size="15" layout="total,sizes, prev, pager, next"
  99. :total="recordTotal_country">
  100. </el-pagination>
  101. </div>
  102. </div>
  103. </div>
  104. </el-col>
  105. </el-row>
  106. </div>
  107. </template>
  108. <script>
  109. import request from '../../../utils/gw_ajax_request.js';
  110. import {exportModel} from "@util/gw_exportModel";
  111. export default {
  112. name: "peopleDrink",
  113. props:["currentAdCode"],
  114. data() {
  115. return {
  116. model_country_name:'',
  117. tableData_countrywaterList:[],
  118. pageSize_country: 10,
  119. pageIndex_country: 1,
  120. recordTotal_country: 0,
  121. loading: false,
  122. objtype:'22'
  123. }
  124. },
  125. mounted(){
  126. this.loadTableCountry();
  127. },
  128. methods:{
  129. searchByName(){
  130. this.loadTableCountry();
  131. },
  132. async exPort(){
  133. this.exportLoading = true;
  134. let url = `/pdcApi/dc/insp/obj/getObjByPersId?persGuid=${localStorage.getItem("userid")}&objType=${this.objtype}&adName=${this.model_country_name}&adCode=${this.currentAdCode}&isExport=1`;
  135. let downloadName = "人饮水源地.xls";
  136. let type = "get";
  137. let result = await exportModel(type,url,downloadName);
  138. this.exportLoading = result;
  139. },
  140. loadTableCountry() {
  141. this.loading = true;
  142. request.get(`/dc/insp/obj/getPageByPersId`, {
  143. params: {
  144. persGuid: localStorage.getItem("userid"),
  145. objType: this.objtype,
  146. pageNum: this.pageIndex_country,
  147. pageSize: this.pageSize_country,
  148. adName: this.model_country_name,
  149. adCode: this.currentAdCode,
  150. }
  151. })
  152. .then((res) => {
  153. this.loading = false;
  154. if (res.success) {
  155. var obj = res.data;
  156. this.tableData_countrywaterList = obj.list;
  157. this.recordTotal_country = obj.total;
  158. }
  159. })
  160. },
  161. location2() {
  162. },
  163. indexMethod_country(index) {
  164. return (index + 1) + this.pageSize_country * (this.pageIndex_country - 1)
  165. },
  166. formatter_country_xzqh(row, column) {
  167. switch (row.adGrad) {
  168. case "1":
  169. return "中国"
  170. break;
  171. case "2":
  172. return "省级"
  173. break;
  174. case "3":
  175. return "市级"
  176. break;
  177. case "4":
  178. return "县级"
  179. break;
  180. case "5":
  181. return "乡级"
  182. break;
  183. case "6":
  184. return "乡级"
  185. break;
  186. default:
  187. return "--"
  188. break;
  189. }
  190. },
  191. handleSizeChange_country: function (pageSize) {
  192. this.pageSize_country = pageSize;
  193. this.loadTableCountry();
  194. },
  195. handleCurrentChange_country: function (pageNum) {
  196. this.pageIndex_country = pageNum;
  197. this.loadTableCountry();
  198. },
  199. ryInfo(row,info){
  200. this.$emit('ryInfo',row,info)
  201. },
  202. formatSourceType(value){
  203. switch (value) {
  204. case 'A': value = 'A-地表水';break;
  205. case 'B': value = 'B-地下水';break;
  206. case 'C': value = 'C-混合';break;
  207. }
  208. return value;
  209. },
  210. formatWaterQuality(value){
  211. switch (value) {
  212. case 'A': value = 'A-Ⅰ至Ⅲ类';break;
  213. case 'B': value = 'B-Ⅳ类及以下';break;
  214. }
  215. return value;
  216. },
  217. formatBoo(value) {
  218. return value == '1' ? '是' : '否';
  219. },
  220. },
  221. watch:{
  222. currentAdCode(){
  223. this.loadTableCountry();
  224. }
  225. }
  226. }
  227. </script>
  228. <style scoped>
  229. </style>