fix:1,修改
parent
9b7344e595
commit
c6102d995f
|
@ -45,7 +45,8 @@ router.beforeEach((to, from, next) => {
|
|||
setLocalStorage('dict', res.data);
|
||||
|
||||
})
|
||||
|
||||
setLocalStorage('uploadUrl', import.meta.env.VITE_APP_BASE_API);
|
||||
setLocalStorage('fileUrl', import.meta.env.VITE_APP_BASE_API)
|
||||
let obj = {
|
||||
materialTypes:7,
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<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>
|
||||
<el-scrollbar max-height="900px">
|
||||
<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-input v-model="formAll.gameName" disabled />
|
||||
</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-radio-group v-model="formAll.iconStyle">
|
||||
<el-radio :value="1">{{ t('默认') }}</el-radio>
|
||||
<el-radio :value="2">{{ t('自定义') }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<div v-if="formAll.iconStyle == 1">
|
||||
|
@ -108,7 +113,7 @@ const activeNameLang = ref(0);//语言切换选中
|
|||
|
||||
const langOptionAll = ref([]); // 语言tabs切换的数据
|
||||
const formAll = reactive({
|
||||
|
||||
syncStatus:false,
|
||||
})
|
||||
|
||||
// 修改时数据更新相关内容
|
||||
|
|
|
@ -36,34 +36,18 @@
|
|||
<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="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">
|
||||
<template #default="{ row }">
|
||||
<base-switch v-model="row.stopStatus" :active-value="1" :inactive-value="2"
|
||||
:before-change="() => beforeSwitchChange(row, 'stopStatus')" />
|
||||
<el-switch v-model="row.stopStatus" :active-value="1" :inactive-value="2"
|
||||
:before-change="switchBeforeChange"
|
||||
@click="beforeSwitchChange(row, 'stopStatus')" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="t('游戏开关')" align="center" prop="gameStatus" label-class-name="text-warning">
|
||||
<template #default="{ row }">
|
||||
<base-switch v-model="row.gameStatus" :active-value="1" :inactive-value="2"
|
||||
:before-change="() => beforeSwitchChange(row, 'gameStatus')"
|
||||
<el-switch v-model="row.gameStatus" :active-value="1" :inactive-value="2"
|
||||
:before-change="switchBeforeChange"
|
||||
@click="beforeSwitchChange(row, 'gameStatus')"
|
||||
style="--el-switch-on-color: #00a854; --el-switch-off-color: #ff4949" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
@ -104,6 +88,7 @@ import DictSelect from "@/components/DictSelect";
|
|||
import ImagePreview from "@/components/ImagePreview";
|
||||
import TableDragSort from '@/components/TableDragSort';
|
||||
import CustomSelect from "@/components/CustomSelect";
|
||||
import { ElMessageBox, ElCheckbox } from 'element-plus'
|
||||
|
||||
const emits = defineEmits(["reset"])
|
||||
|
||||
|
@ -252,12 +237,35 @@ const gameTypeChange = () => {
|
|||
queryParams.value.pageNum = 1;
|
||||
// platformListInit()
|
||||
}
|
||||
|
||||
const switchBeforeChange = () => {
|
||||
return false
|
||||
}
|
||||
const checked = ref(false);
|
||||
// 列表开关事件
|
||||
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 _data = {
|
||||
id: row.id
|
||||
id: row.id,
|
||||
syncStatus: checked.value,
|
||||
}
|
||||
_data[undateKeys] = _status
|
||||
try {
|
||||
|
@ -270,6 +278,11 @@ const beforeSwitchChange = async (row, undateKeys) => {
|
|||
console.error(proxy.t('接口调用失败'), error);
|
||||
return false; // 阻止开关状态改变
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
console.log('用户取消了操作')
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -21,6 +21,9 @@
|
|||
<el-form-item :label="t('平台宣传语')" prop="promotionalText">
|
||||
<el-input v-model="formAll.promotionalText" :placeholder="t('请输入平台宣传语')" />
|
||||
</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">
|
||||
<div style="width: 100%;display: flex;">
|
||||
<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-group>
|
||||
</el-form-item>
|
||||
|
||||
<div v-if="formAll.promotionalStyle == 1">
|
||||
<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>
|
||||
|
@ -232,6 +236,7 @@ const activeNameLang = ref(0);//语言切换选中
|
|||
const langOptionAll = ref([]); // 语言tabs切换的数据
|
||||
const formAll = reactive({
|
||||
iconType:1, // 平台类型 1:方形图标 2:竖版图标
|
||||
syncStatus:false,
|
||||
})
|
||||
const loadImageAsBase64 = async(url)=> {
|
||||
const res = await fetch(uploadUrl+url, { mode: 'cors' })
|
||||
|
@ -251,6 +256,7 @@ nextTick(async () => {
|
|||
formAll.iconType = props.modifyDate.iconType|| 1;
|
||||
formAll.platformName = props.modifyDate.platformName;
|
||||
formAll.minAmount = props.modifyDate.minAmount;
|
||||
formAll.syncStatus = props.modifyDate.syncStatus||false;
|
||||
if (props.modifyDate.promotionalStyle == 1){
|
||||
formAll.promotionalImage = props.modifyDate.promotionalImage;
|
||||
formAll.platformLogoGb = await loadImageAsBase64(props.modifyDate.platformLogo);
|
||||
|
|
|
@ -29,16 +29,18 @@
|
|||
<el-table-column :label="t('币种')" align="center" prop="currencyDisplay" />
|
||||
<el-table-column :label="t('维护开关')" align="center" prop="stopStatus" label-class-name="text-warning">
|
||||
<template #default="{ row }">
|
||||
<base-switch v-model="row.stopStatus" :active-value="1" :inactive-value="2"
|
||||
:before-change="() => beforeSwitchChange(row, 'stopStatus')" />
|
||||
<el-switch v-model="row.stopStatus" :active-value="1" :inactive-value="2"
|
||||
:before-change="switchBeforeChange" @click="beforeSwitchChange(row, 'stopStatus')" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="t('平台开关')" align="center" prop="platformStatus" label-class-name="text-warning">
|
||||
<template #default="{ row }">
|
||||
<base-switch v-model="row.platformStatus" :active-value="1" :inactive-value="2"
|
||||
:before-change="() => beforeSwitchChange(row, 'platformStatus')"
|
||||
activeText="开"
|
||||
inactiveText="关"
|
||||
<el-switch v-model="row.platformStatus" :active-value="1" :inactive-value="2"
|
||||
:before-change="switchBeforeChange"
|
||||
@click="beforeSwitchChange(row, 'platformStatus')"
|
||||
active-text="开"
|
||||
inactive-text="关"
|
||||
inline-prompt
|
||||
style="--el-switch-on-color: #00a854; --el-switch-off-color: #ff4949" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
@ -118,6 +120,7 @@ import DictSelect from "@/components/DictSelect";
|
|||
import CustomSelect from "@/components/CustomSelect";
|
||||
import { formatTime } from '@/utils/ruoyi'; // 时间格式化
|
||||
import { nextTick, ref } from "vue";
|
||||
import { ElMessageBox, ElCheckbox } from 'element-plus'
|
||||
|
||||
const emits = defineEmits(["toGameManage"]);
|
||||
const useInitData = useInitDataStore();
|
||||
|
@ -192,7 +195,9 @@ function reset() {
|
|||
};
|
||||
proxy.resetForm("platformRef");
|
||||
}
|
||||
|
||||
const switchBeforeChange = () => {
|
||||
return false
|
||||
}
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
useInitData.setStateData('currencyCode', String(queryParams.value.currencyCode));
|
||||
|
@ -244,12 +249,32 @@ const dragEnd = (row) => {
|
|||
getList();
|
||||
})
|
||||
}
|
||||
|
||||
const checked = ref(false);
|
||||
// 列表开关事件
|
||||
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 _data = {
|
||||
id: row.id
|
||||
id: row.id,
|
||||
syncStatus: checked.value,
|
||||
}
|
||||
_data[undateKeys] = _status
|
||||
try {
|
||||
|
@ -262,6 +287,12 @@ const beforeSwitchChange = async (row, undateKeys) => {
|
|||
console.error(proxy.t('接口调用失败'), error);
|
||||
return false; // 阻止开关状态改变
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
console.log('用户取消了操作')
|
||||
})
|
||||
return
|
||||
|
||||
}
|
||||
|
||||
// 子游戏管理
|
||||
|
|
|
@ -115,22 +115,22 @@
|
|||
<template #default="{ row }">
|
||||
<el-button link type="primary" @click.stop="opInfo(row, 'detail')" v-hasPermi="['operation:feedback:query']">{{
|
||||
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']">{{
|
||||
t('采纳') }}</el-button>
|
||||
<el-button link type="primary" v-if="row.feedbackStatus == '1'" @click.stop="opInfo(row, 'ignore')"
|
||||
v-hasPermi="['operation:feedback:edit']">{{
|
||||
t('忽略') }}</el-button>
|
||||
t('忽略') }}</el-button> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 非待处理列表才有操作人、操作时间 -->
|
||||
<table-operation v-if="listType !== 'pending'"></table-operation>
|
||||
</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"
|
||||
@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="getList" />
|
||||
|
|
Loading…
Reference in New Issue