79 changed files with 54802 additions and 9247 deletions
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,45 +1,50 @@
|
||||
[ |
||||
{ |
||||
"Id": 1, |
||||
"StoneNum": 6, |
||||
"StoneNum": 12, |
||||
"StoneProbability": [ |
||||
[ |
||||
0, |
||||
20 |
||||
10 |
||||
], |
||||
[ |
||||
1, |
||||
50 |
||||
30 |
||||
], |
||||
[ |
||||
2, |
||||
20 |
||||
40 |
||||
], |
||||
[ |
||||
3, |
||||
10 |
||||
20 |
||||
] |
||||
], |
||||
"ZongziProbability": [ |
||||
[ |
||||
0, |
||||
30 |
||||
10 |
||||
], |
||||
[ |
||||
1, |
||||
40 |
||||
20 |
||||
], |
||||
[ |
||||
2, |
||||
40 |
||||
], |
||||
[ |
||||
3, |
||||
30 |
||||
] |
||||
], |
||||
"AccelerationValue": 50, |
||||
"AccelerationTime": 2, |
||||
"MapWidth": 8, |
||||
"MapLength": 120, |
||||
"BasicLabor": 150, |
||||
"BasicLabor": 100, |
||||
"LongZhouSpeed1": 3, |
||||
"LongZhouSpeed2": 2, |
||||
"LongZhouSpeed": 2 |
||||
"LongZhouSpeed": 1 |
||||
} |
||||
] |
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,110 +1,138 @@
|
||||
<template> |
||||
<div class="game-statistics-container"> |
||||
<el-card shadow="hover"> |
||||
<el-table :data="channels" style="width: 100%"> |
||||
<el-table-column prop="one" label="渠道名称"> |
||||
<template #default="scope"> |
||||
<span>{{ scope.row.label }}-{{scope.row.value}}</span> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column prop="seven" label="支付"> |
||||
<template #default="scope"> |
||||
<div v-if="!tableData.data.find(r=>r.channel == scope.row.value)"> |
||||
<el-button type="success" size="small" circle @click="add(scope.row.value)"> |
||||
<el-icon><ele-Check/></el-icon> |
||||
</el-button> |
||||
</div> |
||||
<div v-if="tableData.data.find(r=>r.channel == scope.row.value)"> |
||||
<el-button type="info" size="small" circle plain @click="del(scope.row.value)"> |
||||
<el-icon><ele-Close/></el-icon> |
||||
</el-button> |
||||
</div> |
||||
</template> |
||||
</el-table-column> |
||||
</el-table> |
||||
</el-card> |
||||
</div> |
||||
<div class="game-statistics-container"> |
||||
<el-card shadow="hover"> |
||||
<el-table :data="channels" style="width: 100%"> |
||||
<el-table-column prop="one" label="渠道名称"> |
||||
<template #default="scope"> |
||||
<span>{{ scope.row.label }}-{{ scope.row.value }}</span> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column prop="seven" label="支付"> |
||||
<template #header> |
||||
支付 |
||||
<el-button type="info" size="small" plain @click="add(-1)">全部关闭</el-button> |
||||
<el-button type="success" size="small" @click="del(-1)">全部打开</el-button> |
||||
</template> |
||||
<template #default="scope"> |
||||
<div v-if="!tableData.data.find((r) => r.channel == scope.row.value)"> |
||||
<el-button type="success" size="small" circle @click="add(scope.row.value)"> |
||||
<el-icon> |
||||
<ele-Check /> |
||||
</el-icon> |
||||
</el-button> |
||||
</div> |
||||
<div v-if="tableData.data.find((r) => r.channel == scope.row.value)"> |
||||
<el-button type="info" size="small" circle plain @click="del(scope.row.value)"> |
||||
<el-icon> |
||||
<ele-Close /> |
||||
</el-icon> |
||||
</el-button> |
||||
</div> |
||||
</template> |
||||
</el-table-column> |
||||
</el-table> |
||||
</el-card> |
||||
</div> |
||||
</template> |
||||
|
||||
<script lang="ts"> |
||||
import {toRefs, reactive, onMounted, defineComponent,} from 'vue'; |
||||
import { |
||||
gameRechargeControlAdd, |
||||
gameRechargeControlDelete, |
||||
gameRechargeControlList |
||||
} from "/@/api/game/index"; |
||||
import {channelList, ChannelList} from "/@/utils/game"; |
||||
import {ElMessageBox} from "element-plus/es"; |
||||
import { toRefs, reactive, onMounted, defineComponent } from 'vue'; |
||||
import { gameRechargeControlAdd, gameRechargeControlDelete, gameRechargeControlList } from '/@/api/game/index'; |
||||
import { channelList, ChannelList } from '/@/utils/game'; |
||||
|
||||
// import {ElMessageBox} from "element-plus/es"; |
||||
|
||||
interface TableData { |
||||
id: number; |
||||
channel: string; |
||||
id: number; |
||||
channel: string; |
||||
} |
||||
|
||||
interface TableDataState { |
||||
tableData: { |
||||
data: Array<TableData>; |
||||
}; |
||||
channels: object[]; |
||||
tableData: { |
||||
data: Array<TableData>; |
||||
}; |
||||
channels: object[]; |
||||
} |
||||
|
||||
export default defineComponent({ |
||||
name: 'apiV1SystemRoleList', |
||||
setup() { |
||||
const state = reactive<TableDataState>({ |
||||
tableData: { |
||||
data: [] |
||||
}, |
||||
channels: ChannelList, |
||||
}); |
||||
|
||||
const getRemain = () => { |
||||
gameRechargeControlList({}).then(res => { |
||||
console.log(res); |
||||
state.tableData.data = res.data.list || [] |
||||
}) |
||||
}; |
||||
const add = (value: any) => { |
||||
|
||||
ElMessageBox.confirm("是否确认添加充值拦截?", '提示', { |
||||
confirmButtonText: '确认', |
||||
cancelButtonText: '取消', |
||||
type: 'warning', |
||||
}).then(() => { |
||||
gameRechargeControlAdd({channel: value}).then(res => { |
||||
console.log(res) |
||||
getRemain(); |
||||
}).finally(() => { |
||||
}); |
||||
}); |
||||
}; |
||||
const del = (value: any) => { |
||||
ElMessageBox.confirm("是否确认去除充值拦截?", '提示', { |
||||
confirmButtonText: '确认', |
||||
cancelButtonText: '取消', |
||||
type: 'warning', |
||||
}).then(() => { |
||||
gameRechargeControlDelete({channel: value}).then(res => { |
||||
console.log(res) |
||||
getRemain(); |
||||
}).finally(() => { |
||||
}); |
||||
}); |
||||
}; |
||||
onMounted(function () { |
||||
name: 'apiV1SystemRoleList', |
||||
setup() { |
||||
const state = reactive<TableDataState>({ |
||||
tableData: { |
||||
data: [], |
||||
}, |
||||
channels: ChannelList, |
||||
}); |
||||
|
||||
channelList().then((res)=>{ |
||||
state.channels = res |
||||
}) |
||||
getRemain() |
||||
}); |
||||
const getRemain = () => { |
||||
gameRechargeControlList({}).then((res) => { |
||||
console.log(res); |
||||
state.tableData.data = res.data.list || []; |
||||
}); |
||||
}; |
||||
const add = (value: any) => { |
||||
// ElMessageBox.confirm("是否确认添加充值拦截?", '提示', { |
||||
// confirmButtonText: '确认', |
||||
// cancelButtonText: '取消', |
||||
// type: 'warning', |
||||
// }).then(() => { |
||||
if (value == -1) { |
||||
for (let i in state.channels) { |
||||
gameRechargeControlAdd({ channel: state.channels[i].value }) |
||||
.then((res) => { |
||||
console.log(res); |
||||
getRemain(); |
||||
}) |
||||
.finally(() => {}); |
||||
} |
||||
return; |
||||
} |
||||
gameRechargeControlAdd({ channel: value }) |
||||
.then((res) => { |
||||
console.log(res); |
||||
getRemain(); |
||||
}) |
||||
.finally(() => {}); |
||||
// }); |
||||
}; |
||||
const del = (value: any) => { |
||||
// ElMessageBox.confirm("是否确认去除充值拦截?", '提示', { |
||||
// confirmButtonText: '确认', |
||||
// cancelButtonText: '取消', |
||||
// type: 'warning', |
||||
// }).then(() => { |
||||
if (value == -1) { |
||||
for (let i in state.channels) { |
||||
gameRechargeControlDelete({ channel: state.channels[i].value }) |
||||
.then((res) => { |
||||
console.log(res); |
||||
getRemain(); |
||||
}) |
||||
.finally(() => {}); |
||||
} |
||||
return; |
||||
} |
||||
gameRechargeControlDelete({ channel: value }) |
||||
.then((res) => { |
||||
console.log(res); |
||||
getRemain(); |
||||
}) |
||||
.finally(() => {}); |
||||
// }); |
||||
}; |
||||
onMounted(function () { |
||||
channelList().then((res) => { |
||||
state.channels = res; |
||||
}); |
||||
getRemain(); |
||||
}); |
||||
|
||||
return { |
||||
getRemain, |
||||
add, |
||||
del, |
||||
...toRefs(state), |
||||
}; |
||||
}, |
||||
return { |
||||
getRemain, |
||||
add, |
||||
del, |
||||
...toRefs(state), |
||||
}; |
||||
}, |
||||
}); |
||||
</script> |
||||
|
Loading…
Reference in new issue