Kaynağa Gözat

9月7日杨青

杨青 1 yıl önce
ebeveyn
işleme
20a29323e4
2 değiştirilmiş dosya ile 174 ekleme ve 76 silme
  1. 173 75
      src/xt_pages/user/Sitemap.vue
  2. 1 1
      src/xt_pages/user/vascularAccess.vue

+ 173 - 75
src/xt_pages/user/Sitemap.vue Dosyayı Görüntüle

@@ -58,22 +58,23 @@
58 58
 
59 59
             
60 60
             <!-- 穿刺文字 active  @mousedown="startDrag"   @mousedown="A_mousedow($event)" @mouseup="A_moouseup($event)" left:text_left+'px',top:text_top+'px',-->
61
-            <div v-for="(item,index) in text_arr" :key="index" >
62
-              <div ref="text_cc" class="add-mark-text-wrap active"
61
+            <!-- <div  >@mousedown.self="A_mousedow($event)" @mouseup.self="A_moouseup($event)" -->
62
+              <div v-for="(item,index) in text_arr" :key="index" class="add-mark-text-wrap active text" id="text" @mousedown="mousedown($event)"
63 63
               :style="{width:(item.width + 10)+'px',left:item.left+'px',top:item.top+'px','font-size':14+'px', position: 'absolute'}"
64
-              @mousedown.self="A_mousedow($event)" @mouseup.self="A_moouseup($event)">
64
+              >
65 65
                 <!-- <div  style="width:82px;left:62.17%;top:39.00%;display: inline-block;" @mousedown="A_mousedow($event)" @mouseup="A_moouseup($event)">position: 'absolute',top: 36+'%',left: 48+'%' -->
66
-                  <!-- {{ item }} -->
66
+                  <!-- {{ item }} @mousedown.self="A_mousedow($event)" @mouseup.self="A_moouseup($event)"-->
67 67
                   <el-input v-text="item.text" size="mini" :style="{width:item.width+'px', border: 1+'px solid transparent', cursor: 'default'}"></el-input>
68 68
                   <!-- <input id="inpu" type="text" :value="item" data-width="82" style="width: 82px; border: 1px solid transparent; cursor: default;" class="mark-text-ipt"> -->
69 69
                 <!-- </div> -->
70 70
                 <span class="remove-mark-text" @click="input_deldte($event,item)">×</span>
71 71
                  <span class="mark-text-line" style="transform: rotate(45deg);" data-rotate="45"></span>
72 72
               </div>
73
-            </div>
73
+            <!-- </div> -->
74
+
74 75
             <!-- 穿刺方向 -->
75 76
             <div v-for="item in fangxiangA">
76
-            <div v-if="fangxiangA_num==2" @mousedown="A_mousedow($event)" @mouseup="A_moouseup($event)"
77
+            <div v-if="fangxiangA_num==2" @mousedown.self="A_mousedow($event)" @mouseup.self="A_moouseup($event)"
77 78
               title="长按右键调整线条角度" id="jinzhen_fangxiang_A" class="mark-target mark-target-a mark-target-adccz" 
78 79
               :style="{left: item.left+'px', top: item.top+'px', width: 14+'px', height: 14+'px', background: 'rgb(231, 53, 53)', 'border-radius': 50+'%', position: 'absolute', cursor: 'move',}">
79 80
               <span class="mark-line mark-line-ccza" data-rotate="160" style="width:50px;transform:rotate(160deg);">
@@ -82,19 +83,20 @@
82 83
               </b></span></div></div>
83 84
 
84 85
             <div v-for="item in fangxiangV">
85
-            <div v-if="fangxiangV_num==2" @mousedown="A_mousedow($event)" @mouseup="A_moouseup($event)"
86
+            <div v-if="fangxiangV_num==2" @mousedown.self="A_mousedow($event)" @mouseup.self="A_moouseup($event)"
86 87
             title="长按右键调整线条角度" id="jinzhen_fangxiang_V" class="mark-target mark-target-v mark-target-vdccz"
87 88
             :style="{left: item.left+'px', top: item.top+'px', width: 14+'px', height: 14+'px', background: 'rgb(53, 162, 231)', 'border-radius': 50+'%', position: 'absolute', cursor: 'move',}">
