export const repaireOptions = [ { title: '巡点检工单', imgUrl: require('../../assets/vector.png'), total: 0, num: 0 }, { title: '保养工单', imgUrl: require('../../assets/vector.png'), total: 0, num: 0 }, { title: '维修工单', imgUrl: require('../../assets/vector.png'), total: 0, num: 0 } ] export const statusList = [ { title: '运行', titleUrl: require('../../assets/title3.png'), numUrl: require('../../assets/num3.png'), color: '#07AF2E ', num: 0, code:'runNumber', }, { title: '维修', color: '#9F9F9F', titleUrl: require('../../assets/title1.png'), numUrl: require('../../assets/num1.png'), code:'repairNumber', num: 0 }, { title: '故障', color: '#C14E4D ', titleUrl: require('../../assets/title2.png'), numUrl: require('../../assets/num2.png'), code:'faultNumber', num: 0 }, { title: '停机', color: '#F4C15E', titleUrl: require('../../assets/title4.png'), numUrl: require('../../assets/num4.png'), code:'shutdownNumber', num: 0 } ] export const rankList = [ { label: '排名', prop: 'rank', width: '20%', }, { prop: 'name', label: '备品备件名称', width: '50%', }, { prop: 'num', label: '消耗数量', width: '30%', }, ]; export const planList = [ { label: '类型', prop: 'type', width: '13%', }, { prop: 'code', label: '编码', width: '30%', }, { prop: 'title', label: '标题', width: '30%', }, { prop: 'userName', label: '申请人', width: '17%', }, { prop: 'action', label: '操作', width: '10%', }, ]; export const barOption = (data, itemStyle = {}) => { return { tooltip: { formatter: '{b}:{c}' + '个', trigger: 'item' }, color: ['#398f4e',], xAxis: { type: 'category', data: data.map(item => item.name), axisLabel: { fontSize: window.innerHeight * 0.012, } }, yAxis: { type: 'value', name: '(个)', nameTextStyle: { align: 'center', color: "#333", fontSize: window.innerHeight * 0.012, padding: [0, 20, -3, 0] }, }, series: [ { // showBackground: true, barWidth: '20%', data: data.map(item => item.value), type: 'bar', itemStyle } ] } } export const pieOption = (data) => { return { color: ['#398f4e', '#458ef7', '#fdc537', '#fe6869', '#975fe6'], tooltip: { formatter: '{b}:{c}' + '%', trigger: 'item' }, legend: { orient: 'vertical', // left: 'center', right: '15%', top: '10%', itemGap: window.innerHeight * 0.014, textStyle: { fontSize: window.innerHeight * 0.013, } }, series: [ { center: ['30%', '50%'], label: { position: 'inside', // show: true, formatter: '{c}' + '%', fontSize: window.innerHeight * 0.013, color: "#fff" }, labelLine: { show: false }, type: 'pie', radius: '85%', itemStyle: { borderWidth: 0, shadowBlur: 10, shadowColor: 'rgba(0, 0, 0, 0.5)' }, data } ] } } export const pieOption1 = (data) => { return { // color: ['#398f4e', '#458ef7', '#fdc537', '#fe6869', '#975fe6'], tooltip: { formatter: '{b}:{c}' + '%', trigger: 'item' }, legend: { orient: 'horizontal', left: 'right', right: '15%', bottom: '5%', itemGap: window.innerHeight * 0.014, textStyle: { fontSize: window.innerHeight * 0.013, } }, series: [ { center: ['62%', '45%'], label: { position: 'outside', show: true, formatter: (item) => { return item.name + ":" + item.value + '%' }, fontSize: window.innerHeight * 0.0125, color: "#333" }, labelLine: { show: true }, type: 'pie', radius: ['39%', '55%'], itemStyle: { borderWidth: 0, shadowBlur: 10, shadowColor: 'rgba(0, 0, 0, 0.5)' }, data } ] } } export const lineOption = (data) => { return { tooltip: { formatter: (item) => { return item.name + ' ' + item.seriesName + ":" + item.value + '万元' }, trigger: 'item' }, legend: { // bottom: '2%', itemGap: window.innerHeight * 0.014, textStyle: { fontSize: window.innerHeight * 0.013, } }, xAxis: { type: 'category', axisLabel: { fontSize: window.innerHeight * 0.012, }, data: [2020, 2021, 2022, 2023, 2024] }, yAxis: { type: 'value' }, series: [ { name: '班组一', data: [40, 45, 36, 45, 56], type: 'line' }, { name: '班组二', data: [32, 33, 43, 56, 46], type: 'line' }, { name: '班组三', data: [47, 43, 41, 65, 36], type: 'line' }, { name: '班组四', data: [51, 56, 39, 54, 41], type: 'line' } ] } }