ea0680039cc3f6225e41b6754aaee73c49652ea0.svn-base 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356
  1. <template>
  2. <div id="duchawentiContainer">
  3. <el-aside width="250px" style="border-right:2px solid #d5d5ff;float:left">
  4. <!-- <p style="font-weight:bolder;background-color:#d5d5ff;padding:3px;">
  5. <i class="el-icon-share"></i>行政区划
  6. </p>
  7. <provTreeList rootCode :style="{'max-height':tableHeight+'px','height':tableHeight+'px'}" @provTreeSelectChange="provTreeSelectChangeHandler"></provTreeList> -->
  8. <div style="height:100%;text-align: center;" :style="{'height':containerHeight+'px'}">
  9. <el-row style="height:80px;margin-bottom:5px;margin-top:10px;">
  10. <el-col :span="4" style="height:100%;width: 100%;">
  11. <div @click=" active= 'xiaoShuiKu'">
  12. <div class="xiaoshuiku" :class="{active: isshow}" @click="getcolor('xsk')">
  13. <div class="xiaoshuiku_img">
  14. <img src="./images/shuiku.png" alt>
  15. </div>
  16. <div class="xiaoshuiku_xhk">
  17. <p>小水库</p>
  18. <P style="">{{totalXiaoShuiKu}}个</P>
  19. </div>
  20. </div>
  21. </div>
  22. </el-col>
  23. </el-row>
  24. <!-- <el-row style="height:80px;margin-bottom:5px;">
  25. <el-col :span="4" style="height:100%;width: 100%;">
  26. <div @click=" active= 'xingZhengCun'">
  27. <div class="xiaoshuiku" :class="{active: isshow3}" @click="getcolor('xingzhengcun')">
  28. <div class="xingZhengCun_img">
  29. <img src="./images/cun.png" alt>
  30. </div>
  31. <div class="nongyin_ny">
  32. <p>行政村</p>
  33. <P style="">{{totalXingZhengCun}}个</P>
  34. </div>
  35. </div>
  36. </div>
  37. </el-col>
  38. </el-row>
  39. <el-row style="height:80px;margin-bottom:5px;">
  40. <el-col :span="4" style="height:100%;width: 100%;">
  41. <div @click=" active= 'shuiYuanDi'">
  42. <div class="nongyin" :class="{active: isshow4}" @click="getcolor('shuiYuanDi')">
  43. <div class="shuiyuandi_img">
  44. <img src="./images/shuiyuandi.png" alt>
  45. </div>
  46. <div class="nongyin_ny">
  47. <p>水源地</p>
  48. <P style="float:right;">{{totalShuiYuanDi}}个</P>
  49. </div>
  50. </div>
  51. </div>
  52. </el-col>
  53. </el-row> -->
  54. <el-row style="height:80px;margin-bottom:5px;">
  55. <el-col :span="4" style="height:100%; width: 100%;">
  56. <div @click=" active= 'yinShuiGongCheng'">
  57. <div class="nongyin" :class="{active: isshow1}" @click="getcolor('yinShuiGongCheng')">
  58. <div class="shuiyuandi_img">
  59. <img src="./images/yinshui.png" alt>
  60. </div>
  61. <div class="nongyin_ny">
  62. <p>人饮工程</p>
  63. <P style="float:right;">{{totalYinShuiGongCheng+totalShuiYuanDi+totalXingZhengCun}}个</P>
  64. </div>
  65. </div>
  66. </div>
  67. </el-col>
  68. </el-row>
  69. <el-row style="height:80px;margin-bottom:5px;">
  70. <el-col :span="4" style="height:100%;width: 100%;">
  71. <div @click=" active='shuiHuiGongCheng'">
  72. <div class="shuihui" :class="{active: isshow2}" @click="getcolor('shuihui')">
  73. <div class="shuihui_img">
  74. <img src="./images/shuihui.png" alt>
  75. </div>
  76. <div class="shuihui_sh">
  77. <p>水毁工程</p>
  78. <P style="float:right;">{{totalShuiHui}}个</P>
  79. </div>
  80. </div>
  81. </div>
  82. </el-col>
  83. </el-row>
  84. <el-row style="height:80px;">
  85. <el-col :span="4" style="height:100%;width: 100%;">
  86. <div @click=" active='tongYong'">
  87. <div class="tongyong" :class="{active: isshow5}" @click="getcolor('tongyong')">
  88. <div class="tongyong_img">
  89. <img src="./images/tongyong.png" alt>
  90. </div>
  91. <div class="tongyong_ty">
  92. <p>通 用</p>
  93. <P style="float:right;">{{totalTongYong}}个</P>
  94. </div>
  95. </div>
  96. </div>
  97. </el-col>
  98. </el-row>
  99. </div>
  100. </el-aside>
  101. <el-main style="padding:0px;">
  102. <div :style="{'height':containerHeight+'px'}">
  103. <component :is="active" :codeId="xingzhengCode" @problemCount="problemCount"></component>
  104. </div>
  105. </el-main>
  106. </div>
  107. </template>
  108. <script>
  109. import {
  110. findPageInfo,
  111. findPageCount,
  112. findTongYongCount
  113. } from "../../api/duChaAPI.js";
  114. import provTreeList from "../../widgets/provTreeListAndChina.vue";
  115. import shuiYuanDi from "./duChaWenTi_shuiyuandi.vue";
  116. import xingZhengCun from "./duChaWenTi_xingzhengcun.vue";
  117. import yinShuiGongCheng from "./duChaWenTi_renyinNew.vue";
  118. import xiaoShuiKu from "./duChaWenTi_xiaoshuikuNew.vue";
  119. import shuiHuiGongCheng from "./duChaWenTi_shuihuiNew.vue";
  120. import tongYong from "./duChaWenTi_tongyong.vue";
  121. export default {
  122. components: {
  123. provTreeList,
  124. shuiYuanDi,
  125. xiaoShuiKu,
  126. xingZhengCun,
  127. yinShuiGongCheng,
  128. shuiHuiGongCheng,
  129. tongYong
  130. },
  131. data() {
  132. return {
  133. active: "xiaoShuiKu",
  134. height: window.innerHeight - 80,
  135. tableHeight: window.innerHeight - 150,
  136. totalXiaoShuiKu: 0,
  137. totalXingZhengCun: 0,
  138. totalShuiHui: 0,
  139. totalTongYong: 0,
  140. totalYinShuiGongCheng: 0,
  141. totalShuiYuanDi: 0,
  142. isshow: true,
  143. isshow1: false,
  144. isshow2: false,
  145. isshow3: false,
  146. isshow4: false,
  147. isshow5: false,
  148. persId: localStorage.getItem('userid'),
  149. xingzhengCode: null,
  150. containerHeight: 0,
  151. };
  152. },
  153. mounted() {
  154. //统计问题数量
  155. this.containerHeight = document.getElementById('viewsItemBar').offsetHeight;
  156. console.log('containerHeight' + this.containerHeight);
  157. var _self = this;
  158. this.getPageInfoCount()
  159. this.tongYongCount()
  160. },
  161. watch: {
  162. xingzhengCode: {
  163. handler: function (val, oldVal) {
  164. console.log(val, oldVal)
  165. this.getPageInfoCount()
  166. },
  167. deep: true
  168. },
  169. },
  170. methods: {
  171. provTreeSelectChangeHandler: function (params) {
  172. console.log("bala" + params);
  173. if (params.likeCode == "" || params.likeCode == "000000000000" || params.likeCode == "00") {
  174. this.xingzhengCode = null;
  175. } else {
  176. this.xingzhengCode = params.likeCode;
  177. }
  178. },
  179. problemCount() {
  180. this.getPageInfoCount();
  181. this.tongYongCount()
  182. },
  183. tongYongCount() {
  184. findTongYongCount({}).then((res) => {
  185. if (res.success) {
  186. console.log("通用数量"+res.data)
  187. this.totalTongYong = res.data;
  188. }
  189. })
  190. },
  191. getPageInfoCount() {
  192. findPageCount(this.persId, this.xingzhengCode).then(res => {
  193. // console.log(res.data)
  194. if (res.success) {
  195. this.totalXiaoShuiKu = 0;
  196. this.totalXingZhengCun = 0;
  197. this.totalShuiYuanDi = 0;
  198. this.totalYinShuiGongCheng = 0;
  199. this.totalShuiHui = 0;
  200. res.data.forEach((ele) => {
  201. if (ele.name == '小水库') {
  202. this.totalXiaoShuiKu = ele.count;
  203. } else if (ele.name == '行政村') {
  204. this.totalXingZhengCun = ele.count;
  205. } else if (ele.name == '水源地') {
  206. this.totalShuiYuanDi = ele.count;
  207. } else if (ele.name == '饮水工程') {
  208. this.totalYinShuiGongCheng = ele.count;
  209. } else if (ele.name == '水毁') {
  210. this.totalShuiHui = ele.count;
  211. }
  212. });
  213. }
  214. });
  215. },
  216. getcolor(val) {
  217. if (val == 'xsk') {
  218. this.isshow = true;
  219. this.isshow1 = false;
  220. this.isshow2 = false;
  221. this.isshow3 = false;
  222. this.isshow4 = false;
  223. this.isshow5 = false;
  224. } else if (val == 'yinShuiGongCheng') {
  225. this.isshow = false;
  226. this.isshow1 = true;
  227. this.isshow2 = false;
  228. this.isshow3 = false;
  229. this.isshow4 = false;
  230. this.isshow5 = false;
  231. } else if (val == 'shuihui') {
  232. this.isshow = false;
  233. this.isshow1 = false;
  234. this.isshow2 = true;
  235. this.isshow3 = false;
  236. this.isshow4 = false;
  237. this.isshow5 = false;
  238. } else if (val == 'xingzhengcun') {
  239. this.isshow = false;
  240. this.isshow1 = false;
  241. this.isshow2 = false;
  242. this.isshow3 = true;
  243. this.isshow4 = false;
  244. this.isshow5 = false;
  245. } else if (val == 'shuiYuanDi') {
  246. this.isshow = false;
  247. this.isshow1 = false;
  248. this.isshow2 = false;
  249. this.isshow3 = false;
  250. this.isshow5 = false;
  251. this.isshow4 = true;
  252. } else {
  253. this.isshow = false;
  254. this.isshow1 = false;
  255. this.isshow2 = false;
  256. this.isshow3 = false;
  257. this.isshow4 = false;
  258. this.isshow5 = true;
  259. }
  260. },
  261. }
  262. };
  263. </script>
  264. <style scoped>
  265. .active {
  266. background-color: rgba(0, 103, 213, 0.09) !important;
  267. position: relative;
  268. }
  269. .active1 {
  270. color: aliceblue
  271. }
  272. img {
  273. width: 100%;
  274. height: 100%;
  275. }
  276. .xiaoshuiku,
  277. .shuihui,
  278. .nongyin,
  279. .tongyong {
  280. width: 90%;
  281. height: 90%;
  282. border-radius: 10px;
  283. background-color: rgba(255, 255, 255, 1);
  284. display: flex;
  285. flex-direction: row;
  286. justify-content: space-between;
  287. align-items: center;
  288. padding-left: 5%;
  289. box-shadow: 1px 4px 13px #DCDADA;
  290. }
  291. .xiaoshuiku_img,
  292. .xingZhengCun_img,
  293. .shuiyuandi_img,
  294. .nongyin_img,
  295. .shuihui_img,
  296. .tongyong_img {
  297. padding: 5px;
  298. height: 35px;
  299. width: 35px;
  300. margin-left: 10px;
  301. border-radius: 50%;
  302. }
  303. .xiaoshuiku_img {
  304. background-color: #008FFF;
  305. }
  306. .xingZhengCun_img {
  307. background-color: #F5574B;
  308. }
  309. .shuiyuandi_img {
  310. background-color: #F6AD44;
  311. }
  312. .nongyin_img {
  313. background-color: #008FFF;
  314. }
  315. .tongyong_img {
  316. background-color: #F6AD44;
  317. }
  318. .shuihui_img {
  319. background-color: #F5574B;
  320. }
  321. .xiaoshuiku_xhk,
  322. .nongyin_ny,
  323. .shuihui_sh,
  324. .tongyong_ty {
  325. font-size: 18px;
  326. flex-basis: 50%;
  327. display: flex;
  328. flex-direction: column;
  329. justify-content: space-between;
  330. align-items: flex-end;
  331. margin: 5px 0 10px 10px;
  332. margin-right: 30px;
  333. color: #1E1E1E;
  334. }
  335. </style>