InformationData.base.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772
  1. <template>
  2. <view class="">
  3. <u-navbar :back-text="i18n('Back')" :back-text-style="backStyle"
  4. back-icon-color="#fff" title-color="#fff"
  5. :title="i18n('Data')"
  6. :background="background">
  7. </u-navbar>
  8. <!-- 筛选 -->
  9. <view class="selectCondition">
  10. <view class="dropdown">
  11. <u-dropdown ref="uDropdown" @open="open" @close="close">
  12. <!-- 指标 -->
  13. <u-dropdown-item title="指标">
  14. <view class="slot-content">
  15. <!-- 选择指标 -->
  16. <view style="height:1000upx;position: relative;">
  17. <scroll-view scroll-y="true" class="left">
  18. <view class="row" v-for="(fItem, fIndex) in categoryList" :key="fItem.id" :class="[fIndex===showCategoryIndex ?'on':'']" @tap="showCategory(fIndex)">
  19. <view class="text" :style="$i18n.locale=='zh'?'':'text-algin:center;'">{{ $i18n.locale=='zh'?fItem.indexName:fItem.indexEnName }}</view>
  20. </view>
  21. </scroll-view>
  22. <scroll-view scroll-y="true" class="right">
  23. <view v-for="(fItem, fIndex) in categoryList" :key="fItem.id" @tap="showCategory(fIndex)">
  24. <view v-if="fIndex === showCategoryIndex" class="category">
  25. <view v-for="(item,index) in fItem.child" :key="'c'+index" @click="getCategory2(item,index)" :class="item.child.length>0?'':'cateText'">
  26. <view :class="{'getCategory2':item.child.length>0,'nosumenu':item.child.length==0}"
  27. :style="item.child.length>0?'font-weight:700;color:#0079ef':'height:90upx;line-height:90upx;font-weight:400;'">
  28. {{ $i18n.locale=='zh'?item.indexName:item.indexEnName }}
  29. </view>
  30. <view class="threemenu">
  31. <view v-for="(i,j) in item.child" :key="j" class="cateText" @click="getCategory(item,i,index,j)"
  32. :class="{'active':cThreeSubmenu===j && index===cTwoSubmenu}"> {{$i18n.locale=='zh'?i.indexName:i.indexEnName}}
  33. </view>
  34. </view>
  35. </view>
  36. </view>
  37. </view>
  38. </scroll-view>
  39. </view>
  40. </view>
  41. </u-dropdown-item>
  42. <u-dropdown-item title="世界" >
  43. <view class="slot-content">
  44. <view style="height: 1000upx;position: relative;">
  45. <scroll-view scroll-y="true" class="left">
  46. <view class="row" v-for="(fItem, fIndex) in countryList" :key="fItem.id" :class="[fIndex === showCountryIndex ? 'on' : '']"
  47. @tap="showCategory2(fIndex)">
  48. <view class="text">{{ $i18n.locale=='zh'?fItem.label:fItem.labelEn }}</view>
  49. </view>
  50. </scroll-view>
  51. <scroll-view scroll-y="true" class="right">
  52. <view v-for="(fItem, fIndex) in countryList" :key="'fItem' + fIndex" @tap="showCategory2(fIndex)">
  53. <view v-if="fIndex === showCountryIndex && fItem.children" class="category">
  54. <view v-for="(item,index) in fItem.children" :key="index"
  55. @click="getCategory2(item,index)" :class="item.length>0?'':'cate'" >
  56. <view class=""><text :class="item.ifClick?'cateText3':'cateText2'" @click="getCountryId(item,index)">{{item.label}}</text>
  57. </view>
  58. </view>
  59. </view>
  60. </view>
  61. </scroll-view>
  62. </view>
  63. </view>
  64. </u-dropdown-item>
  65. <u-dropdown-item title="时间" >
  66. <view class="slot-content">
  67. <!-- 时间选择 -->
  68. <u-picker
  69. mode="time"
  70. v-model="yearStartShow"
  71. :params="params"
  72. :confirmText="submit"
  73. :cancelText="cancelText"
  74. :show-time-tag="false"
  75. @confirm="timeBack">
  76. </u-picker>
  77. </view>
  78. </u-dropdown-item>
  79. </u-dropdown>
  80. </view>
  81. </view>
  82. <!-- 图表区域 -->
  83. <view class="qiun-columns">
  84. <!-- 按钮区 -->
  85. <view class="qiun-bg-white qiun-title-bar qiun-common-mt" >
  86. <!-- 标题 -->
  87. <view class="qiun-title-dot-light">{{title}} </view>
  88. <!-- 切换线/柱图 -->
  89. <view class="changechart">
  90. <text :class="canvasType==1?'uChars2':'uChars1'" @click="canvasTypeChange(1)">{{i18n('ColumnChart')}} </text>
  91. <text :class="canvasType==2?'uChars2':'uChars1'" @click="canvasTypeChange(2)">{{i18n('LineChart')}} </text>
  92. </view>
  93. </view>
  94. <!-- 图表 -->
  95. <view class="qiun-charts" >
  96. <canvas v-if="canvasType==1" canvas-id="canvasColumn" id="canvasColumn" class="charts" @touchstart="touchColumn"></canvas>
  97. <canvas v-else canvas-id="canvasLineA" id="canvasLineA" class="charts" @touchstart="touchLineA"></canvas>
  98. </view>
  99. <!-- 重置按钮 -->
  100. <view class="reset">
  101. <u-button type="primary" @click="Reset">{{i18n('Reset')}}</u-button>
  102. </view>
  103. </view>
  104. <RelevantIndicators :dataList="dataList"></RelevantIndicators>
  105. <!-- 时间选择 -->
  106. <u-picker
  107. mode="time"
  108. v-model="yearStartShow"
  109. :params="params"
  110. :confirmText="submit"
  111. :cancelText="cancelText"
  112. :show-time-tag="true"
  113. @confirm="timeBack">
  114. </u-picker>
  115. <!-- 选择地区 -->
  116. <view class="zone">
  117. <u-popup v-model="show2" mode="top">
  118. <view style="height: 1000upx;position: relative;">
  119. <scroll-view scroll-y="true" class="left">
  120. <view class="row" v-for="(fItem, fIndex) in countryList" :key="fItem.id" :class="[fIndex === showCountryIndex ? 'on':'']"
  121. @tap="showCategory2(fIndex)">
  122. <view class="text">
  123. <view class="block" :class="'bg-'+themeColor.name"></view>
  124. {{ $i18n.locale=='zh'?fItem.label:fItem.labelEn }}
  125. </view>
  126. </view>
  127. </scroll-view>
  128. <scroll-view scroll-y="true" class="right">
  129. <view v-for="(fItem, fIndex) in countryList" :key="'fItem' + fIndex" @tap="showCategory2(fIndex)">
  130. <view v-if="fIndex === showCountryIndex && fItem.children" class="category">
  131. <view v-for="(item,index) in fItem.children" :key="index"
  132. @click="getCategory2(item,index)" :class="item.length>0?'':'cate'" >
  133. <view class="">
  134. <text :class="item.ifClick?'cateText3':'cateText2'" @click="getCountryId(item,index)">{{item.label}}</text>
  135. </view>
  136. </view>
  137. </view>
  138. </view>
  139. </scroll-view>
  140. </view>
  141. </u-popup>
  142. </view>
  143. <u-toast ref="uToast" />
  144. </view>
  145. </template>
  146. <script>
  147. import uCharts from '@/static/js/u-charts.js';
  148. import viewpoint from '../../conference/meetingIndexCh/viewpoint.vue';
  149. import RelevantIndicators from './dom/RelevantIndicators.vue'
  150. var _self;
  151. var canvaColumn=null;
  152. var canvaLineA = null;
  153. export default {
  154. components: {
  155. viewpoint,
  156. RelevantIndicators,
  157. },
  158. data() {
  159. return {
  160. show1:false,
  161. show2:false,
  162. yearStartShow:false,
  163. cWidth:'',
  164. cHeight:'',
  165. pixelRatio:1,
  166. serverData:'',
  167. plus:false,
  168. dataList:[
  169. {
  170. icon:require('../../../static/img/infomationdata/indicator/e1.png'),
  171. label:'核发电总量'
  172. },{
  173. icon:require('../../../static/img/infomationdata/indicator/e2.png'),
  174. label:'电力'
  175. },{
  176. icon:require('../../../static/img/infomationdata/indicator/e3.png'),
  177. label:'风发电总量'
  178. },{
  179. icon:require('../../../static/img/infomationdata/indicator/e2.png'),
  180. label:'水发电总量'
  181. },{
  182. icon:require('../../../static/img/infomationdata/indicator/e2.png'),
  183. label:'其他发电总量'
  184. }
  185. ],
  186. list: [
  187. ],
  188. cTwoSubmenu:-1,
  189. cThreeSubmenu:-1,
  190. background:{
  191. backgroundImage: 'linear-gradient(270deg, #4BC0E2 0%, #538BE7 100%)',
  192. },
  193. backStyle:{
  194. color:'#fff'
  195. },
  196. categoryList:[],
  197. showCategoryIndex: 0, // 一级菜单高亮显示序号
  198. CategoryList:{
  199. },
  200. title:null,// 头部展示的单位
  201. activeTitle:null,//选择的类型
  202. canvasType:1,// 控制显示柱形或折线
  203. countryName:[],
  204. cancelText:this.$t('common.Back'),
  205. submit:this.$t('common.submit'),
  206. activeType:{
  207. indexName:'发电总量',
  208. indexEnName:'Total power generation',
  209. source:{
  210. "IEA":{
  211. "index":{
  212. "发电总量":"132",
  213. },
  214. },
  215. }
  216. },
  217. countryId:[],
  218. TimeType:null,
  219. startTime:2013,
  220. endTime:2020,
  221. time:['2013','2014','2015','2016','2017','2018','2019','2020'],
  222. params: {
  223. year: true,
  224. month: false,
  225. day: false,
  226. hour: false,
  227. minute: false,
  228. second: false
  229. },
  230. showCountryIndex:0,
  231. countryList:[
  232. {
  233. label:'亚洲',
  234. labelEn:'Asia',
  235. children:[],
  236. },
  237. {
  238. label:'非洲',
  239. children:[],
  240. labelEn:'Africa'
  241. },
  242. {
  243. label:'欧洲',
  244. children:[],
  245. labelEn:'Europe'
  246. },
  247. {
  248. label:'北美洲',
  249. children:[],
  250. labelEn:'Northamerica'
  251. },
  252. {
  253. label:'南美洲',
  254. children:[],
  255. labelEn:'Southamerica'
  256. },
  257. {
  258. label:'大洋洲',
  259. children:[],
  260. labelEn:'Oceania'
  261. },
  262. ],
  263. }
  264. },
  265. onLoad() {
  266. _self = this;
  267. if(this.$i18n.locale=='zh'){
  268. this.countryName=['世界']
  269. }else {
  270. this.countryName=['WORLD']
  271. }
  272. this.cWidth=uni.upx2px(750);
  273. this.cHeight=uni.upx2px(500);
  274. this.getServerData();
  275. this.getCountryList();
  276. },
  277. methods: {
  278. showCategory(index) {
  279. this.showCategoryIndex = index;
  280. },
  281. showCategory2(index) {
  282. this.showCountryIndex = index;
  283. },
  284. yearStartShowChange(type){
  285. this.yearStartShow = true;
  286. this.TimeType = type;
  287. },
  288. canvasTypeChange(num){
  289. this.canvasType = num;
  290. this.getCategory(null,this.activeType);
  291. },
  292. timeBack(e){
  293. console.log(e)
  294. if(this.TimeType=='start'){
  295. this.startTime = e.year;
  296. }else {
  297. this.endTime = e.year;
  298. }
  299. if(this.startTime-0 >this.endTime-0 || (this.endTime -0 ) - (this.startTime - 0)>7){
  300. this.$refs.uToast.show({
  301. title: this.$i18n.locale=='zh'?'请正确选择时间,时间段为7年内':'Please select the right time period within 7 years',
  302. type: 'error',
  303. });
  304. this.startTime = (this.endTime -0 ) - 7;
  305. this.endTime = (this.startTime -0 ) + 7;
  306. }
  307. let timeArr = [];
  308. this.time = [];
  309. for(let i=0; i<= Number(this.endTime)-Number(this.startTime); i++){
  310. timeArr.push(String(Number(this.startTime)+i))
  311. }
  312. this.time = timeArr;
  313. this.getCategory(null,this.activeType);
  314. },
  315. Reset(){
  316. uni.redirectTo({
  317. url: '/pages/information/InformationData/InformationData'
  318. });
  319. },
  320. plusChange(){
  321. this.plus=!this.plus;
  322. if(this.plus){
  323. plus.screen.lockOrientation('landscape-primary');//横屏
  324. this.Reset();
  325. }else {
  326. plus.screen.lockOrientation('portrait-primary');//竖屏
  327. // this.Reset();
  328. }
  329. },
  330. i18n (data) {
  331. return this.$t('common.' + data);
  332. },
  333. getDataList(num){
  334. if(num==1){
  335. this.show1 = true;
  336. }else {
  337. this.show2 = true;
  338. }
  339. },
  340. async getCountryList(){
  341. let originalCountryData = await this.$api.json('originalCountryData');
  342. this.$nextTick(function(){
  343. let countryList=this.countryList;
  344. originalCountryData.forEach((originalItem,index)=>{
  345. countryList.forEach((item,j) =>{
  346. if(originalItem.CONTINENT_NAME == item.label){
  347. originalItem.value=originalItem.COUNTRY_ID;
  348. originalItem.label=this.$i18n.locale=='zh'?originalItem.COUNTRY_CN_NAME:originalItem.COUNTRY_EN_NAME;
  349. this.$set(originalItem,'ifClick',false);
  350. item.children.push(originalItem);
  351. item.value=originalItem.COUNTRY_EN_NAME;
  352. }
  353. })
  354. });
  355. this.list = countryList;
  356. })
  357. },
  358. getCountryId(item,index){
  359. item.ifClick=!item.ifClick;
  360. if(item.ifClick==true){
  361. this.countryId.push(item.value);
  362. if(this.countryName[0]=='世界'){
  363. this.countryName=[];
  364. }
  365. this.countryName.push(item.label);
  366. }else {
  367. console.log(this.countryId);
  368. const y = this.countryId.indexOf(item.value);
  369. this.countryId.splice(y,1);
  370. this.countryName.splice(y,1);
  371. }
  372. this.getCategory(0,this.activeType)
  373. },
  374. getCategory(item,i,index,j){
  375. this.activeType=i;
  376. let source =typeof(this.activeType.source)!=='string'?JSON.stringify(this.activeType.source):this.activeType.source;
  377. let params={
  378. "Source":JSON.parse(source),
  379. "country":this.countryId.length>0?this.countryId:["93BC2730ED0A402186F596F6A01C007E"],
  380. "time":this.time,
  381. "language":this.$i18n.locale,
  382. }
  383. this.show1=false;
  384. this.show2=false;
  385. this.getInitialCategory(params);
  386. this.cTwoSubmenu = index;
  387. this.cThreeSubmenu = j
  388. },
  389. getCategory2(item,index){
  390. if(item.child.length>0){
  391. return;
  392. }else {
  393. this.activeType=item;
  394. let params={
  395. "Source":JSON.parse(this.activeType.source),
  396. "country":this.countryId.length>0?this.countryId:["93BC2730ED0A402186F596F6A01C007E"],
  397. "time":this.time,
  398. "language":this.$i18n.locale,
  399. }
  400. this.show1=false;
  401. this.getInitialCategory(params);
  402. }
  403. },
  404. async getServerData(){
  405. const res = await this.$myRequest({
  406. url: '/op/geiIntegratedDataMenus/getMenu',
  407. data: {}
  408. });
  409. this.categoryList= res.data;
  410. let params = {
  411. "Source":{
  412. "IEA":{
  413. "index":{'发电总量':"132"},
  414. },
  415. },
  416. "country":["93BC2730ED0A402186F596F6A01C007E"],
  417. "time":this.time,
  418. "language":this.$i18n.locale,
  419. }
  420. this.getInitialCategory(params);
  421. },
  422. async getInitialCategory(params){
  423. const res = await this.$myRequest({
  424. url: '/op/geiIntegratedDataMenus/getChartData',
  425. data: {...params},
  426. method:'post',
  427. type:'payload'
  428. });
  429. this.canvas(res.data);
  430. },
  431. canvas(data){
  432. this.title=data[0].unitY;// 头部展示的单位
  433. this.activeTitle=this.$i18n.locale=='zh'?this.activeType.indexName:this.activeType.indexEnName;//选择的类型
  434. let series = [];
  435. let seriesItem = {};
  436. data.forEach((item,index)=>{
  437. seriesItem = {
  438. "name": this.countryName[index],
  439. "data":item.y
  440. }
  441. series.push(seriesItem);
  442. })
  443. let Column = {
  444. "categories": data[0].x,
  445. "series": series
  446. };
  447. if(this.canvasType==1){
  448. this.showColumn('canvasColumn', Column);
  449. }else {
  450. this.showLineA("canvasLineA", Column);
  451. }
  452. },
  453. showColumn(canvasId,chartData){
  454. canvaColumn=new uCharts({
  455. $this:_self,
  456. canvasId: canvasId,
  457. type: 'column',
  458. legend:{show:true},
  459. fontSize:11,
  460. background:'#FFFFFF',
  461. pixelRatio:_self.pixelRatio,
  462. animation: true,
  463. categories: chartData.categories,
  464. series: chartData.series,
  465. xAxis: {
  466. disableGrid:true,
  467. },
  468. yAxis: {
  469. //disabled:true
  470. },
  471. dataLabel: false,
  472. width: _self.cWidth*_self.pixelRatio,
  473. height: _self.cHeight*_self.pixelRatio,
  474. extra: {
  475. column: {
  476. type:'group',
  477. width: _self.cWidth*_self.pixelRatio*0.45/chartData.categories.length
  478. }
  479. }
  480. });
  481. },
  482. showLineA(canvasId, chartData) {
  483. canvaLineA=new uCharts({
  484. $this:_self,
  485. canvasId: canvasId,
  486. type: 'line',
  487. fontSize:11,
  488. legend:{show:true},
  489. dataLabel:false,
  490. dataPointShape:true,
  491. background:'#FFFFFF',
  492. pixelRatio:_self.pixelRatio,
  493. categories: chartData.categories,
  494. series: chartData.series,
  495. animation: true,
  496. xAxis: {
  497. type:'grid',
  498. gridColor:'#CCCCCC',
  499. gridType:'dash',
  500. dashLength:8
  501. },
  502. yAxis: {
  503. gridType:'dash',
  504. gridColor:'#CCCCCC',
  505. dashLength:8,
  506. splitNumber:5,
  507. min:10,
  508. max:180,
  509. },
  510. width: _self.cWidth*_self.pixelRatio,
  511. height: _self.cHeight*_self.pixelRatio,
  512. extra: {
  513. line:{
  514. type: 'straight'
  515. }
  516. }
  517. });
  518. },
  519. touchLineA(e) {
  520. canvaLineA.showToolTip(e, {
  521. format: function(item, category) {
  522. return item.data
  523. }
  524. });
  525. },
  526. touchColumn(e){
  527. canvaColumn.showToolTip(e, {
  528. format: function (item, category) {
  529. if(typeof item.data === 'object'){
  530. return category + ' ' + item.name + ':' + item.data.value
  531. }else{
  532. return category + ' ' + item.name + ':' + item.data
  533. }
  534. }
  535. });
  536. },
  537. openPropDialog(payload){
  538. },
  539. //下拉菜单打开
  540. open(index) {
  541. this.$refs.uDropdown.highlight();
  542. },
  543. //下拉菜单关闭
  544. close(index){
  545. this.$refs.uDropdown.highlight(index);
  546. },
  547. }
  548. }
  549. </script>
  550. <style lang="scss" scoped>
  551. uni-page-body{
  552. padding-top:0;
  553. }
  554. page{background:#fff;width: 750upx;overflow-x: hidden;}
  555. .qiun-padding{padding:2%; width:96%;}
  556. .qiun-wrap{display:flex; flex-wrap:wrap;}
  557. .qiun-rows{display:flex; flex-direction:row !important;}
  558. .qiun-columns{display:flex; flex-direction:column !important;}
  559. .qiun-common-mt{margin-top:10upx;}
  560. .qiun-bg-white{background:#FFFFFF;}
  561. .qiun-title-bar{
  562. padding:10upx 2%; flex-wrap:nowrap;display:flex;align-items:center;
  563. justify-content: space-between;
  564. .changechart{
  565. display:flex;
  566. align-items:center;
  567. }
  568. }
  569. .qiun-title-dot-light{padding-left: 10upx; font-size: 28upx;color: #aaa;width:50%;}
  570. .qiun-charts{width: 750upx; height:500upx;background-color: #FFFFFF;}
  571. .charts{width: 750upx; height:500upx;background-color: #FFFFFF;}
  572. .qiun-charts {
  573. width: 750upx;
  574. height: 500upx;
  575. background-color: #FFFFFF;
  576. }
  577. .uChars1 {
  578. padding: 10upx 20upx;
  579. background-color:#F1F2F4;
  580. font-size:26upx;
  581. color:#333;
  582. }
  583. .uChars2 {
  584. padding: 10upx 20upx;
  585. background-color: #E5F0FE;
  586. color: #1890FF;
  587. font-size:26upx;
  588. }
  589. .charts {
  590. width: 750upx;
  591. height: 500upx;
  592. background-color: #FFFFFF;
  593. }
  594. .data-text {
  595. margin:0 40upx;
  596. height: 100upx;
  597. line-height: 100upx;
  598. border-top:1px solid #f1f2f3;
  599. border-bottom:1px solid #f1f2f3;
  600. }
  601. .data-text2 {
  602. line-height: 50px;
  603. border-top:1px solid #f1f2f3;
  604. border-bottom:1px solid #f1f2f3;
  605. }
  606. .data-text:active {
  607. background-color: #f2f2f2;
  608. }
  609. .cate {
  610. display: inline-block;
  611. width: 240upx;
  612. vertical-align: middle;
  613. margin-right: 20upx;
  614. }
  615. .cateText2 {
  616. padding: 10upx;
  617. margin: 10upx 20upx 10upx 0;
  618. display: inline-block;
  619. width: 240upx;
  620. vertical-align: middle;
  621. background: #f1f2f3;
  622. text-align: center;
  623. }
  624. .cateText3 {
  625. padding: 10upx;
  626. margin: 10upx 20upx 10upx 0;
  627. display: inline-block;
  628. width: 240upx;
  629. vertical-align: middle;
  630. background-color: #0079ef;
  631. color: #fff;
  632. text-align: center;
  633. }
  634. .cateText :active{
  635. color: red;
  636. }
  637. .data-year {
  638. padding: 20upx 30upx;
  639. }
  640. .left,
  641. .right {
  642. position: absolute;
  643. height:100%;
  644. top:0;
  645. bottom: 0upx;
  646. }
  647. .left {
  648. width: 24%;
  649. left: 0upx;
  650. background:#F2F2F2;
  651. }
  652. .right {
  653. width: 76%;
  654. left: 24%;
  655. background-color: #fff;
  656. margin-left:0;
  657. padding:0 20upx;
  658. }
  659. .row {
  660. width: 100%;
  661. height: 90upx;
  662. display: flex;
  663. align-items: center;
  664. .text {
  665. width:100%;
  666. position:relative;
  667. font-size:28upx;
  668. display: flex;
  669. justify-content: center;
  670. color: #3c3c3c;
  671. text-align: center;
  672. .block {
  673. position: absolute;
  674. width: 0upx;
  675. left: 0;
  676. }
  677. }
  678. &.on {
  679. height:90upx;
  680. background-color:#fff;
  681. .text {
  682. font-size: 30upx;
  683. color: #1677FD;
  684. .block {
  685. width: 6upx;
  686. height:100%;
  687. left: 10upx;
  688. }
  689. }
  690. }
  691. }
  692. // .cateText {
  693. // padding:20upx 0;
  694. // border:1px solid #f2f2f2;
  695. // &.active{
  696. // border:1px solid #1777FE;
  697. // color:#1777FE;
  698. // background:#fff;
  699. // }
  700. // }
  701. .threemenu{
  702. display:flex;
  703. flex-wrap:wrap;
  704. .cateText{
  705. margin:0 20upx 20upx 0;
  706. background:#F2F2F2;
  707. padding:20upx;
  708. border-radius:8upx;
  709. width:46%;
  710. overflow:hidden;
  711. text-overflow:ellipsis;
  712. white-space: nowrap;
  713. text-align:center;
  714. &.active{
  715. border:1px solid #1777FE;
  716. color:#1777FE;
  717. background:#fff;
  718. }
  719. }
  720. }
  721. .getCategory2{
  722. height:90upx;
  723. line-height:90upx;
  724. font-weight:700;
  725. color:#0079ef
  726. }
  727. // 重置按钮
  728. .reset{
  729. width:90%;
  730. margin:0 auto 40upx;
  731. .u-btn--primary{
  732. border-radius:60upx;
  733. background:linear-gradient(90deg,#33AFFF,#1777FE);
  734. font-size:32upx;
  735. font-weight:600;
  736. }
  737. }
  738. // 筛选
  739. .selectCondition{
  740. position: relative;
  741. }
  742. </style>