feat: 建立整改 Task 1 多端质量基线

This commit is contained in:
weijuesen
2026-08-13 22:18:35 +08:00
parent 1b8cab19df
commit ff94ff28fe
27 changed files with 3470 additions and 315 deletions
+4 -7
View File
@@ -37,7 +37,6 @@ const LampPage: React.FC = () => {
const [stepsMap, setStepsMap] = useState<Record<string, LampTestStep[]>>({});
const [expandedId, setExpandedId] = useState('');
const [result, setResult] = useState('');
const [imagePath, setImagePath] = useState('');
const [loading, setLoading] = useState(true);
const fetchData = useCallback(async () => {
@@ -71,7 +70,6 @@ const LampPage: React.FC = () => {
}
setExpandedId(t.id);
setResult(t.result || '');
setImagePath('');
};
const handleStepToggle = async (t: LampTest, s: LampTestStep, done: boolean) => {
@@ -88,7 +86,6 @@ const LampPage: React.FC = () => {
sizeType: ['compressed'],
success: async (res) => {
const path = res.tempFilePaths[0];
setImagePath(path);
try {
const up = await uploadLampResultImage(t.id, path);
setTests((prev) =>
@@ -155,11 +152,11 @@ const LampPage: React.FC = () => {
</View>
<Text className={styles.sectionLabel}>==</Text>
<RadioGroup value={result} onChange={(e) => setResult(e.detail.value)}>
<RadioGroup onChange={(e) => setResult(e.detail.value[0])}>
<View className={styles.radioRow}>
<Radio value="positive"></Radio>
<Radio value="negative"></Radio>
<Radio value="invalid"></Radio>
<Radio value="positive" checked={result === 'positive'}></Radio>
<Radio value="negative" checked={result === 'negative'}></Radio>
<Radio value="invalid" checked={result === 'invalid'}></Radio>
</View>
</RadioGroup>
{t.result ? <Text className={styles.resultHint}>{RESULT_LABELS[t.result]}</Text> : null}