钱新宇 пре 8 часа
родитељ
комит
6784f3f872
1 измењених фајлова са 86 додато и 347 уклоњено
  1. 86 347
      traceCodePackages/traceabilityCodeQuery/pages/detail/index.vue

+ 86 - 347
traceCodePackages/traceabilityCodeQuery/pages/detail/index.vue

@@ -10,25 +10,15 @@
     lower-threshold="80"
     @scroll="onPageScroll"
     @scrolltolower="onTimelineScrollToLower"
-    v-if="!!data && !loading"
-  >
+    v-if="!!data && !loading">
     <view id="detailPageTopAnchor"></view>
-    <view
-      class="detail-card detail-bg"
-      :style="{ backgroundImage: 'url(' + bg + ')' }"
-    >
+    <view class="detail-card detail-bg" :style="{ backgroundImage: 'url(' + bg + ')' }">
       <view class="detail-drug-title">{{ data.physicName }}</view>
       <view class="detail-row detail-traceability">
         <view class="detail-label">追溯码:</view>
-        <view class="detail-value detail-wrap">{{
-          formatTraceCode(traceCode)
-        }}</view>
+        <view class="detail-value detail-wrap">{{ formatTraceCode(traceCode) }}</view>
         <view class="detail-copy-btn" @click="copy(traceCode)">
-          <image
-            src="../../../static/images/copy.png"
-            mode="scaleToFill"
-            :style="{ width: '30rpx', height: '30rpx' }"
-          />
+          <image src="../../../static/images/copy.png" mode="scaleToFill" :style="{ width: '30rpx', height: '30rpx' }" />
         </view>
       </view>
 
@@ -38,16 +28,10 @@
           class="detail-value detail-wrap detail-company-value"
           :class="{ 'detail-clamp': !companyExpanded }"
           :style="{ marginBottom: needCompanyToggle ? '40rpx' : undefined }"
-          id="companyValue"
-        >
+          id="companyValue">
           <text>{{ data.produceEntName }}</text>
         </view>
-        <text
-          v-if="needCompanyToggle"
-          class="detail-expand-tag"
-          @click="toggleCompanyExpand"
-          >{{ companyExpanded ? "收起" : "展开" }}</text
-        >
+        <text v-if="needCompanyToggle" class="detail-expand-tag" @click="toggleCompanyExpand">{{ companyExpanded ? "收起" : "展开" }}</text>
       </view>
       <view class="detail-row">
         <view class="detail-label">批准文号:</view>
@@ -62,9 +46,7 @@
         <view class="detail-value">{{ data.produceBatchNo }}</view>
       </view>
       <view class="detail-row" v-show="cardExpanded">
-        <view class="detail-label">
-          剂<text :style="{ opacity: 0 }">剂型</text>型:</view
-        >
+        <view class="detail-label"> 剂<text :style="{ opacity: 0 }">剂型</text>型:</view>
         <view class="detail-value">{{ data.prepnDesc }}</view>
       </view>
       <view class="detail-row" v-show="cardExpanded">
@@ -76,18 +58,11 @@
         <view class="detail-value">{{ data.validEndDate }}</view>
       </view>
       <view class="detail-card-toggle" @click="toggleCardExpand">
-        <uni-icons
-          :type="cardExpanded ? 'up' : 'down'"
-          size="18"
-          color="#9aa4b2"
-        ></uni-icons>
+        <uni-icons :type="cardExpanded ? 'up' : 'down'" size="18" color="#9aa4b2"></uni-icons>
       </view>
     </view>
 
-    <view
-      class="detail-timeline detail-bg"
-      :style="{ backgroundImage: 'url(' + bg + ')' }"
-    >
+    <view class="detail-timeline detail-bg" :style="{ backgroundImage: 'url(' + bg + ')' }">
       <view class="detail-section-header">
         <view class="detail-section-title">扫码跟踪</view>
         <!-- <view class="detail-section-actions">
@@ -147,262 +122,114 @@
         </view>
       </view> -->
       <view class="detail-timeline-toolbar" v-if="timelineView === 'text'">
