Browse Source

10.11

master
lichong 6 months ago
parent
commit
66a619b274
  1. 114
      front/src/renderer/src/views/peifubeilv.vue
  2. 150
      front/src/renderer/src/views/shujufenxi.vue

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

@ -1,14 +1,14 @@
<template>
<div class="rightClass">
<el-row :gutter="8">
<el-col :span="6">
<!-- <el-col :span="6">
<div class="colDivClass">
<el-radio-group v-model="form.caipiaotype">
<el-radio value="1" size="large">福彩</el-radio>
<el-radio value="2" size="large">体彩</el-radio>
</el-radio-group>
</div>
</el-col>
</el-col> -->
<el-col :span="6">
<div class="colDivClass">
<el-input v-model="form.danxuan" style="max-width: 600px" :formatter="(value) => `单选:${value}`"
@ -37,20 +37,27 @@
</el-input>
</div>
</el-col>
<el-col :span="6">
<el-col :span="9">
<div class="colDivClass">
<el-input v-model="form.dingwei" style="max-width: 600px" :formatter="(value) => `定位:${value}`"
:parser="(value) => value.replace(/[定|位|:]\s?|(,*)/g, '')">
<el-input v-model="form.dingwei1" style="max-width: 600px" :formatter="(value) => `定位(一码):${value}`"
:parser="(value) => value.replace(/[定|位|(|一|码|)|:]\s?|(,*)/g, '')">
</el-input>
</div>
</el-col>
<el-col :span="6">
<el-col :span="9">
<div class="colDivClass">
<el-input v-model="form.dingwei2" 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}`"
:parser="(value) => value.replace(/[不|定|位|:]\s?|(,*)/g, '')">
</el-input>
</div>
</el-col>
</el-col> -->
<el-col :span="6">
<div class="colDivClass">
<el-input v-model="form.fushi" style="max-width: 600px" :formatter="(value) => `复式:${value}`"
@ -131,43 +138,46 @@ export default {
dayjs: dayjs,
form: {
caipiaotype: "1",
danxuan: 0,
zuxuan: 0,
shuangfei: 0,
dudan: 0,
dingwei: 0,
danxuan: 900,
zuxuan: 150,
shuangfei: 15,
dudan: 3.3,
dingwei1: 9,
dingwei2: 80,
budingwei: 0,
fushi: 0,
quanbaoduizi: 0,
zuliu4: 0,
zuliu5: 0,
zuliu6: 0,
zuliu7: 0,
zusan4: 0,
zusan5: 0,
zusan6: 0,
zusan7: 0,
fushi: 150,
quanbaoduizi: 3.3,
zuliu4: 35,
zuliu5: 15,
zuliu6: 7,
zuliu7: 4,
zusan4: 24,
zusan5: 15,
zusan6: 8,
zusan7: 6,
// bai: 0,
// shi: 0,
// ge: 0
},
formLocal: {
caipiaotype: "1",
danxuan: 0,
zuxuan: 0,
shuangfei: 0,
dudan: 0,
danxuan: 900,
zuxuan: 150,
shuangfei: 15,
dudan: 3.3,
dingwei1: 9,
dingwei2: 80,
budingwei: 0,
fushi: 0,
quanbaoduizi: 0,
zuliu4: 0,
zuliu5: 0,
zuliu6: 0,
zuliu7: 0,
zusan4: 0,
zusan5: 0,
zusan6: 0,
zusan7: 0,
fushi: 150,
quanbaoduizi: 3.3,
zuliu4: 35,
zuliu5: 15,
zuliu6: 7,
zuliu7: 4,
zusan4: 24,
zusan5: 15,
zusan6: 8,
zusan7: 6,
// bai: 0,
// shi: 0,
// ge: 0
@ -176,7 +186,37 @@ export default {
},
methods: {
savePeifu() {
localStorage.setItem('peifu', JSON.stringify(this.form))
let isNumber = true
try {
let form = _.cloneDeep(this.form)
for (let key in form) {
if (key !== "caipiaotype") {
if (!_.isNaN(Number(form[key]))) {
form[key] = Number(form[key])
} else {
isNumber = false
}
}
}
console.log(999, isNumber)
if (isNumber) {
localStorage.setItem('peifu', JSON.stringify(form))
} else {
ElMessage({
type: 'error',
message: '保存失败,请输入数字,暂不支持汉字',
showClose: true,
duration: 3000
})
}
} catch (error) {
ElMessage({
type: 'error',
message: `${error}`,
showClose: true,
duration: 3000
})
}
}
},
async mounted() {

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

@ -110,7 +110,7 @@
中奖数
</div>
</template>
{{ zhongjiangshuTotal }}
{{ zhongjiangshucount }}
</el-descriptions-item>
<el-descriptions-item>
<template #label>
@ -262,6 +262,7 @@ export default {
selectChangci: {},
dataObj: {},
zhongjiangshu: {},
zhongjiangshucount: 0,
zhongjiangshuTotal: 0,
tongjiValue: 0,
tableHeight: 500,
@ -270,6 +271,30 @@ export default {
visible: false,
fuwufeiValue: 0,
},
form: {},
formLocal: {
caipiaotype: "1",
danxuan: 900,
zuxuan: 150,
shuangfei: 15,
dudan: 3.3,
dingwei1: 9,
dingwei2: 80,
budingwei: 0,
fushi: 150,
quanbaoduizi: 3.3,
zuliu4: 35,
zuliu5: 15,
zuliu6: 7,
zuliu7: 4,
zusan4: 24,
zusan5: 15,
zusan6: 8,
zusan7: 6,
// bai: 0,
// shi: 0,
// ge: 0
},
screenshotStatus: false,
yidanyizu: /一单一组[:|:]*([\d,.\s]+)(?=合计|共*)/,
yizuliu: /1组六[:|:]*([\d,.\s]+)(?=合计|共*)/,
@ -566,6 +591,12 @@ export default {
ElMessage.error("请填写内容后预测")
return
}
let formData = JSON.parse(localStorage.getItem('peifu') || "{}")
if (_.isEmpty(formData)) {
formData = this.formLocal
} else {
formData = { ...this.formLocal, ...formData }
}
let haomaList = []
//
let leftTextArr = this.leftText.split("\n")
@ -584,15 +615,12 @@ export default {
// 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];
let type = "体彩"
if (item.includes("福彩")) {
type = "福彩"
}
console.log(77722, item)
let jine = item.match(this.jine)
if (jine) {
jine = Number(jine[1])
@ -867,7 +895,6 @@ export default {
})
}
//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]
@ -883,7 +910,7 @@ export default {
for (let k = 0; k < item.value.length; k++) {
let xiangmu = `${item.value[k]}`;
if (xiangmu === zhonghaoma) {
dataObj.zhong += Number(item.jine) * 900
dataObj.zhong += Number(item.jine) * Number(formData[element.key])
}
}
}
@ -903,7 +930,7 @@ export default {
let xiangmuArr = xiangmu.split('');
let zhonghaomaArr = zhonghaoma.split('');
if (_.difference(zhonghaomaArr, xiangmuArr).length === 0) {
dataObj.zhong += Number(item.jine) * 150
dataObj.zhong += Number(item.jine) * Number(formData[element.key])
}
}
}
@ -923,7 +950,7 @@ export default {
let xiangmuArr = xiangmu.split('');
let zhonghaomaArr = zhonghaoma.split('');
if (_.difference(zhonghaomaArr, xiangmuArr).length === 0) {
dataObj.zhong += Number(item.jine) * 35
dataObj.zhong += Number(item.jine) * Number(formData[element.key])
}
}
}
@ -943,7 +970,7 @@ export default {
let xiangmuArr = xiangmu.split('');
let zhonghaomaArr = zhonghaoma.split('');
if (_.difference(zhonghaomaArr, xiangmuArr).length === 0) {
dataObj.zhong += Number(item.jine) * 15
dataObj.zhong += Number(item.jine) * Number(formData[element.key])
}
}
}
@ -963,7 +990,7 @@ export default {
let xiangmuArr = xiangmu.split('');
let zhonghaomaArr = zhonghaoma.split('');
if (_.difference(zhonghaomaArr, xiangmuArr).length === 0) {
dataObj.zhong += Number(item.jine) * 7
dataObj.zhong += Number(item.jine) * Number(formData[element.key])
}
}
}
@ -983,7 +1010,7 @@ export default {
let xiangmuArr = xiangmu.split('');
let zhonghaomaArr = zhonghaoma.split('');
if (_.difference(zhonghaomaArr, xiangmuArr).length === 0) {
dataObj.zhong += Number(item.jine) * 4
dataObj.zhong += Number(item.jine) * Number(formData[element.key])
}
}
}
@ -1003,7 +1030,7 @@ export default {
let xiangmuArr = xiangmu.split('');
let zhonghaomaArr = zhonghaoma.split('');
if (_.difference(zhonghaomaArr, xiangmuArr).length <= 1) {
dataObj.zhong += Number(item.jine) * 24
dataObj.zhong += Number(item.jine) * Number(formData[element.key])
}
}
}
@ -1023,7 +1050,7 @@ export default {
let xiangmuArr = xiangmu.split('');
let zhonghaomaArr = zhonghaoma.split('');
if (_.difference(zhonghaomaArr, xiangmuArr).length <= 1) {
dataObj.zhong += Number(item.jine) * 15
dataObj.zhong += Number(item.jine) * Number(formData[element.key])
}
}
}
@ -1043,7 +1070,7 @@ export default {
let xiangmuArr = xiangmu.split('');
let zhonghaomaArr = zhonghaoma.split('');
if (_.difference(zhonghaomaArr, xiangmuArr).length <= 1) {
dataObj.zhong += Number(item.jine) * 8
dataObj.zhong += Number(item.jine) * Number(formData[element.key])
}
}
}
@ -1063,7 +1090,7 @@ export default {
let xiangmuArr = xiangmu.split('');
let zhonghaomaArr = zhonghaoma.split('');
if (_.difference(zhonghaomaArr, xiangmuArr).length <= 1) {
dataObj.zhong += Number(item.jine) * 6
dataObj.zhong += Number(item.jine) * Number(formData[element.key])
}
}
}
@ -1083,7 +1110,7 @@ export default {
let xiangmuArr = xiangmu.split('');
let zhonghaomaArr = zhonghaoma.split('');
if (_.difference(zhonghaomaArr, xiangmuArr).length === 2) {
dataObj.zhong += Number(item.jine) * 3.3
dataObj.zhong += Number(item.jine) * Number(formData[element.key])
}
}
}
@ -1109,16 +1136,42 @@ export default {
}
}
if (count === 1) {
dataObj.zhong += Number(item.jine) * 9
dataObj.zhong += Number(item.jine) * Number(formData[`${element.key}1`])
} else if (count > 1) {
dataObj.zhong += Number(item.jine) * 80
dataObj.zhong += Number(item.jine) * Number(formData[`${element.key}2`])
}
}
}
alljineLocal[element.key] = dataObj
}
//
else if (element.key == 'budingwei') {
// 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
@ -1136,15 +1189,15 @@ export default {
count++
}
}
if (count >= 1) {
dataObj.zhong += Number(item.jine) * 9
if (count >= 2) {
dataObj.zhong += Number(item.jine) * Number(formData[element.key])
}
}
}
alljineLocal[element.key] = dataObj
}
//
else if (element.key == 'shuangfei') {
//
else if (element.key == 'fushi') {
let dataObj = {
all: 0,
zhong: 0
@ -1162,15 +1215,15 @@ export default {
count++
}
}
if (count >= 2) {
dataObj.zhong += Number(item.jine) * 15
if (count >= 3) {
dataObj.zhong += Number(item.jine) * Number(formData[element.key])
}
}
}
alljineLocal[element.key] = dataObj
}
//
else if (element.key == 'fushi') {
//
else if (element.key == 'quanbaoduizi') {
let dataObj = {
all: 0,
zhong: 0
@ -1181,54 +1234,25 @@ export default {
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
xiangmuArr = _.uniq(xiangmuArr)
if (xiangmuArr.length < 3) {
dataObj.zhong += Number(item.jine) * Number(formData[element.key])
}
}
}
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
this.zhongjiangshucount = 0
for (let key in alljineLocal) {
this.tongjiValue += alljineLocal[key].all
this.zhongjiangshuTotal += alljineLocal[key].zhong
if (alljineLocal[key].zhong > 0) {
this.zhongjiangshucount++
}
}
console.log(alljineLocal, 555)
// ElMessage({
// type: 'success',
// message: JSON.stringify(haomaList),

Loading…
Cancel
Save