|
|
|
@ -3,46 +3,47 @@
|
|
|
|
|
<el-card shadow="hover" header="复制账号"> |
|
|
|
|
<template #header> |
|
|
|
|
复制账号 |
|
|
|
|
<el-button v-show="item.copyShow == false" @click="item.copyShow = true" class="button-caret" |
|
|
|
|
type="text"> |
|
|
|
|
<el-button v-show="item.copyShow == false" @click="item.copyShow = true" class="button-caret" type="text"> |
|
|
|
|
<el-icon> |
|
|
|
|
<ele-CaretBottom/> |
|
|
|
|
<ele-CaretBottom /> |
|
|
|
|
</el-icon> |
|
|
|
|
</el-button> |
|
|
|
|
<el-button v-show="item.copyShow == true" @click="item.copyShow = false" class="button-caret" |
|
|
|
|
type="text"> |
|
|
|
|
<el-button v-show="item.copyShow == true" @click="item.copyShow = false" class="button-caret" type="text"> |
|
|
|
|
<el-icon> |
|
|
|
|
<ele-CaretTop/> |
|
|
|
|
<ele-CaretTop /> |
|
|
|
|
</el-icon> |
|
|
|
|
</el-button> |
|
|
|
|
</template> |
|
|
|
|
<div v-show="item.copyShow"> |
|
|
|
|
<div class="game-order-search mb15"> |
|
|
|
|
|
|
|
|
|
<el-form label-position="right" label-width="300px" style="max-width: 520px"> |
|
|
|
|
<el-form-item label="原账号"> |
|
|
|
|
<el-input v-model="tableData.data.SrcName" placeholder="请填写uid" class="w-50 m-2" clearable/> |
|
|
|
|
<el-input v-model="tableData.data.SrcName" placeholder="请填写uid" class="w-50 m-2" clearable /> |
|
|
|
|
</el-form-item> |
|
|
|
|
<!-- <el-form-item label="原账号服务器"> |
|
|
|
|
<el-select v-model="tableData.data.SrcServer" class="m-2" placeholder="选择服务器" filterable> |
|
|
|
|
<el-option v-for="item in servers" :key="item.id" :label="item.name" :value="item.id"/> |
|
|
|
|
<!-- <el-form-item label="原账号服务器">--> |
|
|
|
|
<!-- <el-select v-model="tableData.data.SrcServer" class="m-2" placeholder="选择服务器" filterable>--> |
|
|
|
|
<!-- <el-option v-for="item in servers" :key="item.id" :label="item.name" :value="item.id" />--> |
|
|
|
|
<!-- </el-select>--> |
|
|
|
|
<!-- </el-form-item>--> |
|
|
|
|
<el-form-item label="原账号服务器" prop="SrcServer"> |
|
|
|
|
<el-select v-model="serverSwitch" class="m-2" placeholder="选择服务器" size="large" style="width: 80px"> |
|
|
|
|
<el-option v-for="item in serverCategorize" :key="item.value" :label="item.label" :value="item.value"/> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item>--> |
|
|
|
|
<el-select v-model="tableData.data.SrcServer" class="m-2" placeholder="选择服务器" size="large" filterable> |
|
|
|
|
<el-option v-for="item in switchServer()" :key="item.id" :label="item.name" :value="item.id"/> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item> |
|
|
|
|
<el-button size="large" type="primary" class="ml10" @click="copyUnit"> |
|
|
|
|
复制 |
|
|
|
|
</el-button> |
|
|
|
|
<el-button size="large" type="primary" class="ml10" @click="copyUnit"> 复制 </el-button> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item> |
|
|
|
|
<el-button size="default" type="primary" @click="onDownload(filename)" v-if="!disabled" |
|
|
|
|
:loading="loading"> |
|
|
|
|
<el-button size="default" type="primary" @click="onDownload(filename)" v-if="!disabled" :loading="loading"> |
|
|
|
|
<div v-if="loading">正在复制账号</div> |
|
|
|
|
<div v-else>下载账号json数据</div> |
|
|
|
|
</el-button> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item inlist="true"> |
|
|
|
|
<el-button size="default" type="primary" @click="onDownload(storeFilename)" v-if="!disabled" |
|
|
|
|
:loading="loading1"> |
|
|
|
|
<el-button size="default" type="primary" @click="onDownload(storeFilename)" v-if="!disabled" :loading="loading1"> |
|
|
|
|
<div v-if="loading1">正在复制仓库</div> |
|
|
|
|
<div v-else>下载仓库json数据</div> |
|
|
|
|
</el-button> |
|
|
|
@ -55,16 +56,14 @@
|
|
|
|
|
<el-card shadow="hover" header="载入账号信息"> |
|
|
|
|
<template #header> |
|
|
|
|
上载账号信息 |
|
|
|
|
<el-button v-show="item.copyShow == false" @click="item.copyShow = true" class="button-caret" |
|
|
|
|
type="text"> |
|
|
|
|
<el-button v-show="item.copyShow == false" @click="item.copyShow = true" class="button-caret" type="text"> |
|
|
|
|
<el-icon> |
|
|
|
|
<ele-CaretBottom/> |
|
|
|
|
<ele-CaretBottom /> |
|
|
|
|
</el-icon> |
|
|
|
|
</el-button> |
|
|
|
|
<el-button v-show="item.copyShow == true" @click="item.copyShow = false" class="button-caret" |
|
|
|
|
type="text"> |
|
|
|
|
<el-button v-show="item.copyShow == true" @click="item.copyShow = false" class="button-caret" type="text"> |
|
|
|
|
<el-icon> |
|
|
|
|
<ele-CaretTop/> |
|
|
|
|
<ele-CaretTop /> |
|
|
|
|
</el-icon> |
|
|
|
|
</el-button> |
|
|
|
|
</template> |
|
|
|
@ -73,7 +72,7 @@
|
|
|
|
|
<el-form label-position="right" label-width="300px" style="max-width: 520px"> |
|
|
|
|
<el-upload |
|
|
|
|
class="upload-demo" |
|
|
|
|
:action="baseURL+'api/v1/pub/upload/singleFile'" |
|
|
|
|
:action="baseURL + 'api/v1/pub/upload/singleFile'" |
|
|
|
|
:on-preview="handlePreview" |
|
|
|
|
:on-remove="handleRemove" |
|
|
|
|
:on-change="handleChange" |
|
|
|
@ -81,24 +80,33 @@
|
|
|
|
|
multiple |
|
|
|
|
:limit="2" |
|
|
|
|
:on-exceed="handleExceed" |
|
|
|
|
:file-list="fileList"> |
|
|
|
|
:file-list="fileList" |
|
|
|
|
> |
|
|
|
|
<el-button size="small" type="primary">点击上传</el-button> |
|
|
|
|
<div slot="tip" class="el-upload__tip">只能上传Json文件</div> |
|
|
|
|
</el-upload> |
|
|
|
|
<el-form-item label="文件名称"> |
|
|
|
|
<el-select v-model="tableData.data.filename" class="m-2" placeholder="选择载入文件" filterable> |
|
|
|
|
<el-option v-for="item in tableData.fileNames" :key="item" :label="item" :value="item"/> |
|
|
|
|
<el-option v-for="item in tableData.fileNames" :key="item" :label="item" :value="item" /> |
|
|
|
|
</el-select> |
|
|
|
|
<!-- <el-input v-model="tableData.data.filename" placeholder="请填写filename" class="w-50 m-2" clearable/>--> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="仓库文件名称"> |
|
|
|
|
<el-select v-model="tableData.data.storeFilename" class="m-2" placeholder="选择载入文件" filterable> |
|
|
|
|
<el-option v-for="item in tableData.fileNames" :key="item" :label="item" :value="item"/> |
|
|
|
|
<el-option v-for="item in tableData.fileNames" :key="item" :label="item" :value="item" /> |
|
|
|
|
</el-select> |
|
|
|
|
<!-- <el-input v-model="tableData.data.filename" placeholder="请填写filename" class="w-50 m-2" clearable/>--> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="目标账号"> |
|
|
|
|
<el-input v-model="tableData.data.DestName" placeholder="请填写uid" class="w-50 m-2" clearable/> |
|
|
|
|
<el-input v-model="tableData.data.DestName" placeholder="请填写uid" class="w-50 m-2" clearable /> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="目标服务器" prop="DestServer"> |
|
|
|
|
<el-select v-model="serverSwitch" class="m-2" placeholder="选择服务器" size="large" style="width: 80px"> |
|
|
|
|
<el-option v-for="item in serverCategorize" :key="item.value" :label="item.label" :value="item.value"/> |
|
|
|
|
</el-select> |
|
|
|
|
<el-select v-model="tableData.data.DestServer" class="m-2" placeholder="选择服务器" size="large" filterable> |
|
|
|
|
<el-option v-for="item in switchServer()" :key="item.id+''" :label="item.name" :value="item.id"/> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
<!-- <el-form-item label="目标服务器">--> |
|
|
|
|
<!-- <el-select v-model="tableData.data.DestServer" class="m-2" placeholder="选择服务器" filterable>--> |
|
|
|
@ -106,9 +114,7 @@
|
|
|
|
|
<!-- </el-select>--> |
|
|
|
|
<!-- </el-form-item>--> |
|
|
|
|
<el-form-item> |
|
|
|
|
<el-button size="large" type="primary" class="ml10" @click="updateUnit"> |
|
|
|
|
更新 |
|
|
|
|
</el-button> |
|
|
|
|
<el-button size="large" type="primary" class="ml10" @click="updateUnit"> 更新 </el-button> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-form> |
|
|
|
|
</div> |
|
|
|
@ -119,12 +125,12 @@
|
|
|
|
|
删除账号 |
|
|
|
|
<el-button v-show="item.delShow == false" @click="item.delShow = true" class="button-caret" type="text"> |
|
|
|
|
<el-icon> |
|
|
|
|
<ele-CaretBottom/> |
|
|
|
|
<ele-CaretBottom /> |
|
|
|
|
</el-icon> |
|
|
|
|
</el-button> |
|
|
|
|
<el-button v-show="item.delShow == true" @click="item.delShow = false" class="button-caret" type="text"> |
|
|
|
|
<el-icon> |
|
|
|
|
<ele-CaretTop/> |
|
|
|
|
<ele-CaretTop /> |
|
|
|
|
</el-icon> |
|
|
|
|
</el-button> |
|
|
|
|
</template> |
|
|
|
@ -132,23 +138,18 @@
|
|
|
|
|
<div class="game-order-search mb15"> |
|
|
|
|
<el-form label-position="right" label-width="300px" style="max-width: 520px"> |
|
|
|
|
<el-form-item label="账号"> |
|
|
|
|
<el-input v-model="tableData.del.SrcName" placeholder="" class="w-50 m-2" clearable/> |
|
|
|
|
<el-input v-model="tableData.del.SrcName" placeholder="" class="w-50 m-2" clearable /> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="账号服务器"> |
|
|
|
|
<el-select v-model="serverSwitch" class="m-2" placeholder="选择服务器" size="large" style="width: 80px"> |
|
|
|
|
<el-option label="全部" :value="0"/> |
|
|
|
|
<el-option label="ios" :value="1"/> |
|
|
|
|
<el-option label="安卓" :value="2"/> |
|
|
|
|
<el-option label="其他" :value="3"/> |
|
|
|
|
<el-option v-for="item in serverCategorize" :key="item.value" :label="item.label" :value="item.value" /> |
|
|
|
|
</el-select> |
|
|
|
|
<el-select v-model="tableData.del.serverId" class="m-2" placeholder="选择服务器" filterable> |
|
|
|
|
<el-option v-for="item in switchServer()" :key="item.id" :label="item.name" :value="item.id+''"/> |
|
|
|
|
<el-option v-for="item in switchServer()" :key="item.id" :label="item.name" :value="item.id" /> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item> |
|
|
|
|
<el-button type="primary" class="ml10" @click="delAccount"> |
|
|
|
|
删除账号 |
|
|
|
|
</el-button> |
|
|
|
|
<el-button type="primary" class="ml10" @click="delAccount"> 删除账号 </el-button> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-form> |
|
|
|
|
</div> |
|
|
|
@ -159,40 +160,33 @@
|
|
|
|
|
修改登录密码 |
|
|
|
|
<el-button v-show="item.pwdShow == false" @click="item.pwdShow = true" class="button-caret" type="text"> |
|
|
|
|
<el-icon> |
|
|
|
|
<ele-CaretBottom/> |
|
|
|
|
<ele-CaretBottom /> |
|
|
|
|
</el-icon> |
|
|
|
|
</el-button> |
|
|
|
|
<el-button v-show="item.pwdShow == true" @click="item.pwdShow = false" class="button-caret" type="text"> |
|
|
|
|
<el-icon> |
|
|
|
|
<ele-CaretTop/> |
|
|
|
|
<ele-CaretTop /> |
|
|
|
|
</el-icon> |
|
|
|
|
</el-button> |
|
|
|
|
</template> |
|
|
|
|
<div class="game-order-search mb15" v-show="item.pwdShow"> |
|
|
|
|
<el-form label-position="right" label-width="300px" style="max-width: 520px"> |
|
|
|
|
<el-form-item label="account:"> |
|
|
|
|
<el-input v-model="tableData.password.account" placeholder="" class="w-50 m-2" size="large" |
|
|
|
|
clearable/> |
|
|
|
|
<el-input v-model="tableData.password.account" placeholder="" class="w-50 m-2" size="large" clearable /> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="账号服务器"> |
|
|
|
|
<el-select v-model="serverSwitch" class="m-2" placeholder="选择服务器" size="large" style="width: 80px"> |
|
|
|
|
<el-option label="全部" :value="0"/> |
|
|
|
|
<el-option label="ios" :value="1"/> |
|
|
|
|
<el-option label="安卓" :value="2"/> |
|
|
|
|
<el-option label="其他" :value="3"/> |
|
|
|
|
<el-option v-for="item in serverCategorize" :key="item.value" :label="item.label" :value="item.value" /> |
|
|
|
|
</el-select> |
|
|
|
|
<el-select v-model="tableData.password.serverId" class="m-2" placeholder="选择服务器" filterable> |
|
|
|
|
<el-option v-for="item in switchServer()" :key="item.id" :label="item.name" :value="item.id+''"/> |
|
|
|
|
<el-option v-for="item in switchServer()" :key="item.id" :label="item.name" :value="item.id" /> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="密码:"> |
|
|
|
|
<el-input v-model="tableData.password.pwd" placeholder="" class="w-50 m-2" size="large" |
|
|
|
|
clearable/> |
|
|
|
|
<el-input v-model="tableData.password.pwd" placeholder="" class="w-50 m-2" size="large" clearable /> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item> |
|
|
|
|
<el-button size="large" type="primary" class="ml10" @click="resetPwd"> |
|
|
|
|
修改登录密码 |
|
|
|
|
</el-button> |
|
|
|
|
<el-button size="large" type="primary" class="ml10" @click="resetPwd"> 修改登录密码 </el-button> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-form> |
|
|
|
|
</div> |
|
|
|
@ -232,63 +226,63 @@
|
|
|
|
|
</div> |
|
|
|
|
</el-card>--> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script lang="ts"> |
|
|
|
|
import {toRefs, reactive, onMounted, defineComponent, warn,} from 'vue'; |
|
|
|
|
import { toRefs, reactive, onMounted, defineComponent, warn } from 'vue'; |
|
|
|
|
import { |
|
|
|
|
gameGMClearResource, |
|
|
|
|
gameGMCopyUnit, |
|
|
|
|
gameGMEditUnit, |
|
|
|
|
gameGMUpdateUnit, |
|
|
|
|
gameGMDelAccount, |
|
|
|
|
gameResetPwd, giftExchangeExists |
|
|
|
|
} from "/@/api/game"; |
|
|
|
|
import {AllServerList, serverList} from "/@/utils/game"; |
|
|
|
|
import {ElMessage, ElMessageBox} from "element-plus/es"; |
|
|
|
|
import {gSwitchServer} from "/@/utils/utils"; |
|
|
|
|
gameResetPwd, |
|
|
|
|
giftExchangeExists, |
|
|
|
|
} from '/@/api/game'; |
|
|
|
|
import { AllServerList, ServerCategorize, serverList } from '/@/utils/game'; |
|
|
|
|
import { ElMessage, ElMessageBox } from 'element-plus/es'; |
|
|
|
|
import { gSwitchServer } from '/@/utils/utils'; |
|
|
|
|
|
|
|
|
|
const baseURL: string | undefined | boolean = import.meta.env.VITE_API_URL |
|
|
|
|
const baseURL: string | undefined | boolean = import.meta.env.VITE_API_URL; |
|
|
|
|
|
|
|
|
|
interface TableData { |
|
|
|
|
filename: string |
|
|
|
|
storeFilename: string |
|
|
|
|
SrcName: number |
|
|
|
|
SrcServer: number |
|
|
|
|
DestName: string |
|
|
|
|
DestServer: number |
|
|
|
|
filename: string; |
|
|
|
|
storeFilename: string; |
|
|
|
|
SrcName: number; |
|
|
|
|
SrcServer: number; |
|
|
|
|
DestName: string; |
|
|
|
|
DestServer: number; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
interface DelData { |
|
|
|
|
SrcName: string |
|
|
|
|
serverId: number |
|
|
|
|
SrcName: string; |
|
|
|
|
serverId: number; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
interface TableDataState { |
|
|
|
|
item: { copyShow: boolean, delShow: boolean, pwdShow: boolean, resourceShow: boolean } |
|
|
|
|
item: { copyShow: boolean; delShow: boolean; pwdShow: boolean; resourceShow: boolean }; |
|
|
|
|
tableData: { |
|
|
|
|
data: TableData |
|
|
|
|
del: DelData |
|
|
|
|
data: TableData; |
|
|
|
|
del: DelData; |
|
|
|
|
password: { |
|
|
|
|
account: string |
|
|
|
|
serverId: number |
|
|
|
|
pwd: string |
|
|
|
|
account: string; |
|
|
|
|
serverId: number; |
|
|
|
|
pwd: string; |
|
|
|
|
}; |
|
|
|
|
resource: { |
|
|
|
|
account: string, |
|
|
|
|
serverId: number |
|
|
|
|
} |
|
|
|
|
account: string; |
|
|
|
|
serverId: number; |
|
|
|
|
}; |
|
|
|
|
fileNames: string[]; |
|
|
|
|
}; |
|
|
|
|
servers: object[]; |
|
|
|
|
disabled: boolean, |
|
|
|
|
loading: boolean, |
|
|
|
|
loading1: boolean, |
|
|
|
|
disabled: boolean; |
|
|
|
|
loading: boolean; |
|
|
|
|
loading1: boolean; |
|
|
|
|
fileList: object[]; |
|
|
|
|
filename: string; |
|
|
|
|
storeFilename: string; |
|
|
|
|
serverSwitch: number; |
|
|
|
|
serverCategorize: object; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
var timeInterval; |
|
|
|
@ -296,50 +290,50 @@ var timeInterval1;
|
|
|
|
|
export default defineComponent({ |
|
|
|
|
name: 'apiV1GameCopyUnit', |
|
|
|
|
setup() { |
|
|
|
|
// const {proxy} = getCurrentInstance() as any; |
|
|
|
|
|
|
|
|
|
const state = reactive<TableDataState>({ |
|
|
|
|
serverSwitch: 0, |
|
|
|
|
fileList: [], |
|
|
|
|
baseURL: baseURL, |
|
|
|
|
item: {copyShow: true, delShow: false, pwdShow: false, resourceShow: false}, |
|
|
|
|
item: { copyShow: true, delShow: false, pwdShow: false, resourceShow: false }, |
|
|
|
|
tableData: { |
|
|
|
|
data: { |
|
|
|
|
SrcName: "", SrcServer: "" |
|
|
|
|
SrcName: '', |
|
|
|
|
SrcServer: '', |
|
|
|
|
}, |
|
|
|
|
del: { |
|
|
|
|
SrcName: "", |
|
|
|
|
serverId: "", |
|
|
|
|
SrcName: '', |
|
|
|
|
serverId: '', |
|
|
|
|
}, |
|
|
|
|
password: { |
|
|
|
|
account: "", |
|
|
|
|
serverId: "", |
|
|
|
|
pwd: "", |
|
|
|
|
account: '', |
|
|
|
|
serverId: '', |
|
|
|
|
pwd: '', |
|
|
|
|
}, |
|
|
|
|
resource: { |
|
|
|
|
account: "", |
|
|
|
|
account: '', |
|
|
|
|
}, |
|
|
|
|
fileNames: [] |
|
|
|
|
fileNames: [], |
|
|
|
|
}, |
|
|
|
|
servers: AllServerList, |
|
|
|
|
disabled: true, |
|
|
|
|
loading: false, |
|
|
|
|
loading1: false, |
|
|
|
|
filename: "", |
|
|
|
|
storeFilename: "" |
|
|
|
|
filename: '', |
|
|
|
|
storeFilename: '', |
|
|
|
|
serverCategorize: ServerCategorize, |
|
|
|
|
}); |
|
|
|
|
const handleRemove = (file, fileList) => { |
|
|
|
|
console.log("handleRemove: ", file, fileList); |
|
|
|
|
console.log('handleRemove: ', file, fileList); |
|
|
|
|
}; |
|
|
|
|
const handlePreview = (file) => { |
|
|
|
|
console.log("handlePreview: ", file); |
|
|
|
|
console.log('handlePreview: ', file); |
|
|
|
|
}; |
|
|
|
|
const handleExceed = (files, fileList) => { |
|
|
|
|
console.log("handleExceed: ", files, fileList); |
|
|
|
|
console.log('handleExceed: ', files, fileList); |
|
|
|
|
warn(`当前限制选择 1 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`); |
|
|
|
|
}; |
|
|
|
|
const handleChange = (files, fileList) => { |
|
|
|
|
console.log("handleChange: ", files, fileList); |
|
|
|
|
console.log('handleChange: ', files, fileList); |
|
|
|
|
if (state.tableData.fileNames.indexOf(files.name) >= 0) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
@ -348,30 +342,30 @@ export default defineComponent({
|
|
|
|
|
state.tableData.fileNames.push(files.name); |
|
|
|
|
}; |
|
|
|
|
const beforeRemove = (file, fileList) => { |
|
|
|
|
console.log("beforeRemove: ", file, fileList); |
|
|
|
|
return confirm(`确定移除 ${file.name}? ${fileList.length}`,); |
|
|
|
|
console.log('beforeRemove: ', file, fileList); |
|
|
|
|
return confirm(`确定移除 ${file.name}? ${fileList.length}`); |
|
|
|
|
}; |
|
|
|
|
const copyUnit = () => { |
|
|
|
|
console.log("state.tableData.data: ", state.tableData.data); |
|
|
|
|
console.log('state.tableData.data: ', state.tableData.data); |
|
|
|
|
// ElMessage.success('暂停使用'); |
|
|
|
|
// return |
|
|
|
|
gameGMCopyUnit({ |
|
|
|
|
SrcName: state.tableData.data.SrcName, |
|
|
|
|
SrcServer: state.tableData.data.SrcServer |
|
|
|
|
SrcServer: state.tableData.data.SrcServer, |
|
|
|
|
}).then((res) => { |
|
|
|
|
ElMessage.success('修改成功'); |
|
|
|
|
console.log("copy: ", res); |
|
|
|
|
console.log('copy: ', res); |
|
|
|
|
state.tableData.data.filename = res.data.filename; |
|
|
|
|
state.tableData.data.storeFilename = res.data.storeFilename; |
|
|
|
|
state.tableData.fileNames.push(res.data.filename); |
|
|
|
|
state.tableData.fileNames.push(res.data.storeFilename); |
|
|
|
|
if (res.data.filename != "") { |
|
|
|
|
if (res.data.filename != '') { |
|
|
|
|
state.filename = res.data.filename; |
|
|
|
|
state.storeFilename = res.data.storeFilename; |
|
|
|
|
state.loading = true |
|
|
|
|
state.loading1 = true |
|
|
|
|
state.disabled = false |
|
|
|
|
console.log("gameRandomGenerateCode: ", res, state.filename, state.storeFilename); |
|
|
|
|
state.loading = true; |
|
|
|
|
state.loading1 = true; |
|
|
|
|
state.disabled = false; |
|
|
|
|
console.log('gameRandomGenerateCode: ', res, state.filename, state.storeFilename); |
|
|
|
|
timeInterval = setInterval(function () { |
|
|
|
|
checkGiftExchangeExists(); |
|
|
|
|
}, 1000); |
|
|
|
@ -379,74 +373,78 @@ export default defineComponent({
|
|
|
|
|
checkGiftExchangeExists1(); |
|
|
|
|
}, 1000); |
|
|
|
|
} |
|
|
|
|
}).finally(() => { |
|
|
|
|
}) |
|
|
|
|
.finally(() => {}); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
const updateUnit = () => { |
|
|
|
|
console.log("state.tableData.data: ", state.tableData.data); |
|
|
|
|
console.log('state.tableData.data: ', state.tableData.data); |
|
|
|
|
// ElMessage.success('暂停使用'); |
|
|
|
|
// return |
|
|
|
|
gameGMUpdateUnit({ |
|
|
|
|
filename: state.tableData.data.filename, |
|
|
|
|
storeFilename: state.tableData.data.storeFilename, |
|
|
|
|
DestName: state.tableData.data.DestName, |
|
|
|
|
}).then((res) => { |
|
|
|
|
}) |
|
|
|
|
.then((res) => { |
|
|
|
|
ElMessage.success('修改成功'); |
|
|
|
|
console.log("update: ", res); |
|
|
|
|
}).finally(() => { |
|
|
|
|
console.log('update: ', res); |
|
|
|
|
}) |
|
|
|
|
.finally(() => {}); |
|
|
|
|
}; |
|
|
|
|
const delAccount = () => { |
|
|
|
|
console.log("state.tableData.data: ", state.tableData.del); |
|
|
|
|
console.log('state.tableData.data: ', state.tableData.del); |
|
|
|
|
ElMessageBox.confirm(`此操作将删除账号:“${state.tableData.del.SrcName}”,是否继续?`, '提示', { |
|
|
|
|
confirmButtonText: '确认', |
|
|
|
|
cancelButtonText: '取消', |
|
|
|
|
type: 'warning', |
|
|
|
|
}).then(() => { |
|
|
|
|
gameGMDelAccount(state.tableData.del).then(() => { |
|
|
|
|
gameGMDelAccount(state.tableData.del) |
|
|
|
|
.then(() => { |
|
|
|
|
ElMessage.success('删除成功'); |
|
|
|
|
}).finally(() => { |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
.finally(() => {}); |
|
|
|
|
}); |
|
|
|
|
}; |
|
|
|
|
const resetPwd = () => { |
|
|
|
|
gameResetPwd(state.tableData.password).then(() => { |
|
|
|
|
gameResetPwd(state.tableData.password) |
|
|
|
|
.then(() => { |
|
|
|
|
ElMessage.success('修改密码成功!'); |
|
|
|
|
}).finally(() => { |
|
|
|
|
}) |
|
|
|
|
.finally(() => {}); |
|
|
|
|
}; |
|
|
|
|
const clearResource = () => { |
|
|
|
|
console.log("state.tableData.resource: ", state.tableData.resource); |
|
|
|
|
gameGMClearResource(state.tableData.resource).then(() => { |
|
|
|
|
console.log('state.tableData.resource: ', state.tableData.resource); |
|
|
|
|
gameGMClearResource(state.tableData.resource) |
|
|
|
|
.then(() => { |
|
|
|
|
ElMessage.success('删除成功'); |
|
|
|
|
}).finally(() => { |
|
|
|
|
}) |
|
|
|
|
.finally(() => {}); |
|
|
|
|
}; |
|
|
|
|
onMounted(() => { |
|
|
|
|
// initTableData(); |
|
|
|
|
serverList().then(res => { |
|
|
|
|
serverList().then((res) => { |
|
|
|
|
state.servers = res; |
|
|
|
|
// console.log(" server : ", state.servers); |
|
|
|
|
}) |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
const checkGiftExchangeExists = () => { |
|
|
|
|
giftExchangeExists({"file": state.filename}).then(response => { |
|
|
|
|
console.log("checkGiftExchangeExists", state.filename, response); |
|
|
|
|
giftExchangeExists({ file: state.filename }).then((response) => { |
|
|
|
|
console.log('checkGiftExchangeExists', state.filename, response); |
|
|
|
|
if (response.data.state == 1) { |
|
|
|
|
clearInterval(timeInterval); |
|
|
|
|
state.loading = false |
|
|
|
|
state.loading = false; |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}); |
|
|
|
|
}; |
|
|
|
|
const checkGiftExchangeExists1 = () => { |
|
|
|
|
giftExchangeExists({"file": state.storeFilename}).then(response => { |
|
|
|
|
console.log("checkGiftExchangeExists1", state.storeFilename, response); |
|
|
|
|
giftExchangeExists({ file: state.storeFilename }).then((response) => { |
|
|
|
|
console.log('checkGiftExchangeExists1', state.storeFilename, response); |
|
|
|
|
if (response.data.state == 1) { |
|
|
|
|
clearInterval(timeInterval1); |
|
|
|
|
state.loading1 = false |
|
|
|
|
state.loading1 = false; |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}); |
|
|
|
|
}; |
|
|
|
|
const onDownload = (file: string) => { |
|
|
|
|
if (file) { |
|
|
|
@ -454,11 +452,10 @@ export default defineComponent({
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// state.disabled = true; |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
// 打开修改字典弹窗 |
|
|
|
|
const switchServer = () => { |
|
|
|
|
return gSwitchServer(state.serverSwitch, state.servers) |
|
|
|
|
|
|
|
|
|
return gSwitchServer(state.serverSwitch, state.servers); |
|
|
|
|
}; |
|
|
|
|
return { |
|
|
|
|
switchServer, |
|
|
|
|