fix(04): group & type path
This commit is contained in:
parent
972a2a5348
commit
ea95191037
1 changed files with 50 additions and 36 deletions
|
|
@ -1330,46 +1330,60 @@ onMounted(async () => {
|
|||
flowStore.rotate();
|
||||
});
|
||||
|
||||
watch(productMode, () => {
|
||||
inputSearch.value = '';
|
||||
currentStatus.value = 'All';
|
||||
watch(
|
||||
() => expandedTree.value,
|
||||
() => {
|
||||
inputSearch.value = '';
|
||||
currentStatus.value = 'All';
|
||||
|
||||
const tmp: typeof utilsStore.currentTitle.path = [
|
||||
{
|
||||
text: 'manage',
|
||||
i18n: true,
|
||||
handler: () => {
|
||||
productMode.value = 'group';
|
||||
expandedTree.value = [];
|
||||
currentIdGrop.value = '';
|
||||
filterStat.value = [];
|
||||
let tmp: typeof utilsStore.currentTitle.path = [
|
||||
{
|
||||
text: 'manage',
|
||||
i18n: true,
|
||||
handler: () => {
|
||||
productMode.value = 'group';
|
||||
expandedTree.value = [];
|
||||
currentIdGrop.value = '';
|
||||
filterStat.value = [];
|
||||
},
|
||||
},
|
||||
},
|
||||
];
|
||||
];
|
||||
|
||||
if (productMode.value === 'type' || productMode.value === 'service') {
|
||||
tmp.push({
|
||||
text: 'productGroup',
|
||||
i18n: true,
|
||||
argsi18n: { name: pathGroupName.value },
|
||||
handler: () => {
|
||||
productMode.value = 'type';
|
||||
filterStat.value = filterStat.value.filter((item) => {
|
||||
return item !== 'type';
|
||||
});
|
||||
},
|
||||
});
|
||||
}
|
||||
if (productMode.value === 'service') {
|
||||
tmp.push({
|
||||
text: 'productType',
|
||||
i18n: true,
|
||||
argsi18n: { name: pathTypeName.value },
|
||||
});
|
||||
}
|
||||
if (
|
||||
productMode.value === 'group' ||
|
||||
productMode.value === 'type' ||
|
||||
productMode.value === 'service'
|
||||
) {
|
||||
tmp.push({
|
||||
text: 'productGroup',
|
||||
i18n: true,
|
||||
argsi18n: { name: pathGroupName.value },
|
||||
handler: () => {
|
||||
productMode.value = 'type';
|
||||
filterStat.value = filterStat.value.filter((item) => {
|
||||
return item !== 'type';
|
||||
});
|
||||
expandedTree.value.pop();
|
||||
utilsStore.currentTitle.path.pop();
|
||||
},
|
||||
});
|
||||
if (expandedTree.value.length === 0) {
|
||||
utilsStore.currentTitle.path = [{ text: 'manage', i18n: true }];
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (productMode.value === 'service') {
|
||||
tmp.push({
|
||||
text: 'productType',
|
||||
i18n: true,
|
||||
argsi18n: { name: pathTypeName.value },
|
||||
});
|
||||
}
|
||||
|
||||
utilsStore.currentTitle.path = tmp;
|
||||
});
|
||||
utilsStore.currentTitle.path = tmp;
|
||||
},
|
||||
{ deep: true },
|
||||
);
|
||||
|
||||
watch(currentStatus, async () => {
|
||||
if (productMode.value === 'group') {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue