Browse Source

11.3

master
lichong 5 months ago
parent
commit
1f0ea21403
  1. 2
      front/package.json
  2. 4
      front/src/renderer/src/App.vue
  3. 3
      front/src/renderer/src/assets/css/base.css
  4. 19
      front/src/renderer/src/assets/json/changci.json
  5. 156
      front/src/renderer/src/assets/json/dailishang.json
  6. 12
      front/src/renderer/src/components/formcomponent.vue
  7. 84
      front/src/renderer/src/components/formcomponentchangci.vue
  8. 2
      front/src/renderer/src/components/tablecomponent.vue
  9. 149
      front/src/renderer/src/components/tablecomponentchangci.vue
  10. 10
      front/src/renderer/src/views/changci.vue
  11. 6
      front/src/renderer/src/views/dailishang.vue
  12. 40
      front/src/renderer/src/views/peifubeilv.vue
  13. 233
      front/src/renderer/src/views/peifubeilvcopy.vue
  14. 2547
      front/src/renderer/src/views/shujufenxi.vue
  15. 1985
      front/src/renderer/src/views/shujufenxicopy.vue
  16. 4
      jihuoqi/src/renderer/src/App.vue

2
front/package.json

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

4
front/src/renderer/src/App.vue

@ -7,9 +7,9 @@
<el-tab-pane label="代理商" name="dailishang">
<dailishangComponent ref="dailishang"> </dailishangComponent>
</el-tab-pane>
<el-tab-pane label="赔付倍率" name="peifubeilv">
<!-- <el-tab-pane label="赔付倍率" name="peifubeilv">
<peifubeilvComponent ref="peifubeilv"> </peifubeilvComponent>
</el-tab-pane>
</el-tab-pane> -->
<el-tab-pane label="数据分析" name="shujufenxi">
<shujufenxiComponent ref="shujufenxi"> </shujufenxiComponent>
</el-tab-pane>

3
front/src/renderer/src/assets/css/base.css

