Jelajahi Sumber

bimid 复制问题修改

haojianlong 4 tahun lalu
induk
melakukan
9a9b5416cc
1 mengubah file dengan 5 tambahan dan 9 penghapusan
  1. 5 9
      src/views/model/report/deleted.vue

+ 5 - 9
src/views/model/report/deleted.vue

@@ -11,12 +11,8 @@
             {{ `${item.BuildingName}建筑模型` }}-{{
               `${item.FloorName}层`
             }}-{{ `${item.EquipLocalName ? item.EquipLocalName : item.EquipName}` }}</h4>
-          <b>BIM ID:<span @dblclick="copyContent"
-                          id="copy">{{
-              item.ScanTaskBase && item.ScanTaskBase[0] ? item.ScanTaskBase[0].BIMID : '' | bimIdTransformation
-            }}</span></b><span
-          class="copy"
-          @click="clickCopy">点击复制</span>
+          <b>BIM ID:<span @dblclick="copyContent" :id="`copy${index}`">{{ item.BIMID ? item.BIMID : '' | bimIdTransformation }}</span></b>
+          <span class="copy" :bim="item.BIMID ? item.BIMID : '' | bimIdTransformation" @click="clickCopy">点击复制</span>
           <input id="copyContent" type="text" @dblclick="copyContent"
                  style="border:none;opacity:0;position:absolute;top:0;left:0;">
           <p style="margin-top:30px;">Revit族:{{ item.BIMFamilyName }}</p>
@@ -156,10 +152,10 @@ export default {
         duration: 1000
       });
     },
-    clickCopy() {
+    clickCopy(e) {
       // 点击复制
-      let target = document.getElementById('copy');
-      let content = target.innerText;
+      let target = e.target;
+      let content = target.getAttribute('bim');
       let inputObj = document.getElementById('copyContent');
       inputObj.value = content;
       inputObj.select();