index.vue 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655
  1. <template>
  2. <div style="width:100%;height:100%;position:relative">
  3. <headerdiv ref="headerDiv" :currentindexP = currentindexNew></headerdiv>
  4. <div style="display: inline-flex;width:100%">
  5. <div style="width:25%;height:100%;">
  6. <div>
  7. <div class="publicTitle" style="margin-top:0.5rem">
  8. <img src="../../assets/images/icon.png" style="width:1.8rem;height:1.8rem;margin-top:0.3rem"/>
  9. <div style="font-size:1.6rem;font-family: Adobe Heiti Std;font-weight: normal;color: #DFEEF3;margin-left:0.5rem">官网访问数量</div>
  10. </div>
  11. <!-- <br/> -->
  12. <div style="margin-top:2rem">
  13. <div class="dayCount" style="margin-left:5.5rem;padding-top:1rem;float:left">6002</div>
  14. <div class="wordCount" style="margin-left:6rem;padding-top:1rem;float:left">30</div>
  15. </div>
  16. <div style="margin-top:16rem;margin-left:3.8rem">
  17. <div class="dayClass" style="float:left;">日访问量</div>
  18. <div class="wordClass"style="float:left;margin-left:9.5rem">发文数量</div>
  19. </div>
  20. </div>
  21. <div>
  22. <div class="publicTitle" style="margin-top:2.5rem">
  23. <img src="../../assets/images/icon.png" style="width:1.8rem;height:1.8rem;margin-top:0.3rem"/>
  24. <div style="font-size:1.6rem;font-family: Adobe Heiti Std;font-weight: normal;color: #DFEEF3;margin-left:0.5rem">公众号统计</div>
  25. </div>
  26. </div>
  27. <div id='gzhchart' style="width:45rem;height:25rem"></div>
  28. <div class="publicTitle" style="margin-top:0.5rem">
  29. <img src="../../assets/images/icon.png" style="width:1.8rem;height:1.8rem;margin-top:0.3rem"/>
  30. <div style="font-size:1.6rem;font-family: Adobe Heiti Std;font-weight: normal;color: #DFEEF3;margin-left:0.5rem">重要通知轮播</div>
  31. </div>
  32. <div style="height:25rem;width:100%;margin-top:1rem">
  33. <el-table :data="messageList" stripe
  34. class="my_table"
  35. max-height=300
  36. :row-class-name="tableRowClassName"
  37. :header-cell-style="{background:'#24A3B3 50%',color: '#C5D0D4'}">
  38. <el-table-column type="index" label="序号" width="55" align="center" />
  39. <el-table-column label="内容" align="center" prop="content">
  40. <template slot-scope="scope">
  41. <span style="color:#28A0FF">{{scope.row.content}}</span>
  42. </template>
  43. </el-table-column>
  44. <el-table-column label="内容" align="center" prop="label">
  45. <template slot-scope="scope">
  46. <span style="color:#FFC029">{{scope.row.label}}</span>
  47. </template>
  48. </el-table-column>
  49. </el-table>
  50. </div>
  51. </div>
  52. <div style="width:50%;height:95vh;">
  53. <mapdiv ref="mapdiv" style=""></mapdiv>
  54. </div>
  55. <div style="width:25%;height:100%;">
  56. <div style="width:100%;padding-left:1rem">
  57. <div class="publicTitle" style="margin-top:1.5rem">
  58. <img src="../../assets/images/icon.png" style="width:1.8rem;height:1.8rem;margin-top:0.3rem"/>
  59. <div style="font-size:1.6rem;font-family: Adobe Heiti Std;font-weight: normal;color: #DFEEF3;margin-left:0.5rem">服务评价</div>
  60. </div>
  61. <div id='pieChart' style="width:45rem;height:25rem"></div>
  62. <!-- <div id='lcChart' style="width:45rem;height:25rem"></div> -->
  63. <div class="publicTitle" style="margin-top:1.5rem">
  64. <img src="../../assets/images/icon.png" style="width:1.8rem;height:1.8rem;margin-top:0.3rem"/>
  65. <div style="font-size:1.6rem;font-family: Adobe Heiti Std;font-weight: normal;color: #DFEEF3;margin-left:0.5rem">投诉数量</div>
  66. </div>
  67. <div id='tsChart' style="width:45rem;height:25rem"></div>
  68. <div class="publicTitle" style="margin-top:1.5rem">
  69. <img src="../../assets/images/icon.png" style="width:1.8rem;height:1.8rem;margin-top:0.3rem"/>
  70. <div style="font-size:1.6rem;font-family: Adobe Heiti Std;font-weight: normal;color: #DFEEF3;margin-left:0.5rem">本月统计趋势数据</div>
  71. </div>
  72. <div id='lastChart' style="width:45rem;height:25rem"></div>
  73. </div>
  74. </div>
  75. </div>
  76. <div class="bottombg">
  77. <div class="item item2" @click="changeMapTab(1)"><div class="num">{{staticCount}}</div><div>静态资源</div></div>
  78. <div class="item item1 item2" @click="changeMapTab(2)"><div class="num">{{dynamicCount}}</div><div>动态资源</div></div>
  79. <div class="item item1 " @click="changeMapTab(3)"><div class="num">{{areaCount}}</div><div>重点区域</div></div>
  80. <!-- <div class="item"><div class="num" @click="changeMapTab(4)">16</div><div>实时告警</div></div> -->
  81. </div>
  82. <!-- <videodiv :cameracode="ccode" style="width:700px;height:300px;position:absolute;top:100px;left:100px"></videodiv> -->
  83. </div>
  84. </template>
  85. <script>
  86. import moment from "moment";
  87. import mapdiv from "../../components/map/index.vue"
  88. import headerdiv from '@/components/HeaderDiv/index.vue'
  89. import { httpRequest } from "@/api/data/http";
  90. import { getLineData,getResource,getgovern } from "@/api/qdtl/data";
  91. import videodiv from "../../components/Videoplayer/index.vue"
  92. export default {
  93. name: "big",
  94. data() {
  95. return {
  96. userList:[],
  97. tdxjCount:111,
  98. tdcsCount:152,
  99. currentindexNew:5,
  100. ccode:"32068166001320000235",
  101. videoParams:{
  102. url:'http://2.90.220.252:9017/artemis-web/debug',
  103. params:'{"httpMethod":"POST","path":"/api/resource/v1/cameras","headers":{},"query":{},"parameter":{},"body":{"pageNo": 1,"pageSize": 5000,"treeCode": "0"},"contentType":"application/json;charset=UTF-8","mock":false,"appKey":"27794545","appSecret":"5Xi27Gl7JrbHHF1MpdaB"}'
  104. },
  105. messageList:[
  106. {content:'关于某某站点施工通知',label:'待处理',tag:'家'},
  107. {content:'关于某某站点施工通知',label:'待处理',tag:'家'},
  108. {content:'关于某某站点施工通知',label:'待处理',tag:'公司'},
  109. {content:'关于某某站点施工通知',label:'待处理',tag:'家'},
  110. ],
  111. staticCount:0,
  112. dynamicCount:0,
  113. areaCount:0
  114. };
  115. },
  116. components:{
  117. mapdiv,
  118. headerdiv,
  119. videodiv,
  120. },
  121. mounted() {
  122. this.initchart();
  123. this.getResource();
  124. this.getvideoList();
  125. this.getServicePieChart();
  126. this.getTsChart();
  127. this.getLastChart();
  128. // this.getGovern();
  129. // this.inityjchart();
  130. },
  131. methods:{
  132. getLastChart(){
  133. var myChart = this.$echarts.init(document.getElementById('lastChart'));
  134. var option = {
  135. grid:{
  136. top:"15%",
  137. left:"10%",
  138. right:"7%",
  139. bottom:"10%"
  140. },
  141. xAxis: {
  142. type: 'category',
  143. boundaryGap: false,
  144. data: ['2011', '2012', '2013', '2014', '2015', '2016', '2017','2018','2019'],
  145. axisLabel: {
  146. show: true,
  147. textStyle: {
  148. color: 'white', //x轴data 的颜色
  149. fontSize:12
  150. }
  151. },
  152. axisLine: {
  153. lineStyle: {
  154. color: '#435886'
  155. }
  156. },
  157. splitLine: {
  158. show: true,
  159. lineStyle:{
  160. color: ['#435886'],
  161. width: 1,
  162. type: 'solid'
  163. }
  164. }
  165. },
  166. yAxis: {
  167. type: 'value',
  168. axisLabel: {
  169. show: true,
  170. textStyle: {
  171. color: 'white' //x轴data 的颜色
  172. }
  173. },
  174. axisLine: {
  175. lineStyle: {
  176. color: '#435886'
  177. }
  178. },
  179. splitLine: {
  180. show: true,
  181. lineStyle:{
  182. color: ['#435886'],
  183. width: 1,
  184. type: 'solid'
  185. }
  186. }
  187. },
  188. series: [{
  189. smooth: true,
  190. data: [75, 85, 95, 117, 129, 143, 166,178,195],
  191. type: 'line',
  192. lineStyle:{
  193. color:'#00D98B'
  194. },
  195. label:{
  196. show:true,
  197. color:'white'
  198. },
  199. areaStyle: {color:{
  200. type: 'linear',
  201. x: 0,
  202. y: 0,
  203. x2: 0,
  204. y2: 1,
  205. colorStops: [{
  206. offset: 0, color: '#00D98B' // 0% 处的颜色
  207. }, {
  208. offset: 1, color: '#122a61' // 100% 处的颜色
  209. }],
  210. global: false // 缺省为 false
  211. }},
  212. itemStyle: {
  213. borderColor: "white"
  214. }
  215. }]
  216. };
  217. myChart.setOption(option);
  218. },
  219. getTsChart(){
  220. var myChart = this.$echarts.init(document.getElementById('tsChart'));
  221. var option = {
  222. xAxis: {
  223. data: ['类型一', '类型二', '类型三', '类型四', '类型五', '类型六'],
  224. axisTick: {show: false},
  225. axisLine: {show: false},
  226. axisLabel: {
  227. show: true,
  228. textStyle: {
  229. color: '#ACB6B9' //这里用参数代替了
  230. }
  231. },
  232. },
  233. yAxis: {
  234. name:"条",
  235. nameTextStyle:{
  236. color:"white",
  237. fontSize:16,
  238. //padding: [0, 0, 0, 1050]
  239. },
  240. axisLabel: {
  241. show: true,
  242. textStyle: {
  243. color: '#ACB6B9' //这里用参数代替了
  244. }
  245. },
  246. },
  247. color: new this.$echarts.graphic.LinearGradient(
  248. 0, 0, 0, 1,
  249. [
  250. {offset: 1, color: '#2275E4'}, //柱图渐变色
  251. {offset: 0, color: '#56CCF2'}, //柱图渐变色
  252. ]
  253. ),
  254. series: [{
  255. name: 'hill',
  256. type: 'pictorialBar',
  257. barCategoryGap: '40%',
  258. symbol: 'triangle',
  259. itemStyle: {
  260. normal: {
  261. opacity: 0.5
  262. },
  263. emphasis: {
  264. opacity: 1
  265. }
  266. },
  267. data: [123, 60, 125, 128, 122, 122],
  268. z: 10
  269. }, {
  270. name: 'glyph',
  271. type: 'pictorialBar',
  272. barGap: '-100%',
  273. symbolPosition: 'end',
  274. symbolSize: 50,
  275. symbolOffset: [0, '-120%'],
  276. }]
  277. };
  278. myChart.setOption(option);
  279. },
  280. getServicePieChart(){
  281. var myChart = this.$echarts.init(document.getElementById('pieChart'));
  282. var option = {
  283. series: [
  284. {
  285. name: 'Access From',
  286. type: 'pie',
  287. radius: ['60%', '70%'],
  288. avoidLabelOverlap: false,
  289. itemStyle: {
  290. borderRadius: 10,
  291. borderColor: '#fff',
  292. borderWidth: 2
  293. },
  294. label: {
  295. normal: {
  296. show: true,
  297. formatter: '{b} ({d}%)'
  298. }
  299. },
  300. emphasis: {
  301. label: {
  302. show: true,
  303. fontSize: '20',
  304. fontWeight: 'bold'
  305. }
  306. },
  307. data: [
  308. { value: 1048, name: '不满意',itemStyle: { color: '#FFC012' }, },
  309. { value: 735, name: '非常满意',itemStyle: { color: '#00FF30' }, },
  310. { value: 580, name: '满意',itemStyle: { color: '#37DE9E' }, },
  311. { value: 484, name: '基本满意',itemStyle: { color: '#31C1FA' }, },
  312. ]
  313. }
  314. ]
  315. };
  316. myChart.setOption(option);
  317. },
  318. filterTag(value, row) {
  319. return row.status === value;
  320. },
  321. tableRowClassName({ row, rowIndex }) {
  322. if ((rowIndex + 1) % 2 === 0) {
  323. return "warning-row";
  324. } else {
  325. return "success-row";
  326. }
  327. },
  328. changeMapTab(index){
  329. this.$refs.mapdiv.iconSelect = index
  330. },
  331. getGovern(){
  332. getgovern().then(data =>{
  333. console.log(data);
  334. this.userList = data.data.checkStatic;
  335. console.log(this.userList);
  336. this.tdxjCount = data.data.xunTotalDistance;
  337. this.tdcsCount = data.data.checkPointLogNum;
  338. })
  339. },
  340. initchart(){
  341. var myChart = this.$echarts.init(document.getElementById('gzhchart'));
  342. var option = {
  343. // color: ['#3BFFE8', '#3DB7FF','#EEA500','#ACB6B9','#ACB6B9','#ACB6B9'],
  344. tooltip: {
  345. trigger: 'axis',
  346. axisPointer: {
  347. type: 'shadow'
  348. }
  349. },
  350. grid: {
  351. left: '3%',
  352. right: '4%',
  353. top: '5%',
  354. bottom:'3%',
  355. containLabel: true
  356. },
  357. xAxis: {
  358. type: 'value',
  359. boundaryGap: [0, 0.01],
  360. axisLabel: {
  361. show: true,
  362. textStyle: {
  363. color: '#ACB6B9' //这里用参数代替了
  364. }
  365. },
  366. },
  367. yAxis: {
  368. type: 'category',
  369. data: ['订阅量', '当日发文', '阅读量', '点赞量', '在看量', '转发量'],
  370. axisLabel: {
  371. show: true,
  372. textStyle: {
  373. color: '#ACB6B9' //这里用参数代替了
  374. }
  375. },
  376. },
  377. series: [
  378. {
  379. name: '数量',
  380. type: 'bar',
  381. barWidth:10,
  382. data: [10, 9, 8, 7, 5, 6],
  383. itemStyle: {
  384. normal: {
  385. color: ['#3BFFE8', '#3DB7FF','#EEA500','#ACB6B9','#ACB6B9','#ACB6B9'],
  386. }
  387. }
  388. },
  389. ]
  390. };
  391. myChart.setOption(option);
  392. },
  393. inityjchart(){
  394. var myChart = this.$echarts.init(document.getElementById('zdyjchart'));
  395. var option = {
  396. series: [
  397. {
  398. name: 'Nightingale Chart',
  399. type: 'pie',
  400. radius: [20, 100],
  401. center: ['50%', '50%'],
  402. roseType: 'area',
  403. itemStyle: {
  404. borderRadius: 8
  405. },
  406. label: {
  407. normal: {
  408. show: true,
  409. formatter: '{b} ({d}%)'
  410. }
  411. },
  412. data: [
  413. { value: 40, name: '汇龙镇', itemStyle: { color: '#38CAFB' }, },
  414. { value: 38, name: '海复镇', itemStyle: { color: '#4CAFF9' }, },
  415. { value: 32, name: '王鲍镇', itemStyle: { color: '#4ADDC9' }, },
  416. { value: 30, name: '北新镇', itemStyle: { color: '#2AA4EA' }, },
  417. { value: 28, name: '吕四镇', itemStyle: { color: '#0965D2' }, },
  418. { value: 26, name: '其它' , itemStyle: { color: '#1C3F83' },},
  419. { value: 22, name: '南阳镇' , itemStyle: { color: '#488CF7' },},
  420. ]
  421. }
  422. ]
  423. };
  424. myChart.setOption(option);
  425. },
  426. getResource(){
  427. getResource({date:'2022-03-12'}).then(response =>{
  428. var trainArry = [];
  429. var bridgeArry = [];
  430. var railArry = [];
  431. var stationLocation = [];
  432. var areaList = [];
  433. for(var index in response.data.staticLocation){
  434. var obj = response.data.staticLocation[index]
  435. obj.fence = obj.lnglat
  436. obj.name = obj.locationName
  437. stationLocation.push(obj)
  438. }
  439. for(var index in response.data.area){
  440. var obj = response.data.area[index]
  441. if(obj.areaType == '1'){
  442. areaList.push(obj);
  443. }else if(obj.areaType == '2'){
  444. obj.name = obj.areaName
  445. trainArry.push(obj);
  446. }else if(obj.areaType == '3'){
  447. obj.name = obj.areaName
  448. bridgeArry.push(obj);
  449. }else if(obj.areaType == '4'){
  450. obj.name = obj.areaName
  451. railArry.push(obj);
  452. }
  453. }
  454. for(var index in areaList){
  455. var json = JSON.parse(areaList[index].fence)
  456. this.$refs.mapdiv.addPolygon(json);
  457. }
  458. for(var key in response.data.deviceTrail){
  459. var jsonStr = '['
  460. for(var index in response.data.deviceTrail[key]){
  461. var obj = response.data.deviceTrail[key][index]
  462. if(index == response.data.deviceTrail[key].length - 1){
  463. var location = '['+obj.fence.split(',')[0]+','+obj.fence.split(',')[1]+']'
  464. }else{
  465. var location = '['+obj.fence.split(',')[0]+','+obj.fence.split(',')[1]+'],'
  466. }
  467. jsonStr += location
  468. // deviceArry.push(obj.fence.split(','));
  469. }
  470. jsonStr += ']'
  471. var json = JSON.parse(jsonStr);
  472. this.$refs.mapdiv.addPoints(response.data.deviceTrail[key],'device.png',0.6,'device');
  473. this.$refs.mapdiv.addline(json,'device');
  474. }
  475. this.$refs.mapdiv.addPoints(trainArry,'train.png',0.6,'train');
  476. this.$refs.mapdiv.addPoints(bridgeArry,'bridge.png',0.6,'bridge');
  477. this.$refs.mapdiv.addPoints(railArry,'rail.png',0.6,'rail');
  478. this.$refs.mapdiv.addPoints(stationLocation,'location.png',0.6,'location');
  479. this.areaCount += response.data.area.length
  480. this.staticCount += response.data.drone.length + stationLocation.length;
  481. // this.dynamicCount += response.data.deviceTrail.length
  482. this.dynamicCount += Object.getOwnPropertyNames(response.data.deviceTrail).length
  483. })
  484. },
  485. getvideoList(){
  486. httpRequest(this.videoParams).then(data =>{
  487. var json = JSON.parse(data.data);
  488. this.staticCount += json.data.list.length
  489. this.$refs.mapdiv.addPoints(json.data.list,'video.png',0.6,'video');
  490. });
  491. }
  492. }
  493. };
  494. </script>
  495. <style rel="stylesheet/scss" lang="scss">
  496. .publicTitle{
  497. background: url("~@/assets/images/title@2x.png") no-repeat;
  498. background-size: 100% 100%;
  499. width:95%;
  500. height:3.9rem;
  501. padding-left:1.5rem;
  502. padding-top:0.7rem;
  503. display: inline-flex;
  504. }
  505. .dayCount{
  506. background: url("~@/assets/images/public/dayCount.png") no-repeat;
  507. background-size: 100% 100%;
  508. width:14.6rem;
  509. height:11.3rem;
  510. margin-left:3.5rem;
  511. margin-top:1rem;
  512. // display: inline-flex;
  513. font-size: 2.8rem;
  514. font-family: Myriad Pro;
  515. font-weight: bold;
  516. color: #1AFF62;
  517. text-align: center
  518. // display: inline-flex;
  519. }
  520. .wordCount{
  521. background: url("~@/assets/images/public/wordCount.png") no-repeat;
  522. background-size: 100% 100%;
  523. width:14.6rem;
  524. height:11.3rem;
  525. margin-left:1.5rem;
  526. margin-top:1rem;
  527. // display: inline-flex;
  528. font-size: 2.8rem;
  529. font-family: Myriad Pro;
  530. font-weight: bold;
  531. color: #1AFCFF;
  532. text-align: center
  533. }
  534. .dayClass{
  535. background: url("~@/assets/images/public/dayClass@2x.png") no-repeat;
  536. background-size: 100% 100%;
  537. width:10.8rem;
  538. height:3.2rem;
  539. margin-left:3.5rem;
  540. margin-top:1rem;
  541. font-size: 14px;
  542. font-family: Adobe Heiti Std;
  543. font-weight: normal;
  544. color: #DFEEF3;
  545. line-height: 3.2rem;
  546. text-align: center
  547. }
  548. .wordClass{
  549. background: url("~@/assets/images/public/wordClass@2x.png") no-repeat;
  550. background-size: 100% 100%;
  551. width:10.8rem;
  552. height:3.2rem;
  553. margin-left:3.5rem;
  554. margin-top:1rem;
  555. font-size: 14px;
  556. font-family: Adobe Heiti Std;
  557. font-weight: normal;
  558. color: #DFEEF3;
  559. line-height: 3.2rem;
  560. text-align: center
  561. }
  562. .bgcontent{
  563. background: url("~@/assets/images/safe/bg@2x.png") no-repeat;
  564. background-size: 100% 100%;
  565. width:6.9rem;
  566. height:6.9rem;
  567. margin-left:1.5rem;
  568. margin-top:1rem;
  569. display: inline-flex;
  570. }
  571. .pieChart{
  572. background: url("~@/assets/images/safe/piechart.png") no-repeat;
  573. background-size: 100% 100%;
  574. width:38.8rem;
  575. height:17.5rem;
  576. margin-left:4rem;
  577. margin-top:1rem;
  578. display: inline-flex;
  579. }
  580. .countClass{
  581. font-size: 2.4rem;
  582. font-family: AlibabaSans;
  583. font-weight: 500;
  584. color: #30FDFF;
  585. }
  586. .deptClass{
  587. font-size: 1.4rem;
  588. font-family: Adobe Heiti Std;
  589. font-weight: normal;
  590. color: #BAC3C4;
  591. }
  592. .tdgove2{
  593. background: url("~@/assets/images/goverce/态势2@2x.png") no-repeat;
  594. background-size: 100% 100%;
  595. width:37.2rem;
  596. height:9.9rem;
  597. margin-left:3.5rem;
  598. display: inline-flex;
  599. // display: inline-flex;
  600. }
  601. .fontClass{
  602. font-size: 1.5rem;
  603. font-family: Microsoft YaHei;
  604. font-weight: 400;
  605. color: #FFFFFF;
  606. line-height: 2.6rem;
  607. }
  608. .EngClass{
  609. font-size: 1.2rem;
  610. font-family: AlibabaSans;
  611. font-weight: 400;
  612. color: #B7D0FA;
  613. line-height: 1.1rem;
  614. opacity: 0.4;
  615. }
  616. .countClass2{
  617. font-size: 1.5rem;
  618. font-family: Microsoft YaHei;
  619. font-weight: 400;
  620. color: #FFFFFF;
  621. line-height: 2.6rem;
  622. }
  623. </style>