|
@@ -18,8 +18,8 @@
|
18
|
18
|
</div>
|
19
|
19
|
</div>
|
20
|
20
|
<div style="margin-top:6px;display:flex;flex-wrap: wrap;position:relative;min-height:480px;">
|
21
|
|
- <div style="width:47%;border:1px solid #ddd;padding: 5px;" id="print_mark_img" ref="imageWrapper">
|
22
|
|
- <div id="point_mark_img_wrap1" class="print_main_content" style="width: 100%;padding: 0;border: 0;" >
|
|
21
|
+ <div style="width:47%;border:1px solid #ddd;padding: 5px;" id="print_mark_img" >
|
|
22
|
+ <div id="point_mark_img_wrap1" class="print_main_content" style="width: 100%;padding: 0;border: 0;" ref="imageWrapper">
|
23
|
23
|
|
24
|
24
|
<img v-if="fileList.length==0" id="ossPointMarkImg" src="@/assets/evaluate/xgtl_default.png" alt="" srcset="">
|
25
|
25
|
<img v-if="fileList.length>0" id="ossPointMarkImg" :src="fileList[0].img_url" alt="" srcset="">
|
|
@@ -65,9 +65,11 @@
|
65
|
65
|
>
|
66
|
66
|
<!-- <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+'%' -->
|
67
|
67
|
<!-- {{ item }} @mousedown.self="A_mousedow($event)" @mouseup.self="A_moouseup($event)"-->
|
68
|
|
- <!-- <el-input v-model="item.text" size="mini" :style="{width:item.width+'px', border: 1+'px solid transparent', cursor: 'default'}"></el-input> -->
|
69
|
|
- <input id="inpu" type="text" v-bind:value="item.text" data-width="82" :style="{width:item.width+'px', border: 1+'px solid transparent', cursor: 'default',outline: 'none'}" class="mark-text-ipt">
|
70
|
|
- <!-- </div> -->
|
|
68
|
+ <!-- <el-input v-model:value="item.text" size="mini" :style="{width:item.width+'px', border: 1+'px solid transparent', cursor: 'default'}"></el-input> -->
|
|
69
|
+ <!-- <input id="inpu" type="text" :value="item.text" data-width="82" :style="{width:item.width+'px', border: 1+'px solid transparent', cursor: 'default',outline: 'none'}" class="mark-text-ipt"> -->
|
|
70
|
+ <input id="inpu" type="text" v-model="item.text" data-width="82" :style="{width:item.width+'px', border: 1+'px solid transparent', cursor: 'default',outline: 'none'}" class="mark-text-ipt">
|
|
71
|
+ <!-- <input v-if="value!=''" id="inpu" type="text" v-model="value" data-width="82" :style="{width:item.width+'px', border: 1+'px solid transparent', cursor: 'default',outline: 'none'}" class="mark-text-ipt"> -->
|
|
72
|
+ <!-- </div> -->
|
71
|
73
|
<span class="remove-mark-text" @click="input_deldte($event,item)">×</span>
|
72
|
74
|
<span class="mark-text-line" style="transform: rotate(45deg);" data-rotate="45"></span>
|
73
|
75
|
</div>
|
|
@@ -239,6 +241,18 @@
|
239
|
241
|
<el-button type="primary" @click="centerDialogVisible = false">确 定</el-button>
|
240
|
242
|
</span> -->
|
241
|
243
|
</el-dialog>
|
|
244
|
+ <!-- 打印 -->
|
|
245
|
+ <el-dialog
|
|
246
|
+ title="打印"
|
|
247
|
+ :visible.sync="dayinDialogVisible"
|
|
248
|
+ width="30%"
|
|
249
|
+ center>
|
|
250
|
+ <span></span>
|
|
251
|
+ <span slot="footer" class="dialog-footer">
|
|
252
|
+ <el-button @click="dayinDialogVisible = false">取 消</el-button>
|
|
253
|
+ <el-button type="primary" @click="dayinDialogVisible = false">确 定</el-button>
|
|
254
|
+ </span>
|
|
255
|
+ </el-dialog>
|
242
|
256
|
</div>
|
243
|
257
|
</template>
|
244
|
258
|
<script>
|
|
@@ -246,6 +260,7 @@ import print from "print-js";
|
246
|
260
|
import { getFileExtension} from '@/utils/tools'
|
247
|
261
|
import { saveSitemap,getPatientSitemap,updateSiteMap } from "@/api/patient";
|
248
|
262
|
import { getToken } from '@/api/qiniu'
|
|
263
|
+// import html2canvas from "html2canvas"
|
249
|
264
|
export default{
|
250
|
265
|
components:{
|
251
|
266
|
// quillEditor
|
|
@@ -337,6 +352,7 @@ export default{
|
337
|
352
|
id:0,
|
338
|
353
|
texts:null,
|
339
|
354
|
value:'',
|
|
355
|
+ imgUrls:'',
|
340
|
356
|
}
|
341
|
357
|
},
|
342
|
358
|
created(){
|
|
@@ -346,7 +362,7 @@ export default{
|
346
|
362
|
// this.getPatientSitemap(this.patientID)
|
347
|
363
|
},
|
348
|
364
|
mounted(){
|
349
|
|
- console.log('asdfdfgfd',this.fangxiangA);
|
|
365
|
+ console.log('asdfdfgfd',this.value);
|
350
|
366
|
},
|
351
|
367
|
methods:{
|
352
|
368
|
add(){
|
|
@@ -517,7 +533,7 @@ export default{
|
517
|
533
|
mousedown(e){
|
518
|
534
|
const tet=document.getElementsByClassName('text')
|
519
|
535
|
var textlen=this.text_arr
|
520
|
|
- console.log('ZXCBVCB',textlen,e.target.value);
|
|
536
|
+ console.log('ZXCBVCB',textlen,'33333',this.value);
|
521
|
537
|
const even= e.target.value
|
522
|
538
|
// console.log('zxcvbnvxcz',even);
|
523
|
539
|
for(let i=0;i<tet.length;i++){
|
|
@@ -551,7 +567,6 @@ export default{
|
551
|
567
|
}
|
552
|
568
|
}
|
553
|
569
|
},
|
554
|
|
-
|
555
|
570
|
fuzhuA_down(e){
|
556
|
571
|
const fuzhuA= document.getElementById('jinzhen-jiaodu-target-A')
|
557
|
572
|
const fuzhua_x =e.clientX - fuzhuA.offsetLeft
|
|
@@ -604,7 +619,7 @@ export default{
|
604
|
619
|
}
|
605
|
620
|
},
|
606
|
621
|
punctureclick(e,val){
|
607
|
|
- console.log('event',e,'value',val);
|
|
622
|
+ console.log('event',e,'value',this.value);
|
608
|
623
|
const text=e.target
|
609
|
624
|
const textlen=this.text_arr.length
|
610
|
625
|
|
|
@@ -724,18 +739,23 @@ export default{
|
724
|
739
|
}
|
725
|
740
|
},
|
726
|
741
|
printtup(){
|
727
|
|
- const style='@media print{.print_main_content{#ossPointMarkImg {width: 520px;min-height: 600px;height: auto;border-radius: 2px;pointer-events: none;} #point_mark_img_wrap1 {-webkit-user-select: none;-moz-user-select: none;-ms-user-select: none;user-select: none;position: relative;padding: 4px;width: 600px;background-color: #fff;border: 1px solid #ddd;border-radius: 4px;} .mark-target-a{background: #E73535;top: 40px; left: 40px;} .mark-line{background: #E73535;} .mark-target-v{background: rgb(53,162,231);.mark-line{background: #35A2E7;}} .mark-target-a,.mark-target-v {position: absolute;z-index: 1001;width: 26px;border-radius: 13px;height: 26px;text-align: center;line-height: 26px;font-size: 18px;cursor: move;color: rgb(255,255,255);.mark-line {transform: rotate(160deg);transform-origin: left bottom;}.mark-line {display: inline-block;position: absolute;left: 50%;top: 50%;width: 86px;height: 1px;cursor: default;z-index: -1;} div.add-mark-text-wrap {position: absolute;top: 36%;left: 48%;border-radius: 4px;width: 60px;height: 24px;line-height: 24px;z-index: 1005;display: inline-block;} .remove-mark-text{overflow: hidden;} b.xtgl-ccz-arrow-a {border-left-color: #E73535;border-top-color: #E73535;} b.xtgl-ccz-arrow-v {border-left-color: #35a2e7;border-top-color: #35a2e7;} b.xtgl-ccz-arrow {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);} b.xtgl-ccz-arrow-v {border-left-color: #35a2e7;border-top-color: #35a2e7;}div.frame-image {position: absolute;overflow: hidden;top: 0px;left: 0px;width: 100%;height: 100%;background-image: url('+'../../assets/evaluate/tool-a.png'+');background-position: center center;background-size: 100%; background-repeat: no-repeat;}}}'
|
728
|
|
- // const style='@media print{.print_main_content{#ossPointMarkImg {width: 100%;min-height: 600px;height: auto;border-radius: 2px;pointer-events: none;} #point_mark_img_wrap1 {-webkit-user-select: none;-moz-user-select: none;-ms-user-select: none;user-select: none;position: relative;padding: 4px;width: 600px;background-color: #fff;border: 1px solid #ddd;border-radius: 4px;} b.xtgl-ccz-arrow-a {border-left-color: #E73535;border-top-color: #E73535;}
|
729
|
|
- // b.xtgl-ccz-arrow {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);} b.xtgl-ccz-arrow-v {border-left-color: #35a2e7;border-top-color: #35a2e7;}
|
730
|
|
- // .mark-target-a{background: #E73535;top: 40px;left: 40px;} .mark-line{background: #E73535;}}}'
|
731
|
|
- // const style='@media print{.print_main_content{#ossPointMarkImg {width: 100%;min-height: 600px;height: auto;border-radius: 2px;pointer-events: none;} #point_mark_img_wrap1 {-webkit-user-select: none;-moz-user-select: none;-ms-user-select: none;user-select: none;position: relative;padding: 4px;width: 600px;background-color: #fff;border: 1px solid #ddd;border-radius: 4px;} .mark-target-a{background: #E73535;top: 40px; left: 40px;} .mark-line{background: #E73535;} .mark-target-v{background: rgb(53,162,231);.mark-line{background: #35A2E7;}} .mark-target-a,.mark-target-v {position: absolute;z-index: 1001;width: 26px;border-radius: 13px;height: 26px;text-align: center;line-height: 26px;font-size: 18px;cursor: move;color: rgb(255,255,255);.mark-line {transform: rotate(160deg);transform-origin: left bottom;}.mark-line {display: inline-block;position: absolute;left: 50%;top: 50%;width: 86px;height: 1px;cursor: default;z-index: -1;} div.add-mark-text-wrap {position: absolute;top: 36%;left: 48%;border-radius: 4px;width: 60px;height: 24px;line-height: 24px;z-index: 1005;display: inline-block;} input {width: 100px;width: 60px;max-width: 400px;border: 1px solid transparent;padding: 4px;color: #333;height: 24px;cursor: pointer;background-color: #fcfcfc;position: absolute;left: 0;top: 0;font-size: 13px;z-index: 1002;border-radius: 2px !important;outline: none;}.mark-text-ipt {cursor: default;}}}}'
|
732
|
|
-
|
733
|
|
- printJS({
|
734
|
|
- printable: "print_mark_img",
|
735
|
|
- type: "html",
|
736
|
|
- style: style,
|
737
|
|
- scanStyles: false
|
|
742
|
+ html2canvas(this.$refs.imageWrapper,{backgroundColor: null}).then(canvas => {
|
|
743
|
+ // 转成图片,生成图片地址
|
|
744
|
+ this.imgUrls = canvas.toDataURL("image/png");
|
|
745
|
+ console.log('123424534',this.imgUrls)
|
738
|
746
|
});
|
|
747
|
+ // const style='@media print{.print_main_content{#ossPointMarkImg {width: 520px;min-height: 600px;height: auto;border-radius: 2px;pointer-events: none;} #point_mark_img_wrap1 {-webkit-user-select: none;-moz-user-select: none;-ms-user-select: none;user-select: none;position: relative;padding: 4px;width: 600px;background-color: #fff;border: 1px solid #ddd;border-radius: 4px;} .mark-target-a{background: #E73535;top: 40px; left: 40px;} .mark-line{background: #E73535;} .mark-target-v{background: rgb(53,162,231);.mark-line{background: #35A2E7;}} .mark-target-a,.mark-target-v {position: absolute;z-index: 1001;width: 26px;border-radius: 13px;height: 26px;text-align: center;line-height: 26px;font-size: 18px;cursor: move;color: rgb(255,255,255);.mark-line {transform: rotate(160deg);transform-origin: left bottom;}.mark-line {display: inline-block;position: absolute;left: 50%;top: 50%;width: 86px;height: 1px;cursor: default;z-index: -1;} div.add-mark-text-wrap {position: absolute;top: 36%;left: 48%;border-radius: 4px;width: 60px;height: 24px;line-height: 24px;z-index: 1005;display: inline-block;} .remove-mark-text{overflow: hidden;} b.xtgl-ccz-arrow-a {border-left-color: #E73535;border-top-color: #E73535;} b.xtgl-ccz-arrow-v {border-left-color: #35a2e7;border-top-color: #35a2e7;} b.xtgl-ccz-arrow {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);} b.xtgl-ccz-arrow-v {border-left-color: #35a2e7;border-top-color: #35a2e7;}div.frame-image {position: absolute;overflow: hidden;top: 0px;left: 0px;width: 100%;height: 100%;background-image: url('+'../../assets/evaluate/tool-a.png'+');background-position: center center;background-size: 100%; background-repeat: no-repeat;}}}'
|
|
748
|
+ // // const style='@media print{.print_main_content{#ossPointMarkImg {width: 100%;min-height: 600px;height: auto;border-radius: 2px;pointer-events: none;} #point_mark_img_wrap1 {-webkit-user-select: none;-moz-user-select: none;-ms-user-select: none;user-select: none;position: relative;padding: 4px;width: 600px;background-color: #fff;border: 1px solid #ddd;border-radius: 4px;} b.xtgl-ccz-arrow-a {border-left-color: #E73535;border-top-color: #E73535;}
|
|
749
|
+ // // b.xtgl-ccz-arrow {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);} b.xtgl-ccz-arrow-v {border-left-color: #35a2e7;border-top-color: #35a2e7;}
|
|
750
|
+ // // .mark-target-a{background: #E73535;top: 40px;left: 40px;} .mark-line{background: #E73535;}}}'
|
|
751
|
+ // // const style='@media print{.print_main_content{#ossPointMarkImg {width: 100%;min-height: 600px;height: auto;border-radius: 2px;pointer-events: none;} #point_mark_img_wrap1 {-webkit-user-select: none;-moz-user-select: none;-ms-user-select: none;user-select: none;position: relative;padding: 4px;width: 600px;background-color: #fff;border: 1px solid #ddd;border-radius: 4px;} .mark-target-a{background: #E73535;top: 40px; left: 40px;} .mark-line{background: #E73535;} .mark-target-v{background: rgb(53,162,231);.mark-line{background: #35A2E7;}} .mark-target-a,.mark-target-v {position: absolute;z-index: 1001;width: 26px;border-radius: 13px;height: 26px;text-align: center;line-height: 26px;font-size: 18px;cursor: move;color: rgb(255,255,255);.mark-line {transform: rotate(160deg);transform-origin: left bottom;}.mark-line {display: inline-block;position: absolute;left: 50%;top: 50%;width: 86px;height: 1px;cursor: default;z-index: -1;} div.add-mark-text-wrap {position: absolute;top: 36%;left: 48%;border-radius: 4px;width: 60px;height: 24px;line-height: 24px;z-index: 1005;display: inline-block;} input {width: 100px;width: 60px;max-width: 400px;border: 1px solid transparent;padding: 4px;color: #333;height: 24px;cursor: pointer;background-color: #fcfcfc;position: absolute;left: 0;top: 0;font-size: 13px;z-index: 1002;border-radius: 2px !important;outline: none;}.mark-text-ipt {cursor: default;}}}}'
|
|
752
|
+
|
|
753
|
+ // printJS({
|
|
754
|
+ // printable: "print_mark_img",
|
|
755
|
+ // type: "html",
|
|
756
|
+ // style: style,
|
|
757
|
+ // scanStyles: false
|
|
758
|
+ // });
|
739
|
759
|
|
740
|
760
|
},
|
741
|
761
|
imgv_click(){
|
|
@@ -1423,34 +1443,34 @@ div.add-mark-text-wrap {
|
1423
|
1443
|
line-height: 24px;
|
1424
|
1444
|
z-index: 1005;
|
1425
|
1445
|
display: inline-block;
|
1426
|
|
- .el-input {
|
1427
|
|
- /* position: relative; */
|
1428
|
|
- font-size: 14px;
|
1429
|
|
- display: inline-block;
|
1430
|
|
- width: 100%;
|
1431
|
|
- }
|
|
1446
|
+ // .el-input {
|
|
1447
|
+ // /* position: relative; */
|
|
1448
|
+ // font-size: 14px;
|
|
1449
|
+ // display: inline-block;
|
|
1450
|
+ // width: 100%;
|
|
1451
|
+ // }
|
|
1452
|
+ .input{
|
|
1453
|
+ width: 224px;
|
|
1454
|
+ height: 40px;
|
|
1455
|
+ line-height: 40px;
|
|
1456
|
+ background: #F3F6FB;
|
|
1457
|
+ border-radius: 4px;
|
|
1458
|
+ padding:0 12px;
|
|
1459
|
+ margin-right: 20px;
|
|
1460
|
+}
|
|
1461
|
+.input ::v-deep .el-input__inner {
|
|
1462
|
+ width: 100%;
|
|
1463
|
+ border: none;
|
|
1464
|
+ outline: none;
|
|
1465
|
+ font-size: 14px;
|
|
1466
|
+ background: #F3F6FB;
|
|
1467
|
+}
|
|
1468
|
+
|
1432
|
1469
|
}
|
1433
|
1470
|
div.add-mark-text-wrap input.mark-text-ipt {
|
1434
|
1471
|
cursor: default;
|
1435
|
1472
|
}
|
1436
|
|
-// div.add-mark-text-wrap input {
|
1437
|
|
-// width: 100px;
|
1438
|
|
-// width: 60px;
|
1439
|
|
-// max-width: 400px;
|
1440
|
|
-// border: 1px solid transparent;
|
1441
|
|
-// padding: 4px;
|
1442
|
|
-// color: #333;
|
1443
|
|
-// height: 24px;
|
1444
|
|
-// cursor: pointer;
|
1445
|
|
-// background-color: #fcfcfc;
|
1446
|
|
-// // position: absolute;
|
1447
|
|
-// // left: 0;
|
1448
|
|
-// // top: 0;
|
1449
|
|
-// font-size: 13px;
|
1450
|
|
-// z-index: 1002;
|
1451
|
|
-// border-radius: 2px !important;
|
1452
|
|
-// outline: none;
|
1453
|
|
-// }
|
|
1473
|
+
|
1454
|
1474
|
input, button, textarea, select, optgroup, option {
|
1455
|
1475
|
font-family: inherit;
|
1456
|
1476
|
font-size: inherit;
|