feat: 建立整改 Task 1 多端质量基线
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user