perf: 样式调整

This commit is contained in:
rd
2025-08-11 13:51:27 +08:00
parent b7dd3d61dc
commit 010b9a3ac7
3 changed files with 20 additions and 17 deletions

View File

@ -23,31 +23,31 @@ export enum Enum_Level {
} }
export const LEVEL_MAP = new Map([ export const LEVEL_MAP = new Map([
[Enum_Level.LOW, { label: '低风险', value: 'low_risk_number', class: '!color-#6d4cfe' }], [Enum_Level.LOW, { label: '低风险', value: 'low_risk_number', color: '#6d4cfe' }],
[Enum_Level.MEDIUM, { label: '中风险', value: 'medium_risk_number', class: 'color-#FFAE00' }], [Enum_Level.MEDIUM, { label: '中风险', value: 'medium_risk_number', color: '#FFAE00' }],
[Enum_Level.HIGH, { label: '高风险', value: 'high_risk_number', class: '!color-#F64B31' }], [Enum_Level.HIGH, { label: '高风险', value: 'high_risk_number', color: '#F64B31' }],
]); ]);
export const RESULT_LIST = [ export const RESULT_LIST = [
{ {
label: '合规程度', label: '合规程度',
value: 'compliance_level', value: 'compliance_level',
class: LEVEL_MAP.get(Enum_Level.LOW)?.class, color: LEVEL_MAP.get(Enum_Level.LOW)?.color,
suffix: '%', suffix: '%',
}, },
{ {
label: '检验项', label: '检验项',
value: 'inspection_items', value: 'inspection_items',
class: '!color-#211F24', color: '#211F24',
}, },
{ {
label: '高风险', label: '高风险',
value: 'high_risk_number', value: 'high_risk_number',
class: LEVEL_MAP.get(Enum_Level.HIGH)?.class, color: LEVEL_MAP.get(Enum_Level.HIGH)?.color,
}, },
{ {
label: '中风险', label: '中风险',
value: 'medium_risk_number', value: 'medium_risk_number',
class: LEVEL_MAP.get(Enum_Level.MEDIUM)?.class, color: LEVEL_MAP.get(Enum_Level.MEDIUM)?.color,
}, },
]; ];

View File

@ -170,11 +170,11 @@ export default {
const renderFooterRow = () => { const renderFooterRow = () => {
return ( return (
<> <>
<Button class="mr-12px" size="medium" onClick={onAgainCheck}> <Button class="mr-12px" size="medium" onClick={onAgainCheck} disabled={props.checkLoading}>
再次审核 再次审核
</Button> </Button>
{isTextTab.value ? ( {isTextTab.value ? (
<Button size="medium" type="outline" class="w-123px" onClick={onAiReplace}> <Button size="medium" type="outline" class="w-123px" onClick={onAiReplace} disabled={props.checkLoading}>
{aiCheckLoading.value ? ( {aiCheckLoading.value ? (
<> <>
<IconLoading size={14} /> <IconLoading size={14} />
@ -327,7 +327,9 @@ export default {
<div class="flex items-center mb-16px"> <div class="flex items-center mb-16px">
{RESULT_LIST.map((item, index) => ( {RESULT_LIST.map((item, index) => (
<div class="flex flex-col justify-center items-center flex-1 result-item" key={index}> <div class="flex flex-col justify-center items-center flex-1 result-item" key={index}>
<span class={`s1 ${item.class}`}>{aiReview.value?.[item.value]}</span> <span class="s1" style={{ color: item.color }}>{`${aiReview.value?.[item.value]}${
item.suffix || ''
}`}</span>
<span class="cts mt-4px !lh-20px !text-12px !color-#737478">{item.label}</span> <span class="cts mt-4px !lh-20px !text-12px !color-#737478">{item.label}</span>
</div> </div>
))} ))}
@ -354,7 +356,7 @@ export default {
<div class="flex items-center mb-16px"> <div class="flex items-center mb-16px">
{RESULT_LIST.map((item, index) => ( {RESULT_LIST.map((item, index) => (
<div class="flex flex-col justify-center items-center flex-1 result-item" key={index}> <div class="flex flex-col justify-center items-center flex-1 result-item" key={index}>
<span class={`s1 color-#6d4cfe ${item.class}`}>{`${aiReview.value?.[item.value]}${ <span class="s1" style={{ color: item.color }}>{`${aiReview.value?.[item.value]}${
item.suffix || '' item.suffix || ''
}`}</span> }`}</span>
<span class="cts mt-4px !lh-20px !text-12px !color-#737478">{item.label}</span> <span class="cts mt-4px !lh-20px !text-12px !color-#737478">{item.label}</span>
@ -377,7 +379,8 @@ export default {
{aiReview.value?.violation_items?.map((item, index) => ( {aiReview.value?.violation_items?.map((item, index) => (
<TextOverTips <TextOverTips
context={item.word} context={item.word}
class={`mb-12px cts ${LEVEL_MAP.get(item.risk_level)?.class}`} class="mb-12px cts"
style={{ color: LEVEL_MAP.get(item.risk_level)?.color }}
key={index} key={index}
/> />
))} ))}
@ -413,9 +416,9 @@ export default {
<div class="flex items-center relative"> <div class="flex items-center relative">
<span>{item.label}</span> <span>{item.label}</span>
{ {
activeTab.value === item.value && aiReview.value?.violation_items.length > 0 && ( // activeTab.value === item.value && aiReview.value?.violation_items.length > 0 && (
<icon-exclamation-circle-fill size={14} class="color-#F64B31 absolute right--10px top-0" /> // <icon-exclamation-circle-fill size={14} class="color-#F64B31 absolute right--10px top-0" />
) // )
} }
</div> </div>
), ),

View File

@ -39,7 +39,6 @@ export default {
const { handleStartCheck, handleAgainCheck, ticket, checkLoading } = useGetAiReviewResult({ const { handleStartCheck, handleAgainCheck, ticket, checkLoading } = useGetAiReviewResult({
cardInfo: selectCardInfo, cardInfo: selectCardInfo,
updateAiReview(ai_review) { updateAiReview(ai_review) {
console.log('updateAiReview', ai_review);
selectCardInfo.value.ai_review = ai_review; selectCardInfo.value.ai_review = ai_review;
}, },
}); });
@ -59,6 +58,7 @@ export default {
selectCardInfo.value = cloneDeep(item); selectCardInfo.value = cloneDeep(item);
selectedImageInfo.value = cloneDeep(files?.[0] ?? {}); selectedImageInfo.value = cloneDeep(files?.[0] ?? {});
console.log({ ai_review });
if (isEmpty(ai_review)) { if (isEmpty(ai_review)) {
handleStartCheck(); handleStartCheck();
} }