From 8f0abdad2e3307b07b8f5d91ec664ebbeba73849 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=95=E7=AB=A5=E5=B4=87?= Date: Tue, 29 Mar 2022 16:35:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9issue?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/military/qz2022.js | 15 +- src/military/qz2022/introduce/index.jsx | 2 +- .../qz2022/statistics/EchartBar/index.jsx | 293 +++++++----------- src/military/qz2022/statistics/index.jsx | 6 +- 4 files changed, 134 insertions(+), 182 deletions(-) diff --git a/src/military/qz2022.js b/src/military/qz2022.js index a2b1cc6b..fb9d5b60 100644 --- a/src/military/qz2022.js +++ b/src/military/qz2022.js @@ -94,13 +94,14 @@ const Qz2022 = (props) => { }) }, [reload]) + console.log(active); return ( {/* banner图+选项 */}
- {paths.indexOf(active) !== -1 &&
    -
  • +
      +
    • 大赛介绍
    • @@ -129,8 +130,8 @@ const Qz2022 = (props) => { 后台管理
    • } -
    } - {paths.indexOf(active) !== -1 &&
    } +
+
{/* 大赛介绍 */} @@ -199,6 +200,12 @@ const Qz2022 = (props) => { () => () } > + {/* 大赛介绍 */} + () + } + >
diff --git a/src/military/qz2022/introduce/index.jsx b/src/military/qz2022/introduce/index.jsx index c171364f..22a7d469 100644 --- a/src/military/qz2022/introduce/index.jsx +++ b/src/military/qz2022/introduce/index.jsx @@ -15,7 +15,7 @@ function Introduce({ form, showNotification, match, history }) { return (
-
+

“启智”2022作战概念·事需求创新大赛

diff --git a/src/military/qz2022/statistics/EchartBar/index.jsx b/src/military/qz2022/statistics/EchartBar/index.jsx index 7ede23ca..323de39a 100644 --- a/src/military/qz2022/statistics/EchartBar/index.jsx +++ b/src/military/qz2022/statistics/EchartBar/index.jsx @@ -15,11 +15,10 @@ if (clientWidth < 1000) { let fontSizeTitle = 1.25 * fontSizeText; const colorArr0 = ['rgba(226, 217, 255, 1)', 'rgba(251, 201, 0, 0.36)', 'rgba(145, 193, 255, 0.61)']; -const colorArr1= ['rgba(155, 128, 245, 1)', 'rgba(254, 140, 0, 1)', 'rgba(37, 109, 255, 1)']; +const colorArr1 = ['rgba(155, 128, 245, 1)', 'rgba(254, 140, 0, 1)', 'rgba(37, 109, 255, 1)']; export default ({ id, className, title, legendArr, xData, yData }) => { - console.log(yData); - + useEffect(() => { let newEchartBar = document.getElementById(id) && echarts.init(document.getElementById(id)); let textColor = "#7988a5"; @@ -80,180 +79,126 @@ export default ({ id, className, title, legendArr, xData, yData }) => { // ]; - // var barWidth = 35; + // var barWidth = 35; // let option = { - // title: { - // text: 'Awesome Chart' - // }, - // xAxis: { - // data: ['Sun', 'Mon', 'Tue'] - // }, - // legend: { - // data: ['高一', '高二','高三'], - // textStyle: { - // color: 'white', //坐标的字体颜色 - // }, - // }, - // tooltip:{ - // trigger:'axis', - // formatter:function(params){ - // // console.log(params); - // return params - // } - // }, - // yAxis: {}, - // series: [ - // { - // z:1, - // name:'高一', - // type: 'bar', - // barWidth:barWidth, - // data:[320, 200, 260], - // itemStyle:{ - // normal:{ - // color:colors[0] - // } - // }, - // } - // , - // { - // z:3, - // name:'左上部1', - // type:'pictorialBar', - // symbolPosition:'end', - // data:[320, 200, 260], - // symbol :'diamond', - // symbolOffset:['-165%','-50%'], - // symbolSize:[barWidth - 4,10 * (barWidth - 4) / barWidth], - // itemStyle:{ - // normal:{ - // borderColor: '#218bd1', - // borderWidth: 2, - // color:'#218bd1' - // } - // }, - // }, - // { - // name:'左上部2', - // type: 'bar', - // label: { - // normal: { - // show: true, - // position: 'top', + // title: { + // text: 'Awesome Chart' + // }, + // xAxis: { + // data: ['Sun', 'Mon', 'Tue'] + // }, + // legend: { + // data: ['高一', '高二', '高三'], + // textStyle: { + // color: 'white', //坐标的字体颜色 + // }, + // }, + // tooltip: { + // trigger: 'axis', + // formatter: function (params) { + // // let paramsData=params.filter(i=>{return i.seriesType==='bar'}) + // // console.log(paramsData); + // // // return ( - // fontSize: 16, - // color: '#218bd1', - // offset: [-30, -5] - // } - // }, - // itemStyle: { - // color: 'transparent' - // }, - // tooltip: { - // }, - // data: [320, 200, 260], - // }, - // { - // z:1, - // name:'高二', - // type: 'bar', - // barWidth:barWidth, - // data:[170, 182, 191], - // itemStyle:{ - // normal:{ - // color:colors[1] - // } - // }, - // } - // , - // { - // z:3, - // name:'中上部1', - // type:'pictorialBar', - // symbolPosition:'end', - // data:[170, 182, 191], - // symbol :'diamond', - // symbolOffset:['-15%','-50%'], - // symbolSize:[barWidth - 4,10 * (barWidth - 4) / barWidth], - // itemStyle:{ - // normal:{ - // borderColor: '#2edaf8', - // borderWidth: 2, - // color:'#2edaf8' - // } - // }, - // }, - // { - // name:'中上部2', - // type: 'bar', - // label: { - // normal: { - // show: true, - // position: 'top', - // fontSize: 16, - // color: '#2edaf8', - // offset: [-30, -5] - // } - // }, - // itemStyle: { - // color: 'transparent' - // }, - // tooltip: { - // }, - // data:[170, 182, 191], - // }, - // { - // z:1, - // type: 'bar', - // name:'高三', - // barWidth:barWidth, - // data:[220, 182, 191], - // itemStyle:{ - // normal:{ - // color:colors[2] - // } - // }, - // } - // , - // { - // z:3, - // name:'右上部1', - // type:'pictorialBar', - // symbolPosition:'end', - // data:[220, 182, 191], - // symbol :'diamond', - // symbolOffset:['130%','-50%'], - // symbolSize:[barWidth - 4,10 * (barWidth - 4) / barWidth], - // itemStyle:{ - // normal:{ - // borderColor: '#7b7be1', - // borderWidth: 2, - // color:'#7b7be1' - // } - // }, - // }, - // { - // name:'中上部2', - // type: 'bar', - // label: { - // normal: { - // show: true, - // position: 'top', - // fontSize: 16, - // color: '#7b7be1', - // offset: [-30, -5] - // } - // }, - // itemStyle: { - // color: 'transparent' - // }, - // tooltip: { - // }, - // data:[220, 182, 191], - // }, - // ] - // }; + // // // ) + // return params.filter(i => { return i.seriesType === 'bar' }); + // } + // }, + // yAxis: {}, + // series: [ + // { + // z: 1, + // name: '高一', + // type: 'bar', + // barWidth: barWidth, + // data: [320, 200, 260], + // itemStyle: { + // normal: { + // color: colors[0] + // } + // }, + // } + // , + // { + // z: 3, + // name: '左上部1', + // type: 'pictorialBar', + // symbolPosition: 'end', + // data: [320, 200, 260], + // symbol: 'diamond', + // symbolOffset: ['-150%', '-50%'], + // symbolSize: [barWidth - 4, 10 * (barWidth - 4) / barWidth], + // itemStyle: { + // normal: { + // borderColor: '#218bd1', + // borderWidth: 2, + // color: '#218bd1' + // } + // }, + // }, + // { + // z: 1, + // name: '高二', + // type: 'bar', + // barWidth: barWidth, + // data: [170, 182, 191], + // itemStyle: { + // normal: { + // color: colors[1] + // } + // }, + // } + // , + // { + // z: 3, + // name: '中上部1', + // type: 'pictorialBar', + // symbolPosition: 'end', + // data: [170, 182, 191], + // symbol: 'diamond', + // symbolOffset: ['0%', '-50%'], + // symbolSize: [barWidth - 4, 10 * (barWidth - 4) / barWidth], + // itemStyle: { + // normal: { + // borderColor: '#2edaf8', + // borderWidth: 2, + // color: '#2edaf8' + // } + // }, + // }, + // { + // z: 1, + // type: 'bar', + // name: '高三', + // barWidth: barWidth, + // data: [220, 182, 191], + // itemStyle: { + // normal: { + // color: colors[2] + // } + // }, + // }, + // { + // z: 3, + // name: '右上部1', + // type: 'pictorialBar', + // symbolPosition: 'end', + // data: [220, 182, 191], + // symbol: 'diamond', + // symbolOffset: ['145%', '-50%'], + // symbolSize: [barWidth - 4, 10 * (barWidth - 4) / barWidth], + // itemStyle: { + // normal: { + // borderColor: '#7b7be1', + // borderWidth: 2, + // color: '#7b7be1' + // } + // }, + // }, + + // ] + // }; let option = { grid: { diff --git a/src/military/qz2022/statistics/index.jsx b/src/military/qz2022/statistics/index.jsx index e8544453..152fb15c 100644 --- a/src/military/qz2022/statistics/index.jsx +++ b/src/military/qz2022/statistics/index.jsx @@ -27,7 +27,7 @@ const initBarYData = [[0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, function Statistics({ showNotification, qzDetail }) { - + const is_local= qzDetail &&qzDetail.is_local; const [pieArr, setPieArr] = useState(initPieArr); const [barXData, setBarXData] = useState(['LJLJLJ', 'HJHJHJ', 'KJKJKJ', 'HJJHJJHJJ', 'ZLZYBD', '联勤保障', 'WJWJWJ']); @@ -100,7 +100,7 @@ function Statistics({ showNotification, qzDetail }) {
{/* 外网 */} - {!qzDetail.is_local &&
+ {!is_local &&

综合赛区报名数

} {/* 内网 */} - {qzDetail.is_local &&
+ {is_local &&