index.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610
  1. <template>
  2. <div class="dashboard-editor-container">
  3. <!-- <div class="header">
  4. <p @click="day(1)" :class="[dayList == 1 ? 'heade_cod' : '']">天</p>
  5. <p>{{ '\xa0\xa0' }}|{{ '\xa0\xa0' }}</p>
  6. <p @click="day(2)" :class="[dayList == 2 ? 'heade_cod' : '']">周</p>
  7. <p>{{ '\xa0\xa0' }}|{{ '\xa0\xa0' }}</p>
  8. <p @click="day(3)" :class="[dayList == 3 ? 'heade_cod' : '']">月</p>
  9. </div> -->
  10. <el-row style=" margin-top: 20px;">
  11. <el-col :xs="24" :sm="24">
  12. <el-row>
  13. <div class="njues">
  14. <!-- <keep-alive :include="cachedViews">
  15. <router-view :key="key" /> -->
  16. <div style=" text-align: center; " class="hedse_radt" @click="wbhde">
  17. <div class="hedse_radtone">
  18. <p>五保户</p>
  19. <p>6<span>人</span></p>
  20. </div>
  21. </div>
  22. <!-- </keep-alive> -->
  23. <div style=" text-align: center; " class="hedse_radts hedse_radt" @click="dbhde">
  24. <div class="hedse_radtone">
  25. <p>低保户</p>
  26. <p>3<span>人</span></p>
  27. </div>
  28. </div>
  29. <div style=" text-align: center; " class="hedse_radtss hedse_radt" @click="pkde">
  30. <div class="hedse_radtone">
  31. <p>贫困户</p>
  32. <p>5<span>人</span></p>
  33. </div>
  34. </div>
  35. <div style=" text-align: center; " class="hedse_radt hedse_radtsss" @click="dyde">
  36. <div class="hedse_radtone">
  37. <p>党员</p>
  38. <p>2<span>人</span></p>
  39. </div>
  40. </div>
  41. <div style=" text-align: center; " class="hedse_radt hedse_radtssss" @click="twjrde">
  42. <div class="hedse_radtone">
  43. <p>退伍军人</p>
  44. <p>1<span>人</span></p>
  45. </div>
  46. </div>
  47. </div>
  48. </el-row>
  49. </el-col>
  50. </el-row>
  51. <el-row :gutter="30" style="margin-left: 0; margin-right: 0;">
  52. <el-col :xs="24" :sm="14" style="padding-left: 0;">
  53. <div class="chart-wrapper dp_zhud" style=" padding: 30px; ">
  54. <p class="dp_zhudtitle">人员类型统计柱状图 </p>
  55. <bar-chart :chart-data="panelChartDatazhuzh" />
  56. </div>
  57. </el-col>
  58. <el-col :xs="24" :sm="10" style="padding-right: 0;" >
  59. <div class="chart-wrapper dp_zhud" style=" padding: 30px; ">
  60. <p class="dp_zhudtitle">人员类型比率 </p>
  61. <pie-chart :chart-data="panelChartDatayuanh" />
  62. </div>
  63. </el-col>
  64. </el-row>
  65. <!-- <el-row style="background:#fff;padding:16px 16px 0;margin-bottom:32px;">
  66. <line-chart :chart-data="lineChartData" v-if="nhye"/></el-row> -->
  67. <!-- 列表 -->
  68. <!-- v-if="panelChartDatas.dqdw == '潜山市'" -->
  69. <div class="tabsty" >
  70. <div class="tabbuut">
  71. <p>各乡镇人口信息表</p>
  72. <!-- <el-button size="small" @click="handleExport" type="primary">导出</el-button> -->
  73. </div>
  74. <!-- panelChartDatas.townDatas -->
  75. <!-- tableData -->
  76. <el-table v-loading="loading" :data="tableData"
  77. style="width: 100%;" stripe height="280" :show-overflow-tooltip="true">
  78. <el-table-column prop="zhen" label="乡镇" align="center"/>
  79. <el-table-column prop="cun" label="村" align="center" width="180"/>
  80. <!-- <el-table-column prop="zu" label="组" align="center"/> -->
  81. <el-table-column prop="czzrs" label="五保户人口" align="center"/>
  82. <el-table-column prop="hjzrs" label="低保户人口" align="center"/>
  83. <el-table-column prop="hjxz" label="贫困户人口" align="center"/>
  84. <el-table-column prop="czxz" label="党员人口" align="center"/>
  85. <el-table-column prop="hjjs" label="退伍军人人口" align="center"/>
  86. </el-table>
  87. <!--
  88. <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" /> -->
  89. </div>
  90. <!-- <panel-group @handleSetLineChartData="handleSetLineChartData" /> -->
  91. <!-- <el-row :gutter="32">
  92. <el-col :xs="24" :sm="24" :lg="8">
  93. <div class="chart-wrapper"><raddar-chart :chart-data="panelChartDataleid"/></div>
  94. </el-col>
  95. <el-col :xs="24" :sm="24" :lg="8">
  96. <div class="chart-wrapper"><pie-chart :chart-data="panelChartDatayuanh" /></div>
  97. </el-col>
  98. <el-col :xs="24" :sm="24" :lg="8">
  99. <div class="chart-wrapper" ><bar-chart :chart-data="panelChartDatazhuzh" /></div>
  100. </el-col>
  101. </el-row> -->
  102. </div>
  103. </template>
  104. <script>
  105. import {treeselect,listDevice, exportPost,listzhex,listleida,listdbyh, listzhuzh,listTsde} from "@/api/index";
  106. import PanelGroup from './dashboard/PanelGroup';
  107. import PanelGroups from './dashboard/PanelGroups';
  108. import PanelGroupone from './dashboard/PanelGroupone';
  109. import PanelGrouptwo from './dashboard/PanelGrouptwo';
  110. import PanelGroupther from './dashboard/PanelGroupther';
  111. import PanelGroupfour from './dashboard/PanelGroupfour';
  112. import LineChart from './dashboard/LineChart';
  113. import RaddarChart from './dashboard/RaddarChart';
  114. import PieChart from './dashboard/PieChart';
  115. import BarChart from './dashboard/BarChart';
  116. const lineChartData = {
  117. newVisitis: {
  118. expectedData: [80, 120, 111, 104, 105, 100, 105],
  119. actualData: [120, 140, 130, 110, 162, 140, 145]
  120. },
  121. messages: {
  122. expectedData: [200, 192, 120, 144, 160, 130, 140],
  123. actualData: [180, 160, 151, 106, 145, 150, 130]
  124. },
  125. purchases: {
  126. expectedData: [80, 100, 121, 104, 105, 90, 100],
  127. actualData: [120, 90, 100, 138, 142, 130, 130]
  128. },
  129. shoppings: {
  130. expectedData: [130, 140, 141, 142, 145, 150, 160],
  131. actualData: [120, 82, 91, 154, 162, 140, 130]
  132. }
  133. };
  134. export default {
  135. name: 'Index',
  136. components: {
  137. PanelGroup,
  138. PanelGroups,
  139. LineChart,
  140. RaddarChart,
  141. PieChart,
  142. BarChart,
  143. PanelGroupone,
  144. PanelGrouptwo,
  145. PanelGroupther,
  146. PanelGroupfour
  147. },
  148. data() {
  149. return {
  150. lineChartData: {},
  151. dayList: 1, //判断天周月
  152. taye: 'newVisitis', //根据点击天周月变换,折线图数据变换
  153. panelChartData: {},
  154. panelChartDatas:{},
  155. panelChartDataleid:{},
  156. panelChartDatayuanh:[],
  157. tableData: [
  158. {hjzrs: 0, hjxz: 0, hjbfb: "0.00%", czxz: 0, czzrs: 0, zu: 388, hjjs: 0, czbfb: "4.02%", cun: 14,zhen: "槎水镇"},
  159. {hjzrs: 0, hjxz: 0, hjbfb: "0.00%", czxz: 0, czzrs: 0, zu: 203, hjjs: 0, czbfb: "2.66%", cun: 6,zhen: "痘姆乡"},
  160. {hjzrs: 0, hjxz: 0, hjbfb: "0.00%", czxz: 0, czzrs: 0, zu: 355, hjjs: 0, czbfb: "2.68%", cun: 14,zhen: "官庄镇"},
  161. {hjzrs: 3, hjxz: 5, hjbfb: "0.00%", czxz: 2, czzrs: 6, zu: 175, hjjs: 1, czbfb: "2.05%", cun: 6,zhen: "黄柏镇"},
  162. {hjzrs: 0, hjxz: 0, hjbfb: "0.00%", czxz: 0, czzrs: 0, zu: 171, hjjs: 0, czbfb: "2.16%", cun: 7,zhen: "黄泥镇"},
  163. {hjzrs: 0, hjxz: 0, hjbfb: "0.00%", czxz: 0, czzrs: 0, zu: 476, hjjs: 0, czbfb: "6.77%", cun: 14,zhen: "黄铺镇"},
  164. {hjzrs: 0, hjxz: 0, hjbfb: "0.00%", czxz: 0, czzrs: 0, zu: 226, hjjs: 0, czbfb: "2.31%", cun: 9,zhen: "龙潭乡"},
  165. {hjzrs: 0, hjxz: 0, hjbfb: "0.00%", czxz: 0, czzrs: 0, zu: 497, hjjs: 0, czbfb: "22.50%", cun: 19,zhen: "梅城镇"},
  166. {hjzrs: 0, hjxz: 0, hjbfb: "0.00%", czxz: 0, czzrs: 0, zu: 368, hjjs: 0, czbfb: "4.82%", cun: 14,zhen: "水吼镇"},
  167. {hjzrs: 0, hjxz: 0, hjbfb: "0.00%", czxz: 0, czzrs: 0, zu: 266, hjjs: 0, czbfb: "2.44%", cun: 11,zhen: "塔畈乡"},
  168. {hjzrs: 0, hjxz: 0, hjbfb: "0.00%", czxz: 0, czzrs: 0, zu: 115, hjjs: 0, czbfb: "2.47%", cun: 6,zhen: "天柱山镇"},
  169. {hjzrs: 0, hjxz: 0, hjbfb: "0.00%", czxz: 0, czzrs: 0, zu: 415, hjjs: 0, czbfb: "6.86%", cun: 17,zhen: "王河镇"},
  170. {hjzrs: 0, hjxz: 0, hjbfb: "0.00%", czxz: 0, czzrs: 0, zu: 119, hjjs: 0, czbfb: "1.90%", cun: 6,zhen: "五庙乡"},
  171. {hjzrs: 0, hjxz: 0, hjbfb: "0.00%", czxz: 0, czzrs: 0, zu: 217, hjjs: 0, czbfb: "2.32%", cun: 6,zhen: "油坝乡"},
  172. {hjzrs: 0, hjxz: 0, hjbfb: "0.00%", czxz: 0, czzrs: 0, zu: 522, hjjs: 0, czbfb: "6.19%", cun: 14,zhen: "余井镇"},
  173. {hjzrs: 0, hjxz: 0, hjbfb: "0.00%", czxz: 0, czzrs: 0, zu: 639, hjjs: 0, czbfb: "10.34%", cun: 18,zhen: "源潭镇"},
  174. {hjzrs: 0, hjxz: 0, hjbfb: "0.00%", czxz: 0, czzrs: 0, zu: 102, hjjs: 0, czbfb: "2.72%", cun: 3,zhen: "开发区"}
  175. ], //表格数据
  176. // 总条数
  177. total: 10,
  178. queryParams: {
  179. pageNum: 1,
  180. pageSize: 10
  181. },
  182. // 遮罩层
  183. loading: false,
  184. deviceIpOptions:{},
  185. panelChartDatazhuzh:{},
  186. nhye:false
  187. };
  188. },
  189. computed: {
  190. tagsView: {
  191. get() {
  192. return this.$store.state.settings.tagsView
  193. },
  194. set(val) {
  195. this.$store.dispatch('settings/changeSetting', {
  196. key: 'tagsView',
  197. value: val
  198. })
  199. }
  200. },
  201. },
  202. mounted(){
  203. // this.yuanhaun(1)
  204. // this.tableList()
  205. // 折线
  206. // this.zhexianList()
  207. // 雷达
  208. // this.leidaList()
  209. // 底部圆环
  210. // this.dbyhList()
  211. // 柱状图
  212. // this.zhuzhList()
  213. //户籍列表
  214. // this.lisdtwe()
  215. },
  216. methods: {
  217. handleSetLineChartData(type) {
  218. this.lineChartData = lineChartData[type];
  219. },
  220. // 月 周 天 点击
  221. day(index) {
  222. this.dayList = index;
  223. this.yuanhaun(index)
  224. if (index == 1) {
  225. // 天
  226. this.taye = 'newVisitis';
  227. this.lineChartData = lineChartData[this.taye];
  228. } else if (index == 2) {
  229. // 周
  230. this.taye = 'messages';
  231. this.lineChartData = lineChartData[this.taye];
  232. } else {
  233. // 月
  234. this.taye = 'purchases';
  235. this.lineChartData = lineChartData[this.taye];
  236. }
  237. },
  238. // 多选框选中数据
  239. handleSelectionChange(selection) {
  240. // this.ids = selection.map(item => item.id)
  241. // this.single = selection.length !== 1
  242. // this.multiple = !selection.length
  243. },
  244. // 表格点击事件
  245. tabclick(val){
  246. console.log(val)
  247. this.$router.push({
  248. path:'./school/temperatures',
  249. query:{
  250. val:val,
  251. }
  252. })
  253. },
  254. // 圆环数据
  255. yuanhaun(val){
  256. treeselect(val).then(response => {
  257. this.deviceIpOptions = response.data;
  258. this.panelChartDatas = this.deviceIpOptions
  259. });
  260. },
  261. // 列表数据
  262. tableList(){
  263. listDevice().then(response => {
  264. this.tableData = response.data;
  265. // this.panelChartDatas = this.deviceIpOptions
  266. });
  267. },
  268. // 户籍列表
  269. lisdtwe(){
  270. listTsde().then(response => {
  271. this.deviceIpOptions = response.data;
  272. this.panelChartDatas = this.deviceIpOptions
  273. });
  274. },
  275. // 折线图数据
  276. zhexianList(){
  277. listzhex().then(response => {
  278. this.lineChartData = response.data;
  279. this.nhye = true
  280. // this.panelChartDatas = this.deviceIpOptions
  281. });
  282. },
  283. // 雷达图
  284. leidaList(){
  285. listleida().then(response => {
  286. this.panelChartDataleid = response.data;
  287. // this.panelChartDatas = this.deviceIpOptions
  288. });
  289. },
  290. // 底部圆环数据
  291. dbyhList(){
  292. listdbyh().then(response => {
  293. this.panelChartDatayuanh = response.data;
  294. // this.panelChartDatas = this.deviceIpOptions
  295. });
  296. },
  297. // 柱状图数据
  298. zhuzhList(){
  299. listzhuzh().then(response => {
  300. this.panelChartDatazhuzh = response.data;
  301. // this.panelChartDatas = this.deviceIpOptions
  302. });
  303. },
  304. /** 导出按钮操作 */
  305. handleExport() {
  306. const queryParams = this.queryParams;
  307. this.$confirm('是否确认导出?', "警告", {
  308. confirmButtonText: "确定",
  309. cancelButtonText: "取消",
  310. type: "warning"
  311. }).then(function() {
  312. return exportPost();
  313. }).then(response => {
  314. this.download(response.msg);
  315. })
  316. },
  317. // 五保户点击
  318. wbhde(){
  319. this.$router.push({path: "/business/contraindication"});
  320. // console.log(this.$store.state.tagsView.visitedViews[0])
  321. // console.log( this.$store.state.settings.tagsView,4 )
  322. },
  323. dbhde(){
  324. this.$router.push({path: "/business/vaccinationSite"});
  325. },
  326. pkde(){
  327. this.$router.push({path: "/business/vaccineName"});
  328. },
  329. dyde(){
  330. this.$router.push({path: "/business/keyIndustry"});
  331. },
  332. twjrde(){
  333. this.$router.push({path: "/business/ucleic"});
  334. },
  335. }
  336. };
  337. </script>
  338. <style lang="scss">
  339. .tabsty {
  340. .el-table .el-table__header-wrapper th {
  341. background-color: #EEF5F8;
  342. color: #343434;
  343. border:0 !important;
  344. }
  345. .el-table--striped .el-table__body tr.el-table__row--striped td {
  346. background-color: #f9f9f9;
  347. }
  348. .el-table--group,
  349. .el-table--border {
  350. // border-color: #0CA0FF;
  351. border: 1px solid #0CA0FF;
  352. }
  353. }
  354. </style>
  355. <style lang="scss" scoped>
  356. .header {
  357. display: flex;
  358. text-align: left;
  359. justify-content: flex-end;
  360. margin-bottom: 12px;
  361. p {
  362. font-size: 18px;
  363. font-family: PingFang SC;
  364. font-weight: 700;
  365. color: #666666;
  366. cursor: pointer;
  367. }
  368. p:nth-child(1)::before {
  369. width: 1px;
  370. background-color: #666;
  371. }
  372. .heade_cod {
  373. color: #00a8ec;
  374. }
  375. .el-table--border {
  376. border: 1px solid #0ca0ff !important;
  377. }
  378. }
  379. p {
  380. margin: 0;
  381. }
  382. .njues{
  383. display: flex;
  384. justify-content: space-between;
  385. align-content: center;
  386. }
  387. .hedse_radt {
  388. height: 130px;
  389. padding-top: 4px;
  390. position: relative;
  391. display: flex;
  392. justify-content: space-between;
  393. align-content: center;
  394. width: 19%;
  395. padding-left: 26px;
  396. padding-bottom: 36px;
  397. background:url("../assets/images/opic_rylb_wb.png") no-repeat ;
  398. background-size: 100%, 100%;
  399. .p {
  400. position: absolute;
  401. right: -28px;
  402. width: 1px;
  403. height: 70px;
  404. background-color: #c7cbd7;
  405. top: 22%;
  406. }
  407. .hedse_radtone {
  408. // margin-bottom: 30px;
  409. // padding: 0 26px;
  410. // text-align: left;
  411. width: 100%;
  412. display: flex;
  413. flex-direction: column;
  414. justify-content: center;
  415. p:nth-child(1) {
  416. font-size: 15px;
  417. font-family: PingFang SC;
  418. font-weight: bold;
  419. color: #343434;
  420. text-align: left;
  421. color: #fff;
  422. }
  423. p:nth-child(2) {
  424. font-size: 28px;
  425. font-family: PingFang SC;
  426. font-weight: bold;
  427. color: #fff;
  428. text-align: right;
  429. padding-right: 13px;
  430. // width: 100%;
  431. span{
  432. font-size: 20px !important;
  433. font-weight: 400;
  434. }
  435. }
  436. }
  437. .hedse_radttwo {
  438. display: flex;
  439. // padding: 0 26px;
  440. // justify-content: space-between;
  441. justify-content: space-around;
  442. flex: 1;
  443. div{
  444. display: flex;
  445. flex-direction: column;
  446. justify-content: center;
  447. }
  448. p:nth-child(1) {
  449. font-size: 15px;
  450. font-family: PingFang SC;
  451. font-weight: bold;
  452. color: #343434;
  453. }
  454. p:nth-child(2) {
  455. font-size: 48px;
  456. font-family: PingFang SC;
  457. font-weight: bold;
  458. color: #fff;
  459. }
  460. }
  461. }
  462. .hedse_radts{
  463. background:url("../assets/images/opic_rylb_db.png") no-repeat ;
  464. background-size: 100%, 100%;
  465. }
  466. .hedse_radtss{
  467. background:url("../assets/images/opic_rylb_pk.png") no-repeat ;
  468. background-size: 100%, 100%;
  469. }
  470. .hedse_radtsss{
  471. background:url("../assets/images/opic_rylb_dy.png") no-repeat ;
  472. background-size: 100%, 100%;
  473. }
  474. .hedse_radtssss{
  475. background:url("../assets/images/opic_rylb_tw.png") no-repeat ;
  476. background-size: 100%, 100%;
  477. }
  478. .nav_raet {
  479. // padding-top: 24px;
  480. margin-left: 60px;
  481. p:nth-child(1) {
  482. font-size: 15px;
  483. font-family: PingFang SC;
  484. font-weight: bold;
  485. color: #343434;
  486. }
  487. p:nth-child(2) {
  488. font-size: 20px;
  489. font-family: PingFang SC;
  490. font-weight: bold;
  491. color: #50bd04;
  492. }
  493. }
  494. .dashboard-editor-container {
  495. padding: 32px;
  496. padding-top: 12px;
  497. background-color: rgb(240, 242, 245);
  498. position: relative;
  499. .chart-wrapper {
  500. background: #fff;
  501. padding: 16px 16px 0;
  502. margin-bottom: 32px;
  503. }
  504. }
  505. @media (max-width: 1024px) {
  506. .chart-wrapper {
  507. padding: 8px;
  508. }
  509. }
  510. // 表格央视
  511. .tabsty {
  512. background-color: #fff;
  513. width: 100%;
  514. margin-top: 16px;
  515. padding: 0 30px;
  516. padding-top: 23px;
  517. padding-bottom: 40px;
  518. margin-bottom: 36px;
  519. }
  520. .tabbuut {
  521. display: flex;
  522. justify-content: space-between;
  523. align-items: center;
  524. margin-bottom: 15px;
  525. p:nth-child(1) {
  526. font-size: 16px;
  527. font-family: PingFang SC;
  528. font-weight: bold;
  529. color: #343434;
  530. }
  531. }
  532. .nav_raetone{
  533. // flex: 1;
  534. display: flex ;
  535. // flex-direction: column;
  536. justify-content: space-between;
  537. align-content: center;
  538. // height: 100%;
  539. text-align: right;
  540. // padding-top: 18px;
  541. margin-right: 30px;
  542. box-sizing:border-box;
  543. -moz-box-sizing:border-box; /* Firefox */
  544. -webkit-box-sizing:border-box;
  545. padding-left: 20px;
  546. p:nth-child(1) {
  547. font-size: 15px;
  548. font-family: PingFang SC;
  549. font-weight: bold;
  550. color: #343434;
  551. }
  552. p:nth-child(2) {
  553. font-size: 20px;
  554. font-family: PingFang SC;
  555. font-weight: bold;
  556. color: #50bd04;
  557. }
  558. }
  559. .p {
  560. position: absolute;
  561. right: -18px;
  562. width: 1px;
  563. height: 70px;
  564. background-color: #c7cbd7;
  565. top: 22%;
  566. }
  567. .dp_zhud{
  568. .dp_zhudtitle{
  569. margin-bottom: 10px;
  570. font-size: 16px;
  571. font-family: PingFang SC;
  572. font-weight: bold;
  573. color: #343434;
  574. }
  575. }
  576. </style>