|
|
@ -1,6 +1,6 @@ |
|
|
|
<template> |
|
|
|
<div class="rightClass"> |
|
|
|
<el-row :gutter="8"> |
|
|
|
<el-row :gutter="2"> |
|
|
|
<el-col :span="9"> |
|
|
|
<el-card style="height: 100%;"> |
|
|
|
<template #header> |
|
|
@ -55,10 +55,15 @@ |
|
|
|
<el-col :span="9"> |
|
|
|
<el-card style="height: 100%;"> |
|
|
|
<template #header> |
|
|
|
<span>{{ resultTitle }} </span> |
|
|
|
<span>{{ resultTitle ? resultTitle + "元" : "" }} </span> |
|
|
|
</template> |
|
|
|
<div> |
|
|
|
<el-input v-model="rightText" :rows="rowLines" type="textarea" disabled placeholder="请点击左侧的统计数据" /> |
|
|
|
<!-- <el-input v-model="rightText" :rows="rowLines" type="textarea" disabled placeholder="请点击左侧的统计数据" /> --> |
|
|
|
<el-table :data="rightTableData" style="width: 100%" height="calc(100vh - 184px)" border> |
|
|
|
<el-table-column prop="haoma" label="号码" width="60" /> |
|
|
|
<el-table-column prop="wanfa" label="玩法" /> |
|
|
|
<el-table-column prop="jine" label="金额" width="60" /> |
|
|
|
</el-table> |
|
|
|
</div> |
|
|
|
<template #footer> |
|
|
|
<div style="text-align: center;"> |
|
|
@ -237,18 +242,19 @@ export default { |
|
|
|
return { |
|
|
|
_: _, |
|
|
|
dayjs: dayjs, |
|
|
|
leftText: `一单一组:684,784,876共12 |
|
|
|
单:784,961,637共6元 |
|
|
|
组:214,315共4元 |
|
|
|
组六:1269共10元 |
|
|
|
组六:12069共10元 |
|
|
|
组六:120769共10元 |
|
|
|
组三:874共10元 |
|
|
|
毒:6共10元 |
|
|
|
双飞:98共10元 |
|
|
|
定位:324共10元 |
|
|
|
全包对子:共10元 |
|
|
|
`, |
|
|
|
leftText: ``, |
|
|
|
// leftText: `一单一组:684,784,876共12 |
|
|
|
// 单:784,961,637共6元 |
|
|
|
// 组:214,315共4元 |
|
|
|
// 组六:1269共10元 |
|
|
|
// 组六:12069共10元 |
|
|
|
// 组六:120769共10元 |
|
|
|
// 组三:874共10元 |
|
|
|
// 毒:6共10元 |
|
|
|
// 双飞:98共10元 |
|
|
|
// 定位:324共10元 |
|
|
|
// 全包对子:共10元 |
|
|
|
// `, |
|
|
|
placeholderLeftText: |
|
|
|
`一单一组:684,784,876共12 |
|
|
|
单:784,961,637共6元 |
|
|
@ -274,7 +280,8 @@ export default { |
|
|
|
// 定位:324共共10 |
|
|
|
// 全包对子:共10元`, |
|
|
|
rightText: "", |
|
|
|
resultTitle: "", |
|
|
|
rightTableData: [], |
|
|
|
resultTitle: 0, |
|
|
|
changciList: [], |
|
|
|
changciValue: "", |
|
|
|
headerList: [], |
|
|
@ -666,7 +673,57 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
let groupByName = _.groupBy(haomaList, 'name') |
|
|
|
|
|
|
|
|
|
|
|
let rightDataList = [] |
|
|
|
for (let i = 0; i < haomaList.length; i++) { |
|
|
|
let element = haomaList[i]; |
|
|
|
for (let j = 0; j < element.numbers.length; j++) { |
|
|
|
let numberItem = element.numbers[j]; |
|
|
|
if (numberItem.value.length) { |
|
|
|
for (let k = 0; k < numberItem.value.length; k++) { |
|
|
|
let valueItem = numberItem.value[k]; |
|
|
|
rightDataList.push({ |
|
|
|
name: `${element.name.slice(1, 9)}`, |
|
|
|
type: element.type, |
|
|
|
value: valueItem, |
|
|
|
jine: numberItem.jine |
|
|
|
}) |
|
|
|
} |
|
|
|
} else if (numberItem.type === "quanbaoduizi") { |
|
|
|
rightDataList.push({ |
|
|
|
name: `${element.name.slice(1, 9)}`, |
|
|
|
type: element.type, |
|
|
|
value: "全包对子", |
|
|
|
jine: numberItem.jine |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
let rightDataObj = _.groupBy(rightDataList, 'value') |
|
|
|
console.log(777, rightDataObj) |
|
|
|
let rightObj = {} |
|
|
|
let rightTextTemp = `号码---------玩法---------金额\n` |
|
|
|
this.rightTableData = [] |
|
|
|
this.resultTitle = 0 |
|
|
|
for (let key in rightDataObj) { |
|
|
|
let value = rightDataObj[key] |
|
|
|
let textTemp = [] |
|
|
|
let alljine = 0 |
|
|
|
for (let i = 0; i < value.length; i++) { |
|
|
|
let element = value[i]; |
|
|
|
textTemp.push(`${element.name}(${element.jine}元)`) |
|
|
|
alljine += Number(element.jine) |
|
|
|
} |
|
|
|
this.resultTitle += alljine |
|
|
|
this.rightTableData.push({ |
|
|
|
haoma: key, |
|
|
|
wanfa: _.join(textTemp, "、"), |
|
|
|
jine: `${alljine}元` |
|
|
|
}) |
|
|
|
rightTextTemp += `${key}-------${_.join(textTemp, "、")}------总共${alljine}元\n` |
|
|
|
} |
|
|
|
// this.rightText = rightTextTemp |
|
|
|
for (let key in groupByName) { |
|
|
|
let value = groupByName[key] |
|
|
|
rightObj[key] = { |
|
|
@ -686,7 +743,7 @@ export default { |
|
|
|
for (let key in rightObj) { |
|
|
|
text += `${key.slice(1, 9)}:${rightObj[key].dataList.join(";")}共${rightObj[key].value}元\n` |
|
|
|
} |
|
|
|
this.rightText = text |
|
|
|
// this.rightText = text |
|
|
|
// this.tongjizhongjiang() |
|
|
|
// return this.rightText |
|
|
|
// let lastNum = (this.leftText.match(/\d+/g) || []).pop() |
|
|
@ -806,6 +863,8 @@ export default { |
|
|
|
// 右侧清空数据 |
|
|
|
rightClear() { |
|
|
|
this.rightText = "" |
|
|
|
this.rightTableData = [] |
|
|
|
this.resultTitle = 0 |
|
|
|
}, |
|
|
|
// 提取数字 |
|
|
|
extractNumbers(key1, key2, key3, str) { |
|
|
|