-        <view class="detail-toolbar-btn" @tap.stop="setAllTimelineDetail(true)"
-          >全部展示详情</view
-        >
-        <view class="detail-toolbar-btn" @tap.stop="setAllTimelineDetail(false)"
-          >全部展示概要</view
-        >
+        <view class="detail-toolbar-btn" @tap.stop="setAllTimelineDetail(true)">全部展示详情</view>
+        <view class="detail-toolbar-btn" @tap.stop="setAllTimelineDetail(false)">全部展示概要</view>
       </view>
       <view
         v-if="timelineView === 'text'"
         class="detail-timeline-item"
         :class="{ 'detail-timeline-item-first': i === 0 }"
         v-for="(value, i) in visibleBillDetailList"
-        :key="i"
-      >
+        :key="i">
         <view class="detail-left">
           <view class="detail-dot" :class="{ 'detail-fill': false }"></view>
-          <view
-            class="detail-line"
-            v-if="i < visibleBillDetailList.length - 1 || hasMoreTimelineItems"
-          ></view>
+          <view class="detail-line" v-if="i < visibleBillDetailList.length - 1 || hasMoreTimelineItems"></view>
         </view>
         <view class="detail-right">
           <view class="detail-title-row">
-            <view class="detail-title" :class="{ 'detail-bold': true }">
-              {{ value.billTypeName || "--" }} {{ value.billCode || "" }}
-            </view>
+            <view class="detail-title" :class="{ 'detail-bold': true }"> {{ value.billTypeName || "--" }} {{ value.billCode || "" }} </view>
             <view class="detail-item-toggle" @tap.stop="toggleTimelineItem(i)">
               {{ value._showDetail ? "概要" : "详情" }}
-              <uni-icons
-                :type="value._showDetail ? 'up' : 'down'"
-                size="14"
-                color="#888"
-              ></uni-icons>
+              <uni-icons :type="value._showDetail ? 'up' : 'down'" size="14" color="#888"></uni-icons>
             </view>
           </view>
           <view class="detail-info-row">
             <text class="detail-info-label">发货企业:</text>
-            <text class="detail-info-value">{{
-              value.fromEntName || "--"
-            }}</text>
+            <text class="detail-info-value">{{ value.fromEntName || "--" }}</text>
           </view>
-          <view class="detail-tag-row">
-            <text class="detail-tag" v-if="value.fromCustomerNature">{{
-              value.fromCustomerNature
-            }}</text>
-            <text class="detail-tag" v-if="value.fromCustomerLevel">{{
-              value.fromCustomerLevel
-            }}</text>
-            <text class="detail-tag" v-if="value.fromResponsibleManager">{{
-              value.fromResponsibleManager
-            }}</text>
+          <view class="detail-tag-row" v-if="value._showDetail && value.fromEntType !== '1'">
+            <text class="detail-tag" v-if="value.fromCustomerNature">{{ value.fromCustomerNature }}</text>
+            <text class="detail-tag" v-if="value.fromCustomerLevel">{{ value.fromCustomerLevel }}</text>
+            <text class="detail-tag" v-if="value.fromResponsibleManager">{{ value.fromResponsibleManager }}</text>
           </view>
           <view class="detail-tag-row" v-if="value._showDetail">
-            <text
-              class="detail-tag"
-              :style="getTagColorStyle(value.fromEntTypeName)"
-              v-if="value.fromEntTypeName"
-              >{{ value.fromEntTypeName }}</text
-            >
-            <text
-              class="detail-tag detail-tag-region"
-              v-if="getRegionByPrefix(value, 'from')"
-              >{{ getRegionByPrefix(value, "from") }}</text
-            >
+            <text class="detail-tag" :style="getTagColorStyle(value.fromEntTypeName)" v-if="value.fromEntTypeName">{{ value.fromEntTypeName }}</text>
+            <text class="detail-tag detail-tag-region" v-if="getRegionByPrefix(value, 'from')">{{ getRegionByPrefix(value, "from") }}</text>
           </view>
           <view class="detail-info-row">
             <text class="detail-info-label">收货企业:</text>
             <text class="detail-info-value">{{ value.toEntName || "--" }}</text>
           </view>
