fix:1,修改

main
YuanJian 2025-09-05 09:13:36 +08:00
parent 9b7344e595
commit c6102d995f
7 changed files with 97 additions and 41 deletions

BIN
dist.rar

Binary file not shown.

View File

@ -45,7 +45,8 @@ router.beforeEach((to, from, next) => {
setLocalStorage('dict', res.data); setLocalStorage('dict', res.data);
}) })
setLocalStorage('uploadUrl', import.meta.env.VITE_APP_BASE_API);
setLocalStorage('fileUrl', import.meta.env.VITE_APP_BASE_API)
let obj = { let obj = {
materialTypes:7, materialTypes:7,
} }

View File

@ -1,6 +1,6 @@
<template> <template>
<!-- 新增 --> <!-- 新增 -->
<el-dialog :title="addEditStatus=='add' ? t('新增') : t('修改')" :close-on-click-modal="false" v-model="showDialog" <el-dialog :title="addEditStatus=='add' ? t('新增') : t('修改')" :close-on-click-modal="false" v-model="showDialog"
width="700px" append-to-body> width="700px" append-to-body>
<el-scrollbar max-height="900px"> <el-scrollbar max-height="900px">
<el-form ref="formRef" :model="formAll" :rules="rules" label-width="130px" class="add-form"> <el-form ref="formRef" :model="formAll" :rules="rules" label-width="130px" class="add-form">
@ -13,10 +13,15 @@
<el-form-item :label="t('子游戏名称')" prop="gameName"> <el-form-item :label="t('子游戏名称')" prop="gameName">
<el-input v-model="formAll.gameName" disabled /> <el-input v-model="formAll.gameName" disabled />
</el-form-item> </el-form-item>
<el-form-item :label="t('子游戏名称')" prop="gameName">
<el-input v-model="formAll.gameName" disabled />
</el-form-item>
<el-form-item :label="t('是否同步')" prop="syncStatus">
<el-checkbox v-model="formAll.syncStatus" />
</el-form-item>
<el-form-item :label="t('icon图样式')" prop="iconStyle"> <el-form-item :label="t('icon图样式')" prop="iconStyle">
<el-radio-group v-model="formAll.iconStyle"> <el-radio-group v-model="formAll.iconStyle">
<el-radio :value="1">{{ t('默认') }}</el-radio> <el-radio :value="1">{{ t('默认') }}</el-radio>
<el-radio :value="2">{{ t('自定义') }}</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<div v-if="formAll.iconStyle == 1"> <div v-if="formAll.iconStyle == 1">
@ -108,7 +113,7 @@ const activeNameLang = ref(0);//语言切换选中
const langOptionAll = ref([]); // tabs const langOptionAll = ref([]); // tabs
const formAll = reactive({ const formAll = reactive({
syncStatus:false,
}) })
// //

View File