88 89
             <span class="mark-line mark-line-cczv" data-rotate="20" style="width:50px;transform:rotate(20deg);">
89 90
               <b class="xtgl-ccz-arrow xtgl-ccz-arrow-v"
90 91
               style="position: absolute;width: 7px;height: 7px;border-left-width: 2px;border-left-style: solid;border-top-width: 2px;border-top-style: solid;top: -3px;right: 0;transform: rotate(138deg);">
91 92
               </b></span></div></div>
92
-            <!-- 辅助工具 :style="{transform: rotate(30deg)}"  xuanzhuan_a ,'background-img': 'url(' + require('../../assets/evaluate/tool-a.png') + ')'  -->
93
+            <!-- 辅助工具 :style="{transform: rotate(30deg)}"  xuanzhuan_a ,  @mousedown.self="A_mousedow($event)" @mouseup.self="A_moouseup($event)"-->
93 94
             <div v-for="item in fuzhuA">
94 95
             <div v-if="fuzhuA_num==2" 
95
-             class="jinzhen-jiaodu-target jinzhen-jiaodu-target-A" id="jinzhen-jiaodu-target-A" :style="{position: 'absolute',top:item.a_top+'px',left:item.a_left+'px'}" @mousedown.self="A_mousedow($event)" @mouseup.self="A_moouseup($event)">
96
+             class="jinzhen-jiaodu-target jinzhen-jiaodu-target-A" id="jinzhen-jiaodu-target-A" @mousedown="fuzhuA_down"
97
+             :style="{position: 'absolute',top:item.a_top+'px',left:item.a_left+'px'}" >
96 98
               <div class="frame-box  actives" :style="{'transform': `scale(${scalea_num})`}" >
97
-                <div class="frame-image" data-rotate="0" :style="{transform: `rotate(${item.A_rotate}deg)`}">
99
+                <div class="frame-image" data-rotate="0" :style="{transform: `rotate(${item.A_rotate}deg)`,margin:'auto'}">
98 100
                   <img src="../../assets/evaluate/tool-a.png" alt="" srcset="" style="margin: 6px 0 0 0px;">
99 101
                 </div>
100 102
                 <div class="drag-elem bottom right" @click="imga_click"></div>
@@ -102,10 +104,10 @@
102 104
               </div>
103 105
             </div></div>
104 106
             <div v-for="item in fuzhuV"><!--scalev_num item.scalev-->
105
-            <div v-if="fuzhuV_num==2" :style="{position: 'absolute',top:item.v_top+'px',left:item.v_left+'px'}" @mousedown.self="A_mousedow($event)" @mouseup.self="A_moouseup($event)"
107
+            <div v-if="fuzhuV_num==2" :style="{position: 'absolute',top:item.v_top+'px',left:item.v_left+'px'}" @mousedown="fuzhuV_down"
106 108
              class="jinzhen-jiaodu-target jinzhen-jiaodu-target-V" id="jinzhen-jiaodu-target-V">
107 109
               <div class="frame-box actives" :style="{'transform': `scale(${item.v_scalev})`}" >
108
-                <div id="v_img" class="frame-image" data-rotate="0" :style="{'transform': `rotate(${item.V_rotate}deg)`}">
110
+                <div id="v_img" class="frame-image" data-rotate="0" :style="{'transform': `rotate(${item.V_rotate}deg)`,margin:'auto'}">
109 111
                   <img id="image" src="../../assets/evaluate/tool-a.png" alt="" srcset="" style="margin: 6px 0 0 0px;">
110 112
                 </div>
111 113
                 <div class="drag-elem bottom right" @click="imgv_click"></div>
@@ -318,8 +320,32 @@ export default{
318 320
 
319 321
       patientID:0,
320 322
       id:0,
323
+      texts:null,
324
+      disX: 0,
325
+      disY: 0,
326
+      styleObj: {
327
+        left: 0,
328
+        top: 0
329
+      },
330
+      isdow:false
321 331
     }
322 332
   },