-          <view class="detail-tag-row">
-            <text class="detail-tag" v-if="value.toCustomerNature">{{
-              value.toCustomerNature
-            }}</text>
-            <text class="detail-tag" v-if="value.toCustomerLevel">{{
-              value.toCustomerLevel
-            }}</text>
-            <text class="detail-tag" v-if="value.toResponsibleManager">{{
-              value.toResponsibleManager
-            }}</text>
+          <view class="detail-tag-row" v-if="value._showDetail && value.toEntType !== '1'">
+            <text class="detail-tag" v-if="value.toCustomerNature">{{ value.toCustomerNature }}</text>
+            <text class="detail-tag" v-if="value.toCustomerLevel">{{ value.toCustomerLevel }}</text>
+            <text class="detail-tag" v-if="value.toResponsibleManager">{{ value.toResponsibleManager }}</text>
           </view>
           <view class="detail-tag-row" v-if="value._showDetail">
-            <text
-              class="detail-tag"
-              :style="getTagColorStyle(value.toEntTypeName)"
-              v-if="value.toEntTypeName"
-              >{{ value.toEntTypeName }}</text
-            >
-            <text
-              class="detail-tag detail-tag-region"
-              v-if="getRegionByPrefix(value, 'to')"
-              >{{ getRegionByPrefix(value, "to") }}</text
-            >
+            <text class="detail-tag" :style="getTagColorStyle(value.toEntTypeName)" v-if="value.toEntTypeName">{{ value.toEntTypeName }}</text>
+            <text class="detail-tag detail-tag-region" v-if="getRegionByPrefix(value, 'to')">{{ getRegionByPrefix(value, "to") }}</text>
           </view>
           <view class="detail-info-row">
             <text class="detail-info-label">入出库时间:</text>
             <text class="detail-info-value">{{ value.billTime || "--" }}</text>
           </view>
-          <view
-            class="detail-info-row"
-            v-if="value._showDetail && value.uploadEntName"
-          >
+          <view class="detail-info-row" v-if="value._showDetail && value.uploadEntName">
             <text class="detail-info-label">上传企业:</text>
             <text class="detail-info-value">{{ value.uploadEntName }}</text>
           </view>
-          <view
-            class="detail-tag-row"
-            v-if="value._showDetail && value.uploadEntName"
-          >
-            <text class="detail-tag" v-if="value.uploadCustomerNature">{{
-              value.uploadCustomerNature
-            }}</text>
-            <text class="detail-tag" v-if="value.uploadCustomerLevel">{{
-              value.uploadCustomerLevel
-            }}</text>
-            <text class="detail-tag" v-if="value.uploadResponsibleManager">{{
-              value.uploadResponsibleManager
-            }}</text>
+          <view class="detail-tag-row" v-if="value._showDetail && value.uploadEntName && value.uploadEntType !== '1'">
+            <text class="detail-tag" v-if="value.uploadCustomerNature">{{ value.uploadCustomerNature }}</text>
+            <text class="detail-tag" v-if="value.uploadCustomerLevel">{{ value.uploadCustomerLevel }}</text>
+            <text class="detail-tag" v-if="value.uploadResponsibleManager">{{ value.uploadResponsibleManager }}</text>
           </view>
-          <view
-            class="detail-tag-row"
-            v-if="value._showDetail && value.uploadEntName"
-          >
-            <text
-              class="detail-tag"
-              :style="getTagColorStyle(value.uploadEntTypeName)"
-              v-if="value.uploadEntTypeName"
-              >{{ value.uploadEntTypeName }}</text
-            >
-            <text
-              class="detail-tag detail-tag-region"
-              v-if="getRegionByPrefix(value, 'upload')"
-              >{{ getRegionByPrefix(value, "upload") }}</text
-            >
+          <view class="detail-tag-row" v-if="value._showDetail && value.uploadEntName">
+            <text class="detail-tag" :style="getTagColorStyle(value.uploadEntTypeName)" v-if="value.uploadEntTypeName">{{ value.uploadEntTypeName }}</text>
+            <text class="detail-tag detail-tag-region" v-if="getRegionByPrefix(value, 'upload')">{{ getRegionByPrefix(value, "upload") }}</text>
           </view>
-          <view
-            class="detail-info-row"
-            v-if="value._showDetail && value.uploadEntName"
-          >
+          <view class="detail-info-row" v-if="value._showDetail && value.uploadEntName">
             <text class="detail-info-label">上传时间:</text>
-            <text class="detail-info-value">{{
-              value.uploadTime || "--"
-            }}</text>
+            <text class="detail-info-value">{{ value.uploadTime || "--" }}</text>
           </view>
