d4d2f09fc8f4a6f70f56370a321b0b6bcf30b7d3.svn-base 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493
  1. <template>
  2. <div style="height:100%;">
  3. <el-container>
  4. <el-aside width="240px" style="border:1px solid #d5d5ff" v-loading="loadingType">
  5. <p style="font-weight:bolder;background-color:#d5d5ff;padding:3px;">
  6. <i class="el-icon-share"></i>督查对象
  7. </p>
  8. <provTreeList
  9. rootCode
  10. :style="{'max-height':dxdcAsideHeight+'px','height':dxdcAsideHeight+'px'}"
  11. @provTreeSelectChange1="provTreeSelectChangeHandler"
  12. @LoadingCompleted="LoadingCompletedType"
  13. @emitCurrentNodeId="emitCurrentNodeId"
  14. @emitLyjgList="emitLyjgList"
  15. ></provTreeList>
  16. </el-aside>
  17. <el-main>
  18. <el-tabs id="ncysDcdxTabs" type="card" v-model="activeName" @tab-click="handleClick">
  19. <el-tab-pane label="暗访调研行政村统计" name="villAndPeo">
  20. <villAndPeo :engIdh="xianEngId" :currentNodeType=currentNodeType :fengongxianCode=fengongxianCode :adCode="code" :adName="name" :lyjg=lyjg :fenggongxianName="fengongxianName"
  21. :fengongxianChildren="fengongxianChildren"></villAndPeo>
  22. </el-tab-pane>
  23. <el-tab-pane label="村内农村饮水工程设施运行维护情况表" name="drkEngVill">
  24. <drkEngVill :engIdh="xianEngId" :currentNodeType=currentNodeType :fengongxianCode=fengongxianCode :adCode="code" :adName="name" :lyjg=lyjg :fenggongxianName="fengongxianName"
  25. :fengongxianChildren="fengongxianChildren"></drkEngVill>
  26. </el-tab-pane>
  27. <el-tab-pane label="用水户情况" name="homeInfo">
  28. <homeInfo :engIdh="xianEngId" :currentNodeType=currentNodeType :fengongxianCode=fengongxianCode :adCode="code" :adName="name" :lyjg=lyjg :fenggongxianName="fengongxianName"
  29. :fengongxianChildren="fengongxianChildren"></homeInfo>
  30. </el-tab-pane>
  31. <el-tab-pane label="农村饮水工程运行管理情况表" name="driWatPro">
  32. <driWatPro :engIdh="xianEngId" :currentNodeType=currentNodeType :fengongxianCode=fengongxianCode :adCode="code" :adName="name" :lyjg=lyjg
  33. :fenggongxianName="fengongxianName"
  34. :fengongxianChildren="fengongxianChildren"></driWatPro>
  35. </el-tab-pane>
  36. <el-tab-pane label="千人以上供水工程水源地保护情况表" name="watSouPro">
  37. <watSouPro :engIdh="xianEngId" :currentNodeType=currentNodeType :fengongxianCode=fengongxianCode :adCode="code" :adName="name" :lyjg=lyjg :fenggongxianName="fengongxianName" :fengongxianChildren="fengongxianChildren"></watSouPro>
  38. </el-tab-pane>
  39. <!-- <el-tab-pane label="管理责任体系落实情况表" name="resbSysImp">
  40. <resbSysImp :engIdh="xianEngId" :adCode="code" :adName="name"></resbSysImp>
  41. </el-tab-pane> -->
  42. </el-tabs>
  43. </el-main>
  44. </el-container>
  45. </div>
  46. </template>
  47. <script>
  48. import { getTableId_ny } from "../../api/duChaTianBao.js";
  49. import { getDuChaFenGongList } from "../../api/duChaTianBao.js";
  50. import provTreeList from "../../widgets/duChaFenGongList_nongyin.vue";
  51. import dczTree from "../../widgets/dczTree.vue";
  52. import request from "../../utils/gw_ajax_request.js";
  53. import draggable from "../../widgets/draggable.vue";
  54. // import villAndPeo from "./villAndPeo.vue";
  55. // import driWatPro from "./driWatPro.vue";
  56. import watSouPro from "./watSouPro.vue";
  57. // import homeInfo from "./homeInfo.vue";
  58. import drkEngVill from "./drkEngVill.vue";
  59. import { getDcdxList } from "../../api/duChaPlan.js";
  60. export default {
  61. components: {
  62. provTreeList: provTreeList,
  63. draggable,
  64. dczTree: dczTree,
  65. // villAndPeo: villAndPeo,
  66. // driWatPro:driWatPro,
  67. watSouPro:watSouPro,
  68. // homeInfo:homeInfo,
  69. drkEngVill:drkEngVill,
  70. villAndPeo: resolve => {
  71. require(["./villAndPeo.vue"], resolve);
  72. },
  73. driWatPro: resolve => {
  74. require(["./driWatPro.vue"], resolve);
  75. },
  76. // watSouPro: resolve => {
  77. // require(["./watSouPro.vue"], resolve);
  78. // },
  79. homeInfo: resolve => {
  80. require(["./homeInfo.vue"], resolve);
  81. },
  82. // drkEngVill: resolve => {
  83. // require(["./drkEngVill.vue"], resolve);
  84. // },
  85. },
  86. props: [],
  87. data() {
  88. return {
  89. staticProvData: {
  90. "11": "北京市",
  91. "12": "天津市",
  92. "13": "河北省",
  93. "14": "山西省",
  94. "15": "内蒙古自治区",
  95. "21": "辽宁省",
  96. "22": "吉林省",
  97. "23": "黑龙江省",
  98. "31": "上海市",
  99. "32": "江苏省",
  100. "33": "浙江省",
  101. "34": "安徽省",
  102. "35": "福建省",
  103. "36": "江西省",
  104. "37": "山东省",
  105. "41": "河南省",
  106. "42": "湖北省",
  107. "43": "湖南省",
  108. "44": "广东省",
  109. "45": "广西壮族自治区",
  110. "46": "海南省",
  111. "50": "重庆市",
  112. "51": "四川省",
  113. "52": "贵州省",
  114. "53": "云南省",
  115. "54": "西藏自治区",
  116. "61": "陕西省",
  117. "62": "甘肃省",
  118. "63": "青海省",
  119. "64": "宁夏回族自治区",
  120. "65": "新疆维吾尔自治区",
  121. "66": "新疆生产建设兵团"
  122. },
  123. pageTypem: "",
  124. checkList: false,
  125. activeName: "villAndPeo",
  126. county: "",
  127. radioForProv: "allProv",
  128. provList: [
  129. {
  130. addName: "湖北"
  131. },
  132. {
  133. addName: "重庆"
  134. },
  135. {
  136. addName: "四川"
  137. }
  138. ],
  139. checkboxForCounty: [
  140. {
  141. orgCode: "",
  142. orgName: ""
  143. }
  144. ],
  145. dcCountyList: [
  146. {
  147. orgCode: "001",
  148. orgName: "郧西县"
  149. },
  150. {
  151. orgCode: "002",
  152. orgName: "长阳县"
  153. },
  154. {
  155. orgCode: "003",
  156. orgName: "建始县"
  157. },
  158. {
  159. orgCode: "004",
  160. orgName: "罗田县"
  161. },
  162. {
  163. orgCode: "005",
  164. orgName: "兴山县"
  165. },
  166. {
  167. orgCode: "006",
  168. orgName: "随县"
  169. },
  170. {
  171. orgCode: "007",
  172. orgName: "浠水县"
  173. }
  174. ],
  175. provName: "",
  176. groupId: "",
  177. dczType: "",
  178. loading: false,
  179. dxdcMainHeight: window.innerHeight - 190,
  180. dxdcAsideHeight: window.innerHeight - 90,
  181. dcType: "2",
  182. dcTypeDefault: "小水库",
  183. searchNameOfRsName: "",
  184. searchNameOfAdName: "",
  185. searchNameOfwtdstNm: "",
  186. searchName: "",
  187. dcCount: "",
  188. engScal: "",
  189. rsAdmDep: "",
  190. wtdstType: "",
  191. wtdstState: "",
  192. dcBatch: "",
  193. dcgroup: "",
  194. pageNum: 1,
  195. pageSize: 9,
  196. total: 50,
  197. currentShowList: [],
  198. xskSer: true,
  199. ncysSer: false,
  200. shgcSer: false,
  201. mapLocationWindow: false,
  202. searchProvTreeListCode: "",
  203. treeShow: 0,
  204. treeData: [],
  205. fengongxianCode: "",
  206. xianEngId: "",
  207. currentNodeType:"",
  208. code: "",
  209. name: "",
  210. loadingType: false,
  211. lyjg:[],
  212. fengongxianName:'',
  213. fengongxianChildren:[],
  214. };
  215. },
  216. computed: {
  217. userId: function() {
  218. return localStorage.getItem("userid")
  219. ? localStorage.getItem("userid")
  220. : "1098101939614724096";
  221. },
  222. guId: function() {
  223. return localStorage.getItem("guid")
  224. ? localStorage.getItem("guid")
  225. : "000";
  226. }
  227. },
  228. mounted() {
  229. // this.loadTreeListData();
  230. this.pageTypem = "ncys";
  231. if (this.groupId == "noData" || this.groupId == "") {
  232. this.currentShowList = [];
  233. } else {
  234. // this.getTableData();
  235. }
  236. },
  237. computed: {
  238. userId: function() {
  239. return localStorage.getItem("userid")
  240. ? localStorage.getItem("userid")
  241. : "1098101939614724096";
  242. }
  243. },
  244. watch: {
  245. groupId: function(n, o) {
  246. if (n != "noData") {
  247. this.groupId = n;
  248. this.getTableData();
  249. } else {
  250. this.currentShowList = [];
  251. }
  252. },
  253. xianEngId: function(n, o) {
  254. // alert(n);
  255. this.xianEngId = n;
  256. },
  257. loadingType: function(n, o) {
  258. this.loadingType = n;
  259. }
  260. },
  261. methods: {
  262. // loadTreeListData: function() {
  263. // try {
  264. // getDuChaFenGongList(this.userId, 100).then(
  265. // res => {
  266. // let _self = this;
  267. // console.log(res);
  268. // var children = [];
  269. // var tempTreeData = [];
  270. // var hasProv = false;
  271. // res.data.list.forEach((element, index) => {
  272. // tempTreeData.forEach(provNode => {
  273. // if (element.code.startsWith(provNode.code)) {
  274. // provNode["children"].push(element);
  275. // hasProv = true;
  276. // }
  277. // });
  278. // if (!hasProv) {
  279. // let newProvNode = {};
  280. // newProvNode["nm"] =
  281. // _self.staticProvData[element.code.substr(0, 2)];
  282. // newProvNode["code"] = element.code.substr(0, 2);
  283. // newProvNode["children"] = [];
  284. // newProvNode["children"].push(element);
  285. // tempTreeData.push(newProvNode);
  286. // }
  287. // tempTreeData;
  288. // hasProv = false;
  289. // children.push(element);
  290. // });
  291. // console.log(tempTreeData);
  292. // this.treeData = tempTreeData;
  293. // this.$emit("provTreeSelectChange", {
  294. // code: children[0].code,
  295. // name: children[0].nm
  296. // });
  297. // },
  298. // err => {}
  299. // );
  300. // } catch (e) {
  301. // this.$message.error("超时");
  302. // }
  303. // },
  304. appendPlan() {
  305. var _self = this;
  306. var myString = "";
  307. for (var i = 0; i < this.dcCountyList.length; i++) {
  308. for (var j = 0; j < this.checkboxForCounty.length; j++) {
  309. if (this.dcCountyList[i].orgName == this.checkboxForCounty[j]) {
  310. myString += this.checkboxForCounty[j] + ",";
  311. }
  312. }
  313. }
  314. myString = myString.substr(0, myString.length - 1);
  315. alert(myString);
  316. },
  317. changePorv: function(value) {
  318. alert(value);
  319. if (value == "allProv") {
  320. this.checkList = false;
  321. this.checkboxForCounty = [];
  322. } else {
  323. this.checkList = true;
  324. }
  325. },
  326. showTree() {
  327. this.treeShow = 1;
  328. },
  329. hideTree(hide) {
  330. console.log(hide);
  331. this.treeShow = hide;
  332. },
  333. engScalFormatter: function(row, column) {
  334. return row.engScal == 1
  335. ? "大(1)型"
  336. : row.engScal == 2
  337. ? "大(2)型"
  338. : row.engScal == 3
  339. ? "中型"
  340. : row.engScal == 4
  341. ? "小(1)型"
  342. : "小(2)型";
  343. },
  344. nyTypeFormatter: function(row, column) {
  345. return row.type == 1
  346. ? "Ⅰ"
  347. : row.type == 2
  348. ? "Ⅱ"
  349. : row.type == 3
  350. ? "Ⅲ"
  351. : "Ⅳ";
  352. },
  353. wtdstStateFormatter: function(row, column) {
  354. return row.wtdstState == 1 ? "已修复" : "未修复";
  355. },
  356. rsAdmDepFormatter: function(row, column) {
  357. return row.rsAdmDep == 1
  358. ? "水利部门"
  359. : row.rsAdmDep == 2
  360. ? "电力部门"
  361. : row.rsAdmDep == 3
  362. ? "农业部门"
  363. : row.rsAdmDep == 4
  364. ? "林业部门"
  365. : row.rsAdmDep == 5
  366. ? "城建部门"
  367. : row.rsAdmDep == 6
  368. ? "航运部门"
  369. : row.rsAdmDep == 7
  370. ? "环保部门"
  371. : "其他部门";
  372. },
  373. adGradFormatter: function(row, column) {
  374. return row.adGrad == 1
  375. ? "国家级"
  376. : row.adGrad == 2
  377. ? "省级"
  378. : row.adGrad == 3
  379. ? "地市级"
  380. : row.adGrad == 4
  381. ? "县级"
  382. : row.adGrad == 5
  383. ? "乡级"
  384. : row.adGrad == 6
  385. ? "村"
  386. : "村组";
  387. },
  388. getTableData: function() {
  389. var _self = this;
  390. getDcdxList(
  391. this.groupId,
  392. this.dcType,
  393. this.pageSize,
  394. this.pageNum,
  395. this.searchNameOfRsName, //水库名称
  396. this.searchNameOfAdName, //农村饮水行政区划名称
  397. this.searchNameOfwtdstNm, //水毁-工程名称
  398. this.engScal, //水库-工程规模
  399. this.rsAdmDep, //水库-归口管理部门
  400. this.wtdstType, //水毁-工程类别
  401. this.wtdstState //水毁-工程类别
  402. ).then(response => {
  403. this.loading = false;
  404. var res = response.data;
  405. _self.currentShowList = res.list;
  406. _self.total = res.total;
  407. _self.currentShowList.forEach((element, index) => {
  408. element["index"] = _self.pageSize * (_self.pageNum - 1) + index + 1;
  409. });
  410. });
  411. },
  412. handleCurrentChange(val) {
  413. this.getTableData();
  414. },
  415. dczTreeSelectChangeHandler: function(params) {
  416. this.groupId = params.id;
  417. },
  418. mapLocation: function(params) {
  419. this.mapLocationWindow = true;
  420. },
  421. closeMapLocationWindow: function() {
  422. this.mapLocationWindow = false;
  423. },
  424. provTreeSelectChangeHandler: function(params) {
  425. var _self = this;
  426. this.code = params.code;
  427. this.name = params.name;
  428. if (params.objCode == "") {
  429. _self.xianEngId = "";
  430. } else {
  431. this.fengongxianCode = params.objCode;
  432. getTableId_ny(this.fengongxianCode,this.userId).then(res => {
  433. _self.xianEngId = res.data.engId;
  434. });
  435. }
  436. },
  437. LoadingCompletedType: function(params) {
  438. this.loadingType = params.type;
  439. },
  440. emitCurrentNodeId(item){
  441. if(item.children){
  442. this.fengongxianChildren = item.children.length;
  443. } else {
  444. this.fengongxianChildren = 0;
  445. }
  446. this.code = item.code;
  447. this.currentNodeType = item.noteType;
  448. this.xianEngId = item.engId;
  449. this.fengongxianName = item.nm;
  450. this.fengongxianCode = item.code;
  451. console.log('engId++++'+this.xianEngId);
  452. },
  453. emitLyjgList(item){
  454. this.lyjg = item;
  455. },
  456. handleClick: function() {
  457. // this.xianEngId = "";
  458. }
  459. }
  460. };
  461. </script>
  462. <style>
  463. #dcdxHeader {
  464. padding: 15px 20px;
  465. }
  466. #dxdcFooter {
  467. text-align: center;
  468. }
  469. #dxdcAside {
  470. border: 1px solid #d5d5ff;
  471. }
  472. .el-form-item__content {
  473. z-index: 1;
  474. }
  475. #ncysDcdxTabs .el-tabs__header {
  476. margin: 0;
  477. }
  478. #ncysLabel .el-form-item--mini .el-form-item__label {
  479. /* background-color: #ececec;
  480. text-align: left;
  481. margin-right: 10px;
  482. padding:5px 0px 5px 10px; */
  483. font-weight: bold;
  484. }
  485. </style>