f2880bd2eed74224dfb0cea85c31241615a40752.svn-base 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595
  1. <template>
  2. <div v-loading="tableLoading">
  3. <el-container>
  4. <el-header id="dcdxHeader" style="height:120px;padding:10px 0px;">
  5. <el-row :gutter="10" style="margin-top: 5px;">
  6. <el-col :span="6">
  7. <el-tag size="small" style="width: 220px;text-align: center;">
  8. <i class="el-icon-info"></i>
  9. <span style="margin-left: 5px">{{this.adName + " " + '暗访用水户个数总计:'}}</span>
  10. <span style="font-weight: 700;margin-left: 5px">{{this.totalt}}</span>
  11. </el-tag>
  12. </el-col>
  13. <el-col :span="18" style="text-align:right;"></el-col>
  14. </el-row>
  15. <el-row>
  16. <el-col :span="24">
  17. <el-form :inline="true" size="mini" class="demo-form-inline" style="padding-left: 10px;">
  18. <el-form-item label="行政区名称">
  19. <el-input v-model="searchObj.adNm" clearable placeholder="行政区名称"></el-input>
  20. </el-form-item>
  21. <el-form-item label="检查单位">
  22. <el-select v-model="searchObj.chkComId" clearable placeholder="检查单位">
  23. <el-option v-for="item in lyjg1" :key="item.id" :label="item.nm" :value="item.id"></el-option>
  24. </el-select>
  25. </el-form-item>
  26. </el-form>
  27. </el-col>
  28. <el-col :span="24">
  29. <el-form :inline="true" size="mini" class="demo-form-inline" style="padding-left: 10px;">
  30. <el-form-item label="所在组">
  31. <el-autocomplete v-model="groupName" clearable value-key='nm' :fetch-suggestions="querySearchAsync" placeholder="请输入内容"
  32. @select="handleSelect"></el-autocomplete>
  33. </el-form-item>
  34. <el-form-item label="督查时间">
  35. <div style="display: flex;">
  36. <el-date-picker v-model="searchObj.startDate" type="date" value-format="yyyy-MM-dd" placeholder="选择日期"></el-date-picker>
  37. <p style="padding-left: 10px;padding-right: 10px;">至</p>
  38. <el-date-picker v-model="searchObj.endDate" type="date" value-format="yyyy-MM-dd" placeholder="选择日期"></el-date-picker>
  39. </div>
  40. </el-form-item>
  41. <el-form-item>
  42. <el-button type="primary" @click="onSubmit">查询</el-button>
  43. </el-form-item>
  44. </el-form>
  45. </el-col>
  46. </el-row>
  47. </el-header>
  48. <el-main
  49. style="overflow-x: hidden;padding:5px 0px;margin-bottom: 0px;"
  50. :style="{'height':dxdcMainHeight+'px'}"
  51. >
  52. <el-row style="margin-bottom: 0px;">
  53. <el-table border :data="tableData" tooltip-effect="dark" style="width: 100%">
  54. <el-table-column align="center" show-overflow-tooltip prop="province" label="省" v-if="isXj" min-width="100"></el-table-column>
  55. <el-table-column align="center" show-overflow-tooltip prop="city" :label="ownAdName" min-width="100"></el-table-column>
  56. <el-table-column align="center" show-overflow-tooltip prop="county" label="县(区)" min-width="100"></el-table-column>
  57. <el-table-column align="center" show-overflow-tooltip prop="town" label="乡(镇)" min-width="100"></el-table-column>
  58. <el-table-column
  59. prop="villageNm"
  60. label="调查地点(*县*乡镇*村)"
  61. min-width="170"
  62. show-overflow-tooltip
  63. align="center"
  64. ></el-table-column>
  65. <el-table-column align="center" show-overflow-tooltip prop="chkCom" label="检查单位" min-width="120"></el-table-column>
  66. <el-table-column align="center" show-overflow-tooltip prop="groupNm" label="所在组" min-width="100"></el-table-column>
  67. <el-table-column
  68. prop="visitDate"
  69. sortable
  70. label="暗访日期"
  71. min-width="100"
  72. show-overflow-tooltip
  73. align="center"
  74. ></el-table-column>
  75. <el-table-column
  76. prop="userNm"
  77. label="户主姓名"
  78. min-width="100"
  79. show-overflow-tooltip
  80. align="center"
  81. ></el-table-column>
  82. <el-table-column
  83. prop="telphone"
  84. label="电话"
  85. min-width="100"
  86. show-overflow-tooltip
  87. align="center"
  88. ></el-table-column>
  89. <!--<el-table-column prop="cwsCode" label="对应工程代码" min-width="110" show-overflow-tooltip-->
  90. <!--align="center"></el-table-column>-->
  91. <!--<el-table-column prop="cwsCode" label="对应工程代码" min-width="110" show-overflow-tooltip-->
  92. <!--align="center"></el-table-column>-->
  93. <el-table-column
  94. prop="cwsCode"
  95. label="对应工程名称"
  96. min-width="110"
  97. show-overflow-tooltip
  98. align="center"
  99. ></el-table-column>
  100. <!--水质-->
  101. <el-table-column label="水质" min-width="80" show-overflow-tooltip align="center">
  102. <el-table-column
  103. prop="isQualityGood"
  104. label="水质是否良好"
  105. min-width="100"
  106. show-overflow-tooltip
  107. align="center"
  108. >
  109. <template slot-scope="scope">
  110. <span>{{formatBoo(scope.row.isQualityGood)}}</span>
  111. </template>
  112. </el-table-column>
  113. <el-table-column
  114. prop="isQualityProblem"
  115. label="是否存在问题"
  116. min-width="140"
  117. show-overflow-tooltip
  118. align="center"
  119. >
  120. <template slot-scope="scope">
  121. <span>{{formatBoo(scope.row.isQualityProblem)}}</span>
  122. </template>
  123. </el-table-column>
  124. </el-table-column>
  125. <!--水量-->
  126. <el-table-column label="水量" min-width="100" show-overflow-tooltip align="center">
  127. <el-table-column
  128. prop="isSplyHome"
  129. label="是否供水入户"
  130. min-width="100"
  131. show-overflow-tooltip
  132. align="center"
  133. >
  134. <template slot-scope="scope">
  135. <span>{{formatBoo(scope.row.isSplyHome)}}</span>
  136. </template>
  137. </el-table-column>
  138. <el-table-column
  139. prop="is24hSupply"
  140. label="是否24小时供水"
  141. min-width="130"
  142. show-overflow-tooltip
  143. align="center"
  144. >
  145. <template slot-scope="scope">
  146. <span>{{formatBoo(scope.row.is24hSupply)}}</span>
  147. </template>
  148. </el-table-column>
  149. <el-table-column
  150. prop="isWaterProblem"
  151. label="是否存在问题"
  152. min-width="100"
  153. show-overflow-tooltip
  154. align="center"
  155. >
  156. <template slot-scope="scope">
  157. <span>{{formatBoo(scope.row.isWaterProblem)}}</span>
  158. </template>
  159. </el-table-column>
  160. </el-table-column>
  161. <!--水价收费-->
  162. <el-table-column label="水价收费" min-width="100" show-overflow-tooltip align="center">
  163. <el-table-column
  164. prop="isCalFee"
  165. label="是否计量收费"
  166. min-width="100"
  167. show-overflow-tooltip
  168. align="center"
  169. >
  170. <template slot-scope="scope">
  171. <span>{{formatBoo(scope.row.isCalFee)}}</span>
  172. </template>
  173. </el-table-column>
  174. <el-table-column
  175. prop="isFeeProblem"
  176. label="是否存在问题"
  177. min-width="100"
  178. show-overflow-tooltip
  179. align="center"
  180. >
  181. <template slot-scope="scope">
  182. <span>{{formatBoo(scope.row.isFeeProblem)}}</span>
  183. </template>
  184. </el-table-column>
  185. </el-table-column>
  186. <!--供水服务-->
  187. <el-table-column label="供水服务" min-width="150" show-overflow-tooltip align="center">
  188. <el-table-column
  189. prop="isSplyProblem"
  190. label="是否存在问题"
  191. min-width="150"
  192. show-overflow-tooltip
  193. align="center"
  194. >
  195. <template slot-scope="scope">
  196. <span>{{formatBoo(scope.row.isSplyProblem)}}</span>
  197. </template>
  198. </el-table-column>
  199. </el-table-column>
  200. <el-table-column
  201. prop="evaluate"
  202. label="总体评价"
  203. min-width="100"
  204. show-overflow-tooltip
  205. align="center"
  206. >
  207. <template slot-scope="scope">
  208. <span>{{formatEvaluate(scope.row.evaluate)}}</span>
  209. </template>
  210. </el-table-column>
  211. <!--<el-table-column prop="prsnWaterId" label="用水户ID" min-width="100" show-overflow-tooltip-->
  212. <!--align="center"></el-table-column>-->
  213. <!--<el-table-column prop="engId" label="农村饮水工程登记表ID" min-width="100" show-overflow-tooltip-->
  214. <!--align="center"></el-table-column>-->
  215. <!-- <el-table-column
  216. align="center"
  217. show-overflow-tooltip
  218. label="操作"
  219. min-width="100"
  220. fixed="right"
  221. >
  222. <template slot-scope="scope">
  223. <el-button type="primary" plain @click="showQus(scope.row)">问题</el-button>
  224. </template>
  225. </el-table-column> -->
  226. </el-table>
  227. </el-row>
  228. </el-main>
  229. <el-footer id="dxdcFooter" style="height: 35px;">
  230. <el-pagination
  231. background
  232. @current-change="handleCurrentChange"
  233. @size-change="handleSizeChange"
  234. :pager-count="5"
  235. :current-page.sync="pageNum"
  236. :page-size="pageSize"
  237. :page-sizes="[10, 20, 30, 40, 50, 100]"
  238. layout="sizes, total,prev, pager, next,jumper"
  239. :total="totalt"
  240. ></el-pagination>
  241. </el-footer>
  242. </el-container>
  243. <yshQueDialogShow
  244. v-if="yshQueDialogShowItem"
  245. :currentObjectRgstrId="currentObjectRgstrId"
  246. :currentObjectId="currentObjectId"
  247. :villageCode="currentVillageCode"
  248. :currentObjectName="currentResName"
  249. :villType="1"
  250. :objType="2"
  251. @cancelHandler="cancelHandler"
  252. @addShuiKuSuccess="addShuiKuSuccess"
  253. ></yshQueDialogShow>
  254. </div>
  255. </template>
  256. <script>
  257. import request from "../../utils/gw_ajax_request.js";
  258. // import echartsPie from "../../widgets/echartsPie.vue";
  259. export default {
  260. components: {
  261. yshQueDialogShow: resolve => {
  262. require(["./yshQueDialogShow.vue"], resolve);
  263. }
  264. },
  265. props: ["engIdh", "adCode", "adName",'currentNodeType','fengongxianCode','lyjg', "fenggongxianName", 'fengongxianChildren'],
  266. data() {
  267. return {
  268. groups:[],
  269. groupId:'',
  270. lyjg1:[],
  271. groupName:'',
  272. sttm:'',
  273. ettm:'',
  274. chartData1: {},
  275. yshQueDialogShowItem: false,
  276. chartData1All: {},
  277. isPKCount: "",
  278. isPKNotCount: "",
  279. searchObj: {
  280. pageNum: 1,
  281. pageSize: 10,
  282. adNm: "",
  283. adCode: "",
  284. persId: "",
  285. chkComId:'',
  286. chkCom:'',
  287. groupNm:'',
  288. groupId:'',
  289. startDate:'',
  290. endDate:'',
  291. },
  292. searchObjPK: {
  293. adNm: "",
  294. engId: "",
  295. isQualityGood: "1"
  296. },
  297. searchObjNotPK: {
  298. engId: "",
  299. isQualityGood: "0"
  300. },
  301. searchName: "",
  302. vitPeoDialogPanel: false,
  303. tableLoading: true,
  304. normalShow: true,
  305. adminShow: false,
  306. dxdcMainHeight: window.innerHeight - 327,
  307. pageNum: 1,
  308. pageSize: 10,
  309. totalt: 20,
  310. pageNumForVitPeo: 1,
  311. pageSizeForVitPeo: 10,
  312. showResultCountVitPeo: 20,
  313. currentObjectId: '',
  314. currentResName: '',
  315. currentObjectRgstrId: '',
  316. currentVillageCode: '',
  317. tableData: [],
  318. tableData1: [],
  319. visPeoTableData: [
  320. {
  321. peoName: "俞瑾",
  322. sex: "女",
  323. duty: "工程师",
  324. workNum: "HRCDC-02",
  325. phone: "18712469977"
  326. },
  327. {
  328. peoName: "俞瑾",
  329. sex: "女",
  330. duty: "工程师",
  331. workNum: "HRCDC-02",
  332. phone: "18712469977"
  333. },
  334. {
  335. peoName: "俞瑾",
  336. sex: "女",
  337. duty: "工程师",
  338. workNum: "HRCDC-02",
  339. phone: "18712469977"
  340. },
  341. {
  342. peoName: "俞瑾",
  343. sex: "女",
  344. duty: "工程师",
  345. workNum: "HRCDC-02",
  346. phone: "18712469977"
  347. }
  348. ]
  349. };
  350. },
  351. mounted() {
  352. this.searchObj.persId = this.userId;
  353. this.getAllGroup();
  354. // this.getVillageList();
  355. // this.getVillageListXianByNode();
  356. },
  357. watch: {
  358. lyjg(n,o){
  359. this.lyjg1 = this.lyjg;
  360. },
  361. groupName(n,o){
  362. if(n==''){
  363. this.groupId = '';
  364. }
  365. },
  366. fengongxianCode(newVal,oldVal){
  367. console.log(oldVal)
  368. console.log(newVal)
  369. if(newVal =='' || newVal ==null){
  370. this.tableData = []
  371. this.totalt = 0
  372. return
  373. }
  374. // if(newVal){
  375. // // if(this.currentNodeType == 'node'){
  376. // // this.tableLoading = true
  377. // // this.getVillageListXianByNode()
  378. // // }else{
  379. // // this.tableLoading = true
  380. // // this.getVillageListXian()
  381. // // }
  382. // this.tableLoading = true
  383. // this.getVillageListXianByNode()
  384. // }
  385. },
  386. fenggongxianName(){
  387. this.tableLoading = true
  388. this.getVillageListXianByNode()
  389. }
  390. // adCode: function(n, o) {
  391. // if (n == "0") {
  392. // this.searchObj.adCode = "";
  393. // this.searchObj.engId = "";
  394. // this.tableLoading = true;
  395. // this.getVillageList();
  396. // } else if (n.length == 2) {
  397. // this.searchObj.adCode = n;
  398. // this.searchObj.engId = "";
  399. // this.tableLoading = true;
  400. // this.getVillageList();
  401. // } else {
  402. // this.searchObj.adCode = "";
  403. // this.searchObj.engId = this.engIdh;
  404. // this.tableLoading = true;
  405. // this.getVillageListXian();
  406. // }
  407. // }
  408. },
  409. computed: {
  410. userId: function() {
  411. return localStorage.getItem("userid")
  412. ? localStorage.getItem("userid")
  413. : "1098101939614724096";
  414. },
  415. isAdmin() {
  416. return localStorage.getItem("isAdmin") == 1 ? true : false;
  417. }
  418. },
  419. methods: {
  420. //获取所有的组
  421. getAllGroup(){
  422. var _self = this;
  423. request.get('/dc/user/getGroupByPersid',{params:{'persid':this.userId,'ptype':'2'}}).then((res)=>{
  424. if(res.success){
  425. _self.groups = res.data;
  426. }
  427. })
  428. },
  429. querySearchAsync(queryString, cb) {
  430. var restaurants = this.groups;
  431. var results = queryString ? restaurants.filter(this.createStateFilter(queryString)) : restaurants;
  432. clearTimeout(this.timeout);
  433. this.timeout = setTimeout(() => {
  434. cb(results);
  435. }, 1500 * Math.random());
  436. },
  437. createStateFilter(queryString) {
  438. return (state) => {
  439. return (state.nm.toLowerCase().indexOf(queryString.toLowerCase()) != -1);
  440. };
  441. },
  442. handleSelect(item) {
  443. console.log(item);
  444. this.groupId = item.id;
  445. },
  446. onSubmit(){
  447. this.getVillageListXianByNode();
  448. },
  449. getVillageList() {
  450. request
  451. .post("/dc/insp/wateruserInfo/getPageByCodeAndPerId", this.searchObj)
  452. .then(res => {
  453. if (res.success) {
  454. this.tableLoading = false;
  455. this.tableData = res.data.list;
  456. this.totalt = res.data.total;
  457. }
  458. });
  459. },
  460. getVillageListXian() {
  461. this.searchObj.engId = this.engIdh
  462. request
  463. .post("/dc/insp/wateruserInfo/queryListByPage", this.searchObj)
  464. .then(res => {
  465. if (res.success) {
  466. this.tableLoading = false;
  467. this.tableData = res.data.list;
  468. this.totalt = res.data.total;
  469. }
  470. });
  471. },
  472. getVillageListXianByNode() {
  473. if(this.fengongxianChildren) {
  474. this.searchObj.nodeId = this.fengongxianCode
  475. this.searchObj.groupId = this.groupId
  476. delete this.searchObj.adNm;
  477. request
  478. .post("/dc/insp/wateruserInfo/getPageByNodeId", this.searchObj)
  479. .then(res => {
  480. if (res.success) {
  481. this.tableLoading = false;
  482. this.tableData = res.data.list;
  483. this.totalt = res.data.total;
  484. }
  485. });
  486. }else{
  487. this.searchObj.adNm = this.fenggongxianName
  488. this.searchObj.nodeId = this.fengongxianCode
  489. this.searchObj.groupId = this.groupId
  490. request
  491. .post("/dc/insp/wateruserInfo/getPageByNodeId", this.searchObj)
  492. .then(res => {
  493. if (res.success) {
  494. this.tableLoading = false;
  495. this.tableData = res.data.list;
  496. this.totalt = res.data.total;
  497. }
  498. });
  499. }
  500. },
  501. // getChartDataPK() {
  502. // this.chartData1 = {};
  503. // var _self = this;
  504. // },
  505. showQus(rowId) {
  506. var _self = this;
  507. _self.currentObjectId = rowId.objId;
  508. _self.currentResName = rowId.villageNm;
  509. _self.currentVillageCode = rowId.villageCode;
  510. _self.currentObjectRgstrId = rowId.rgstrId;
  511. _self.yshQueDialogShowItem = true;
  512. },
  513. cancelHandler() {
  514. this.yshQueDialogShowItem = false;
  515. },
  516. handleCurrentChange() {
  517. this.searchObj.pageNum = this.pageNum;
  518. // this.getVillageList();
  519. this.getVillageListXianByNode()
  520. },
  521. handleSizeChange(val){
  522. this.searchObj.pageSize = val;
  523. // this.getVillageList();
  524. this.getVillageListXianByNode()
  525. },
  526. pageIndexChangeVitPeo() {},
  527. visPeoDiaTableButton: function() {
  528. this.vitPeoDialogPanel = true;
  529. },
  530. formatBoo(val) {
  531. if(val == '1'){
  532. return '是'
  533. }else if(val == '0'){
  534. return '否'
  535. }else{
  536. return val
  537. }
  538. },
  539. formatEvaluate(value) {
  540. switch (value) {
  541. case "A":
  542. value = "A-能饮用";
  543. break;
  544. case "B":
  545. value = "B-能基本饮用";
  546. break;
  547. case "C":
  548. value = "C-不能饮用";
  549. break;
  550. }
  551. return value;
  552. }
  553. }
  554. };
  555. </script>
  556. <style>
  557. #dcdxHeader {
  558. padding: 10px 20px;
  559. }
  560. #dxdcFooter {
  561. text-align: center;
  562. }
  563. #dxdcAside {
  564. border: 1px solid #d5d5ff;
  565. }
  566. .el-form-item__content {
  567. z-index: 1;
  568. }
  569. .canvasWrapper .echarts {
  570. /* margin: 0 auto; */
  571. /* width: 1200px; */
  572. /* height: 350px; */
  573. }
  574. .canvasWrapper {
  575. /* overflow-x: auto; */
  576. }
  577. </style>