修改界面

master
夜笙歌 4 years ago
parent 050f6575b6
commit 48ca34344d

File diff suppressed because one or more lines are too long

@ -10,14 +10,16 @@ $(() => {
const request = () => {
// 目标
$.post(url + "/selectProductInByTeam/0", {}, data => {
$.post(url + "/selectProductInTarget", {}, data => {
data = JSON.parse(data)
target.topTips = data.find(val => val.name == "进度目标").qty
let arr = []
for (let i = 0; i < 12; i++) {
arr.push(Math.ceil(target.topTips / 11))
}
arr[2] = Math.ceil(target.topTips / 22)
arr[7] = Math.ceil(target.topTips / 22)
arr[0] = arr[0] - (arr.reduce((val1, val2) => val1 + val2, 0) - target.topTips)
target.top = arr
target.topProgress = arr.reduce((val1, val2) => val1 + val2, 0)
Tips('#Tips')
@ -46,7 +48,7 @@ $(() => {
target.topReality = data.map(val => val.qty).reduce((val1, val2) => val1 + val2, 0)
target.topGap = target.topProgress - target.topReality
if (target.topProgress != 0){
target.topRate = ((target.topGap / target.topProgress).toFixed(4) * 100 + '').substring(0, 5)
target.topRate = ((target.topReality / target.topProgress).toFixed(4) * 100 + '').substring(0, 5)
}else{
target.topRate = 0
}

@ -1584,6 +1584,8 @@ const singleVerticalBarChart = function (data, id) {
}
const singleVerticalBarChartTwo = function (data, id) {
let charts = echarts.init(id);
let walk =
'path://M29.902,23.275c1.86,0,3.368-1.506,3.368-3.365c0-1.859-1.508-3.365-3.368-3.365 c-1.857,0-3.365,1.506-3.365,3.365C26.537,21.769,28.045,23.275,29.902,23.275z M36.867,30.74c-1.666-0.467-3.799-1.6-4.732-4.199 c-0.932-2.6-3.131-2.998-4.797-2.998s-7.098,3.894-7.098,3.894c-1.133,1.001-2.1,6.502-0.967,6.769 c1.133,0.269,1.266-1.533,1.934-3.599c0.666-2.065,3.797-3.466,3.797-3.466s0.201,2.467-0.398,3.866 c-0.599,1.399-1.133,2.866-1.467,6.198s-1.6,3.665-3.799,6.266c-2.199,2.598-0.6,3.797,0.398,3.664 c1.002-0.133,5.865-5.598,6.398-6.998c0.533-1.397,0.668-3.732,0.668-3.732s0,0,2.199,1.867c2.199,1.865,2.332,4.6,2.998,7.73 s2.332,0.934,2.332-0.467c0-1.401,0.269-5.465-1-7.064c-1.265-1.6-3.73-3.465-3.73-5.265s1.199-3.732,1.199-3.732 c0.332,1.667,3.335,3.065,5.599,3.399C38.668,33.206,38.533,31.207,36.867,30.74z';
if (!data) {
data = {
xName: ['0时', '2时', '4时', '6时', '8时', '10时', '12时', '14时'],
@ -1673,22 +1675,22 @@ const singleVerticalBarChartTwo = function (data, id) {
barMaxWidth: 'auto',
barWidth: 1.5 * vw,
label: {
show: true,
position: 'top',
// distance: 10,
color: '#fff',
formatter: '{a|}',
rich: {
a: {
width: 3 * vw,
height: 3 * vw,
backgroundColor: {
image: 'http://10.100.70.5:9090/profile/upload/2022/07/22/%E9%99%88%E5%A6%82%E5%8D%8E_20220722161444A002.jpeg'
},
},
}
},
// label: {
// show: true,
// position: 'top',
// // distance: 10,
// color: '#fff',
// formatter: '{a|}',
// rich: {
// a: {
// width: 3 * vw,
// height: 3 * vw,
// backgroundColor: {
// image: 'http://10.100.70.5:9090/profile/upload/2022/07/22/%E9%99%88%E5%A6%82%E5%8D%8E_20220722161444A002.jpeg'
// },
// },
// }
// },
},
{
data: data.yData,
@ -1711,7 +1713,26 @@ const singleVerticalBarChartTwo = function (data, id) {
symbolOffset: [0 + '%', '-20%'],
symbolSize: [1.5 * vw, 10],
zlevel: 4,
}],
},
{
type: 'pictorialBar',
name: 'pictorial element',
symbol: function(val,index){
console.log(val)
console.log(index)
// return walk
},
symbolSize: [50, 120],
z: 10,
data: [
{
value: 60,
symbolPosition: 'end',
symbolOffset: [0, '-100%']
}
]
},
],
};
if (data.xName.length > 10) {
option.dataZoom.push({

Loading…
Cancel
Save