Browse Source

1233

master
lichong 6 months ago
parent
commit
2dbb09eeac
  1. 52
      front/src/renderer/src/views/peifubeilv.vue
  2. 778
      front/src/renderer/src/views/shujufenxi.vue

52
front/src/renderer/src/views/peifubeilv.vue

@ -25,7 +25,7 @@
</el-col>
<el-col :span="6">
<div class="colDivClass">
<el-input v-model="form.shaungfei" style="max-width: 600px" :formatter="(value) => `双飞:${value}`"
<el-input v-model="form.shuangfei" style="max-width: 600px" :formatter="(value) => `双飞:${value}`"
:parser="(value) => value.replace(/[双|飞|:]\s?|(,*)/g, '')">
</el-input>
</div>
@ -37,6 +37,13 @@
</el-input>
</div>
</el-col>
<el-col :span="6">
<div class="colDivClass">
<el-input v-model="form.dingwei" style="max-width: 600px" :formatter="(value) => `定位:${value}`"
:parser="(value) => value.replace(/[定|位|:]\s?|(,*)/g, '')">
</el-input>
</div>
</el-col>
<el-col :span="6">
<div class="colDivClass">
<el-input v-model="form.budingwei" style="max-width: 600px" :formatter="(value) => `不定位:${value}`"
@ -57,6 +64,18 @@
:parser="(value) => value.replace(/[全|包|对|子:]\s?|(,*)/g, '')">
</el-input>
</div>
<!-- <div class="colDivClass">
<div>定位</div>
<el-input v-model="form.bai" style="max-width: 600px;margin: 8px 0;" :formatter="(value) => `百:${value}`"
:parser="(value) => value.replace(/[百|:]\s?|(,*)/g, '')">
</el-input>
<el-input v-model="form.shi" style="max-width: 600px;margin: 8px 0;" :formatter="(value) => `十:${value}`"
:parser="(value) => value.replace(/[十|:]\s?|(,*)/g, '')">
</el-input>
<el-input v-model="form.ge" style="max-width: 600px;margin: 8px 0;" :formatter="(value) => `个:${value}`"
:parser="(value) => value.replace(/[个|:]\s?|(,*)/g, '')">
</el-input>
</div> -->
</el-col>
<el-col :span="8">
<div class="colDivClass">
@ -92,20 +111,6 @@
</el-input>
</div>
</el-col>
<el-col :span="8">
<div class="colDivClass">
<div>定位</div>
<el-input v-model="form.bai" style="max-width: 600px;margin: 8px 0;" :formatter="(value) => `百:${value}`"
:parser="(value) => value.replace(/[百|:]\s?|(,*)/g, '')">
</el-input>
<el-input v-model="form.shi" style="max-width: 600px;margin: 8px 0;" :formatter="(value) => `十:${value}`"
:parser="(value) => value.replace(/[十|:]\s?|(,*)/g, '')">
</el-input>
<el-input v-model="form.ge" style="max-width: 600px;margin: 8px 0;" :formatter="(value) => `个:${value}`"
:parser="(value) => value.replace(/[个|:]\s?|(,*)/g, '')">
</el-input>
</div>
</el-col>
</el-row>
<div style="text-align: center;margin-top: 20vh">
<el-button text type="danger" @click="savePeifu">保存</el-button>
@ -128,8 +133,9 @@ export default {
caipiaotype: "1",
danxuan: 0,
zuxuan: 0,
shaungfei: 0,
shuangfei: 0,
dudan: 0,
dingwei: 0,
budingwei: 0,
fushi: 0,
quanbaoduizi: 0,
@ -141,15 +147,15 @@ export default {
zusan5: 0,
zusan6: 0,
zusan7: 0,
bai: 0,
shi: 0,
ge: 0
// bai: 0,
// shi: 0,
// ge: 0
},
formLocal: {
caipiaotype: "1",
danxuan: 0,
zuxuan: 0,
shaungfei: 0,
shuangfei: 0,
dudan: 0,
budingwei: 0,
fushi: 0,
@ -162,9 +168,9 @@ export default {
zusan5: 0,
zusan6: 0,
zusan7: 0,
bai: 0,
shi: 0,
ge: 0
// bai: 0,
// shi: 0,
// ge: 0
}
}
},

