two-level.js 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902
  1. import Vue from 'vue';
  2. import Component from 'vue-class-component';
  3. import { swiper, swiperSlide } from 'vue-awesome-swiper';
  4. import * as echartsGl from 'echarts';
  5. import '../../../../public/map/js/china';
  6. import echarts from '@/common/components/echarts.vue';
  7. import ProgressBar from '@/common/components/progress.vue';
  8. import openImg from '@/common/components/openImg.vue';
  9. import iframes from '@/common/components/iframe.vue';
  10. import dailyEcharts from '@/apps/twolevel/components/dailyEcharts.vue';
  11. import todoEcharts from '@/apps/twolevel/components/todoEcharts.vue';
  12. import api from '../api';
  13. import 'swiper/dist/css/swiper.css';
  14. @Component({
  15. components: {
  16. ProgressBar,
  17. echarts,
  18. openImg,
  19. iframes,
  20. swiper,
  21. swiperSlide,
  22. dailyEcharts,
  23. todoEcharts,
  24. },
  25. })
  26. export default class BannerIndex extends Vue {
  27. photoVisible = false;
  28. bigImgUrl = '';
  29. iframeVisible = false;
  30. iframeSrc = 'http://master.eegrid.com/AccountLogin.aspx?AccessToken=f410b994c4bc158bbb3860845d6ffbe3&account=ykdxm';
  31. iframeVisible2 = false;
  32. iframeSrc2 = 'http://xmyn3g.6655.la:27006/api/Topology/ZTPreview/Preview?id=350114596096315392';
  33. week = '';
  34. day = '';
  35. time = '';
  36. info = {};
  37. userId = 0;
  38. token = '';
  39. orgId = 0;
  40. flag = false;
  41. cityId = 0;
  42. orgModelLoading = false;
  43. echartOrgModel = {
  44. grid: {
  45. show: false,
  46. top: '5%',
  47. right: 0,
  48. left: 0,
  49. bottom: '5%',
  50. },
  51. color: ['#69C8F6', '#67AEF3', '#79DCCB', '#56ABF1', '#57ADF4', '#253F7B', '#598CEF'],
  52. tooltip: {
  53. trigger: 'item',
  54. formatter: '{b}: {c} ({d}%)',
  55. },
  56. series: [
  57. ],
  58. };
  59. swiperList = [];
  60. // 轮播参数
  61. swiperOptions = {
  62. autoplay: true,
  63. speed: 1000,
  64. }
  65. // 地图参数
  66. mapSelParam = null; // 选中的参数
  67. markPointData = {}; // 标记点参数
  68. getEchartsOptions = {
  69. tooltip: { // 提示框组件。
  70. show: true,
  71. trigger: 'item', // 触发类型 散点图
  72. enterable: true, // 鼠标是否可进入提示框
  73. showContent: true, // 是否显示提示框浮层
  74. triggerOn: 'click', // 提示框触发的条件(mousemove|click|none)
  75. transitionDuration: 1, // 提示框移动动画过渡时间
  76. alwaysShowContent: true,
  77. // eslint-disable-next-line consistent-return
  78. formatter(params) {
  79. if (params.data.id > 0) {
  80. // const str = `<div class="conut-next" id="btn-tooltip" οnclick="Jgclick('${params.id}')">${params.name}</div>`;
  81. // const str = `<a href="/threelevel/${params.data.id}" class="conut-next" style="text-decoration: none !important;
  82. // color: #fff !important;">${params.name}</a>`;
  83. const str = `<text class="conut-next" style="color: #fff !important;">${params.name}</text>`;
  84. return str;
  85. }
  86. },
  87. backgroundColor: 'rgba(30, 54, 124,1)',
  88. borderWidth: '1px',
  89. borderRadius: '5',
  90. borderColor: 'rgba(30, 159, 255,0.5)',
  91. textStyle: {
  92. color: 'rgba(255,255,255,1)',
  93. },
  94. padding: [2, 5],
  95. },
  96. title: {
  97. // text: this.echart.title,
  98. textStyle: {
  99. color: '#FFF',
  100. fontSize: 20,
  101. },
  102. top: 0,
  103. left: 0,
  104. right: 0,
  105. bottom: 0,
  106. },
  107. // 主要用来控制图表四周留白
  108. grid: {
  109. left: 0,
  110. top: 0,
  111. right: 0,
  112. bottom: 0,
  113. },
  114. geo: {
  115. // 引入中国地图
  116. map: 'china',
  117. // 是否可以缩放,拖拽
  118. roam: false,
  119. // zoom: 0,
  120. // 地名配置项
  121. label: {
  122. // 默认情况下配置项
  123. normal: {
  124. show: true,
  125. textStyle: {
  126. color: '#CCC',
  127. },
  128. },
  129. // 选中高亮情况下配置项
  130. emphasis: {
  131. show: true,
  132. textStyle: {
  133. color: '#fff',
  134. },
  135. },
  136. },
  137. // 各省样式
  138. itemStyle: {
  139. normal: {
  140. areaColor: '#053b93',
  141. borderColor: '#73c3fc',
  142. borderWidth: 1,
  143. },
  144. emphasis: {
  145. areaColor: '#053b93',
  146. borderColor: '#73c3fc',
  147. },
  148. },
  149. // scaleLimit: {
  150. // min: 0.7,
  151. // max: 10,
  152. // },
  153. },
  154. select: { // 地图选中区域样式
  155. label: { // 选中区域的label(文字)样式
  156. color: '#fff',
  157. },
  158. itemStyle: { // 选中区域的默认样式
  159. areaColor: '#053b93',
  160. },
  161. },
  162. // 系列配置
  163. series: [{
  164. name: '',
  165. type: 'map',
  166. // 【此参数必须配置,否则visualMap不起作用】
  167. // geoIndex: 0,
  168. // 此处可接收后端参数,当前数据仅为测试
  169. // clickable: false,
  170. data: [
  171. // {
  172. // name: '济南市',
  173. // selected: true,
  174. // value: 1000,
  175. // },
  176. ],
  177. }],
  178. // animationType: 'scale',
  179. // animationEasing: 'elasticOut',
  180. // animationDelay: 2000,
  181. }
  182. orgList = [];
  183. todayTodoInfo = {};
  184. bjinfo = {}
  185. bxinfo = {}
  186. ysinfo = {}
  187. yhinfo = {}
  188. feedbackLoading = false;
  189. echartFeedback = {
  190. tooltip: {
  191. trigger: 'axis',
  192. axisPointer: {
  193. type: 'shadow',
  194. },
  195. },
  196. legend: {
  197. textStyle: {
  198. color: '#627A9D',
  199. fontSize: 10,
  200. },
  201. },
  202. grid: {
  203. top: '15%',
  204. left: '8%',
  205. right: '4%',
  206. bottom: '12%',
  207. },
  208. color: ['#4D70E5', '#F99650'],
  209. xAxis: [
  210. {
  211. type: 'category',
  212. data: [],
  213. axisLabel: {
  214. textStyle: {
  215. color: '#fff',
  216. },
  217. formatter: '{value}',
  218. },
  219. splitLine: {
  220. show: false, // 去掉网格线
  221. },
  222. splitArea: {
  223. show: false,
  224. },
  225. nameTextStyle: {
  226. color: '#fff',
  227. },
  228. },
  229. ],
  230. yAxis: [
  231. {
  232. type: 'value',
  233. axisLabel: {
  234. textStyle: {
  235. color: '#fff',
  236. },
  237. },
  238. nameTextStyle: {
  239. color: '#fff',
  240. },
  241. splitLine: {
  242. show: false, // 去掉网格线
  243. },
  244. splitArea: {
  245. show: false,
  246. },
  247. },
  248. ],
  249. series: [
  250. ],
  251. };
  252. projectCount = {};
  253. quarterScore1 = null;
  254. quarterScore2 = null;
  255. quarterScore3 = null;
  256. quarterScore4 = null;
  257. quarterScore5 = null;
  258. quarterScoreOne = null;
  259. quarterScoreTwo = null;
  260. quarterScoreThree = null;
  261. quarterScoreFour = null;
  262. quarterScoreFive = null;
  263. nlxhLoading = false;
  264. nlxhConfig = {
  265. data: [],
  266. showValue: true,
  267. columnColor: 'rgba(84,121,251,0.5)',
  268. }
  269. patrolImg = [];
  270. patrolLoading = false;
  271. echartPatrol = {
  272. tooltip: {
  273. trigger: 'axis',
  274. axisPointer: {
  275. type: 'cross',
  276. label: {
  277. backgroundColor: '#6a7985',
  278. },
  279. },
  280. },
  281. color: ['#40E1F4', '#8340F4', '#208AF7', '#E9179C'],
  282. legend: {
  283. // data: ['巡更', '巡检', '巡视', '巡查'],
  284. textStyle: {
  285. color: '#ffffff',
  286. },
  287. },
  288. toolbox: {
  289. // feature: {
  290. // saveAsImage: {}
  291. // }
  292. },
  293. grid: {
  294. // left: '3%',
  295. // right: '4%',
  296. bottom: '3%',
  297. containLabel: true,
  298. },
  299. xAxis: [
  300. {
  301. type: 'category',
  302. boundaryGap: false,
  303. data: [],
  304. axisLabel: {
  305. show: true,
  306. textStyle: {
  307. color: '#ffffff', // 这里用参数代替了
  308. },
  309. },
  310. },
  311. ],
  312. yAxis: [
  313. {
  314. type: 'value',
  315. name: '数量',
  316. splitLine: {
  317. show: false,
  318. },
  319. // 去掉背景的网格线
  320. axisLabel: {
  321. show: true,
  322. textStyle: {
  323. color: '#ffffff', // 这里用参数代替了
  324. },
  325. },
  326. axisLine: {
  327. lineStyle: {
  328. color: '#FFFFFF',
  329. width: 1, // 这里是为了突出显示加上的
  330. },
  331. },
  332. },
  333. ],
  334. series: [
  335. ],
  336. }
  337. weather = {};
  338. jgId = 0;
  339. title = {};
  340. isWebp = false;
  341. csreens1 = []
  342. csreens2 = []
  343. csreens3 = []
  344. csreens4 = []
  345. mateCount = {}
  346. created() {
  347. // this.userId = this.$cookies.get('userId');
  348. // this.token = this.$cookies.get('token');
  349. this.isWebp = this.$isSupportWebp;
  350. this.jgId = this.$route.params.id;
  351. // if (!this.userId || !this.token) {
  352. // this.$router.push({ path: '/login' });
  353. // }
  354. this.getTodayTodoInfo();
  355. this.getTodayTodoType();
  356. this.getModuleList();
  357. this.getCommentComplainList();
  358. this.getProjectCount();
  359. this.getCityList();
  360. // this.getQuarterScore();
  361. // this.getQuarterScore2();
  362. this.getFcompanyList();
  363. this.getnlxhList();
  364. this.getpatrolImg();
  365. this.getpatrolRecordList();
  366. this.getTodayWeather();
  367. this.getTitle();
  368. this.getOrgs();
  369. this.getMateTypeCount();
  370. // this.initalECharts();
  371. this.realSysTime();
  372. setInterval(() => {
  373. this.realSysTime();
  374. }, 1000);
  375. setInterval(() => {
  376. this.getpatrolImg();
  377. }, 1000 * 20);
  378. setInterval(() => {
  379. this.getTodayTodoInfo();
  380. this.getTodayTodoType();
  381. this.getModuleList();
  382. this.getCommentComplainList();
  383. this.getProjectCount();
  384. this.getCityList();
  385. // this.getQuarterScore();
  386. // this.getQuarterScore2();
  387. this.getFcompanyList();
  388. this.getnlxhList();
  389. this.getpatrolRecordList();
  390. }, 1000 * 60 * 5);
  391. }
  392. updateData() {
  393. }
  394. goThree(id) {
  395. if (id) {
  396. // this.$router.push({ name: 'threelevel', params: { orgId: id } });
  397. // window.location.href = `https://mdyg.sdmingde.cn/h5/screen/project?org_id=${id}`;
  398. // window.location.href = `http://mingde.com/h5/screen/project?org_id=${id}`;
  399. const url = `${process.env.VUE_APP_PHP_URL}/h5/screen/project?org_id=${id}`;
  400. window.open(url);
  401. }
  402. }
  403. backPage() {
  404. this.$router.back();
  405. }
  406. getOrgs() {
  407. api.getOrgs({ id: this.jgId }).then((res) => {
  408. this.csreens1 = res.data.lists1;
  409. this.csreens2 = res.data.lists2;
  410. this.csreens3 = res.data.lists3;
  411. this.csreens4 = res.data.lists4;
  412. }).catch(() => { });
  413. }
  414. getTitle() {
  415. api.getTitle({ id: this.jgId }).then((res) => {
  416. this.title = res.data;
  417. }).catch(() => { });
  418. }
  419. getTodayWeather() {
  420. api.getTodayWeather({ id: this.jgId }).then((res) => {
  421. this.weather = res.data;
  422. }).catch(() => { });
  423. }
  424. getTodayTodoInfo() {
  425. api.getTodayTodoInfo({ id: this.jgId }).then((res) => {
  426. this.todayTodoInfo = res.data;
  427. }).catch(() => { });
  428. }
  429. getTodayTodoType() {
  430. api.getTodayTodoType({ id: this.jgId }).then((res) => {
  431. this.bjinfo = res.data.bj;
  432. this.bxinfo = res.data.bx;
  433. this.ysinfo = res.data.ys;
  434. this.yhinfo = res.data.yh;
  435. }).catch(() => { });
  436. }
  437. getModuleList() {
  438. api.getModuleList({ id: this.jgId }).then((res) => {
  439. const series = [
  440. {
  441. type: 'pie',
  442. radius: ['15%', '50%'],
  443. label: {
  444. color: '#627A9D',
  445. normal: {
  446. textStyle: {
  447. color: '#627A9D',
  448. fontSize: 12,
  449. },
  450. },
  451. },
  452. data: res.data,
  453. },
  454. ];
  455. this.echartOrgModel.series = series;
  456. this.orgModelLoading = false;
  457. }).catch(() => { });
  458. this.orgModelLoading = false;
  459. }
  460. getCommentComplainList() {
  461. api.getCommentComplainList({ id: this.jgId }).then((res) => {
  462. this.feedbackLoading = true;
  463. this.echartFeedback.xAxis[0].data = res.data.title;
  464. const series = [
  465. {
  466. name: '评价总分',
  467. type: 'line',
  468. data: res.data.list1,
  469. areaStyle: {
  470. color: {
  471. // 线性渐变
  472. type: 'linear',
  473. colorStops: [{
  474. offset: 0.1, color: 'rgba(77,112,229, 0.2)', // 0% 处的颜色
  475. }, {
  476. offset: 0.6, color: 'rgba(77,112,229,0.2)', // 100% 处的颜色
  477. }],
  478. global: false, // 缺省为 false
  479. },
  480. },
  481. },
  482. {
  483. name: '投诉订单',
  484. type: 'line',
  485. data: res.data.list2,
  486. areaStyle: {
  487. color: {
  488. // 线性渐变
  489. type: 'linear',
  490. colorStops: [{
  491. offset: 0.1, color: 'rgba(249,150,80, 0.2)', // 0% 处的颜色
  492. }, {
  493. offset: 0.6, color: 'rgba(249,150,80,0.2)', // 100% 处的颜色
  494. }],
  495. global: false, // 缺省为 false
  496. },
  497. },
  498. },
  499. ];
  500. this.echartFeedback.series = series;
  501. this.feedbackLoading = false;
  502. }).catch(() => { });
  503. this.feedbackLoading = false;
  504. }
  505. getProjectCount() {
  506. api.getProjectCount({ id: this.jgId }).then((res) => {
  507. this.projectCount = res.data;
  508. }).catch(() => { });
  509. }
  510. getCityList() {
  511. api.getCityList({ id: this.jgId }).then((res) => {
  512. this.orgList = res.data.list;
  513. const lists = res.data.list;
  514. if (lists.length > 0) {
  515. const nl = [];
  516. lists.forEach((item) => {
  517. if (item.lat !== '' && item.lng !== '') {
  518. const aa = {
  519. id: item.id,
  520. name: item.name,
  521. coord: [item.lng, item.lat],
  522. symbol: `image://${item.img}`,
  523. symbolSize: 28,
  524. };
  525. nl.push(aa);
  526. }
  527. });
  528. this.markPointData = nl;
  529. }
  530. this.cityId = res.data.cityId;
  531. if (this.cityId > 0) {
  532. this.initalECharts();
  533. }
  534. }).catch(() => { });
  535. }
  536. getQuarterScore() {
  537. api.getQuarterScore({ id: this.jgId }).then((res) => {
  538. this.quarterScore1 = res.data.top1;
  539. this.quarterScore2 = res.data.top2;
  540. this.quarterScore3 = res.data.top3;
  541. this.quarterScore4 = res.data.top4;
  542. this.quarterScore5 = res.data.top5;
  543. }).catch(() => { });
  544. }
  545. getQuarterScore2() {
  546. api.getQuarterScore2({ id: this.jgId }).then((res) => {
  547. this.quarterScoreOne = res.data.top1;
  548. this.quarterScoreTwo = res.data.top2;
  549. this.quarterScoreThree = res.data.top3;
  550. this.quarterScoreFour = res.data.top4;
  551. this.quarterScoreFive = res.data.top5;
  552. }).catch(() => { });
  553. }
  554. getFcompanyList() {
  555. api.getFcompanyList({ id: this.jgId }).then((res) => {
  556. this.swiperList = res.data;
  557. }).catch(() => { });
  558. }
  559. getnlxhList() {
  560. api.getDeviceTaskList({ id: this.jgId }).then((res) => {
  561. this.nlxhLoading = true;
  562. this.nlxhConfig.xAxis[0].data = res.data.x;
  563. const series = [
  564. {
  565. name: '维保计划',
  566. type: 'bar',
  567. barWidth: 10,
  568. emphasis: {
  569. focus: 'series',
  570. },
  571. data: res.data.y,
  572. },
  573. {
  574. name: '计划延期',
  575. type: 'line',
  576. emphasis: {
  577. focus: 'series',
  578. },
  579. data: res.data.y1,
  580. },
  581. ];
  582. this.nlxhConfig.series = series;
  583. this.nlxhLoading = false;
  584. }).catch(() => {
  585. this.nlxhLoading = false;
  586. });
  587. }
  588. getpatrolImg() {
  589. api.getpatrolImg({ id: this.jgId }).then((res) => {
  590. this.patrolImg = res.data;
  591. }).catch(() => { });
  592. }
  593. getpatrolRecordList() {
  594. api.getpatrolRecordList({ id: this.jgId }).then((res) => {
  595. this.patrolLoading = true;
  596. this.echartPatrol.xAxis[0].data = res.data.date;
  597. const series = [
  598. {
  599. name: '巡更',
  600. type: 'line',
  601. data: res.data.count1,
  602. areaStyle: {
  603. color: {
  604. // 线性渐变
  605. type: 'linear',
  606. colorStops: [{
  607. offset: 0.1, color: 'rgba(64,225,244, 0.2)', // 0% 处的颜色
  608. }, {
  609. offset: 0.6, color: 'rgba(64,225,244,0.2)', // 100% 处的颜色
  610. }],
  611. global: false, // 缺省为 false
  612. },
  613. },
  614. },
  615. {
  616. name: '巡视',
  617. type: 'line',
  618. data: res.data.count2,
  619. areaStyle: {
  620. color: {
  621. // 线性渐变
  622. type: 'linear',
  623. colorStops: [{
  624. offset: 0.1, color: 'rgba(32,138,247, 0.2)', // 0% 处的颜色
  625. }, {
  626. offset: 0.6, color: 'rgba(32,138,247,0.2)', // 100% 处的颜色
  627. }],
  628. global: false, // 缺省为 false
  629. },
  630. },
  631. },
  632. {
  633. name: '巡查',
  634. type: 'line',
  635. data: res.data.count3,
  636. areaStyle: {
  637. color: {
  638. // 线性渐变
  639. type: 'linear',
  640. colorStops: [{
  641. offset: 0.1, color: 'rgba(233,23,156, 0.2)', // 0% 处的颜色
  642. }, {
  643. offset: 0.6, color: 'rgba(233,23,156,0.2)', // 100% 处的颜色
  644. }],
  645. global: false, // 缺省为 false
  646. },
  647. },
  648. },
  649. {
  650. name: '巡检',
  651. type: 'line',
  652. data: res.data.count4,
  653. areaStyle: {
  654. color: {
  655. // 线性渐变
  656. type: 'linear',
  657. colorStops: [{
  658. offset: 0.1, color: 'rgba(131,64,244, 0.2)', // 0% 处的颜色
  659. }, {
  660. offset: 0.6, color: 'rgba(131,64,244,0.2)', // 100% 处的颜色
  661. }],
  662. global: false, // 缺省为 false
  663. },
  664. },
  665. },
  666. ];
  667. this.echartPatrol.series = series;
  668. this.patrolLoading = false;
  669. }).catch(() => {
  670. this.patrolLoading = false;
  671. });
  672. }
  673. Jgclick(id) {
  674. // if (type === 1) {
  675. // this.$router.push({ name: 'threelevel2', params: { orgId: id } });
  676. // } else {
  677. // this.$router.push({ name: 'threelevel', params: { orgId: id } });
  678. // }
  679. // window.location.href = `https://mdyg.sdmingde.cn/h5/screen/project?org_id=${id}`;
  680. const url = `${process.env.VUE_APP_PHP_URL}/h5/screen/project?org_id=${id}`;
  681. window.open(url);
  682. // window.location.href = `http://mingde.com/h5/screen/project?org_id=${id}`;
  683. }
  684. initalECharts() {
  685. // 初始化echarts
  686. const echartApp = echartsGl.init(this.$refs.Map);
  687. const series = [
  688. {
  689. // name: '节点分布',
  690. type: 'map',
  691. geoIndex: 0,
  692. markPoint: { // 图表标注。
  693. label: {
  694. normal: {
  695. show: true,
  696. },
  697. emphasis: {
  698. show: true,
  699. },
  700. },
  701. itemStyle: {
  702. normal: {
  703. color: 'rgba(72,150,128,1)',
  704. },
  705. },
  706. data: this.markPointData,
  707. },
  708. },
  709. ];
  710. this.getEchartsOptions.series = series;
  711. // 设置配置项
  712. echartApp.setOption(this.getEchartsOptions);
  713. // 解决事件冒泡(点击触发两次事件)的问题
  714. echartApp.off('click');
  715. // echartApp.on('click', (params) => {
  716. // console.log(params, 'xxxxxxxxxxxxxxxxxxxxxxx');
  717. // // 判断点击对象为当前 标记点
  718. // // if (params.componentType === '"markPoint"') {
  719. // // this.getEchartsOptions.tooltip.show = true;
  720. // // echartApp.setOption(this.getEchartsOptions);
  721. // // } else {
  722. // // this.getEchartsOptions.tooltip.show = false;
  723. // // echartApp.setOption(this.getEchartsOptions);
  724. // // }
  725. // });
  726. }
  727. realSysTime() {
  728. const now = new Date();
  729. const year = now.getFullYear(); // 获取年份
  730. let month = now.getMonth(); // 获取月份
  731. let date = now.getDate(); // 获取日期
  732. const day = now.getDay(); // 获取星期
  733. let hour = now.getHours(); // 获取小时
  734. let minute = now.getMinutes(); // 获取分钟
  735. let seconds = now.getSeconds(); // 获取秒
  736. month += 1;
  737. const arrWeek = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'];
  738. this.week = arrWeek[day];
  739. if (month < 10) {
  740. month = `0${month}`;
  741. }
  742. if (date < 10) {
  743. date = `0${date}`;
  744. }
  745. if (hour < 10) {
  746. hour = `0${hour}`;
  747. }
  748. if (minute < 10) {
  749. minute = `0${minute}`;
  750. }
  751. if (seconds < 10) {
  752. seconds = `0${seconds}`;
  753. }
  754. this.day = `${year}.${month}.${date}`;
  755. this.time = `${hour}:${minute}:${seconds}`;
  756. }
  757. showBigImage(e) { // 点击图片函数,点击后,把photoVisible设置成true
  758. if (e) {
  759. this.photoVisible = true;
  760. this.bigImgUrl = e.currentTarget.src;
  761. }
  762. }
  763. openIframe() {
  764. this.iframeVisible = true;
  765. }
  766. openIframe2() {
  767. this.iframeVisible2 = true;
  768. }
  769. getMateTypeCount() {
  770. api.getMateTypeCount({ id: this.jgId }).then((res) => {
  771. this.mateCount = res.data;
  772. }).catch(() => { });
  773. }
  774. }