feat: check if every item is completed
This commit is contained in:
parent
de5d470784
commit
e49ab198a0
1 changed files with 23 additions and 6 deletions
|
|
@ -18,6 +18,7 @@ import {
|
||||||
Attributes,
|
Attributes,
|
||||||
DocStatus,
|
DocStatus,
|
||||||
Step,
|
Step,
|
||||||
|
RequestWorkStatus,
|
||||||
} from 'src/stores/request-list/types';
|
} from 'src/stores/request-list/types';
|
||||||
import useOptionStore from 'src/stores/options';
|
import useOptionStore from 'src/stores/options';
|
||||||
import ProductExpansion from './ProductExpansion.vue';
|
import ProductExpansion from './ProductExpansion.vue';
|
||||||
|
|
@ -285,8 +286,24 @@ async function triggerViewFile(opt: {
|
||||||
class="status-color q-pa-sm bordered row items-center cursor-pointer no-wrap"
|
class="status-color q-pa-sm bordered row items-center cursor-pointer no-wrap"
|
||||||
style="text-wrap: nowrap"
|
style="text-wrap: nowrap"
|
||||||
:class="{
|
:class="{
|
||||||
[`status-color-${'doing'}`]: true,
|
['status-color-done']: workList
|
||||||
'step-status-active': pageState.currentStep === value.order,
|
?.filter((v) => {
|
||||||
|
return v.productService.work?.attributes.workflowStep?.[
|
||||||
|
i
|
||||||
|
]?.productsId.includes(v.productService.productId);
|
||||||
|
})
|
||||||
|
.every((v) => {
|
||||||
|
const status = v.stepStatus.find(
|
||||||
|
({ step }) => step === i + 1,
|
||||||
|
)?.workStatus;
|
||||||
|
|
||||||
|
return (
|
||||||
|
status === RequestWorkStatus.Completed ||
|
||||||
|
status === RequestWorkStatus.Ended
|
||||||
|
);
|
||||||
|
}),
|
||||||
|
['status-color-doing']: true,
|
||||||
|
['step-status-active']: pageState.currentStep === value.order,
|
||||||
}"
|
}"
|
||||||
@click="() => (pageState.currentStep = value.order)"
|
@click="() => (pageState.currentStep = value.order)"
|
||||||
>
|
>
|
||||||
|
|
@ -542,16 +559,16 @@ async function triggerViewFile(opt: {
|
||||||
color: hsla(var(--_color));
|
color: hsla(var(--_color));
|
||||||
}
|
}
|
||||||
|
|
||||||
&.status-color-done {
|
&.status-color-waiting {
|
||||||
--_color: var(--green-5-hsl);
|
--_color: var(--gray-4-hsl);
|
||||||
color: var(--foreground);
|
color: var(--foreground);
|
||||||
}
|
}
|
||||||
&.status-color-doing {
|
&.status-color-doing {
|
||||||
--_color: var(--blue-5-hsl);
|
--_color: var(--blue-5-hsl);
|
||||||
color: var(--foreground);
|
color: var(--foreground);
|
||||||
}
|
}
|
||||||
&.status-color-waiting {
|
&.status-color-done {
|
||||||
--_color: var(--gray-4-hsl);
|
--_color: var(--green-5-hsl);
|
||||||
color: var(--foreground);
|
color: var(--foreground);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue