PatrolmanStatistics.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590
  1. <template>
  2. <div class="home">
  3. <timeing></timeing>
  4. <p class="backtitle">巡访员信息统计</p>
  5. <div class="return-btn" @click="goHome">返回首页</div>
  6. <div class="select-div">
  7. <span class="address-title">省:</span>
  8. <el-select class="input" v-model="dept1" clearable :popper-append-to-body="false" placeholder="请选择" @change="provinceChange">
  9. <el-option
  10. v-for="item in provinces"
  11. :key="item.value"
  12. :label="item.label"
  13. :value="item.value"
  14. :disabled="item.disabled" >
  15. </el-option>
  16. </el-select>
  17. <span class="address-title">地市:</span>
  18. <el-select class="input" v-model="dept2" clearable :popper-append-to-body="false" placeholder="请选择" @change="cityChange">
  19. <el-option
  20. v-for="item in citys"
  21. :key="item.value"
  22. :label="item.label"
  23. :value="item.value"
  24. :disabled="item.disabled">
  25. </el-option>
  26. </el-select>
  27. <span class="address-title">县(市区):</span>
  28. <el-select class="input1" v-model="dept3" clearable :popper-append-to-body="false" placeholder="请选择" @change="areaChange">
  29. <el-option
  30. v-for="item in areas"
  31. :key="item.value"
  32. :label="item.label"
  33. :value="item.value"
  34. :disabled="item.disabled">
  35. </el-option>
  36. </el-select>
  37. <span v-if="!isZhankai" class="bj-zhankai" @click="zhankai"></span>
  38. <span v-else class="bj-shouqi" @click="guanbi"></span>
  39. <span class="bj-qeuren" @click="queren"></span>
  40. <span v-if="isZhankai" class="address-title">乡镇(街道):</span>
  41. <el-select v-if="isZhankai" class="input1" clearable :popper-append-to-body="false" v-model="dept4" placeholder="请选择" @change="countyChange">
  42. <el-option
  43. v-for="item in countys"
  44. :key="item.value"
  45. :label="item.label"
  46. :value="item.value"
  47. :disabled="item.disabled">
  48. </el-option>
  49. </el-select>
  50. <span v-if="isZhankai" class="address-title">村(居)民委员会:</span>
  51. <el-select v-if="isZhankai" class="input1" clearable :popper-append-to-body="false" v-model="dept5" placeholder="请选择">
  52. <el-option
  53. v-for="item in villages"
  54. :key="item.value"
  55. :label="item.label"
  56. :value="item.value"
  57. :disabled="item.disabled">
  58. </el-option>
  59. </el-select>
  60. </div>
  61. <div class="header">
  62. <!-- 图1 -->
  63. <div class="tu-one">
  64. <!-- <com1 :dataArr="dataArr1"></com1>-->
  65. <div class="number">{{score1}}</div>
  66. <div class="small-title">采集积分(分)</div>
  67. </div>
  68. <div class="tu-two">
  69. <div class="number">{{score2}}</div>
  70. <div class="small-title">累计积分(分)</div>
  71. </div>
  72. <div class="tu-three">
  73. <p class="title1">巡访员积分排行TOP10</p>
  74. <div class="scorll-div scroll">
  75. <ul class="item " style="height:100%">
  76. <li v-for="(item, index) in listData" :key="index">
  77. <el-row
  78. style="padding-top:1%;padding-bottom:1%;margin-top:2%;color:#fff"
  79. type="flex"
  80. justify="center"
  81. align="middle"
  82. :class="{'sc0': index%2==0}"
  83. >
  84. <el-col :span="2" class="col4">
  85. <el-image v-if="index == 0 ||index == 1 || index== 2 " class="img"
  86. :src="scrollTextisColor(index)"></el-image>
  87. <div v-else class="top10-number">{{index+1}}</div>
  88. </el-col>
  89. <el-col :span="5">{{item.userName}}</el-col>
  90. <el-col :span="12">{{item.address}}</el-col>
  91. <el-col :span="5">{{item.score}}分</el-col>
  92. </el-row>
  93. </li>
  94. </ul>
  95. </div>
  96. </div>
  97. <div class="tu-four">
  98. <p class="title1">巡访员性别分布统计</p>
  99. <com1 ref="c1"></com1>
  100. </div>
  101. <div class="tu-five">
  102. <p class="title1">巡访员认证数据统计</p>
  103. <com2 ref="c2"></com2>
  104. </div>
  105. <div class="tu-six">
  106. <p class="title1">巡访员职务分布统计</p>
  107. <com3 ref="c3"></com3>
  108. </div>
  109. <div class="tu-seven">
  110. <p class="title1">巡访员巡访方式统计</p>
  111. <com4></com4>
  112. </div>
  113. <div class="tu-thirteen">
  114. <p class="title1">核心巡访数据统计</p>
  115. </div>
  116. </div>
  117. <div class="foot">
  118. <div class="tu-eight">
  119. <p class="title1">老年人健康状况</p>
  120. <com5 ref='c5'></com5>
  121. </div>
  122. <div class="tu-nine">
  123. <p class="title1">老年人精神状态</p>
  124. <com6 ref="c6"></com6>
  125. </div>
  126. <div class="tu-ten">
  127. <p class="title1">老年人安全情况</p>
  128. <com7 ref="c7"></com7>
  129. </div>
  130. <div class="tu-eleven">
  131. <p class="title1">老年人卫生环境</p>
  132. <com8 ref="c8"></com8>
  133. </div>
  134. <div class="tu-twelve">
  135. <p class="title1">老年人居住环境</p>
  136. <com9 ref="c9"></com9>
  137. </div>
  138. </div>
  139. </div>
  140. </template>
  141. <script>
  142. import com1 from "../components/PatrolmanStatistics/1.vue";
  143. import com2 from "../components/PatrolmanStatistics/2.vue";
  144. import com3 from "../components/PatrolmanStatistics/3.vue";
  145. import com4 from "../components/PatrolmanStatistics/4.vue";
  146. import com5 from "../components/PatrolmanStatistics/5.vue";
  147. import com6 from "../components/PatrolmanStatistics/6.vue";
  148. import com7 from "../components/PatrolmanStatistics/7.vue";
  149. import com8 from "../components/PatrolmanStatistics/8.vue";
  150. import com9 from "../components/PatrolmanStatistics/9.vue";
  151. import storageUtil from '../util/storageUtil'
  152. import { findDept, oldPersonSelectUserValue, oldPersonSelectDeptValue } from '../api'
  153. export default {
  154. name: "Home",
  155. components: {com1, com2, com3, com4, com5, com6, com7, com8, com9},
  156. data() {
  157. return {
  158. provinces: [], // 省份
  159. citys: [], // 市
  160. areas: [], // 县
  161. countys: [], // 乡
  162. villages: [], // 村
  163. dept1: '',
  164. dept2: '',
  165. dept3: '',
  166. dept4: '',
  167. dept5: '',
  168. isZhankai: false, //是够展开和收起
  169. listData: [],
  170. score1: 0,
  171. score2: 0
  172. };
  173. },
  174. async mounted() {
  175. this.provinces = await this.findDept({'level': '1'});
  176. this.listData = await oldPersonSelectUserValue({}, 'POST');
  177. const result = await oldPersonSelectDeptValue({}, 'POST');
  178. this.score1 = result.infoValue;
  179. this.score2 = result.totalValue;
  180. },
  181. methods: {
  182. //获取地区
  183. async findDept(data) {
  184. const result = await findDept(data, 'POST');
  185. return result;
  186. },
  187. async provinceChange(val) {
  188. this.citys = await this.findDept({ fid: val });
  189. this.dept2 = '';
  190. this.dept3 = '';
  191. this.dept4 = '';
  192. this.dept5 = '';
  193. },
  194. async cityChange(val) {
  195. this.areas = await this.findDept({ fid: val });
  196. this.dept3 = '';
  197. this.dept4 = '';
  198. this.dept5 = '';
  199. },
  200. async areaChange(val) {
  201. this.countys = await this.findDept({ fid: val });
  202. this.dept4 = '';
  203. this.dept5 = '';
  204. },
  205. async countyChange(val) {
  206. this.villages = await this.findDept({ fid: val });
  207. this.dept5 = '';
  208. },
  209. //返回首页
  210. goHome() {
  211. storageUtil.save('dept-array', '');
  212. this.$router.push({ path: '/' });
  213. },
  214. zhankai() {
  215. console.log("111")
  216. this.isZhankai = !this.isZhankai
  217. },
  218. guanbi() {
  219. console.log("222")
  220. this.isZhankai = !this.isZhankai
  221. },
  222. queren() {
  223. let arr = new Array();
  224. if(this.dept1 != '') {
  225. arr.push(this.dept1);
  226. }
  227. if(this.dept2 != '') {
  228. arr.push(this.dept1);
  229. }
  230. if(this.dept3 != '') {
  231. arr.push(this.dept1);
  232. }
  233. if(this.dept4 != '') {
  234. arr.push(this.dept1);
  235. }
  236. if(this.dept5 != '') {
  237. arr.push(this.dept1);
  238. }
  239. storageUtil.save('dept-array', arr);
  240. this.$refs.c1.draw();
  241. this.$refs.c2.draw();
  242. this.$refs.c3.draw();
  243. this.$refs.c5.draw();
  244. this.$refs.c6.draw();
  245. this.$refs.c7.draw();
  246. this.$refs.c8.draw();
  247. this.$refs.c9.draw();
  248. },
  249. // 滚动颜色
  250. scrollTextisColor: function (i) {
  251. if (i == 0) {
  252. return require("../assets/PatrolmanStatistics/top1.png")
  253. } else if (i == 1) {
  254. return require("../assets/PatrolmanStatistics/top2.png")
  255. } else if (i == 2) {
  256. return require("../assets/PatrolmanStatistics/top3.png")
  257. }
  258. }
  259. },
  260. computed: {}
  261. };
  262. </script>
  263. <style scoped lang="less" type="text/css">
  264. .backtitle {
  265. background-image: -webkit-linear-gradient(bottom, #91e5ff, #fff);
  266. -webkit-background-clip: text;
  267. -webkit-text-fill-color: transparent;
  268. font-size: 32px;
  269. font-weight: 900;
  270. font-weight: 900;
  271. position: absolute;
  272. left: 44%;
  273. top: 1%;
  274. }
  275. .select-div {
  276. width: 34%;
  277. /*height: 4%;*/
  278. position: absolute;
  279. top: 4.5%;
  280. left: 2%;
  281. z-index: 999;
  282. background: #01135b;
  283. }
  284. .return-btn {
  285. /*background-image: -webkit-linear-gradient(bottom, #91e5ff, #fff);*/
  286. background: url("../assets/oldStatistics/fanhuishouye.png") no-repeat;
  287. background-size: 100% 100%;
  288. width: 70px;
  289. line-height: 40px;
  290. height: 39px;
  291. text-align: center;
  292. font-weight: 900;
  293. position: absolute;
  294. right: 2%;
  295. top: 5%;
  296. padding: 0 10px;
  297. color: #00afde;
  298. z-index: 9999;
  299. }
  300. .return-btn:hover {
  301. cursor: pointer;
  302. }
  303. .home {
  304. height: 100%;
  305. position: fixed;
  306. width: 100%;
  307. background: url("../assets/PatrolmanStatistics/bj.png");
  308. background-size: 100% 100%;
  309. display: flex;
  310. flex-direction: column;
  311. }
  312. .header {
  313. width: 100%;
  314. height: 67%;
  315. position: relative;
  316. top: 0;
  317. left: 0;
  318. }
  319. .tu-one {
  320. width: 18%;
  321. height: 17%;
  322. position: absolute;
  323. top: 15%;
  324. left: 2%;
  325. text-align: center;
  326. }
  327. .tu-two {
  328. width: 18%;
  329. height: 17%;
  330. position: absolute;
  331. top: 35%;
  332. left: 2%;
  333. text-align: center;
  334. }
  335. .tu-three {
  336. width: 23.3%;
  337. height: 37%;
  338. position: absolute;
  339. top: 15%;
  340. left: 21.5%;
  341. text-align: center;
  342. }
  343. .tu-four {
  344. width: 23%;
  345. height: 37%;
  346. position: absolute;
  347. top: 15%;
  348. left: 46%;
  349. text-align: center;
  350. }
  351. .tu-five {
  352. width: 26%;
  353. height: 36%;
  354. position: absolute;
  355. top: 55%;
  356. left: 2%;
  357. text-align: center;
  358. }
  359. .tu-six {
  360. width: 40%;
  361. height: 36%;
  362. position: absolute;
  363. top: 55%;
  364. left: 29%;
  365. text-align: center;
  366. }
  367. .tu-seven {
  368. width: 27%;
  369. height: 76%;
  370. position: absolute;
  371. top: 15%;
  372. left: 70.5%;
  373. text-align: center;
  374. }
  375. .tu-eight {
  376. width: 18%;
  377. height: 85%;
  378. position: absolute;
  379. top: 7%;
  380. left: 3%;
  381. text-align: center;
  382. }
  383. .tu-nine {
  384. width: 18%;
  385. height: 85%;
  386. position: absolute;
  387. top: 7%;
  388. left: 22%;
  389. text-align: center;
  390. }
  391. .tu-ten {
  392. width: 18%;
  393. height: 85%;
  394. position: absolute;
  395. top: 7%;
  396. left: 41%;
  397. text-align: center;
  398. }
  399. .tu-eleven {
  400. width: 18%;
  401. height: 85%;
  402. position: absolute;
  403. top: 7%;
  404. left: 60%;
  405. text-align: center;
  406. }
  407. .tu-twelve {
  408. width: 18%;
  409. height: 85%;
  410. position: absolute;
  411. top: 7%;
  412. left: 79%;
  413. text-align: center;
  414. }
  415. .tu-thirteen {
  416. width: 100%;
  417. height: 5%;
  418. position: absolute;
  419. bottom: 0%;
  420. left: 3%;
  421. text-align: center;
  422. }
  423. .number {
  424. font-size: 55px;
  425. font-weight: 400;
  426. color: rgba(248, 255, 63, 1);
  427. font-family: LCD;
  428. letter-spacing: 20px
  429. }
  430. .small-title {
  431. color: white;
  432. }
  433. .title1 {
  434. font-size: 16px;
  435. font-family: SourceHanSansCN;
  436. font-weight: 500;
  437. color: rgba(255, 255, 255, 1);
  438. }
  439. .scorll-div {
  440. height: 82%;
  441. width: 100%;
  442. margin-top: 4%;
  443. overflow-y: auto;
  444. overflow-x: hidden;
  445. }
  446. .top10-number {
  447. color: #ffd821;
  448. }
  449. .item {
  450. font-size: 16px;
  451. }
  452. .foot {
  453. width: 100%;
  454. height: 32%;
  455. position: relative;
  456. }
  457. .scroll::-webkit-scrollbar {
  458. background-color: #374991;
  459. height: 8px;
  460. width: 4px;
  461. -webkit-border-radius: 4px;
  462. -moz-border-radius: 4px;
  463. border-radius: 4px;
  464. }
  465. .scroll::-webkit-scrollbar-track {
  466. opacity: 0;
  467. transition: opacity 0.12s ease-out;
  468. -webkit-border-radius: 4px;
  469. -moz-border-radius: 4px;
  470. border-radius: 4px;
  471. }
  472. .scroll::-webkit-scrollbar-thumb {
  473. background-color: #1c95ce;
  474. transition: background-color 0.3s;
  475. -webkit-border-radius: 4px;
  476. -moz-border-radius: 4px;
  477. border-radius: 4px;
  478. }
  479. .address-title {
  480. color: #00d8fe;
  481. }
  482. .input {
  483. width: 15.5%;
  484. margin-right: 1%;
  485. }
  486. .input1 {
  487. width: 20%;
  488. margin-right: 1%;
  489. }
  490. .bj-zhankai {
  491. display: inline-block;
  492. background: url("../assets/PatrolmanStatistics/zhankai.png") no-repeat;
  493. background-size: 90% 90%;
  494. width: 60px;
  495. height: 37px;
  496. margin-right: 1%;
  497. vertical-align: bottom;
  498. }
  499. .bj-zhankai:hover {
  500. cursor: pointer;
  501. }
  502. .bj-shouqi {
  503. display: inline-block;
  504. background: url("../assets/PatrolmanStatistics/shouqi.png") no-repeat;
  505. background-size: 90% 90%;
  506. width: 60px;
  507. height: 37px;
  508. margin-right: 1%;
  509. vertical-align: bottom;
  510. }
  511. .bj-shouqi:hover {
  512. cursor: pointer;
  513. }
  514. .bj-qeuren {
  515. display: inline-block;
  516. background: url("../assets/PatrolmanStatistics/queren.png") no-repeat;
  517. background-size: 90% 90%;
  518. width: 69px;
  519. height: 37px;
  520. vertical-align: bottom;
  521. }
  522. .bj-qeuren:hover {
  523. cursor: pointer;
  524. }
  525. /deep/ .el-select,
  526. /deep/ .el-input,
  527. /deep/ .el-input__inner {
  528. color: #00d7ff;
  529. text-align: center;
  530. background: rgba(254, 196, 0, 0);
  531. border-radius: 10px;
  532. border: 1px solid;
  533. border-image: linear-gradient(-90deg, rgba(0, 187, 234, 0), rgba(3, 77, 129, 1), rgba(0, 161, 254, 0)) 1 1;
  534. box-shadow: 0px 0px 46px 0px rgba(8, 91, 168, 0.4);
  535. }
  536. /deep/ .el-select .el-input .el-select__caret {
  537. color: #00d7ff;
  538. }
  539. /deep/ .el-select-dropdown__item.hover,
  540. /deep/ .el-select-dropdown__item:hover {
  541. color: #409eff;
  542. }
  543. </style>