运营流水分析 - 负责人联动分区

This commit is contained in:
2025-07-29 11:26:13 +08:00
parent 1c080c85c7
commit d604f3b914

View File

@@ -2,13 +2,13 @@
<div class="box"> <div class="box">
<div class="inquire"> <div class="inquire">
<span>分区</span> <span>分区</span>
<partition-select v-model:partition-id="formData.partitionId" /> <partition-select v-model:partition-id="formData.partitionId" @update:partitionId="getlistByPartition"/>
</div> </div>
<div class="inquire"> <div class="inquire">
<span>负责人</span> <span>负责人</span>
<el-select v-model="formData.operatorId" placeholder="请选择"> <el-select v-model="formData.operatorId" placeholder="请选择">
<el-option <el-option
v-for="item in adminListArr" v-for="item in adminListTypeArr"
:key="item.id" :key="item.id"
:label="item.name" :label="item.name"
:value="item.id" :value="item.id"
@@ -332,6 +332,7 @@ export default {
date: "", date: "",
}); });
const adminListArr = ref([]); const adminListArr = ref([]);
const adminListTypeArr = ref([]);
const dateCycleArr = ref([]); const dateCycleArr = ref([]);
const regionStatDialog = ref(false); const regionStatDialog = ref(false);
const regionStatTable = ref([]); const regionStatTable = ref([]);
@@ -446,7 +447,17 @@ export default {
return num.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); return num.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
}; };
}); });
// 选择分区
const getlistByPartition = (e) => {
console.log(e);
if (e) {
formData.partitionId = e;
const matchedItems = adminListArr.value.filter(
(item) => (item.partitionId == formData.partitionId)
);
adminListTypeArr.value = matchedItems;
}
};
const dateFormat = (row) => { const dateFormat = (row) => {
const date = new Date(row); const date = new Date(row);
return date.format("yyyy-MM-dd hh:mm:ss"); return date.format("yyyy-MM-dd hh:mm:ss");
@@ -471,6 +482,12 @@ export default {
getGuildOperatorListAll().then((res) => { getGuildOperatorListAll().then((res) => {
if (res.code == 200) { if (res.code == 200) {
adminListArr.value = res.data; adminListArr.value = res.data;
const matchedItems = adminListArr.value.filter(
(item) => (item.partitionId == 1)
);
adminListTypeArr.value = matchedItems;
} else { } else {
ElMessage.error(res.message); ElMessage.error(res.message);
} }
@@ -519,7 +536,9 @@ export default {
remarkData, remarkData,
remarkFun, remarkFun,
confirmRemarkFun, confirmRemarkFun,
toPercentage toPercentage,
getlistByPartition,
adminListTypeArr
}; };
}, },
}; };