123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858 |
-
- // function getQuerys(e) {
- // if (!e) return "";
- // var t = {},
- // r = [],
- // n = "",
- // a = "";
- // try {
- // var i = [];
- // if (e.indexOf("?") >= 0 && (i = e.substring(e.indexOf("?") + 1, e.length).split("&")), i.length > 0) for (var o in i) n = (r = i[o].split("="))[0],
- // a = r[1],
- // t[n] = a
- // } catch(s) {
- // t = {}
- // }
- // return t
- // }
- // let datetime = getQuerys(window.location.href).today;
- // console.log(datetime,window.location.href,getQuerys(window.location.href),getQuerys(window.location.href).today,1)
- // if(!datetime){
- // datetime = 2024;
- // }
- // console.log(datetime,2)
-
- function echarts_1(data) {
- const myChart = echarts.init(document.getElementById('main1'))
- const option = {
- xAxis: {
- axisLine: {
- show: false // 隐藏轴线
- },
- axisTick: {
- show: false // 隐藏分隔线
- },
- boundaryGap: false, // 坐标轴两边不留白
- // 标签文字样式修改
- axisLabel: {
- color: '#9DA5AF',
- margin: 12,
- rich: {
- a: {
- padding: [0, 0, 0, 10] // 左边距 40
- },
- b: {
- padding: [0, 10, 0, 0] // 右边距 40
- }
- }
- },
- type: 'category',
- data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月']
- },
- yAxis: {
- type: 'value',
- //背景线
- splitLine: {
- lineStyle: {
- type: 'dashed',
- color: ['#EDEEF1']
- }
- },
- axisLabel: {
- color: '#9DA5AF',
- margin: 20
- }
- },
- tooltip: {
- trigger: 'axis',
- formatter: params => {
- const title = `<div style="font-weight: bold; margin-bottom: 10px">${params[0].axisValue}</div>`
- let content = ''
- params.forEach(item => {
- content += `
- <div style="margin-bottom: 6px">
- <span style="display: inline-block; width: 10px; height: 10px; border-radius: 50%; background-color: #187FDD;"></span>
- <span>${item.seriesName}:${item.value}</span>
- </div>
- `
- })
- return title + content
- }
- },
- grid: {
- left: '3%',
- right: '4%',
- top: '10%',
- bottom: '15%',
- containLabel: true
- },
- // legend: {
- // orient: 'horizontal', //设置图例朝向
- // bottom: 'bottom',
- // color:'red',
- // },
- series: [
- {
- name: '项目数量',
- type: 'line',
- smooth: true,
- symbol: 'circle',
- symbolSize: 8,
- itemStyle: {
- color: '#187FDD',
- normal: {
- color: '#fff',
- borderColor: '#187FDD',
- }
- },
- lineStyle: {
- // 线性渐变,前四个参数分别是 x0, y0, x2, y2, 范围从 0 - 1,相当于在图形包围盒中的百分比,如果 globalCoord 为 `true`,则该四个值是绝对的像素位置
- color: {
- type: 'linear',
- x: 0,
- y: 0,
- x2: 1,
- y2: 0,
- colorStops: [{
- offset: 0, color: 'rgb(72,177,203)' // 0% 处的颜色
- }, {
- offset: 1, color: 'rgb(72,116,203)' // 100% 处的颜色
- }],
- globalCoord: false // 缺省为 false
- },
- width: 4,
- },
- itemStyle: {
- color: '#FFFFFF',
- borderColor: {
- type: 'linear',
- x: 0,
- y: 0,
- x2: 0,
- y2: 1,
- colorStops: [
- {
- offset: 0,
- color: 'rgb(72,177,203)', //0%处的颜色
- },
- {
- offset: 1,
- color: 'rgb(72,177,203)', //100%处的颜色
- },
- ],
- global: false,
- borderWidth: 4,
- },
- },
- areaStyle: {
- normal: {
- //颜色渐变函数 前四个参数分别表示四个位置依次为左、下、右、上
- color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
- offset: 0,
- color: 'rgba(72,177,203,0.39)'
- }, {
- offset: .34,
- color: 'rgba(56,155,255,0.25)'
- }, {
- offset: 1,
- color: 'rgba(38,197,254,0.00)'
- }])
- }
- },//区域颜色渐变
- // color: '#4bc8db',
- data: [data['all_sent_review_cost']['1']['project_number'],
- data['all_sent_review_cost']['2']['project_number'],
- data['all_sent_review_cost']['3']['project_number'],
- data['all_sent_review_cost']['4']['project_number'],
- data['all_sent_review_cost']['5']['project_number'],
- data['all_sent_review_cost']['6']['project_number'],
- data['all_sent_review_cost']['7']['project_number'],
- data['all_sent_review_cost']['8']['project_number'],
- data['all_sent_review_cost']['9']['project_number'],
- data['all_sent_review_cost']['10']['project_number'],
- data['all_sent_review_cost']['11']['project_number'],
- data['all_sent_review_cost']['12']['project_number'],]
- }
- ]
- }
- myChart.setOption(option);
- //响应式布局
- // const resize = _.throttle(() => {
- // myChart.resize()
- // }, 1000)
- // window.addEventListener('resize', resize)
- }
- function echarts_2(data) {
- const myChart = echarts.init(document.getElementById('main2'))
- const option = {
- legend: {
- orient: 'horizontal', //设置图例朝向
- bottom: 'bottom',
- },
- tooltip: {},
- grid: {
- left: '3%',
- right: '4%',
- top: '10%',
- bottom: '15%',
- containLabel: true
- },
- dataset: {
- source: [
- ['product', '送审金额', '审定金额'],
- ['1月', data['all_sent_review_cost']['1']['all_sent_amount'], data['all_sent_review_cost']['1']['all_authorize_amount']],
- ['2月', data['all_sent_review_cost']['2']['all_sent_amount'], data['all_sent_review_cost']['2']['all_authorize_amount']],
- ['3月', data['all_sent_review_cost']['3']['all_sent_amount'], data['all_sent_review_cost']['3']['all_authorize_amount']],
- ['4月', data['all_sent_review_cost']['4']['all_sent_amount'], data['all_sent_review_cost']['4']['all_authorize_amount']],
- ['5月', data['all_sent_review_cost']['5']['all_sent_amount'], data['all_sent_review_cost']['5']['all_authorize_amount']],
- ['6月', data['all_sent_review_cost']['6']['all_sent_amount'], data['all_sent_review_cost']['6']['all_authorize_amount']],
- ['7月', data['all_sent_review_cost']['7']['all_sent_amount'], data['all_sent_review_cost']['7']['all_authorize_amount']],
- ['8月', data['all_sent_review_cost']['8']['all_sent_amount'], data['all_sent_review_cost']['8']['all_authorize_amount']],
- ['9月', data['all_sent_review_cost']['9']['all_sent_amount'], data['all_sent_review_cost']['9']['all_authorize_amount']],
- ['10月', data['all_sent_review_cost']['10']['all_sent_amount'], data['all_sent_review_cost']['10']['all_authorize_amount']],
- ['11月', data['all_sent_review_cost']['11']['all_sent_amount'], data['all_sent_review_cost']['11']['all_authorize_amount']],
- ['12月', data['all_sent_review_cost']['12']['all_sent_amount'], data['all_sent_review_cost']['12']['all_authorize_amount']],
- ]
- },
- xAxis: {
- type: 'category',
- axisLine: {
- show: false // 隐藏轴线
- },
- axisTick: {
- show: false // 隐藏分隔线
- },
- },
- yAxis: {},
- // Declare several bar series, each will be mapped
- // to a column of dataset.source by default.
- series: [
- {
- type: 'bar',
- itemStyle: {
- barBorderRadius: [7, 7, 0, 0],
- },
- color: {
- type: 'linear',
- x: 0,
- y: 0,
- x2: 0,
- y2: 1,
- colorStops: [{
- offset: 0, color: '#18c1f6' // 0% 处的颜色
- }, {
- offset: 1, color: '#5199f4' // 100% 处的颜色
- }],
- global: false // 缺省为 false
- },
- }, {
- type: 'bar',
- itemStyle: {
- barBorderRadius: [7, 7, 0, 0],
- },
- color: {
- type: 'linear',
- x: 0,
- y: 0,
- x2: 0,
- y2: 1,
- colorStops: [{
- offset: 0, color: 'rgb(251,189,108)' // 0% 处的颜色
- }, {
- offset: 1, color: 'rgb(251,163,99)' // 100% 处的颜色
- }],
- global: false // 缺省为 false
- },
- }
- ]
- }
- myChart.setOption(option);
- }
- function echarts_3(data) {
- const myChart = echarts.init(document.getElementById('main3'))
- const option = {
- xAxis: {
- axisLine: {
- show: false // 隐藏轴线
- },
- axisTick: {
- show: false // 隐藏分隔线
- },
- type: 'category',
- data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月']
- },
- yAxis: {
- type: 'value'
- },
- legend: {
- orient: 'horizontal', //设置图例朝向
- bottom: 'bottom'
- },
- tooltip: {},
- grid: {
- left: '3%',
- right: '4%',
- top: '10%',
- bottom: '15%',
- containLabel: true
- },
- series: [
- {
- name: '送审服务费',
- data: [data['all_sent_review_cost']['1']['all_sent_review_cost'],
- data['all_sent_review_cost']['2']['all_sent_review_cost'],
- data['all_sent_review_cost']['3']['all_sent_review_cost'],
- data['all_sent_review_cost']['4']['all_sent_review_cost'],
- data['all_sent_review_cost']['5']['all_sent_review_cost'],
- data['all_sent_review_cost']['6']['all_sent_review_cost'],
- data['all_sent_review_cost']['7']['all_sent_review_cost'],
- data['all_sent_review_cost']['8']['all_sent_review_cost'],
- data['all_sent_review_cost']['9']['all_sent_review_cost'],
- data['all_sent_review_cost']['10']['all_sent_review_cost'],
- data['all_sent_review_cost']['11']['all_sent_review_cost'],
- data['all_sent_review_cost']['12']['all_sent_review_cost']],
- type: 'bar',
- // color:'#2452b2',
- itemStyle: { // 使用方法二的写法
- barBorderRadius: [7, 7, 0, 0],
- color: {
- type: 'linear',
- x: 0, //右
- y: 0, //下
- x2: 0, //左
- y2: 1, //上
- colorStops: [
- {
- offset: 0,
- color: 'rgb(73,119,193)' // 0% 处的颜色
- },
- {
- offset: 1,
- color: 'rgb(159,175,209)' // 100% 处的颜色
- }
- ]
- },
- },
- }
- ]
- }
- myChart.setOption(option);
- }
- function echarts_4(data) {
-
- const myChart = echarts.init(document.getElementById('main4'))
- const option = {
- tooltip: {
- trigger: 'item'
- },
- legend: {
- orient: 'horizontal', //设置图例朝向
- bottom: 'bottom'
- },
- grid: {
- left: '3%',
- right: '4%',
- top: '10%',
- bottom: '15%',
- containLabel: true
- },
- series: [
- {
- name: '送审总额占比分布图',
- type: 'pie',
- radius: '50%',
- data: [
- {
- value: data['sentAndaAuthorize']['0']['all_amount'],
- name: '预算总额',
- itemStyle: {
- color: 'rgb(116,195,225)'
- }
- },
- {
- value: data['sentAndaAuthorize']['1']['all_amount'],
- name: '结算总额',
- itemStyle: {
- color: 'rgb(241,103,106)'
- }
- },
- ],
- emphasis: {
- itemStyle: {
- shadowBlur: 10,
- shadowOffsetX: 0,
- shadowColor: 'rgba(0, 0, 0, 0.5)'
- }
- }
- }
- ]
- }
- myChart.setOption(option);
- }
- function echarts_5(data) {
- const myChart = echarts.init(document.getElementById('main5'))
- let review = data['review_poportion'];
- let name = [];
- let set = [];
- for (let i = 0; i < review.length; i++) {
- if (review[i]['project_number'] != 0) {
- name.push(review[i]['review_unit_name'])
- set.push(review[i]['project_number'])
- }
- }
- const option = {
- tooltip: {
- trigger: 'axis',
- axisPointer: {
- type: 'shadow'
- }
- },
- legend: {
- orient: 'horizontal', //设置图例朝向
- bottom: 'bottom',
- },
- grid: {
- left: '3%',
- right: '4%',
- top: '10%',
- bottom: '15%',
- containLabel: true
- },
- xAxis: {
- type: 'value',
- boundaryGap: [0, 0.01]
- },
- yAxis: {
- axisLine: {
- show: false // 隐藏轴线
- },
- axisTick: {
- show: false // 隐藏分隔线
- },
- type: 'category',
- data: name
- },
- series: [
- {
- name: '项目数量',
- type: 'bar',
- data: set,
- itemStyle: { // 使用方法二的写法
- color: {
- type: 'linear',
- x: 0, //右
- y: 0, //下
- x2: 1, //左
- y2: 0, //上
- colorStops: [
- {
- offset: 0,
- color: 'rgb(254,221,148)' // 0% 处的颜色
- },
- {
- offset: 1,
- color: 'rgb(209,230,165)' // 100% 处的颜色
- }
- ]
- },
- },
- },
- ]
- };
- myChart.setOption(option);
- }
- function echarts_6(data) {
- const myChart = echarts.init(document.getElementById('main6'))
- let review = data['sent_review_amount_top'];
- let name = [];
- let set = [];
- for (let i = 0; i < review.length; i++) {
- if (review[i]['all_sent_amount'] != 0) {
- name.push(review[i]['review_unit_name'])
- set.push(review[i]['all_sent_amount'])
- }
- }
- const option = {
- tooltip: {
- trigger: 'axis',
- axisPointer: {
- type: 'shadow'
- }
- },
- legend: {
- orient: 'horizontal', //设置图例朝向
- bottom: 'bottom',
- },
- grid: {
- left: '3%',
- right: '4%',
- top: '10%',
- bottom: '15%',
- containLabel: true
- },
- xAxis: {
- type: 'value',
- boundaryGap: [0, 0.01]
- },
- yAxis: {
- axisLine: {
- show: false // 隐藏轴线
- },
- axisTick: {
- show: false // 隐藏分隔线
- },
- type: 'category',
- data: name
- },
- series: [
- {
- name: '送审总额',
- type: 'bar',
- data: set,
- itemStyle: { // 使用方法二的写法
- color: {
- type: 'linear',
- x: 0, //右
- y: 0, //下
- x2: 1, //左
- y2: 0, //上
- colorStops: [
- {
- offset: 0,
- color: 'rgb(229,221,233)' // 0% 处的颜色
- },
- {
- offset: 1,
- color: 'rgb(189,194,232)' // 100% 处的颜色
- }
- ]
- },
- },
- },
- ]
- };
- myChart.setOption(option);
- }
- function echarts_7(data) {
- const myChart = echarts.init(document.getElementById('main7'))
- let review = data['authorize_amount_top'];
- let name = [];
- let set = [];
- for (let i = 0; i < review.length; i++) {
- if (review[i]['all_authorize_amount'] != 0) {
- name.push(review[i]['review_unit_name'])
- set.push(review[i]['all_authorize_amount'])
- }
- }
- const option = {
- tooltip: {
- trigger: 'axis',
- axisPointer: {
- type: 'shadow'
- }
- },
- legend: {
- orient: 'horizontal', //设置图例朝向
- bottom: 'bottom',
- },
- grid: {
- left: '3%',
- right: '4%',
- top: '10%',
- bottom: '15%',
- containLabel: true
- },
- xAxis: {
- type: 'value',
- boundaryGap: [0, 0.01]
- },
- yAxis: {
- axisLine: {
- show: false // 隐藏轴线
- },
- axisTick: {
- show: false // 隐藏分隔线
- },
- type: 'category',
- data: name
- },
- series: [
- {
- name: '审定总额',
- type: 'bar',
- data: set,
- itemStyle: { // 使用方法二的写法
- color: {
- type: 'linear',
- x: 0, //右
- y: 0, //下
- x2: 1, //左
- y2: 0, //上
- colorStops: [
- {
- offset: 0,
- color: 'rgb(229,221,233)' // 0% 处的颜色
- },
- {
- offset: 1,
- color: 'rgb(189,194,232)' // 100% 处的颜色
- }
- ]
- },
- },
- },
- ]
- };
- myChart.setOption(option);
- }
- function echarts_8(data) {
- const myChart = echarts.init(document.getElementById('main8'))
- let review = data['sent_number_top'];
- let name = [];
- let set = [];
- for (let i = 0; i < review.length; i++) {
- if (review[i]['project_number'] != 0) {
- name.push(review[i]['sent_review_unit_name'])
- set.push(review[i]['project_number'])
- }
- }
- const option = {
- tooltip: {
- trigger: 'axis',
- axisPointer: {
- type: 'shadow'
- }
- },
- legend: {
- orient: 'horizontal', //设置图例朝向
- bottom: 'bottom',
- },
- grid: {
- left: '3%',
- right: '4%',
- top: '10%',
- bottom: '15%',
- containLabel: true
- },
- xAxis: {
- type: 'value',
- boundaryGap: [0, 0.01]
- },
- yAxis: {
- axisLine: {
- show: false // 隐藏轴线
- },
- axisTick: {
- show: false // 隐藏分隔线
- },
- type: 'category',
- data: name
- },
- series: [
- {
- name: '项目数量',
- type: 'bar',
- data: set,
- itemStyle: { // 使用方法二的写法
- color: {
- type: 'linear',
- x: 0, //右
- y: 0, //下
- x2: 1, //左
- y2: 0, //上
- colorStops: [
- {
- offset: 0,
- color: 'rgb(254,221,148)' // 0% 处的颜色
- },
- {
- offset: 1,
- color: 'rgb(209,230,165)' // 100% 处的颜色
- }
- ]
- },
- },
- },
- ]
- };
- myChart.setOption(option);
- }
- function echarts_9(data) {
- const myChart = echarts.init(document.getElementById('main9'))
- let review = data['sent_poportion'];
- let name = [];
- let set = [];
- for (let i = 0; i < review.length; i++) {
- if (review[i]['all_sent_amount'] != '') {
- name.push(review[i]['sent_review_unit_name'])
- set.push(review[i]['all_sent_amount'])
- }
- }
- const option = {
- tooltip: {
- trigger: 'axis',
- axisPointer: {
- type: 'shadow'
- }
- },
- legend: {
- orient: 'horizontal', //设置图例朝向
- bottom: 'bottom',
- },
- grid: {
- left: '3%',
- right: '4%',
- top: '10%',
- bottom: '15%',
- containLabel: true
- },
- xAxis: {
- type: 'value',
- boundaryGap: [0, 0.01]
- },
- yAxis: {
- axisLine: {
- show: false // 隐藏轴线
- },
- axisTick: {
- show: false // 隐藏分隔线
- },
- type: 'category',
- data: name
- },
- series: [
- {
- name: '送审总额',
- type: 'bar',
- data: set,
- itemStyle: { // 使用方法二的写法
- color: {
- type: 'linear',
- x: 0, //右
- y: 0, //下
- x2: 1, //左
- y2: 0, //上
- colorStops: [
- {
- offset: 0,
- color: 'rgb(72,177,203)' // 0% 处的颜色
- },
- {
- offset: 1,
- color: 'rgb(72,116,203)' // 100% 处的颜色
- }
- ]
- },
- },
- },
- ]
- };
- myChart.setOption(option);
- }
- function echarts_10(data) {
- const myChart = echarts.init(document.getElementById('main10'))
- let review = data['sent_poportion'];
- let set = [];
- for (let i = 0; i < review.length; i++) {
- if (review[i]['all_sent_amount'] != '') {
- set.push({
- value: review[i]['all_sent_amount'],
- name: review[i]['sent_review_unit_name']
- })
- }
- }
- const option = {
- tooltip: {
- trigger: 'item'
- },
- legend: {
- orient: 'horizontal', //设置图例朝向
- bottom: 'bottom'
- },
- grid: {
- left: '3%',
- right: '4%',
- top: '10%',
- bottom: '15%',
- containLabel: true
- },
- series: [
- {
- name: '送审单位送审总额占比图',
- type: 'pie',
- radius: '50%',
- data: set,
- emphasis: {
- itemStyle: {
- shadowBlur: 10,
- shadowOffsetX: 0,
- shadowColor: 'rgba(0, 0, 0, 0.5)'
- }
- }
- }
- ]
- }
- myChart.setOption(option);
- }
|