|
@@ -35,30 +35,30 @@ const emit = defineEmits(['toggle']);
|
|
|
|
|
|
|
|
const selectedIndex = ref(0);
|
|
const selectedIndex = ref(0);
|
|
|
|
|
|
|
|
-// const PS_IOR_KEYS = [
|
|
|
|
|
-// ['0', 'ior_mh', 'ior_mn', 'ior_mc'],
|
|
|
|
|
-// ['-1', 'ior_rh_15', 'ior_wmh_1', 'ior_rac_05'],
|
|
|
|
|
-// ['-2', 'ior_rh_25', 'ior_wmh_2', 'ior_rac_15'],
|
|
|
|
|
-// ['-3', 'ior_rh_35', 'ior_wmh_3', 'ior_rac_25'],
|
|
|
|
|
-// // ['-4', 'ior_rh_45', 'ior_wmh_4', 'ior_rac_35'],
|
|
|
|
|
-// // ['-5', 'ior_rh_55', 'ior_wmh_5', 'ior_rac_45'],
|
|
|
|
|
-// ['+1', 'ior_rah_05', 'ior_wmc_1', 'ior_rc_15'],
|
|
|
|
|
-// ['+2', 'ior_rah_15', 'ior_wmc_2', 'ior_rc_25'],
|
|
|
|
|
-// ['+3', 'ior_rah_25', 'ior_wmc_3', 'ior_rc_35'],
|
|
|
|
|
-// // ['+4', 'ior_rah_35', 'ior_wmc_4', 'ior_rc_45'],
|
|
|
|
|
-// // ['+5', 'ior_rah_45', 'ior_wmc_5', 'ior_rc_55'],
|
|
|
|
|
-// ['ou_05', 'ior_ouc_05', '-', 'ior_ouh_05'],
|
|
|
|
|
-// ['ou_15', 'ior_ouc_15', '-', 'ior_ouh_15'],
|
|
|
|
|
-// ['ou_25', 'ior_ouc_25', '-', 'ior_ouh_25'],
|
|
|
|
|
-// ['ou_35', 'ior_ouc_35', '-', 'ior_ouh_35'],
|
|
|
|
|
-// ['ot_1', '-', 'ior_ot_1', '-'],
|
|
|
|
|
-// ['ot_2', '-', 'ior_ot_2', '-'],
|
|
|
|
|
-// ['ot_3', '-', 'ior_ot_3', '-'],
|
|
|
|
|
-// ['ot_4', '-', 'ior_ot_4', '-'],
|
|
|
|
|
-// ['ot_5', '-', 'ior_ot_5', '-'],
|
|
|
|
|
-// // ['ot_6', '-', 'ior_ot_6', '-'],
|
|
|
|
|
-// // ['ot_7', '-', 'ior_ot_7', '-'],
|
|
|
|
|
-// ];
|
|
|
|
|
|
|
+const PS_IOR_KEYS = [
|
|
|
|
|
+ ['0', 'ior_mh', 'ior_mn', 'ior_mc'],
|
|
|
|
|
+ ['-1', 'ior_rh_15', 'ior_wmh_1', 'ior_rac_05'],
|
|
|
|
|
+ ['-2', 'ior_rh_25', 'ior_wmh_2', 'ior_rac_15'],
|
|
|
|
|
+ ['-3', 'ior_rh_35', 'ior_wmh_3', 'ior_rac_25'],
|
|
|
|
|
+ // ['-4', 'ior_rh_45', 'ior_wmh_4', 'ior_rac_35'],
|
|
|
|
|
+ // ['-5', 'ior_rh_55', 'ior_wmh_5', 'ior_rac_45'],
|
|
|
|
|
+ ['+1', 'ior_rah_05', 'ior_wmc_1', 'ior_rc_15'],
|
|
|
|
|
+ ['+2', 'ior_rah_15', 'ior_wmc_2', 'ior_rc_25'],
|
|
|
|
|
+ ['+3', 'ior_rah_25', 'ior_wmc_3', 'ior_rc_35'],
|
|
|
|
|
+ // ['+4', 'ior_rah_35', 'ior_wmc_4', 'ior_rc_45'],
|
|
|
|
|
+ // ['+5', 'ior_rah_45', 'ior_wmc_5', 'ior_rc_55'],
|
|
|
|
|
+ ['ou_05', 'ior_ouc_05', '-', 'ior_ouh_05'],
|
|
|
|
|
+ ['ou_15', 'ior_ouc_15', '-', 'ior_ouh_15'],
|
|
|
|
|
+ ['ou_25', 'ior_ouc_25', '-', 'ior_ouh_25'],
|
|
|
|
|
+ ['ou_35', 'ior_ouc_35', '-', 'ior_ouh_35'],
|
|
|
|
|
+ ['ot_1', '-', 'ior_ot_1', '-'],
|
|
|
|
|
+ ['ot_2', '-', 'ior_ot_2', '-'],
|
|
|
|
|
+ ['ot_3', '-', 'ior_ot_3', '-'],
|
|
|
|
|
+ ['ot_4', '-', 'ior_ot_4', '-'],
|
|
|
|
|
+ ['ot_5', '-', 'ior_ot_5', '-'],
|
|
|
|
|
+ // ['ot_6', '-', 'ior_ot_6', '-'],
|
|
|
|
|
+ // ['ot_7', '-', 'ior_ot_7', '-'],
|
|
|
|
|
+];
|
|
|
|
|
|
|
|
const fixFloat = (number, x = 2) => {
|
|
const fixFloat = (number, x = 2) => {
|
|
|
return parseFloat(number.toFixed(x));
|
|
return parseFloat(number.toFixed(x));
|
|
@@ -103,27 +103,28 @@ const parseIorKey = (iorKey) => {
|
|
|
return { type, side, ratio };
|
|
return { type, side, ratio };
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// const formatPsEvents = (events) => {
|
|
|
|
|
-// return PS_IOR_KEYS.map(([label, ...keys]) => {
|
|
|
|
|
-// const labelParts = label.split('_');
|
|
|
|
|
-// const labelType = labelParts[0];
|
|
|
|
|
-// if (labelType === 'ou') {
|
|
|
|
|
-// const labelRatio = parseRatio(labelParts[1]);
|
|
|
|
|
-// label = `ou_${labelRatio}`;
|
|
|
|
|
-// }
|
|
|
|
|
-// const match = keys.map(key => ({
|
|
|
|
|
-// key,
|
|
|
|
|
-// value: events[key]?.v ?? 0,
|
|
|
|
|
-// origin: events[key]?.r
|
|
|
|
|
-// }));
|
|
|
|
|
-// return {
|
|
|
|
|
-// label,
|
|
|
|
|
-// match
|
|
|
|
|
-// };
|
|
|
|
|
-// })
|
|
|
|
|
-// // .filter(item => item.match.every(entry => entry.value !== 0))
|
|
|
|
|
-// .map(({label, match}) => [label, ...match]);
|
|
|
|
|
-// }
|
|
|
|
|
|
|
+const formatPsEvents = (events) => {
|
|
|
|
|
+ return PS_IOR_KEYS.map(([label, ...keys]) => {
|
|
|
|
|
+ const labelParts = label.split('_');
|
|
|
|
|
+ const labelType = labelParts[0];
|
|
|
|
|
+ if (labelType === 'ou') {
|
|
|
|
|
+ const labelRatio = parseRatio(labelParts[1]);
|
|
|
|
|
+ label = `ou_${labelRatio}`;
|
|
|
|
|
+ }
|
|
|
|
|
+ const match = keys.map(key => ({
|
|
|
|
|
+ key,
|
|
|
|
|
+ value: events[key]?.v ?? 0,
|
|
|
|
|
+ origin: events[key]?.r,
|
|
|
|
|
+ qualified: events[key]?.q ?? 1,
|
|
|
|
|
+ }));
|
|
|
|
|
+ return {
|
|
|
|
|
+ label,
|
|
|
|
|
+ match
|
|
|
|
|
+ };
|
|
|
|
|
+ })
|
|
|
|
|
+ // .filter(item => item.match.every(entry => entry.value !== 0))
|
|
|
|
|
+ .map(({label, match}) => [label, ...match]);
|
|
|
|
|
+}
|
|
|
|
|
|
|
|
const formatEvents = (events) => {
|
|
const formatEvents = (events) => {
|
|
|
const eventsMap = {};
|
|
const eventsMap = {};
|
|
@@ -253,8 +254,8 @@ const currentRelation = computed(() => {
|
|
|
relation.rel = {};
|
|
relation.rel = {};
|
|
|
}
|
|
}
|
|
|
const mergedEvents = { ...events, ...special };
|
|
const mergedEvents = { ...events, ...special };
|
|
|
- // const formattedEvents = platform === 'ps' ? formatPsEvents(mergedEvents) : formatEvents(mergedEvents);
|
|
|
|
|
- const formattedEvents = formatEvents(mergedEvents);
|
|
|
|
|
|
|
+ const formattedEvents = platform === 'ps' ? formatPsEvents(mergedEvents) : formatEvents(mergedEvents);
|
|
|
|
|
+ // const formattedEvents = formatEvents(mergedEvents);
|
|
|
relation.rel[platform] = {
|
|
relation.rel[platform] = {
|
|
|
eventId: eventId ?? 0,
|
|
eventId: eventId ?? 0,
|
|
|
teamHomeName: teamHomeName ?? '主队',
|
|
teamHomeName: teamHomeName ?? '主队',
|