分区-公共组件select-替换遗留老组件

This commit is contained in:
2025-04-04 17:47:47 +08:00
parent 28a1006402
commit 6ca23f1254
5 changed files with 16 additions and 80 deletions

View File

@@ -63,19 +63,7 @@
<!-- 分区 -->
<div class="inquire">
<span>分区</span>
<el-select
v-model="inquire.value"
placeholder="请选择"
@change="handleChange"
>
<el-option
v-for="item in inquire.options"
:key="item.id"
:label="item.desc"
:value="item.id"
>
</el-option>
</el-select>
<partition-select v-model:partition-id="inquire.value" v-model:partition-infos="inquire.options" v-model:after-init="getData" />
</div>
<div class="inquire">
@@ -342,15 +330,12 @@
</template>
<script>
import { getConfig, updateSet, updateUserMulti } from "@/api/bravoGift/bravoGift";
import { listAll} from "@/api/partition/partitionInfo";
// @ts-ignore
import { dateFormat } from "@/utils/system-helper";
// @ts-ignore
import { ElMessage } from "element-plus";
import moment from "moment-timezone";
import PartitionSelect from "../common/partitionSelect.vue";
export default {
name: "bravoGiftSet",
components: {PartitionSelect},
data() {
return {
loading: false,
@@ -397,12 +382,6 @@ import { listAll} from "@/api/partition/partitionInfo";
whiteErbanNoProductionRatioMap: null,
};
},
created() {
this.getData();
listAll().then((res) => {
this.inquire.options = res.data;
});
},
methods: {
// 查询接口
getData() {

View File

@@ -3,10 +3,7 @@
<!-- 查询 -->
<div class="inquire">
<span>分区</span>
<el-select v-model="formData.partitionId" placeholder="请选择">
<el-option v-for="item in partitionOptions" :key="item.id" :label="item.desc" :value="item.id">
</el-option>
</el-select>
<partition-select v-model:partition-id="formData.partitionId" v-model:partition-infos="partitionOptions" />
</div>
<div class="inquire">
<span>第三方名称</span>
@@ -119,7 +116,6 @@
<script>
import { ref, onMounted } from 'vue'
import { getPartitionInfoList } from "@/api/partition/partitionInfo";
import { dateFormat } from "@/utils/system-helper";
import { formatDate } from "@/utils/relDate";
import {
@@ -132,9 +128,11 @@ import {
exportGameDetailExportForMiniGame
} from "@/api/gameSummary/gameSummary";
import { ElMessage } from "element-plus";
import PartitionSelect from "../common/partitionSelect.vue";
export default {
name: "GameSummary",
components: {PartitionSelect},
setup() {
const partitionOptions = ref([]);
const nameOptions = ref([{ name: '灵', channel: 'LEADERCC' }, { name: '百顺', channel: 'BAISHUN' }]);
@@ -334,9 +332,6 @@ export default {
detailPageFun();
};
onMounted(() => {
getPartitionInfoList().then(res => {
partitionOptions.value = res.data;
});
getGameOptions()
});
return {

View File

@@ -10,10 +10,7 @@
</div>
<div class="inquire">
<span>分区</span>
<el-select v-model="formData.partitionId" placeholder="请选择">
<el-option v-for="item in partitionOptions" :key="item.id" :label="item.desc" :value="item.id">
</el-option>
</el-select>
<partition-select v-model:partition-id="formData.partitionId" v-model:partition-infos="partitionOptions" />
</div>
<div class="inquire">
<span>第三方名称</span>
@@ -70,7 +67,6 @@
<script>
import { ref, onMounted } from 'vue'
import { getPartitionInfoList } from "@/api/partition/partitionInfo";
import { dateFormat } from "@/utils/system-helper";
import { formatDate } from "@/utils/relDate";
import {
@@ -79,8 +75,10 @@ import {
exportUserForMiniGame
} from "@/api/gameSummary/gameSummary";
import { ElMessage } from "element-plus";
import PartitionSelect from "../common/partitionSelect.vue";
export default {
name: "gameUserSummary",
components: {PartitionSelect},
setup () {
const partitionOptions = ref([]);
const nameOptions = ref([{ name: '灵', channel: 'LEADERCC' }, { name: '百顺', channel: 'BAISHUN' }]);
@@ -200,9 +198,6 @@ export default {
console.log()
}
onMounted(() => {
getPartitionInfoList().then(res => {
partitionOptions.value = res.data;
});
getGameOptions()
});
return {

View File

@@ -5,19 +5,7 @@
<!-- 分区 -->
<div class="inquire">
<span>分区</span>
<el-select
v-model="inquire.partitionId"
placeholder="请选择"
@change="handleChange"
>
<el-option
v-for="item in partitionOptions"
:key="item.id"
:label="item.desc"
:value="item.id"
>
</el-option>
</el-select>
<partition-select v-model:partition-id="inquire.partitionId" v-model:partition-infos="partitionOptions" v-model:after-init="getData" />
</div>
</div>
<!-- 按钮 -->
@@ -83,12 +71,12 @@
</div>
</template>
<script>
import { getPartitionInfoList } from "@/api/partition/partitionInfo";
import { pageRecord, exportRecord, listUserRecord } from "@/api/miniGame/miniGameWeekJackpot";
import { ElMessage, ElMessageBox } from 'element-plus'
import PartitionSelect from "../common/partitionSelect.vue";
export default {
name: "MiniGameWeekJackpotView",
components: {PartitionSelect},
data() {
return {
loading: false,
@@ -111,17 +99,6 @@ export default {
obj : {},
};
},
created() {
getPartitionInfoList().then((res) => {
if (res.code !== 200) {
throw new Error(res.msg);
}
this.partitionOptions = res.data;
this.inquire.partitionId = res.data[0].id;
}).then(() =>{
this.getData();
});
},
methods: {
// 查询接口
getData() {

View File

@@ -4,18 +4,7 @@
<div class="inquire">
<div class="block">
<span class="demonstration">分区</span>
<el-select
v-model="inquire.partitionId"
style="width: 75%"
placeholder="请选择"
>
<el-option
v-for="item in inquire.partitionArr"
:key="item.id"
:label="item.desc"
:value="item.id"
></el-option>
</el-select>
<partition-select v-model:partition-id="inquire.partitionId" v-model:partition-infos="inquire.partitionArr" />
</div>
</div>
<!-- 平台ID -->
@@ -132,7 +121,6 @@
</template>
<script>
import {
listPartitionInfo,
goldcoinRecordAll,
recordAllExport,
} from "@/api/refund/refund";
@@ -140,8 +128,10 @@ import {
import { dateFormat } from "@/utils/system-helper";
// @ts-ignore
import { ElMessage } from "element-plus";
import PartitionSelect from "../common/partitionSelect.vue";
export default {
name: "goldDiamondOperationRecord",
components: {PartitionSelect},
data() {
return {
loading: false,
@@ -150,7 +140,7 @@ export default {
mapObj: {},
//查询所需条件对象
inquire: {
partitionId: 0,
partitionId:undefined,
partitionArr: [],
userId: "",
platform: "",