123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777 |
- let app = new Vue({
- el: '#app',
- data () {
- return {
- time: '',
- timer: '',
- config5: {
- waitTime: 2000,
- header: ["风险类型", "风险说明", '提出人', '时间', '风险等级'],
- data: [
- ["风险等级", "WBS:012工程", "杨志宇", "2022.9.12", '<span class="lightOut"><span class="blue">一级</span></span>'],
- ["风险等级", "WBS:012工程", "杨志宇", "2022.9.12", '<span class="lightOut"><span class="yellow">二级</span></span>'],
- ["风险等级", "WBS:012工程", "杨志宇", "2022.9.12", '<span class="lightOut"><span class="pink">三级</span></span>'],
- ["风险等级", "WBS:012工程", "杨志宇", "2022.9.12", '<span class="lightOut"><span class="blue">一级</span></span>'],
- ["风险等级", "WBS:012工程", "杨志宇", "2022.9.12", '<span class="lightOut"><span class="yellow">二级</span></span>'],
- ["风险等级", "WBS:012工程", "杨志宇", "2022.9.12", '<span class="lightOut"><span class="pink">三级</span></span>']
- ],
- align: ["center", "center", "center", "center", "center"],
- headerBGC: "#1C537D",
- oddRowBGC: "#09335C"
- },
- }
- },
- created () {
- this.time = formatDate()
- this.timer = setInterval(() => {
- this.time = formatDate()
- }, 1000)
- },
- beforeDestroy () {
- if (this.timer) {
- clearInterval(this.timer);
- }
- },
- mounted () {
- setTimeout(() => {
- this.initChartL1()
- this.initChartL2()
- this.initChartL3()
- this.initChartL4()
- this.initChartL5()
- this.initChartL6()
- this.aiQualityECharts();
- this.aiQualityECharts2();
- })
- },
- methods: {
- initChartL1 () {
- let myChart = echarts.init(this.$refs['tl1'])
- let option = {
- grid: {
- top: 0,
- right: 0,
- left: 0,
- bottom: 0,
- },
- tooltip: {
- trigger: 'item',
- },
- color: ['#6682f5', '#40A9FF'],
- legend: {
- // icon: 'circle',
- bottom: 0,
- left: 'center',
- // itemHeight: 10,
- // itemWidth: 10,
- textStyle: {
- color: '#9DB9EB',
- },
- },
- graphic: {
- elements: [{
- type: "text",
- left: "center",
- top: "77%",
- style: {
- text: "投资类别",
- textAlign: "center",
- fill: "#fff",
- fontSize: 15,
- fontWeight: 500
- }
- }]
- },
- series: [
- {
- center: ['50%', '40%'],
- radius: ['45%', '60%'],
- name: '',
- type: 'pie',
- labelLine: {
- normal: {
- lineStyle: {
- width: 1,
- },
- },
- },
- label: {
- show: false,
- position: 'center'
- },
- data: [
- { value: 1048, name: '数据1' },
- { value: 735, name: '数据2' }
- ],
- },
- ],
- }
- tools.loopShowTooltip(myChart, option, {
- interval: 2000,
- loopSeries: true,
- });
- myChart.setOption(option)
- },
- initChartL2 () {
- let myChart = echarts.init(this.$refs['tl2'])
- let option = {
- grid: {
- top: 0,
- right: 0,
- left: 0,
- bottom: 0,
- },
- tooltip: {
- trigger: 'item',
- },
- color: ['#40A9FF', '#45DAD1'],
- legend: {
- bottom: 0,
- left: 'center',
- textStyle: {
- color: '#9DB9EB',
- },
- },
- graphic: {
- elements: [{
- type: "text",
- left: "center",
- top: "77%",
- style: {
- text: "投资阶段",
- textAlign: "center",
- fill: "#fff",
- fontSize: 15,
- fontWeight: 500
- }
- }]
- },
- series: [
- {
- center: ['50%', '40%'],
- radius: ['45%', '60%'],
- name: '',
- type: 'pie',
- labelLine: {
- normal: {
- lineStyle: {
- width: 1,
- },
- },
- },
- label: {
- show: false,
- position: 'center'
- },
- data: [
- { value: 1048, name: '数据1' },
- { value: 735, name: '数据2' }
- ],
- },
- ],
- }
- tools.loopShowTooltip(myChart, option, {
- interval: 2500,
- loopSeries: true,
- });
- myChart.setOption(option)
- },
- initChartL3 () {
- let myChart = echarts.init(this.$refs['tl3'])
- let option = {
- grid: {
- top: 0,
- right: 0,
- left: 0,
- bottom: 0,
- },
- tooltip: {
- trigger: 'item',
- },
- color: ['#40A9FF', '#8BA2FF'],
- legend: {
- bottom: 0,
- left: 'center',
- textStyle: {
- color: '#9DB9EB',
- },
- },
- graphic: {
- elements: [{
- type: "text",
- left: "center",
- top: "77%",
- style: {
- text: "管理类别",
- textAlign: "center",
- fill: "#fff",
- fontSize: 15,
- fontWeight: 500
- }
- }]
- },
- series: [
- {
- center: ['50%', '40%'],
- radius: ['45%', '60%'],
- name: '',
- type: 'pie',
- labelLine: {
- normal: {
- lineStyle: {
- width: 1,
- },
- },
- },
- label: {
- show: false,
- position: 'center'
- },
- data: [
- { value: 1048, name: '数据1' },
- { value: 735, name: '数据2' }
- ],
- },
- ],
- }
- tools.loopShowTooltip(myChart, option, {
- interval: 3000,
- loopSeries: true,
- });
- myChart.setOption(option)
- },
- initChartL4 () {
- let myChart = echarts.init(this.$refs['tl4'])
- let option = {
- grid: {
- top: 0,
- right: 0,
- left: 0,
- bottom: 0,
- },
- tooltip: {
- trigger: 'item',
- },
- color: ['#45DAD1', '#40A9FF'],
- legend: {
- bottom: 0,
- left: 'center',
- textStyle: {
- color: '#9DB9EB',
- },
- },
- graphic: {
- elements: [{
- type: "text",
- left: "center",
- top: "77%",
- style: {
- text: "投资领域",
- textAlign: "center",
- fill: "#fff",
- fontSize: 15,
- fontWeight: 500
- }
- }]
- },
- series: [
- {
- center: ['50%', '40%'],
- radius: ['45%', '60%'],
- name: '',
- type: 'pie',
- labelLine: {
- normal: {
- lineStyle: {
- width: 1,
- },
- },
- },
- label: {
- show: false,
- position: 'center'
- },
- data: [
- { value: 1048, name: '数据1' },
- { value: 735, name: '数据2' }
- ],
- },
- ],
- }
- tools.loopShowTooltip(myChart, option, {
- interval: 3500,
- loopSeries: true,
- });
- myChart.setOption(option)
- },
- initChartL5 () {
- let myChart = echarts.init(this.$refs['cl1'])
- let option = {
- grid: {
- top: 0,
- right: 0,
- left: 0,
- bottom: 0,
- },
- tooltip: {
- trigger: 'item',
- },
- color: ['#45DAD1', '#40A9FF'],
- legend: {
- bottom: 0,
- left: 'center',
- textStyle: {
- color: '#9DB9EB',
- },
- },
- graphic: {
- elements: [{
- type: "text",
- left: "center",
- top: "77%",
- style: {
- text: "投资情况",
- textAlign: "center",
- fill: "#fff",
- fontSize: 15,
- fontWeight: 500
- }
- }]
- },
- series: [
- {
- center: ['50%', '40%'],
- radius: ['45%', '60%'],
- name: '',
- type: 'pie',
- labelLine: {
- normal: {
- lineStyle: {
- width: 1,
- },
- },
- },
- label: {
- show: false,
- position: 'center'
- },
- data: [
- { value: 1048, name: '数据1' },
- { value: 735, name: '数据2' }
- ],
- },
- ],
- }
- tools.loopShowTooltip(myChart, option, {
- interval: 4000,
- loopSeries: true,
- });
- myChart.setOption(option)
- },
- initChartL6 () {
- let myChart = echarts.init(this.$refs['cr1'])
- option = {
- title: {
- text: ''
- },
- legend: {
- data: ['类型1', '类型2', '类型3', '类型4', '类型5'],
- bottom: 0,
- left: 'center',
- textStyle: {
- color: '#9DB9EB',
- },
- },
- splitArea: { // 坐标轴在 grid 区域中的分隔区域,默认不显示。
- show: true,
- areaStyle: { // 分隔区域的样式设置。
- color: ['yellow'],
- // 分隔区域颜色。分隔区域会按数组中颜色的顺序依次循环设置颜色。默认是一个深浅的间隔色。
- }
- },
- radar: {
- // shape: 'circle',
- center: ['50%', '50%'],
- radius: 60,
- indicator: [
- { name: '类型1', max: 100000 },
- { name: '类型2', max: 100000 },
- { name: '类型3', max: 100000 },
- { name: '类型4', max: 100000 },
- { name: '类型5', max: 100000 },
- ],
- axisLine: { // 设置雷达图中间射线的颜色
- lineStyle: {
- color: '#c0c0c0',
- },
- },
- splitLine: { //网格颜色设置
- show: true,
- lineStyle: {
- width: 1,
- color: '#1e83e4',
- },
- },
- splitArea: { //设置图表颜色,show的值为true
- show: false,
- areaStyle: {
- // color:"#c1ddf8", //一般设置方式
- //设置渐变背景色 new echarts.graphic.LinearGradient(a,b,c,d,arr)
- //a ,b,c,d值可为0,1 a:1表示arr中的颜色右到左;c:1 arr中的颜色左到右
- //b:1表示arr中的颜色下到上;d:1表示arr中的颜色上到下
- color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
- { offset: 0, color: '#c1ddf8' }, // 0% 处的颜色
- { offset: 1, color: '#1e83e4' }// 100% 处的颜色
- ], false)
- }
- }
- },
- series: [
- {
- name: '',
- type: 'radar',
- symbol: 'circle', // 单个数值点的样式,还可以取值'rect','angle'等
- symbolSize: 0, // 数值点的大小
- data: [
- {
- value: [4200, 3000, 20000, 35000, 50000, 18000],
- name: '类型1',
- itemStyle: { //该数值区域样式设置
- normal: {
- color: '#2CC6FF', //背景颜色,还需设置areaStyle
- lineStyle: {
- color: '#2CC6FF', //边框颜色
- },
- },
- },
- label: { //显示value中具体的数值
- normal: {
- show: false,
- textStyle: { //更改数值样式
- color: '#43EDE3'
- }
- },
- },
- areaStyle: { //设置区域背景颜色透明度
- normal: {
- width: 1,
- opacity: 0.8,
- },
- },
- },
- {
- value: [8000, 3000, 38000, 76000, 32000, 71000],
- name: '类型2',
- itemStyle: { //该数值区域样式设置
- normal: {
- color: '#D87AFF', //背景颜色,还需设置areaStyle
- lineStyle: {
- color: '#2CC6FF', //边框颜色
- },
- },
- },
- label: { //显示value中具体的数值
- normal: {
- show: false,
- textStyle: { //更改数值样式
- color: '#43EDE3'
- }
- },
- },
- areaStyle: { //设置区域背景颜色透明度
- normal: {
- width: 1,
- opacity: 0.8,
- },
- },
- }
- ]
- }
- ]
- };
- tools.loopShowTooltip(myChart, option, {
- interval: 2000,
- loopSeries: true,
- });
- myChart.setOption(option)
- },
- aiQualityECharts () {
- let chart = echarts.init(document.getElementById("aiQuality"));
- let option = {
- grid: {
- top: 35,
- right: 40,
- left: 60,
- bottom: 20,
- },
- tooltip: {
- show: true,
- trigger: "axis",
- axisPointer: {
- // 坐标轴指示器,坐标轴触发有效
- type: "shadow", // 默认为直线,可选为:'line' | 'shadow'
- },
- },
- xAxis: {
- data: ["集团本部", "晋能控股", "潞安化工", "华阳新材", "山西文旅", "太重集团", "山焦人力", "华远陆港", "汾酒集团", "云时代"],
- axisTick: {
- show: false,
- },
- // x轴的字体颜色
- axisLabel: {
- textStyle: {
- color: "white",
- },
- },
- //y轴线的颜色以及宽度
- axisLine: {
- show: true,
- lineStyle: {
- color: "#1E5389",
- width: 1,
- type: "solid",
- },
- },
- },
- yAxis: {
- name: '亿元',
- nameTextStyle: {//y轴上方单位的颜色
- color: '#fff',
- },
- axisTick: {
- lineStyle: {
- color: "#18416F",
- },
- },
- // y轴的字体颜色
- axisLabel: {
- textStyle: {
- color: "white",
- },
- },
- splitLine: {
- show: false,
- lineStyle: {
- color: "#204561",
- width: 1,
- type: "dotted",
- },
- },
- //y轴线的颜色以及宽度
- axisLine: {
- show: true,
- lineStyle: {
- color: "#1E5389",
- width: 1,
- type: "solid",
- },
- },
- },
- series: [
- {
- name: "计划投资额",
- type: "bar",
- data: [1200, 680, 562, 268, 717, 843, 987, 126, 723, 569],
- showBackground: false,
- backgroundStyle: {
- color: "#18416F",
- },
- barWidth: "10%",
- itemStyle: {
- barBorderRadius: [10, 10, 0, 0],
- color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
- {
- offset: 0,
- color: "#132543",
- }, //柱图渐变色
- {
- offset: 1,
- color: "#897DFF",
- },
- ]),
- },
- },
- {
- name: "实际投资额",
- type: "bar",
- data: [658, 1125, 658, 999, 643, 675, 743, 724, 733, 725],
- showBackground: false,
- backgroundStyle: {
- color: "#18416F",
- },
- barWidth: "10%",
- itemStyle: {
- barBorderRadius: [10, 10, 0, 0],
- color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
- {
- offset: 0,
- color: "#132543",
- }, //柱图渐变色
- {
- offset: 1,
- color: "#FED95B",
- },
- ]),
- },
- },
- ],
- legend: {
- data: ["计划投资额", "实际投资额"],
- textStyle: {
- // 图列内容样式
- color: "#fff", // 字体颜色
- // fontSize: "10",
- },
- right: 30,
- icon: "roundRect",
- // 小图标的宽高
- itemHeight: 5,
- },
- };
- chart.setOption(option);
- tools.loopShowTooltip(chart, option, {
- interval: 2000,
- loopSeries: true,
- });
- },
- aiQualityECharts2 () {
- let chart = echarts.init(document.getElementById("aiQuality2"));
- let option = {
- grid: {
- top: 35,
- right: 40,
- left: 60,
- bottom: 20,
- },
- tooltip: {
- show: true,
- trigger: "axis",
- axisPointer: {
- // 坐标轴指示器,坐标轴触发有效
- type: "shadow", // 默认为直线,可选为:'line' | 'shadow'
- },
- },
- xAxis: {
- data: ["工程费用", "设备费用", "人员费用", "材料费用", "管理费用"],
- axisTick: {
- show: false,
- },
- // x轴的字体颜色
- axisLabel: {
- textStyle: {
- color: "white",
- },
- },
- //y轴线的颜色以及宽度
- axisLine: {
- show: true,
- lineStyle: {
- color: "#1E5389",
- width: 1,
- type: "solid",
- },
- },
- },
- yAxis: {
- name: '亿元',
- nameTextStyle: {//y轴上方单位的颜色
- color: '#fff',
- },
- axisTick: {
- lineStyle: {
- color: "#18416F",
- },
- },
- // y轴的字体颜色
- axisLabel: {
- textStyle: {
- color: "white",
- },
- },
- splitLine: {
- show: false,
- lineStyle: {
- color: "#204561",
- width: 1,
- type: "dotted",
- },
- },
- //y轴线的颜色以及宽度
- axisLine: {
- show: true,
- lineStyle: {
- color: "#1E5389",
- width: 1,
- type: "solid",
- },
- },
- },
- series: [
- {
- name: "预算金额",
- type: "bar",
- data: [843, 987, 126, 723, 569],
- showBackground: false,
- backgroundStyle: {
- color: "#18416F",
- },
- barWidth: "10%",
- itemStyle: {
- barBorderRadius: [10, 10, 0, 0],
- color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
- {
- offset: 0,
- color: "#132543",
- }, //柱图渐变色
- {
- offset: 1,
- color: "#40A9FF",
- },
- ]),
- },
- },
- {
- name: "实际金额",
- type: "bar",
- data: [675, 743, 724, 733, 725],
- showBackground: false,
- backgroundStyle: {
- color: "#18416F",
- },
- barWidth: "10%",
- itemStyle: {
- barBorderRadius: [10, 10, 0, 0],
- color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
- {
- offset: 0,
- color: "#132543",
- }, //柱图渐变色
- {
- offset: 1,
- color: "#45DAD1",
- },
- ]),
- },
- },
- ],
- legend: {
- data: ["预算金额", "实际金额"],
- textStyle: {
- // 图列内容样式
- color: "#fff", // 字体颜色
- // fontSize: "10",
- },
- right: 30,
- icon: "roundRect",
- // 小图标的宽高
- itemHeight: 5,
- },
- };
- chart.setOption(option);
- tools.loopShowTooltip(chart, option, {
- interval: 2000,
- loopSeries: true,
- });
- }
- },
- })
|