-          <view
-            class="detail-info-row"
-            v-if="value._showDetail && value.disEntName"
-          >
+          <view class="detail-info-row" v-if="value._showDetail && value.disEntName">
             <text class="detail-info-label">配送企业:</text>
             <text class="detail-info-value">{{ value.disEntName }}</text>
           </view>
-          <view
-            class="detail-tag-row"
-            v-if="
-              value._showDetail &&
-              value.disEntName &&
-              !value.disEntName.includes(',')
-            "
-          >
-            <text class="detail-tag" v-if="value.disCustomerNature">{{
-              value.disCustomerNature
-            }}</text>
-            <text class="detail-tag" v-if="value.disCustomerLevel">{{
-              value.disCustomerLevel
-            }}</text>
-            <text class="detail-tag" v-if="value.disResponsibleManager">{{
-              value.disResponsibleManager
-            }}</text>
+          <view class="detail-tag-row" v-if="value._showDetail && value.disEntName && !value.disEntName.includes(',') && value.disEntType !== '1'">
+            <text class="detail-tag" v-if="value.disCustomerNature">{{ value.disCustomerNature }}</text>
+            <text class="detail-tag" v-if="value.disCustomerLevel">{{ value.disCustomerLevel }}</text>
+            <text class="detail-tag" v-if="value.disResponsibleManager">{{ value.disResponsibleManager }}</text>
           </view>
-          <view
-            class="detail-tag-row"
-            v-if="
-              value._showDetail &&
-              value.disEntName &&
-              !value.disEntName.includes(',')
-            "
-          >
-            <text
-              class="detail-tag"
-              :style="getTagColorStyle(value.disEntTypeName)"
-              v-if="value.disEntTypeName"
-              >{{ value.disEntTypeName }}</text
-            >
-            <text
-              class="detail-tag detail-tag-region"
-              v-if="getRegionByPrefix(value, 'dis')"
-              >{{ getRegionByPrefix(value, "dis") }}</text
-            >
+          <view class="detail-tag-row" v-if="value._showDetail && value.disEntName && !value.disEntName.includes(',')">
+            <text class="detail-tag" :style="getTagColorStyle(value.disEntTypeName)" v-if="value.disEntTypeName">{{ value.disEntTypeName }}</text>
+            <text class="detail-tag detail-tag-region" v-if="getRegionByPrefix(value, 'dis')">{{ getRegionByPrefix(value, "dis") }}</text>
           </view>
-          <view
-            class="detail-info-row"
-            v-if="value._showDetail && value.assEntName"
-          >
+          <view class="detail-info-row" v-if="value._showDetail && value.assEntName">
             <text class="detail-info-label">委托企业:</text>
             <text class="detail-info-value">{{ value.assEntName }}</text>
           </view>
-          <view
-            class="detail-tag-row"
-            v-if="value._showDetail && value.assEntName"
-          >
-            <text class="detail-tag" v-if="value.assCustomerNature">{{
-              value.assCustomerNature
-            }}</text>
-            <text class="detail-tag" v-if="value.assCustomerLevel">{{
-              value.assCustomerLevel
-            }}</text>
-            <text class="detail-tag" v-if="value.assResponsibleManager">{{
-              value.assResponsibleManager
-            }}</text>
+          <view class="detail-tag-row" v-if="value._showDetail && value.assEntName && value.assEntType !== '1'">
+            <text class="detail-tag" v-if="value.assCustomerNature">{{ value.assCustomerNature }}</text>
+            <text class="detail-tag" v-if="value.assCustomerLevel">{{ value.assCustomerLevel }}</text>
+            <text class="detail-tag" v-if="value.assResponsibleManager">{{ value.assResponsibleManager }}</text>
           </view>
-          <view
-            class="detail-tag-row"
-            v-if="value._showDetail && value.assEntName"
-          >
-            <text
-              class="detail-tag"
-              :style="getTagColorStyle(value.assEntTypeName)"
-              v-if="value.assEntTypeName"
-              >{{ value.assEntTypeName }}</text
-            >
-            <text
-              class="detail-tag detail-tag-region"
-              v-if="getRegionByPrefix(value, 'ass')"
-              >{{ getRegionByPrefix(value, "ass") }}</text
-            >
+          <view class="detail-tag-row" v-if="value._showDetail && value.assEntName">
+            <text class="detail-tag" :style="getTagColorStyle(value.assEntTypeName)" v-if="value.assEntTypeName">{{ value.assEntTypeName }}</text>
+            <text class="detail-tag detail-tag-region" v-if="getRegionByPrefix(value, 'ass')">{{ getRegionByPrefix(value, "ass") }}</text>
           </view>
         </view>
       </view>
