Browse Source

修改

master
lichong 6 months ago
parent
commit
c4dc9b9de8
  1. 2
      front/electron-builder.yml
  2. 2
      front/package.json
  3. 93
      front/src/renderer/src/views/shujufenxi.vue
  4. 2
      jihuoqi/electron-builder.yml

2
front/electron-builder.yml

@ -14,7 +14,7 @@ win:
executableName: lichong-app executableName: lichong-app
nsis: nsis:
oneClick: false oneClick: false
artifactName: ${name}-${version}-setup.${ext} artifactName: 数据统计-${version}-setup.${ext}
allowToChangeInstallationDirectory: true allowToChangeInstallationDirectory: true
shortcutName: ${productName} shortcutName: ${productName}
uninstallDisplayName: ${productName} uninstallDisplayName: ${productName}

2
front/package.json

@ -1,6 +1,6 @@
{ {
"name": "electron", "name": "electron",
"version": "1.0.0", "version": "1.0.5",
"description": "An Electron application with Vue", "description": "An Electron application with Vue",
"main": "./out/main/index.js", "main": "./out/main/index.js",
"author": "lichong", "author": "lichong",

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

@ -1,6 +1,6 @@
<template> <template>
<div class="rightClass"> <div class="rightClass">
<el-row :gutter="8"> <el-row :gutter="2">
<el-col :span="9"> <el-col :span="9">
<el-card style="height: 100%;"> <el-card style="height: 100%;">
<template #header> <template #header>
@ -55,10 +55,15 @@
<el-col :span="9"> <el-col :span="9">
<el-card style="height: 100%;"> <el-card style="height: 100%;">
<template #header> <template #header>
<span>{{ resultTitle }}&nbsp;</span> <span>{{ resultTitle ? resultTitle + "元" : "" }}&nbsp;</span>
</template> </template>
<div> <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> </div>
<template #footer> <template #footer>
<div style="text-align: center;"> <div style="text-align: center;">
@ -237,18 +242,19 @@ export default {
return { return {
_: _, _: _,
dayjs: dayjs, dayjs: dayjs,
leftText: `一单一组:684,784,876共12 leftText: ``,
784961637共6元 // leftText: `684,784,87612
214315共4元 // 7849616376
组六1269共10元 // 2143154
组六12069共10元 // 126910
组六120769共10元 // 1206910
组三874共10元 // 12076910
6共10元 // 87410
双飞98共10元 // 610
定位324共10元 // 9810
全包对子共10元 // 32410
`, // 10
// `,
placeholderLeftText: placeholderLeftText:
`一单一组:684,784,876共12 `一单一组:684,784,876共12
784961637共6元 784961637共6元
@ -274,7 +280,8 @@ export default {
// 32410 // 32410
// 10`, // 10`,
rightText: "", rightText: "",
resultTitle: "", rightTableData: [],
resultTitle: 0,
changciList: [], changciList: [],
changciValue: "", changciValue: "",
headerList: [], headerList: [],
@ -666,7 +673,57 @@ export default {
} }
} }
let groupByName = _.groupBy(haomaList, 'name') 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 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) { for (let key in groupByName) {
let value = groupByName[key] let value = groupByName[key]
rightObj[key] = { rightObj[key] = {
@ -686,7 +743,7 @@ export default {
for (let key in rightObj) { for (let key in rightObj) {
text += `${key.slice(1, 9)}${rightObj[key].dataList.join(";")}${rightObj[key].value}\n` text += `${key.slice(1, 9)}${rightObj[key].dataList.join(";")}${rightObj[key].value}\n`
} }
this.rightText = text // this.rightText = text
// this.tongjizhongjiang() // this.tongjizhongjiang()
// return this.rightText // return this.rightText
// let lastNum = (this.leftText.match(/\d+/g) || []).pop() // let lastNum = (this.leftText.match(/\d+/g) || []).pop()
@ -806,6 +863,8 @@ export default {
// //
rightClear() { rightClear() {
this.rightText = "" this.rightText = ""
this.rightTableData = []
this.resultTitle = 0
}, },
// //
extractNumbers(key1, key2, key3, str) { extractNumbers(key1, key2, key3, str) {

2
jihuoqi/electron-builder.yml

@ -14,7 +14,7 @@ win:
executableName: jihuoqi-app executableName: jihuoqi-app
nsis: nsis:
oneClick: false oneClick: false
artifactName: ${name}-${version}-setup.${ext} artifactName: 激活器-${version}-setup.${ext}
allowToChangeInstallationDirectory: true allowToChangeInstallationDirectory: true
shortcutName: ${productName} shortcutName: ${productName}
uninstallDisplayName: ${productName} uninstallDisplayName: ${productName}

Loading…
Cancel
Save