运营流水分析 - 负责人联动分区
This commit is contained in:
@@ -2,13 +2,13 @@
|
||||
<div class="box">
|
||||
<div class="inquire">
|
||||
<span>分区</span>
|
||||
<partition-select v-model:partition-id="formData.partitionId" />
|
||||
<partition-select v-model:partition-id="formData.partitionId" @update:partitionId="getlistByPartition"/>
|
||||
</div>
|
||||
<div class="inquire">
|
||||
<span>负责人</span>
|
||||
<el-select v-model="formData.operatorId" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in adminListArr"
|
||||
v-for="item in adminListTypeArr"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
@@ -332,6 +332,7 @@ export default {
|
||||
date: "",
|
||||
});
|
||||
const adminListArr = ref([]);
|
||||
const adminListTypeArr = ref([]);
|
||||
const dateCycleArr = ref([]);
|
||||
const regionStatDialog = ref(false);
|
||||
const regionStatTable = ref([]);
|
||||
@@ -446,7 +447,17 @@ export default {
|
||||
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 date = new Date(row);
|
||||
return date.format("yyyy-MM-dd hh:mm:ss");
|
||||
@@ -471,6 +482,12 @@ export default {
|
||||
getGuildOperatorListAll().then((res) => {
|
||||
if (res.code == 200) {
|
||||
adminListArr.value = res.data;
|
||||
|
||||
const matchedItems = adminListArr.value.filter(
|
||||
(item) => (item.partitionId == 1)
|
||||
);
|
||||
adminListTypeArr.value = matchedItems;
|
||||
|
||||
} else {
|
||||
ElMessage.error(res.message);
|
||||
}
|
||||
@@ -519,7 +536,9 @@ export default {
|
||||
remarkData,
|
||||
remarkFun,
|
||||
confirmRemarkFun,
|
||||
toPercentage
|
||||
toPercentage,
|
||||
getlistByPartition,
|
||||
adminListTypeArr
|
||||
};
|
||||
},
|
||||
};
|
||||
|
Reference in New Issue
Block a user