修复打包报错
This commit is contained in:
@@ -184,9 +184,12 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import api from '../../../api/play_record/index'
|
import api from '../../../api/play_record/index'
|
||||||
|
import { useI18n } from 'vue-i18n'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import type { FormInstance, FormRules } from 'element-plus'
|
import type { FormInstance, FormRules } from 'element-plus'
|
||||||
|
|
||||||
|
const { t } = useI18n()
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
modelValue: boolean
|
modelValue: boolean
|
||||||
dialogType: string
|
dialogType: string
|
||||||
@@ -399,15 +402,15 @@
|
|||||||
if (props.dialogType === 'add') {
|
if (props.dialogType === 'add') {
|
||||||
delete payload.id
|
delete payload.id
|
||||||
await api.save(payload)
|
await api.save(payload)
|
||||||
ElMessage.success($t('page.form.addSuccess'))
|
ElMessage.success(t('page.form.addSuccess'))
|
||||||
} else {
|
} else {
|
||||||
await api.update(payload)
|
await api.update(payload)
|
||||||
ElMessage.success($t('page.form.editSuccess'))
|
ElMessage.success(t('page.form.editSuccess'))
|
||||||
}
|
}
|
||||||
emit('success')
|
emit('success')
|
||||||
handleClose()
|
handleClose()
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
let msg = $t('page.form.validateFailed')
|
let msg = t('page.form.validateFailed')
|
||||||
if (error?.message) {
|
if (error?.message) {
|
||||||
msg = error.message
|
msg = error.message
|
||||||
} else if (typeof error === 'string') {
|
} else if (typeof error === 'string') {
|
||||||
|
|||||||
@@ -171,9 +171,11 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import api from '../../../api/player/index'
|
import api from '../../../api/player/index'
|
||||||
import lotteryConfigApi from '../../../api/lottery_pool_config/index'
|
import lotteryConfigApi from '../../../api/lottery_pool_config/index'
|
||||||
|
import { useI18n } from 'vue-i18n'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import type { FormInstance, FormRules } from 'element-plus'
|
import type { FormInstance, FormRules } from 'element-plus'
|
||||||
|
|
||||||
|
const { t } = useI18n()
|
||||||
const WEIGHT_FIELDS = ['t1_weight', 't2_weight', 't3_weight', 't4_weight', 't5_weight'] as const
|
const WEIGHT_FIELDS = ['t1_weight', 't2_weight', 't3_weight', 't4_weight', 't5_weight'] as const
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
@@ -416,7 +418,7 @@
|
|||||||
await formRef.value.validate()
|
await formRef.value.validate()
|
||||||
const useCustomWeights = isLotteryConfigEmpty()
|
const useCustomWeights = isLotteryConfigEmpty()
|
||||||
if (useCustomWeights && Math.abs(weightsSum.value - 100) > 0.01) {
|
if (useCustomWeights && Math.abs(weightsSum.value - 100) > 0.01) {
|
||||||
ElMessage.warning($t('page.form.ruleWeightsSumMustBe100'))
|
ElMessage.warning(t('page.form.ruleWeightsSumMustBe100'))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const payload = { ...formData }
|
const payload = { ...formData }
|
||||||
@@ -428,10 +430,10 @@
|
|||||||
}
|
}
|
||||||
if (props.dialogType === 'add') {
|
if (props.dialogType === 'add') {
|
||||||
await api.save(payload)
|
await api.save(payload)
|
||||||
ElMessage.success($t('page.form.addSuccess'))
|
ElMessage.success(t('page.form.addSuccess'))
|
||||||
} else {
|
} else {
|
||||||
await api.update(payload)
|
await api.update(payload)
|
||||||
ElMessage.success($t('page.form.editSuccess'))
|
ElMessage.success(t('page.form.editSuccess'))
|
||||||
}
|
}
|
||||||
emit('success')
|
emit('success')
|
||||||
handleClose()
|
handleClose()
|
||||||
|
|||||||
@@ -81,9 +81,12 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import api from '../../../api/player_ticket_record/index'
|
import api from '../../../api/player_ticket_record/index'
|
||||||
|
import { useI18n } from 'vue-i18n'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import type { FormInstance, FormRules } from 'element-plus'
|
import type { FormInstance, FormRules } from 'element-plus'
|
||||||
|
|
||||||
|
const { t } = useI18n()
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
modelValue: boolean
|
modelValue: boolean
|
||||||
dialogType: string
|
dialogType: string
|
||||||
@@ -230,10 +233,10 @@
|
|||||||
const rest = { ...formData } as Record<string, unknown>
|
const rest = { ...formData } as Record<string, unknown>
|
||||||
delete rest.id
|
delete rest.id
|
||||||
await api.save(rest)
|
await api.save(rest)
|
||||||
ElMessage.success($t('page.form.addSuccess'))
|
ElMessage.success(t('page.form.addSuccess'))
|
||||||
} else {
|
} else {
|
||||||
await api.update(formData)
|
await api.update(formData)
|
||||||
ElMessage.success($t('page.form.editSuccess'))
|
ElMessage.success(t('page.form.editSuccess'))
|
||||||
}
|
}
|
||||||
emit('success')
|
emit('success')
|
||||||
handleClose()
|
handleClose()
|
||||||
|
|||||||
@@ -90,9 +90,12 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import api from '../../../api/player_wallet_record/index'
|
import api from '../../../api/player_wallet_record/index'
|
||||||
|
import { useI18n } from 'vue-i18n'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import type { FormInstance, FormRules } from 'element-plus'
|
import type { FormInstance, FormRules } from 'element-plus'
|
||||||
|
|
||||||
|
const { t } = useI18n()
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
modelValue: boolean
|
modelValue: boolean
|
||||||
dialogType: string
|
dialogType: string
|
||||||
@@ -225,10 +228,10 @@
|
|||||||
const payload = { ...formData }
|
const payload = { ...formData }
|
||||||
if (props.dialogType === 'add') {
|
if (props.dialogType === 'add') {
|
||||||
await api.save(payload)
|
await api.save(payload)
|
||||||
ElMessage.success($t('page.form.addSuccess'))
|
ElMessage.success(t('page.form.addSuccess'))
|
||||||
} else {
|
} else {
|
||||||
await api.update(payload)
|
await api.update(payload)
|
||||||
ElMessage.success($t('page.form.editSuccess'))
|
ElMessage.success(t('page.form.editSuccess'))
|
||||||
}
|
}
|
||||||
emit('success')
|
emit('success')
|
||||||
handleClose()
|
handleClose()
|
||||||
|
|||||||
Reference in New Issue
Block a user