-      <view
-        v-if="timelineView === 'text' && hasMoreTimelineItems"
-        class="detail-timeline-loadmore"
-      >
-        上拉加载更多({{ visibleBillDetailList.length }}/{{
-          timelineTotalCount
-        }})
+      <view v-if="timelineView === 'text' && hasMoreTimelineItems" class="detail-timeline-loadmore">
+        上拉加载更多({{ visibleBillDetailList.length }}/{{ timelineTotalCount }})
       </view>
     </view>
   </scroll-view>
   <transition name="back-top-fade">
-    <view
-      v-if="!!data && !loading && showBackTopButton"
-      class="detail-back-top-btn"
-      @tap="backToTop"
-    >
+    <view v-if="!!data && !loading && showBackTopButton" class="detail-back-top-btn" @tap="backToTop">
       <view class="detail-back-top-arrow"></view>
     </view>
   </transition>
-  <view
-    class="detail-page-empty"
-    :style="{ height: pageHeight }"
-    v-if="!data && !loading"
-  >
-    <image
-      src="../../../static/images/empty.png"
-      mode="scaleToFill"
-      :style="{ width: '264rpx', height: '200rpx' }"
-    />
+  <view class="detail-page-empty" :style="{ height: pageHeight }" v-if="!data && !loading">
+    <image src="../../../static/images/empty.png" mode="scaleToFill" :style="{ width: '264rpx', height: '200rpx' }" />
     <text
       :style="{
         fontSize: '24rpx',
@@ -413,17 +240,8 @@
       >所查询药品所在生产企业尚未纳入扫码范围,后续将进一步扩大,敬请期待</text
     >
   </view>
-  <view
-    class="detail-page-empty"
-    :style="{ height: pageHeight }"
-    v-if="loading"
-  >
-    <image
-      src="../../../static/images/loading.png"
-      mode="scaleToFill"
-      :style="{ width: '50rpx', height: '50rpx' }"
-      class="detail-loading"
-    />
+  <view class="detail-page-empty" :style="{ height: pageHeight }" v-if="loading">
+    <image src="../../../static/images/loading.png" mode="scaleToFill" :style="{ width: '50rpx', height: '50rpx' }" class="detail-loading" />
   </view>
 </template>
 