@ -11,3 +11,6 @@ body {
.cell{
padding: 0 !important;
}
.rightCard .el-card__header{
padding-bottom: 8px;
}

19
front/src/renderer/src/assets/json/changci.json

@ -10,6 +10,7 @@
"label": "时间",
"prop": "time",
"type": "date",
"width": 150,
"tableShow": true,
"formShow": true
},
@ -47,6 +48,24 @@
"tableShow": true,
"formShow": true
},
{
"label": "开奖类型",
"prop": "type",
"type": "radio",
"default": "2",
"options": [
{
"label": "体彩",
"value": "1"
},
{
"label": "福彩",
"value": "2"
}
],
"tableShow": true,
"formShow": true
},
{
"label": "创建时间",
"prop": "create_at",

156
front/src/renderer/src/assets/json/dailishang.json

@ -3,6 +3,7 @@
"label": "姓名",
"prop": "name",
"type": "text",
"width": 80,
"tableShow": true,
"formShow": true
},
@ -10,6 +11,7 @@
"label": "联系方式",
"prop": "phone",
"type": "text",
"width": 120,
"tableShow": true,
"formShow": true
},
@ -17,11 +19,165 @@
"label": "代理费(%)",
"prop": "dailifei",
"type": "number",
"required": true,
"min": 0,
"max": 100,
"tableShow": true,
"formShow": true
},
{
"label": "组选(倍率)",
"prop": "zuxuan",
"type": "number",
"required": true,
"default": 150,
"tableShow": true,
"formShow": true
},
{
"label": "双飞(倍率)",
"prop": "shuangfei",
"type": "number",
"required": true,
"default": 15,
"tableShow": true,
"formShow": true
},
{
"label": "毒胆(倍率)",
"prop": "dudan",
"type": "number",
"required": true,
"default": 3.3,
"tableShow": true,
"formShow": true
},
{
"label": "定位(一码)(倍率)",
"prop": "dingwei1",
"type": "number",
"required": true,
"default": 9,
"tableShow": true,
"formShow": true
},
{
"label": "定位(二码)(倍率)",
"prop": "dingwei2",
"type": "number",
"required": true,
"default": 80,
"tableShow": true,
"formShow": true
},
{
"label": "复式对子(倍率)",
"prop": "fushiduizi",
"type": "number",
"required": true,
"default": 300,
"tableShow": true,
"formShow": true
},
{
"label": "复式(倍率)",
"prop": "fushi",
"type": "number",
"required": true,
"default": 150,
"tableShow": true,
"formShow": true
},
{
"label": "全包对子(倍率)",
"prop": "quanbaoduizi",
"type": "number",
"required": true,
"default": 3.3,
"tableShow": true,
"formShow": true
},
{
"label": "组六(四码)(倍率)",
"prop": "zuliu4",
"type": "number",
"required": true,
"default": 35,
"tableShow": true,
"formShow": true
},
{
"label": "组六(五码)(倍率)",
"prop": "zuliu5",
"type": "number",
"required": true,
"default": 15,
"tableShow": true,
"formShow": true
},
{
"label": "组六(六码)(倍率)",
"prop": "zuliu6",
"type": "number",
"required": true,
"default": 7,
"tableShow": true,
"formShow": true
},
{
"label": "组六(七码)(倍率)",
"prop": "zuliu7",
"type": "number",
"required": true,
"default": 4,
"tableShow": true,
"formShow": true
},
{
"label": "组三(四码)(倍率)",
"prop": "zusan4",
"type": "number",
"required": true,
"default": 24,
"tableShow": true,
"formShow": true
},
{
"label": "组三(五码)(倍率)",
"prop": "zusan5",
"type": "number",
"required": true,
"default": 15,
"tableShow": true,
"formShow": true
},
{
"label": "组三(六码)(倍率)",
"prop": "zusan6",
"type": "number",
"required": true,
"default": 8,
"tableShow": true,
"formShow": true
},
{
"label": "组三(七码)(倍率)",
"prop": "zusan7",
"type": "number",
"required": true,
"default": 6,
"tableShow": true,
"formShow": true
},
{
"label": "豹子(倍率)",
"prop": "baozi",
"type": "number",
"required": true,
"default": 900,
"tableShow": true,
"formShow": true
},
{
"label": "备注",
"prop": "note",

12
front/src/renderer/src/components/formcomponent.vue

@ -1,7 +1,8 @@
<template>
<div class="tableClass">
<el-form :model="formData" label-suffix="" :disabled="disabled" inline>
<el-form-item :label="formItem.label" :key="formIndex" v-for="(formItem, formIndex) in formHeader">
<el-form-item :label="formItem.label" :key="formIndex" v-for="(formItem, formIndex) in formHeader"
:required="formItem.required">
<template v-if="formItem.type === 'text'">
<el-input v-model="formData[formItem.prop]" />
</template>
@ -21,7 +22,14 @@
</template>
<template v-else-if="formItem.type === 'date'">
<el-date-picker v-model="formData[formItem.prop]" type="date"
:disabled="['create_at', 'update_at'].indexOf(formItem.prop) !== -1" :placeholder="`请选择${formItem.label}`" />
:disabled="['create_at', 'update_at'].indexOf(formItem.prop) !== -1"
:placeholder="`请选择${formItem.label}`" />
</template>
<template v-else-if="formItem.type === 'radio'">
<el-radio-group v-model="formData[formItem.prop]">
<el-radio :value="item.value" size="large" v-for="(item, index) in formItem.options" :key="index">{{
item.label }}</el-radio>
</el-radio-group>
</template>
</el-form-item>
</el-form>

84
front/src/renderer/src/components/formcomponentchangci.vue

@ -0,0 +1,84 @@
<template>
<div class="tableClass">
<el-form :model="formData" label-suffix="" :disabled="disabled" inline>
<el-form-item :label="formItem.label" :key="formIndex" v-for="(formItem, formIndex) in formHeader">
<template v-if="formItem.type === 'text'">
<el-input v-model="formData[formItem.prop]" />
</template>
<template v-else-if="formItem.type === 'number'">
<el-input-number v-model="formData[formItem.prop]" :min="formItem.min" :max="formItem.max">
<template #decrease-icon>
<el-icon>
<ArrowDown />
</el-icon>
</template>
<template #increase-icon>
<el-icon>
<ArrowUp />
</el-icon>
</template>
</el-input-number>
</template>
<template v-else-if="formItem.type === 'date'">
<el-date-picker v-model="formData[formItem.prop]" type="date"
:disabled="['create_at', 'update_at'].indexOf(formItem.prop) !== -1"
:placeholder="`请选择${formItem.label}`" />
</template>
<template v-else-if="formItem.type === 'radio'">
<el-radio-group v-model="formData[formItem.prop]">
<el-radio :value="item.value" size="large" v-for="(item, index) in formItem.options"
:key="index">{{ item.label }}</el-radio>
</el-radio-group>
</template>
</el-form-item>
</el-form>
</div>
</template>
<script>
import _, { max, min } from 'lodash'
import dayjs from 'dayjs'
import { ElMessage, ElMessageBox } from 'element-plus'
export default {
name: 'formcomponentchangci',
components: {},
props: {
formHeader: {
type: Array,
default: () => {
return []
}
},
formData: {
type: Object,
default: () => {
return {}
}
},
disabled: {
type: Boolean,
default: () => {
return false
}
}
},
data() {
return {
_: _,
dayjs: dayjs,
}
},
methods: {},
async mounted() { },
watch: {},
computed: {}
}
</script>
<style scoped>
.tableClass {
text-align: left;
text-align-last: left;
}
</style>

2
front/src/renderer/src/components/tablecomponent.vue

@ -10,7 +10,7 @@
</template>
</el-table-column>
<el-table-column v-for="(headerItem, headerIndex) in tableHeader" :label="headerItem.label" show-overflow-tooltip
:key="headerIndex" :min-width="`${headerItem.label.length * 15 + 8}px`">
:key="headerIndex" :min-width="`${headerItem.label.length * 15 + 8}px`" :width="headerItem.width">
<template #default="scope">
<template v-if="headerItem.type === 'text'">
<span>{{ scope.row[headerItem.prop] }}</span>

149
front/src/renderer/src/components/tablecomponentchangci.vue

@ -0,0 +1,149 @@
<template>
<div class="tableClass">
<el-table :data="tableData" height="calc(100vh - 96px)" border @select="selectChange" @select-all="selectChange" fit
:row-key="getRowKeys" ref="tableRef">
<el-table-column type="selection" width="50" :reserve-selection="true" fixed="left">
</el-table-column>
<el-table-column type="index" v-if="hiddenXuhao" width="60" :reserve-selection="true" fixed="left" label="序号">
<template #default="scope">
<span>{{ pageSize * (currentPage - 1) + scope.$index + 1 }}</span>
</template>
</el-table-column>
<el-table-column v-for="(headerItem, headerIndex) in tableHeader" :label="headerItem.label" show-overflow-tooltip
:key="headerIndex" :min-width="`${headerItem.label.length * 15 + 8}px`" :width="headerItem.width">
<template #default="scope">
<template v-if="headerItem.type === 'text'">
<span>{{ scope.row[headerItem.prop] }}</span>
</template>
<template v-else-if="headerItem.type === 'date'">
<span>{{ scope.row[headerItem.prop] }}</span>
</template>
<template v-else-if="headerItem.type === 'number'">
<span>{{ scope.row[headerItem.prop] }}</span>
</template>
<template v-else-if="headerItem.type === 'radio'">
<span>{{ _.find(headerItem.options, { value: scope.row[headerItem.prop] }).label }}</span>
</template>
<template v-else>{{ scope.row[headerItem.prop] }}</template>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="145">
<template #default="scope">
<el-button type="primary" circle @click="optClick(scope.row, 'edit')">
<el-icon>
<Edit />
</el-icon>
</el-button>
<el-button type="info" circle @click="optClick(scope.row, 'info')">
<el-icon>
<InfoFilled />
</el-icon>
</el-button>
<el-button type="danger" circle @click="optClick(scope.row, 'del')">
<el-icon>
<Delete />
</el-icon>
</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination style="margin:8px 0 0 0;place-content:center;" v-model:current-page="currentPage"
v-model:page-size="pageSize" :total="total" layout="total, sizes, prev, pager, next, jumper"
:page-sizes="pageSizes"></el-pagination>
</div>
</template>
<script>
import _ from 'lodash'
import dayjs from 'dayjs'
import { ElMessage, ElMessageBox } from 'element-plus'
export default {
name: 'tablecomponentchangci',
components: {},
emits: ["selectChange", "handleCurrentChange", "handleSizeChange", "edit", "info", "del"],
props: {
tableHeader: {
type: Array,
default: () => {
return []
}
},
tableData: {
type: Array,
default: () => {
return []
}
},
pageSizes: {
type: Array,
default: () => {
return [12, 50, 100, 200]
}
},
total: {
type: Number,
default: () => {
return 0
}
},
hiddenXuhao: {
type: Boolean,
default: () => {
return false
}
},
},
data() {
return {
_: _,
dayjs: dayjs,
currentPage: 1,
pageSize: 12,
}
},
methods: {
selectChange(selection) {
this.$emit("selectChange", selection)
},
handleSizeChange(pageSize) {
this.$emit("handleSizeChange", pageSize)
},
handleCurrentChange(currentPage) {
this.$emit("handleCurrentChange", currentPage)
},
optClick(row, type) {
this.$emit(type, row)
},
// key
getRowKeys(row) {
return row.id; //
},
clearSelection() {
this.$refs.tableRef.clearSelection()
}
},
async mounted() { },
watch: {
currentPage: {
handler(val) {
this.$emit("handleCurrentChange", val)
},
immediate: true
},
pageSize: {
handler(val) {
this.$emit("handleSizeChange", val)
},
immediate: true
},
},
computed: {}
}
</script>
<style scoped>
.tableClass {
text-align: center;
text-align-last: center;
}
</style>

10
front/src/renderer/src/views/changci.vue

@ -47,7 +47,7 @@
<div>
<tablecomponent :tableHeader="tableHeader" :tableData="tableData" :pageSizes="pageSizes" :total="total"
@selectChange="selectChange" @handleCurrentChange="handleCurrentChange" @handleSizeChange="handleSizeChange"
@edit="edit" @info="info" @del="del" ref="tableComponentRef" >
@edit="edit" @info="info" @del="del" ref="tableComponentRef">
</tablecomponent>
</div>
<el-dialog v-model="dialogFrom.visible" :title="dialogFrom.title" width="80%">
@ -70,8 +70,8 @@ import * as XLSX from 'xlsx';
import tableHeaderLocal from '../assets/json/changci.json'
import { myDatabase } from '../assets/js/db.js'
import dayjs from 'dayjs'
import tablecomponent from "../components/tablecomponent.vue"
import formcomponent from "../components/formcomponent.vue"
import tablecomponent from "../components/tablecomponentchangci.vue"
import formcomponent from "../components/formcomponentchangci.vue"
import { ElMessage, ElMessageBox } from 'element-plus'
export default {
name: 'changci',
@ -180,6 +180,9 @@ export default {
let formData = {}
for (let i = 0; i < this.formHeader.length; i++) {
let element = this.formHeader[i];
if (element.default) {
formData[element.prop] = element.default
} else {
if (element.type === "text") {
formData[element.prop] = ""
} else if (element.type === "date") {
@ -188,6 +191,7 @@ export default {
formData[element.prop] = 0
}
}
}
this.dialogFrom = {
visible: true,
title: "新增场次",

6
front/src/renderer/src/views/dailishang.vue

@ -50,7 +50,7 @@
@edit="edit" @info="info" @del="del" ref="tableComponentRef" :hiddenXuhao="true">
</tablecomponent>
</div>
<el-dialog v-model="dialogFrom.visible" :title="dialogFrom.title" width="80%">
<el-dialog v-model="dialogFrom.visible" :title="dialogFrom.title" width="90%">
<formcomponent :formHeader="dialogFrom.formHeader" :formData="dialogFrom.formData"
:disabled="dialogFrom.disabled">
</formcomponent>
@ -166,6 +166,9 @@ export default {
let formData = {}
for (let i = 0; i < this.formHeader.length; i++) {
let element = this.formHeader[i];
if (element.default) {
formData[element.prop] = element.default
} else {
if (element.type === "text") {
formData[element.prop] = ""
} else if (element.type === "date") {
@ -174,6 +177,7 @@ export default {
formData[element.prop] = 0
}
}
}
this.dialogFrom = {
visible: true,
title: "新增代理商",

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

@ -1,14 +1,6 @@
<template>
<div class="rightClass">
<el-row :gutter="8">
<!-- <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 :span="6">
<div class="colDivClass">
<el-input v-model="form.danxuan" style="max-width: 600px" :formatter="(value) => `单选:${value}`"
@ -46,8 +38,8 @@
</el-col>
<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 v-model="form.dingwei2" style="max-width: 600px" :formatter="(value) => `定位(二码):${value}`"
:parser="(value) => value.replace(/[定|位|(|二|码|)|:]\s?|(,*)/g, '')">
</el-input>
</div>
</el-col>
@ -60,6 +52,9 @@
</el-col> -->
<el-col :span="6">
<div class="colDivClass">
<el-input v-model="form.fushiduizi" style="max-width: 600px" :formatter="(value) => `复式对子:${value}`"
:parser="(value) => value.replace(/[复|式|对|子|:]\s?|(,*)/g, '')">
</el-input>
<el-input v-model="form.fushi" style="max-width: 600px" :formatter="(value) => `复式:${value}`"
:parser="(value) => value.replace(/[复|式|:]\s?|(,*)/g, '')">
</el-input>
@ -71,18 +66,6 @@
: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">
@ -137,7 +120,6 @@ export default {
_: _,
dayjs: dayjs,
form: {
caipiaotype: "1",
danxuan: 900,
zuxuan: 150,
shuangfei: 15,
@ -145,6 +127,7 @@ export default {
dingwei1: 9,
dingwei2: 80,
budingwei: 0,
fushiduizi: 300,
fushi: 150,
quanbaoduizi: 3.3,
zuliu4: 35,
@ -155,12 +138,8 @@ export default {
zusan5: 15,
zusan6: 8,
zusan7: 6,
// bai: 0,
// shi: 0,
// ge: 0
},
formLocal: {
caipiaotype: "1",
danxuan: 900,
zuxuan: 150,
shuangfei: 15,
@ -168,6 +147,7 @@ export default {
dingwei1: 9,
dingwei2: 80,
budingwei: 0,
fushiduizi: 300,
fushi: 150,
quanbaoduizi: 3.3,
zuliu4: 35,
@ -178,9 +158,6 @@ export default {
zusan5: 15,
zusan6: 8,
zusan7: 6,
// bai: 0,
// shi: 0,
// ge: 0
}
}
},
@ -190,15 +167,12 @@ export default {
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 {

233
front/src/renderer/src/views/peifubeilvcopy.vue

@ -0,0 +1,233 @@
<template>
<div class="rightClass">
<el-row :gutter="8">
<!-- <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 :span="6">
<div class="colDivClass">
<el-input v-model="form.danxuan" 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.zuxuan" 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.shuangfei" 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.dudan" style="max-width: 600px" :formatter="(value) => `毒胆:${value}`"
:parser="(value) => value.replace(/[毒|胆|:]\s?|(,*)/g, '')">
</el-input>
</div>
</el-col>
<el-col :span="9">
<div class="colDivClass">
<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="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 :span="6">
<div class="colDivClass">
<el-input v-model="form.fushiduizi" style="max-width: 600px" :formatter="(value) => `复式对子:${value}`"
:parser="(value) => value.replace(/[复|式|对|子|:]\s?|(,*)/g, '')">
</el-input>
<el-input v-model="form.fushi" 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.quanbaoduizi" style="max-width: 600px" :formatter="(value) => `全包对子:${value}`"
:parser="(value) => value.replace(/[全|包|对|子:]\s?|(,*)/g, '')">
</el-input>
</div>
</el-col>
<el-col :span="8">
<div class="colDivClass">
<div>组六</div>
<el-input v-model="form.zuliu4" style="max-width: 600px;margin: 8px 0;" :formatter="(value) => `四码:${value}`"
:parser="(value) => value.replace(/[四|码|:]\s?|(,*)/g, '')">
</el-input>
<el-input v-model="form.zuliu5" style="max-width: 600px;margin: 8px 0;" :formatter="(value) => `五码:${value}`"
:parser="(value) => value.replace(/[五|码|:]\s?|(,*)/g, '')">
</el-input>
<el-input v-model="form.zuliu6" style="max-width: 600px;margin: 8px 0;" :formatter="(value) => `六码:${value}`"
:parser="(value) => value.replace(/[六|码|:]\s?|(,*)/g, '')">
</el-input>
<el-input v-model="form.zuliu7" 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">
<div>组三</div>
<el-input v-model="form.zusan4" style="max-width: 600px;margin: 8px 0;" :formatter="(value) => `四码:${value}`"
:parser="(value) => value.replace(/[四|码|:]\s?|(,*)/g, '')">
</el-input>
<el-input v-model="form.zusan5" style="max-width: 600px;margin: 8px 0;" :formatter="(value) => `五码:${value}`"
:parser="(value) => value.replace(/[五|码|:]\s?|(,*)/g, '')">
</el-input>
<el-input v-model="form.zusan6" style="max-width: 600px;margin: 8px 0;" :formatter="(value) => `六码:${value}`"
:parser="(value) => value.replace(/[六|码|:]\s?|(,*)/g, '')">
</el-input>
<el-input v-model="form.zusan7" 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>
</div>
</div>
</template>
<script>
import _ from 'lodash'
import dayjs from 'dayjs'
import { ElMessage, ElMessageBox } from 'element-plus'
export default {
name: 'peifubeilv',
components: {},
data() {
return {
_: _,
dayjs: dayjs,
form: {
caipiaotype: "1",
danxuan: 900,
zuxuan: 150,
shuangfei: 15,
dudan: 3.3,
dingwei1: 9,
dingwei2: 80,
budingwei: 0,
fushiduizi: 300,
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: 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
}
}
},
methods: {
savePeifu() {
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() {
this.form = JSON.parse(localStorage.getItem('peifu') || 0) || this.formLocal
},
watch: {},
computed: {}
}
</script>
<style scoped>
.rightClass {
padding: 8px;
}
.colDivClass {
border: 1px solid #ccc;
padding: 8px;
margin: 8px;
border-radius: 4px;
}
</style>

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

File diff suppressed because it is too large

1985
front/src/renderer/src/views/shujufenxicopy.vue

File diff suppressed because it is too large

4
jihuoqi/src/renderer/src/App.vue

@ -32,7 +32,7 @@ export default {
components: {},
data() {
return {
isVip: false,
isVip: true,
jihuoma: "",
form: {
zhucema: "",
@ -153,7 +153,7 @@ export default {
}
},
async mounted() {
let fiveDay = dayjs('2024-10-27T00:00:00').valueOf()
let fiveDay = dayjs('2024-11-27T00:00:00').valueOf()
if (!this.isVip) {
if (dayjs().valueOf() > fiveDay) {
this.isVip = false

Loading…
Cancel
Save