333
+  created(){
334
+    const id = this.$route.params && this.$route.params.id;
335
+    this.patientID = parseInt(id);
336
+
337
+    // this.getPatientSitemap(this.patientID)
338
+  },
339
+  mounted(){
340
+    // console.log('valuse',this.fangxiangA,);
341
+    // this.editor = new Quill(this.$refs.imageWrapper, {
342
+    //   modules:{toolbar:false},
343
+    //   theme: 'snow',
344
+    // });
345
+  //  console.log('111111',this.fileList);
346
+    // this.$refs.text_cc.addEventListener('mousemove',this.A_mousedow)
347
+    // this.$refs.text_cc.addEventListener('mousemove',this.A_moouseup)
348
+  },
323 349
   methods:{
324 350
     add(){
325 351
       if(this.append == false){
@@ -409,7 +435,6 @@ export default{
409 435
       // }
410 436
      }
411 437
     },
412
-
413 438
     // v_item(e,val){
414 439
     //   const V_div =document.getElementsByClassName('point-mark-v-item')
415 440
     //   console.log('1111',val,e.target.className);
@@ -489,14 +514,14 @@ export default{
489 514
         //     Vlen[i].top=endy
490 515
         //   }
491 516
         // }
492
-        for(let i=0;i<textlen.length;i++){
493
-          const textsle=e.target.innerText.split('\n')[0]
494
-          if(textlen[i].text == textsle){
495
-            console.log('3333');
496
-            textlen[i].left=endx
497
-            textlen[i].top=endy
498
-          }
499
-        }
517
+        // for(let i=0;i<textlen.length;i++){
518
+        //   const textsle=e.target.innerText.split('\n')[0]
519
+        //   if(textlen[i].text == textsle){
520
+        //     console.log('3333');
521
+        //     textlen[i].left=endx
522
+        //     textlen[i].top=endy
523
+        //   }
524
+        // }
500 525
         for(let i=0;i<fx_alen.length;i++){
501 526
           if(e.target.id=='jinzhen_fangxiang_A'){
502 527
             fx_alen[0].left=endx
@@ -509,18 +534,18 @@ export default{
509 534
             fx_vlen[0].top=endy
510 535
           }
511 536
         }
512
-        for(let i=0;i<FZ_alen.length;i++){
513
-          if(e.target.id=='jinzhen-jiaodu-target-A'){
514
-            FZ_alen[i].a_left=endx
515
-            FZ_alen[i].a_top=endy
516
-          }
517
-        }
518
-        for(let i=0;i<FZ_vlen.length;i++){
519
-          if(e.target.id=='jinzhen-jiaodu-target-V'){
520
-            FZ_vlen[i].v_left=endx
521
-            FZ_vlen[i].v_top=endy
522
-          }
523
-        }
537
+        // for(let i=0;i<FZ_alen.length;i++){
538
+        //   if(e.target.id=='jinzhen-jiaodu-target-A'){
539
+        //     FZ_alen[i].a_left=endx
540
+        //     FZ_alen[i].a_top=endy
541
+        //   }
542
+        // }
543
+        // for(let i=0;i<FZ_vlen.length;i++){
544
+        //   if(e.target.id=='jinzhen-jiaodu-target-V'){
545
+        //     FZ_vlen[i].v_left=endx
546
+        //     FZ_vlen[i].v_top=endy
547
+        //   }
548
+        // }
524 549
         for(let i=0;i<aleng.length;i++){
525 550
           if(aleng[i].markNum ==e.target.innerText && e.target.id=='mark-target-a'){
526 551
             console.log('3333');
@@ -543,6 +568,93 @@ export default{
543 568
       // console.log('0000',val);
544 569
       document.onmousemove =null
545 570
     },
571
+    mousedown(e){
572
+      // this.texts = document.getElementsByClassName('text')[0]
573
+      const tet=document.getElementsByClassName('text')
574
+      const evetext=e.target.innerText.split('\n')[0]
575
+      var textlen=this.text_arr
576
+      console.log('ZXCBVCB',textlen);
577
+      for(let i=0;i<tet.length;i++){
578
+        const textsle = tet[i].innerText.split('\n')[0]
579
+        if(evetext == textsle){
580
+          this.disX = e.clientX - tet[i].offsetLeft;
581
+          this.disY = e.clientY - tet[i].offsetTop;
582
+          this.isdow=true
583
+          document.onmousemove = (el) =>{
584
+          if(this.isdow==false){
585
+            return
586
+          }
587
+            let moveX = el.clientX - this.disX;
588
+            let moveY = el.clientY - this.disY;
589
+            tet[i].style.left = moveX + "px";
590
+            tet[i].style.top = moveY + "px";
591
+            for(let i=0;i<textlen.length;i++){
592
+              // const textsle=e.target.innerText.split('\n')[0]
593
+              if(textlen[i].text == textsle){
594
+                console.log('3333');
595
+                textlen[i].left=moveX
596
+                textlen[i].top=moveY
597
+              }
598
+            }
599
+            console.log('2222222',tet[i].style.left);
600
+          }
601
+          document.onmouseup = () => {
602
+            document.onmousemove = null;
603
+          };
604
+        }
605
+      }
606
+    },
607
+    fuzhuA_down(e){
608
+      const fuzhuA= document.getElementById('jinzhen-jiaodu-target-A')
609
+      const fuzhua_x =e.clientX - fuzhuA.offsetLeft
610
+      const fuzhua_y =e.clientY - fuzhuA.offsetTop
611
+      const fuzhu_A =true
612
+      var FZ_alen=this.fuzhuA
613
+      
614
+      document.onmousemove=(el)=>{
615
+        if(fuzhu_A==false){
616
+          return ''
617
+        }
618
+        const moveX = el.clientX - fuzhua_x;
619
+        const moveY = el.clientY - fuzhua_y;
620
+        fuzhuA.style.left = moveX + "px";
621
+        fuzhuA.style.top = moveY + "px";
622
+        for(let i=0;i<FZ_alen.length;i++){
623
+          if(e.target.id=='jinzhen-jiaodu-target-A'){
624
+            FZ_alen[i].a_left=moveX
625
+            FZ_alen[i].a_top=moveY
626
+          }
627
+        }
628
+      }
629
+      document.onmouseup =() =>{
630
+        document.onmousemove =null
631
+      }
632
+    },
633
+    fuzhuV_down(e){
634
+      const fuzhuV= document.getElementById('jinzhen-jiaodu-target-V')
635
+      const fuzhuv_x =e.clientX - fuzhuV.offsetLeft
636
+      const fuzhuv_y =e.clientY - fuzhuV.offsetTop
637
+      const fuzhu_V =true
638
+      var FZ_vlen=this.fuzhuV
639
+      document.onmousemove=(el)=>{
640
+        if(fuzhu_V==false){
641
+          return ''
642
+        }
643
+        const moveX = el.clientX - fuzhuv_x;
644
+        const moveY = el.clientY - fuzhuv_y;
645
+        fuzhuV.style.left = moveX + "px";
646
+        fuzhuV.style.top = moveY + "px";
647
+        for(let i=0;i<FZ_vlen.length;i++){
648
+          if(e.target.id=='jinzhen-jiaodu-target-V'){
649
+            FZ_vlen[i].v_left=moveX
650
+            FZ_vlen[i].v_top=moveY
651
+          }
652
+        }
653
+      }
654
+      document.onmouseup =() =>{
655
+        document.onmousemove =null
656
+      }
657
+    },
546 658
     punctureclick(e,val){
547 659
       console.log('event',e,'value',val);
548 660
       const text=e.target
@@ -558,6 +670,7 @@ export default{
558 670
        obj.width=e.target.offsetWidth
559 671
         this.text_arr.push(obj)
560 672
       }
673
+      
561 674
       console.log('this.text_arr',this.text_arr);
562 675
     },
563 676
     input_deldte(e,val){
@@ -1055,31 +1168,12 @@ export default{
1055 1168
       return new Blob([u8arr], { type: mime });
1056 1169
     }
1057 1170
   },
1058
-  created(){
1059
-    // console.log('chu','chu',);
1060
-    const id = this.$route.params && this.$route.params.id;
1061
-    this.patientID = parseInt(id);
1062
-
1063
-    // this.getPatientSitemap(this.patientID)
1064
-    // if(this.fuzhuV_num ==1 || this.append ==false){
1065
-    //   return this.xuanzhuan =0
1066
-    // }
1067
-  },
1068 1171
   computed:{
1069 1172
     // editor() {
1070 1173
     //   return this.$refs.myQuillEditor.quill;
1071 1174
     // }
1072 1175
   },
1073
-  mounted(){
1074
-    // console.log('valuse',this.fangxiangA,);
1075
-    // this.editor = new Quill(this.$refs.imageWrapper, {
1076
-    //   modules:{toolbar:false},
1077
-    //   theme: 'snow',
1078
-    // });
1079
-  //  console.log('111111',this.fileList);
1080
-    // this.$refs.text_cc.addEventListener('mousemove',this.A_mousedow)
1081
-    // this.$refs.text_cc.addEventListener('mousemove',this.A_moouseup)
1082
-  }
1176
+  
1083 1177
 
1084 1178
 }
1085 1179
 </script>
@@ -1198,7 +1292,7 @@ export default{
1198 1292
     user-select: none;
1199 1293
     -webkit-user-select: none;
1200 1294
     // position: relative;
1201
-    position: absolute;
1295
+    // position: absolute;
1202 1296
     display: block;
1203 1297
     left: 0;
1204 1298
     top: 0;
@@ -1207,7 +1301,7 @@ export default{
1207 1301
     // background-image: url('../../assets/evaluate/tool-a.png');
1208 1302
   }
1209 1303
   div.frame-image {
1210
-    position: absolute;
1304
+    // position: absolute;
1211 1305
     overflow: hidden;
1212 1306
     top: 0px;
1213 1307
     left: 5px;
@@ -1274,7 +1368,6 @@ export default{
1274 1368
 .frame-box .drag-elem.bottom {
1275 1369
     top: calc(100% + 6px);
1276 1370
 }
1277
-
1278 1371
 .frame-box .drag-elem {
1279 1372
     width: 10px;
1280 1373
     height: 10px;
@@ -1304,29 +1397,34 @@ div.add-mark-text-wrap {
1304 1397
   line-height: 24px;
1305 1398
   z-index: 1005;
1306 1399
   display: inline-block;
1307
-
1400
+  .el-input {
1401
+    /* position: relative; */
1402
+    font-size: 14px;
1403
+    display: inline-block;
1404
+    width: 100%;
1405
+  }
1308 1406
 }
1309 1407
 div.add-mark-text-wrap input.mark-text-ipt {
1310 1408
     cursor: default;
1311 1409
 }
1312
-div.add-mark-text-wrap input {
1313
-    width: 100px;
1314
-    width: 60px;
1315
-    max-width: 400px;
1316
-    border: 1px solid transparent;
1317
-    padding: 4px;
1318
-    color: #333;
1319
-    height: 24px;
1320
-    cursor: pointer;
1321
-    background-color: #fcfcfc;
1322
-    position: absolute;
1323
-    left: 0;
1324
-    top: 0;
1325
-    font-size: 13px;
1326
-    z-index: 1002;
1327
-    border-radius: 2px !important;
1328
-    outline: none;
1329
-}
1410
+// div.add-mark-text-wrap input {
1411
+//     width: 100px;
1412
+//     width: 60px;
1413
+//     max-width: 400px;
1414
+//     border: 1px solid transparent;
1415
+//     padding: 4px;
1416
+//     color: #333;
1417
+//     height: 24px;
1418
+//     cursor: pointer;
1419
+//     background-color: #fcfcfc;
1420
+//     // position: absolute;
1421
+//     // left: 0;
1422
+//     // top: 0;
1423
+//     font-size: 13px;
1424
+//     z-index: 1002;
1425
+//     border-radius: 2px !important;
1426
+//     outline: none;
1427
+// }
1330 1428
 input, button, textarea, select, optgroup, option {
1331 1429
     font-family: inherit;
1332 1430
     font-size: inherit;

+ 1 - 1
src/xt_pages/user/vascularAccess.vue Dosyayı Görüntüle

@@ -459,7 +459,7 @@
459 459
         <el-button type="primary" @click="updatedVasularAccess('form')">保存</el-button>
460 460
      </span>
461 461
      </el-dialog>
462
-     <!-- <sitemap> </sitemap> -->
462
+     <sitemap> </sitemap>
463 463
     </div>
464 464
 
465 465
      <multi-select-box