| | |
| | | } |
| | | |
| | | // 综合看板图 |
| | | export function bar02(val) { |
| | | export function bar02(dataArr, titlenameArr) { |
| | | // console.log(val) |
| | | // const data = [70, 60, 50, 40, 30] |
| | | // const titlename = ['外观划伤', '表面油污', '尺寸', '颜色', '大小'] |
| | | const data = val.map(i => i.cont) |
| | | const titlename = val.map(i => i.checkitem_name) |
| | | // const data = val.map(i => i.cont) |
| | | // const titlename = val.map(i => i.name) |
| | | const data = dataArr |
| | | |
| | | const titlename = titlenameArr |
| | | |
| | | const valdata = [683, 500, 400, 300, 200] |
| | | const myColor = ['#FF0000', '#FF5511', '#FF8800', '#FFBB00', '#FFFF00'] |
| | | // const myColor = ['#FF0000', '#FF5511', '#FF8800', '#FFBB00', '#FFFF00'] |
| | | // const myColor = ['#0000FF'] |
| | | // const myColor = ['#7af5f5', '#00FFFF', '#00FFFF', '#00FFFF', '#00FFFF'] |
| | | const myColor = ['rgba(122,245,245,1)', 'rgba(122,245,245,0.95)', 'rgba(122,245,245,0.9)', 'rgba(122,245,245,0.85)', 'rgba(122,245,245,0.8)'] |
| | | const option = { |
| | | backgroundColor: 'transparent', |
| | | title: { |
| | | text: 'Top5不良', |
| | | x: 'center', |
| | | show: false, |
| | | text: '一周内Top5不良:', |
| | | x: '2%', |
| | | y: '4%', |
| | | textStyle: { |
| | | color: '#fff', |
| | | fontSize: '22' |
| | | color: '#d8d7d9', |
| | | fontSize: '18' |
| | | // fontWeight: 'lighter' |
| | | }, |
| | | subtextStyle: { |
| | | color: '#90979c', |
| | |
| | | } |
| | | }, |
| | | grid: { |
| | | left: '2%', |
| | | right: '2%', |
| | | left: '10%', |
| | | right: '5%', |
| | | bottom: '0%', |
| | | top: '10%', |
| | | containLabel: true |
| | |
| | | show: false |
| | | }, |
| | | axisLabel: { |
| | | // color: '#d8d7d9', |
| | | color: '#fff', |
| | | fontSize: 14, |
| | | formatter: function(value, index) { |
| | | return [ |
| | | '{lg|' + (index + 1) + '、 }' + '{title|' + value + '} ' |
| | | ].join('\n') |
| | | }, |
| | | // formatter: function(value, index) { |
| | | // return [ |
| | | // '{lg|' + (index + 1) + '、 }' + '{title|' + value + '} ' |
| | | // ].join('\n') |
| | | // }, |
| | | rich: { |
| | | lg: { |
| | | // backgroundColor: '#339911', |
| | | // color: '#d8d7d9', |
| | | color: '#fff', |
| | | borderRadius: 15, |
| | | // padding: 5, |
| | |
| | | return option |
| | | } |
| | | |
| | | // 仓库管理看板图 |
| | | // 仓库管理看板图 (弃用) |
| | | export function bar03(titleText) { |
| | | const path = 'path://M214,1079l8-6h16l8,6-8,6H222Z' |
| | | const zzx1 = ['800', '900', '700', '300', '500', '800', '700'] |
| | |
| | | }, |
| | | title: { |
| | | text: titleText, |
| | | x: '70%', |
| | | x: '66%', |
| | | y: '2%', |
| | | textStyle: { |
| | | color: '#fff', |
| | | fontSize: '22' |
| | | // color: '#fff', |
| | | color: '#00ffff', |
| | | fontSize: '18', |
| | | fontWeight: 'lighter' |
| | | }, |
| | | subtextStyle: { |
| | | color: '#90979c', |