|
@@ -19,12 +19,12 @@
|
|
|
<img class="card-bg" :src="base_img_url2 + imgKey + resize" />
|
|
<img class="card-bg" :src="base_img_url2 + imgKey + resize" />
|
|
|
<div class="card-content" v-if="!isRecognize && !noData">
|
|
<div class="card-content" v-if="!isRecognize && !noData">
|
|
|
<div class="title-ques">
|
|
<div class="title-ques">
|
|
|
- <div class="ques-text">病虫名称:{{resList?.name}}</div>
|
|
|
|
|
|
|
+ <div class="ques-text">病虫名称:{{ resList?.name }}</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="dialog-famous">管理方法:</div>
|
|
<div class="dialog-famous">管理方法:</div>
|
|
|
- <div class="dialog-answer" >
|
|
|
|
|
|
|
+ <div class="dialog-answer">
|
|
|
{{ resList.cure }}
|
|
{{ resList.cure }}
|
|
|
- <!-- <template v-if="resData?.phenologyName">
|
|
|
|
|
|
|
+ <!-- <template v-if="resData?.phenologyName">
|
|
|
,物候期为<span style="color: #ffd786;">{{resData?.phenologyName}}</span>
|
|
,物候期为<span style="color: #ffd786;">{{resData?.phenologyName}}</span>
|
|
|
</template>
|
|
</template>
|
|
|
<template v-if="resData?.pestOrDiseaseName">
|
|
<template v-if="resData?.pestOrDiseaseName">
|
|
@@ -73,25 +73,22 @@ import { base_img_url2 } from "@/api/config.js";
|
|
|
import wx from "weixin-js-sdk";
|
|
import wx from "weixin-js-sdk";
|
|
|
import MqttClient from "@/mqtt/MqttClient";
|
|
import MqttClient from "@/mqtt/MqttClient";
|
|
|
|
|
|
|
|
-const MQTT_MQTTIP = "wss://ws.emqx.sysuimars.cn/mqtt";
|
|
|
|
|
-const MQTT_USERNAME = "admin";
|
|
|
|
|
-const MQTT_PASSWORD = "admin";
|
|
|
|
|
-
|
|
|
|
|
let resize = '?x-oss-process=image/resize,w_300'
|
|
let resize = '?x-oss-process=image/resize,w_300'
|
|
|
const route = useRoute();
|
|
const route = useRoute();
|
|
|
-const json = JSON.parse(route.query.json || "{}");
|
|
|
|
|
-// const json = JSON.parse(`{"imgKey":"birdseye-look-mini/766/1761388777261.png","imgId":769993591052308480}`)
|
|
|
|
|
|
|
+// const json = JSON.parse(route.query.json || "{}");
|
|
|
|
|
+const json = JSON.parse(`{"imgKey":["birdseye-look-mini/766/1761548221155.png","birdseye-look-mini/766/1761548221431.png"],"imgId":["770662355804622848","770662355804622849"],"farmId":766,"token":"bcc0e12d-bff6-4f1f-8edc-2ab80b19af41"}`)
|
|
|
const imgKey = json.imgKey;
|
|
const imgKey = json.imgKey;
|
|
|
const farmId = json.farmId;
|
|
const farmId = json.farmId;
|
|
|
|
|
|
|
|
const isRecognize = ref(true);
|
|
const isRecognize = ref(true);
|
|
|
-
|
|
|
|
|
const recoginizeResult = ref({});
|
|
const recoginizeResult = ref({});
|
|
|
const noData = ref(false);
|
|
const noData = ref(false);
|
|
|
const resList = ref({});
|
|
const resList = ref({});
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
|
|
|
+ console.log(json,'json')
|
|
|
|
|
+ const aaa = `{"result":["06"],"updateTime":"2025-10-27T15:03:44.859","taskId":"18","imageIds":[770662364482637824,770662364482637825],"status":1}`
|
|
|
|
|
+ console.log(JSON.parse(aaa),'JSON.parse(aaa)')
|
|
|
const mqttClient = new MqttClient(['farm/pest_recognition/task/'+farmId], mqttListener);
|
|
const mqttClient = new MqttClient(['farm/pest_recognition/task/'+farmId], mqttListener);
|
|
|
- // const mqttClient = new MqttClient(['phone/image/update/+'], mqttListener);
|
|
|
|
|
mqttClient.connect();
|
|
mqttClient.connect();
|
|
|
});
|
|
});
|
|
|
|
|
|
|
@@ -110,14 +107,7 @@ const mqttListener = (topic, message) => {
|
|
|
}else{
|
|
}else{
|
|
|
noData.value = true;
|
|
noData.value = true;
|
|
|
}
|
|
}
|
|
|
- // else if(resData.value?.growthAbnormalId){
|
|
|
|
|
- // VE_API.growth_anomaly_type.getById({id:resData.value?.growthAbnormalId}).then(({data})=>{
|
|
|
|
|
- // resData.value.suggest = data.suggest;
|
|
|
|
|
- // })
|
|
|
|
|
- // }
|
|
|
|
|
isRecognize.value = false;
|
|
isRecognize.value = false;
|
|
|
- // recoginizeResult.value.text1 = resData.data.text1
|
|
|
|
|
- // recoginizeResult.value.text2 = resData.data.text2
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -257,7 +247,7 @@ const toRecognize = () => {
|
|
|
width: fit-content;
|
|
width: fit-content;
|
|
|
padding: 4px 10px;
|
|
padding: 4px 10px;
|
|
|
border-radius: 20px;
|
|
border-radius: 20px;
|
|
|
- color: #FFD786;
|
|
|
|
|
|
|
+ color: #ffd786;
|
|
|
background: rgba(255, 215, 134, 0.2);
|
|
background: rgba(255, 215, 134, 0.2);
|
|
|
margin-bottom: 6px;
|
|
margin-bottom: 6px;
|
|
|
}
|
|
}
|
|
@@ -314,7 +304,7 @@ const toRecognize = () => {
|
|
|
width: 20%;
|
|
width: 20%;
|
|
|
min-width: 80px;
|
|
min-width: 80px;
|
|
|
text-align: center;
|
|
text-align: center;
|
|
|
- border: 1px solid #8E8E8E;
|
|
|
|
|
|
|
+ border: 1px solid #8e8e8e;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
.btn + .btn {
|
|
.btn + .btn {
|