|
|
@ -72,40 +72,25 @@ const get = async function (val) { |
|
|
|
} |
|
|
|
console.log("搜索参数", getObj.value); |
|
|
|
// 发送POST请求 |
|
|
|
const result = await API.post("http://192.168.8.93:10010/detailY", { |
|
|
|
const result = await API.post("http://192.168.8.93:10010/detailY/select", { |
|
|
|
...getObj.value, |
|
|
|
detailY: { ...detailY.value }, |
|
|
|
}); |
|
|
|
const result2 = await API.post("http://192.168.8.93:10010/detailY", { |
|
|
|
...getAllObj.value, |
|
|
|
detailY: { ...detailY.value }, |
|
|
|
}); |
|
|
|
// const result2 = await API.post("http://192.168.8.93:10010/detailY/select", { |
|
|
|
// ...getAllObj.value, |
|
|
|
// detailY: { ...detailY.value }, |
|
|
|
// }); |
|
|
|
// 将响应结果存储到响应式数据中 |
|
|
|
console.log("请求成功", result); |
|
|
|
console.log("请求成功2", result2); |
|
|
|
// console.log("请求成功2", result2); |
|
|
|
// 存储表格数据 |
|
|
|
tableData.value = result.data.list; |
|
|
|
console.log("tableData", tableData.value); |
|
|
|
tableAllData.value = result2.data; |
|
|
|
console.log("tableAllData", tableAllData.value); |
|
|
|
// tableAllData.value = result2.data; |
|
|
|
// console.log("tableAllData", tableAllData.value); |
|
|
|
// 存储分页总数 |
|
|
|
total.value = result.data.total; |
|
|
|
console.log("total", total.value); |
|
|
|
// 计算各金币总数 |
|
|
|
rechargeCoin.value = tableAllData.value.sumR; |
|
|
|
freeCoin.value = tableAllData.value.sumF; |
|
|
|
taskCoin.value = tableAllData.value.sumT; |
|
|
|
// for (let i = 0; i < tableAllData.value.length; i++) { |
|
|
|
// rechargeCoin.value += tableAllData.value[i].rechargeCoin; |
|
|
|
// freeCoin.value += tableAllData.value[i].freeCoin; |
|
|
|
// taskCoin.value += tableAllData.value[i].taskCoin; |
|
|
|
// } |
|
|
|
console.log( |
|
|
|
"各金币总数", |
|
|
|
rechargeCoin.value, |
|
|
|
freeCoin.value, |
|
|
|
taskCoin.value |
|
|
|
); |
|
|
|
} catch (error) { |
|
|
|
console.log("请求失败", error); |
|
|
|
// 在这里可以处理错误逻辑,比如显示错误提示等 |
|
|
@ -117,13 +102,7 @@ const search = function () { |
|
|
|
get(); |
|
|
|
}; |
|
|
|
// 重置 |
|
|
|
const reset = function () { |
|
|
|
detailY.value.jwcode = ""; |
|
|
|
detailY.value.updateType = ""; |
|
|
|
detailY.value.startDate = ""; |
|
|
|
detailY.value.endDate = ""; |
|
|
|
getTime.value = {}; |
|
|
|
}; |
|
|
|
const reset = function () {}; |
|
|
|
|
|
|
|
// 验证跳转输入框的数字是否合法 |
|
|
|
const checkNumber = function () { |
|
|
@ -215,28 +194,40 @@ onMounted(async function () { |
|
|
|
<div> |
|
|
|
<el-table :data="tableData" :height="tableHeight" style="width: 100%"> |
|
|
|
<el-table-column prop="" label="序号" width="130" /> |
|
|
|
<el-table-column prop="uname" label="姓名" width="130" /> |
|
|
|
<el-table-column prop="name" label="姓名" width="130" /> |
|
|
|
<el-table-column prop="jwcode" label="精网号" width="170" /> |
|
|
|
<el-table-column prop="area" label="所属地区" width="170" /> |
|
|
|
<el-table-column prop="platform" label="平台信息" width="170" /> |
|
|
|
<el-table-column prop="platform" label="总金币" width="130" /> |
|
|
|
<el-table-column prop="freeCoin" label="免费金币" width="110"> |
|
|
|
<el-table-column prop="area" label="所属地区" width="200" /> |
|
|
|
<el-table-column prop="allJb" label="总金币" width="130"> |
|
|
|
<template #default="scope"> |
|
|
|
<span>{{ |
|
|
|
scope.row.free12 + |
|
|
|
scope.row.free6 + |
|
|
|
scope.row.coreJb + |
|
|
|
scope.row.buyJb |
|
|
|
}}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="freeJb" label="免费金币" width="110"> |
|
|
|
<template #default="scope"> |
|
|
|
<span>{{ Math.abs(scope.row.free6 + scope.row.free12) }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="buyJb" label="充值金币" width="110"> |
|
|
|
<template #default="scope"> |
|
|
|
<span>{{ Math.abs(scope.row.freeCoin) }}</span> |
|
|
|
<span>{{ Math.abs(scope.row.buyJb) }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="rechargeCoin" label="充值金币" width="110"> |
|
|
|
<el-table-column prop="coreJb" label="任务金币" width="160"> |
|
|
|
<template #default="scope"> |
|
|
|
<span>{{ Math.abs(scope.row.rechargeCoin) }}</span> |
|
|
|
<span>{{ Math.abs(scope.row.coreJb) }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="taskCoin" label="任务金币" width="110"> |
|
|
|
<el-table-column prop="rcoin" label="历史充值" width="150" /> |
|
|
|
<el-table-column prop="scoin" label="历史消费" width="150"> |
|
|
|
<template #default="scope"> |
|
|
|
<span>{{ Math.abs(scope.row.taskCoin) }}</span> |
|
|
|
<span>{{ Math.abs(scope.row.scoin) }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="jwcode" label="历史充值" width="150" /> |
|
|
|
<el-table-column prop="jwcode" label="历史消费" width="150" /> |
|
|
|
</el-table> |
|
|
|
</div> |
|
|
|
|
|
|
|