Explorar o código

[Feat 0000]瓦斯日报使用优化

bobo04052021@163.com hai 2 días
pai
achega
53171da230

+ 6 - 18
pages/gasreport/components/Recognition.vue

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

+ 1 - 0
pages/gasreport/components/gasImgIdentify.vue

@@ -423,6 +423,7 @@ export default {
           that.gasTitle = "数据填报";
           that.gasTitle = "数据填报";
           //识别数据填充
           //识别数据填充
           if (that.sbData.length) {
           if (that.sbData.length) {
+            that.isShowAdd = true;
             that.getSbFill();
             that.getSbFill();
           }
           }
         }
         }

+ 1 - 9
pages/gasreport/components/taskBoardAddress.vue

@@ -28,15 +28,7 @@
       <view v-for="(item, index) in indexList" :key="index">
       <view v-for="(item, index) in indexList" :key="index">
         <u-cell icon="share">
         <u-cell icon="share">
           <view slot="title" class="u-slot-title">
           <view slot="title" class="u-slot-title">
-            <text class="u-cell-text">{{
-              `${item.deviceName} (${
-                item.checkNum == "1"
-                  ? "第一次"
-                  : item.checkNum == "2"
-                  ? "第二次"
-                  : ""
-              })`
-            }}</text>
+            <text class="u-cell-text">{{ `${item.deviceName}` }}</text>
             <!-- <u-tag text="查看" plain size="mini" type="warning">
             <!-- <u-tag text="查看" plain size="mini" type="warning">
                         </u-tag> -->
                         </u-tag> -->
           </view>
           </view>