@ -36,34 +36,18 @@
<el-table-column :label="t('游戏ID')" align="center" prop="id" /> <el-table-column :label="t('游戏ID')" align="center" prop="id" />
<el-table-column :label="t('子游戏名称')" align="center" prop="gameName" /> <el-table-column :label="t('子游戏名称')" align="center" prop="gameName" />
<el-table-column :label="t('币种')" align="center" prop="currencyDisplay" /> <el-table-column :label="t('币种')" align="center" prop="currencyDisplay" />
<el-table-column :label="t('热门一')" align="center" prop="popularOne" label-class-name="text-warning">
<template #default="{ row }">
<base-switch v-model="row.popularOne" :active-value="1" :inactive-value="2"
:before-change="() => beforeSwitchChange(row, 'popularOne')" />
</template>
</el-table-column>
<el-table-column :label="t('热门二')" align="center" prop="popularTwo" label-class-name="text-warning">
<template #default="{ row }">
<base-switch v-model="row.popularTwo" :active-value="1" :inactive-value="2"
:before-change="() => beforeSwitchChange(row, 'popularTwo')" />
</template>
</el-table-column>
<el-table-column :label="t('推荐(角标)')" align="center" prop="recommendedStatus" label-class-name="text-warning">
<template #default="{ row }">
<base-switch v-model="row.recommendedStatus" :active-value="1" :inactive-value="2"
:before-change="() => beforeSwitchChange(row, 'recommendedStatus')" />
</template>
</el-table-column>
<el-table-column :label="t('维护开关')" align="center" prop="stopStatus" label-class-name="text-warning"> <el-table-column :label="t('维护开关')" align="center" prop="stopStatus" label-class-name="text-warning">
<template #default="{ row }"> <template #default="{ row }">
<base-switch v-model="row.stopStatus" :active-value="1" :inactive-value="2" <el-switch v-model="row.stopStatus" :active-value="1" :inactive-value="2"
:before-change="() => beforeSwitchChange(row, 'stopStatus')" /> :before-change="switchBeforeChange"
@click="beforeSwitchChange(row, 'stopStatus')" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="t('游戏开关')" align="center" prop="gameStatus" label-class-name="text-warning"> <el-table-column :label="t('游戏开关')" align="center" prop="gameStatus" label-class-name="text-warning">
<template #default="{ row }"> <template #default="{ row }">
<base-switch v-model="row.gameStatus" :active-value="1" :inactive-value="2" <el-switch v-model="row.gameStatus" :active-value="1" :inactive-value="2"
:before-change="() => beforeSwitchChange(row, 'gameStatus')" :before-change="switchBeforeChange"
@click="beforeSwitchChange(row, 'gameStatus')"
style="--el-switch-on-color: #00a854; --el-switch-off-color: #ff4949" /> style="--el-switch-on-color: #00a854; --el-switch-off-color: #ff4949" />
</template> </template>
</el-table-column> </el-table-column>
@ -104,6 +88,7 @@ import DictSelect from "@/components/DictSelect";
import ImagePreview from "@/components/ImagePreview"; import ImagePreview from "@/components/ImagePreview";
import TableDragSort from '@/components/TableDragSort'; import TableDragSort from '@/components/TableDragSort';
import CustomSelect from "@/components/CustomSelect"; import CustomSelect from "@/components/CustomSelect";
import { ElMessageBox, ElCheckbox } from 'element-plus'
const emits = defineEmits(["reset"]) const emits = defineEmits(["reset"])
@ -252,12 +237,35 @@ const gameTypeChange = () => {
queryParams.value.pageNum = 1; queryParams.value.pageNum = 1;
// platformListInit() // platformListInit()
} }
const switchBeforeChange = () => {
return false
}
const checked = ref(false);
// //
const beforeSwitchChange = async (row, undateKeys) => { const beforeSwitchChange = async (row, undateKeys) => {
checked.value = false;
ElMessageBox({
title: '温馨提示',
message: () =>
h('div', { style: 'display:flex; flex-direction:column; gap:10px;' }, [
h('p', { style: 'margin:0;color:#666;' }, '请确认是否需要同步数据'),
h(ElCheckbox, {
label: '是否同步',
modelValue: checked.value,
'onUpdate:modelValue': (val) => {
checked.value = val
},
}),
]),
showCancelButton: true,
confirmButtonText: '确定',
cancelButtonText: '取消',
})
.then(async () => {
const _status = row[undateKeys] === 1 ? 2 : 1 const _status = row[undateKeys] === 1 ? 2 : 1
const _data = { const _data = {
id: row.id id: row.id,
syncStatus: checked.value,
} }
_data[undateKeys] = _status _data[undateKeys] = _status
try { try {
@ -270,6 +278,11 @@ const beforeSwitchChange = async (row, undateKeys) => {
console.error(proxy.t('接口调用失败'), error); console.error(proxy.t('接口调用失败'), error);
return false; // return false; //
} }
})
.catch(() => {
console.log('用户取消了操作')
})
} }

View File

@ -21,6 +21,9 @@
<el-form-item :label="t('平台宣传语')" prop="promotionalText"> <el-form-item :label="t('平台宣传语')" prop="promotionalText">
<el-input v-model="formAll.promotionalText" :placeholder="t('请输入平台宣传语')" /> <el-input v-model="formAll.promotionalText" :placeholder="t('请输入平台宣传语')" />
</el-form-item> </el-form-item>
<el-form-item :label="t('是否同步')" prop="syncStatus">
<el-checkbox v-model="formAll.syncStatus" />
</el-form-item>
<el-form-item :label="t('平台跳转方式')" prop="iosJump"> <el-form-item :label="t('平台跳转方式')" prop="iosJump">
<div style="width: 100%;display: flex;"> <div style="width: 100%;display: flex;">
<div style="width: 80px;text-align: right;margin-right: 10px;">IOS:</div> <div style="width: 80px;text-align: right;margin-right: 10px;">IOS:</div>
@ -50,6 +53,7 @@
<el-radio :value="2">{{ t('自定义') }}</el-radio> <el-radio :value="2">{{ t('自定义') }}</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<div v-if="formAll.promotionalStyle == 1"> <div v-if="formAll.promotionalStyle == 1">
<el-form-item :label="t('宣传图图标')" prop="promotionalIcon"> <el-form-item :label="t('宣传图图标')" prop="promotionalIcon">
<banner-icon @clickSelect="handleSelection('three',$event)" :disabled="shouwLoding" :imageUrl="formAll.promotionalIcon" :query="materialIcon" url="/game/material/group/select"></banner-icon> <banner-icon @clickSelect="handleSelection('three',$event)" :disabled="shouwLoding" :imageUrl="formAll.promotionalIcon" :query="materialIcon" url="/game/material/group/select"></banner-icon>
@ -232,6 +236,7 @@ const activeNameLang = ref(0);//语言切换选中
const langOptionAll = ref([]); // tabs const langOptionAll = ref([]); // tabs
const formAll = reactive({ const formAll = reactive({
iconType:1, // 1: 2: iconType:1, // 1: 2:
syncStatus:false,
}) })
const loadImageAsBase64 = async(url)=> { const loadImageAsBase64 = async(url)=> {
const res = await fetch(uploadUrl+url, { mode: 'cors' }) const res = await fetch(uploadUrl+url, { mode: 'cors' })
@ -251,6 +256,7 @@ nextTick(async () => {
formAll.iconType = props.modifyDate.iconType|| 1; formAll.iconType = props.modifyDate.iconType|| 1;
formAll.platformName = props.modifyDate.platformName; formAll.platformName = props.modifyDate.platformName;
formAll.minAmount = props.modifyDate.minAmount; formAll.minAmount = props.modifyDate.minAmount;
formAll.syncStatus = props.modifyDate.syncStatus||false;
if (props.modifyDate.promotionalStyle == 1){ if (props.modifyDate.promotionalStyle == 1){
formAll.promotionalImage = props.modifyDate.promotionalImage; formAll.promotionalImage = props.modifyDate.promotionalImage;
formAll.platformLogoGb = await loadImageAsBase64(props.modifyDate.platformLogo); formAll.platformLogoGb = await loadImageAsBase64(props.modifyDate.platformLogo);

View File

@ -29,16 +29,18 @@
<el-table-column :label="t('币种')" align="center" prop="currencyDisplay" /> <el-table-column :label="t('币种')" align="center" prop="currencyDisplay" />
<el-table-column :label="t('维护开关')" align="center" prop="stopStatus" label-class-name="text-warning"> <el-table-column :label="t('维护开关')" align="center" prop="stopStatus" label-class-name="text-warning">
<template #default="{ row }"> <template #default="{ row }">
<base-switch v-model="row.stopStatus" :active-value="1" :inactive-value="2" <el-switch v-model="row.stopStatus" :active-value="1" :inactive-value="2"
:before-change="() => beforeSwitchChange(row, 'stopStatus')" /> :before-change="switchBeforeChange" @click="beforeSwitchChange(row, 'stopStatus')" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="t('平台开关')" align="center" prop="platformStatus" label-class-name="text-warning"> <el-table-column :label="t('平台开关')" align="center" prop="platformStatus" label-class-name="text-warning">
<template #default="{ row }"> <template #default="{ row }">
<base-switch v-model="row.platformStatus" :active-value="1" :inactive-value="2" <el-switch v-model="row.platformStatus" :active-value="1" :inactive-value="2"
:before-change="() => beforeSwitchChange(row, 'platformStatus')" :before-change="switchBeforeChange"
activeText="开" @click="beforeSwitchChange(row, 'platformStatus')"
inactiveText="关" active-text="开"
inactive-text="关"
inline-prompt
style="--el-switch-on-color: #00a854; --el-switch-off-color: #ff4949" /> style="--el-switch-on-color: #00a854; --el-switch-off-color: #ff4949" />
</template> </template>
</el-table-column> </el-table-column>
@ -118,6 +120,7 @@ import DictSelect from "@/components/DictSelect";
import CustomSelect from "@/components/CustomSelect"; import CustomSelect from "@/components/CustomSelect";
import { formatTime } from '@/utils/ruoyi'; // import { formatTime } from '@/utils/ruoyi'; //
import { nextTick, ref } from "vue"; import { nextTick, ref } from "vue";
import { ElMessageBox, ElCheckbox } from 'element-plus'
const emits = defineEmits(["toGameManage"]); const emits = defineEmits(["toGameManage"]);
const useInitData = useInitDataStore(); const useInitData = useInitDataStore();
@ -192,7 +195,9 @@ function reset() {
}; };
proxy.resetForm("platformRef"); proxy.resetForm("platformRef");
} }
const switchBeforeChange = () => {
return false
}
/** 搜索按钮操作 */ /** 搜索按钮操作 */
function handleQuery() { function handleQuery() {
useInitData.setStateData('currencyCode', String(queryParams.value.currencyCode)); useInitData.setStateData('currencyCode', String(queryParams.value.currencyCode));
@ -244,12 +249,32 @@ const dragEnd = (row) => {
getList(); getList();
}) })
} }
const checked = ref(false);
// //
const beforeSwitchChange = async (row, undateKeys) => { const beforeSwitchChange = async (row, undateKeys) => {
checked.value = false;
ElMessageBox({
title: '温馨提示',
message: () =>
h('div', { style: 'display:flex; flex-direction:column; gap:10px;' }, [
h('p', { style: 'margin:0;color:#666;' }, '请确认是否需要同步数据'),
h(ElCheckbox, {
label: '是否同步',
modelValue: checked.value,
'onUpdate:modelValue': (val) => {
checked.value = val
},
}),
]),
showCancelButton: true,
confirmButtonText: '确定',
cancelButtonText: '取消',
})
.then(async () => {
const _status = row[undateKeys] === 1 ? 2 : 1 const _status = row[undateKeys] === 1 ? 2 : 1
const _data = { const _data = {
id: row.id id: row.id,
syncStatus: checked.value,
} }
_data[undateKeys] = _status _data[undateKeys] = _status
try { try {
@ -262,6 +287,12 @@ const beforeSwitchChange = async (row, undateKeys) => {
console.error(proxy.t('接口调用失败'), error); console.error(proxy.t('接口调用失败'), error);
return false; // return false; //
} }
})
.catch(() => {
console.log('用户取消了操作')
})
return
} }
// //

View File

@ -115,22 +115,22 @@
<template #default="{ row }"> <template #default="{ row }">
<el-button link type="primary" @click.stop="opInfo(row, 'detail')" v-hasPermi="['operation:feedback:query']">{{ <el-button link type="primary" @click.stop="opInfo(row, 'detail')" v-hasPermi="['operation:feedback:query']">{{
t('详情') }}</el-button> t('详情') }}</el-button>
<el-button link type="primary" v-if="row.feedbackStatus == '1'" @click.stop="opInfo(row, 'adopt')" <!-- <el-button link type="primary" v-if="row.feedbackStatus == '1'" @click.stop="opInfo(row, 'adopt')"
v-hasPermi="['operation:feedback:edit']">{{ v-hasPermi="['operation:feedback:edit']">{{
t('采纳') }}</el-button> t('采纳') }}</el-button>
<el-button link type="primary" v-if="row.feedbackStatus == '1'" @click.stop="opInfo(row, 'ignore')" <el-button link type="primary" v-if="row.feedbackStatus == '1'" @click.stop="opInfo(row, 'ignore')"
v-hasPermi="['operation:feedback:edit']">{{ v-hasPermi="['operation:feedback:edit']">{{
t('忽略') }}</el-button> t('忽略') }}</el-button> -->
</template> </template>
</el-table-column> </el-table-column>
<!-- 非待处理列表才有操作人操作时间 --> <!-- 非待处理列表才有操作人操作时间 -->
<table-operation v-if="listType !== 'pending'"></table-operation> <table-operation v-if="listType !== 'pending'"></table-operation>
</el-table> </el-table>
<!-- 批量操作 --> <!-- 批量操作 -->
<table-batch-operate ref="tableFooterRef" v-if="total > 0 && (listType === 'pending' || listType === 'all')" <!-- <table-batch-operate ref="tableFooterRef" v-if="total > 0 && (listType === 'pending' || listType === 'all')"
v-hasPermi="['operation:feedback:edit']" v-model:batchOpType="batchOpType" v-model:isAllSelection="isAllSelection" v-hasPermi="['operation:feedback:edit']" v-model:batchOpType="batchOpType" v-model:isAllSelection="isAllSelection"
@allSelectionChange="allSelectionChange" @selectionDataNu="selectionDataNu" @opTypeChange="opTypeChange" :selectionData="selectionData" @allSelectionChange="allSelectionChange" @selectionDataNu="selectionDataNu" @opTypeChange="opTypeChange" :selectionData="selectionData"
:opTypeOptions="opTypeOptions"></table-batch-operate> :opTypeOptions="opTypeOptions"></table-batch-operate> -->
<!-- 列表分页 --> <!-- 列表分页 -->
<pagination v-if="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" <pagination v-if="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize"
@pagination="getList" /> @pagination="getList" />