样品对比100%
This commit is contained in:
parent
d734720dd1
commit
598fc7a81f
@ -76,8 +76,11 @@ export default () => {
|
||||
setBlueToothColorTwo('')
|
||||
setTime('')
|
||||
setTime('')
|
||||
setData('')
|
||||
setResult('')
|
||||
}
|
||||
const [data, setData] = useState('')
|
||||
const [result, setResult] = useState('')
|
||||
const { fetchData } = productabsorbcontrast()
|
||||
const handTake = async () => {
|
||||
if (searchField.l1 === '') {
|
||||
@ -99,7 +102,17 @@ export default () => {
|
||||
}
|
||||
const res = await fetchData(query)
|
||||
if (res.data) {
|
||||
|
||||
setData(res.data)
|
||||
let diffarray = [
|
||||
res.data.reddish && "偏红",
|
||||
res.data.yellowish && "偏黄",
|
||||
res.data.greenish && "偏绿",
|
||||
res.data.bluish && "偏蓝",
|
||||
res.data.whitish && "偏亮",
|
||||
res.data.darker && "偏暗",
|
||||
];
|
||||
let resCont = diffarray.filter(item => item).join(",");
|
||||
setResult(resCont)
|
||||
}
|
||||
}
|
||||
return (
|
||||
@ -155,8 +168,15 @@ export default () => {
|
||||
<View className={styles.reslutBox}>
|
||||
<View className={styles.reslutTitle}>
|
||||
<View className={styles.titleLeft}>测量结果</View>
|
||||
{/* <View className={styles.titleRiht}>不合格</View> */}
|
||||
{
|
||||
(data as any).ciede_2000 >= 1 &&
|
||||
<View className={styles.titleRiht}>不合格</View>
|
||||
}
|
||||
{
|
||||
(data as any).ciede_2000 <= 1 &&
|
||||
<View className={styles.titleRiht1}>合格</View>
|
||||
}
|
||||
|
||||
</View>
|
||||
{
|
||||
data === '' &&
|
||||
@ -166,7 +186,14 @@ export default () => {
|
||||
data &&
|
||||
<View className={styles.notBox}>
|
||||
<View className={styles.notLeft}>色差值: {(data as any).ciede_2000}</View>
|
||||
{
|
||||
!(data as any).reddish && !(data as any).yellowish && !(data as any).greenish && !(data as any).bluish && !(data as any).whitish && !(data as any).darker &&
|
||||
<View className={styles.notright}>无明显色差</View>
|
||||
}
|
||||
{
|
||||
result &&
|
||||
<View className={styles.notright}>{result}</View>
|
||||
}
|
||||
</View>
|
||||
}
|
||||
</View>
|
||||
|
Loading…
x
Reference in New Issue
Block a user