|
|
@@ -34,8 +34,10 @@ const initChart = () => {
|
|
|
legend: {
|
|
|
data: ['专项发布通报事项数量', '发布同比', '发布环比', '专项接收通报事项数量', '接收同比', '接收环比'],
|
|
|
formatter: name => {
|
|
|
- if (name.includes('发布')) return name.replace('发布', '');
|
|
|
- if (name.includes('接收')) return name.replace('接收', '');
|
|
|
+ if (name.includes('发布同比')) return name.replace('发布', '');
|
|
|
+ if (name.includes('发布环比')) return name.replace('发布', '');
|
|
|
+ if (name.includes('接收同比')) return name.replace('接收', '');
|
|
|
+ if (name.includes('接收环比')) return name.replace('接收', '');
|
|
|
return name;
|
|
|
},
|
|
|
selected: { 发布环比: false, 接收环比: false },
|
|
|
@@ -69,20 +71,39 @@ const initChart = () => {
|
|
|
let html = `<div style="font-weight:bold;margin-bottom:4px;">${filtered[0].name}</div>`;
|
|
|
filtered.forEach((item: any) => {
|
|
|
let percentValue = '';
|
|
|
- if (isfbHuanbi || isjsHuanbi) {
|
|
|
- percentValue = ` 环比: ${item.data.momCount}%`;
|
|
|
- html += `<div style='margin:10px 0'>${item.marker} ${
|
|
|
- item.seriesName
|
|
|
- }: <span style="font-weight:bold;margin-right:50px;">${item.value} 件</span> ${
|
|
|
- item.data.yoyCount + '%'
|
|
|
- } <span style='margin-left:30px;'>${percentValue}</span></div>`;
|
|
|
- } else {
|
|
|
- percentValue = ` 同比: ${item.data.yoyCount}%`;
|
|
|
- html += `<div style='margin:10px 0'>${item.marker} ${
|
|
|
- item.seriesName
|
|
|
- }: <span style="font-weight:bold;margin-right:50px;">${item.value} 件</span>${
|
|
|
- item.data.momCount + '%'
|
|
|
- } <span style='margin-left:30px;'>${percentValue}</div>`;
|
|
|
+ if (item.seriesName === '专项发布通报事项数量') {
|
|
|
+ if (isfbHuanbi) {
|
|
|
+ percentValue = `环比: ${item.data.momCount}%`;
|
|
|
+ html += `<div style='margin:10px 0'>${item.marker} ${
|
|
|
+ item.seriesName
|
|
|
+ }:<span style="font-weight:bold;margin-right:20px;">${item.value} 件</span> ${
|
|
|
+ item.data.yoyCount + '%'
|
|
|
+ }<span style='margin-left:30px;'>${percentValue}</span></div>`;
|
|
|
+ } else {
|
|
|
+ percentValue = `同比: ${item.data.yoyCount}%`;
|
|
|
+ html += `<div style='margin:10px 0'>${item.marker} ${
|
|
|
+ item.seriesName
|
|
|
+ }:<span style="font-weight:bold;margin-right:20px;">${item.value} 件</span>${
|
|
|
+ item.data.momCount + '%'
|
|
|
+ }<span style='margin-left:30px;'>${percentValue}</div>`;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (item.seriesName === '专项接收通报事项数量') {
|
|
|
+ if (isjsHuanbi) {
|
|
|
+ percentValue = `环比: ${item.data.momCount}%`;
|
|
|
+ html += `<div style='margin:10px 0'>${item.marker} ${
|
|
|
+ item.seriesName
|
|
|
+ }:<span style="font-weight:bold;margin-right:20px;">${item.value} 件</span> ${
|
|
|
+ item.data.yoyCount + '%'
|
|
|
+ }<span style='margin-left:30px;'>${percentValue}</span></div>`;
|
|
|
+ } else {
|
|
|
+ percentValue = `同比: ${item.data.yoyCount}%`;
|
|
|
+ html += `<div style='margin:10px 0'>${item.marker} ${
|
|
|
+ item.seriesName
|
|
|
+ }:<span style="font-weight:bold;margin-right:20px;">${item.value} 件</span>${
|
|
|
+ item.data.momCount + '%'
|
|
|
+ }<span style='margin-left:30px;'>${percentValue}</div>`;
|
|
|
+ }
|
|
|
}
|
|
|
});
|
|
|
return html;
|