|
|
@@ -2,16 +2,7 @@
|
|
|
<view class="Recognition">
|
|
|
<view class="recognition-list">
|
|
|
<view v-for="(item, index) in listData" :key="index">
|
|
|
- <u-cell
|
|
|
- :title="`${item.deviceName} (${
|
|
|
- item.checkNum == '1'
|
|
|
- ? '第一次'
|
|
|
- : item.checkNum == '2'
|
|
|
- ? '第二次'
|
|
|
- : ''
|
|
|
- })`"
|
|
|
- @click="getSbClick(item)"
|
|
|
- >
|
|
|
+ <u-cell :title="`${item.deviceName}`" @click="getSbClick(item)">
|
|
|
<u-avatar
|
|
|
slot="icon"
|
|
|
shape="square"
|
|
|
@@ -32,6 +23,7 @@
|
|
|
? "识别失败"
|
|
|
: ""
|
|
|
}}</text>
|
|
|
+ <u-icon v-if="item.status == '1'" name="plus" size="16"></u-icon>
|
|
|
</view>
|
|
|
</u-cell>
|
|
|
</view>
|
|
|
@@ -94,14 +86,10 @@ export default {
|
|
|
const result = await that.processObject(obj);
|
|
|
that.$set(that.listData, findIndex, {
|
|
|
...obj,
|
|
|
- status: result[0].status,
|
|
|
- });
|
|
|
- that.sbData = that.listData.map((el) => {
|
|
|
- return {
|
|
|
- ...el,
|
|
|
- sbList: result,
|
|
|
- };
|
|
|
+ status: result.length ? result[0].status : "2",
|
|
|
+ sbList: result,
|
|
|
});
|
|
|
+ that.sbData = that.listData.map((el) => ({ ...el }));
|
|
|
}
|
|
|
uni.hideLoading();
|
|
|
},
|
|
|
@@ -112,7 +100,7 @@ export default {
|
|
|
// 模拟异步操作,例如网络请求
|
|
|
return new Promise((resolve) =>
|
|
|
setTimeout(() => {
|
|
|
- let apiUrlImg = `${configService.apiUrlP}:6008`;
|
|
|
+ let apiUrlImg = configService.apiUrlP.replace(/:\d+$/, ":6008");
|
|
|
uni.uploadFile({
|
|
|
url: `${apiUrlImg}/gasIdentifyDs`,
|
|
|
filePath: uni.getStorageSync(obj.deviceId),
|