indicatorDataQuery.vue 38 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414
  1. <template>
  2. <view class="indicatorDataQuery">
  3. <!-- 下拉菜单 -->
  4. <view class="selectCondition">
  5. <u-dropdown ref="uDropdown" @open="open" @close="close">
  6. <!-- 指标 -->
  7. <u-dropdown-item :title="dropdown.indicator.title">
  8. <view class="slot-content">
  9. <view style="height:1000upx;position: relative;">
  10. <scroll-view scroll-y="true" class="left">
  11. <view v-for="(fItem, fIndex) in dropdown.indicator.searchList" :key="fItem+fIndex"
  12. class="row" :class="[fIndex===dropdown.indicator.showCategoryIndex ?'on':'']"
  13. @tap="dropdown.indicator.showCategoryIndex = fIndex">
  14. <view class="text">
  15. {{ $i18n.locale == 'zh' ? fItem['indexName'] : fItem['indexEnName'] }}
  16. </view>
  17. </view>
  18. </scroll-view>
  19. <block v-for="(fItem, fIndex) in dropdown.indicator.searchList" :key="fItem+fIndex+'1'">
  20. <scroll-view scroll-y class="right"
  21. v-if="fIndex === dropdown.indicator.showCategoryIndex">
  22. <view v-for="(item,index) in fItem['child']" :key="'c'+index"
  23. :class="(item['child']&&item['child'].length>0)?'':'cate'">
  24. <view v-if="item['child'] && item['child'].length>0">
  25. <view :class="{'getCategory':item['child'].length>0}">
  26. {{ $i18n.locale == 'zh' ? item['indexName'] : item['indexEnName'] }}
  27. </view>
  28. <view class="threemenu">
  29. <view v-for="(i,j) in item['child']" :key="j" class="cateText"
  30. @click="getCategory1({item:i,index:j})"
  31. :class="{'cateTextActive':i.ifClick}">
  32. {{ $i18n.locale == 'zh' ? i['indexName'] : i['indexEnName'] }}
  33. </view>
  34. </view>
  35. </view>
  36. <view v-else>
  37. <view class="cateText" @click="getCategory1({item,index})"
  38. :class="{'cateTextActive':item.ifClick}">
  39. {{ $i18n.locale == 'zh' ? item['indexName'] : item['indexEnName'] }}
  40. </view>
  41. </view>
  42. </view>
  43. </scroll-view>
  44. </block>
  45. </view>
  46. </view>
  47. </u-dropdown-item>
  48. <!-- 世界 -->
  49. <u-dropdown-item :title="dropdown.world.title">
  50. <view class="slot-content">
  51. <view
  52. style="height:80upx;position: relative;background-color: #fff;padding: 10upx;box-sizing: border-box;">
  53. <u-button type="primary" @click="empty" class="contry-btn" style="float: right;">{{
  54. $i18n.locale == 'zh' ? '清空' : 'Clear'
  55. }}
  56. </u-button>
  57. <u-button type="primary" @click="submit" class="contry-btn"
  58. style="float: right;margin-right: 40upx;">{{
  59. i18n('submit')
  60. }}
  61. </u-button>
  62. </view>
  63. <view style="height:920upx;position: relative;">
  64. <scroll-view scroll-y="true" class="left">
  65. <view v-for="(fItem, fIndex) in dropdown.world.countryList" :key="fItem+fIndex"
  66. class="row" :class="[fIndex===dropdown.world.showCategoryIndex ?'on':'']"
  67. @tap="dropdown.world.showCategoryIndex = fIndex">
  68. <view class="text">
  69. {{ $i18n.locale == 'zh' ? fItem['label'] : fItem['label'] }}
  70. </view>
  71. </view>
  72. </scroll-view>
  73. <block v-for="(fItem, fIndex) in dropdown.world.countryList" :key="fItem+fIndex+'1'">
  74. <scroll-view scroll-y class="right" v-if="fIndex === dropdown.world.showCategoryIndex">
  75. <!-- 已选 -->
  76. <view v-for="(item,index) in countryFilter(fItem['children'],true)"
  77. :key="'c1'+index"
  78. :class="(item['children']&&item['children'].length>0)?'':'cate'">
  79. <view>
  80. <view class="cateText"
  81. @click="getCategory2({item:item,index:index,ifClick:false})"
  82. :class="{'cateTextActive':item.ifClick}">
  83. {{ $i18n.locale == 'zh' ? item['label'] : item['label'] }}
  84. </view>
  85. </view>
  86. </view>
  87. <hr style="border: 1upx solid #bbb;" />
  88. <!-- 大洲 -->
  89. <view class="cate">
  90. <view>
  91. <view class="cateText"
  92. @click="getCategory2({item:fItem,index:null,ifClick:!fItem.ifClick})"
  93. :class="{'cateTextActive':fItem.ifClick}">
  94. {{ fItem['label'] }}
  95. </view>
  96. </view>
  97. </view>
  98. <hr style="border: 1upx solid #bbb;" />
  99. <!-- 未选 -->
  100. <view v-for="(item,index) in countryFilter(fItem['children'],false)"
  101. :key="'c2'+index"
  102. :class="(item['children']&&item['children'].length>0)?'':'cate'">
  103. <view>
  104. <view class="cateText"
  105. @click="getCategory2({item:item,index:index,ifClick:true})"
  106. :class="{'cateTextActive':item.ifClick}">
  107. {{ $i18n.locale == 'zh' ? item['label'] : item['label'] }}
  108. </view>
  109. </view>
  110. </view>
  111. </scroll-view>
  112. </block>
  113. </view>
  114. </view>
  115. </u-dropdown-item>
  116. <!-- 时间 -->
  117. <u-dropdown-item :title="dropdown.time.title">
  118. <view class="slot-content">
  119. <!-- 时间选择 -->
  120. <view style="height:1000upx;position:absolute;bottom: 0;">
  121. <yearSelector :show="dropdown.time.showDateFlag" :defaultTimeValue="[2013,2020]"
  122. @getTimeValue="getTimeValue" @cancel="timeCancel"></yearSelector>
  123. </view>
  124. </view>
  125. </u-dropdown-item>
  126. </u-dropdown>
  127. </view>
  128. <!-- 内容 -->
  129. <view style="height: calc(100% - 80upx);background: #fff;">
  130. <!-- 图表 -->
  131. <view class="chart-columns">
  132. <!-- 按钮区 -->
  133. <view class="chart-bg-white chart-title-bar chart-common-mt">
  134. <!-- 标题 -->
  135. <view class="chart-title-dot-light">{{ charts.chartsTitle }}</view>
  136. <!-- 切换线/柱图 -->
  137. <view class="changeChart">
  138. <text :class="canvasType===1?'uCharts2':'uCharts1'"
  139. @click="canvasTypeChange(1)">{{ i18n('ColumnChart') }}</text>
  140. <text :class="canvasType===2?'uCharts2':'uCharts1'"
  141. @click="canvasTypeChange(2)">{{ i18n('LineChart') }}</text>
  142. <view class="export" :class="[loading?'loading':'']">
  143. <u-loading v-if="loading"></u-loading>
  144. <easy-select v-else ref="easySelect" size="medium"
  145. :value="$i18n.locale == 'zh' ? '导出' : 'Export'" :options="exportDocument"
  146. @selectOne="selectExportType"></easy-select>
  147. </view>
  148. </view>
  149. </view>
  150. <!-- 图表 -->
  151. <view class="chart-charts">
  152. <canvas v-if="canvasType===1" canvas-id="canvasColumn1" id="canvasColumn1" class="charts"
  153. @touchstart="touchColumn1" @touchmove="moveColumn1" @touchend="touchEndColumn1"></canvas>
  154. <canvas v-else-if="canvasType===2" canvas-id="canvasLine1" id="canvasLine1" class="charts"
  155. @touchstart="touchLine1" @touchmove="moveLine1" @touchend="touchEndLine1"></canvas>
  156. </view>
  157. <view style="height: 36upx;margin: 0 0 20upx 0;">
  158. <p class="dataSourcep">
  159. <span style="margin-left: 50upx">{{ $t('common.Datasources') }}</span>:{{ submitSource }}
  160. </p>
  161. </view>
  162. <!-- 重置按钮 -->
  163. <view class="reset">
  164. <u-button type="primary" @click="Reset">{{ i18n('Reset') }}</u-button>
  165. </view>
  166. </view>
  167. <!-- 相关指标 -->
  168. <RelevantIndicators :dataList="correlationList" @showRelevant="showRelevant"></RelevantIndicators>
  169. </view>
  170. <u-toast ref="uToast" />
  171. </view>
  172. </template>
  173. <script>
  174. import uCharts from '@/static/js/u-charts.js';
  175. import easySelect from '@/components/easy-select/easy-select';
  176. import yearSelector from "./yearSelector";
  177. import RelevantIndicators from "./RelevantIndicators";
  178. let _self;
  179. let canvasColumnIns = null;
  180. let canvasLineIns = null;
  181. export default {
  182. name: "indicatorDataQuery",
  183. components: {
  184. yearSelector,
  185. easySelect,
  186. RelevantIndicators
  187. },
  188. props: {
  189. searchItem: {
  190. type: Object,
  191. default: {}
  192. },
  193. },
  194. data() {
  195. return {
  196. loading: false,
  197. cWidth: '',
  198. cHeight: '',
  199. /**
  200. * 下拉菜单
  201. */
  202. dropdown: {
  203. indicator: {
  204. title: this.$i18n.locale == 'zh' ? '人均GDP' : 'GDP per capita',
  205. searchSelect: {},
  206. searchList: [],
  207. showCategoryIndex: 0,
  208. },
  209. world: {
  210. title: this.$i18n.locale == 'zh' ? '中国' : 'CHINA',
  211. countryId: ['F57CE016EB194C9C84AC11E79000F1E2'],
  212. countryName: this.$i18n.locale == 'zh' ? ['中国'] : ['CHINA'],
  213. countryList: [{
  214. label: this.$i18n.locale == 'zh' ? '亚洲' : 'ASIA',
  215. labelEn: 'ASIA',
  216. children: [],
  217. },
  218. {
  219. label: this.$i18n.locale == 'zh' ? '非洲' : 'AFRICA',
  220. labelEn: 'AFRICA',
  221. children: [],
  222. },
  223. {
  224. label: this.$i18n.locale == 'zh' ? '欧洲' : 'EUROPE',
  225. labelEn: 'EUROPE',
  226. children: [],
  227. },
  228. {
  229. label: this.$i18n.locale == 'zh' ? '北美洲' : 'NORTH AMERICA',
  230. labelEn: 'NORTH AMERICA',
  231. children: [],
  232. },
  233. {
  234. label: this.$i18n.locale == 'zh' ? '南美洲' : 'SOUTH AMERICA',
  235. labelEn: 'SOUTH AMERICA',
  236. children: [],
  237. },
  238. {
  239. label: this.$i18n.locale == 'zh' ? '大洋洲' : 'OCEANIA',
  240. labelEn: 'OCEANIA',
  241. children: [],
  242. },
  243. ],
  244. originalCountryData: [],
  245. showCategoryIndex: 0,
  246. temp: {
  247. country: [],
  248. countryId: [],
  249. countryName: []
  250. }
  251. },
  252. time: {
  253. title: this.$i18n.locale == 'zh' ? '时间' : 'Time',
  254. showDateFlag: true,
  255. time: ['2013', '2014', '2015', '2016', '2017', '2018', '2019', '2020'],
  256. timeScope: [],
  257. isHighlight: false
  258. },
  259. },
  260. /**
  261. * 图表
  262. */
  263. canvasType: 1,
  264. pixelRatio: 1,
  265. charts: {
  266. chartsTitle: null, // 头部展示的单位
  267. activeTitle: null, // 选择的类型
  268. activeType: {
  269. indexName: '人均GDP',
  270. indexEnName: 'GDP per capita',
  271. source: {
  272. "世界银行": {
  273. "index": {
  274. "人均GDP": "28"
  275. }
  276. }
  277. }
  278. },
  279. },
  280. submitSource: this.$i18n.locale == 'zh' ? '世界银行' : 'World Bank',
  281. exportDocument: [{
  282. value: 'EXCEL',
  283. label: 'Excel'
  284. }, {
  285. value: 'PDF',
  286. label: 'PDF'
  287. }, ],
  288. /**
  289. * 相关指标
  290. */
  291. correlationList: [{
  292. icon: require('@/static/img/infomationdata/e1.png'),
  293. "label": this.$i18n.locale == 'zh' ? '人均GDP' : 'GDP per capita',
  294. "item": {
  295. "indexName": "人均GDP",
  296. "indexEnName": "GDP per capita",
  297. "source": '{"世界银行":{"index":{"人均GDP":"28"}}}'
  298. }
  299. }],
  300. correlationIconList: [{
  301. icon: require('@/static/img/infomationdata/shehuijingji/jingji.png'),
  302. label: '基础经济'
  303. },
  304. {
  305. icon: require('@/static/img/infomationdata/shehuijingji/maoyi.png'),
  306. label: '贸易'
  307. },
  308. {
  309. icon: require('@/static/img/infomationdata/shehuijingji/renkou.png'),
  310. label: '人口'
  311. },
  312. {
  313. icon: require('@/static/img/infomationdata/shehuijingji/guotu.png'),
  314. label: '国土'
  315. },
  316. {
  317. icon: require('@/static/img/infomationdata/nengyuan/shengcheng.png'),
  318. label: '能源生产'
  319. },
  320. {
  321. icon: require('@/static/img/infomationdata/nengyuan/xiaofei.png'),
  322. label: '能源消费'
  323. },
  324. {
  325. icon: require('@/static/img/infomationdata/nengyuan/zhuanhua.png'),
  326. label: '能源转化'
  327. },
  328. {
  329. icon: require('@/static/img/infomationdata/dianli/fadianzhuangzhi.png'),
  330. label: '发电装机'
  331. },
  332. {
  333. icon: require('@/static/img/infomationdata/dianli/fadian.png'),
  334. label: '发电'
  335. },
  336. {
  337. icon: require('@/static/img/infomationdata/dianli/yongdian.png'),
  338. label: '用电'
  339. },
  340. {
  341. icon: require('@/static/img/infomationdata/qihou/huanjing.png'),
  342. label: '排放量'
  343. },
  344. // 临时添加
  345. // {
  346. // icon: require('@/static/img/infomationdata/dianli/yongdian.png'),
  347. // label: '总储备'
  348. // },
  349. // {
  350. // icon: require('@/static/img/infomationdata/dianli/yongdian.png'),
  351. // label: '广义货币增长'
  352. // },
  353. // {
  354. // icon: require('@/static/img/infomationdata/dianli/yongdian.png'),
  355. // label: '贷款利率'
  356. // },
  357. // {
  358. // icon: require('@/static/img/infomationdata/dianli/yongdian.png'),
  359. // label: '存款利率'
  360. // },
  361. // {
  362. // icon: require('@/static/img/infomationdata/dianli/yongdian.png'),
  363. // label: '实际利率'
  364. // },
  365. // {
  366. // icon: require('@/static/img/infomationdata/dianli/yongdian.png'),
  367. // label: '征信信息胜读'
  368. // },
  369. // {
  370. // icon: require('@/static/img/infomationdata/dianli/yongdian.png'),
  371. // label: '官'
  372. // },
  373. ],
  374. exportId: [],
  375. exportPoll: ''
  376. }
  377. },
  378. computed: {
  379. countryNameObject() {
  380. let country = [];
  381. this.dropdown.world.countryId.forEach(item => {
  382. country.push(this.dropdown.world.originalCountryData.filter(it => it.COUNTRY_ID == item)[0])
  383. })
  384. return country
  385. // let country = this.dropdown.world.originalCountryData.filter(item=>{return this.dropdown.world.countryId.includes(item)?item:})
  386. }
  387. },
  388. watch: {
  389. exportId(n, o) {
  390. let _this = this;
  391. if (_this.exportId.length > 0) {
  392. } else {
  393. this.loading = false
  394. }
  395. clearInterval(this.exportPoll)
  396. this.exportPoll = setInterval(() => {
  397. _this.exportId.forEach(item => {
  398. _this.getTime(item)
  399. })
  400. }, 2000)
  401. },
  402. searchItem(n, o) {
  403. let nodeId = n.item.nodeId.split('_')
  404. let item = this.dropdown.indicator.searchList
  405. let index = ''
  406. nodeId.forEach(it => {
  407. item = item[Number(it)]
  408. if (item.child && item.child.length && item.child.length !== 0) {
  409. item = item.child
  410. }
  411. index = Number(it)
  412. })
  413. this.getCategory1({
  414. item,
  415. index
  416. })
  417. }
  418. },
  419. created() {
  420. this.init()
  421. },
  422. async mounted() {
  423. _self = this;
  424. this.cWidth = uni.upx2px(750);
  425. this.cHeight = uni.upx2px(500);
  426. await this.getInitialCategory({
  427. "Source": {
  428. "世界银行": {
  429. "index": {
  430. "人均GDP": "28"
  431. }
  432. }
  433. },
  434. "country": ["F57CE016EB194C9C84AC11E79000F1E2"],
  435. "time": this.dropdown.time.time,
  436. "language": this.$i18n.locale,
  437. });
  438. },
  439. methods: {
  440. async init() {
  441. await this.getServerData()
  442. await this.getCountryList()
  443. },
  444. i18n(data) {
  445. return this.$t('common.' + data);
  446. },
  447. isJsonString(str) {
  448. try {
  449. if (typeof JSON.parse(str) == "object") {
  450. return true;
  451. }
  452. } catch (e) {}
  453. return false;
  454. },
  455. /**
  456. * 下拉菜单
  457. */
  458. open(index) {
  459. if (this.dropdown.world.temp.countryId.length != 0) {
  460. this.dropdown.world.countryId = JSON.parse(JSON.stringify(this.dropdown.world.temp.countryId))
  461. this.dropdown.world.countryName = JSON.parse(JSON.stringify(this.dropdown.world.temp.countryName))
  462. }
  463. this.dropdown.world.temp.country.forEach(item => {
  464. item.ifClick = !item.ifClick
  465. })
  466. this.dropdown.world.temp = {
  467. country: [],
  468. countryId: [],
  469. countryName: []
  470. }
  471. this.$forceUpdate()
  472. },
  473. close(index) {
  474. },
  475. // 类别
  476. async getServerData() {
  477. const res = await this.$myRequest({
  478. url: '/op/geiIntegratedDataMenus/getMenu',
  479. data: {}
  480. });
  481. this.dropdown.indicator.searchList = res.data;
  482. this.setIcon(this.dropdown.indicator.searchList)
  483. this.dropdown.indicator.showCategoryIndex = 0
  484. this.dropdown.indicator.searchSelect = res.data[0].child[0].child[2]
  485. this.dropdown.indicator.searchSelect.ifClick = true;
  486. },
  487. setIcon(data) {
  488. data.forEach(item => {
  489. this.correlationIconList.forEach(icon => {
  490. if (item.indexName == icon.label) {
  491. item.icon = icon.icon;
  492. }
  493. })
  494. if (item.child && item.child.length != 0) {
  495. this.setIcon(item.child)
  496. }
  497. })
  498. },
  499. // 国家/地区
  500. async getCountryList() {
  501. this.dropdown.world.originalCountryData = this.$i18n.locale === 'zh' ?
  502. await this.$api.json('originalCountryDataZH') :
  503. await this.$api.json('originalCountryDataEN');
  504. this.dropdown.world.countryList.forEach(originalItem => {
  505. this.dropdown.world.originalCountryData.forEach((item, j) => {
  506. if (item.COUNTRY_EN_NAME === originalItem.labelEn) {
  507. originalItem.COUNTRY_ID = item.COUNTRY_ID;
  508. originalItem.COUNTRY_CN_NAME = item.COUNTRY_CN_NAME;
  509. originalItem.COUNTRY_EN_NAME = item.COUNTRY_EN_NAME;
  510. originalItem.ifClick = false;
  511. }
  512. if (item.CONTINENT_EN_NAME === originalItem.labelEn) {
  513. item.value = item.COUNTRY_ID;
  514. item.label = this.$i18n.locale == 'zh' ? item.COUNTRY_CN_NAME : item
  515. .COUNTRY_EN_NAME;
  516. item.ifClick = false;
  517. originalItem.children.push(item);
  518. }
  519. if (item.COUNTRY_ID == this.dropdown.world.countryId[0]) {
  520. item.ifClick = true;
  521. }
  522. })
  523. })
  524. },
  525. countryFilter(array, flag) {
  526. return array.filter(item => item.ifClick === flag)
  527. },
  528. // 日历选择
  529. getTimeValue(e) {
  530. let arr = []
  531. for (let i = e[0]; i <= e[1]; i++) {
  532. arr.push(`${i}`)
  533. }
  534. this.dropdown.time.timeScope = e
  535. this.dropdown.time.time = arr
  536. this.dropdown.time.title = `${e[0]}-${e[1]}`
  537. this.$refs.uDropdown.close()
  538. this.getCategory();
  539. },
  540. timeCancel(e) {
  541. if (e) {
  542. this.$refs.uToast.show({
  543. title: this.$i18n.locale == 'zh' ? '请正确选择时间,时间段为7年内' :
  544. 'Please select the right time period within 7 years',
  545. type: 'error',
  546. });
  547. }
  548. this.$refs.uDropdown.close()
  549. },
  550. /**
  551. * 图表
  552. */
  553. canvasTypeChange(num) {
  554. this.canvasType = num;
  555. this.getCategory();
  556. },
  557. touchColumn(e) {
  558. canvasColumnIns.showToolTip(e, {
  559. format: function(item, category) {
  560. if (typeof item.data === 'object') {
  561. return category + '\n' + item.name + ':' + item.data.value
  562. let country = item.name.split(' ')
  563. this.textList = [{
  564. text: category
  565. }];
  566. country.forEach(it => {
  567. this.textList.push({
  568. text: it
  569. })
  570. })
  571. this.textList.push({
  572. text: item.data.value
  573. })
  574. } else {
  575. return category + '\n' + item.name + ':' + item.data
  576. let country = item.name.split(' ')
  577. this.textList = [{
  578. text: category
  579. }];
  580. country.forEach(it => {
  581. this.textList.push({
  582. text: it
  583. })
  584. })
  585. this.textList.push({
  586. text: item.data
  587. })
  588. }
  589. }
  590. });
  591. },
  592. touchLine(e) {
  593. canvasLineIns.showToolTip(e, {
  594. format: function(item, category) {
  595. return item.data
  596. }
  597. })
  598. },
  599. // 启用图表拖拽
  600. touchColumn1(e) {
  601. canvasColumnIns.scrollStart(e);
  602. },
  603. moveColumn1(e) {
  604. canvasColumnIns.scroll(e);
  605. },
  606. touchEndColumn1(e) {
  607. canvasColumnIns.scrollEnd(e);
  608. //下面是toolTip事件,如果滚动后不需要显示,可不填写
  609. canvasColumnIns.showToolTip(e, {
  610. format: function(item, category) {
  611. return category + ' ' + item.name + ':' + item.data
  612. }
  613. });
  614. },
  615. touchLine1(e) {
  616. canvasLineIns.scrollStart(e);
  617. },
  618. moveLine1(e) {
  619. canvasLineIns.scroll(e);
  620. },
  621. touchEndLine1(e) {
  622. canvasLineIns.scrollEnd(e);
  623. //下面是toolTip事件,如果滚动后不需要显示,可不填写
  624. canvasLineIns.showToolTip(e, {
  625. format: function(item, category) {
  626. return category + ' ' + item.name + ':' + item.data
  627. }
  628. });
  629. },
  630. async getInitialCategory(params) {
  631. const res = await this.$myRequest({
  632. url: '/op/geiIntegratedDataMenus/getChartData',
  633. data: {
  634. ...params
  635. },
  636. method: 'post',
  637. type: 'payload'
  638. });
  639. if (res.data) {
  640. this.canvas(res.data);
  641. }
  642. this.getCorrelationList()
  643. this.$forceUpdate()
  644. },
  645. canvas(data) {
  646. this.charts.chartsTitle = data[0].unitY; // 头部展示的单位
  647. this.charts.activeTitle = this.$i18n.locale === 'zh' ? this.charts.activeType.indexName : this.charts
  648. .activeType.indexEnName; //选择的类型
  649. let series = [];
  650. let seriesItem = {};
  651. data.forEach((item, index) => {
  652. seriesItem = {
  653. "name": this.dropdown.world.countryName[index],
  654. "data": item.y
  655. }
  656. series.push(seriesItem);
  657. })
  658. let Column = {
  659. "categories": data[0].x,
  660. "series": series
  661. };
  662. if (this.canvasType == 1) {
  663. this.showColumn('canvasColumn1', Column);
  664. } else {
  665. this.showLine("canvasLine1", Column);
  666. }
  667. },
  668. showColumn(canvasId, chartData) {
  669. canvasColumnIns = new uCharts({
  670. $this: _self,
  671. canvasId: canvasId,
  672. type: 'column',
  673. legend: {
  674. show: true
  675. },
  676. enableScroll: true, //开启图表拖拽功能
  677. fontSize: 11,
  678. background: '#FFFFFF',
  679. pixelRatio: _self.pixelRatio,
  680. animation: true,
  681. categories: chartData.categories,
  682. series: chartData.series,
  683. xAxis: {
  684. disableGrid: true,
  685. itemCount: 4, //x轴单屏显示数据的数量,默认为5个
  686. scrollShow: true, //新增是否显示滚动条,默认false
  687. scrollAlign: 'left', //滚动条初始位置
  688. scrollBackgroundColor: '#F7F7FF', //默认为 #EFEBEF
  689. scrollColor: '#DEE7F7', //默认为 #A6A6A6
  690. },
  691. yAxis: {},
  692. dataLabel: false,
  693. width: _self.cWidth * _self.pixelRatio,
  694. height: _self.cHeight * _self.pixelRatio,
  695. extra: {
  696. column: {
  697. type: 'group',
  698. width: _self.cWidth * _self.pixelRatio * 0.45 / chartData.categories.length
  699. }
  700. }
  701. })
  702. },
  703. showLine(canvasId, chartData) {
  704. canvasLineIns = new uCharts({
  705. $this: _self,
  706. canvasId: canvasId,
  707. type: 'line',
  708. fontSize: 11,
  709. enableScroll: true, //开启图表拖拽功能
  710. legend: {
  711. show: true
  712. },
  713. dataLabel: false,
  714. dataPointShape: true,
  715. background: '#FFFFFF',
  716. pixelRatio: _self.pixelRatio,
  717. categories: chartData.categories,
  718. series: chartData.series,
  719. animation: true,
  720. xAxis: {
  721. type: 'grid',
  722. gridColor: '#CCCCCC',
  723. gridType: 'dash',
  724. dashLength: 8,
  725. itemCount: 4, //x轴单屏显示数据的数量,默认为5个
  726. scrollShow: true, //新增是否显示滚动条,默认false
  727. scrollAlign: 'left', //滚动条初始位置
  728. scrollBackgroundColor: '#F7F7FF', //默认为 #EFEBEF
  729. scrollColor: '#DEE7F7', //默认为 #A6A6A6
  730. },
  731. yAxis: {
  732. gridType: 'dash',
  733. gridColor: '#CCCCCC',
  734. dashLength: 8,
  735. splitNumber: 5,
  736. min: 10,
  737. max: 180,
  738. },
  739. width: _self.cWidth * _self.pixelRatio,
  740. height: _self.cHeight * _self.pixelRatio,
  741. extra: {
  742. line: {
  743. type: 'straight'
  744. }
  745. }
  746. });
  747. },
  748. // 点击事件
  749. getCategory() {
  750. // 数据优先级
  751. let item = this.dropdown.indicator.searchSelect
  752. this.getSubmitSource(item)
  753. let source = this.charts.activeType.source;
  754. if (this.isJsonString(this.charts.activeType.source)) {
  755. source = JSON.parse(this.charts.activeType.source)
  756. }
  757. let params = {
  758. "Source": source,
  759. "country": this.dropdown.world.countryId,
  760. "time": this.dropdown.time.time,
  761. "language": this.$i18n.locale
  762. }
  763. this.getInitialCategory(params);
  764. this.$refs.uDropdown.close()
  765. },
  766. getCategory1({
  767. item,
  768. index,
  769. ifClick
  770. }) {
  771. this.dropdown.indicator.searchSelect.ifClick = false
  772. this.dropdown.indicator.searchSelect = item
  773. this.dropdown.indicator.title = this.$i18n.locale == 'zh' ? item.indexName : item.indexEnName
  774. item.ifClick = true
  775. this.$forceUpdate()
  776. this.charts.activeType = {
  777. indexName: item.indexName,
  778. indexEnName: item.indexEnName,
  779. source: item.source
  780. };
  781. this.getCategory()
  782. },
  783. getCategory2({
  784. item,
  785. index,
  786. ifClick
  787. }) {
  788. let lan;
  789. if (this.$i18n.locale == 'zh') {
  790. lan = item.COUNTRY_CN_NAME
  791. } else {
  792. lan = item.COUNTRY_EN_NAME
  793. }
  794. if (ifClick) {
  795. let arr1 = this.dropdown.world.originalCountryData.filter(it => it.CONTINENT_EN_NAME && it.ifClick)
  796. let arr2 = this.dropdown.world.countryList.filter(it => it.ifClick)
  797. if (arr1.length == 0 && arr2.length == 0) {
  798. this.dropdown.world.countryId = []
  799. this.dropdown.world.countryName = []
  800. }
  801. if (this.dropdown.world.countryId.length >= 5) {
  802. this.$refs.uToast.show({
  803. title: this.$i18n.locale == 'zh' ? '请不要选择超过5个' : 'Please do not choose more than 5',
  804. type: 'error',
  805. });
  806. return
  807. }
  808. item.ifClick = ifClick
  809. this.dropdown.world.countryId.push(item.COUNTRY_ID)
  810. this.dropdown.world.countryName.push(lan)
  811. } else {
  812. item.ifClick = ifClick
  813. this.dropdown.world.countryId = this.dropdown.world.countryId.filter(it => it != item.COUNTRY_ID)
  814. this.dropdown.world.countryName = this.dropdown.world.countryName.filter(it => it != item.lan)
  815. if (this.dropdown.world.countryId.length == 0) {
  816. this.dropdown.world.countryId = ['F57CE016EB194C9C84AC11E79000F1E2']
  817. this.dropdown.world.countryName = this.$i18n.locale == 'zh' ? ['中国'] : ['CHINA']
  818. }
  819. }
  820. if (this.dropdown.world.temp.countryId.length == 0) {
  821. this.dropdown.world.temp.countryId = JSON.parse(JSON.stringify(this.dropdown.world.countryId))
  822. this.dropdown.world.temp.countryName = JSON.parse(JSON.stringify(this.dropdown.world.countryName))
  823. }
  824. this.dropdown.world.temp.country.push(item)
  825. this.$forceUpdate()
  826. },
  827. empty() {
  828. if (this.dropdown.world.temp.countryId.length == 0) {
  829. this.dropdown.world.temp.countryId = JSON.parse(JSON.stringify(this.dropdown.world.countryId))
  830. this.dropdown.world.temp.countryName = JSON.parse(JSON.stringify(this.dropdown.world.countryName))
  831. }
  832. this.dropdown.world.countryList.forEach(item => {
  833. if (item.ifClick) {
  834. this.dropdown.world.temp.country.push(item)
  835. }
  836. item.ifClick = false;
  837. item.children.forEach(it => {
  838. if (it.ifClick) {
  839. this.dropdown.world.temp.country.push(it)
  840. }
  841. it.ifClick = false
  842. })
  843. })
  844. this.dropdown.world.countryId = ['F57CE016EB194C9C84AC11E79000F1E2']
  845. this.dropdown.world.countryName = this.$i18n.locale == 'zh' ? ['中国'] : ['CHINA']
  846. this.$forceUpdate();
  847. },
  848. submit() {
  849. this.dropdown.world.temp = {
  850. country: [],
  851. countryId: [],
  852. countryName: []
  853. }
  854. if (this.$i18n.locale == 'zh') {
  855. if (this.dropdown.world.countryName.length > 1) {
  856. this.dropdown.world.title = `${this.dropdown.world.countryName[0]}...`
  857. } else {
  858. this.dropdown.world.title = `${this.dropdown.world.countryName[0]}`
  859. }
  860. } else {
  861. if (this.dropdown.world.countryName.length > 1) {
  862. this.dropdown.world.title = `${this.dropdown.world.countryName[0]}...`
  863. } else {
  864. this.dropdown.world.title = `${this.dropdown.world.countryName[0]}`
  865. }
  866. }
  867. _self.getCategory()
  868. },
  869. // 导出
  870. async selectExportType(data) {
  871. let _this = this
  872. this.loading = true
  873. let source = this.charts.activeType.source;
  874. if (this.isJsonString(this.charts.activeType.source)) {
  875. source = JSON.parse(this.charts.activeType.source)
  876. }
  877. let id = this.randomString(18)
  878. try {
  879. const resId = await this.$myRequest({
  880. url: '/op/geiIntegratedDataMenus/getRandomId',
  881. method: 'get',
  882. data: {
  883. uuid: id
  884. },
  885. });
  886. let params = {
  887. "Source": [source],
  888. "country": _this.countryNameObject.map(item => item.COUNTRY_CN_NAME),
  889. "time": [this.dropdown.time.time[0], this.dropdown.time.time[this.dropdown.time.time
  890. .length - 1]],
  891. "language": this.$i18n.locale,
  892. "type": {
  893. "rule": this.canvasType == 1 ? 'CIRCLE' : 'LINE'
  894. }
  895. }
  896. const res = await this.$myRequest({
  897. url: '/op/geiIntegratedDataMenus/saveFile',
  898. data: {
  899. ...params
  900. },
  901. method: 'post',
  902. });
  903. if (res) {
  904. this.exportId.push({
  905. type: data,
  906. id: id
  907. })
  908. }
  909. } catch (e) {
  910. this.loading = false
  911. let eg = _this.$i18n.locale == 'zh' ? '失败请重新下载' : 'Please download again if failed'
  912. uni.showToast({
  913. icon: 'none',
  914. mask: true,
  915. title: eg,
  916. });
  917. }
  918. },
  919. async getTime(id) {
  920. let _this = this
  921. const res = await this.$myRequest({
  922. url: '/op/geiIntegratedDataMenus/getTime',
  923. method: 'get',
  924. data: {
  925. uuid: id.id
  926. },
  927. });
  928. if (res.data && res.status == '200') {
  929. let url = id.type.value == 'EXCEL' ? res.data[0] : res.data[1]
  930. this.exportId = this.exportId.filter(item => item.id != id.id)
  931. this.download(url)
  932. } else if (res.data && res.status == '500') {
  933. this.exportId = this.exportId.filter(item => item.id != id.id)
  934. let eg = _this.$i18n.locale == 'zh' ? '失败请重新下载' : 'Please download again if failed'
  935. uni.showToast({
  936. icon: 'none',
  937. mask: true,
  938. title: eg,
  939. });
  940. }
  941. },
  942. download(url) {
  943. let _this = this
  944. // this.playpapers(this.websiteUrl + url)
  945. uni.downloadFile({
  946. url: 'https://m.geidcp.com/api/file/pub/' + url,
  947. success: (data) => {
  948. if (data.statusCode === 200) {
  949. //文件保存到本地
  950. // #ifdef APP-PLUS
  951. uni.saveFile({
  952. tempFilePath: data.tempFilePath, //临时路径
  953. success: function(res) {
  954. let eg = _this.$i18n.locale == 'zh' ? '文件已保存:' :
  955. 'The file is saved:'
  956. uni.showToast({
  957. icon: 'none',
  958. mask: true,
  959. title: eg + res.savedFilePath, //保存路径
  960. duration: 3000,
  961. });
  962. setTimeout(() => {
  963. //打开文档查看
  964. uni.openDocument({
  965. filePath: res.savedFilePath,
  966. success: function(res) {
  967. // console.log('打开文档成功');
  968. }
  969. });
  970. }, 3000)
  971. }
  972. });
  973. // #endif
  974. } else {
  975. let eg = _this.$i18n.locale == 'zh' ? '失败请重新下载' : 'Please download again if failed'
  976. uni.showToast({
  977. icon: 'none',
  978. mask: true,
  979. title: eg,
  980. });
  981. }
  982. },
  983. fail: (err) => {
  984. let eg = _this.$i18n.locale == 'zh' ? '失败请重新下载' : 'Please download again if failed'
  985. uni.showToast({
  986. icon: 'none',
  987. mask: true,
  988. title: eg,
  989. });
  990. },
  991. });
  992. },
  993. playpapers(url) {
  994. let dload = document.createElement("a");
  995. dload.download = ''; // 设置下载的文件名,默认是'下载'
  996. dload.href = url;
  997. document.body.appendChild(dload);
  998. dload.click();
  999. dload.remove(); // 下载之后把创建的元素删除
  1000. },
  1001. randomString(length) {
  1002. let str = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
  1003. let result = '';
  1004. for (let i = length; i > 0; --i)
  1005. result += str[Math.floor(Math.random() * str.length)];
  1006. return result;
  1007. },
  1008. // 重置按钮
  1009. Reset() {
  1010. this.$emit('reset', 0)
  1011. },
  1012. /**
  1013. * 相关指标
  1014. */
  1015. getCorrelationList() {
  1016. let select = _self.charts.activeType.indexName
  1017. function getParent(data, parent) {
  1018. data.forEach(item => {
  1019. if (item.indexName == select) {
  1020. _self.correlationList = parent.child.map(it => {
  1021. return {
  1022. icon: parent.icon,
  1023. "label": _self.$i18n.locale == 'zh' ? it.indexName : it.indexEnName,
  1024. "item": {
  1025. "indexName": it.indexName,
  1026. "indexEnName": it.indexEnName,
  1027. "source": it.source
  1028. }
  1029. }
  1030. })
  1031. }
  1032. if (item.child && item.child.length != 0) {
  1033. getParent(item.child, item)
  1034. }
  1035. })
  1036. }
  1037. getParent(_self.dropdown.indicator.searchList, null)
  1038. },
  1039. showRelevant(e) {
  1040. let ser = {}
  1041. function getOther(data, source) {
  1042. data.forEach(item => {
  1043. if (item.source == source) {
  1044. ser = item
  1045. return
  1046. } else {
  1047. getOther(item.child, source)
  1048. }
  1049. })
  1050. }
  1051. getOther([this.dropdown.indicator.searchList[this.dropdown.indicator.showCategoryIndex]], e.item.source)
  1052. ser.ifClick = true
  1053. this.charts.activeType = {
  1054. indexName: e.item.indexName,
  1055. indexEnName: e.item.indexEnName,
  1056. source: JSON.parse(e.item.source)
  1057. }
  1058. this.dropdown.indicator.title = this.$i18n.locale == 'zh' ? e.item.indexName : e.item.indexEnName
  1059. this.dropdown.indicator.searchSelect.ifClick = false;
  1060. this.dropdown.indicator.searchSelect = ser
  1061. this.getCategory();
  1062. },
  1063. /**
  1064. * 查询优先级
  1065. */
  1066. getSubmitSource(data) {
  1067. let dataSources = [];
  1068. let sources = JSON.parse(data.source);
  1069. let sourceKeys = Object.keys(sources);
  1070. sourceKeys.forEach(item => {
  1071. dataSources.push({
  1072. label: item,
  1073. value: JSON.stringify({
  1074. [item]: sources[item]
  1075. })
  1076. })
  1077. })
  1078. let buer = sourceKeys.indexOf("IEA") > -1 ? true : false;
  1079. this.submitSource = '';
  1080. if (buer == true) {
  1081. let i = sourceKeys.indexOf("IEA")
  1082. this.submitSource = "IEA";
  1083. // 如果本条数据的dataSources里有IEA就使用IEA作为查询时使用的数据源
  1084. this.charts.activeType["source"] = JSON.parse(dataSources[i].value);
  1085. if (this.$i18n.locale == 'zh') {
  1086. this.submitSource = '国际能源署'
  1087. }
  1088. } else {
  1089. this.submitSource = sourceKeys[0]
  1090. // 由于客户没有英国石油公司的数据使用权限,所以不能用英国石油公司的数据源查询
  1091. this.charts.activeType["source"] = JSON.parse(dataSources[0].value);
  1092. if (this.$i18n.locale == 'en') {
  1093. this.submitSource = this.zhToen(this.submitSource)
  1094. } else {
  1095. this.submitSource = this.enTozh(this.submitSource)
  1096. }
  1097. }
  1098. },
  1099. zhToen(str) {
  1100. switch (str) {
  1101. case '世界银行':
  1102. return 'World Bank';
  1103. break;
  1104. case '英国石油公司(BP)':
  1105. return 'British Petroleum';
  1106. break;
  1107. case 'EIA':
  1108. return 'Energy Information Administration';
  1109. break;
  1110. }
  1111. },
  1112. enTozh(str) {
  1113. switch (str) {
  1114. case 'IEA':
  1115. return '国际能源署';
  1116. break;
  1117. case 'EIA':
  1118. return '美国能源信息署';
  1119. break;
  1120. case '世界银行':
  1121. return '世界银行';
  1122. break;
  1123. case '英国石油公司(BP)':
  1124. return '英国石油公司';
  1125. break;
  1126. }
  1127. },
  1128. }
  1129. }
  1130. </script>
  1131. <style scoped lang="scss">
  1132. .indicatorDataQuery {
  1133. width: 100%;
  1134. height: 100%;
  1135. }
  1136. .u-dropdown /deep/ .u-dropdown__menu {
  1137. width: 100%;
  1138. overflow: hidden;
  1139. }
  1140. .u-dropdown /deep/ .u-dropdown__menu .u-dropdown__menu__item {
  1141. width: 33%;
  1142. background: #fff;
  1143. }
  1144. .u-dropdown /deep/ .u-dropdown__menu .u-dropdown__menu__item .u-flex {
  1145. width: 100%;
  1146. justify-content: center;
  1147. }
  1148. .u-dropdown /deep/ .u-dropdown__menu__item__text {
  1149. overflow: hidden; //超出的文本隐藏
  1150. text-overflow: ellipsis; //溢出用省略号显示
  1151. white-space: nowrap; //溢出不换行
  1152. //width: 80%;
  1153. text-align: center;
  1154. }
  1155. /deep/ .u-dropdown .u-dropdown__content {
  1156. .u-dropdown__content__popup {
  1157. height: 100%;
  1158. }
  1159. }
  1160. .left {
  1161. position: absolute;
  1162. height: 100%;
  1163. top: 0;
  1164. bottom: 0upx;
  1165. width: 24%;
  1166. left: 0upx;
  1167. background: #F2F2F2;
  1168. }
  1169. .right {
  1170. position: absolute;
  1171. height: 100%;
  1172. top: 0;
  1173. bottom: 0upx;
  1174. width: 76%;
  1175. left: 24%;
  1176. background-color: #fff;
  1177. margin-left: 0;
  1178. padding: 0 20upx;
  1179. }
  1180. .row {
  1181. width: 100%;
  1182. height: 90upx;
  1183. display: flex;
  1184. align-items: center;
  1185. .text {
  1186. width: 100%;
  1187. position: relative;
  1188. font-size: 28upx;
  1189. display: flex;
  1190. justify-content: center;
  1191. color: #3c3c3c;
  1192. text-align: center;
  1193. .block {
  1194. position: absolute;
  1195. width: 0upx;
  1196. left: 0;
  1197. }
  1198. }
  1199. &.on {
  1200. height: 90upx;
  1201. background-color: #fff;
  1202. .text {
  1203. font-size: 30upx;
  1204. color: #1677FD;
  1205. .block {
  1206. width: 6upx;
  1207. height: 100%;
  1208. left: 10upx;
  1209. }
  1210. }
  1211. &:before {
  1212. content: "";
  1213. position: absolute;
  1214. left: 10upx;
  1215. width: 10upx;
  1216. height: 60upx;
  1217. background-color: rgba(22, 119, 253, 0.8);
  1218. }
  1219. }
  1220. }
  1221. .threemenu {
  1222. display: flex;
  1223. flex-wrap: wrap;
  1224. }
  1225. .getCategory {
  1226. height: 90upx;
  1227. line-height: 90upx;
  1228. font-weight: 700;
  1229. //color: #0079ef;
  1230. }
  1231. .cate {
  1232. display: inline-block;
  1233. width: 240upx;
  1234. vertical-align: middle;
  1235. margin-right: 20upx;
  1236. }
  1237. .cateText {
  1238. padding: 10upx;
  1239. margin: 10upx 20upx 10upx 0;
  1240. display: inline-block;
  1241. width: 240upx;
  1242. vertical-align: middle;
  1243. background: #f1f2f3;
  1244. text-align: center;
  1245. overflow: hidden;
  1246. text-overflow: ellipsis;
  1247. white-space: nowrap;
  1248. }
  1249. .cateTextActive {
  1250. padding: 10upx;
  1251. margin: 10upx 20upx 10upx 0;
  1252. display: inline-block;
  1253. width: 240upx;
  1254. vertical-align: middle;
  1255. background-color: #0079ef;
  1256. color: #fff;
  1257. text-align: center;
  1258. overflow: hidden;
  1259. text-overflow: ellipsis;
  1260. white-space: nowrap;
  1261. }
  1262. .contry-btn {
  1263. height: 50upx;
  1264. display: inline-block;
  1265. line-height: 50upx;
  1266. }
  1267. .dataSourcep {
  1268. font-size: 28upx;
  1269. color: #c1c1c1;
  1270. line-height: 1.5em;
  1271. margin: 0;
  1272. }
  1273. </style>
  1274. <style scoped lang="scss">
  1275. .chart-columns {
  1276. display: flex;
  1277. flex-direction: column !important;
  1278. border-top: 20upx solid #fff
  1279. }
  1280. .chart-common-mt {
  1281. margin-top: 10upx;
  1282. }
  1283. .chart-bg-white {
  1284. background: #FFFFFF;
  1285. }
  1286. .chart-title-bar {
  1287. padding: 10upx 2%;
  1288. flex-wrap: nowrap;
  1289. display: flex;
  1290. align-items: center;
  1291. justify-content: space-between;
  1292. .changeChart {
  1293. display: flex;
  1294. align-items: center;
  1295. }
  1296. }
  1297. .uCharts1 {
  1298. padding: 10upx 20upx;
  1299. background-color: #F1F2F4;
  1300. font-size: 26upx;
  1301. color: #333;
  1302. }
  1303. .uCharts2 {
  1304. padding: 10upx 20upx;
  1305. background-color: #E5F0FE;
  1306. color: #1890FF;
  1307. font-size: 26upx;
  1308. }
  1309. .export {
  1310. width: 100upx;
  1311. margin-left: 20upx;
  1312. height: 60upx;
  1313. &.loading {
  1314. text-align: center;
  1315. padding-top: 10upx;
  1316. }
  1317. /deep/ .easy-select {
  1318. width: 100% !important;
  1319. height: 90% !important;
  1320. margin-top: 5%;
  1321. border: none;
  1322. border: 0;
  1323. color: #fff;
  1324. background-color: #1777FE;
  1325. font-size: 26upx;
  1326. uni-input {
  1327. padding: 0;
  1328. text-align: center;
  1329. font-size: 26upx;
  1330. }
  1331. .easy-select-suffix {
  1332. display: none;
  1333. }
  1334. .easy-select-options {
  1335. min-width: 0 !important;
  1336. width: 100%;
  1337. }
  1338. .easy-select-options-item {
  1339. padding: 0 10upx;
  1340. }
  1341. }
  1342. }
  1343. .charts {
  1344. width: 750upx;
  1345. height: 500upx;
  1346. background-color: #FFFFFF;
  1347. }
  1348. .reset {
  1349. width: 90%;
  1350. margin: 0 auto 40upx;
  1351. .u-btn--primary {
  1352. border-radius: 60upx;
  1353. background: linear-gradient(90deg, #33AFFF, #1777FE);
  1354. font-size: 32upx;
  1355. font-weight: 600;
  1356. }
  1357. }
  1358. </style>