| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285 |
- 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'
- }
- ]
- }
- }
|