|
|
@@ -10,6 +10,7 @@ import { useContentsPositionStore } from '@vben/stores';
|
|
|
const contentsPositionStore = useContentsPositionStore();
|
|
|
|
|
|
const solutions = ref([]);
|
|
|
+const markCount = ref({ all: 0, rollball: 0, today: 0, early: 0 });
|
|
|
const selectedSolutions = reactive([]);
|
|
|
const totalProfit = ref({});
|
|
|
const loopActive = ref(false);
|
|
|
@@ -34,58 +35,58 @@ const headerStyle = computed(() => {
|
|
|
}
|
|
|
});
|
|
|
|
|
|
-const totalProfitValue = computed(() => {
|
|
|
- const { profit = {}, preSolution = {}, subSolution = {}, gamesEvents = {} } = totalProfit.value;
|
|
|
- const sol1 = formatSolution(preSolution, gamesEvents);
|
|
|
- const sol2 = formatSolution(subSolution, gamesEvents);
|
|
|
-
|
|
|
- const psInfo = [];
|
|
|
- const outPreSol = [];
|
|
|
- const outSubSol = [];
|
|
|
-
|
|
|
- const solutions = [sol1, sol2].filter(item => item);
|
|
|
- solutions.forEach((item, index) => {
|
|
|
- const { sol: { ps_index }, cpr } = item;
|
|
|
- const newCpr = [...cpr];
|
|
|
- const ps_info = newCpr.splice(ps_index, 1);
|
|
|
- psInfo.push({ ...ps_info[0] });
|
|
|
- newCpr.forEach((c, i) => {
|
|
|
- let side = '';
|
|
|
- if (ps_index == 0) {
|
|
|
- if (i == 0) {
|
|
|
- side = "B"
|
|
|
- }
|
|
|
- else {
|
|
|
- side = "M";
|
|
|
- }
|
|
|
- }
|
|
|
- else if (ps_index == 1) {
|
|
|
- if (i == 0) {
|
|
|
- side = "A";
|
|
|
- }
|
|
|
- else {
|
|
|
- side = "M";
|
|
|
- }
|
|
|
- }
|
|
|
- else {
|
|
|
- if (i == 0) {
|
|
|
- side = "A";
|
|
|
- }
|
|
|
- else {
|
|
|
- side = "B";
|
|
|
- }
|
|
|
- }
|
|
|
- if (index == 0) {
|
|
|
- outPreSol.push({ ...c, g: profitInfo[`gold${side}${index+1}`] });
|
|
|
- }
|
|
|
- else {
|
|
|
- outSubSol.push({ ...c, g: profitInfo[`gold${side}${index+1}`] });
|
|
|
- }
|
|
|
- })
|
|
|
- });
|
|
|
-
|
|
|
- return { solutions, profit: profitInfo, psInfo, outPreSol, outSubSol };
|
|
|
-});
|
|
|
+// const totalProfitValue = computed(() => {
|
|
|
+// const { profit = {}, preSolution = {}, subSolution = {}, gamesEvents = {} } = totalProfit.value;
|
|
|
+// const sol1 = formatSolution(preSolution, gamesEvents);
|
|
|
+// const sol2 = formatSolution(subSolution, gamesEvents);
|
|
|
+
|
|
|
+// const psInfo = [];
|
|
|
+// const outPreSol = [];
|
|
|
+// const outSubSol = [];
|
|
|
+
|
|
|
+// const solutions = [sol1, sol2].filter(item => item);
|
|
|
+// solutions.forEach((item, index) => {
|
|
|
+// const { sol: { ps_index }, cpr } = item;
|
|
|
+// const newCpr = [...cpr];
|
|
|
+// const ps_info = newCpr.splice(ps_index, 1);
|
|
|
+// psInfo.push({ ...ps_info[0] });
|
|
|
+// newCpr.forEach((c, i) => {
|
|
|
+// let side = '';
|
|
|
+// if (ps_index == 0) {
|
|
|
+// if (i == 0) {
|
|
|
+// side = "B"
|
|
|
+// }
|
|
|
+// else {
|
|
|
+// side = "M";
|
|
|
+// }
|
|
|
+// }
|
|
|
+// else if (ps_index == 1) {
|
|
|
+// if (i == 0) {
|
|
|
+// side = "A";
|
|
|
+// }
|
|
|
+// else {
|
|
|
+// side = "M";
|
|
|
+// }
|
|
|
+// }
|
|
|
+// else {
|
|
|
+// if (i == 0) {
|
|
|
+// side = "A";
|
|
|
+// }
|
|
|
+// else {
|
|
|
+// side = "B";
|
|
|
+// }
|
|
|
+// }
|
|
|
+// if (index == 0) {
|
|
|
+// outPreSol.push({ ...c, g: profitInfo[`gold${side}${index+1}`] });
|
|
|
+// }
|
|
|
+// else {
|
|
|
+// outSubSol.push({ ...c, g: profitInfo[`gold${side}${index+1}`] });
|
|
|
+// }
|
|
|
+// })
|
|
|
+// });
|
|
|
+
|
|
|
+// return { solutions, profit: profitInfo, psInfo, outPreSol, outSubSol };
|
|
|
+// });
|
|
|
|
|
|
const solutionsList = computed(() => {
|
|
|
const startTimestamp = selectedSolutions[0]?.timestamp ?? 0;
|
|
|
@@ -325,8 +326,9 @@ const formatSolution = (solution, eventsList) => {
|
|
|
const updateSolutions = async () => {
|
|
|
clearTimeout(loopTimer.value);
|
|
|
getSolutions()
|
|
|
- .then(({ solutions: solutionsList, gamesEvents: eventsList }) => {
|
|
|
+ .then(({ solutions: solutionsList, gamesEvents: eventsList, mkCount: mkCountData }) => {
|
|
|
solutions.value = solutionsList?.map(solution => formatSolution(solution, eventsList)) ?? [];
|
|
|
+ markCount.value = mkCountData;
|
|
|
})
|
|
|
.catch(error => {
|
|
|
console.error('Failed to update solutions:', error);
|
|
|
@@ -423,10 +425,10 @@ onUnmounted(() => {
|
|
|
<Form layout="inline" class="sol-opt-container">
|
|
|
<Form.Item label="盘口类型" class="sol-opt-item">
|
|
|
<RadioGroup v-model:value="marketType">
|
|
|
- <Radio :value="-1">全部</Radio>
|
|
|
- <Radio :value="2">滚球</Radio>
|
|
|
- <Radio :value="1">今日</Radio>
|
|
|
- <Radio :value="0">早盘</Radio>
|
|
|
+ <Radio :value="-1">全部({{ markCount.all ?? 0 }})</Radio>
|
|
|
+ <Radio :value="2">滚球({{ markCount.rollball ?? 0 }})</Radio>
|
|
|
+ <Radio :value="1">今日({{ markCount.today ?? 0 }})</Radio>
|
|
|
+ <Radio :value="0">早盘({{ markCount.early ?? 0 }})</Radio>
|
|
|
</RadioGroup>
|
|
|
</Form.Item>
|
|
|
<Form.Item label="最小利润率(%)" class="sol-opt-item">
|