778
front/src/renderer/src/views/shujufenxi.vue

@ -12,7 +12,7 @@
</div>
<template #footer>
<div style="text-align: center;">
<el-button text type="primary" @click="extractTcNumbers">体福</el-button>
<!-- <el-button text type="primary" @click="extractTcNumbers">体福</el-button> -->
<el-button text type="primary" @click="leftTongji">统计</el-button>
<el-button text type="danger" @click="leftClear">清空</el-button>
<el-button text type="success" @click="setFuwufei">服务费</el-button>
@ -118,7 +118,10 @@
中奖赔付
</div>
</template>
{{ 0 }}
{{
zhongjiangshuTotal - Number((((tongjiValue || 0) * (checkDailishangRaw.dailifei || 0)) /
100).toFixed(2)) - Number(((tongjiValue * (fuwufei.fuwufeiValue || 0)) / 100).toFixed(2))
}}
</el-descriptions-item>
<el-descriptions-item>
<template #label>
@ -135,7 +138,7 @@
</div>
</template>
{{ ((tongjiValue || 0) - Number((((tongjiValue || 0) * ((checkDailishangRaw.dailifei || 0))) /
100).toFixed(2))
100).toFixed(2)) - zhongjiangshuTotal
- Number(((tongjiValue * (fuwufei.fuwufeiValue || 0)) / 100).toFixed(2))).toFixed(2)
}}
</el-descriptions-item>
@ -234,9 +237,17 @@ export default {
return {
_: _,
dayjs: dayjs,
leftText: `体彩102,678,378,034。403,301。780。763,337。773,677一单一组共44
福彩059590各一单一组共8
合计52`,
leftText: `一单一组:684,784,876共12
1784961637共6
1214315共4
1组六1269共10
1组六12069共10
1组六120769共10
1组三874共10
16
1双飞98共10
1定位324共共10
1全包对子共10元`,
rightText: "",
resultTitle: "",
changciList: [],
@ -260,10 +271,18 @@ export default {
fuwufeiValue: 0,
},
screenshotStatus: false,
ticaihaoma: /体彩.*?([\d,。]+)[^一单一组共]*一单一组共/,
fucaihaoma: /福彩.*?([\d,。]+)[^一单一组共]*一单一组共/,
ticaijine: /体彩.*?一单一组共(\d+)/,
fucaijine: /福彩.*?一单一组共(\d+)/,
yidanyizu: /一单一组[:|:]*([\d,.\s]+)(?=合计|共*)/,
yizuliu: /1组六[:|:]*([\d,.\s]+)(?=合计|共*)/,
yizusan: /1组三[:|:]*([\d,.\s]+)(?=合计|共*)/,
yidu: /1毒[:|:]*([\d,.\s]+)(?=合计|共*)/,
yishuangfei: /1双飞[:|:]*([\d,.\s]+)(?=合计|共*)/,
yidingwei: /1定位[:|:]*([\d,.\s]+)(?=合计|共*)/,
yibudingwei: /1不定位[:|:]*([\d,.\s]+)(?=合计|共*)/,
yifushi: /1复式[:|:]*([\d,.\s]+)(?=合计|共*)/,
yiquanbaoduizi: /1全包对子[:|:]*([\d,.\s]+)(?=合计|共*)/,
yidan: /1单[:|:]*([\d,.\s]+)(?=合计|共*)/,
yizu: /1组[:|:]*([\d,.\s]+)(?=合计|共*)/,
jine: /[合计|共]+(\d+)/
}
},
watch: {},
@ -340,8 +359,8 @@ export default {
leftTongji() {
//
let leftTextArr = this.leftText.split("\n")
//
leftTextArr = leftTextArr.filter(item => !item.match(/\d{2}:\d{2}:\d{2}/g))
// 退
leftTextArr = leftTextArr.filter(item => { return !(item.match(/\d{2}:\d{2}:\d{2}/g) || item.includes("退")) })
//
leftTextArr = leftTextArr.map(item => {
let lastNum = item.match(/\d+[\u4e00-\u9fa5]{0,2}$/)
@ -380,8 +399,8 @@ export default {
tongjizhongjiang() {
//
let leftTextArr = this.leftText.split("\n")
//
leftTextArr = leftTextArr.filter(item => !item.match(/\d{2}:\d{2}:\d{2}/g))
// 退
leftTextArr = leftTextArr.filter(item => { return !(item.match(/\d{2}:\d{2}:\d{2}/g) || item.includes("退")) })
//
let dataObj = {}
leftTextArr = leftTextArr.map(item => {
@ -436,8 +455,9 @@ export default {
}
this.checkDailishangRaw = _.find(this.dailishangList, { check: true })
this.selectChangci = _.find(this.changciList, { value: this.changciValue })
this.tongjiValue = this.leftTongji()
this.zhongjiangshuTotal = Number(this.zhongjiangshu[this.selectChangci.first] || 0) + Number(this.zhongjiangshu[this.selectChangci.second] || 0) + Number(this.zhongjiangshu[this.selectChangci.third] || 0)
// this.tongjiValue = this.leftTongji()
this.extractTcNumbers()
// this.zhongjiangshuTotal = Number(this.zhongjiangshu[this.selectChangci.first] || 0) + Number(this.zhongjiangshu[this.selectChangci.second] || 0) + Number(this.zhongjiangshu[this.selectChangci.third] || 0)
this.dialogForm.visible = true
},
//
@ -533,72 +553,688 @@ export default {
},
//
extractTcNumbers() {
let ticaiList = []
let fucaiList = []
if (!this.changciValue) {
ElMessage.error("请选择场次")
return
}
let checkedList = this.dailishangList.filter(item => item.check)
if (!checkedList.length) {
ElMessage.error("请选择代理人")
return
}
if (!this.leftText) {
ElMessage.error("请填写内容后预测")
return
}
let haomaList = []
//
let leftTextArr = this.leftText.split("\n")
//
leftTextArr = leftTextArr.filter(item => !item.match(/\d{2}:\d{2}:\d{2}/g))
// 退
leftTextArr = leftTextArr.filter(item => { return !(item.match(/\d{2}:\d{2}:\d{2}/g) || item.includes("退")) })
//
// yidanyizu: /[|:]*([\d,.\s]+)(?=|*)/,
// yizuliu: /1[|:]*([\d,.\s]+)(?=|*)/,
// yizusan: /1[|:]*([\d,.\s]+)(?=|*)/,
// yidu: /1[|:]*([\d,.\s]+)(?=|*)/,
// yishuangfei: /1[|:]*([\d,.\s]+)(?=|*)/,
// yidingwei: /1[|:]*([\d,.\s]+)(?=|*)/,
// yibudingwei: /1[|:]*([\d,.\s]+)(?=|*)/,
// yifushi: /1[|:]*([\d,.\s]+)(?=|*)/,
// yiquanbaoduizi: /1[|:]*([\d,.\s]+)(?=|*)/,
// yidan: /1[|:]*([\d,.\s]+)(?=|*)/,
// yizu: /1[|:]*([\d,.\s]+)(?=|*)/,
// jine: /(?:|)(\d+)/g
console.log(77711, leftTextArr)
for (let i = 0; i < leftTextArr.length; i++) {
let item = leftTextArr[i];
if (item.includes("体彩")) {
let ticaimatchhaoma = item.match(this.ticaihaoma);
let ticaimatchjine = item.match(this.ticaijine);
let ticaihaomaArr
let ticaijineStr
if (ticaimatchhaoma) {
//
let haomaStr = ticaimatchhaoma[1].replace(/\.|。|,/g, ',');
ticaihaomaArr = _.compact(_.split(haomaStr, ","))
} else {
console.log("没有找到匹配项");
}
if (ticaimatchjine) {
//
ticaijineStr = ticaimatchjine[1]
} else {
console.log("没有找到匹配项");
}
ticaiList.push({
haoma: ticaihaomaArr,
jine: ticaijineStr,
let type = "体彩"
if (item.includes("福彩")) {
type = "福彩"
}
console.log(77722, item)
let jine = item.match(this.jine)
if (jine) {
jine = Number(jine[1])
} else {
continue
}
let haoma = []
//
if (item.match(this.yidanyizu)) {
let match = item.match(this.yidanyizu)
let numbers = match[1].replace(/\s+/g, '').replace(/[,\.]+/g, ',');
haoma = _.compact(_.split(numbers, ","))
let danxuanList = []
let zuxuanList = []
for (let j = 0; j < haoma.length; j++) {
let numberItem = haoma[j];
danxuanList.push({
type: "danxuan",
value: [`${numberItem}`],
jine: (jine / 2) / (haoma.length)
})
zuxuanList.push({
type: "zuxuan",
value: [`${numberItem}`],
jine: (jine / 2) / (haoma.length)
})
}
haomaList.push({
type: type,
name: "1单",
numbers: danxuanList,
})
} else if (item.includes("福彩")) {
let fucaimatchhaoma = item.match(this.fucaihaoma);
let fucaimatchjine = item.match(this.fucaijine);
let fucaihaomaArr
let fucaijineStr
if (fucaimatchhaoma) {
//
let haomaStr = fucaimatchhaoma[1].replace(/\.|。|,/g, ',');
fucaihaomaArr = _.compact(_.split(haomaStr, ","))
} else {
console.log("没有找到匹配项");
}
if (fucaimatchjine) {
//
fucaijineStr = fucaimatchjine[1]
} else {
console.log("没有找到匹配项");
}
fucaiList.push({
haoma: fucaihaomaArr,
jine: fucaijineStr,
haomaList.push({
type: type,
name: "1组",
numbers: zuxuanList,
})
}
// 1
else if (item.match(this.yizuliu)) {
let match = item.match(this.yizuliu)
let numbers = match[1].replace(/\s+/g, '').replace(/[,\.]+/g, ',');
haoma = _.compact(_.split(numbers, ","))
let groupBy = _.groupBy(haoma, o => { return `${o}`.length });
for (let key in groupBy) {
haomaList.push({
type: type,
name: `1组六${key}`,
numbers: [{
type: `zuliu${key}`,
value: groupBy[key],
jine: (jine / haoma.length) * (groupBy[key].length)
}],
})
}
}
// 1
else if (item.match(this.yizusan)) {
let match = item.match(this.yizusan)
let numbers = match[1].replace(/\s+/g, '').replace(/[,\.]+/g, ',');
haoma = _.compact(_.split(numbers, ","))
let groupBy = _.groupBy(haoma, o => { return `${o}`.length });
for (let key in groupBy) {
haomaList.push({
type: type,
name: `1组三${key}`,
numbers: [{
type: `zusan${key}`,
value: groupBy[key],
jine: (jine / haoma.length) * (groupBy[key].length)
}],
})
}
}
// 1
else if (item.match(this.yidu)) {
let match = item.match(this.yidu)
let numbers = match[1].replace(/\s+/g, '').replace(/[,\.]+/g, ',');
haoma = _.compact(_.split(numbers, ","))
let duslist = []
for (let j = 0; j < haoma.length; j++) {
let numberItem = haoma[j];
duslist.push({
type: "dudan",
value: [`${numberItem}`],
jine: jine / (haoma.length)
})
}
haomaList.push({
type: type,
name: "1毒",
numbers: duslist,
})
}
// 1
else if (item.match(this.yishuangfei)) {
let match = item.match(this.yishuangfei)
let numbers = match[1].replace(/\s+/g, '').replace(/[,\.]+/g, ',');
haoma = _.compact(_.split(numbers, ","))
let shaungfeislist = []
for (let j = 0; j < haoma.length; j++) {
let numberItem = haoma[j];
shaungfeislist.push({
type: "shuangfei",
value: [`${numberItem}`],
jine: jine / (haoma.length)
})
}
haomaList.push({
type: type,
name: "1双飞",
numbers: shaungfeislist,
})
}
// 1
else if (item.match(this.yidingwei)) {
let match = item.match(this.yidingwei)
let numbers = match[1].replace(/\s+/g, '').replace(/[,\.]+/g, ',');
haoma = _.compact(_.split(numbers, ","))
let dingweislist = []
for (let j = 0; j < haoma.length; j++) {
let numberItem = haoma[j];
dingweislist.push({
type: "dingwei",
value: [`${numberItem}`],
jine: jine / (haoma.length)
})
}
haomaList.push({
type: type,
name: "1定位",
numbers: dingweislist,
})
}
// 1
else if (item.match(this.yibudingwei)) {
let match = item.match(this.yibudingwei)
let numbers = match[1].replace(/\s+/g, '').replace(/[,\.]+/g, ',');
haoma = _.compact(_.split(numbers, ","))
let budingweislist = []
for (let j = 0; j < haoma.length; j++) {
let numberItem = haoma[j];
budingweislist.push({
type: "budingwei",
value: [`${numberItem}`],
jine: jine / (haoma.length)
})
}
haomaList.push({
type: type,
name: "1不定位",
numbers: budingweislist,
})
}
// 1
else if (item.match(this.yifushi)) {
let match = item.match(this.yifushi)
let numbers = match[1].replace(/\s+/g, '').replace(/[,\.]+/g, ',');
haoma = _.compact(_.split(numbers, ","))
let budingweislist = []
for (let j = 0; j < haoma.length; j++) {
let numberItem = haoma[j];
budingweislist.push({
type: "fushi",
value: [`${numberItem}`],
jine: jine / (haoma.length)
})
}
haomaList.push({
type: type,
name: "1复式",
numbers: budingweislist,
})
}
// 1
else if (item.match(this.yiquanbaoduizi)) {
let match = item.match(this.yiquanbaoduizi)
let numbers = match[1].replace(/\s+/g, '').replace(/[,\.]+/g, ',');
haoma = _.compact(_.split(numbers, ","))
let quanbaoduizislist = []
for (let j = 0; j < haoma.length; j++) {
let numberItem = haoma[j];
quanbaoduizislist.push({
type: "quanbaoduizi",
value: [`${numberItem}`],
jine: jine / (haoma.length)
})
}
haomaList.push({
type: type,
name: "1全包对子",
numbers: quanbaoduizislist,
})
}
// 1
else if (item.match(this.yidan)) {
let match = item.match(this.yidan)
let numbers = match[1].replace(/\s+/g, '').replace(/[,\.]+/g, ',');
haoma = _.compact(_.split(numbers, ","))
let danxuanList = []
for (let j = 0; j < haoma.length; j++) {
let numberItem = haoma[j];
danxuanList.push({
type: "danxuan",
value: [`${numberItem}`],
jine: jine / (haoma.length)
})
}
haomaList.push({
type: type,
name: "1单",
numbers: danxuanList,
})
}
// 1
else if (item.match(this.yizu)) {
let match = item.match(this.yizu)
let numbers = match[1].replace(/\s+/g, '').replace(/[,\.]+/g, ',');
haoma = _.compact(_.split(numbers, ","))
let zuxuanList = []
for (let j = 0; j < haoma.length; j++) {
let numberItem = haoma[j];
zuxuanList.push({
type: "zuxuan",
value: [`${numberItem}`],
jine: jine / (haoma.length)
})
}
haomaList.push({
type: type,
name: "1组",
numbers: zuxuanList,
})
}
//
else {
continue
}
}
let returnObj = {
ticaiList,
fucaiList
//
let checkDailishangRaw = _.find(this.dailishangList, { check: true })
//
let selectChangci = _.find(this.changciList, { value: this.changciValue })
this.checkDailishangRaw = checkDailishangRaw
this.selectChangci = selectChangci
//
let zhonghaoma = `${selectChangci.first}${selectChangci.second}${selectChangci.third}`
//
// let selectdailifei = Number(checkDailishangRaw.dailifei / 100)
let alljine = []
let jinegroupBy = _.groupBy(haomaList, o => `${o.type}:${o.name}`)
for (let key in jinegroupBy) {
let value = jinegroupBy[key];
let jineList = []
let keyLocal = key
for (let i = 0; i < value.length; i++) {
let element = value[i];
for (let j = 0; j < element.numbers.length; j++) {
let item = element.numbers[j];
keyLocal = item.type
jineList.push({
...item
})
}
}
alljine.push({
key: keyLocal,
name: key,
data: jineList
})
}
ElMessage({
type: 'success',
message: JSON.stringify(returnObj),
duration: 3000
})
return returnObj
//alljine= [{"key":"danxuan","name":":1","data":[{"type":"danxuan","value":["684"],"jine":2},{"type":"danxuan","value":["784"],"jine":2},{"type":"danxuan","value":["876"],"jine":2},{"type":"danxuan","value":["784"],"jine":6}]},{"key":"zuxuan","name":":1","data":[{"type":"zuxuan","value":["684"],"jine":2},{"type":"zuxuan","value":["784"],"jine":2},{"type":"zuxuan","value":["876"],"jine":2},{"type":"zuxuan","value":["214"],"jine":4}]},{"key":"zuliu4","name":":14","data":[{"type":"zuliu4","numbers":["1269"],"jine":10}]},{"key":"zuliu5","name":":15","data":[{"type":"zuliu5","numbers":["12069"],"jine":10}]},{"key":"zuliu6","name":":16","data":[{"type":"zuliu6","numbers":["120769"],"jine":10}]},{"key":"zusan3","name":":13","data":[{"type":"zusan3","numbers":["874"],"jine":10}]},{"key":"shuangfei","name":":1","data":[{"type":"shuangfei","value":["98"],"jine":10}]},{"key":"dingwei","name":":1","data":[{"type":"dingwei","value":["324"],"jine":10}]}]
console.log(777, haomaList, alljine, JSON.stringify(alljine))
let alljineLocal = {}
for (let i = 0; i < alljine.length; i++) {
let element = alljine[i]
// 1
if (element.key == 'danxuan') {
let dataObj = {
all: 0,
zhong: 0
}
for (let j = 0; j < element.data.length; j++) {
let item = element.data[j];
dataObj.all += Number(item.jine)
for (let k = 0; k < item.value.length; k++) {
let xiangmu = `${item.value[k]}`;
if (xiangmu === zhonghaoma) {
dataObj.zhong += Number(item.jine) * 900
}
}
}
alljineLocal[element.key] = dataObj
}
// 1
else if (element.key == 'zuxuan') {
let dataObj = {
all: 0,
zhong: 0
}
for (let j = 0; j < element.data.length; j++) {
let item = element.data[j];
dataObj.all += Number(item.jine)
for (let k = 0; k < item.value.length; k++) {
let xiangmu = `${item.value[k]}`;
let xiangmuArr = xiangmu.split('');
let zhonghaomaArr = zhonghaoma.split('');
if (_.difference(zhonghaomaArr, xiangmuArr).length === 0) {
dataObj.zhong += Number(item.jine) * 150
}
}
}
alljineLocal[element.key] = dataObj
}
// 4
else if (element.key == 'zuliu4') {
let dataObj = {
all: 0,
zhong: 0
}
for (let j = 0; j < element.data.length; j++) {
let item = element.data[j];
dataObj.all += Number(item.jine)
for (let k = 0; k < item.value.length; k++) {
let xiangmu = `${item.value[k]}`;
let xiangmuArr = xiangmu.split('');
let zhonghaomaArr = zhonghaoma.split('');
if (_.difference(zhonghaomaArr, xiangmuArr).length === 0) {
dataObj.zhong += Number(item.jine) * 35
}
}
}
alljineLocal[element.key] = dataObj
}
// 5
else if (element.key == 'zuliu5') {
let dataObj = {
all: 0,
zhong: 0
}
for (let j = 0; j < element.data.length; j++) {
let item = element.data[j];
dataObj.all += Number(item.jine)
for (let k = 0; k < item.value.length; k++) {
let xiangmu = `${item.value[k]}`;
let xiangmuArr = xiangmu.split('');
let zhonghaomaArr = zhonghaoma.split('');
if (_.difference(zhonghaomaArr, xiangmuArr).length === 0) {
dataObj.zhong += Number(item.jine) * 15
}
}
}
alljineLocal[element.key] = dataObj
}
// 6
else if (element.key == 'zuliu6') {
let dataObj = {
all: 0,
zhong: 0
}
for (let j = 0; j < element.data.length; j++) {
let item = element.data[j];
dataObj.all += Number(item.jine)
for (let k = 0; k < item.value.length; k++) {
let xiangmu = `${item.value[k]}`;
let xiangmuArr = xiangmu.split('');
let zhonghaomaArr = zhonghaoma.split('');
if (_.difference(zhonghaomaArr, xiangmuArr).length === 0) {
dataObj.zhong += Number(item.jine) * 7
}
}
}
alljineLocal[element.key] = dataObj
}
// 7
else if (element.key == 'zuliu7') {
let dataObj = {
all: 0,
zhong: 0
}
for (let j = 0; j < element.data.length; j++) {
let item = element.data[j];
dataObj.all += Number(item.jine)
for (let k = 0; k < item.value.length; k++) {
let xiangmu = `${item.value[k]}`;
let xiangmuArr = xiangmu.split('');
let zhonghaomaArr = zhonghaoma.split('');
if (_.difference(zhonghaomaArr, xiangmuArr).length === 0) {
dataObj.zhong += Number(item.jine) * 4
}
}
}
alljineLocal[element.key] = dataObj
}
// 4
else if (element.key == 'zusan4') {
let dataObj = {
all: 0,
zhong: 0
}
for (let j = 0; j < element.data.length; j++) {
let item = element.data[j];
dataObj.all += Number(item.jine)
for (let k = 0; k < item.value.length; k++) {
let xiangmu = `${item.value[k]}`;
let xiangmuArr = xiangmu.split('');
let zhonghaomaArr = zhonghaoma.split('');
if (_.difference(zhonghaomaArr, xiangmuArr).length <= 1) {
dataObj.zhong += Number(item.jine) * 24
}
}
}
alljineLocal[element.key] = dataObj
}
// 5
else if (element.key == 'zusan5') {
let dataObj = {
all: 0,
zhong: 0
}
for (let j = 0; j < element.data.length; j++) {
let item = element.data[j];
dataObj.all += Number(item.jine)
for (let k = 0; k < item.value.length; k++) {
let xiangmu = `${item.value[k]}`;
let xiangmuArr = xiangmu.split('');
let zhonghaomaArr = zhonghaoma.split('');
if (_.difference(zhonghaomaArr, xiangmuArr).length <= 1) {
dataObj.zhong += Number(item.jine) * 15
}
}
}
alljineLocal[element.key] = dataObj
}
// 6
else if (element.key == 'zusan6') {
let dataObj = {
all: 0,
zhong: 0
}
for (let j = 0; j < element.data.length; j++) {
let item = element.data[j];
dataObj.all += Number(item.jine)
for (let k = 0; k < item.value.length; k++) {
let xiangmu = `${item.value[k]}`;
let xiangmuArr = xiangmu.split('');
let zhonghaomaArr = zhonghaoma.split('');
if (_.difference(zhonghaomaArr, xiangmuArr).length <= 1) {
dataObj.zhong += Number(item.jine) * 8
}
}
}
alljineLocal[element.key] = dataObj
}
// 7
else if (element.key == 'zusan7') {
let dataObj = {
all: 0,
zhong: 0
}
for (let j = 0; j < element.data.length; j++) {
let item = element.data[j];
dataObj.all += Number(item.jine)
for (let k = 0; k < item.value.length; k++) {
let xiangmu = `${item.value[k]}`;
let xiangmuArr = xiangmu.split('');
let zhonghaomaArr = zhonghaoma.split('');
if (_.difference(zhonghaomaArr, xiangmuArr).length <= 1) {
dataObj.zhong += Number(item.jine) * 6
}
}
}
alljineLocal[element.key] = dataObj
}
//
else if (element.key == 'dudan') {
let dataObj = {
all: 0,
zhong: 0
}
for (let j = 0; j < element.data.length; j++) {
let item = element.data[j];
dataObj.all += Number(item.jine)
for (let k = 0; k < item.value.length; k++) {
let xiangmu = `${item.value[k]}`;
let xiangmuArr = xiangmu.split('');
let zhonghaomaArr = zhonghaoma.split('');
if (_.difference(zhonghaomaArr, xiangmuArr).length === 2) {
dataObj.zhong += Number(item.jine) * 3.3
}
}
}
alljineLocal[element.key] = dataObj
}
//
else if (element.key == 'dingwei') {
let dataObj = {
all: 0,
zhong: 0
}
for (let j = 0; j < element.data.length; j++) {
let item = element.data[j];
dataObj.all += Number(item.jine)
for (let k = 0; k < item.value.length; k++) {
let xiangmu = `${item.value[k]}`;
let xiangmuArr = xiangmu.split('');
let zhonghaomaArr = zhonghaoma.split('');
let count = 0
for (let l = 0; l < zhonghaomaArr.length; l++) {
if (`${xiangmuArr[l]}` === `${zhonghaomaArr[l]}`) {
count++
}
}
if (count === 1) {
dataObj.zhong += Number(item.jine) * 9
} else if (count > 1) {
dataObj.zhong += Number(item.jine) * 80
}
}
}
alljineLocal[element.key] = dataObj
}
//
else if (element.key == 'budingwei') {
let dataObj = {
all: 0,
zhong: 0
}
for (let j = 0; j < element.data.length; j++) {
let item = element.data[j];
dataObj.all += Number(item.jine)
for (let k = 0; k < item.value.length; k++) {
let xiangmu = `${item.value[k]}`;
let xiangmuArr = xiangmu.split('');
let zhonghaomaArr = zhonghaoma.split('');
let count = 0
for (let l = 0; l < zhonghaomaArr.length; l++) {
if (xiangmuArr.includes(zhonghaomaArr[l])) {
count++
}
}
if (count >= 1) {
dataObj.zhong += Number(item.jine) * 9
}
}
}
alljineLocal[element.key] = dataObj
}
//
else if (element.key == 'shuangfei') {
let dataObj = {
all: 0,
zhong: 0
}
for (let j = 0; j < element.data.length; j++) {
let item = element.data[j];
dataObj.all += Number(item.jine)
for (let k = 0; k < item.value.length; k++) {
let xiangmu = `${item.value[k]}`;
let xiangmuArr = xiangmu.split('');
let zhonghaomaArr = zhonghaoma.split('');
let count = 0
for (let l = 0; l < zhonghaomaArr.length; l++) {
if (xiangmuArr.includes(zhonghaomaArr[l])) {
count++
}
}
if (count >= 2) {
dataObj.zhong += Number(item.jine) * 15
}
}
}
alljineLocal[element.key] = dataObj
}
//
else if (element.key == 'fushi') {
let dataObj = {
all: 0,
zhong: 0
}
for (let j = 0; j < element.data.length; j++) {
let item = element.data[j];
dataObj.all += Number(item.jine)
for (let k = 0; k < item.value.length; k++) {
let xiangmu = `${item.value[k]}`;
let xiangmuArr = xiangmu.split('');
let zhonghaomaArr = zhonghaoma.split('');
let count = 0
for (let l = 0; l < zhonghaomaArr.length; l++) {
if (xiangmuArr.includes(zhonghaomaArr[l])) {
count++
}
}
if (count >= 3) {
dataObj.zhong += Number(item.jine) * 150
}
}
}
alljineLocal[element.key] = dataObj
}
//
// else if (element.key == 'quanbaoduizi') {
// let dataObj = {
// all: 0,
// zhong: 0
// }
// for (let j = 0; j < element.data.length; j++) {
// let item = element.data[j];
// dataObj.all += Number(item.jine)
// for (let k = 0; k < item.value.length; k++) {
// let xiangmu = `${item.value[k]}`;
// let xiangmuArr = xiangmu.split('');
// let zhonghaomaArr = zhonghaoma.split('');
// let count = 0
// for (let l = 0; l < zhonghaomaArr.length; l++) {
// if (xiangmuArr.includes(zhonghaomaArr[l])) {
// count++
// }
// }
// if (count >= 3) {
// dataObj.zhong += Number(item.jine) * 150
// }
// }
// }
// alljineLocal[element.key] = dataObj
// }
}
this.tongjiValue = 0
this.zhongjiangshuTotal = 0
for (let key in alljineLocal) {
this.tongjiValue += alljineLocal[key].all
this.zhongjiangshuTotal += alljineLocal[key].zhong
}
console.log(alljineLocal, 555)
// ElMessage({
// type: 'success',
// message: JSON.stringify(haomaList),
// duration: 3000
// })
return haomaList
},
},

Loading…
Cancel
Save