幸运礼物-平台汇总-数组类型
This commit is contained in:
@@ -16,12 +16,24 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- 送出时间 -->
|
<!-- 送出时间 -->
|
||||||
<div class="inquire">
|
<div class="inquire">
|
||||||
<span>送出时间</span>
|
<span>时间</span>
|
||||||
<el-date-picker v-model="inquire.time"
|
<el-date-picker v-model="inquire.time"
|
||||||
type="date"
|
type="date"
|
||||||
placeholder="请选择">
|
placeholder="请选择">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- 送出时间 -->
|
||||||
|
<div class="inquire">
|
||||||
|
<span>数组类型</span>
|
||||||
|
<el-select v-model="inquire.poolType"
|
||||||
|
placeholder="请选择">
|
||||||
|
<el-option v-for="item in poolTypes"
|
||||||
|
:key="item.type"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.type">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-button type="text">总进入:{{ totalInput }}</el-button>
|
<el-button type="text">总进入:{{ totalInput }}</el-button>
|
||||||
<el-button type="text">总退出:{{ totalOutput }}</el-button>
|
<el-button type="text">总退出:{{ totalOutput }}</el-button>
|
||||||
@@ -227,14 +239,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { personal, updateUserMulti, pageRecord, exportRecord } from "@/api/luckGift/luckGift";
|
import { personal, updateUserMulti, pageRecord, exportRecord, listType } from "@/api/luckGift/luckGift";
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import { dateFormat } from "@/utils/system-helper";
|
import { dateFormat } from "@/utils/system-helper";
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
import moment from "moment-timezone";
|
|
||||||
import PartitionSelect from "@/views/common/partitionSelect.vue";
|
import PartitionSelect from "@/views/common/partitionSelect.vue";
|
||||||
import { genQueryParam } from "@/utils/maintainer";
|
|
||||||
export default {
|
export default {
|
||||||
name: "luckGiftData",
|
name: "luckGiftData",
|
||||||
components: {
|
components: {
|
||||||
@@ -251,7 +261,9 @@ export default {
|
|||||||
userId: "",
|
userId: "",
|
||||||
time: "",
|
time: "",
|
||||||
value: undefined,
|
value: undefined,
|
||||||
|
poolType: undefined,
|
||||||
},
|
},
|
||||||
|
poolTypes: [],
|
||||||
// 表格
|
// 表格
|
||||||
tableData: [],
|
tableData: [],
|
||||||
// 分页
|
// 分页
|
||||||
@@ -271,6 +283,7 @@ export default {
|
|||||||
pageRecord: {
|
pageRecord: {
|
||||||
uid: undefined,
|
uid: undefined,
|
||||||
date: undefined,
|
date: undefined,
|
||||||
|
poolType: undefined,
|
||||||
loading: false,
|
loading: false,
|
||||||
data: [],
|
data: [],
|
||||||
total: 0,
|
total: 0,
|
||||||
@@ -282,6 +295,20 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
loadPoolTypes () {
|
||||||
|
listType({ needAll: true }).then((res) => {
|
||||||
|
if (res.code != 200) {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: res.message,
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.poolTypes = res.data;
|
||||||
|
this.inquire.poolType = this.poolTypes[0].type
|
||||||
|
})
|
||||||
|
},
|
||||||
// 查询接口
|
// 查询接口
|
||||||
getData () {
|
getData () {
|
||||||
if (!this.inquire.time && this.inquire.userId === '') {
|
if (!this.inquire.time && this.inquire.userId === '') {
|
||||||
@@ -301,6 +328,7 @@ export default {
|
|||||||
? dateFormat(this.inquire.time, "yyyy-MM-dd")
|
? dateFormat(this.inquire.time, "yyyy-MM-dd")
|
||||||
: null,
|
: null,
|
||||||
partitionId: this.inquire.value,
|
partitionId: this.inquire.value,
|
||||||
|
poolType: this.inquire.poolType ? this.inquire.poolType : undefined,
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
this.total = res.data.dataPage.total;
|
this.total = res.data.dataPage.total;
|
||||||
this.tableData = res.data.dataPage.rows;
|
this.tableData = res.data.dataPage.rows;
|
||||||
@@ -347,6 +375,7 @@ export default {
|
|||||||
this.recordDialog.title = '[' + row.erbanNo + ']' + row.date + '明细';
|
this.recordDialog.title = '[' + row.erbanNo + ']' + row.date + '明细';
|
||||||
this.pageRecord.uid = row.uid;
|
this.pageRecord.uid = row.uid;
|
||||||
this.pageRecord.date = row.date;
|
this.pageRecord.date = row.date;
|
||||||
|
this.pageRecord.poolType = row.poolType ? row.poolType : undefined;
|
||||||
this.pageRecordData();
|
this.pageRecordData();
|
||||||
},
|
},
|
||||||
closeRecordDialog () {
|
closeRecordDialog () {
|
||||||
@@ -354,6 +383,7 @@ export default {
|
|||||||
this.recordDialog.title = undefined;
|
this.recordDialog.title = undefined;
|
||||||
this.pageRecord.uid = undefined;
|
this.pageRecord.uid = undefined;
|
||||||
this.pageRecord.date = undefined;
|
this.pageRecord.date = undefined;
|
||||||
|
this.pageRecord.poolType = undefined;
|
||||||
},
|
},
|
||||||
// 分页导航
|
// 分页导航
|
||||||
handleRecordPageChange () {
|
handleRecordPageChange () {
|
||||||
@@ -372,6 +402,7 @@ export default {
|
|||||||
pageRecord({
|
pageRecord({
|
||||||
uid: this.pageRecord.uid,
|
uid: this.pageRecord.uid,
|
||||||
date: this.pageRecord.date,
|
date: this.pageRecord.date,
|
||||||
|
poolType: this.pageRecord.poolType,
|
||||||
pageNo: this.pageRecord.pageNo,
|
pageNo: this.pageRecord.pageNo,
|
||||||
pageSize: this.pageRecord.pageSize,
|
pageSize: this.pageRecord.pageSize,
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
@@ -396,6 +427,9 @@ export default {
|
|||||||
this.exportLoading = false;
|
this.exportLoading = false;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
mounted () {
|
||||||
|
this.loadPoolTypes()
|
||||||
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
|
@@ -5,59 +5,74 @@
|
|||||||
<div class="inquire">
|
<div class="inquire">
|
||||||
<span>分区</span>
|
<span>分区</span>
|
||||||
<partition-select v-model:partition-id="inquire.value"
|
<partition-select v-model:partition-id="inquire.value"
|
||||||
v-model:partition-infos="inquire.options"
|
v-model:partition-infos="inquire.options" />
|
||||||
/>
|
</div>
|
||||||
|
<div class="inquire">
|
||||||
|
<span>数组类型</span>
|
||||||
|
<el-select v-model="inquire.poolType"
|
||||||
|
placeholder="请选择">
|
||||||
|
<el-option v-for="item in poolTypes"
|
||||||
|
:key="item.type"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.type">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
<!-- 时间 -->
|
|
||||||
<!-- <div class="inquire">
|
|
||||||
<span>时间</span>
|
|
||||||
<el-date-picker v-model="inquire.time" type="date" placeholder="请选择">
|
|
||||||
</el-date-picker>
|
|
||||||
</div> -->
|
|
||||||
</div>
|
</div>
|
||||||
<!-- 按钮 -->
|
<!-- 按钮 -->
|
||||||
<div class="but">
|
<div class="but">
|
||||||
<el-button class="primary" type="primary" @click="getData()"
|
<el-button class="primary"
|
||||||
>查询
|
type="primary"
|
||||||
|
@click="getData()">查询
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
<el-button type="text">数组出金币总额:{{ totalInput }}</el-button>
|
<el-button type="text">数组出金币总额:{{ totalInput }}</el-button>
|
||||||
<el-button type="text">数组出返币总额:{{ totalOutput }}</el-button>
|
<el-button type="text">数组出返币总额:{{ totalOutput }}</el-button>
|
||||||
<el-button type="text">投产比:{{ totalProductionRatio }}</el-button>
|
<el-button type="text">投产比:{{ totalProductionRatio }}</el-button>
|
||||||
<!-- 表格 -->
|
<!-- 表格 -->
|
||||||
<el-table
|
<el-table v-loading="loading"
|
||||||
v-loading="loading"
|
:data="tableData"
|
||||||
:data="tableData"
|
border
|
||||||
border
|
style="width: 100%; margin-top: 25px">
|
||||||
style="width: 100%; margin-top: 25px"
|
<el-table-column prop="date"
|
||||||
>
|
align="center"
|
||||||
<el-table-column prop="date" align="center" label="日期" />
|
label="日期" />
|
||||||
<el-table-column prop="totalInput" align="center" label="进入" />
|
<el-table-column prop="totalInput"
|
||||||
<el-table-column prop="totalOutput" align="center" label="退出" />
|
align="center"
|
||||||
<el-table-column
|
label="进入" />
|
||||||
prop="productionRatio"
|
<el-table-column prop="totalOutput"
|
||||||
align="center"
|
align="center"
|
||||||
label="退出/进入比例"
|
label="退出" />
|
||||||
/>
|
<el-table-column prop="productionRatio"
|
||||||
<el-table-column prop="num" align="center" label="参与次数" />
|
align="center"
|
||||||
<el-table-column prop="count" align="center" label="参与人数" />
|
label="退出/进入比例" />
|
||||||
<el-table-column prop="winCount" align="center" label="得到人数" />
|
<el-table-column prop="num"
|
||||||
<el-table-column prop="winNum" align="center" label="得到次数" />
|
align="center"
|
||||||
<el-table-column prop="winRate" align="center" label="得到率" />
|
label="参与次数" />
|
||||||
|
<el-table-column prop="count"
|
||||||
|
align="center"
|
||||||
|
label="参与人数" />
|
||||||
|
<el-table-column prop="winCount"
|
||||||
|
align="center"
|
||||||
|
label="得到人数" />
|
||||||
|
<el-table-column prop="winNum"
|
||||||
|
align="center"
|
||||||
|
label="得到次数" />
|
||||||
|
<el-table-column prop="winRate"
|
||||||
|
align="center"
|
||||||
|
label="得到率" />
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { platform } from "@/api/luckGift/luckGift";
|
import { platform, listType } from "@/api/luckGift/luckGift";
|
||||||
// @ts-ignore
|
|
||||||
import { dateFormat } from "@/utils/system-helper";
|
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
import PartitionSelect from "@/views/common/partitionSelect.vue";
|
import PartitionSelect from "@/views/common/partitionSelect.vue";
|
||||||
export default {
|
export default {
|
||||||
name: "luckGiftDataAll",
|
name: "luckGiftDataAll",
|
||||||
components: {PartitionSelect},
|
components: { PartitionSelect },
|
||||||
data() {
|
data () {
|
||||||
return {
|
return {
|
||||||
loading: false,
|
loading: false,
|
||||||
totalInput: "0",
|
totalInput: "0",
|
||||||
@@ -68,7 +83,9 @@ export default {
|
|||||||
value: undefined,
|
value: undefined,
|
||||||
options: [],
|
options: [],
|
||||||
time: "",
|
time: "",
|
||||||
|
poolType: undefined,
|
||||||
},
|
},
|
||||||
|
poolTypes: [],
|
||||||
// 表格
|
// 表格
|
||||||
tableData: [],
|
tableData: [],
|
||||||
// 分页
|
// 分页
|
||||||
@@ -78,11 +95,26 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
loadPoolTypes () {
|
||||||
|
listType({ needAll: true }).then((res) => {
|
||||||
|
if (res.code != 200) {
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: res.message,
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.poolTypes = res.data;
|
||||||
|
this.inquire.poolType = this.poolTypes[0].type
|
||||||
|
})
|
||||||
|
},
|
||||||
// 查询接口
|
// 查询接口
|
||||||
getData() {
|
getData () {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
platform({
|
platform({
|
||||||
partitionId: this.inquire.value,
|
partitionId: this.inquire.value,
|
||||||
|
poolType: this.inquire.poolType ? this.inquire.poolType : undefined,
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
this.totalInput = res.data.totalInput;
|
this.totalInput = res.data.totalInput;
|
||||||
this.totalOutput = res.data.totalOutput;
|
this.totalOutput = res.data.totalOutput;
|
||||||
@@ -92,13 +124,16 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 分页导航
|
// 分页导航
|
||||||
handleSizeChange() {
|
handleSizeChange () {
|
||||||
this.getData();
|
this.getData();
|
||||||
},
|
},
|
||||||
handleCurrentChange() {
|
handleCurrentChange () {
|
||||||
this.getData();
|
this.getData();
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
mounted () {
|
||||||
|
this.loadPoolTypes()
|
||||||
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
|
Reference in New Issue
Block a user