perf: 样式调整
This commit is contained in:
@ -23,31 +23,31 @@ export enum Enum_Level {
|
||||
}
|
||||
|
||||
export const LEVEL_MAP = new Map([
|
||||
[Enum_Level.LOW, { label: '低风险', value: 'low_risk_number', class: '!color-#6d4cfe' }],
|
||||
[Enum_Level.MEDIUM, { label: '中风险', value: 'medium_risk_number', class: 'color-#FFAE00' }],
|
||||
[Enum_Level.HIGH, { label: '高风险', value: 'high_risk_number', class: '!color-#F64B31' }],
|
||||
[Enum_Level.LOW, { label: '低风险', value: 'low_risk_number', color: '#6d4cfe' }],
|
||||
[Enum_Level.MEDIUM, { label: '中风险', value: 'medium_risk_number', color: '#FFAE00' }],
|
||||
[Enum_Level.HIGH, { label: '高风险', value: 'high_risk_number', color: '#F64B31' }],
|
||||
]);
|
||||
|
||||
export const RESULT_LIST = [
|
||||
{
|
||||
label: '合规程度',
|
||||
value: 'compliance_level',
|
||||
class: LEVEL_MAP.get(Enum_Level.LOW)?.class,
|
||||
color: LEVEL_MAP.get(Enum_Level.LOW)?.color,
|
||||
suffix: '%',
|
||||
},
|
||||
{
|
||||
label: '检验项',
|
||||
value: 'inspection_items',
|
||||
class: '!color-#211F24',
|
||||
color: '#211F24',
|
||||
},
|
||||
{
|
||||
label: '高风险',
|
||||
value: 'high_risk_number',
|
||||
class: LEVEL_MAP.get(Enum_Level.HIGH)?.class,
|
||||
color: LEVEL_MAP.get(Enum_Level.HIGH)?.color,
|
||||
},
|
||||
{
|
||||
label: '中风险',
|
||||
value: 'medium_risk_number',
|
||||
class: LEVEL_MAP.get(Enum_Level.MEDIUM)?.class,
|
||||
color: LEVEL_MAP.get(Enum_Level.MEDIUM)?.color,
|
||||
},
|
||||
];
|
||||
];
|
||||
|
||||
@ -170,11 +170,11 @@ export default {
|
||||
const renderFooterRow = () => {
|
||||
return (
|
||||
<>
|
||||
<Button class="mr-12px" size="medium" onClick={onAgainCheck}>
|
||||
<Button class="mr-12px" size="medium" onClick={onAgainCheck} disabled={props.checkLoading}>
|
||||
再次审核
|
||||
</Button>
|
||||
{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 ? (
|
||||
<>
|
||||
<IconLoading size={14} />
|
||||
@ -327,7 +327,9 @@ export default {
|
||||
<div class="flex items-center mb-16px">
|
||||
{RESULT_LIST.map((item, 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>
|
||||
</div>
|
||||
))}
|
||||
@ -354,7 +356,7 @@ export default {
|
||||
<div class="flex items-center mb-16px">
|
||||
{RESULT_LIST.map((item, 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 || ''
|
||||
}`}</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) => (
|
||||
<TextOverTips
|
||||
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}
|
||||
/>
|
||||
))}
|
||||
@ -413,9 +416,9 @@ export default {
|
||||
<div class="flex items-center relative">
|
||||
<span>{item.label}</span>
|
||||
{
|
||||
activeTab.value === item.value && aiReview.value?.violation_items.length > 0 && (
|
||||
<icon-exclamation-circle-fill size={14} class="color-#F64B31 absolute right--10px top-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" />
|
||||
// )
|
||||
}
|
||||
</div>
|
||||
),
|
||||
|
||||
@ -39,7 +39,6 @@ export default {
|
||||
const { handleStartCheck, handleAgainCheck, ticket, checkLoading } = useGetAiReviewResult({
|
||||
cardInfo: selectCardInfo,
|
||||
updateAiReview(ai_review) {
|
||||
console.log('updateAiReview', ai_review);
|
||||
selectCardInfo.value.ai_review = ai_review;
|
||||
},
|
||||
});
|
||||
@ -59,6 +58,7 @@ export default {
|
||||
selectCardInfo.value = cloneDeep(item);
|
||||
selectedImageInfo.value = cloneDeep(files?.[0] ?? {});
|
||||
|
||||
console.log({ ai_review });
|
||||
if (isEmpty(ai_review)) {
|
||||
handleStartCheck();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user