@@ -450,10 +268,9 @@ export default {
       companyExpanded: true,
       needCompanyToggle: false,
       cardExpanded: false,
-      allTimelineDetail: true,
+      allTimelineDetail: false,
       timelineView: "text",
-      defaultTimelineViewKey:
-        "traceabilityCodeQuery.detail.timelineDefaultView",
+      defaultTimelineViewKey: "traceabilityCodeQuery.detail.timelineDefaultView",
       imageData: [],
       graphViewWidth: 300,
       graphViewHeight: 480,
@@ -528,10 +345,7 @@ export default {
     },
     visibleBillDetailList() {
       if (!this.data || !Array.isArray(this.data.billDetailList)) return [];
-      const maxCount = Math.min(
-        this.timelineVisibleCount,
-        this.timelineTotalCount,
-      );
+      const maxCount = Math.min(this.timelineVisibleCount, this.timelineTotalCount);
       return this.data.billDetailList.slice(0, maxCount);
     },
     hasMoreTimelineItems() {
@@ -721,9 +535,7 @@ export default {
     },
     getRegion(value = {}) {
       const { provinceDesc, cityDesc, areaDesc } = value;
-      return (
-        [provinceDesc, cityDesc, areaDesc].filter(Boolean).join(",") || ""
-      );
+      return [provinceDesc, cityDesc, areaDesc].filter(Boolean).join(",") || "";
     },
     getRegionByPrefix(value = {}, prefix = "from") {
       const province = value[`${prefix}ProvinceDesc`];
@@ -771,10 +583,7 @@ export default {
     },
     loadMoreTimelineItems() {
       if (!this.hasMoreTimelineItems) return;
-      this.timelineVisibleCount = Math.min(
-        this.timelineVisibleCount + this.timelinePageSize,
-        this.timelineTotalCount,
-      );
+      this.timelineVisibleCount = Math.min(this.timelineVisibleCount + this.timelinePageSize, this.timelineTotalCount);
     },
     toggleTimelineItem(index) {
       if (!this.data || !Array.isArray(this.data.billDetailList)) return;
@@ -794,14 +603,8 @@ export default {
       if (this.timelineView === "text") {
         this.initTimelineVisibleCount();
       }
-      if (
-        this.timelineView === "graph" &&
-        this.data &&
-        Array.isArray(this.data.billDetailList)
-      ) {
-        this.imageData = this.ownershipFlowMode
-          ? this.buildImageData2(this.data.billDetailList)
-          : this.buildImageData(this.data.billDetailList);
+      if (this.timelineView === "graph" && this.data && Array.isArray(this.data.billDetailList)) {
+        this.imageData = this.ownershipFlowMode ? this.buildImageData2(this.data.billDetailList) : this.buildImageData(this.data.billDetailList);
         this.updateGraphCanvasSize();
         this.$nextTick(() => this.initChart());
       }
@@ -809,9 +612,7 @@ export default {
     onOwnershipModeChange(e) {
       this.ownershipFlowMode = !!(e && e.detail && e.detail.value);
       if (!this.data || !Array.isArray(this.data.billDetailList)) return;
-      this.imageData = this.ownershipFlowMode
-        ? this.buildImageData2(this.data.billDetailList)
-        : this.buildImageData(this.data.billDetailList);
+      this.imageData = this.ownershipFlowMode ? this.buildImageData2(this.data.billDetailList) : this.buildImageData(this.data.billDetailList);
       this.updateGraphCanvasSize();
       if (this.timelineView === "graph") {
         this.$nextTick(() => this.initChart());
@@ -836,23 +637,13 @@ export default {
         if (item.billTypeName === "使用出库") {
           to.push({
             name: "消费者",
-            text: !hasType
-              ? "****"
-              : buildTime(item.billTime) + " " + item.billTypeName,
+            text: !hasType ? "****" : buildTime(item.billTime) + " " + item.billTypeName,
           });
         } else if (item.toEntName) {
-          const address = [
-            item.toProvinceDesc,
-            item.toCityDesc,
-            item.toAreaDesc,
-          ]
-            .filter(Boolean)
-            .join(",");
+          const address = [item.toProvinceDesc, item.toCityDesc, item.toAreaDesc].filter(Boolean).join(",");
           to.push({
             name: item.toEntTypeName + " " + item.toEntName + " " + address,
-            text: !hasType
-              ? "****"
-              : buildTime(item.billTime) + " " + item.billTypeName,
+            text: !hasType ? "****" : buildTime(item.billTime) + " " + item.billTypeName,
           });
           if (hasAss && hasType) {
             to[to.length - 1].text += " 被委托:" + item.fromEntName;
@@ -862,25 +653,17 @@ export default {
       };
       data.forEach((item, i) => {
         const hasAss = !!item.assEntName;
-        const index = list.findIndex((i) =>
-          i.name.includes(hasAss ? item.assEntName : item.fromEntName),
-        );
+        const index = list.findIndex((i) => i.name.includes(hasAss ? item.assEntName : item.fromEntName));
         let to = [];
         if (index !== -1) {
           to = list[index].to;
         }
         to = buildTo(to, item);
         if (index === -1) {
-          const address = (
-            hasAss
-              ? [item.assProvinceDesc, item.assCityDesc, item.assAreaDesc]
-              : [item.fromProvinceDesc, item.fromCityDesc, item.fromAreaDesc]
-          )
+          const address = (hasAss ? [item.assProvinceDesc, item.assCityDesc, item.assAreaDesc] : [item.fromProvinceDesc, item.fromCityDesc, item.fromAreaDesc])
             .filter(Boolean)
             .join(",");
-          const name = hasAss
-            ? item.assEntTypeName + " " + item.assEntName + " " + address
-            : item.fromEntTypeName + " " + item.fromEntName + " " + address;
+          const name = hasAss ? item.assEntTypeName + " " + item.assEntName + " " + address : item.fromEntTypeName + " " + item.fromEntName + " " + address;
           list.push({
             num: i,
             name,
@@ -890,17 +673,8 @@ export default {
           list[index].to = to;
         }
 
-        if (
-          item.toEntName &&
-          list.findIndex((i) => i.name.includes(item.toEntName)) === -1
-        ) {
-          const address = [
-            item.toProvinceDesc,
-            item.toCityDesc,
-            item.toAreaDesc,
-          ]
-            .filter(Boolean)
-            .join(",");
+        if (item.toEntName && list.findIndex((i) => i.name.includes(item.toEntName)) === -1) {
+          const address = [item.toProvinceDesc, item.toCityDesc, item.toAreaDesc].filter(Boolean).join(",");
           list.push({
             num: i + 9999,
             name: item.toEntTypeName + " " + item.toEntName + " " + address,
@@ -930,23 +704,13 @@ export default {
         if (item.billTypeName === "使用出库") {
           to.push({
             name: "消费者",
-            text: !hasType
-              ? "****"
-              : buildTime(item.billTime) + " " + item.billTypeName,
+            text: !hasType ? "****" : buildTime(item.billTime) + " " + item.billTypeName,
           });
         } else if (item.toEntName) {
-          const address = [
-            item.toProvinceDesc,
-            item.toCityDesc,
-            item.toAreaDesc,
-          ]
-            .filter(Boolean)
-            .join(",");
+          const address = [item.toProvinceDesc, item.toCityDesc, item.toAreaDesc].filter(Boolean).join(",");
           to.push({
             name: item.toEntTypeName + " " + item.toEntName + " " + address,
-            text: !hasType
-              ? "****"
-              : buildTime(item.billTime) + " " + item.billTypeName,
+            text: !hasType ? "****" : buildTime(item.billTime) + " " + item.billTypeName,
           });
           if (item.assEntName && hasType) {
             to[to.length - 1].text += " 委托:" + item.assEntName;
@@ -962,13 +726,7 @@ export default {
         }
         to = buildTo(to, item);
         if (index === -1) {
-          const address = [
-            item.fromProvinceDesc,
-            item.fromCityDesc,
-            item.fromAreaDesc,
-          ]
-            .filter(Boolean)
-            .join(",");
+          const address = [item.fromProvinceDesc, item.fromCityDesc, item.fromAreaDesc].filter(Boolean).join(",");
           list.push({
             num: i,
             name: item.fromEntTypeName + " " + item.fromEntName + " " + address,
@@ -978,17 +736,8 @@ export default {
           list[index].to = to;
         }
 
-        if (
-          item.toEntName &&
-          list.findIndex((i) => i.name.includes(item.toEntName)) === -1
-        ) {
-          const address = [
-            item.toProvinceDesc,
-            item.toCityDesc,
-            item.toAreaDesc,
-          ]
-            .filter(Boolean)
-            .join(",");
+        if (item.toEntName && list.findIndex((i) => i.name.includes(item.toEntName)) === -1) {
+          const address = [item.toProvinceDesc, item.toCityDesc, item.toAreaDesc].filter(Boolean).join(",");
           list.push({
             num: i + 9999,
             name: item.toEntTypeName + " " + item.toEntName + " " + address,
@@ -1017,10 +766,7 @@ export default {
       const bottom = 90;
       const vGap = 170;
       const nodeCount = list.length || 1;
-      this.graphViewHeight = Math.max(
-        520,
-        top + bottom + (nodeCount - 1) * vGap,
-      );
+      this.graphViewHeight = Math.max(520, top + bottom + (nodeCount - 1) * vGap);
     },
     getData2(traceCode) {
       request("/bills/scanCode2", {
@@ -1044,10 +790,7 @@ export default {
             // this.updateGraphCanvasSize();
             // this.initChart();
           }
-          if (
-            typeof _data === "object" &&
-            Object.values(_data).filter((i) => !!i).length == 0
-          ) {
+          if (typeof _data === "object" && Object.values(_data).filter((i) => !!i).length == 0) {
             this.data = null;
           }
           this.loading = false;
@@ -1276,11 +1019,7 @@ export default {
       uni.setClipboardData({
         data,
         success: () => {
-          console.log(
-            "packages/traceabilityCodeQuery/pages/detail/index.vue" +
-              "storage" +
-              "clipboardData",
-          );
+          console.log("packages/traceabilityCodeQuery/pages/detail/index.vue" + "storage" + "clipboardData");
           uni.showToast({
             title: "已复制追溯码",
             icon: "none",