|
|
@ -20,8 +20,8 @@ const taskCoin = ref(0); |
|
|
|
const total = ref(100); |
|
|
|
// 搜索对象时间 |
|
|
|
const getTime = ref([]); |
|
|
|
// 搜索detail |
|
|
|
const detail = ref({}); |
|
|
|
// 搜索detailY |
|
|
|
const detailY = ref({}); |
|
|
|
// 不分页的搜索对象 |
|
|
|
const getAllObj = ref({}); |
|
|
|
// 搜索对象 |
|
|
@ -33,15 +33,15 @@ const getObj = ref({ |
|
|
|
// 支付方式选项 |
|
|
|
const updateType = [ |
|
|
|
{ |
|
|
|
value: "充值", |
|
|
|
value: "0", |
|
|
|
label: "充值", |
|
|
|
}, |
|
|
|
{ |
|
|
|
value: "消费", |
|
|
|
value: "1", |
|
|
|
label: "消费", |
|
|
|
}, |
|
|
|
{ |
|
|
|
value: "退款", |
|
|
|
value: "2", |
|
|
|
label: "退款", |
|
|
|
}, |
|
|
|
]; |
|
|
@ -63,22 +63,22 @@ const get = async function (val) { |
|
|
|
// 搜索参数时间赋值 |
|
|
|
if (getTime.value != null) { |
|
|
|
if (getTime.value.startDate != "" && getTime.value.endDate != "") { |
|
|
|
detail.value.startDate = getTime.value[0]; |
|
|
|
detail.value.endDate = getTime.value[1]; |
|
|
|
detailY.value.startDate = getTime.value[0]; |
|
|
|
detailY.value.endDate = getTime.value[1]; |
|
|
|
} |
|
|
|
} else { |
|
|
|
detail.value.startDate = ""; |
|
|
|
detail.value.endDate = ""; |
|
|
|
detailY.value.startDate = ""; |
|
|
|
detailY.value.endDate = ""; |
|
|
|
} |
|
|
|
console.log("搜索参数", getObj.value); |
|
|
|
// 发送POST请求 |
|
|
|
const result = await API.post("http://192.168.8.93:10010/detail", { |
|
|
|
const result = await API.post("http://192.168.8.93:10010/detailY", { |
|
|
|
...getObj.value, |
|
|
|
detail: { ...detail.value }, |
|
|
|
detailY: { ...detailY.value }, |
|
|
|
}); |
|
|
|
const result2 = await API.post("http://192.168.8.93:10010/detail", { |
|
|
|
const result2 = await API.post("http://192.168.8.93:10010/detailY", { |
|
|
|
...getAllObj.value, |
|
|
|
detail: { ...detail.value }, |
|
|
|
detailY: { ...detailY.value }, |
|
|
|
}); |
|
|
|
// 将响应结果存储到响应式数据中 |
|
|
|
console.log("请求成功", result); |
|
|
@ -92,14 +92,14 @@ const get = async function (val) { |
|
|
|
total.value = result.data.total; |
|
|
|
console.log("total", total.value); |
|
|
|
// 计算各金币总数 |
|
|
|
rechargeCoin.value = 0; |
|
|
|
freeCoin.value = 0; |
|
|
|
taskCoin.value = 0; |
|
|
|
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; |
|
|
|
} |
|
|
|
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, |
|
|
@ -118,10 +118,10 @@ const search = function () { |
|
|
|
}; |
|
|
|
// 重置 |
|
|
|
const reset = function () { |
|
|
|
detail.value.jwcode = ""; |
|
|
|
detail.value.updateType = ""; |
|
|
|
detail.value.startDate = ""; |
|
|
|
detail.value.endDate = ""; |
|
|
|
detailY.value.jwcode = ""; |
|
|
|
detailY.value.updateType = ""; |
|
|
|
detailY.value.startDate = ""; |
|
|
|
detailY.value.endDate = ""; |
|
|
|
getTime.value = {}; |
|
|
|
}; |
|
|
|
// 今天 |
|
|
@ -219,39 +219,18 @@ onMounted(async function () { |
|
|
|
<div class="head-card"> |
|
|
|
<div class="head-card-element"> |
|
|
|
<el-text class="mx-1" size="large">精网号:</el-text> |
|
|
|
<el-input |
|
|
|
v-model="detail.jwcode" |
|
|
|
style="width: 240px" |
|
|
|
placeholder="请输入精网号" |
|
|
|
clearable |
|
|
|
/> |
|
|
|
<el-input v-model="detailY.jwcode" style="width: 240px" placeholder="请输入精网号" clearable /> |
|
|
|
</div> |
|
|
|
<div class="head-card-element"> |
|
|
|
<el-text class="mx-1" size="large">更新类型:</el-text> |
|
|
|
<el-select |
|
|
|
v-model="detail.updateType" |
|
|
|
placeholder="请选择更新类型" |
|
|
|
size="large" |
|
|
|
style="width: 240px" |
|
|
|
clearable |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="item in updateType" |
|
|
|
:key="item.value" |
|
|
|
:label="item.label" |
|
|
|
:value="item.value" |
|
|
|
/> |
|
|
|
<el-select v-model="detailY.updateType" placeholder="请选择更新类型" size="large" style="width: 240px" clearable> |
|
|
|
<el-option v-for="item in updateType" :key="item.value" :label="item.label" :value="item.value" /> |
|
|
|
</el-select> |
|
|
|
</div> |
|
|
|
<div class="head-card-element"> |
|
|
|
<el-text class="mx-1" size="large">更新时间:</el-text> |
|
|
|
<el-date-picker |
|
|
|
v-model="getTime" |
|
|
|
type="daterange" |
|
|
|
range-separator="至" |
|
|
|
start-placeholder="起始时间" |
|
|
|
end-placeholder="结束时间" |
|
|
|
/> |
|
|
|
<el-date-picker v-model="getTime" type="datetimerange" range-separator="至" start-placeholder="起始时间" |
|
|
|
end-placeholder="结束时间" /> |
|
|
|
</div> |
|
|
|
<div class="head-card-btn"> |
|
|
|
<el-button @click="reset()">重置</el-button> |
|
|
@ -265,9 +244,9 @@ onMounted(async function () { |
|
|
|
<el-col> |
|
|
|
<el-card> |
|
|
|
<div> |
|
|
|
现有金币:免费金币:{{ freeCoin }},充值金币:{{ |
|
|
|
rechargeCoin |
|
|
|
}},任务金币:{{ taskCoin }} |
|
|
|
现有金币:免费金币:{{ Math.abs(freeCoin) }},充值金币:{{ |
|
|
|
Math.abs(rechargeCoin) |
|
|
|
}},任务金币:{{ Math.abs(taskCoin) }} |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<el-table :data="tableData" :height="tableHeight" style="width: 100%"> |
|
|
@ -277,9 +256,9 @@ onMounted(async function () { |
|
|
|
<el-table-column prop="gold" label="更新数量" width="160"> |
|
|
|
<template #default="scope"> |
|
|
|
<span>{{ |
|
|
|
scope.row.rechargeCoin + |
|
|
|
scope.row.freeCoin + |
|
|
|
scope.row.taskCoin |
|
|
|
Math.abs(scope.row.rechargeCoin + |
|
|
|
scope.row.freeCoin + |
|
|
|
scope.row.taskCoin) |
|
|
|
}}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
@ -297,16 +276,29 @@ onMounted(async function () { |
|
|
|
</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="freeCoin" label="免费金币" width="130" /> |
|
|
|
<el-table-column prop="rechargeCoin" label="充值金币" width="150" /> |
|
|
|
<el-table-column prop="taskCoin" label="任务金币" width="130" /> |
|
|
|
<el-table-column prop="freeCoin" label="免费金币" width="130"> |
|
|
|
<template #default="scope"> |
|
|
|
<span>{{ |
|
|
|
Math.abs(scope.row.freeCoin) |
|
|
|
}}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="rechargeCoin" label="充值金币" width="150"> |
|
|
|
<template #default="scope"> |
|
|
|
<span>{{ |
|
|
|
Math.abs(scope.row.rechargeCoin) |
|
|
|
}}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="taskCoin" label="任务金币" width="130"> |
|
|
|
<template #default="scope"> |
|
|
|
<span>{{ |
|
|
|
Math.abs(scope.row.taskCoin) |
|
|
|
}}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="name" label="提交人" width="150" /> |
|
|
|
<el-table-column |
|
|
|
prop="createTime" |
|
|
|
label="更新时间" |
|
|
|
width="210" |
|
|
|
show-overflow-tooltip |
|
|
|
> |
|
|
|
<el-table-column prop="createTime" label="更新时间" width="210" show-overflow-tooltip> |
|
|
|
<template #default="scope"> |
|
|
|
<span>{{ |
|
|
|
moment(scope.row.createTime).format("YYYY-MM-DD HH:mm:ss") |
|
|
@ -319,42 +311,17 @@ onMounted(async function () { |
|
|
|
<!-- 分页 --> |
|
|
|
<!-- 分页 --> |
|
|
|
<div class="pagination" style="margin-top: 20px"> |
|
|
|
<el-pagination |
|
|
|
background |
|
|
|
:page-size="getObj.pageSize" |
|
|
|
layout="slot" |
|
|
|
:total="total" |
|
|
|
> |
|
|
|
<el-pagination background :page-size="getObj.pageSize" layout="slot" :total="total"> |
|
|
|
<div>共{{ total }}条,每页</div> |
|
|
|
<el-select |
|
|
|
v-model="getObj.pageSize" |
|
|
|
class="page-size" |
|
|
|
@change="get()" |
|
|
|
style="width: 80px" |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="item in [5, 10, 20, 50, 100]" |
|
|
|
:key="item" |
|
|
|
:label="item" |
|
|
|
:value="item" |
|
|
|
></el-option> |
|
|
|
<el-select v-model="getObj.pageSize" class="page-size" @change="get()" style="width: 80px"> |
|
|
|
<el-option v-for="item in [5, 10, 20, 50, 100]" :key="item" :label="item" :value="item"></el-option> |
|
|
|
</el-select> |
|
|
|
<div>条</div> |
|
|
|
</el-pagination> |
|
|
|
<el-pagination |
|
|
|
background |
|
|
|
layout="prev, pager, next,slot" |
|
|
|
:page-size="getObj.pageSize" |
|
|
|
:total="total" |
|
|
|
:current-page="getObj.pageNum" |
|
|
|
@current-change="get" |
|
|
|
> |
|
|
|
<el-pagination background layout="prev, pager, next,slot" :page-size="getObj.pageSize" :total="total" |
|
|
|
:current-page="getObj.pageNum" @current-change="get"> |
|
|
|
<div>跳至</div> |
|
|
|
<el-input |
|
|
|
v-model="getObj.pageNum" |
|
|
|
style="width: 40px" |
|
|
|
@change="checkNumber" |
|
|
|
/> |
|
|
|
<el-input v-model="getObj.pageNum" style="width: 40px" @change="checkNumber" /> |
|
|
|
<div>页</div> |
|
|
|
</el-pagination> |
|
|
|
</div> |
|
|
|