e33ad0a5ed1cabd41dd604639291a76b8ee9583b.svn-base 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439
  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;margin-bottom: 5px;">
  6. <el-col :span="6">
  7. <el-tag size="small" style="width: 175px;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-col :span="12"> -->
  54. <el-table border :data="tableData" tooltip-effect="dark" style="width: 100%">
  55. <el-table-column align="center" show-overflow-tooltip prop="province" label="省" v-if="isXj" min-width="100"></el-table-column>
  56. <el-table-column align="center" show-overflow-tooltip prop="city" :label="ownAdName" min-width="100"></el-table-column>
  57. <el-table-column align="center" show-overflow-tooltip prop="county" label="县(区)" min-width="100"></el-table-column>
  58. <el-table-column align="center" show-overflow-tooltip prop="town" label="乡(镇)" min-width="100"></el-table-column>
  59. <el-table-column
  60. align="center"
  61. show-overflow-tooltip
  62. prop="adNm"
  63. label="行政村名(县*乡*镇*村)"
  64. min-width="160"
  65. ></el-table-column>
  66. <el-table-column align="center" show-overflow-tooltip prop="chkCom" label="检查单位" min-width="120"></el-table-column>
  67. <el-table-column align="center" show-overflow-tooltip prop="groupNm" label="所在组" min-width="100"></el-table-column>
  68. <el-table-column
  69. align="center"
  70. show-overflow-tooltip
  71. prop="isPoverty"
  72. label="是否贫困村"
  73. min-width="80"
  74. >
  75. <template slot-scope="scope">
  76. <span>{{formatRadio(scope.row.isPoverty)}}</span>
  77. </template>
  78. </el-table-column>
  79. <el-table-column
  80. align="center"
  81. show-overflow-tooltip
  82. prop="isFluexc"
  83. label="是否氟超标地区"
  84. min-width="110"
  85. >
  86. <template slot-scope="scope">
  87. <span>{{formatRadio(scope.row.isFluexc)}}</span>
  88. </template>
  89. </el-table-column>
  90. <el-table-column
  91. align="center"
  92. show-overflow-tooltip
  93. prop="isMtarea"
  94. label="是否山区"
  95. min-width="70"
  96. >
  97. <template slot-scope="scope">
  98. <span>{{formatRadio(scope.row.isMtarea)}}</span>
  99. </template>
  100. </el-table-column>
  101. <el-table-column
  102. align="center"
  103. show-overflow-tooltip
  104. prop="isCenwtSupply"
  105. label="是否集中供水村"
  106. min-width="110"
  107. >
  108. <template slot-scope="scope">
  109. <span>{{formatRadio(scope.row.isCenwtSupply)}}</span>
  110. </template>
  111. </el-table-column>
  112. <el-table-column
  113. align="center"
  114. show-overflow-tooltip
  115. prop="watersupplyPer"
  116. label="集中供水人口比例"
  117. min-width="120"
  118. >
  119. <template slot-scope="scope">
  120. <span>{{scope.row.watersupplyPer ? scope.row.watersupplyPer * 100 + '%' : ''}}</span>
  121. </template>
  122. </el-table-column>
  123. <el-table-column
  124. align="center"
  125. sortable
  126. show-overflow-tooltip
  127. prop="visitDate"
  128. label="暗访日期"
  129. min-width="100"
  130. ></el-table-column>
  131. <!-- <el-table-column
  132. align="center"
  133. show-overflow-tooltip
  134. label="操作"
  135. min-width="100"
  136. fixed="right"
  137. >
  138. <template slot-scope="scope">
  139. <el-button type="primary" plain @click="showQus(scope.row)">问题</el-button>
  140. </template>
  141. </el-table-column> -->
  142. </el-table>
  143. </el-row>
  144. </el-main>
  145. <el-footer id="dxdcFooter" style="height: 35px;">
  146. <el-pagination
  147. background
  148. @current-change="handleCurrentChange"
  149. @size-change="handleSizeChange"
  150. :pager-count="5"
  151. :current-page.sync="pageNum"
  152. :page-size="pageSize"
  153. :page-sizes="[10, 20, 30, 40, 50, 100]"
  154. layout="sizes, total, prev, pager, next, jumper"
  155. :total="totalt"
  156. ></el-pagination>
  157. </el-footer>
  158. </el-container>
  159. <yshQueDialogShow
  160. v-if="yshQueDialogShowItem"
  161. :currentObjectRgstrId="currentObjectRgstrId"
  162. :currentObjectId="currentObjectId"
  163. :villageCode="currentVillageCode"
  164. :currentObjectName="currentResName"
  165. :villType="1"
  166. :objType="2"
  167. @cancelHandler="cancelHandler"
  168. @addShuiKuSuccess="addShuiKuSuccess"
  169. ></yshQueDialogShow>
  170. </div>
  171. </template>
  172. <script>
  173. import request from "../../utils/gw_ajax_request.js";
  174. import echartsPie from "../../widgets/echartsPie.vue";
  175. export default {
  176. components: {
  177. echartsPie,
  178. yshQueDialogShow: resolve => {
  179. require(["./yshQueDialogShow.vue"], resolve);
  180. }
  181. },
  182. props: ["engIdh", "adCode", "adName",'currentNodeType','fengongxianCode','lyjg', "fenggongxianName", 'fengongxianChildren'],
  183. data() {
  184. return {
  185. groups:[],
  186. groupId:'',
  187. lyjg1:[],
  188. groupName:'',
  189. sttm:'',
  190. ettm:'',
  191. yshQueDialogShowItem: false,
  192. chartData1: {},
  193. chartData1All: {},
  194. isPKCount: "",
  195. isPKNotCount: "",
  196. searchObj: {
  197. pageNum: 1,
  198. pageSize: 10,
  199. adNm: "",
  200. adCode: this.adCode,
  201. persId: "",
  202. chkComId:'',
  203. chkCom:'',
  204. groupNm:'',
  205. groupId:'',
  206. startDate:'',
  207. endDate:'',
  208. },
  209. searchObjPK: {
  210. adNm: "",
  211. engId: "",
  212. isPoverty: "1"
  213. },
  214. searchObjNotPK: {
  215. engId: "",
  216. isPoverty: "0"
  217. },
  218. searchName: "",
  219. vitPeoDialogPanel: false,
  220. tableLoading: true,
  221. normalShow: true,
  222. adminShow: false,
  223. dxdcMainHeight: window.innerHeight - 327,
  224. pageNum: 1,
  225. pageSize: 10,
  226. totalt: 20,
  227. pageNumForVitPeo: 1,
  228. pageSizeForVitPeo: 10,
  229. showResultCountVitPeo: 20,
  230. tableData: [],
  231. tableData1: []
  232. };
  233. },
  234. mounted() {
  235. // this.lyjg1 = this.lyjg;
  236. this.searchObj.persId = this.userId;
  237. this.getAllGroup();
  238. // this.getVillageList();
  239. // this.getVillageListXianByNode();
  240. },
  241. watch: {
  242. lyjg(n,o){
  243. this.lyjg1 = this.lyjg;
  244. },
  245. groupName(n,o){
  246. if(n==''){
  247. this.groupId = '';
  248. }
  249. },
  250. fengongxianCode(newVal,oldVal){
  251. console.log(oldVal)
  252. console.log(newVal)
  253. if(newVal =='' || newVal ==null){
  254. this.tableData = []
  255. this.totalt = 0
  256. return
  257. }
  258. // if(newVal){
  259. // // if(this.currentNodeType == 'node'){
  260. // // this.tableLoading = true
  261. // // this.getVillageListXianByNode()
  262. // // }else{
  263. // // this.tableLoading = true
  264. // // this.getVillageListXian()
  265. // // }
  266. // this.tableLoading = true
  267. // this.getVillageListXianByNode()
  268. // }
  269. },
  270. fenggongxianName(){
  271. this.tableLoading = true
  272. this.getVillageListXianByNode()
  273. }
  274. },
  275. computed: {
  276. userId: function() {
  277. return localStorage.getItem("userid")
  278. ? localStorage.getItem("userid")
  279. : "1098101939614724096";
  280. },
  281. guId: function() {
  282. return localStorage.getItem("guid")
  283. ? localStorage.getItem("guid")
  284. : "1098101939614724096";
  285. },
  286. isAdmin() {
  287. return localStorage.getItem("isAdmin") == 1 ? true : false;
  288. }
  289. },
  290. methods: {
  291. //获取所有的组
  292. getAllGroup(){
  293. var _self = this;
  294. request.get('/dc/user/getGroupByPersid',{params:{'persid':this.userId,'ptype':'2'}}).then((res)=>{
  295. if(res.success){
  296. _self.groups = res.data;
  297. }
  298. })
  299. },
  300. querySearchAsync(queryString, cb) {
  301. var restaurants = this.groups;
  302. var results = queryString ? restaurants.filter(this.createStateFilter(queryString)) : restaurants;
  303. clearTimeout(this.timeout);
  304. this.timeout = setTimeout(() => {
  305. cb(results);
  306. }, 1500 * Math.random());
  307. },
  308. createStateFilter(queryString) {
  309. return (state) => {
  310. return (state.nm.toLowerCase().indexOf(queryString.toLowerCase()) != -1);
  311. };
  312. },
  313. handleSelect(item) {
  314. console.log(item);
  315. this.groupId = item.id;
  316. },
  317. onSubmit(){
  318. this.getVillageListXianByNode();
  319. },
  320. getVillageList() {
  321. request
  322. .post("/dc/insp/secsurveyVlg/getPageByCodeAndPerId", this.searchObj)
  323. .then(res => {
  324. if (res.success) {
  325. this.tableLoading = false;
  326. this.tableData = res.data.list;
  327. this.totalt = res.data.total;
  328. }
  329. });
  330. },
  331. getVillageListXian() {
  332. this.searchObj.engId = this.engIdh
  333. request
  334. .post("/dc/insp/secsurveyVlg/queryListByPage", this.searchObj)
  335. .then(res => {
  336. if (res.success) {
  337. this.tableLoading = false;
  338. this.tableData = res.data.list;
  339. this.totalt = res.data.total;
  340. }
  341. });
  342. },
  343. getVillageListXianByNode() {
  344. if(this.fengongxianChildren) {
  345. this.searchObj.nodeId = this.fengongxianCode
  346. this.searchObj.groupId = this.groupId
  347. delete this.searchObj.adNm;
  348. request
  349. .post("/dc/insp/secsurveyVlg/getPageByNodeId", this.searchObj)
  350. .then(res => {
  351. if (res.success) {
  352. this.tableLoading = false;
  353. this.tableData = res.data.list;
  354. this.totalt = res.data.total;
  355. }
  356. });
  357. }else{
  358. this.searchObj.nodeId = this.fengongxianCode
  359. this.searchObj.groupId = this.groupId
  360. this.searchObj.adNm = this.fenggongxianName
  361. request
  362. .post("/dc/insp/secsurveyVlg/getPageByNodeId", this.searchObj)
  363. .then(res => {
  364. if (res.success) {
  365. this.tableLoading = false;
  366. this.tableData = res.data.list;
  367. this.totalt = res.data.total;
  368. }
  369. });
  370. }
  371. },
  372. handleCurrentChange() {
  373. this.searchObj.pageNum = this.pageNum;
  374. this.getVillageListXianByNode();
  375. },
  376. handleSizeChange(val){
  377. this.searchObj.pageSize = val;
  378. this.getVillageListXianByNode();
  379. },
  380. pageIndexChangeVitPeo() {},
  381. visPeoDiaTableButton: function() {
  382. this.vitPeoDialogPanel = true;
  383. },
  384. formatRadio(val) {
  385. if (val == "1") {
  386. return "是";
  387. } else {
  388. return "否";
  389. }
  390. },
  391. showQus(rowId) {
  392. var _self = this;
  393. _self.currentObjectId = rowId.objId;
  394. _self.currentResName = rowId.villageNm;
  395. _self.currentVillageCode = rowId.villageCode;
  396. _self.currentObjectRgstrId = rowId.rgstrId;
  397. _self.yshQueDialogShowItem = true;
  398. },
  399. cancelHandler() {
  400. this.yshQueDialogShowItem = false;
  401. }
  402. }
  403. };
  404. </script>
  405. <style>
  406. #dcdxHeader {
  407. padding: 10px 20px;
  408. }
  409. #dxdcFooter {
  410. text-align: center;
  411. }
  412. #dxdcAside {
  413. border: 1px solid #d5d5ff;
  414. }
  415. .el-form-item__content {
  416. z-index: 1;
  417. }
  418. .canvasWrapper .echarts {
  419. /* margin: 0 auto; */
  420. /* width: 1200px; */
  421. /* height: 350px; */
  422. }
  423. .canvasWrapper {
  424. /* overflow-x: auto; */
  425. }
  426. </style>