Sfoglia il codice sorgente

Merge branch '20230223_pc_vue_new_branch' of http://git.shengws.com/csx/Vue_New into 20230223_pc_vue_new_branch

28169 4 giorni fa
parent
commit
2a3ed0fe01
100 ha cambiato i file con 11212 aggiunte e 3575 eliminazioni
  1. 0 2640
      .idea/shelf/Uncommitted_changes_before_Update_at_2023_4_26_15_16_[Changes]/shelved.patch
  2. 0 131
      .idea/shelf/Uncommitted_changes_before_Update_at_2023_6_30_17_15_[Changes]/shelved.patch
  3. 76 0
      src/components/Uedtior/index.vue
  4. 11 1
      src/main.js
  5. 24 22
      src/xt_pages/Pharmacy/PatientDispensing.vue
  6. 21 20
      src/xt_pages/dialysis/batch_print/batch_print_order_seventyeight.vue
  7. 12 0
      src/xt_pages/dialysis/batch_print/batch_print_order_six.vue
  8. 93 96
      src/xt_pages/dialysis/batch_print/batch_print_order_sixtyTwo.vue
  9. 28 20
      src/xt_pages/dialysis/template/DialysisPrintOrderSeventyeight.vue
  10. 13 2
      src/xt_pages/dialysis/template/DialysisPrintOrderSix.vue
  11. 50 61
      src/xt_pages/dialysis/template/DialysisPrintOrderSixtyTwo.vue
  12. 47 48
      src/xt_pages/dialysis/template/DialysisPrintOrdereighty.vue
  13. 1 42
      src/xt_pages/dialysis/template/DialysisPrintOrdereightyone.vue
  14. 1 1
      src/xt_pages/eleFaPiao/patientSettleDetail.vue
  15. 628 0
      src/xt_pages/outpatientDoctorStation/checkTemplate/printfive.vue
  16. 1 13
      src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue
  17. 1 1
      src/xt_pages/outpatientDoctorStation/template/printOne.vue
  18. 165 79
      src/xt_pages/user/Informed/Informedconsent.vue
  19. 13 5
      src/xt_pages/user/Informed/components/Bring_informed.vue
  20. 256 0
      src/xt_pages/user/Informed/components/CRRT_informed.vue
  21. 13 12
      src/xt_pages/user/Informed/components/Falloutbedprint.vue
  22. 15 6
      src/xt_pages/user/Informed/components/Filter_informed.vue
  23. 17 14
      src/xt_pages/user/Informed/components/Highrisk_informed.vue
  24. 18 10
      src/xt_pages/user/Informed/components/Medicalhistory.vue
  25. 263 0
      src/xt_pages/user/Informed/components/Terminate_informed.vue
  26. 72 65
      src/xt_pages/user/Informed/components/anticoagulation_informed.vue
  27. 14 5
      src/xt_pages/user/Informed/components/arteriovenous_informed.vue
  28. 13 4
      src/xt_pages/user/Informed/components/catheterization_informed.vue
  29. 4 1
      src/xt_pages/user/Informed/components/critical_informed.vue
  30. 10 2
      src/xt_pages/user/Informed/components/criticalpatient_informed2.vue
  31. 12 3
      src/xt_pages/user/Informed/components/heal_informed.vue
  32. 11 2
      src/xt_pages/user/Informed/components/hemoperfusion_informed.vue
  33. 311 0
      src/xt_pages/user/Informed/components/nonheparin_informed.vue
  34. 12 4
      src/xt_pages/user/Informed/components/profunda_informed.vue
  35. 18 9
      src/xt_pages/user/Informed/components/therapy_informed.vue
  36. 37 19
      src/xt_pages/user/Physicalexamination.vue
  37. 4249 0
      src/xt_pages/user/Physicalexamination_new.vue
  38. 25 25
      src/xt_pages/user/components/PatientDetail.vue
  39. 0 209
      src/xt_pages/user/components/PatientSidebar.1.vue
  40. 7 0
      src/xt_pages/user/components/PatientSidebar.vue
  41. 623 0
      src/xt_pages/user/components/PatientSidebar_new.vue
  42. 8 3
      src/xt_pages/user/patientInfo.vue
  43. 748 0
      src/xt_pages/user/sickHistory_new.vue
  44. 40 0
      static/ueditor/dialogs/anchor/anchor.html
  45. 681 0
      static/ueditor/dialogs/attachment/attachment.css
  46. 60 0
      static/ueditor/dialogs/attachment/attachment.html
  47. 754 0
      static/ueditor/dialogs/attachment/attachment.js
  48. BIN
      static/ueditor/dialogs/attachment/fileTypeImages/icon_chm.gif
  49. BIN
      static/ueditor/dialogs/attachment/fileTypeImages/icon_default.png
  50. BIN
      static/ueditor/dialogs/attachment/fileTypeImages/icon_doc.gif
  51. BIN
      static/ueditor/dialogs/attachment/fileTypeImages/icon_exe.gif
  52. BIN
      static/ueditor/dialogs/attachment/fileTypeImages/icon_jpg.gif
  53. BIN
      static/ueditor/dialogs/attachment/fileTypeImages/icon_mp3.gif
  54. BIN
      static/ueditor/dialogs/attachment/fileTypeImages/icon_mv.gif
  55. BIN
      static/ueditor/dialogs/attachment/fileTypeImages/icon_pdf.gif
  56. BIN
      static/ueditor/dialogs/attachment/fileTypeImages/icon_ppt.gif
  57. BIN
      static/ueditor/dialogs/attachment/fileTypeImages/icon_psd.gif
  58. BIN
      static/ueditor/dialogs/attachment/fileTypeImages/icon_rar.gif
  59. BIN
      static/ueditor/dialogs/attachment/fileTypeImages/icon_txt.gif
  60. BIN
      static/ueditor/dialogs/attachment/fileTypeImages/icon_xls.gif
  61. BIN
      static/ueditor/dialogs/attachment/images/alignicon.gif
  62. BIN
      static/ueditor/dialogs/attachment/images/alignicon.png
  63. BIN
      static/ueditor/dialogs/attachment/images/bg.png
  64. BIN
      static/ueditor/dialogs/attachment/images/file-icons.gif
  65. BIN
      static/ueditor/dialogs/attachment/images/file-icons.png
  66. BIN
      static/ueditor/dialogs/attachment/images/icons.gif
  67. BIN
      static/ueditor/dialogs/attachment/images/icons.png
  68. BIN
      static/ueditor/dialogs/attachment/images/image.png
  69. BIN
      static/ueditor/dialogs/attachment/images/progress.png
  70. BIN
      static/ueditor/dialogs/attachment/images/success.gif
  71. BIN
      static/ueditor/dialogs/attachment/images/success.png
  72. 94 0
      static/ueditor/dialogs/background/background.css
  73. 56 0
      static/ueditor/dialogs/background/background.html
  74. 376 0
      static/ueditor/dialogs/background/background.js
  75. BIN
      static/ueditor/dialogs/background/images/bg.png
  76. BIN
      static/ueditor/dialogs/background/images/success.png
  77. 65 0
      static/ueditor/dialogs/charts/chart.config.js
  78. 165 0
      static/ueditor/dialogs/charts/charts.css
  79. 89 0
      static/ueditor/dialogs/charts/charts.html
  80. 519 0
      static/ueditor/dialogs/charts/charts.js
  81. BIN
      static/ueditor/dialogs/charts/images/charts0.png
  82. BIN
      static/ueditor/dialogs/charts/images/charts1.png
  83. BIN
      static/ueditor/dialogs/charts/images/charts2.png
  84. BIN
      static/ueditor/dialogs/charts/images/charts3.png
  85. BIN
      static/ueditor/dialogs/charts/images/charts4.png
  86. BIN
      static/ueditor/dialogs/charts/images/charts5.png
  87. 43 0
      static/ueditor/dialogs/emotion/emotion.css
  88. 54 0
      static/ueditor/dialogs/emotion/emotion.html
  89. 186 0
      static/ueditor/dialogs/emotion/emotion.js
  90. BIN
      static/ueditor/dialogs/emotion/images/0.gif
  91. BIN
      static/ueditor/dialogs/emotion/images/bface.gif
  92. BIN
      static/ueditor/dialogs/emotion/images/cface.gif
  93. BIN
      static/ueditor/dialogs/emotion/images/fface.gif
  94. BIN
      static/ueditor/dialogs/emotion/images/jxface2.gif
  95. BIN
      static/ueditor/dialogs/emotion/images/neweditor-tab-bg.png
  96. BIN
      static/ueditor/dialogs/emotion/images/tface.gif
  97. BIN
      static/ueditor/dialogs/emotion/images/wface.gif
  98. BIN
      static/ueditor/dialogs/emotion/images/yface.gif
  99. 89 0
      static/ueditor/dialogs/gmap/gmap.html
  100. 0 0
      static/ueditor/dialogs/help/help.css

File diff suppressed because it is too large
+ 0 - 2640
.idea/shelf/Uncommitted_changes_before_Update_at_2023_4_26_15_16_[Changes]/shelved.patch


File diff suppressed because it is too large
+ 0 - 131
.idea/shelf/Uncommitted_changes_before_Update_at_2023_6_30_17_15_[Changes]/shelved.patch


+ 76 - 0
src/components/Uedtior/index.vue Vedi File

@@ -0,0 +1,76 @@
1
+<template>
2
+  <div>
3
+      <vue-ueditor-wrap v-model="contents"  :config="myConfig" ></vue-ueditor-wrap>
4
+  </div>
5
+</template>
6
+
7
+<script>
8
+import VueUeditorWrap from 'vue-ueditor-wrap';
9
+export default {
10
+  name: 'ueditor',
11
+  components:{
12
+    VueUeditorWrap
13
+  },
14
+  props: {
15
+    content: '',
16
+    // new_content:'',
17
+  },
18
+  data () {
19
+    return {
20
+      contents: this.content,
21
+      myConfig: {
22
+        autoHeightEnabled: false, // 编辑器不自动被内容撑高
23
+        initialFrameHeight: 540, // 初始容器高度
24
+        initialFrameWidth: '100%', // 初始容器宽度
25
+        UEDITOR_HOME_URL: '/static/ueditor/',
26
+        // 上传文件接口(这个地址是我为了方便各位体验文件上传功能搭建的临时接口,请勿在生产环境使用!!!)
27
+        serverUrl: ``,
28
+        toolbars: [
29
+              [
30
+                'undo', //撤销
31
+                'redo',
32
+                'removeformat',//橡皮擦
33
+                'forecolor', 
34
+                'bold', //加粗
35
+                'fontfamily', //字体
36
+                'fontsize', //字号
37
+                'underline', //下划线
38
+                'justifyleft', //居左对齐
39
+                'justifycenter', //居中对齐
40
+                'justifyright', //居右对齐
41
+                'justifyjustify', //两端对齐
42
+                'indent', //首行缩进
43
+                'formatmatch', //格式刷
44
+                'pasteplain',//纯文本粘贴
45
+                'inserttable', 
46
+                'deletetable', 
47
+                'insertparagraphbeforetable',
48
+                'insertrow',
49
+                'deleterow',
50
+                'insertcol', 
51
+                'deletecol', 
52
+                'mergecells', 
53
+                'mergeright', 
54
+                'mergedown', 
55
+                'splittocells', 
56
+                'splittorows', 
57
+                'splittocols',
58
+               
59
+              ]
60
+            ]
61
+
62
+      }
63
+    }
64
+  },
65
+  created(){
66
+    console.log('111111',this.new_content,this.contents);
67
+    
68
+    
69
+  }
70
+}
71
+</script>
72
+
73
+<style scoped>
74
+
75
+</style>
76
+

+ 11 - 1
src/main.js Vedi File

@@ -23,6 +23,13 @@ import './icons' // icon
23 23
 import './errorLog' // error log
24 24
 // import './permission' // permission control
25 25
 import './xt_permission'
26
+// import '@/static/ueditor/ueditor.config.js'
27
+// import '@/static/ueditor/ueditor.all.js'
28
+// import '@/static/ueditor/lang/zh-cn/zh-cn.js'
29
+import '../static/ueditor/ueditor.config.js'
30
+import '../static/ueditor/ueditor.all.min.js'
31
+import '../static/ueditor/lang/zh-cn/zh-cn.js'
32
+import '../static/ueditor/ueditor.parse.min.js'
26 33
 // import './mock' // simulation data
27 34
 import VueClipboard from 'vue-clipboard2'
28 35
 
@@ -46,9 +53,12 @@ import Computed from "../src/xt_pages/components/Computed/index"  //自动计算
46 53
 Vue.component("Computed",Computed)
47 54
 
48 55
 // 表格宽度自适应
49
-import fitcolumn from 'v-fit-columns' 
56
+import fitcolumn from 'v-fit-columns'
50 57
 Vue.use(fitcolumn)
51 58
 
59
+import VueUeditorWrap from 'vue-ueditor-wrap'
60
+Vue.component('vue-ueditor-wrap', VueUeditorWrap)
61
+
52 62
 Vue.use(Element, {
53 63
   size: 'medium', // set element-ui default size
54 64
   i18n: (key, value) => i18n.t(key, value)

+ 24 - 22
src/xt_pages/Pharmacy/PatientDispensing.vue Vedi File

@@ -549,7 +549,7 @@ export default {
549 549
         shift: this.shift,
550 550
         partition: this.partition,
551 551
       };
552
-     
552
+
553 553
       waitingdrug(params).then((res) => {
554 554
         if (res.data.state == 1) {
555 555
           this.waitmount_data=[]
@@ -566,7 +566,7 @@ export default {
566 566
           this.patientList = []
567 567
           this.patientList = res.data.data.patientList
568 568
           var listTwo = res.data.data.listTwo
569
-         
569
+
570 570
           var newArr =[]
571 571
           if(listTwo!=null && listTwo.length>0){
572 572
              for(let i=0;i<listTwo.length;i++){
@@ -579,34 +579,34 @@ export default {
579 579
               newArr.push(listTwo[i])
580 580
              }
581 581
           }
582
-        
582
+
583 583
           if(list!=null && list.length>0){
584 584
             for(let i=0;i<list.length;i++){
585 585
               this.waitmount_data.push(list[i])
586 586
             }
587 587
             if(newArr!=null && newArr.length>0){
588 588
                for(let i=0;i<newArr.length;i++){
589
-                this.waitmount_data.push(newArr[i]) 
589
+                this.waitmount_data.push(newArr[i])
590 590
                }
591 591
             }
592 592
           }
593 593
           if(this.waitmount_data==null){
594 594
             if(newArr!=null && newArr.length>0){
595 595
                for(let i=0;i<newArr.length;i++){
596
-                this.waitmount_data.push(newArr[i]) 
596
+                this.waitmount_data.push(newArr[i])
597 597
                }
598 598
             }
599
-           
599
+
600 600
           }
601 601
           if(list==null){
602 602
             if(newArr!=null && newArr.length>0){
603 603
                for(let i=0;i<newArr.length;i++){
604
-                this.waitmount_data.push(newArr[i]) 
604
+                this.waitmount_data.push(newArr[i])
605 605
                }
606 606
             }
607
-           
607
+
608 608
           }
609
-         
609
+
610 610
         }
611 611
       });
612 612
       issueddrugs(params).then((res) => {
@@ -614,7 +614,7 @@ export default {
614 614
           this.alreadmount_data =[]
615 615
           var list = res.data.data.list;
616 616
           var listTwo =res.data.data.listTwo
617
-          
617
+
618 618
           if (this.shift != 0 || this.partition != 0) {
619 619
             if (list == null) {
620 620
               this.alreadmount = 0;
@@ -635,32 +635,32 @@ export default {
635 635
               newArr.push(listTwo[i])
636 636
              }
637 637
           }
638
-        
638
+
639 639
           if(list!=null && list.length>0){
640 640
             for(let i=0;i<list.length;i++){
641 641
               this.alreadmount_data.push(list[i])
642 642
             }
643 643
             if(newArr!=null && newArr.length>0){
644 644
                for(let i=0;i<newArr.length;i++){
645
-                this.alreadmount_data.push(newArr[i]) 
645
+                this.alreadmount_data.push(newArr[i])
646 646
                }
647 647
             }
648 648
           }
649 649
           if(this.waitmount_data==null){
650 650
             if(newArr!=null && newArr.length>0){
651 651
                for(let i=0;i<newArr.length;i++){
652
-                this.alreadmount_data.push(newArr[i]) 
652
+                this.alreadmount_data.push(newArr[i])
653 653
                }
654 654
             }
655
-           
655
+
656 656
           }
657 657
           if(list==null){
658 658
             if(newArr!=null && newArr.length>0){
659 659
                for(let i=0;i<newArr.length;i++){
660
-                this.alreadmount_data.push(newArr[i]) 
660
+                this.alreadmount_data.push(newArr[i])
661 661
                }
662 662
             }
663
-           
663
+
664 664
           }
665 665
         }
666 666
       });
@@ -699,17 +699,17 @@ export default {
699 699
             }
700 700
             if(newArr!=null && newArr.length>0){
701 701
                for(let i=0;i<newArr.length;i++){
702
-                this.waitmount_data.push(newArr[i]) 
702
+                this.waitmount_data.push(newArr[i])
703 703
                }
704 704
             }
705 705
           }
706 706
           if(list==null){
707 707
             if(newArr!=null && newArr.length>0){
708 708
                for(let i=0;i<newArr.length;i++){
709
-                this.waitmount_data.push(newArr[i]) 
709
+                this.waitmount_data.push(newArr[i])
710 710
                }
711 711
             }
712
-           
712
+
713 713
           }
714 714
 
715 715
           console.log("1111111");
@@ -738,17 +738,17 @@ export default {
738 738
             }
739 739
             if(newArr!=null && newArr.length>0){
740 740
                for(let i=0;i<newArr.length;i++){
741
-                this.alreadmount_data.push(newArr[i]) 
741
+                this.alreadmount_data.push(newArr[i])
742 742
                }
743 743
             }
744 744
           }
745 745
           if(list==null){
746 746
             if(newArr!=null && newArr.length>0){
747 747
                for(let i=0;i<newArr.length;i++){
748
-                this.alreadmount_data.push(newArr[i]) 
748
+                this.alreadmount_data.push(newArr[i])
749 749
                }
750 750
             }
751
-           
751
+
752 752
           }
753 753
 
754 754
           console.log("1111111s");
@@ -823,6 +823,8 @@ export default {
823 823
     },
824 824
     // 跳转打印页面
825 825
     toPrint() {
826
+      console.log('10653',this.tableData);
827
+
826 828
       if (this.tableData == null) {
827 829
         this.$message.error("未选择任何数据");
828 830
         return;

+ 21 - 20
src/xt_pages/dialysis/batch_print/batch_print_order_seventyeight.vue Vedi File

@@ -118,7 +118,7 @@
118 118
               <div
119 119
                 class="under_line"
120 120
                 style="
121
-                  width: 500px;
121
+                  width: 90%;
122 122
                   text-align: left;
123 123
                   word-break: break-all;
124 124
                   word-wrap: break-word;
@@ -648,9 +648,9 @@
648 648
                     </div>
649 649
 
650 650
                     <div class="row" style="padding: 2px 0; line-height: 23px; display: flex">
651
-                      <div class="inline_block" style=" flex: 2">
651
+                      <div class="inline_block" style=" flex: 1">
652 652
                         血管通路:
653
-                        <div class="under_line" style="width: 70%; text-align: center" >
653
+                        <div class="under_line" style="width: 60%; text-align: center" >
654 654
                           {{
655 655
                             record.assessment_before_dislysis &&
656 656
                             record.assessment_before_dislysis.blood_access_part_id
@@ -667,10 +667,7 @@
667 667
                           }}
668 668
                         </div> ml/min
669 669
                       </div>
670
-                    </div>
671
-
672
-                    <div class="row" style="padding: 2px 0; line-height: 23px; display: flex">
673
-                      <div class="inline_block" style="flex: 2">
670
+                      <div class="inline_block" style="flex: 1">
674 671
                        透析器:
675 672
                         <div class="under_line" style="width: 50%; text-align: center">
676 673
                         {{ record.prescription &&
@@ -690,6 +687,19 @@
690 687
                         </div>
691 688
                       </div>
692 689
                       <div class="inline_block" style="flex: 1">
690
+                        机号:
691
+                        <div class="under_line" style="width: 70px; text-align: center">
692
+                          {{record.dialysis_order && record.dialysis_order.device_number &&
693
+                            record.dialysis_order.device_number.number.length >0
694
+                              ? record.dialysis_order.device_number.number : record.device_number.number
695
+                          }}
696
+                        </div>
697
+                        
698
+                      </div>
699
+                    </div>
700
+
701
+                    <div class="row" style="padding: 2px 0; line-height: 23px; display: flex">
702
+                      <!-- <div class="inline_block" style="flex: 1">
693 703
                         膜面积:
694 704
                         <div class="under_line" style="width: 50px; text-align: center">
695 705
                         
@@ -700,23 +710,14 @@
700 710
                         <div class="under_line" style="width: 80px; text-align: center">
701 711
                           
702 712
                         </div>
703
-                      </div>
704
-                      <div class="inline_block" style="flex: 1">
713
+                      </div> -->
714
+                      <!-- <div class="inline_block" style="flex: 1">
705 715
                         透析机型:
706 716
                         <div class="under_line" style="width: 80px; text-align: center">
707 717
                           {{ record.assessment_before_dislysis.machine_type ? record.assessment_before_dislysis.machine_type : '/' }}
708 718
                         </div>
709
-                      </div>
710
-                      <div class="inline_block" style="flex: 1">
711
-                        机号:
712
-                        <div class="under_line" style="width: 70px; text-align: center">
713
-                          {{record.dialysis_order && record.dialysis_order.device_number &&
714
-                            record.dialysis_order.device_number.number.length >0
715
-                              ? record.dialysis_order.device_number.number : record.device_number.number
716
-                          }}
717
-                        </div>
718
-                        
719
-                      </div>
719
+                      </div> -->
720
+                      
720 721
                     </div>
721 722
                     <div class="row" style="padding: 2px 0; line-height: 23px">
722 723
                       <div class="inline_block">

+ 12 - 0
src/xt_pages/dialysis/batch_print/batch_print_order_six.vue Vedi File

@@ -3854,6 +3854,18 @@
3854 3854
                 </tr>
3855 3855
               </tbody>
3856 3856
             </table>
3857
+            <div style="position: relative; left: 70%;top: 20px;">
3858
+              患者签名:
3859
+              <div class="under_line" style="width: 120px;">
3860
+                <img
3861
+                  v-if="record.dialysis_order.url!=''"
3862
+                  style="height: 50px"
3863
+                  :src="record.dialysis_order == null? 0: record.dialysis_order.url"
3864
+                  alt=""
3865
+                  srcset=""
3866
+                />``
3867
+              </div>
3868
+            </div>
3857 3869
           </div>
3858 3870
         </div>
3859 3871
       </div>

+ 93 - 96
src/xt_pages/dialysis/batch_print/batch_print_order_sixtyTwo.vue Vedi File

@@ -213,98 +213,49 @@
213 213
                          showValue="无肝素"
214 214
                          ></label-box>
215 215
                      </span>
216
-                   </td>
217
-                   <td style="text-align: left" colspan="3">
218
-              <span style="display: inline-block; margin-left: 15px">
219
-                <span v-if="record.prescription.anticoagulant == 2">普通肝素首剂:</span>
220
-                <span v-if="record.prescription.anticoagulant == 3"
221
-                  >低分子肝素首剂:</span
222
-                >
223
-                <span v-if="record.prescription.anticoagulant == 4"
224
-                  >阿加曲班肝素首剂:</span
225
-                >
226
-                <span v-if="record.prescription.anticoagulant == 5"
227
-                  >枸橼酸钠肝素首剂:</span
228
-                >
229
-                <span v-if="record.prescription.anticoagulant == 6"
230
-                  >低分子肝素钙首剂:</span
231
-                >
232
-                <span v-if="record.prescription.anticoagulant == 7"
233
-                  >低分子肝素钠首剂:</span
234
-                >
235
-                <span v-if="record.prescription.anticoagulant == 8"
236
-                  >依诺肝素首剂:</span
237
-                >
238
-                <span v-if="record.prescription.anticoagulant == 9">达肝素首剂:</span>
239
-                <span v-if="record.prescription.anticoagulant == 10"
240
-                  >体外抗凝肝素首剂:</span
241
-                >
242
-                <span v-if="record.prescription.anticoagulant == 11"
243
-                  >那屈肝素首剂:</span
244
-                >
245
-                 <span v-if="record.prescription.anticoagulant == 13"
246
-                  >那屈肝素钙首剂:</span
247
-                >
248
-
249
-                {{
250
-                  record.prescription.anticoagulant_shouji
251
-                    ? record.prescription.anticoagulant_shouji
252
-                    : "/"
253
-                }}
254
-              </span>
255
-              <span v-if="record.prescription.anticoagulant == 5">iu</span>
256
-              <span v-if="record.prescription.anticoagulant == 13">iu</span>
257
-              <span v-if="record.prescription.anticoagulant == 11">iu</span>
258
-              <span v-if="record.prescription.anticoagulant == 8">iu</span>
259
-              <span v-if="record.prescription.anticoagulant == 7">iu</span>
260
-              <span v-if="record.prescription.anticoagulant == 6">iu</span>
261
-              <span v-if="record.prescription.anticoagulant == 4">mg</span>
262
-              <span v-if="record.prescription.anticoagulant == 3">iu</span>
263
-              <span v-if="record.prescription.anticoagulant == 2">mg</span>
264
-              <span v-if="record.prescription.anticoagulant == 1">mg</span>
265
-            </td>
266
-            <td style="text-align: left" colspan="1">
267
-              <span style="display: inline-block; margin-left: 15px">
268
-                维持:
269
-                {{
270
-                  record.prescription.anticoagulant_weichi
271
-                    ? record.prescription.anticoagulant_weichi
272
-                    : "/"
273
-                }}
274
-              </span>
275
-              <span v-if="record.prescription.anticoagulant == 13">iu/h</span>
276
-              <span v-if="record.prescription.anticoagulant == 11">iu/h</span>
277
-              <span v-if="record.prescription.anticoagulant == 8">iu/h</span>
278
-              <span v-if="record.prescription.anticoagulant == 7">iu/h</span>
279
-              <span v-if="record.prescription.anticoagulant == 6">iu/h</span>
280
-              <span v-if="record.prescription.anticoagulant == 5">ml/h</span>
281
-              <span v-if="record.prescription.anticoagulant == 4">mg/h</span>
282
-              <span v-if="record.prescription.anticoagulant == 3">iu/h</span>
283
-              <span v-if="record.prescription.anticoagulant == 2">mg/h</span>
284
-              <span v-if="record.prescription.anticoagulant == 1">mg/h</span>
285
-            </td>
286
-            <td style="text-align: left" colspan="2">
287
-              <span style="display: inline-block; ">
288
-                总量:
289
-                {{
290
-                  record.prescription.anticoagulant_zongliang
291
-                    ? record.prescription.anticoagulant_zongliang
292
-                    : "/"
293
-                }}
294
-              </span>
295
-              <span v-if="record.prescription.anticoagulant == 13">iu</span>
296
-              <span v-if="record.prescription.anticoagulant == 11">iu</span>
297
-              <span v-if="record.prescription.anticoagulant == 5">iu</span>
298
-              <span v-if="record.prescription.anticoagulant == 8">iu</span>
299
-              <span v-if="record.prescription.anticoagulant == 7">iu</span>
300
-              <span v-if="record.prescription.anticoagulant == 6">iu</span>
301
-              <span v-if="record.prescription.anticoagulant == 4">mg</span>
302
-              <span v-if="record.prescription.anticoagulant == 3">iu</span>
303
-              <span v-if="record.prescription.anticoagulant == 2">mg</span>
304
-              <span v-if="record.prescription.anticoagulant == 1">mg</span>
305
-            </td>
216
+                  </td>
217
+                  <td style="text-align: left" colspan="3">
218
+                    <span style="display: inline-block; margin-left: 15px">
219
+                      {{ getkangning(record.prescription.anticoagulant) }}:
220
+                      {{
221
+                        record.prescription.anticoagulant_shouji
222
+                          ? record.prescription.anticoagulant_shouji
223
+                          : "/"
224
+                      }}
225
+                    </span>
226
+                    <span v-if="record.prescription.anticoagulant != 0">
227
+                      {{ getshoujiunit(record.prescription.anticoagulant) }}
228
+                    </span>
229
+                  </td>
230
+                  <td style="text-align: left" colspan="1">
231
+                    <span style="display: inline-block; margin-left: 15px">
232
+                      维持:
233
+                      {{
234
+                        record.prescription.anticoagulant_weichi
235
+                          ? record.prescription.anticoagulant_weichi
236
+                          : "/"
237
+                      }}
238
+                    </span>
239
+                    <span v-if="record.prescription.anticoagulant != 0">
240
+                      {{ getweichiunit(record.prescription.anticoagulant) }}
241
+                    </span>
242
+                  </td>
243
+                  <td style="text-align: left" colspan="2">
244
+                    <span style="display: inline-block; ">
245
+                      总量:
246
+                      {{
247
+                        record.prescription.anticoagulant_zongliang
248
+                          ? record.prescription.anticoagulant_zongliang
249
+                          : "/"
250
+                      }}
251
+                    </span>
252
+                    <span v-if="record.prescription.anticoagulant != 0">
253
+                      {{ getzongliangunit(record.prescription.anticoagulant) }}
254
+                    </span>
255
+                  </td>
306 256
            
307
-            </tr>
257
+                </tr>
258
+                <tr>
308 259
                  <td style="text-align:left;" colspan="1">
309 260
                     <span style="display:inline-block;margin-left:15px;"
310 261
                       >透前体重:{{record.assessment_before_dislysis.weight_before?record.assessment_before_dislysis.weight_before:"/"}}&nbsp;kg</span>
@@ -350,9 +301,9 @@
350 301
                       </span>
351 302
                   </td>
352 303
                   <td></td>
353
-             <tr>
304
+             
354 305
 
355
-             </tr>
306
+                </tr>
356 307
                 <tr>
357 308
                   <td style="text-align:left;" colspan="1">
358 309
                     <span style="display:inline-block;margin-left:15px;"
@@ -1621,9 +1572,7 @@ export default {
1621 1572
           this.org_template_info = resp.data.templateInfo
1622 1573
 
1623 1574
           this.records = this.records.concat(resp.data.schedules)
1624
-
1625 1575
           console.log('记录', this.records)
1626
-
1627 1576
           for (const recordIndex in this.records) {
1628 1577
             var dlegh = 0
1629 1578
             if (
@@ -2024,7 +1973,55 @@ export default {
2024 1973
           return this.bloodAccess[i].name;
2025 1974
         }
2026 1975
       }
2027
-    }
1976
+    },
1977
+    getkangning(val){
1978
+      const options = this.anticoagulantsConfit
1979
+      if(val != ''){
1980
+        for(let i in options){
1981
+          if(val == options[i].id){
1982
+            return options[i].name
1983
+          }
1984
+        }
1985
+      }else{
1986
+        return ''
1987
+      }
1988
+    },
1989
+    getshoujiunit(val){
1990
+      const options = this.anticoagulantsConfit
1991
+      if(val != ''){
1992
+        for(let i in options){
1993
+          if(val == options[i].id){
1994
+            return options[i].shouji_unit
1995
+          }
1996
+        }
1997
+      }else{
1998
+        return ''
1999
+      }
2000
+    },
2001
+    getweichiunit(val){
2002
+      const options = this.anticoagulantsConfit
2003
+      if(val != ''){
2004
+        for(let i in options){
2005
+          if(val == options[i].id){
2006
+            return options[i].weichi_unit
2007
+          }
2008
+        }
2009
+      }else{
2010
+        return ''
2011
+      }
2012
+    },
2013
+    getzongliangunit(val){
2014
+      const options = this.anticoagulantsConfit
2015
+      if(val != ''){
2016
+        for(let i in options){
2017
+          if(val == options[i].id){
2018
+            return options[i].zongliang_unit
2019
+          }
2020
+        }
2021
+      }else{
2022
+        return ''
2023
+      }
2024
+    },
2028 2025
   }
2029 2026
 }
2030 2027
 </script>

+ 28 - 20
src/xt_pages/dialysis/template/DialysisPrintOrderSeventyeight.vue Vedi File

@@ -104,8 +104,8 @@
104 104
             </div>
105 105
           </div>
106 106
         </div>
107
-        <div class="row">
108
-          <div class="inline_block" style="">
107
+        <div class="row" style="display: flex;">
108
+          <div class="inline_block" style="flex: 1;">
109 109
             日期:
110 110
             <div class="under_line"
111 111
               style="width: 120px;text-align: left;
@@ -114,12 +114,12 @@
114 114
             {{ xtdate }}
115 115
             </div>
116 116
           </div>
117
-          <div class="inline_block" style="margin-left: 10px">
117
+          <div class="inline_block" style="flex: 4;">
118 118
             诊断:
119 119
             <div
120 120
               class="under_line"
121 121
               style="
122
-                width: 500px;
122
+                width: 92%;
123 123
                 text-align: left;
124 124
                 word-wrap: break-word;
125 125
                 white-space: inherit;
@@ -609,7 +609,6 @@
609 609
                             : "/"
610 610
                         }}
611 611
                         </span>
612
-
613 612
                       </div>
614 613
                     </div>
615 614
                     <div
@@ -743,12 +742,12 @@
743 742
                       <span v-if="prescription.anticoagulant == 13">iu</span>
744 743
 
745 744
                     </div>
746
-                    <div class="inline_block" style="flex: 1">
745
+                    <!-- <div class="inline_block" style="flex: 1">
747 746
                       透析机型:
748 747
                       <div class="under_line" style="width: 80px; text-align: center">
749 748
                         {{ predialysis.machine_type ? predialysis.machine_type : '' }}
750 749
                       </div>
751
-                    </div>
750
+                    </div> -->
752 751
                   </div>
753 752
 
754 753
                   <div class="row" style="">
@@ -1913,10 +1912,12 @@ export default {
1913 1912
       ){
1914 1913
         const obj30 = "透析器"
1915 1914
         checkDate.push(obj30)
1916
-      } if (this.predialysis.machine_type == 0) {
1917
-        const obj31 = "透析机型"
1918
-        checkDate.push(obj31)
1919
-      } if (this.dialysisOrder.DeviceNumber.number == 0) {
1915
+      } 
1916
+      // if (this.predialysis.machine_type == 0) {
1917
+      //   const obj31 = "透析机型"
1918
+      //   checkDate.push(obj31)
1919
+      // } 
1920
+      if ( this.dialysisOrder !=undefined && this.dialysisOrder.DeviceNumber.number == 0) {
1920 1921
         const obj32 = "机号"
1921 1922
         checkDate.push(obj32)
1922 1923
       } if (this.prescription.anticoagulant_name == 0) {
@@ -1930,7 +1931,7 @@ export default {
1930 1931
       }
1931 1932
 
1932 1933
       if (this.prescription.anticoagulant_zongliang == 0 &&
1933
-        this.prescription.anticoagulant !=1 && this.prescription.anticoagulant !='' && prescription.anticoagulant != 5
1934
+        this.prescription.anticoagulant !=1 && this.prescription.anticoagulant !='' && this.prescription.anticoagulant != 5
1934 1935
       ) {
1935 1936
         const obj36 = "总量"
1936 1937
         checkDate.push(obj36)
@@ -2797,15 +2798,22 @@ export default {
2797 2798
     },
2798 2799
     getcheckData(val){
2799 2800
       if(val.length >0){
2800
-        let message = `记录单未填数据:<br/><br/>&nbsp;&nbsp;${val.join("<br/><br/>&nbsp;&nbsp;")}`;
2801
-        this.$message({
2801
+        let message = `记录单未填数据:<br/>&nbsp;&nbsp;${val.join("<br/>&nbsp;&nbsp;")}`;
2802
+        this.$confirm(message, '提示', {
2803
+          confirmButtonText: '确定',
2804
+          cancelButtonText: '取消',
2805
+          type: 'warning',
2802 2806
           dangerouslyUseHTMLString: true,
2803
-          message:message,
2804
-          duration:0,
2805
-          showClose:true,
2806
-          type:'error'
2807
-        })
2808
-        return message
2807
+        })       
2808
+        
2809
+        // this.$message({
2810
+        //   dangerouslyUseHTMLString: true,
2811
+        //   message:message,
2812
+        //   duration:0,
2813
+        //   showClose:true,
2814
+        //   type:'error'
2815
+        // })
2816
+        // return message
2809 2817
       }else{
2810 2818
         this.$message.success('核对完成')
2811 2819
       }

+ 13 - 2
src/xt_pages/dialysis/template/DialysisPrintOrderSix.vue Vedi File

@@ -21,7 +21,7 @@
21 21
             {{ orgname }}
22 22
           </div>
23 23
           <div
24
-            v-if="org_id!=0 && org_id!=10449 && org_id!=3877 && org_id!=9671"
24
+            v-if=" org_id!=10449 && org_id!=3877 && org_id!=9671"
25 25
             class="order-title"
26 26
             style="
27 27
               letter-spacing: 0;
@@ -3808,7 +3808,18 @@
3808 3808
 
3809 3809
             </tbody>
3810 3810
           </table>
3811
-
3811
+          <div style="position: relative; left: 70%;top: 20px;">
3812
+            患者签名:
3813
+            <div class="under_line" style="width: 120px;">
3814
+              <img
3815
+                v-if="dialysisOrder.url!=''"
3816
+                style="height: 50px"
3817
+                :src="dialysisOrder == null? 0: dialysisOrder.url"
3818
+                alt=""
3819
+                srcset=""
3820
+              />
3821
+            </div>
3822
+          </div>
3812 3823
         </div>
3813 3824
       </div>
3814 3825
     </div>

+ 50 - 61
src/xt_pages/dialysis/template/DialysisPrintOrderSixtyTwo.vue Vedi File

@@ -223,35 +223,7 @@
223 223
             </td>
224 224
             <td style="text-align: left" colspan="3">
225 225
               <span style="display: inline-block; margin-left: 15px">
226
-                <span v-if="prescription.anticoagulant == 2">普通肝素首剂:</span>
227
-                <span v-if="prescription.anticoagulant == 3"
228
-                  >低分子肝素首剂:</span
229
-                >
230
-                <span v-if="prescription.anticoagulant == 4"
231
-                  >阿加曲班肝素首剂:</span
232
-                >
233
-                <span v-if="prescription.anticoagulant == 5"
234
-                  >枸橼酸钠肝素首剂:</span
235
-                >
236
-                <span v-if="prescription.anticoagulant == 6"
237
-                  >低分子肝素钙首剂:</span
238
-                >
239
-                <span v-if="prescription.anticoagulant == 7"
240
-                  >低分子肝素钠首剂:</span
241
-                >
242
-                <span v-if="prescription.anticoagulant == 8"
243
-                  >依诺肝素首剂:</span
244
-                >
245
-                <span v-if="prescription.anticoagulant == 9">达肝素首剂:</span>
246
-                <span v-if="prescription.anticoagulant == 10"
247
-                  >体外抗凝肝素首剂:</span
248
-                >
249
-                <span v-if="prescription.anticoagulant == 11"
250
-                  >那屈肝素首剂:</span
251
-                >
252
-                 <span v-if="prescription.anticoagulant == 13"
253
-                  >那屈肝素钙首剂:</span
254
-                >
226
+                {{ prescription.anticoagulant_name?prescription.anticoagulant_name:'' }}:
255 227
 
256 228
                 {{
257 229
                   prescription.anticoagulant_shouji
@@ -259,16 +231,9 @@
259 231
                     : "/"
260 232
                 }}
261 233
               </span>
262
-              <span v-if="prescription.anticoagulant == 5">iu</span>
263
-              <span v-if="prescription.anticoagulant == 13">iu</span>
264
-              <span v-if="prescription.anticoagulant == 11">iu</span>
265
-              <span v-if="prescription.anticoagulant == 8">iu</span>
266
-              <span v-if="prescription.anticoagulant == 7">iu</span>
267
-              <span v-if="prescription.anticoagulant == 6">iu</span>
268
-              <span v-if="prescription.anticoagulant == 4">mg</span>
269
-              <span v-if="prescription.anticoagulant == 3">iu</span>
270
-              <span v-if="prescription.anticoagulant == 2">mg</span>
271
-              <span v-if="prescription.anticoagulant == 1">mg</span>
234
+              <span v-if="prescription.anticoagulant !=0">
235
+                {{ getshoujiunit(prescription.anticoagulant) }}
236
+              </span>
272 237
             </td>
273 238
             <td style="text-align: left" colspan="1">
274 239
               <span style="display: inline-block; margin-left: 15px">
@@ -279,16 +244,10 @@
279 244
                     : "/"
280 245
                 }}
281 246
               </span>
282
-              <span v-if="prescription.anticoagulant == 13">iu/h</span>
283
-              <span v-if="prescription.anticoagulant == 11">iu/h</span>
284
-              <span v-if="prescription.anticoagulant == 8">iu/h</span>
285
-              <span v-if="prescription.anticoagulant == 7">iu/h</span>
286
-              <span v-if="prescription.anticoagulant == 6">iu/h</span>
287
-              <span v-if="prescription.anticoagulant == 5">ml/h</span>
288
-              <span v-if="prescription.anticoagulant == 4">mg/h</span>
289
-              <span v-if="prescription.anticoagulant == 3">iu/h</span>
290
-              <span v-if="prescription.anticoagulant == 2">mg/h</span>
291
-              <span v-if="prescription.anticoagulant == 1">mg/h</span>
247
+              <span v-if="prescription.anticoagulant !=0">
248
+                {{ getweichiunit(prescription.anticoagulant) }}
249
+              </span>
250
+             
292 251
             </td>
293 252
             <td style="text-align: left" colspan="1">
294 253
               <span style="display: inline-block; ">
@@ -299,16 +258,9 @@
299 258
                     : "/"
300 259
                 }}
301 260
               </span>
302
-              <span v-if="prescription.anticoagulant == 13">iu</span>
303
-              <span v-if="prescription.anticoagulant == 11">iu</span>
304
-              <span v-if="prescription.anticoagulant == 5">iu</span>
305
-              <span v-if="prescription.anticoagulant == 8">iu</span>
306
-              <span v-if="prescription.anticoagulant == 7">iu</span>
307
-              <span v-if="prescription.anticoagulant == 6">iu</span>
308
-              <span v-if="prescription.anticoagulant == 4">mg</span>
309
-              <span v-if="prescription.anticoagulant == 3">iu</span>
310
-              <span v-if="prescription.anticoagulant == 2">mg</span>
311
-              <span v-if="prescription.anticoagulant == 1">mg</span>
261
+              <span v-if="prescription.anticoagulant !=0">
262
+                {{ getzongliangunit(prescription.anticoagulant) }}
263
+              </span>
312 264
             </td>
313 265
           </tr>
314 266
           <tr>
@@ -871,7 +823,6 @@
871 823
               </span>
872 824
             </td>
873 825
           </tr>
874
-
875 826
           <!-- <tr>
876 827
             <td style="text-align: left" colspan="8">
877 828
               <span style="display: inline-block; margin-left: 15px">
@@ -1921,7 +1872,6 @@ export default {
1921 1872
           }
1922 1873
           this.patientInfo = response.data.data.patientInfo;
1923 1874
           // console.log("透析记录", this.patientInfo);
1924
-
1925 1875
           this.patientInfo.birth = uParseTime(
1926 1876
             this.patientInfo.birthday,
1927 1877
             "{y}-{m}-{d}"
@@ -1937,6 +1887,7 @@ export default {
1937 1887
           }
1938 1888
           this.check = response.data.data.check;
1939 1889
           var predialysis = response.data.data.PredialysisEvaluation;
1890
+          console.log('response.data.daata',response.data.data);
1940 1891
           console.log("透前评估", predialysis);
1941 1892
           var predialysName = response.data.data.predialysName;
1942 1893
           this.blood_access_part_opera_id = predialysName.name;
@@ -2497,6 +2448,42 @@ export default {
2497 2448
         }
2498 2449
       }
2499 2450
     },
2451
+    getshoujiunit(val){
2452
+      const options = this.anticoagulantsConfit
2453
+      if(val != ''){
2454
+        for(let i in options){
2455
+          if(val == options[i].id){
2456
+            return options[i].shouji_unit
2457
+          }
2458
+        }
2459
+      }else{
2460
+        return ''
2461
+      }
2462
+    },
2463
+    getweichiunit(val){
2464
+      const options = this.anticoagulantsConfit
2465
+      if(val != ''){
2466
+        for(let i in options){
2467
+          if(val == options[i].id){
2468
+            return options[i].weichi_unit
2469
+          }
2470
+        }
2471
+      }else{
2472
+        return ''
2473
+      }
2474
+    },
2475
+    getzongliangunit(val){
2476
+      const options = this.anticoagulantsConfit
2477
+      if(val != ''){
2478
+        for(let i in options){
2479
+          if(val == options[i].id){
2480
+            return options[i].zongliang_unit
2481
+          }
2482
+        }
2483
+      }else{
2484
+        return ''
2485
+      }
2486
+    },
2500 2487
   },
2501 2488
   watch: {
2502 2489
     "patientInfo.gender": function () {
@@ -2532,6 +2519,8 @@ export default {
2532 2519
     this.replacementWays = this.$store.getters.replacement_ways;
2533 2520
     this.perfusionApparatus = this.$store.getters.perfusion_apparatus;
2534 2521
     this.anticoagulantsConfit = this.$store.getters.anticoagulants_confit;
2522
+    console.log('anticoagulantsConfit1111',this.anticoagulantsConfit);
2523
+    
2535 2524
     var vascularAccess = getDataConfig("hemodialysis", "vascular_access");
2536 2525
     this.vascularAccess = vascularAccess;
2537 2526
     // console.log("hhe", vascularAccess);

+ 47 - 48
src/xt_pages/dialysis/template/DialysisPrintOrdereighty.vue Vedi File

@@ -134,10 +134,10 @@
134 134
                       透析机型号:
135 135
                       <div class="under_line" style="width: 60%; text-align: center">
136 136
                         <span v-if="dialysisOrder && dialysisOrder.bed_id !=0">
137
-                          {{ getnumberlist(dialysisOrder.bed_id) }} 
137
+                          {{ getnumberlist(dialysisOrder.bed_id) }}
138 138
                         </span>
139 139
                         <span v-else>
140
-                          {{ getnumberlist(patientInfo.DialysisSchedule.bed_id) }} 
140
+                          {{ getnumberlist(patientInfo.DialysisSchedule.bed_id) }}
141 141
                         </span>
142 142
                       </div>
143 143
                     </div>
@@ -234,7 +234,7 @@
234 234
                         {{ predialysis.blood_access_part_id }}
235 235
                         {{ predialysis.blood_access_part_opera_name }}
236 236
                       </div>
237
-                    </div>       
237
+                    </div>
238 238
                     <div class="inline_block" style="flex: 1">
239 239
                       导管:
240 240
                       <div class="under_line"
@@ -375,7 +375,7 @@
375 375
                         style="width: 50px; text-align: center"
376 376
                       >
377 377
                        {{ prescription.kalium ? prescription.kalium : "/" }}
378
-                       
378
+
379 379
                       </div>
380 380
                       mmol/L
381 381
                     </div>
@@ -391,7 +391,7 @@
391 391
                       <div class="under_line"
392 392
                         style="width: 35px; text-align: center"
393 393
                       >
394
-                       <span> {{ prescription.calcium ? prescription.calcium : "/" }}</span>                     
394
+                       <span> {{ prescription.calcium ? prescription.calcium : "/" }}</span>
395 395
                       </div>
396 396
                       mmol/L
397 397
                     </div>
@@ -405,7 +405,7 @@
405 405
                           prescription.bicarbonate ? prescription.bicarbonate : "/"
406 406
                         }}
407 407
                         </span>
408
-                        
408
+
409 409
                       </div>
410 410
                       mmol/L
411 411
                     </div>
@@ -435,7 +435,7 @@
435 435
                       <span v-if="prescription.anticoagulant!=''">
436 436
                         {{ getshouji(prescription.anticoagulant) }}
437 437
                       </span>
438
-                      
438
+
439 439
                     </div>
440 440
                     <div class="inline_block" style="flex: 1;">
441 441
                       追加:
@@ -451,7 +451,7 @@
451 451
                       <span v-if="prescription.anticoagulant!=''">
452 452
                         {{ getweichi(prescription.anticoagulant) }}
453 453
                       </span>
454
-                      
454
+
455 455
                     </div>
456 456
                     <div class="inline_block" style="flex: 1;"
457 457
                       v-if="prescription.anticoagulant == 5"
@@ -500,7 +500,7 @@
500 500
                       <span v-if="prescription.anticoagulant!=''">
501 501
                         {{ getzongliang(prescription.anticoagulant) }}
502 502
                       </span>
503
-                      
503
+
504 504
                     </div>
505 505
                   </div>
506 506
 
@@ -1091,7 +1091,7 @@
1091 1091
                       </div>
1092 1092
                     </div>
1093 1093
                   </div>
1094
-                 
1094
+
1095 1095
                 </td>
1096 1096
               </tr>
1097 1097
               <tr>
@@ -1099,7 +1099,7 @@
1099 1099
                   <div class="row"
1100 1100
                     style="padding: 2px 0; line-height: 23px; display: flex"
1101 1101
                   >
1102
-                  
1102
+
1103 1103
                     <div class="inline_block" style="flex: 1">
1104 1104
                       上机护士:
1105 1105
                       <div  class="under_line"
@@ -1138,7 +1138,7 @@
1138 1138
                         />
1139 1139
                       </div>
1140 1140
                     </div>
1141
-                    
1141
+
1142 1142
 
1143 1143
                     <div class="inline_block" style="flex: 1">
1144 1144
                       <span>核对护士:</span>
@@ -1296,13 +1296,13 @@
1296 1296
                         style="width: 64%; text-align: center"
1297 1297
                       >
1298 1298
                         <span style="height: 30px;display: inline-block;">
1299
-                          
1299
+
1300 1300
                         </span>
1301 1301
                         <span v-if="dialysisOrder!=null">
1302
-                          {{getTime(dialysisOrder.start_time, "{y}-{m}-{d} {h}:{i}") ? 
1302
+                          {{getTime(dialysisOrder.start_time, "{y}-{m}-{d} {h}:{i}") ?
1303 1303
                           getTime(dialysisOrder.start_time, "{y}-{m}-{d} {h}:{i}") :''}}
1304 1304
                         </span>
1305
-                        
1305
+
1306 1306
                       </div>
1307 1307
                     </div>
1308 1308
                     <div class="inline_block" style="flex: 1.1">
@@ -1313,10 +1313,10 @@
1313 1313
                         <span style="height: 30px; display: inline-block">
1314 1314
                         </span>
1315 1315
                         <span v-if="dialysisOrder!=null">
1316
-                          {{ getTime(dialysisOrder.end_time, "{y}-{m}-{d} {h}:{i}") ? 
1316
+                          {{ getTime(dialysisOrder.end_time, "{y}-{m}-{d} {h}:{i}") ?
1317 1317
                           getTime(dialysisOrder.end_time, "{y}-{m}-{d} {h}:{i}") : "0" }}
1318 1318
                         </span>
1319
-                        
1319
+
1320 1320
 
1321 1321
                       </div>
1322 1322
                     </div>
@@ -2272,8 +2272,8 @@ export default {
2272 2272
   methods: {
2273 2273
     checkData() {
2274 2274
       var checkDate =[]
2275
-      if(this.dialysisOrder && this.dialysisOrder.bed_id == 0 &&
2276
-        this.patientInfo.DialysisSchedule.bed_id == 0
2275
+      if((this.dialysisOrder != undefined && this.dialysisOrder.bed_id == 0 &&
2276
+        this.patientInfo.DialysisSchedule.bed_id == 0)||this.dialysisOrder == undefined
2277 2277
       ){
2278 2278
         const obj = "透析机型号"
2279 2279
         checkDate.push(obj)
@@ -2293,7 +2293,7 @@ export default {
2293 2293
       ) {
2294 2294
         const obj4 = "透前血压"
2295 2295
         checkDate.push(obj4)
2296
-      } if (this.prescription.dialysis_duration_hour == 0 && 
2296
+      } if (this.prescription.dialysis_duration_hour == 0 &&
2297 2297
             this.prescription.dialysis_duration_minute ==0
2298 2298
       ) {
2299 2299
         const obj5 = "透析时间"
@@ -2307,7 +2307,7 @@ export default {
2307 2307
       } if (this.predialysis.catheter == '' ) {
2308 2308
         const obj8 = "导管"
2309 2309
         checkDate.push(obj8)
2310
-      } if (this.prescription.dialyzer_perfusion_apparatus == '' && 
2310
+      } if (this.prescription.dialyzer_perfusion_apparatus == '' &&
2311 2311
             this.prescription.dialysis_dialyszers ==''
2312 2312
       ) {
2313 2313
         const obj9 = "透析(滤)器"
@@ -2364,7 +2364,7 @@ export default {
2364 2364
         const obj24 = "首剂"
2365 2365
         checkDate.push(obj24)
2366 2366
       }if (this.prescription.anticoagulant_zongliang == 0 &&
2367
-        this.prescription.anticoagulant !=1 && this.prescription.anticoagulant !='' && prescription.anticoagulant != 5
2367
+        this.prescription.anticoagulant !=1 && this.prescription.anticoagulant !='' && this.prescription.anticoagulant != 5
2368 2368
       ) {
2369 2369
         const obj25 = "总量"
2370 2370
         checkDate.push(obj25)
@@ -2480,10 +2480,10 @@ export default {
2480 2480
             }
2481 2481
           })
2482 2482
       }
2483
- 
2483
+
2484 2484
       this.getcheckData(checkDate)
2485 2485
     },
2486
-    
2486
+
2487 2487
     toUpload() {
2488 2488
 
2489 2489
       let dom = document.getElementById("dialysis-print-box-1")
@@ -2621,7 +2621,7 @@ export default {
2621 2621
       }
2622 2622
     },
2623 2623
 
2624
-   
2624
+
2625 2625
     getDisplaceLiquiPart: function (val) {
2626 2626
       let displace_liqui_part_name = "/";
2627 2627
       const displace_liqui_part = this.displaceLiquiPartOptions;
@@ -3065,7 +3065,7 @@ export default {
3065 3065
             }
3066 3066
          }
3067 3067
 
3068
-      
3068
+
3069 3069
 
3070 3070
          let projects = [];
3071 3071
         response.data.data.projects.map((item) => {
@@ -3091,7 +3091,7 @@ export default {
3091 3091
                 this.projects[i].project_team_id = 0
3092 3092
 
3093 3093
                 if(this.projects[i].team!= "undefined" && this.projects[i].team.id >0){
3094
-                 
3094
+
3095 3095
                   this.projects[i].project_team = this.projects[i].team.project_team
3096 3096
                   this.projects[i].project_team_id = this.projects[i].team.id
3097 3097
                   this.projects[i].start_time = this.projects[i].start_time
@@ -3102,7 +3102,7 @@ export default {
3102 3102
                   this.projects[i].advice_name =  this.projects[i].team.project_team
3103 3103
                   this.projects[i].advice_doctor = this.projects[i].doctor
3104 3104
 
3105
-             
3105
+
3106 3106
                   newHisArr.push(this.projects[i])
3107 3107
                   // this.doctor_advices_2.push(this.project[i])
3108 3108
                 }else{
@@ -3120,14 +3120,14 @@ export default {
3120 3120
                   // this.doctor_advices_2.push(this.projects[i])
3121 3121
                 }
3122 3122
 
3123
-                
3123
+
3124 3124
 
3125 3125
               }
3126 3126
 
3127 3127
             }
3128 3128
             }
3129 3129
 
3130
-          
3130
+
3131 3131
 
3132 3132
             for(let i=0;i<newHisArr.length;i++){
3133 3133
               newHisArr[i].advice_name_str = ""
@@ -3242,7 +3242,7 @@ export default {
3242 3242
         this.totollength = this.doctor_advices.length + this.monitors.length;
3243 3243
         console.log("this.totollength",this.totollength)
3244 3244
 
3245
-        
3245
+
3246 3246
         if (this.totollength > 18) {
3247 3247
           var temp_advice_length = this.doctor_advices.length
3248 3248
           var doctor_advices_1 = [];
@@ -3382,7 +3382,7 @@ export default {
3382 3382
       if(id != 0){
3383 3383
         for(let i in options){
3384 3384
           if(id == options[i].id){
3385
-            console.log('anticoagulantsConfit11111',id); 
3385
+            console.log('anticoagulantsConfit11111',id);
3386 3386
             return options[i].shouji_unit
3387 3387
           }
3388 3388
         }
@@ -3425,13 +3425,12 @@ export default {
3425 3425
     },
3426 3426
     getcheckData(val){
3427 3427
       if(val.length >0){
3428
-        let message = `记录单未填数据:<br/><br/>&nbsp;&nbsp;${val.join("<br/><br/>&nbsp;&nbsp;")}`;
3429
-        this.$message({
3428
+        let message = `记录单未填数据:<br/>&nbsp;&nbsp;${val.join("<br/>&nbsp;&nbsp;")}`;
3429
+        this.$confirm(message, '提示', {
3430
+          confirmButtonText: '确定',
3431
+          cancelButtonText: '取消',
3432
+          type: 'warning',
3430 3433
           dangerouslyUseHTMLString: true,
3431
-          message:message,
3432
-          duration:0,
3433
-          showClose:true,
3434
-          type:'error'
3435 3434
         })
3436 3435
         return message
3437 3436
       }else{
@@ -3449,13 +3448,13 @@ export default {
3449 3448
     const birthYear = parseInt(idNumber.substring(6, 10), 10);
3450 3449
     const birthMonth = parseInt(idNumber.substring(10, 12), 10);
3451 3450
     const birthDay = parseInt(idNumber.substring(12, 14), 10);
3452
- 
3451
+
3453 3452
     const today = new Date();
3454 3453
     // console.log("today============",today)
3455 3454
     var ageYear = year - birthYear;
3456 3455
     let ageMonth = month - birthMonth; // 月份是从0开始的
3457 3456
     let ageDay = day - birthDay;
3458
- 
3457
+
3459 3458
     // 调整月份和日期,以便于正确计算
3460 3459
       if (ageDay < 0) {
3461 3460
           ageMonth -= 1;
@@ -3467,13 +3466,13 @@ export default {
3467 3466
           ageYear -= 1;
3468 3467
           ageMonth += 12;
3469 3468
       }
3470
-   
3471
-     return ageYear 
3469
+
3470
+     return ageYear
3472 3471
     },
3473 3472
     // getTime(val) {
3474 3473
     //   return uParseTime(val, "{y}年{m}月{d}日");
3475 3474
     // },
3476
-  
3475
+
3477 3476
     getTimeOne(val) {
3478 3477
       return uParseTime(val, "{y}");
3479 3478
     },
@@ -3494,13 +3493,13 @@ export default {
3494 3493
     const birthYear = parseInt(idNumber.substring(6, 10), 10);
3495 3494
     const birthMonth = parseInt(idNumber.substring(10, 12), 10);
3496 3495
     const birthDay = parseInt(idNumber.substring(12, 14), 10);
3497
- 
3496
+
3498 3497
     const today = new Date();
3499 3498
     // console.log("today============",today)
3500 3499
     var ageYear = year - birthYear;
3501 3500
     let ageMonth = month - birthMonth; // 月份是从0开始的
3502 3501
     let ageDay = day - birthDay;
3503
- 
3502
+
3504 3503
     // 调整月份和日期,以便于正确计算
3505 3504
       if (ageDay < 0) {
3506 3505
           ageMonth -= 1;
@@ -3512,8 +3511,8 @@ export default {
3512 3511
           ageYear -= 1;
3513 3512
           ageMonth += 12;
3514 3513
       }
3515
-   
3516
-     return ageYear 
3514
+
3515
+     return ageYear
3517 3516
     },
3518 3517
 
3519 3518
   },
@@ -3566,7 +3565,7 @@ export default {
3566 3565
 
3567 3566
     this.blood_access_part = getDataConfig("hemodialysis", "vascular_access");
3568 3567
     console.log('this.modeOptions',this.anticoagulantsConfit);
3569
-    
3568
+
3570 3569
     this.blood_access_part_opera = getDataConfig(
3571 3570
       "hemodialysis",
3572 3571
       "vascular_access_desc"

+ 1 - 42
src/xt_pages/dialysis/template/DialysisPrintOrdereightyone.vue Vedi File

@@ -2772,51 +2772,10 @@ export default {
2772 2772
           cancelButtonText: '取消',
2773 2773
           type: 'warning',
2774 2774
           dangerouslyUseHTMLString: true,
2775
-        })
2776
-        // .then(() => {
2777
-        //   this.$message({
2778
-        //     type: 'success',
2779
-        //     message: '删除成功!'
2780
-        //   });
2781
-        // }).catch(() => {
2782
-        //   this.$message({
2783
-        //     type: 'info',
2784
-        //     message: '已取消删除'
2785
-        //   });
2786
-        // });
2787
-        // this.$message({
2788
-        //   dangerouslyUseHTMLString: true,
2789
-        //   message:message,
2790
-        //   duration:0,
2791
-        //   showClose:true,
2792
-        //   type:'error'
2793
-        // })
2794
-        // return message
2775
+        })       
2795 2776
       }else{
2796 2777
         this.$message.success('核对完成')
2797 2778
       }
2798
-
2799
-      // if(val.length >0){
2800
-      //   let message = `记录单未填数据:<br/>&nbsp;&nbsp;${val.join("<br/>&nbsp;&nbsp;")}`;
2801
-      //   this.$confirm(message, '提示', {
2802
-      //     dangerouslyUseHTMLString: true,
2803
-      //     confirmButtonText: '确定',
2804
-      //     cancelButtonText: '取消',
2805
-      //     closeOnClickModal:true,
2806
-      //     type: 'warning',
2807
-      //     center: true
2808
-      //   }).then(() => {
2809
-      //     this.$message({
2810
-      //       type: 'success',
2811
-      //       message: '删除成功!'
2812
-      //     });
2813
-      //   }).catch(() => {
2814
-      //     this.$message({
2815
-      //       type: 'info',
2816
-      //       message: '已取消删除'
2817
-      //     });
2818
-      //   });
2819
-      // }
2820 2779
     }
2821 2780
 
2822 2781
   },

+ 1 - 1
src/xt_pages/eleFaPiao/patientSettleDetail.vue Vedi File

@@ -2,7 +2,7 @@
2 2
   <div class="main-contain new-main-contain">
3 3
     <div class="position">
4 4
       <!--      <bread-crumb :crumbs='crumbs'></bread-crumb>-->
5
-      <bread-crumb :crumbs="crumbs"></bread-crumb>
5
+      <!-- <bread-crumb :crumbs="crumbs"></bread-crumb> -->
6 6
     </div>
7 7
     <div
8 8
       class="app-container"

+ 628 - 0
src/xt_pages/outpatientDoctorStation/checkTemplate/printfive.vue Vedi File

@@ -0,0 +1,628 @@
1
+<template>
2
+  <div>
3
+
4
+    <div id="prescription-print3" class="prescription-print">
5
+      <div class="printTitle">检验申请单</div>
6
+
7
+      <div style="border: 1px solid #000;margin-bottom: 10px;">
8
+        <div
9
+          style="
10
+            display: flex;
11
+            justify-content: space-between;
12
+            border-bottom: 1px solid #000;
13
+            line-height: 40px;
14
+            padding: 0 10px;
15
+          "
16
+        >
17
+          <div>是否急诊:否</div>
18
+          <div>
19
+            结算方式:{{
20
+              faber && faber.transBody
21
+                ? getName(faber.transBody.outputlist1)
22
+                : ""
23
+            }}
24
+          </div>
25
+          <div>金额:{{ total }}</div>
26
+        </div>
27
+        <div
28
+          style="
29
+            display: flex;
30
+            justify-content: space-between;
31
+            border-bottom: 1px solid #000;
32
+            line-height: 40px;
33
+            padding: 0 10px;
34
+          "
35
+        >
36
+          <div>
37
+            姓名:{{
38
+              advicePrint[0].patient.name
39
+                ? advicePrint[0].patient.name.indexOf("(") > -1
40
+                  ? advicePrint[0].patient.name.substring(
41
+                      0,
42
+                      advicePrint[0].patient.name.indexOf("(")
43
+                    )
44
+                  : advicePrint[0].patient.name
45
+                : ""
46
+            }}
47
+          </div>
48
+          <div>
49
+            性别:
50
+            <span v-if="advicePrint[0].patient.gender == 1">男</span>
51
+            <span v-if="advicePrint[0].patient.gender == 2">女</span>
52
+          </div>
53
+          <div>年龄:{{getAge(advicePrint[0].patient)?getAge(advicePrint[0].patient):""}}岁</div>
54
+
55
+        </div>
56
+        <div style="margin-bottom: 20px; padding: 10px 10px 0" v-if="org_id!=10278 && org_id!=10138 && org_id!=0">
57
+          病史摘要:{{
58
+            history.history_of_present_illness
59
+              ? history.history_of_present_illness
60
+              : ""
61
+          }}
62
+        </div>
63
+        <div style="margin-bottom: 20px; padding: 0 10px">
64
+          临床诊断:{{ getDiagnosis(advicePrint[0].info.diagnosis) }}
65
+        </div>
66
+        <div style="display: flex; margin-bottom: 20px; padding: 0 10px">
67
+          <div>检验项目:</div>
68
+          <div>
69
+            <!-- <div v-for="item in projectPrint" style="margin-bottom: 10px">
70
+              {{ item.team.project_team }}
71
+            </div> -->
72
+            <div v-for="item in singleProjectPrint" style="margin-bottom: 10px">
73
+              {{ item.project.project_name }}
74
+            </div>
75
+          </div>
76
+        </div>
77
+        <div
78
+          style=" display: flex;justify-content: space-between;
79
+            border-top: 1px solid #000;line-height: 40px;padding: 0 10px;"
80
+        >
81
+          <div>开单医生:{{ doctor ? doctor : "" }}</div>
82
+          <div>
83
+            开单日期:
84
+            {{ getTime(pre_time) ? getTime(pre_time).split(" ")[0] : "" }}
85
+          </div>
86
+          <div>
87
+            医生签字:
88
+            <img
89
+              v-if="setAdminUserES(advicePrint[0].creator)"
90
+              style="height: 30px"
91
+              :src="setAdminUserES(advicePrint[0].creator)"
92
+              alt=""
93
+              srcset=""
94
+            />
95
+            <span
96
+              style="width: 100px; display: inline-block"
97
+              v-else-if="advicePrint[0].doctor != ''"
98
+            >
99
+              {{ advicePrint[0].doctor ? advicePrint[0].doctor : "" }}
100
+            </span>
101
+            <span v-else></span>
102
+          </div>
103
+        </div>
104
+      </div>
105
+    </div>
106
+  </div>
107
+</template>
108
+<script>
109
+import { jsGetAge, uParseTime } from "@/utils/tools";
110
+import {
111
+  getAllDoctorList,
112
+  getPrescriptionPrint,
113
+  getHisPatientDetail,
114
+  getPatientCaseHistory,
115
+} from "@/api/project/project";
116
+import { getInitData } from "@/api/his/his";
117
+export default {
118
+  props: {
119
+    patient_id: Number,
120
+    record_date: String,
121
+    prescription_id: Number,
122
+    ids: String,
123
+  },
124
+  data() {
125
+    return {
126
+      doctorList_1: [],
127
+      doctorList: [],
128
+      advicePrint: {},
129
+      patient: {},
130
+      tableData: [],
131
+      prescriptionInfo: [],
132
+      hisPatient: {},
133
+      department: [],
134
+      prescriptions: [],
135
+      projectList: [],
136
+      doc_name: "",
137
+      orgname: "",
138
+      diagnoses: [],
139
+      pageArr: [],
140
+      faber: {},
141
+      total: 0,
142
+      projectPrint: [],
143
+      time: "",
144
+      doctor: "",
145
+      org_id: "",
146
+      singleProjectPrint: [],
147
+      operatorMaps: {},
148
+    };
149
+  },
150
+  methods: {
151
+    getAge(patient){
152
+      // 将时间戳转换为 Date 对象
153
+      const birthday = new Date(patient.birthday* 1000);
154
+
155
+      // 获取当前日期
156
+      const now = new Date();
157
+      // 计算年龄差
158
+      const ageDiffMs = now - birthday;
159
+      const ageDate = new Date(ageDiffMs); // 不需要减掉 1970 年的时间戳
160
+      // 提取年份
161
+      const age = ageDate.getUTCFullYear() - 1970;
162
+      return age
163
+    },
164
+    getPatientCaseHistory() {
165
+      const params = {
166
+        patient_id: this.patient_id,
167
+        record_date:this.record_date,
168
+      };
169
+      getPatientCaseHistory(params).then((response) => {
170
+        if (response.data.state == 1) {
171
+          var history = response.data.data.history;
172
+          // console.log("中国history222222", history);
173
+          this.history = history;
174
+        }
175
+      });
176
+    },
177
+    getAllDoctorList() {
178
+      getAllDoctorList().then((response) => {
179
+        if (response.data.state == 1) {
180
+          var doctor = response.data.data.doctor;
181
+
182
+          this.doctorList = doctor;
183
+        }
184
+      });
185
+    },
186
+
187
+    getDoctor(id) {
188
+      var name = "";
189
+      for (let i = 0; i < this.doctorList.length; i++) {
190
+        if (id == this.doctorList[i].admin_user_id) {
191
+          name = this.doctorList[i].user_name;
192
+        }
193
+      }
194
+      return name;
195
+    },
196
+    getTime(value, temp) {
197
+      if (value != undefined) {
198
+        return uParseTime(value, temp);
199
+      }
200
+      return "";
201
+    },
202
+
203
+    getPrescriptionPrint() {
204
+      var params = {
205
+        // patient_id:this.patient_id,
206
+        // record_date:this.record_date,
207
+        // prescription_id:this.prescription_id,
208
+        patient_id: this.patient_id,
209
+        record_date: this.record_date,
210
+        prescription_id: this.prescription_id,
211
+        ids: this.ids,
212
+        p_type: 2,
213
+      };
214
+      // console.log("params", params);
215
+      getPrescriptionPrint(params).then((response) => {
216
+        if (response.data.state == 1) {
217
+          var advicePrint = response.data.data.advicePrint;
218
+          console.log("adviceprint999933333", response.data.data);
219
+          this.advicePrint = advicePrint;
220
+          this.prescriptions = advicePrint;
221
+          // console.log("处方222222", this.prescriptions);
222
+          var hisPatient = response.data.data.hisPatient;
223
+          // console.log("hisPatient", hisPatient);
224
+          this.hisPatient = hisPatient;
225
+          let projectPrint = [];
226
+          let total = 0;
227
+          this.advicePrint.map((item) => {
228
+
229
+            if (item.project.length > 0) {
230
+              item.project.map((it) => {
231
+                if (it.type == 2) {
232
+
233
+                  //103属于韶关宜柏的检验项目类型
234
+                  if (it.project.cost_classify == 3 || it.project.cost_classify == 103
235
+                  ) {
236
+                    projectPrint.push(it);
237
+                    total += it.project.price * parseInt(it.count);
238
+                  }
239
+                }
240
+              });
241
+            }
242
+          });
243
+          console.log("imte233232323232323223", projectPrint);
244
+          this.doctorList_1 = response.data.data.eles;
245
+          // console.log(this.doctorList_1, "医生列表");
246
+          if (this.doctorList_1.length > 0) {
247
+            var operatorsLen = this.doctorList_1.length;
248
+            for (var index = 0; index < operatorsLen; index++) {
249
+              this.$set(
250
+                this.operatorMaps,
251
+                this.doctorList_1[index].creator,
252
+                this.doctorList_1[index]
253
+              );
254
+            }
255
+          }
256
+          let data = [];
257
+          let data2 = [];
258
+          let data3 = [];
259
+          projectPrint.map((item) => {
260
+            if (item.team.id != 0) {
261
+              let status = data.some((it) => it.team.id == item.team.id);
262
+              if (!status) {
263
+                data.push(item);
264
+              }
265
+            }
266
+            if (item.team.id == 0) {
267
+              data2.push(item);
268
+            }
269
+          });
270
+          this.projectPrint = data;
271
+          console.log("列表", this.projectPrint);
272
+          this.total = total.toFixed(2);
273
+          this.pre_time = this.advicePrint[0].pre_time;
274
+          this.doctor = this.advicePrint[0].doctor;
275
+          data2=data2.concat(data3)
276
+          this.singleProjectPrint = data2;
277
+          console.log("列表333", this.singleProjectPrint);
278
+          var projectlist = response.data.data.projectlist;
279
+
280
+          var projectlist = response.data.data.projectlist;
281
+          // console.log("所有项目列表", projectlist);
282
+          this.projectList = projectlist;
283
+          this.getPage();
284
+          let outputlist1Name = response.data.data.his.patient_info
285
+            ? JSON.parse(response.data.data.his.patient_info)
286
+            : {};
287
+          this.faber = outputlist1Name;
288
+        }
289
+      });
290
+    },
291
+    // 电子签名
292
+    setAdminUserES(id) {
293
+      // console.log(id, "id");
294
+      if (id == 0) {
295
+        return "";
296
+      }
297
+      if (id in this.operatorMaps) {
298
+        // console.log(this.operatorMaps, "this.operatorMaps");
299
+        return this.operatorMaps[id].url;
300
+      } else {
301
+        // console.log("po");
302
+        return "";
303
+      }
304
+    },
305
+    getHisPatientDetail() {
306
+      const params = {
307
+        patient_id: this.patient_id,
308
+      };
309
+      getHisPatientDetail(params).then((response) => {
310
+        if (response.data.state == 1) {
311
+          var hisPatient = response.data.data.hisPatient;
312
+          // console.log("挂号病人", hisPatient);
313
+          this.hisPatient = hisPatient;
314
+        }
315
+      });
316
+    },
317
+    getInitData() {
318
+      getInitData().then((response) => {
319
+        if (response.data.state == 1) {
320
+          this.department = response.data.data.department;
321
+          this.diagnoses = response.data.data.diagnose.sort(this.compare("id"));
322
+          // console.log("争端", this.diagnoses);
323
+        }
324
+      });
325
+    },
326
+    getDepart(id) {
327
+      var name = "";
328
+      for (let i = 0; i < this.department.length; i++) {
329
+        if (id == this.department[i].id) {
330
+          name = this.department[i].name;
331
+        }
332
+      }
333
+      return name;
334
+    },
335
+    getTotalOne(id) {
336
+      var total = 0;
337
+      var addtotal = 0;
338
+      for (let i = 0; i < this.prescriptions.length; i++) {
339
+        if (id == this.prescriptions[i].id) {
340
+          if (this.prescriptions[i].project != null) {
341
+            for (let a = 0; a < this.prescriptions[i].project.length; a++) {
342
+              total =
343
+                total +
344
+                this.prescriptions[i].project[a].price *
345
+                  this.prescriptions[i].project[a].count;
346
+            }
347
+          }
348
+
349
+          if (this.prescriptions[i].additionalcharge != null) {
350
+            for (
351
+              let a = 0;
352
+              a < this.prescriptions[i].additionalcharge.length;
353
+              a++
354
+            ) {
355
+              addtotal =
356
+                addtotal +
357
+                this.prescriptions[i].additionalcharge[a].price *
358
+                  this.prescriptions[i].additionalcharge[a].count;
359
+            }
360
+          }
361
+          addtotal = Math.floor(addtotal * 100) / 100;
362
+        }
363
+      }
364
+
365
+      for (let i = 0; i < this.prescriptions.length; i++) {
366
+        if (id == this.prescriptions[i].id) {
367
+          if (this.prescriptions[i].advices != null) {
368
+            for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
369
+              total =
370
+                total +
371
+                this.prescriptions[i].advices[a].price *
372
+                  this.prescriptions[i].advices[a].prescribing_number;
373
+            }
374
+          }
375
+
376
+          if (this.prescriptions[i].additionalcharge != null) {
377
+            for (
378
+              let a = 0;
379
+              a < this.prescriptions[i].additionalcharge.length;
380
+              a++
381
+            ) {
382
+              addtotal =
383
+                addtotal +
384
+                this.prescriptions[i].additionalcharge[a].price *
385
+                  this.prescriptions[i].additionalcharge[a].count;
386
+            }
387
+          }
388
+          addtotal = Math.floor(addtotal * 100) / 100;
389
+        }
390
+      }
391
+
392
+      return total + addtotal;
393
+    },
394
+
395
+    getProjectName(id) {
396
+      var project_name = "";
397
+      for (let i = 0; i < this.projectList.length; i++) {
398
+        if (id == this.projectList[i].id) {
399
+          project_name = this.projectList[i].project_name;
400
+        }
401
+      }
402
+      return project_name;
403
+    },
404
+
405
+    getDiagnosis(ids) {
406
+      let newIds = ids.split(",").sort(function (a, b) {
407
+        return a - b;
408
+      });
409
+
410
+      var name = "";
411
+      let nameArr = [];
412
+      for (let i = 0; i < this.diagnoses.length; i++) {
413
+        // if(id == this.diagnoses[i].id){
414
+        //    name = this.diagnoses[i].class_name
415
+        // }
416
+
417
+        if (newIds.indexOf(this.diagnoses[i].id.toString()) > -1) {
418
+          // name += diagnoses[i].class_name + ' '
419
+          nameArr.push(this.diagnoses[i].class_name);
420
+        }
421
+      }
422
+      let newNameArr = [];
423
+      nameArr.map((item, index) => {
424
+        if (item == "尿毒症") {
425
+          newNameArr.push(item);
426
+          nameArr.splice(index, 1, "");
427
+        }
428
+      });
429
+      newNameArr.push(...nameArr);
430
+      return newNameArr.join(" ");
431
+    },
432
+    compare(property) {
433
+      return function (a, b) {
434
+        var value1 = a[property];
435
+        var value2 = b[property];
436
+        return value1 - value2; //升序排序
437
+      };
438
+    },
439
+    getPage() {
440
+      this.page = 1;
441
+      this.pageArr = [];
442
+
443
+      this.advicePrint.map((item) => {
444
+        let arr = [];
445
+        item.pageArr = [];
446
+        if (item.advices.length <= 5) {
447
+          this.page = 1;
448
+          arr.push(item.advices.length);
449
+          item.pageArr.push(arr);
450
+        } else if (item.advices.length > 5) {
451
+          this.page = parseInt(item.advices.length / 5);
452
+          let num = item.advices.length % 5;
453
+          for (var i = 0; i < this.page; i++) {
454
+            item.pageArr.push([5]);
455
+          }
456
+          if (num != 0) {
457
+            item.pageArr.push([num]);
458
+          }
459
+        }
460
+      });
461
+      // console.log('this.pageArr',this.pageArr)
462
+    },
463
+    getName(list) {
464
+      console.log("list", list);
465
+      let new_list = [];
466
+      for (let i = 0; i < list.length; i++) {
467
+        if (list[i].aac031 == "1") {
468
+          new_list.push(list[i]);
469
+        }
470
+      }
471
+
472
+      switch (new_list[0].bcc334) {
473
+        case "A31001":
474
+          return "深圳医保1档";
475
+          break;
476
+        case "A31002":
477
+          return "深圳医保2档";
478
+
479
+          break;
480
+        case "A31003":
481
+          return "深圳医保3档";
482
+
483
+          break;
484
+        case "A31004":
485
+          return "二档(少儿)";
486
+
487
+          break;
488
+        case "A31005":
489
+          return "学生二档";
490
+
491
+          break;
492
+        case "A31006":
493
+          return "大学生二档";
494
+
495
+          break;
496
+        case "A32001":
497
+          return "在职公务员";
498
+          break;
499
+        case "A32002":
500
+          return "在职驻深公务员";
501
+
502
+          break;
503
+        case "A39301":
504
+          return "家属统筹医疗";
505
+
506
+          break;
507
+        case "A41001":
508
+          return "工伤在职";
509
+
510
+          break;
511
+        case "A51001":
512
+          return "生育在职";
513
+
514
+          break;
515
+        case "A52001":
516
+          return "生育医疗一档";
517
+
518
+          break;
519
+        case "A52002":
520
+          return "生育医疗一档";
521
+
522
+          break;
523
+        case "C31001":
524
+          return "一档医疗退休";
525
+
526
+          break;
527
+        case "C31002":
528
+          return "二档医疗退休";
529
+          break;
530
+      }
531
+    },
532
+  },
533
+  created() {
534
+    this.getAllDoctorList();
535
+    this.getInitData();
536
+    this.getPrescriptionPrint();
537
+    this.getHisPatientDetail();
538
+    this.getPatientCaseHistory();
539
+    var xtuser = this.$store.getters.xt_user;
540
+    this.orgname = xtuser.org.org_name;
541
+    this.org_id = this.$store.getters.xt_user.org_id;
542
+  },
543
+  watch: {
544
+    ids: function (val) {
545
+      this.ids = val;
546
+      this.getPrescriptionPrint();
547
+    },
548
+  },
549
+};
550
+</script>
551
+
552
+
553
+<style lang="scss" scoped>
554
+.prescription-print {
555
+  -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27),
556
+    0 0 60px rgba(0, 0, 0, 0.06) inset;
557
+  -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27),
558
+    0 0 40px rgba(0, 0, 0, 0.06) inset;
559
+  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
560
+  margin-bottom: 20px;
561
+  padding: 20px 10px;
562
+}
563
+.printTitle {
564
+  font-size: 22px;
565
+  text-align: center;
566
+  font-weight: bold;
567
+  margin-bottom: 10px;
568
+}
569
+.infoTitle {
570
+  display: flex;
571
+  margin-top: 10px;
572
+  line-height: 24px;
573
+}
574
+.infoTitle div {
575
+  width: 200px;
576
+}
577
+.infoMain {
578
+  display: flex;
579
+  flex-wrap: wrap;
580
+  margin-top: 10px;
581
+}
582
+.infoMain div {
583
+  width: 50%;
584
+  line-height: 24px;
585
+}
586
+.prescriptionBox {
587
+  padding: 0 10px;
588
+  min-height: 400px;
589
+}
590
+.Rp {
591
+  font-size: 22px;
592
+  font-weight: bold;
593
+}
594
+.drugsBox {
595
+  padding-left: 40px;
596
+  margin-bottom: 10px;
597
+}
598
+.drugsBox div {
599
+  line-height: 20px;
600
+}
601
+.drugsOne {
602
+  line-height: 24px;
603
+}
604
+.drugsOne span {
605
+  margin-right: 20px;
606
+}
607
+.doctorBox {
608
+  display: flex;
609
+  justify-content: space-between;
610
+  padding: 0 10px;
611
+  line-height: 24px;
612
+  border-bottom: 2px solid #000;
613
+}
614
+.actionBar {
615
+  display: flex;
616
+  justify-content: space-between;
617
+  line-height: 24px;
618
+  padding: 0 10px;
619
+}
620
+.actionBar p {
621
+  width: 150px;
622
+}
623
+.under_line {
624
+  display: inline-block;
625
+  border-bottom: 1px solid #000;
626
+  flex: 1;
627
+}
628
+</style>

+ 1 - 13
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue Vedi File

@@ -2502,12 +2502,6 @@ export default {
2502 2502
         }
2503 2503
       }
2504 2504
 
2505
-
2506
-
2507
-
2508
-
2509
-
2510
-
2511 2505
     },
2512 2506
     setMonthData(info, admin_info, doctors, department, hisPatientInfo, month_data, last_info) {
2513 2507
       // this.start_time = moment(new Date()).subtract(30, 'days').format('YYYY-MM-DD')
@@ -3024,10 +3018,6 @@ export default {
3024 3018
                         }
3025 3019
                       }
3026 3020
                     }
3027
-
3028
-
3029
-
3030
-
3031 3021
                   }
3032 3022
                 }
3033 3023
 
@@ -3200,13 +3190,11 @@ export default {
3200 3190
               }
3201 3191
 
3202 3192
 
3203
-              if (this.org_id == 10721 || this.org_id == 0) {
3193
+              if (this.org_id == 10721) {
3204 3194
                 for (let i = 0; i < data.prescriptions.length; i++) {
3205 3195
                   data.prescriptions[i]["diagnoses"] = data.prescriptions[i].diagnose.join(",")
3206 3196
                 }
3207 3197
               }
3208
-              console.log(data.prescriptions)
3209
-
3210 3198
               createHisPrescription(data, params).then(response => {
3211 3199
                 if (response.data.state == 1) {
3212 3200
                   this.$emit('change', this.patientInfo.id)

+ 1 - 1
src/xt_pages/outpatientDoctorStation/template/printOne.vue Vedi File

@@ -56,7 +56,7 @@
56 56
             </div>
57 57
           </div>
58 58
         </div>
59
-        <div class="prescriptionBox" style="min-height: 350px;">
59
+        <div class="prescriptionBox" :style="{'min-height':org_id != 10724? '350px':'450px'}">
60 60
           <div class="Rp">Rp:</div>
61 61
           <div class="drugsBox" 
62 62
             v-for="(it, index1) in item.advices"

+ 165 - 79
src/xt_pages/user/Informed/Informedconsent.vue Vedi File

@@ -82,7 +82,7 @@
82 82
                   </el-table>
83 83
                 </div>
84 84
               </div>
85
-              <div style="width: 67%; margin-left: 10px;">
85
+              <div style="width: 69%; margin-left: 10px;">
86 86
                 <div v-if="face_show">
87 87
                   <Fallout_Bed_Print :patient_id ="this.patientID" :listPrint="listPrint" ref="childOne" @getFallOutBedPrintList="getFallOutBedPrintList"></Fallout_Bed_Print>
88 88
                 </div>
@@ -114,9 +114,9 @@
114 114
                 <div v-if="catheterization_show">
115 115
                   <catheterization_informed :patient_id ="this.patientID" @getCatheterization="getCatheterization" ref="childTwely" :cathetherizationPrint="cathetherizationPrint"></catheterization_informed>
116 116
                 </div>
117
-                <div v-if="dialyzer_show">
117
+                <!-- <div v-if="dialyzer_show">
118 118
                   <dialyzer_informed :patient_id ="this.patientID" :dialyzerInformedPrint="dialyzerInformedPrint" ref="childTen" @getDialyzerInformed="getDialyzerInformed"></dialyzer_informed>
119
-                </div>
119
+                </div> -->
120 120
                 <div v-if="therapy_show">
121 121
                   <therapy_informed :patient_id ="this.patientID"ref="childEleven" :therapyinformePrint="therapyinformePrint" @getTherapyInformed="getTherapyInformed"></therapy_informed>
122 122
                 </div>
@@ -126,17 +126,22 @@
126 126
                 <div v-if="show14">
127 127
                   <heal_informed :patient_id ="this.patientID" ref="childSeventy" ::patientTreamentPlan="patientTreamentPlan" @getTreamentPlan="getTreamentPlan"></heal_informed>
128 128
                 </div>
129
-                <div v-if="show15">
130
-                  <criticalpatient_informed :patient_id ="this.patientID" ref="childFivety" :patientCritaicalInformedPrint="patientCritaicalInformedPrint" @getPatientCriticalList="getPatientCriticalList"></criticalpatient_informed>
131
-                </div>
132 129
                 <div v-if="show16">
133 130
                   <criticalpatient_informed2 :patient_id ="this.patientID" ref="childSixty" :patientCritaicalInformedOnePrint="patientCritaicalInformedOnePrint" @getPatientCriticalOneList="getPatientCriticalOneList"></criticalpatient_informed2>
134 131
                 </div>
135 132
                 <div v-if="show17">
136
-                  <Disease_diagnosis :patient_id ="this.patientID" ref="childsevety" >
137
-
138
-                  </Disease_diagnosis>
133
+                  <Disease_diagnosis :patient_id ="this.patientID" ref="childsevety"></Disease_diagnosis>
134
+                </div>
135
+                <div v-if="show18">
136
+                  <nonheparin_informed :patient_id ="this.patientID" ref="childeighteen"></nonheparin_informed>
137
+                </div>
138
+                <div v-if="show19">
139
+                  <CRRT_informed :patient_id ="this.patientID" ref="childnineteen"></CRRT_informed>
139 140
                 </div>
141
+                <div v-if="show20">
142
+                  <Terminate_informed :patient_id ="this.patientID" ref="childtwoty"></Terminate_informed>
143
+                </div>
144
+
140 145
               </div>
141 146
             </div>
142 147
           </el-tab-pane>
@@ -166,12 +171,14 @@ import heal_informed from './components/heal_informed'
166 171
 import criticalpatient_informed from './components/criticalpatient_informed'
167 172
 import criticalpatient_informed2 from './components/criticalpatient_informed2'
168 173
 import Disease_diagnosis from './components/Disease_diagnosis'
174
+import nonheparin_informed from './components/nonheparin_informed'
175
+import CRRT_informed from './components/CRRT_informed'
176
+import Terminate_informed from './components/Terminate_informed'
169 177
 import { getPatientDetailInformedconsent,getFallOutBedPrintList,getFilterInformed,getProfundaInformed,
170 178
   getArterOvernous,getHighRiskInformed,getPatientMeDicalList,getAnticoagulationInformed,getCriticalInformed,
171 179
   getHemoperfusionInformed,getInformedConsent,getCatheterization,getDialyzerInformed, getTherapyInformed,
172 180
   getPatientCriticalList,getPatientCriticalOneList,getTreamentPlan } from '@/api/patient'
173 181
 export default {
174
-
175 182
   components: {
176 183
     PatientSidebar,
177 184
     Fallout_Bed_Print,
@@ -190,7 +197,10 @@ export default {
190 197
     heal_informed,
191 198
     criticalpatient_informed,
192 199
     criticalpatient_informed2,
193
-    Disease_diagnosis
200
+    Disease_diagnosis,
201
+    nonheparin_informed,
202
+    CRRT_informed,
203
+    Terminate_informed
194 204
   },
195 205
   data() {
196 206
     return {
@@ -201,8 +211,9 @@ export default {
201 211
                 {date:'血液灌流治疗知情同意书',value:'8'},{date:'自带药物代为注射告知知情同意书',value:'9'},{date:'深静脉透析导管置入术知情同意书',value:'10'},
202 212
                 {date:'血液透析(滤过)治疗知情同意书',value:'12'},{date:'门诊血液透析治疗病历首页',value:'13'},
203 213
                 {date:'治疗处理方案知情同意书',value:'14'},{date:'危重病人知情同意书',value:'16'},
204
-                // {date:'疾病诊断证明书',value:'17'},
205
-              ],
214
+                {date:'疾病诊断证明书',value:'17'},{date:'无肝素血液透析风险知情同意书',value:'18'},
215
+                {date:'连续肾脏替代治疗(CRRT)治疗知情同意书',value:'19'},{date:'患方要求终止治疗及风险、责任承担承诺书',value:'20'},
216
+      ],
206 217
 
207 218
       face_show:true,
208 219
       filter_show:false,
@@ -218,9 +229,11 @@ export default {
218 229
       therapy_show:false,
219 230
       history_show:false,
220 231
       show14:false,
221
-      show15:false,
232
+      show18:false,
222 233
       show16:false,
223 234
       show17:false,
235
+      show19:false,
236
+      show20:false,
224 237
       patientID:0,
225 238
       patient:{},
226 239
       tableData:[],
@@ -430,13 +443,15 @@ export default {
430 443
           this.hemoperfusion_show=false,
431 444
           this.Bring_show=false,
432 445
           this.catheterization_show=false,
433
-          // this.dialyzer_show=false,
434 446
           this.therapy_show=false,
435 447
           this.history_show=false,
436 448
           this.show14=false,
437
-          this.show15=false,
449
+
438 450
           this.show16=false,
439 451
           this.show17=false,
452
+          this.show18=false,
453
+          this.show19 = false,
454
+          this.show20 = false
440 455
           this.getFallOutBedPrintList()
441 456
         }
442 457
         if(row.value==2){
@@ -450,13 +465,14 @@ export default {
450 465
           this.hemoperfusion_show=false,
451 466
           this.Bring_show=false,
452 467
           this.catheterization_show=false,
453
-          // this.dialyzer_show=false,
454 468
           this.therapy_show=false,
455 469
           this.history_show=false,
456 470
           this.show14=false,
457
-          this.show15=false,
458 471
           this.show16=false,
459 472
           this.show17=false,
473
+          this.show18=false,
474
+          this.show19 = false,
475
+          this.show20 = false
460 476
           this.getFilterInformed()
461 477
         }
462 478
         if(row.value==3){
@@ -470,13 +486,14 @@ export default {
470 486
           this.hemoperfusion_show=false,
471 487
           this.Bring_show=false,
472 488
           this.catheterization_show=false,
473
-          // this.dialyzer_show=false,
474 489
           this.therapy_show=false,
475 490
           this.history_show=false,
476 491
           this.show14=false,
477
-          this.show15=false,
478 492
           this.show16=false,
479 493
           this.show17=false,
494
+          this.show18=false,
495
+          this.show19 = false,
496
+          this.show20 = false
480 497
           this.getProfundaInformed()
481 498
         }
482 499
         if(row.value==4){
@@ -490,13 +507,14 @@ export default {
490 507
           this.hemoperfusion_show=false,
491 508
           this.Bring_show=false,
492 509
           this.catheterization_show=false,
493
-          // this.dialyzer_show=false,
494 510
           this.therapy_show=false,
495 511
           this.history_show=false,
496 512
           this.show14=false,
497
-          this.show15=false,
498 513
           this.show16=false,
499 514
           this.show17=false,
515
+          this.show18=false,
516
+          this.show19 = false,
517
+          this.show20 = false
500 518
           this.getArterOvernous()
501 519
         }
502 520
         if(row.value==5){
@@ -510,13 +528,14 @@ export default {
510 528
           this.hemoperfusion_show=false,
511 529
           this.Bring_show=false,
512 530
           this.catheterization_show=false,
513
-          // this.dialyzer_show=false,
514 531
           this.therapy_show=false,
515 532
           this.history_show=false,
516 533
           this.show14=false,
517
-          this.show15=false,
518 534
           this.show16=false,
519 535
           this.show17=false,
536
+          this.show18=false,
537
+          this.show19 = false,
538
+          this.show20 = false
520 539
           this.getHighRiskInformed()
521 540
         }
522 541
         if(row.value==6){
@@ -530,13 +549,14 @@ export default {
530 549
           this.hemoperfusion_show=false,
531 550
           this.Bring_show=false,
532 551
           this.catheterization_show=false,
533
-          // this.dialyzer_show=false,
534 552
           this.therapy_show=false,
535 553
           this.history_show=false,
536 554
           this.show14=false,
537
-          this.show15=false,
538 555
           this.show16=false,
539 556
           this.show17=false,
557
+          this.show18=false,
558
+          this.show19 = false,
559
+          this.show20 = false
540 560
           this.getAnticoagulationInformed()
541 561
         }
542 562
         if(row.value==7){
@@ -550,13 +570,14 @@ export default {
550 570
           this.hemoperfusion_show=false,
551 571
           this.Bring_show=false,
552 572
           this.catheterization_show=false,
553
-          // this.dialyzer_show=false,
554 573
           this.therapy_show=false,
555 574
           this.history_show=false,
556 575
           this.show14=false,
557
-          this.show15=false,
558 576
           this.show16=false,
559 577
           this.show17=false,
578
+          this.show18=false,
579
+          this.show19 = false,
580
+          this.show20 = false
560 581
           this.getCriticalInformed()
561 582
         }
562 583
         if(row.value==8){
@@ -570,13 +591,14 @@ export default {
570 591
           this.hemoperfusion_show=true,
571 592
           this.Bring_show=false,
572 593
           this.catheterization_show=false,
573
-          // this.dialyzer_show=false,
574 594
           this.therapy_show=false,
575 595
           this.history_show=false,
576 596
           this.show14=false,
577
-          this.show15=false,
578 597
           this.show16=false,
579 598
           this.show17=false,
599
+          this.show18=false,
600
+          this.show19 = false,
601
+          this.show20 = false
580 602
           this.getHemoperfusionInformed()
581 603
         }
582 604
         if(row.value==9){
@@ -590,13 +612,14 @@ export default {
590 612
           this.hemoperfusion_show=false,
591 613
           this.Bring_show=true,
592 614
           this.catheterization_show=false,
593
-          // this.dialyzer_show=false,
594 615
           this.therapy_show=false,
595 616
           this.history_show=false,
596 617
           this.show14=false,
597
-          this.show15=false,
598 618
           this.show16=false,
599 619
           this.show17=false,
620
+          this.show18=false,
621
+          this.show19 = false,
622
+          this.show20 = false
600 623
           this.getInformedConsent()
601 624
         }
602 625
         if(row.value==10){
@@ -610,17 +633,59 @@ export default {
610 633
           this.hemoperfusion_show=false,
611 634
           this.Bring_show=false,
612 635
           this.catheterization_show=true,
613
-          // this.dialyzer_show=false,
614 636
           this.therapy_show=false,
615 637
           this.history_show=false,
616 638
           this.show14=false,
617
-          this.show15=false,
618 639
           this.show16=false,
619
-          this.show17=false
640
+          this.show17=false,
641
+          this.show18=false,
642
+          this.show19 = false,
643
+          this.show20 = false
644
+        }
645
+        // if(row.value==11){
646
+        //   this.face_show=false
647
+        //   this.filter_show=false,
648
+        //   this.profunda_show=false,
649
+        //   this.arteriovenous_show=false,
650
+        //   this.Highrisk_show=false,
651
+        //   this.anticoagulation_show=false,
652
+        //   this.critical_show=false,
653
+        //   this.hemoperfusion_show=false,
654
+        //   this.Bring_show=false,
655
+        //   this.catheterization_show=false,
656
+        //   // this.dialyzer_show=true,
657
+        //   this.therapy_show=false,
658
+        //   this.history_show=false,
659
+        //   this.show14=false,
660
+        //   this.show15=false,
661
+        //   this.show16=false,
662
+        //   this.show17=false
663
+        //   this.getDialyzerInformed()
664
+        // }
665
+        if(row.value==12){
666
+          this.filter_show=false
667
+          this.face_show=false
668
+          this.profunda_show=false,
669
+          this.arteriovenous_show=false,
670
+          this.Highrisk_show=false,
671
+          this.anticoagulation_show=false,
672
+          this.critical_show=false,
673
+          this.hemoperfusion_show=false,
674
+          this.Bring_show=false,
675
+          this.catheterization_show=false,
676
+          this.therapy_show=true,
677
+          this.history_show=false,
678
+          this.show14=false,
679
+          this.show16=false,
680
+          this.show17=false,
681
+          this.show18=false,
682
+          this.show19 = false,
683
+          this.show20 = false
684
+          this.getTherapyInformed()
620 685
         }
621
-        if(row.value==11){
686
+        if(row.value==13){
687
+          this.filter_show=false
622 688
           this.face_show=false
623
-          this.filter_show=false,
624 689
           this.profunda_show=false,
625 690
           this.arteriovenous_show=false,
626 691
           this.Highrisk_show=false,
@@ -629,16 +694,17 @@ export default {
629 694
           this.hemoperfusion_show=false,
630 695
           this.Bring_show=false,
631 696
           this.catheterization_show=false,
632
-          // this.dialyzer_show=true,
633 697
           this.therapy_show=false,
634
-          this.history_show=false,
698
+          this.history_show=true,
635 699
           this.show14=false,
636
-          this.show15=false,
637 700
           this.show16=false,
638
-          this.show17=false
639
-          this.getDialyzerInformed()
701
+          this.show17=false,
702
+          this.show18=false,
703
+          this.show19 = false,
704
+          this.show20 = false
705
+          this.getPatientMeDicalList()
640 706
         }
641
-        if(row.value==12){
707
+        if(row.value==14){
642 708
           this.filter_show=false
643 709
           this.face_show=false
644 710
           this.profunda_show=false,
@@ -649,16 +715,36 @@ export default {
649 715
           this.hemoperfusion_show=false,
650 716
           this.Bring_show=false,
651 717
           this.catheterization_show=false,
652
-          // this.dialyzer_show=false,
653
-          this.therapy_show=true,
718
+          this.therapy_show=false,
654 719
           this.history_show=false,
655
-          this.show14=false,
656
-          this.show15=false,
720
+          this.show14=true,
657 721
           this.show16=false,
658
-          this.show17=false
659
-          this.getTherapyInformed()
722
+          this.show17=false,
723
+          this.show18=false,
724
+          this.show19 = false,
725
+          this.show20 = false
726
+          this.getTreamentPlan()
660 727
         }
661
-        if(row.value==13){
728
+        // if(row.value==15){
729
+
730
+        //   this.filter_show=false
731
+        //   this.face_show=false
732
+        //   this.profunda_show=false,
733
+        //   this.arteriovenous_show=false,
734
+        //   this.Highrisk_show=false,
735
+        //   this.anticoagulation_show=false,
736
+        //   this.critical_show=false,
737
+        //   this.hemoperfusion_show=false,
738
+        //   this.Bring_show=false,
739
+        //   this.catheterization_show=false,
740
+        //   this.therapy_show=false,
741
+        //   this.history_show=false,
742
+        //   this.show14=false,
743
+        //   this.show16=false,
744
+        //   this.show17=false
745
+        //   this.getPatientCriticalList()
746
+        // }
747
+        if(row.value==16){
662 748
           this.filter_show=false
663 749
           this.face_show=false
664 750
           this.profunda_show=false,
@@ -669,16 +755,17 @@ export default {
669 755
           this.hemoperfusion_show=false,
670 756
           this.Bring_show=false,
671 757
           this.catheterization_show=false,
672
-          // this.dialyzer_show=false,
673 758
           this.therapy_show=false,
674
-          this.history_show=true,
759
+          this.history_show=false,
675 760
           this.show14=false,
676
-          this.show15=false,
677
-          this.show16=false,
678
-          this.show17=false
679
-          this.getPatientMeDicalList()
761
+          this.show16=true,
762
+          this.show17=false,
763
+          this.show18=false,
764
+          this.show19 = false,
765
+          this.show20 = false
766
+          this.getPatientCriticalOneList()
680 767
         }
681
-        if(row.value==14){
768
+        if(row.value==17){
682 769
           this.filter_show=false
683 770
           this.face_show=false
684 771
           this.profunda_show=false,
@@ -689,17 +776,16 @@ export default {
689 776
           this.hemoperfusion_show=false,
690 777
           this.Bring_show=false,
691 778
           this.catheterization_show=false,
692
-          // this.dialyzer_show=false,
693 779
           this.therapy_show=false,
694 780
           this.history_show=false,
695
-          this.show14=true,
696
-          this.show15=false,
781
+          this.show14=false,
697 782
           this.show16=false,
698
-          this.show17=false
699
-          this.getTreamentPlan()
783
+          this.show17=true,
784
+          this.show18=false,
785
+          this.show19 = false,
786
+          this.show20 = false
700 787
         }
701
-        if(row.value==15){
702
-
788
+        if(row.value==18){
703 789
           this.filter_show=false
704 790
           this.face_show=false
705 791
           this.profunda_show=false,
@@ -710,16 +796,16 @@ export default {
710 796
           this.hemoperfusion_show=false,
711 797
           this.Bring_show=false,
712 798
           this.catheterization_show=false,
713
-          // this.dialyzer_show=false,
714 799
           this.therapy_show=false,
715 800
           this.history_show=false,
716 801
           this.show14=false,
717
-          this.show15=true,
718 802
           this.show16=false,
719
-          this.show17=false
720
-          this.getPatientCriticalList()
803
+          this.show17=false,
804
+          this.show18=true,
805
+          this.show19 = false,
806
+          this.show20 = false
721 807
         }
722
-        if(row.value==16){
808
+        if(row.value==19){
723 809
           this.filter_show=false
724 810
           this.face_show=false
725 811
           this.profunda_show=false,
@@ -730,16 +816,16 @@ export default {
730 816
           this.hemoperfusion_show=false,
731 817
           this.Bring_show=false,
732 818
           this.catheterization_show=false,
733
-          // this.dialyzer_show=false,
734 819
           this.therapy_show=false,
735 820
           this.history_show=false,
736 821
           this.show14=false,
737
-          this.show15=false,
738
-          this.show16=true,
739
-          this.show17=false
740
-          this.getPatientCriticalOneList()
822
+          this.show16=false,
823
+          this.show17=false,
824
+          this.show18=false,
825
+          this.show19 = true,
826
+          this.show20 = false
741 827
         }
742
-        if(row.value==17){
828
+        if(row.value==20){
743 829
           this.filter_show=false
744 830
           this.face_show=false
745 831
           this.profunda_show=false,
@@ -750,14 +836,14 @@ export default {
750 836
           this.hemoperfusion_show=false,
751 837
           this.Bring_show=false,
752 838
           this.catheterization_show=false,
753
-          // this.dialyzer_show=false,
754 839
           this.therapy_show=false,
755 840
           this.history_show=false,
756 841
           this.show14=false,
757
-          this.show15=false,
758 842
           this.show16=false,
759
-          this.show17=true
760
-          // this.getPatientCriticalOneList()
843
+          this.show17=false,
844
+          this.show18=false,
845
+          this.show19 = false,
846
+          this.show20 = true
761 847
         }
762 848
     },
763 849
 

+ 13 - 5
src/xt_pages/user/Informed/components/Bring_informed.vue Vedi File

@@ -8,7 +8,7 @@
8 8
           </el-button>
9 9
         <!--<el-button type="danger" style=""  @click="">
10 10
               删除
11
-        </el-button> -->
11
+        </el-button> <br/>-->
12 12
         <el-button type="success" style=""  @click="printThisPage">
13 13
             打印
14 14
         </el-button>
@@ -16,6 +16,7 @@
16 16
       <div id="print_content">
17 17
           <div class="print_page_main_content">
18 18
           <div class="content">
19
+              <div style="text-align: center;font-size: 20px;">{{ orgname }}</div>
19 20
               <h2 style="text-align: center;">自带药物代为注射告知知情同意书</h2>
20 21
 
21 22
               <div style="text-align: right;">
@@ -182,7 +183,7 @@ export default{
182 183
       patient:{},
183 184
       dialogVisible:false,
184 185
       content:content,
185
-      
186
+      orgname:'',
186 187
     }
187 188
    },
188 189
   methods:{
@@ -231,14 +232,14 @@ export default{
231 232
       this.dialogVisible=true
232 233
     },
233 234
     show(val){
234
-       
235
+
235 236
        if(val!=null){
236 237
         console.log("valw233223",val)
237 238
          if(val.content!=""){
238 239
            this.content = ""
239 240
            this.content = val.content
240 241
          }
241
-         
242
+
242 243
        }
243 244
      },
244 245
     saveBringInformed(){
@@ -246,7 +247,7 @@ export default{
246 247
           content:this.$refs.editor.content
247 248
         }
248 249
       saveBringInformed(params).then(response=>{
249
-        
250
+
250 251
          if(response.data.state ==1){
251 252
             var list = response.data.data.list
252 253
             this.dialogVisible = false
@@ -259,6 +260,7 @@ export default{
259 260
   },
260 261
   created(){
261 262
     console.log("自导哦呜呜呜呜呜呜呜呜呜",this.informedConsentPrint)
263
+    this.orgname = this.$store.getters.xt_user.org.org_name;
262 264
     if(this.informedConsentPrint!=null && this.informedConsentPrint.id >0){
263 265
        this.content = ""
264 266
        this.content = this.informedConsentPrint.content
@@ -284,4 +286,10 @@ export default{
284 286
         text-align: justify;
285 287
       }
286 288
   }
289
+  .print_page_main_content {
290
+    background-color: white;
291
+    width: 100%;
292
+    padding: 0 0 0 0;
293
+    page-break-after: always;
294
+  }
287 295
 </style>

+ 256 - 0
src/xt_pages/user/Informed/components/CRRT_informed.vue Vedi File

@@ -0,0 +1,256 @@
1
+<!-- 危重 -->
2
+<template>
3
+  <div style="border:1px solid gainsboro ;padding:10px">
4
+      <div style="position: relative; left: 400px;width: 250px;margin: 20px 0;">
5
+        <!-- <el-button type="primary">主要按钮</el-button> -->
6
+         <el-button type="primary" style=""  @click="bianji">
7
+              编辑
8
+          </el-button>
9
+        <!--<el-button type="danger" style=""  @click="">
10
+              删除
11
+        </el-button> -->
12
+        <el-button type="success" style=""  @click="printThisPage">
13
+            打印
14
+        </el-button>
15
+      </div>
16
+      <div id="print_content">
17
+        <div class="print_page_main_content">
18
+          <div class="content">
19
+              <h2 style="text-align: center;">{{orgname}}<br/>连续肾脏替代治疗(CRRT)治疗知情同意书</h2>
20
+
21
+              <div style="text-align: right;">
22
+                透析号:{{ patient.dialysis_no }}
23
+              </div>
24
+              <div style="display: flex;margin: 10px 0;">
25
+                <div style="flex:1">姓名:
26
+                  {{ patient.name }}
27
+                </div>
28
+                <div style="flex:1">性别:
29
+                  <span v-if="patient.gender == 1">男</span>
30
+                   <span v-if="patient.gender == 2">女</span>
31
+                </div>
32
+                <div style="flex:1">年龄:
33
+                  {{ getAge(patient) }}
34
+                </div>
35
+                <div style="flex:1">住院(门诊)号:
36
+                  {{ patient.admission_number }}
37
+                </div>
38
+              </div>
39
+              <div style="border-bottom: 1px solid gainsboro;">
40
+                诊断:
41
+                {{ patient.diagnose }}
42
+              </div>
43
+              <div v-html="content" ></div>
44
+          </div>
45
+        </div>
46
+      </div>
47
+      <el-dialog
48
+        title="提示"
49
+        :visible.sync="dialogVisible"
50
+        width="60%"
51
+        >
52
+        <div>
53
+          <h2 style="text-align: center;">连续肾脏替代治疗(CRRT)治疗知情同意书</h2>
54
+
55
+          <div style="text-align: right;">
56
+            透析号:{{ patient.dialysis_no }}
57
+          </div>
58
+          <div style="display: flex;margin: 10px 0;">
59
+            <div style="flex:1">姓名:{{ patient.name }}</div>
60
+            <div style="flex:1">性别:
61
+              <span v-if="patient.gender == 1">男</span>
62
+                <span v-if="patient.gender == 2">女</span>
63
+            </div>
64
+            <div style="flex:1">年龄:
65
+              {{ getAge(patient) }}
66
+            </div>
67
+            <div style="flex:1">住院(门诊)号:
68
+              {{ patient.admission_number }}
69
+            </div>
70
+          </div>
71
+          <div style="border-bottom: 1px solid gainsboro;">
72
+            诊断:
73
+            {{ patient.diagnose }}
74
+          </div>
75
+          <keep-alive>
76
+            <editor ref="editor"
77
+                    id="editor"
78
+                    style="width: 100%"
79
+                    v-bind:r_content="content">
80
+            </editor>
81
+          </keep-alive>
82
+        </div>
83
+        <span slot="footer" class="dialog-footer">
84
+          <el-button @click="dialogVisible = false">取 消</el-button>
85
+          <el-button type="primary" @click="saveCriticalInfomed">保 存</el-button>
86
+        </span>
87
+      </el-dialog>
88
+  </div>
89
+</template>
90
+
91
+<script>
92
+import print from "print-js";
93
+import Editor from '@/components/Editor'
94
+import { getPatientDetailInformedconsent,saveCriticalInfomed  } from '@/api/patient'
95
+import { jsGetAge, uParseTime } from "@/utils/tools";
96
+const content=`
97
+  <p>
98
+    <span>
99
+      患者因病情需要,需进行连续肾脏替代治疗(CRRT),该治疗具有一定危险性及损伤性,现将于该操作有关的危险性及可能的损伤向病人及家属告知如下:
100
+    </span>
101
+  </p>
102
+  <p>
103
+    <span>
104
+      1、由于治疗过程中需使用抗凝剂,因此有引起脑出血等全身出血的可能,(如该患者APTT明显延长,拟采取无肝素化CRRT,但有可能导致管路、血滤器凝血堵塞,提前中断治疗。)
105
+    </span>
106
+  </p>
107
+  <p>
108
+    <span> 2、可能合并或加重感染的症状;</span>
109
+  </p>
110
+  <p>
111
+    <span>3、有引起空气栓塞的可能;</span>
112
+  </p>
113
+  <p>
114
+    <span>4、可能因出现生物相容性问题,而致过敏反应;</span>
115
+  </p>
116
+  <p>
117
+    <span>
118
+      以上并发症出现的概率虽低,但均有可能出现,我们将尽量避免并做好抢救准备。对上述各种可能发生的情况如患者已知情并表示理解,经过认真考虑后同意接受治疗,愿意承担以上风险,请签字为证。
119
+    </span>
120
+  </p>
121
+  <p style="padding:10px 0px;">
122
+    <span>患者本人:</span>
123
+  </p>
124
+  <p style="padding:10px 0px;display:flex;align-items: center;">
125
+      <span style="display: inline-block;flex: 1;">委托人:&nbsp;&nbsp;&nbsp;&nbsp;</span>
126
+      <span style="display: inline-block;flex: 1;">与患者的关系:&nbsp;&nbsp;&nbsp;&nbsp;</span>
127
+  </p>
128
+  <p style="padding:10px 0px;display:flex;align-items: center;">
129
+      <span>医师签名:&nbsp;&nbsp;&nbsp;&nbsp;</span>
130
+  </p>
131
+  <p style="padding:10px 0px;align-items: center;text-align: right;width: 100%;">
132
+      <span>年&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;月&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;日</span>
133
+  </p>`
134
+
135
+export default{
136
+  props: {
137
+    patient_id: {
138
+        type: Number,
139
+      },
140
+      criticalInforPrint:{
141
+        type:Object,
142
+      }
143
+   },
144
+   components:{
145
+    Editor
146
+   },
147
+  data(){
148
+    return{
149
+      patient:{},
150
+      dialogVisible:false,
151
+      content:content,
152
+      orgname:'',
153
+    }
154
+   },
155
+  methods:{
156
+    getlist(){
157
+
158
+      getPatientDetailInformedconsent(this.patient_id).then(response=>{
159
+        if(response.data.state == 1){
160
+          var patient =  response.data.data.patients
161
+          console.log("patinet",patient)
162
+          this.patient =patient
163
+        }
164
+      })
165
+    },
166
+    printThisPage(){
167
+        const style = '@media print {.content p{font-size: 16px;font-family: SimSun;  margin-bottom: 5px;}}'
168
+        printJS({
169
+            printable: 'print_content',
170
+            type: 'html',
171
+            documentTitle: '  ',
172
+            style: style,
173
+            scanStyles: false
174
+        })
175
+    },
176
+    getAge: function(val) {
177
+        if (val.id_card_no == undefined) {
178
+          return false
179
+        }
180
+        var thisLen = val.id_card_no.length
181
+        var birth = ''
182
+        if (thisLen == 15) {
183
+          birth = '19' + val.id_card_no.substr(6, 6)
184
+        } else {
185
+          birth = val.id_card_no.substr(6, 8)
186
+        }
187
+        var birthtwo =
188
+          birth.substr(0, 4) +
189
+          '-' +
190
+          birth.substr(4, 2) +
191
+          '-' +
192
+          birth.substr(6, 2)
193
+
194
+        var age = jsGetAge(birthtwo, '-')
195
+        return age
196
+    },
197
+    bianji(){
198
+      this.dialogVisible=true
199
+    },
200
+    show(val){
201
+
202
+       if(val!=null){
203
+        console.log("valw233223",val)
204
+         if(val.content!=""){
205
+           this.content = ""
206
+           this.content = val.content
207
+         }
208
+
209
+       }
210
+     },
211
+    saveCriticalInfomed(){
212
+        var params = {
213
+          content:this.$refs.editor.content
214
+        }
215
+      saveCriticalInfomed(params).then(response=>{
216
+         if(response.data.state ==1){
217
+           var list = response.data.data.list
218
+           this.$message.success("保存成功")
219
+           this.dialogVisible = false
220
+           this.$emit("getCriticalInformed","");
221
+         }
222
+      })
223
+    }
224
+  },
225
+  created(){
226
+    this.orgname = this.$store.getters.xt_user.org.org_name;
227
+    console.log("haaaaaaaaaaaaaaaaaaa",this.criticalInforPrint)
228
+    if(this.criticalInforPrint!=null && this.criticalInforPrint.id>0){
229
+        this.content = ""
230
+        this.content = this.criticalInforPrint.content
231
+    }
232
+    this.getlist()
233
+  }
234
+}
235
+</script>
236
+<style lang="scss" scoped>
237
+
238
+*{
239
+  // margin: 0;
240
+  // padding: 0;
241
+  border: 0;
242
+}
243
+  .content{
244
+      p{
245
+        font-size: 16px;
246
+        font-family: '新宋体';
247
+        line-height: 22px;
248
+        // padding-left: 20px;
249
+        margin-bottom: 5px;
250
+        text-align: justify;
251
+      }
252
+  }
253
+.wrapper {
254
+  white-space: pre-wrap;
255
+}
256
+</style>

+ 13 - 12
src/xt_pages/user/Informed/components/Falloutbedprint.vue Vedi File

@@ -15,7 +15,7 @@
15 15
         <div id="print_content">
16 16
           <div class="print_page_main_content">
17 17
             <div class="content">
18
-                
18
+              <div style="text-align: center;font-size: 20px;">{{ orgname }}</div>
19 19
                 <h2 style="text-align: center;">人脸识别知情同意书</h2>
20 20
                 <!-- <div style="display: inline-block;border: 1px solid black;width: 20px;height: 20px;"></div> -->
21 21
                 <div style="text-align: right;">
@@ -166,11 +166,12 @@ export default{
166 166
       patient:{},
167 167
       content:content,
168 168
       dialogVisible:false,
169
+      orgname:''
169 170
     }
170 171
    },
171 172
 
172 173
    created(){
173
-     console.log("list_printwoowowowo",this.listPrint)
174
+      this.orgname = this.$store.getters.xt_user.org.org_name;
174 175
      if(this.listPrint!=null&& this.listPrint.id >0){
175 176
        this.content =""
176 177
        this.content = this.listPrint.content
@@ -222,14 +223,14 @@ export default{
222 223
         this.dialogVisible =true
223 224
       },
224 225
       show(val){
225
-       
226
+
226 227
        if(val!=null){
227 228
         console.log("valw233223",val)
228 229
          if(val.content!=""){
229 230
            this.content = ""
230 231
            this.content = val.content
231 232
          }
232
-         
233
+
233 234
        }
234 235
      },
235 236
       saveFallOutBedPrint(){
@@ -245,8 +246,8 @@ export default{
245 246
               this.$emit("getFallOutBedPrintList","");
246 247
               this.dialogVisible = false
247 248
 
248
-             
249
-            
249
+
250
+
250 251
 
251 252
            }
252 253
         })
@@ -255,12 +256,12 @@ export default{
255 256
 }
256 257
 </script>
257 258
 <style lang="scss" scoped>
258
-// .print_page_main_content {
259
-//     background-color: white;
260
-//     width: 960px;
261
-//     padding: 0 0 0 0;
262
-//     page-break-after: always;
263
-//   }
259
+.print_page_main_content {
260
+    background-color: white;
261
+    width: 100%;
262
+    padding: 0 0 0 0;
263
+    page-break-after: always;
264
+  }
264 265
 *{
265 266
     // margin: 0;
266 267
     // padding: 0;

+ 15 - 6
src/xt_pages/user/Informed/components/Filter_informed.vue Vedi File

@@ -15,6 +15,7 @@
15 15
       <div id="print_content">
16 16
           <div class="print_page_main_content">
17 17
           <div class="content">
18
+              <div style="text-align: center;font-size: 20px;">{{ orgname }}</div>
18 19
               <h2 style="text-align: center;">血液透析(滤过,灌流)治疗知情同意书</h2>
19 20
 
20 21
               <div style="text-align: right;">
@@ -37,7 +38,7 @@
37 38
                 诊断:{{ patient.diagnose }}
38 39
               </div>
39 40
               <div v-html="content"></div>
40
- 
41
+
41 42
           </div>
42 43
         </div>
43 44
       </div>
@@ -221,21 +222,23 @@ export default{
221 222
       patient:{},
222 223
       content:content,
223 224
       dialogVisible:false,
225
+       orgname:''
224 226
     }
225 227
    },
226 228
 
227 229
    created(){
230
+    this.orgname = this.$store.getters.xt_user.org.org_name;
228 231
     if(this.filterList!=null && this.filterList.id >0){
229
-      
232
+
230 233
        this.content = ""
231 234
        this.content = this.filterList.content
232 235
      }
233 236
      this.getlist()
234
-     
237
+
235 238
    },
236 239
     methods:{
237 240
       getlist(){
238
-     
241
+
239 242
         getPatientDetailInformedconsent(this.patient_id).then(response=>{
240 243
           if(response.data.state == 1){
241 244
             var patient =  response.data.data.patients
@@ -279,14 +282,14 @@ export default{
279 282
         this.dialogVisible=true
280 283
       },
281 284
       show(val){
282
-       
285
+
283 286
        if(val!=null){
284 287
         console.log("valw233223",val)
285 288
          if(val.content!=""){
286 289
            this.content = ""
287 290
            this.content = val.content
288 291
          }
289
-         
292
+
290 293
        }
291 294
      },
292 295
       saveFilterInformed(){
@@ -323,5 +326,11 @@ export default{
323 326
         text-align: justify;
324 327
       }
325 328
   }
329
+  .print_page_main_content {
330
+    background-color: white;
331
+    width: 100%;
332
+    padding: 0 0 0 0;
333
+    page-break-after: always;
334
+  }
326 335
 </style>
327 336
 

+ 17 - 14
src/xt_pages/user/Informed/components/Highrisk_informed.vue Vedi File

@@ -16,6 +16,7 @@
16 16
         <div id="print_content">
17 17
             <div class="print_page_main_content">
18 18
             <div class="content">
19
+              <div style="text-align: center;font-size: 20px;">{{ orgname }}</div>
19 20
                 <h2 style="text-align: center;">高危出血患者血液净化抗凝方式选择知情同意书</h2>
20 21
 
21 22
                 <div style="text-align: right;">
@@ -41,7 +42,7 @@
41 42
                   {{ patient.diagnose }}
42 43
                 </div>
43 44
                 <div v-html="content"></div>
44
- 
45
+
45 46
             </div>
46 47
             </div>
47 48
         </div>
@@ -145,7 +146,7 @@ const content=`<p style='position: relative;padding-left: 2em;margin-top: 10px;m
145 146
 <p style="padding:0 20px;display:flex;justify-content: space-between;align-items: center;">
146 147
     <span>签名日期:_______年____月____日</span>
147 148
     <span>签名日期:_______年____月____日</span>
148
-</p>`
149
+</p> `
149 150
 export default{
150 151
   props: {
151 152
     patient_id: {
@@ -162,7 +163,8 @@ export default{
162 163
     return{
163 164
       patient:{},
164 165
       dialogVisible:false,
165
-      content:content
166
+      content:content,
167
+      orgname:''
166 168
     }
167 169
    },
168 170
     methods:{
@@ -211,14 +213,14 @@ export default{
211 213
         this.dialogVisible=true
212 214
       },
213 215
       show(val){
214
-       
216
+
215 217
        if(val!=null){
216 218
         console.log("valw233223",val)
217 219
          if(val.content!=""){
218 220
            this.content = ""
219 221
            this.content = val.content
220 222
          }
221
-         
223
+
222 224
        }
223 225
      },
224 226
       saveHighriskInformed(){
@@ -228,15 +230,16 @@ export default{
228 230
         saveHighriskInformed(params).then(response=>{
229 231
            if(response.data.state ==1){
230 232
              var list = response.data.data.list
231
-             this.dialogVisible = false 
233
+             this.dialogVisible = false
232 234
              this.$message.success("保存成功!")
233 235
              this.$emit("getHighRiskInformed","");
234 236
            }
235
-           
237
+
236 238
         })
237 239
       }
238 240
     },
239 241
     created(){
242
+      this.orgname = this.$store.getters.xt_user.org.org_name;
240 243
       console.log("highRiskPrint",this.highRiskPrint)
241 244
       if(this.highRiskPrint!=null && this.highRiskPrint.id >0){
242 245
         this.content = ""
@@ -247,16 +250,16 @@ export default{
247 250
 }
248 251
 </script>
249 252
 <style lang="scss" scoped>
250
-// .print_page_main_content {
251
-//     background-color: white;
252
-//     width: 960px;
253
-//     padding: 0 0 0 0;
254
-//     page-break-after: always;
255
-//   }
253
+ .print_page_main_content {
254
+    background-color: white;
255
+    width: 100%;
256
+    padding: 0 0 0 0;
257
+    page-break-after: always;
258
+   }
256 259
 *{
257 260
     // margin: 0;
258 261
     // padding: 0;
259
-    border: 0;
262
+    // border: 0;
260 263
 }
261 264
     .content{
262 265
         p{

+ 18 - 10
src/xt_pages/user/Informed/components/Medicalhistory.vue Vedi File

@@ -14,6 +14,7 @@
14 14
     <div id="print_content">
15 15
       <div class="print_page_main_content">
16 16
         <div class="content">
17
+          <div style="text-align: center;font-size: 20px;">{{ orgname }}</div>
17 18
           <h2 style="text-align: center;margin-bottom: 20px;">门诊血液透析治疗病历首页</h2>
18 19
           <div style="display: flex;padding: 0 5px 10px 5px">
19 20
             <div style="flex: 1;">门诊号<span class="unile">{{ patient.admission_number }}</span></div>
@@ -149,7 +150,7 @@
149 150
             <div style="flex: 1;">门诊号
150 151
               <span style="display: inline-block;border-bottom: 1px solid black;width: 60%;">{{ patient.admission_number }}</span>
151 152
             </div>
152
-            <div style="flex: 1;">透析号 
153
+            <div style="flex: 1;">透析号
153 154
               <span style="display: inline-block;border-bottom: 1px solid black;width: 60%;">{{ patient.admission_number }}</span>
154 155
             </div>
155 156
             <div style="flex: 1;">姓名:
@@ -180,23 +181,23 @@
180 181
           <div style='padding: 10px 5px'>
181 182
             <div>
182 183
               现住址(详填)<span style="display: inline-block;border-bottom: 1px solid black;width: 60%;"> </span>
183
-            
184
+
184 185
             </div>
185
-            
186
+
186 187
           </div>
187 188
           <div style='padding: 10px 5px'>
188 189
             <div>
189 190
               家庭住址<span style="display: inline-block;border-bottom: 1px solid black;width: 60%;"> </span>
190
-            
191
+
191 192
             </div>
192
-           
193
+
193 194
           </div>
194 195
           <div style="display: flex;padding: 10px 5px">
195 196
             <div style="flex: 1;">
196 197
               本人电话
197 198
               <span style="display: inline-block;border-bottom: 1px solid black;width: 60%;"> </span>
198 199
             </div>
199
-          
200
+
200 201
             <div style="flex: 1.5;">
201 202
               亲属联系方式
202 203
               <span style="display: inline-block;border-bottom: 1px solid black;width: 60%;"> </span>
@@ -209,7 +210,7 @@
209 210
           <div style="padding: 10px 5px">诊断:
210 211
             <span style="display: inline-block;border-bottom: 1px solid black;width: 60%;">{{ patient.diagnose }}</span>
211 212
           </div>
212
-          <!-- <div style="padding: 10px 5px">合并症或并发症 
213
+          <!-- <div style="padding: 10px 5px">合并症或并发症
213 214
             <span style="display: inline-block;border-bottom: 1px solid black;width: 60%;"></span>
214 215
           </div> -->
215 216
           <keep-alive>
@@ -315,6 +316,7 @@ export default{
315 316
       patient:{},
316 317
       dialogVisible:false,
317 318
       content:content,
319
+      orgname:'',
318 320
 
319 321
       number:'',
320 322
       sex:'',
@@ -326,6 +328,7 @@ export default{
326 328
     }
327 329
   },
328 330
   created(){
331
+    this.orgname = this.$store.getters.xt_user.org.org_name;
329 332
     if(this.medicalList!=null && this.medicalList.id >0){
330 333
         this.content = ""
331 334
         this.content = this.medicalList.content
@@ -342,7 +345,7 @@ export default{
342 345
            this.content = ""
343 346
            this.content = val.content
344 347
          }
345
-         
348
+
346 349
        }
347 350
     },
348 351
     getlist(){
@@ -417,7 +420,7 @@ export default{
417 420
            this.$message.success("保存成功!")
418 421
            this.dialogVisible =false
419 422
            this.$emit("getPatientMeDicalList","");
420
-          
423
+
421 424
         }
422 425
       })
423 426
     }
@@ -473,6 +476,11 @@ input[type="checkbox"]{
473 476
     /* padding: 0; */
474 477
     -webkit-appearance: checkbox;
475 478
 }
476
-
479
+.print_page_main_content {
480
+    background-color: white;
481
+    width: 100%;
482
+    padding: 0 0 0 0;
483
+    page-break-after: always;
484
+  }
477 485
 
478 486
 </style>

+ 263 - 0
src/xt_pages/user/Informed/components/Terminate_informed.vue Vedi File

@@ -0,0 +1,263 @@
1
+<!-- 透析器(滤器) -->
2
+<!-- 自带 -->
3
+<template>
4
+  <div style="border:1px solid gainsboro ;padding:10px">
5
+      <div style="position: relative; left: 400px;width: 250px;margin: 20px 0;">
6
+        <!-- <el-button type="primary">主要按钮</el-button> -->
7
+         <el-button type="primary" style=""  @click="bianji">
8
+              编辑
9
+          </el-button>
10
+        <!--<el-button type="danger" style=""  @click="">
11
+              删除
12
+        </el-button> -->
13
+        <el-button type="success" style=""  @click="printThisPage">
14
+            打印
15
+        </el-button>
16
+      </div>
17
+      <div id="print_content">
18
+          <div class="print_page_main_content">
19
+          <div class="content">
20
+            <div style="text-align: center;font-size: 20px;">{{ orgname }}</div>
21
+              <h2 style="text-align: center;">患方要求终止治疗及风险、责任承担承诺书</h2>
22
+
23
+              <div style="text-align: right;">
24
+                透析号:{{ patient.dialysis_no }}
25
+              </div>
26
+              <div style="display: flex;margin: 10px 0;">
27
+                <div style="flex:1">姓名:
28
+                  {{ patient.name }}
29
+                </div>
30
+                <div style="flex:1">性别:
31
+                  <span v-if="patient.gender == 1">男</span>
32
+                   <span v-if="patient.gender == 2">女</span>
33
+                </div>
34
+                <div style="flex:1">年龄:
35
+                  {{ getAge(patient) }}
36
+                </div>
37
+                <div style="flex:1">住院(门诊)号:
38
+                  {{ patient.admission_number }}
39
+                </div>
40
+              </div>
41
+              <div style="border-bottom: 1px solid gainsboro;">
42
+                诊断:
43
+                {{ patient.diagnose }}
44
+              </div>
45
+              <div v-html="content"></div>
46
+
47
+          </div>
48
+          </div>
49
+      </div>
50
+      <el-dialog
51
+        title="提示"
52
+        :visible.sync="dialogVisible"
53
+        width="60%"
54
+        >
55
+        <div>
56
+          <h2 style="text-align: center;">患方要求终止治疗及风险、责任承担承诺书</h2>
57
+
58
+          <div style="text-align: right;">
59
+            透析号:{{ patient.dialysis_no }}
60
+          </div>
61
+          <div style="display: flex;margin: 10px 0;">
62
+            <div style="flex:1">姓名:{{ patient.name }}</div>
63
+            <div style="flex:1">性别:
64
+              <span v-if="patient.gender == 1">男</span>
65
+                <span v-if="patient.gender == 2">女</span>
66
+            </div>
67
+            <div style="flex:1">年龄:
68
+              {{ getAge(patient) }}
69
+            </div>
70
+            <div style="flex:1">住院(门诊)号:
71
+              {{ patient.admission_number }}
72
+            </div>
73
+          </div>
74
+          <div style="border-bottom: 1px solid gainsboro;">
75
+            诊断:
76
+            {{ patient.diagnose }}
77
+          </div>
78
+          <keep-alive>
79
+            <editor ref="editor"
80
+                    id="editor"
81
+                    style="width: 100%"
82
+                    v-bind:r_content="content">
83
+            </editor>
84
+          </keep-alive>
85
+        </div>
86
+        <span slot="footer" class="dialog-footer">
87
+          <el-button @click="dialogVisible = false">取 消</el-button>
88
+          <el-button type="primary" @click="saveDialyzerInformed">保 存</el-button>
89
+        </span>
90
+      </el-dialog>
91
+  </div>
92
+</template>
93
+
94
+<script>
95
+import print from "print-js";
96
+import Editor from '@/components/Editor'
97
+import { getPatientDetailInformedconsent,saveDialyzerInformed  } from '@/api/patient'
98
+import { jsGetAge, uParseTime } from "@/utils/tools";
99
+const content=`
100
+    <p style="text-indent:20px">
101
+      <span >
102
+        医院在任何情况下都是以抢救患者生命为己任,院方不支持、不主张放弃对任何患者的治疗和抢救,但医院会尊重患者及家属在治疗上的选择权,包括终止治疗的选择权。
103
+      </span>
104
+    </p>
105
+    <p style="text-indent:20px">
106
+      <span >
107
+        医院要遵守相应的诊疗规范,有权利和义务对患者积极抢救和治疗,在某些特殊情况下,出于某些特殊的原因,患者和家属要求终止治疗、撤销对患者的生命支持、放弃临终前的抢救。例如恶性肿瘤终末期患者、脑死亡患者、某些重要器官功能衰竭终末期又没有可能寻求替代疗法等。医生对这些患者只可能尽量减轻其痛苦、给患者的生命维持、支持治疗,进行必要的心肺复苏抢救。只要不违背人道主义和国家法律法规,医方将尊重患者和家属的意愿和选择。
108
+      </span>
109
+    </p>
110
+    <p style="text-indent:20px">
111
+      <span>如果您和全家一致要求终止对患者的治疗,我们确认:</span>
112
+    </p>
113
+    <p>
114
+      <span>1、此决定没有违背患者本人的意愿。</span>
115
+    </p>
116
+    <p>
117
+      <span>2、如果患者本人已经无法履行这样权利时,要有一份正式的授权委托书,证明您有权替患者做出这样的决定。</span>
118
+    </p>
119
+    <p>
120
+      <span>患方须承担相关医疗风险和法律责任,患方承诺同意承担,方可签字。</span>
121
+    </p>
122
+    <p>
123
+      <span>我们要求在患者死亡前放弃对患者的心肺复苏相关抢救。</span>
124
+    </p>
125
+    <p>
126
+      <span>我们要求撤销目前对患者的生命支持治疗。</span>
127
+    </p>
128
+    <p>
129
+      <span>我们要求终止目前对患者治疗。</span>
130
+    </p>
131
+    <p>
132
+      <span>其他:  </span>
133
+    </p>
134
+    <p style="padding:10px 0px;display:flex;align-items: center;">
135
+        <span style="display: inline-block;flex: 1;">患者签名:&nbsp;&nbsp;&nbsp;&nbsp;</span>
136
+        <span style="display: inline-block;flex: 1;">医生签名:&nbsp;&nbsp;&nbsp;&nbsp;</span>
137
+    </p>
138
+    <p style="padding:10px 0px;display:flex;align-items: center;">
139
+        <span>家属签名:&nbsp;&nbsp;&nbsp;&nbsp;</span>
140
+    </p>
141
+    <p style="padding:10px 0px;display:flex;align-items: center;">
142
+        <span style="display: inline-block;flex: 1;">与患者关系:&nbsp;&nbsp;&nbsp;&nbsp;</span>
143
+        <span style="display: inline-block;flex: 1;">日期及时间:&nbsp;&nbsp;&nbsp;&nbsp;</span>
144
+    </p>`
145
+export default{
146
+  props: {
147
+    patient_id: {
148
+        type: Number,
149
+      },
150
+      dialyzerInformedPrint:{
151
+        type:Object
152
+      }
153
+   },
154
+   components:{
155
+    Editor
156
+   },
157
+  data(){
158
+    return{
159
+      patient:{},
160
+      dialogVisible:false,
161
+      content:content,
162
+      orgname:'',
163
+    }
164
+   },
165
+  methods:{
166
+      getlist(){
167
+        getPatientDetailInformedconsent(this.patient_id).then(response=>{
168
+          if(response.data.state == 1){
169
+            var patient =  response.data.data.patients
170
+            console.log("patinet",patient)
171
+            this.patient =patient
172
+          }
173
+        })
174
+      },
175
+      printThisPage(){
176
+          const style = '@media print {.content p{font-size: 16px;font-family: 新宋体;  margin-bottom: 5px;}}'
177
+          printJS({
178
+              printable: 'print_content',
179
+              type: 'html',
180
+              documentTitle: '  ',
181
+              style: style,
182
+              scanStyles: false
183
+          })
184
+      },
185
+      getAge: function(val) {
186
+          if (val.id_card_no == undefined) {
187
+            return false
188
+          }
189
+          var thisLen = val.id_card_no.length
190
+          var birth = ''
191
+          if (thisLen == 15) {
192
+            birth = '19' + val.id_card_no.substr(6, 6)
193
+          } else {
194
+            birth = val.id_card_no.substr(6, 8)
195
+          }
196
+          var birthtwo =
197
+            birth.substr(0, 4) +
198
+            '-' +
199
+            birth.substr(4, 2) +
200
+            '-' +
201
+            birth.substr(6, 2)
202
+
203
+          var age = jsGetAge(birthtwo, '-')
204
+          return age
205
+      },
206
+      bianji(){
207
+        this.dialogVisible=true
208
+      },
209
+      show(val){
210
+
211
+       if(val!=null){
212
+        console.log("valw233223",val)
213
+         if(val.content!=""){
214
+           this.content = ""
215
+           this.content = val.content
216
+         }
217
+
218
+       }
219
+     },
220
+      saveDialyzerInformed(){
221
+         var params = {
222
+          content:this.$refs.editor.content,
223
+         }
224
+        saveDialyzerInformed(params).then(response=>{
225
+           if(response.data.state ==1){
226
+             var list = response.data.data.list
227
+            this.$message.success("保存成功!")
228
+            this.dialogVisible = false
229
+            this.$emit("getDialyzerInformed","");
230
+           }
231
+        })
232
+      }
233
+
234
+  },
235
+  created(){
236
+    this.orgname = this.$store.getters.xt_user.org.org_name;
237
+    console.log("hhahdfhahdfhahdf",this.dialyzerInformedPrint)
238
+    if(this.dialyzerInformedPrint!=null&& this.dialyzerInformedPrint.id >0){
239
+        this.content = ""
240
+        this.content =this.dialyzerInformedPrint.content
241
+    }
242
+    this.getlist()
243
+  }
244
+}
245
+</script>
246
+<style lang="scss" scoped>
247
+
248
+*{
249
+  // margin: 0;
250
+  // padding: 0;
251
+  border: 0;
252
+}
253
+  .content{
254
+      p{
255
+        font-size: 16px;
256
+        font-family: '新宋体';
257
+        line-height: 22px;
258
+        // padding-left: 20px;
259
+        margin-bottom: 5px;
260
+        text-align: justify;
261
+      }
262
+  }
263
+</style>

+ 72 - 65
src/xt_pages/user/Informed/components/anticoagulation_informed.vue Vedi File

@@ -16,6 +16,7 @@
16 16
       <div id="print_content">
17 17
         <div class="print_page_main_content">
18 18
           <div class="content">
19
+              <div style="text-align: center;font-size: 20px;">{{ orgname }}</div>
19 20
               <h2 style="text-align: center;">抗凝溶栓治疗知情同意书</h2>
20 21
 
21 22
               <div style="text-align: right;">
@@ -250,80 +251,80 @@ export default{
250 251
     return{
251 252
       patient:{},
252 253
       dialogVisible:false,
253
-      content:content
254
+      content:content,
255
+      orgname:'',
254 256
     }
255 257
    },
256 258
   methods:{
257 259
     getlist(){
258
-
259
-        getPatientDetailInformedconsent(this.patient_id).then(response=>{
260
-          if(response.data.state == 1){
261
-            var patient =  response.data.data.patients
262
-            console.log("patinet",patient)
263
-            this.patient =patient
264
-          }
260
+      getPatientDetailInformedconsent(this.patient_id).then(response=>{
261
+        if(response.data.state == 1){
262
+          var patient =  response.data.data.patients
263
+          console.log("patinet",patient)
264
+          this.patient =patient
265
+        }
266
+      })
267
+    },
268
+    printThisPage(){
269
+        const style = '@media print {.content p{font-size: 16px;font-family: 新宋体; padding-left: 20px; margin-bottom: 5px;}}'
270
+        printJS({
271
+            printable: 'print_content',
272
+            type: 'html',
273
+            documentTitle: '  ',
274
+            style: style,
275
+            scanStyles: false
265 276
         })
266
-       },
267
-      printThisPage(){
268
-          const style = '@media print {.content p{font-size: 16px;font-family: 新宋体; padding-left: 20px; margin-bottom: 5px;}}'
269
-          printJS({
270
-              printable: 'print_content',
271
-              type: 'html',
272
-              documentTitle: '  ',
273
-              style: style,
274
-              scanStyles: false
275
-          })
276
-      },
277
-      getAge: function(val) {
278
-          if (val.id_card_no == undefined) {
279
-            return false
280
-          }
281
-          var thisLen = val.id_card_no.length
282
-          var birth = ''
283
-          if (thisLen == 15) {
284
-            birth = '19' + val.id_card_no.substr(6, 6)
285
-          } else {
286
-            birth = val.id_card_no.substr(6, 8)
287
-          }
288
-          var birthtwo =
289
-            birth.substr(0, 4) +
290
-            '-' +
291
-            birth.substr(4, 2) +
292
-            '-' +
293
-            birth.substr(6, 2)
277
+    },
278
+    getAge: function(val) {
279
+        if (val.id_card_no == undefined) {
280
+          return false
281
+        }
282
+        var thisLen = val.id_card_no.length
283
+        var birth = ''
284
+        if (thisLen == 15) {
285
+          birth = '19' + val.id_card_no.substr(6, 6)
286
+        } else {
287
+          birth = val.id_card_no.substr(6, 8)
288
+        }
289
+        var birthtwo =
290
+          birth.substr(0, 4) +
291
+          '-' +
292
+          birth.substr(4, 2) +
293
+          '-' +
294
+          birth.substr(6, 2)
295
+
296
+        var age = jsGetAge(birthtwo, '-')
297
+        return age
298
+    },
299
+    bianji(){
300
+      this.dialogVisible=true
301
+    },
302
+    show(val){
303
+      if(val!=null){
304
+      console.log("valw233223",val)
305
+        if(val.content!=""){
306
+          this.content = ""
307
+          this.content = val.content
308
+        }
294 309
 
295
-          var age = jsGetAge(birthtwo, '-')
296
-          return age
297
-      },
298
-      bianji(){
299
-        this.dialogVisible=true
300
-      },
301
-      show(val){
302
-       
303
-       if(val!=null){
304
-        console.log("valw233223",val)
305
-         if(val.content!=""){
306
-           this.content = ""
307
-           this.content = val.content
308
-         }
309
-         
310
-       }
311
-     },
312
-      saveAnticoagulation(){
313
-          var params = {
314
-            content:this.$refs.editor.content
315
-          }
316
-        saveAnticoagulation(params).then(response=>{
317
-            if(response.data.state ==1){
318
-              var list = response.data.data.list
319
-              this.$message.success("保存成功")
320
-              this.dialogVisible = false
321
-              this.$emit("getAnticoagulationInformed","");
322
-            }
323
-        })
324 310
       }
311
+    },
312
+    saveAnticoagulation(){
313
+        var params = {
314
+          content:this.$refs.editor.content
315
+        }
316
+      saveAnticoagulation(params).then(response=>{
317
+          if(response.data.state ==1){
318
+            var list = response.data.data.list
319
+            this.$message.success("保存成功")
320
+            this.dialogVisible = false
321
+            this.$emit("getAnticoagulationInformed","");
322
+          }
323
+      })
324
+    }
325 325
   },
326 326
   created(){
327
+    this.orgname = this.$store.getters.xt_user.org.org_name;
327 328
     if(this.auncoagulationPrint!=null && this.auncoagulationPrint.id >0){
328 329
        this.content = ""
329 330
        this.content = this.auncoagulationPrint.content
@@ -349,4 +350,10 @@ export default{
349 350
         text-align: justify;
350 351
       }
351 352
   }
353
+  .print_page_main_content {
354
+    background-color: white;
355
+    width: 100%;
356
+    padding: 0 0 0 0;
357
+    page-break-after: always;
358
+  }
352 359
 </style>

+ 14 - 5
src/xt_pages/user/Informed/components/arteriovenous_informed.vue Vedi File

@@ -15,6 +15,7 @@
15 15
       <div id="print_content">
16 16
         <div class="print_page_main_content">
17 17
           <div class="content">
18
+            <div style="text-align: center;font-size: 20px;">{{ orgname }}</div>
18 19
               <h2 style="text-align: center;">动静脉内瘘穿刺知情同意书</h2>
19 20
 
20 21
               <div style="text-align: right;">
@@ -181,16 +182,18 @@ export default{
181 182
     return{
182 183
       patient:{},
183 184
       dialogVisible:false,
184
-      content:content
185
+      content:content,
186
+      orgname:'',
185 187
     }
186 188
    },
187 189
   created(){
190
+    this.orgname = this.$store.getters.xt_user.org.org_name;
188 191
     if(this.arterOvenousPrint!=null && this.arterOvenousPrint.id > 0){
189
-        
192
+
190 193
       this.content = ""
191 194
       this.content = this.arterOvenousPrint.content
192 195
     }
193
-    
196
+
194 197
     this.getlist()
195 198
   },
196 199
   methods:{
@@ -238,14 +241,14 @@ export default{
238 241
       this.dialogVisible=true
239 242
     },
240 243
     show(val){
241
-       
244
+
242 245
        if(val!=null){
243 246
         console.log("valw233223",val)
244 247
          if(val.content!=""){
245 248
            this.content = ""
246 249
            this.content = val.content
247 250
          }
248
-         
251
+
249 252
        }
250 253
      },
251 254
     saveArterOvenous(){
@@ -307,4 +310,10 @@ export default{
307 310
       }
308 311
 
309 312
   }
313
+  .print_page_main_content {
314
+    background-color: white;
315
+    width: 100%;
316
+    padding: 0 0 0 0;
317
+    page-break-after: always;
318
+  }
310 319
 </style>

+ 13 - 4
src/xt_pages/user/Informed/components/catheterization_informed.vue Vedi File

@@ -17,6 +17,7 @@
17 17
       <div id="print_content">
18 18
         <div class="print_page_main_content">
19 19
           <div class="content">
20
+              <div style="text-align: center;font-size: 20px;">{{ orgname }}</div>
20 21
               <h2 style="text-align: center;">深静脉透析导管置入术知情同意书</h2>
21 22
 
22 23
               <div style="text-align: right;">
@@ -42,7 +43,7 @@
42 43
                 {{ patient.diagnose }}
43 44
               </div>
44 45
               <div v-html="content"></div>
45
- 
46
+
46 47
           </div>
47 48
         </div>
48 49
       </div>
@@ -220,7 +221,8 @@ export default{
220 221
     return{
221 222
       patient:{},
222 223
       dialogVisible:false,
223
-      content:content
224
+      content:content,
225
+      orgname:''
224 226
     }
225 227
    },
226 228
   methods:{
@@ -269,14 +271,14 @@ export default{
269 271
       this.dialogVisible =true
270 272
     },
271 273
     show(val){
272
-       
274
+
273 275
        if(val!=null){
274 276
         console.log("valw233223",val)
275 277
          if(val.content!=""){
276 278
            this.content = ""
277 279
            this.content = val.content
278 280
          }
279
-         
281
+
280 282
        }
281 283
      },
282 284
     saveCatheterization(){
@@ -295,6 +297,7 @@ export default{
295 297
   },
296 298
   created(){
297 299
     console.log("hhahfhahdhfahhdf",this.cathetherizationPrint)
300
+    this.orgname = this.$store.getters.xt_user.org.org_name;
298 301
     if(this.cathetherizationPrint!=null && this.cathetherizationPrint.id >0){
299 302
        this.content = ""
300 303
        this.content = this.cathetherizationPrint.content
@@ -320,4 +323,10 @@ export default{
320 323
         text-align: justify;
321 324
       }
322 325
   }
326
+  .print_page_main_content {
327
+    background-color: white;
328
+    width: 100%;
329
+    padding: 0 0 0 0;
330
+    page-break-after: always;
331
+  }
323 332
 </style>

+ 4 - 1
src/xt_pages/user/Informed/components/critical_informed.vue Vedi File

@@ -16,6 +16,7 @@
16 16
       <div id="print_content">
17 17
         <div class="print_page_main_content">
18 18
           <div class="content">
19
+              <div style="text-align: center;font-size: 20px;">{{ orgname }}</div>
19 20
               <h2 style="text-align: center;">危重患者接受血液净化治疗知情同意书</h2>
20 21
 
21 22
               <div style="text-align: right;">
@@ -162,7 +163,8 @@ export default{
162 163
     return{
163 164
       patient:{},
164 165
       dialogVisible:false,
165
-      content:content
166
+      content:content,
167
+      orgname:''
166 168
     }
167 169
    },
168 170
   methods:{
@@ -237,6 +239,7 @@ export default{
237 239
   },
238 240
   created(){
239 241
     console.log("haaaaaaaaaaaaaaaaaaa",this.criticalInforPrint)
242
+    this.orgname = this.$store.getters.xt_user.org.org_name;
240 243
     if(this.criticalInforPrint!=null && this.criticalInforPrint.id>0){
241 244
         this.content = ""
242 245
         this.content = this.criticalInforPrint.content

+ 10 - 2
src/xt_pages/user/Informed/components/criticalpatient_informed2.vue Vedi File

@@ -16,6 +16,7 @@
16 16
       <div id="print_content">
17 17
         <div class="print_page_main_content">
18 18
           <div class="content">
19
+              <div style="text-align: center;font-size: 20px;">{{ orgname }}</div>
19 20
               <h2 style="text-align: center;">危重病人知情同意书</h2>
20 21
 
21 22
               <div style="text-align: right;">
@@ -135,11 +136,11 @@ export default{
135 136
     patient:{},
136 137
     content:content,
137 138
     dialogVisible:false,
139
+    orgname:''
138 140
   }
139 141
   },
140 142
   methods:{
141 143
     getlist(){
142
-
143 144
         getPatientDetailInformedconsent(this.patient_id).then(response=>{
144 145
           if(response.data.state == 1){
145 146
             var patient =  response.data.data.patients
@@ -185,7 +186,7 @@ export default{
185 186
            this.content = ""
186 187
            this.content = val.content
187 188
          }
188
-         
189
+
189 190
        }
190 191
       },
191 192
       bianji(){
@@ -206,6 +207,7 @@ export default{
206 207
       }
207 208
   },
208 209
   created(){
210
+    this.orgname = this.$store.getters.xt_user.org.org_name;
209 211
     if(this.patientCritaicalInformedOnePrint!=null && this.patientCritaicalInformedOnePrint.id >0){
210 212
        this.content = ""
211 213
        this.content = this.patientCritaicalInformedOnePrint.content
@@ -252,4 +254,10 @@ export default{
252 254
         text-align: justify;
253 255
     }
254 256
   }
257
+  .print_page_main_content {
258
+    background-color: white;
259
+    width: 100%;
260
+    padding: 0 0 0 0;
261
+    page-break-after: always;
262
+  }
255 263
 </style>

+ 12 - 3
src/xt_pages/user/Informed/components/heal_informed.vue Vedi File

@@ -16,6 +16,7 @@
16 16
       <div id="print_content">
17 17
         <div class="print_page_main_content">
18 18
           <div class="content">
19
+            <div style="text-align: center;font-size: 20px;">{{ orgname }}</div>
19 20
               <h2 style="text-align: center;">治疗处理方案知情同意书</h2>
20 21
 
21 22
               <div style="text-align: right;">
@@ -131,6 +132,7 @@ export default{
131 132
     patient:{},
132 133
     dialogVisible:false,
133 134
     content:content,
135
+    orgname:''
134 136
   }
135 137
   },
136 138
   methods:{
@@ -178,14 +180,14 @@ export default{
178 180
       bianji(){
179 181
         this.dialogVisible=true
180 182
       },
181
-      show(val){    
183
+      show(val){
182 184
        if(val!=null){
183 185
         console.log("valw233223",val)
184 186
          if(val.content!=""){
185 187
            this.content = ""
186 188
            this.content = val.content
187 189
          }
188
-         
190
+
189 191
        }
190 192
      },
191 193
       saveTreamtPlan(){
@@ -204,8 +206,9 @@ export default{
204 206
   },
205 207
   created(){
206 208
     console.log("hahhahahahahahwo",this.patientTreamentPlan)
209
+    this.orgname = this.$store.getters.xt_user.org.org_name;
207 210
     if(this.patientTreamentPlan!=null && this.patientTreamentPlan.id >0){
208
-      
211
+
209 212
       this.content = ""
210 213
       this.content = this.patientTreamentPlan.content
211 214
     }
@@ -245,4 +248,10 @@ export default{
245 248
           padding-left: 20px;
246 249
       }
247 250
   }
251
+  .print_page_main_content {
252
+    background-color: white;
253
+    width: 100%;
254
+    padding: 0 0 0 0;
255
+    page-break-after: always;
256
+  }
248 257
 </style>

+ 11 - 2
src/xt_pages/user/Informed/components/hemoperfusion_informed.vue Vedi File

@@ -16,6 +16,7 @@
16 16
       <div id="print_content">
17 17
           <div class="print_page_main_content">
18 18
           <div class="content">
19
+            <div style="text-align: center;font-size: 20px;">{{ orgname }}</div>
19 20
               <h2 style="text-align: center;">血液灌流治疗知情同意书</h2>
20 21
 
21 22
               <div style="text-align: right;">
@@ -196,6 +197,7 @@ export default{
196 197
       patient:{},
197 198
       dialogVisible:false,
198 199
       content:content,
200
+      orgname:''
199 201
     }
200 202
    },
201 203
   methods:{
@@ -244,14 +246,14 @@ export default{
244 246
       this.dialogVisible=true
245 247
     },
246 248
     show(val){
247
-       
249
+
248 250
        if(val!=null){
249 251
         console.log("valw233223",val)
250 252
          if(val.content!=""){
251 253
            this.content = ""
252 254
            this.content = val.content
253 255
          }
254
-         
256
+
255 257
        }
256 258
      },
257 259
     savehemoperfusionInformed(){
@@ -270,6 +272,7 @@ export default{
270 272
   },
271 273
   created(){
272 274
     console.log("血液管咯阿道夫阿道夫阿道夫",this.hemoperfusionPrint)
275
+    this.orgname = this.$store.getters.xt_user.org.org_name;
273 276
     if(this.hemoperfusionPrint!=null && this.hemoperfusionPrint.id >0){
274 277
         this.content = ""
275 278
         this.content = this.hemoperfusionPrint.content
@@ -295,4 +298,10 @@ export default{
295 298
         text-align: justify;
296 299
       }
297 300
   }
301
+  .print_page_main_content {
302
+    background-color: white;
303
+    width: 100%;
304
+    padding: 0 0 0 0;
305
+    page-break-after: always;
306
+  }
298 307
 </style>

+ 311 - 0
src/xt_pages/user/Informed/components/nonheparin_informed.vue Vedi File

@@ -0,0 +1,311 @@
1
+<!-- 危重 -->
2
+<template>
3
+  <div style="border:1px solid gainsboro ;padding:10px">
4
+      <div style="position: relative; left: 400px;width: 250px;margin: 20px 0;">
5
+        <!-- <el-button type="primary">主要按钮</el-button> -->
6
+         <el-button type="primary" style=""  @click="bianji">
7
+              编辑
8
+          </el-button>
9
+        <!--<el-button type="danger" style=""  @click="">
10
+              删除
11
+        </el-button> -->
12
+        <el-button type="success" style=""  @click="printThisPage">
13
+            打印
14
+        </el-button>
15
+      </div>
16
+      <div id="print_content">
17
+        <div class="print_page_main_content">
18
+          <div class="content" style="font-family:SimSun;">
19
+              <div> </div>
20
+              <h2 style="text-align: center;">{{ orgname }}<br/>无肝素血液透析风险知情同意书</h2>
21
+
22
+              <div style="text-align: right;">
23
+                透析号:{{ patient.dialysis_no }}
24
+              </div>
25
+
26
+                <table border="1" style="border-collapse: collapse;width: 100%;">
27
+                  <tr>
28
+                    <td width="30" style="padding: 3px;line-height: 40px;">姓名:{{ patient.name }}</td>
29
+                    <td width="15" style="padding: 3px;line-height: 40px;">性别:{{ patient.gender == 1 ? '男' : '女' }}</td>
30
+                    <td width="15" style="padding: 3px;line-height: 40px;">年龄:{{getAge(patient)}}</td>
31
+                    <td width="40" style="padding: 3px;line-height: 40px;">门诊住院号:{{ patient.admission_number }}</td>
32
+                  </tr>
33
+                  <tr>
34
+                    <td colspan="4" style="padding: 3px;line-height: 40px;">住址或单位:{{patient.home_address}}</td>
35
+                  </tr>
36
+                  <tr>
37
+                    <td colspan="4" style="padding: 3px;line-height: 40px;">身份证号:{{patient.id_card_no}}</td>
38
+                  </tr>
39
+                  <tr>
40
+                    <td colspan="4" style="padding: 3px;line-height: 40px;">临床诊断:{{ patient.diagnose }}</td>
41
+                  </tr>
42
+                  <tr>
43
+                    <td colspan="4" style="padding: 3px;">
44
+                      <div v-html="content"></div>
45
+                    </td>
46
+                  </tr>
47
+                </table>
48
+
49
+              <!-- <div style="display: flex;margin: 10px 0;">
50
+                <div style="flex:1">姓名:
51
+                  {{ patient.name }}
52
+                </div>
53
+                <div style="flex:1">性别:
54
+                  <span v-if="patient.gender == 1">男</span>
55
+                   <span v-if="patient.gender == 2">女</span>
56
+                </div>
57
+                <div style="flex:1">年龄:
58
+                  {{ getAge(patient) }}
59
+                </div>
60
+                <div style="flex:1">住院(门诊)号:
61
+                  {{ patient.admission_number }}
62
+                </div>
63
+              </div>
64
+              <div style="border-bottom: 1px solid gainsboro;">
65
+                诊断:
66
+                {{ patient.diagnose }}
67
+              </div>
68
+              <div v-html="content"></div> -->
69
+          </div>
70
+        </div>
71
+      </div>
72
+      <el-dialog
73
+        title="提示"
74
+        :visible.sync="dialogVisible"
75
+        width="60%"
76
+        >
77
+        <div>
78
+          <h2 style="text-align: center;">{{ orgname }}<br/>无肝素血液透析风险知情同意书</h2>
79
+          <table border="1" style="border-collapse: collapse;width: 100%;">
80
+            <tr>
81
+              <td width="30" style="padding: 3px;line-height: 40px;">姓名:{{ patient.name }}</td>
82
+              <td width="15" style="padding: 3px;line-height: 40px;">性别:{{ patient.gender == 1 ? '男' : '女' }}</td>
83
+              <td width="15" style="padding: 3px;line-height: 40px;">年龄:{{getAge(patient)}}</td>
84
+              <td width="40" style="padding: 3px;line-height: 40px;">门诊住院号:{{ patient.admission_number }}</td>
85
+            </tr>
86
+            <tr>
87
+              <td colspan="4" style="padding: 3px;line-height: 40px;">住址或单位:{{patient.home_address}}</td>
88
+            </tr>
89
+            <tr>
90
+              <td colspan="4" style="padding: 3px;line-height: 40px;">身份证号:{{patient.id_card_no}}</td>
91
+            </tr>
92
+            <tr>
93
+              <td colspan="4" style="padding: 3px;line-height: 40px;">临床诊断:{{ patient.diagnose }}</td>
94
+            </tr>
95
+            <tr>
96
+              <td colspan="4">
97
+                <keep-alive>
98
+                  <editor ref="editor"
99
+                          id="editor"
100
+                          style="width: 100%"
101
+                          v-bind:r_content="content">
102
+                  </editor>
103
+                </keep-alive>
104
+              </td>
105
+            </tr>
106
+          </table>
107
+
108
+          <!-- <div style="text-align: right;">
109
+            透析号:{{ patient.dialysis_no }}
110
+          </div>
111
+          <div style="display: flex;margin: 10px 0;">
112
+            <div style="flex:1">姓名:{{ patient.name }}</div>
113
+            <div style="flex:1">性别:
114
+              <span v-if="patient.gender == 1">男</span>
115
+                <span v-if="patient.gender == 2">女</span>
116
+            </div>
117
+            <div style="flex:1">年龄:
118
+              {{ getAge(patient) }}
119
+            </div>
120
+            <div style="flex:1">住院(门诊)号:
121
+              {{ patient.admission_number }}
122
+            </div>
123
+          </div>
124
+          <div style="border-bottom: 1px solid gainsboro;">
125
+            诊断:
126
+            {{ patient.diagnose }}
127
+          </div> -->
128
+
129
+        </div>
130
+        <span slot="footer" class="dialog-footer">
131
+          <el-button @click="dialogVisible = false">取 消</el-button>
132
+          <el-button type="primary" @click="saveCriticalInfomed">保 存</el-button>
133
+        </span>
134
+      </el-dialog>
135
+  </div>
136
+</template>
137
+
138
+<script>
139
+import print from "print-js";
140
+import Editor from '@/components/Editor'
141
+import { getPatientDetailInformedconsent,saveCriticalInfomed  } from '@/api/patient'
142
+import { jsGetAge, uParseTime } from "@/utils/tools";
143
+const content=`
144
+  <p>
145
+    <span>您/您的亲属因患:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;需进行肾代替治疗,由于您/您的家属因凝血功能异常
146
+      或身体某脏器出血,需进行无肝素血液透析治疗,此方法治疗的目的以及可能存在的风险如下;
147
+    </span>
148
+  </p>
149
+  <p>
150
+    <span>
151
+      一、尿毒症(包括急性或慢性肾功能衰竭),急性中毒以及其他重症需血液净化的患者由于凝血功能较差应用肝素透析可引起出血,使贫血加重。使用肝素透析,可使身体某脏器出血加重,严重者危及生命。
152
+    </span>
153
+  </p>
154
+  <p>
155
+    <span>
156
+      二、可能出现管路凝血血液无法回入血管,使血液丢失,贫血加重。
157
+    </span>
158
+  </p>
159
+  <p>
160
+    <span>
161
+      三、透析过程中,由于透析器,管路或者两者同时因血凝块堵塞,使透析无法进行,需终止透析。
162
+    </span>
163
+  </p>
164
+  <p>
165
+    <span>
166
+      四、透析中及透析后出现透析失衡综合征,如呕吐、头痛、头晕等;
167
+    </span>
168
+  </p>
169
+  <p>
170
+    <span>
171
+      五、用盐水冲洗管路及透析器,超滤量过大,可能造成脱水不够,不能达到干体重。由于脱水不够,而引起血压升高,或心力衰竭
172
+    </span>
173
+  </p>
174
+  <p>
175
+    <span>
176
+      六、透析器.管路有凝血堵块,不能复用,需要新换透析器,管路增加患者的费用。透析器.管路有小血栓形成,随血路进入血液循环,引起肺栓塞.脑栓塞.心血管栓塞等并发症。
177
+    </span>
178
+  </p>
179
+  <p>
180
+    <span>
181
+      患者和/或家属已接受医疗风险的告知并要求接受血液透析治疗。
182
+    </span>
183
+  </p>
184
+  <p style="padding:10px 20px;display:flex;justify-content: space-around;align-items: center;">
185
+      <span>患者/家属意见:&nbsp;&nbsp;&nbsp;&nbsp;</span>
186
+      <span>患者/家属签名:&nbsp;&nbsp;&nbsp;&nbsp;</span>
187
+  </p>
188
+  <p style="padding:10px 20px;display:flex;justify-content: space-around;align-items: center;">
189
+      <span>与患者关系:&nbsp;&nbsp;&nbsp;&nbsp;</span>
190
+      <span>告知医师签名:&nbsp;&nbsp;&nbsp;&nbsp;</span>
191
+  </p>`
192
+
193
+export default{
194
+  props: {
195
+    patient_id: {
196
+        type: Number,
197
+      },
198
+      criticalInforPrint:{
199
+        type:Object,
200
+      }
201
+   },
202
+   components:{
203
+    Editor
204
+   },
205
+  data(){
206
+    return{
207
+      patient:{},
208
+      dialogVisible:false,
209
+      content:content,
210
+      orgname:'',
211
+    }
212
+   },
213
+  methods:{
214
+    getlist(){
215
+
216
+      getPatientDetailInformedconsent(this.patient_id).then(response=>{
217
+        if(response.data.state == 1){
218
+          var patient =  response.data.data.patients
219
+          console.log("patinet",patient)
220
+          this.patient =patient
221
+        }
222
+      })
223
+    },
224
+    printThisPage(){
225
+        const style = '@media print {.content p{font-size: 16px;font-family: SimSun; padding: 5px; margin-bottom: 5px;}}'
226
+        printJS({
227
+            printable: 'print_content',
228
+            type: 'html',
229
+            documentTitle: '  ',
230
+            style: style,
231
+            scanStyles: false
232
+        })
233
+    },
234
+    getAge: function(val) {
235
+        if (val.id_card_no == undefined) {
236
+          return false
237
+        }
238
+        var thisLen = val.id_card_no.length
239
+        var birth = ''
240
+        if (thisLen == 15) {
241
+          birth = '19' + val.id_card_no.substr(6, 6)
242
+        } else {
243
+          birth = val.id_card_no.substr(6, 8)
244
+        }
245
+        var birthtwo =
246
+          birth.substr(0, 4) +
247
+          '-' +
248
+          birth.substr(4, 2) +
249
+          '-' +
250
+          birth.substr(6, 2)
251
+
252
+        var age = jsGetAge(birthtwo, '-')
253
+        return age
254
+    },
255
+    bianji(){
256
+      this.dialogVisible=true
257
+    },
258
+    show(val){
259
+
260
+       if(val!=null){
261
+        console.log("valw233223",val)
262
+         if(val.content!=""){
263
+           this.content = ""
264
+           this.content = val.content
265
+         }
266
+
267
+       }
268
+     },
269
+    saveCriticalInfomed(){
270
+        var params = {
271
+          content:this.$refs.editor.content
272
+        }
273
+      saveCriticalInfomed(params).then(response=>{
274
+         if(response.data.state ==1){
275
+           var list = response.data.data.list
276
+           this.$message.success("保存成功")
277
+           this.dialogVisible = false
278
+           this.$emit("getCriticalInformed","");
279
+         }
280
+      })
281
+    }
282
+  },
283
+  created(){
284
+    this.orgname = this.$store.getters.xt_user.org.org_name;
285
+    console.log("haaaaaaaaaaaaaaaaaaa",this.criticalInforPrint)
286
+    if(this.criticalInforPrint!=null && this.criticalInforPrint.id>0){
287
+        this.content = ""
288
+        this.content = this.criticalInforPrint.content
289
+    }
290
+    this.getlist()
291
+  }
292
+}
293
+</script>
294
+<style lang="scss" scoped>
295
+
296
+*{
297
+  // margin: 0;
298
+  // padding: 0;
299
+  //border: 0;
300
+}
301
+  .content{
302
+      p{
303
+        font-size: 16px;
304
+        // font-family: '新宋体';
305
+        line-height: 22px;
306
+        padding: 5px;
307
+        margin-bottom: 5px;
308
+        text-align: justify;
309
+      }
310
+  }
311
+</style>

+ 12 - 4
src/xt_pages/user/Informed/components/profunda_informed.vue Vedi File

@@ -15,6 +15,7 @@
15 15
       <div id="print_content">
16 16
           <div class="print_page_main_content">
17 17
           <div class="content">
18
+            <div style="text-align: center;font-size: 20px;">{{ orgname }}</div>
18 19
               <h2 style="text-align: center;">深静脉透析导管拔管术知情同意书</h2>
19 20
 
20 21
               <div style="text-align: right;">
@@ -156,11 +157,12 @@ export default{
156 157
       patient:{},
157 158
       dialogVisible:false,
158 159
       content:content,
159
-     
160
+      orgname:'',
160 161
     }
161 162
    },
162 163
 
163 164
    created(){
165
+    this.orgname = this.$store.getters.xt_user.org.org_name;
164 166
     console.log("HSHHSHSHHSH",this.profundaPrint)
165 167
      if(this.profundaPrint!=null&&this.profundaPrint.id >0){
166 168
         console.log("HSHHSHSHHSH")
@@ -171,7 +173,7 @@ export default{
171 173
    },
172 174
     methods:{
173 175
       getlist(){
174
-       
176
+
175 177
         getPatientDetailInformedconsent(this.patient_id).then(response=>{
176 178
           if(response.data.state == 1){
177 179
             var patient =  response.data.data.patients
@@ -215,14 +217,14 @@ export default{
215 217
         this.dialogVisible=true
216 218
       },
217 219
       show(val){
218
-       
220
+
219 221
        if(val!=null){
220 222
         console.log("valw233223",val)
221 223
          if(val.content!=""){
222 224
            this.content = ""
223 225
            this.content = val.content
224 226
          }
225
-         
227
+
226 228
        }
227 229
      },
228 230
       saveProfundaInformed(){
@@ -258,4 +260,10 @@ export default{
258 260
         text-align: justify;
259 261
       }
260 262
   }
263
+  .print_page_main_content {
264
+    background-color: white;
265
+    width: 100%;
266
+    padding: 0 0 0 0;
267
+    page-break-after: always;
268
+  }
261 269
 </style>

+ 18 - 9
src/xt_pages/user/Informed/components/therapy_informed.vue Vedi File

@@ -16,6 +16,7 @@
16 16
       <div id="print_content">
17 17
           <div class="print_page_main_content">
18 18
           <div class="content">
19
+              <div style="text-align: center;font-size: 20px;">{{ orgname }}</div>
19 20
               <h2 style="text-align: center;">血液透析(滤过)治疗知情同意书</h2>
20 21
               <!-- <div v-if="org_id!=10571"> -->
21 22
               <div style="text-align: right;" v-if="org_id!=10571">
@@ -203,12 +204,13 @@ export default{
203 204
     Editor
204 205
   },
205 206
   data(){
206
-  return{
207
-    patient:{},
208
-    org_id:0,
209
-    dialogVisible:false,
210
-    content:content,
211
-  }
207
+    return{
208
+      patient:{},
209
+      org_id:0,
210
+      dialogVisible:false,
211
+      content:content,
212
+      orgname:'',
213
+    }
212 214
   },
213 215
   methods:{
214 216
      getlist(){
@@ -255,14 +257,14 @@ export default{
255 257
         this.dialogVisible=true
256 258
       },
257 259
       show(val){
258
-       
260
+
259 261
        if(val!=null){
260 262
         console.log("valw233223",val)
261 263
          if(val.content!=""){
262 264
            this.content = ""
263 265
            this.content = val.content
264 266
          }
265
-         
267
+
266 268
        }
267 269
      },
268 270
       saveTherapyInformed(){
@@ -270,7 +272,7 @@ export default{
270 272
           content:this.$refs.editor.content
271 273
          }
272 274
         saveTherapyInformed(params).then(response=>{
273
-          
275
+
274 276
           if(response.data.state ==1){
275 277
             var list = response.data.data.list
276 278
             this.$message.success("保存成功!")
@@ -282,6 +284,7 @@ export default{
282 284
 
283 285
   },
284 286
   created(){
287
+    this.orgname = this.$store.getters.xt_user.org.org_name;
285 288
     if(this.therapyinformePrint!=null && this.therapyinformePrint.id >0){
286 289
        this.content = ""
287 290
        this.content = this.therapyinformePrint.content
@@ -308,4 +311,10 @@ export default{
308 311
         text-align: justify;
309 312
       }
310 313
   }
314
+  .print_page_main_content {
315
+    background-color: white;
316
+    width: 100%;
317
+    padding: 0 0 0 0;
318
+    page-break-after: always;
319
+  }
311 320
 </style>

+ 37 - 19
src/xt_pages/user/Physicalexamination.vue Vedi File

@@ -9,17 +9,17 @@
9 9
       <div v-loading="loading">
10 10
         <div class="patient-app-container advice-container app-container">
11 11
           <div>
12
-                      <span style="margin-left: 10px;float:right;">
13
-                          <el-button type="primary" icon="el-icon-circle-plus-outline" size="small"
14
-                                     @click="show_dialog = true">新增</el-button>
15
-
16
-                          <el-button type="primary" icon="el-icon-edit-outline" size="small"
17
-                                     @click="showEdit">修改</el-button>
18
-                        <el-button type="primary" icon="el-icon-printer" size="small"
19
-                                   @click="print">打印</el-button>
20
-                          <el-button size="small" v-show="selectingRows.length > 0" type="danger"
21
-                                     @click="deleteAction">删除</el-button>
22
-                      </span>
12
+              <span style="margin-left: 10px;float:right;">
13
+                  <el-button type="primary" icon="el-icon-circle-plus-outline" size="small"
14
+                              @click="show_dialog = true">新增</el-button>
15
+
16
+                  <el-button type="primary" icon="el-icon-edit-outline" size="small"
17
+                              @click="showEdit">修改</el-button>
18
+                  <el-button type="primary" icon="el-icon-printer" size="small"
19
+                            @click="print">打印</el-button>
20
+                  <el-button size="small" v-show="selectingRows.length > 0" type="danger"
21
+                              @click="deleteAction">删除</el-button>
22
+              </span>
23 23
             <!--<span class="filter_title">日期查询</span>-->
24 24
             <!--<el-date-picker size="small" v-model="date" type="daterange" range-separator="至" start-placeholde="开始日期" end-placeholde="结束日期" value-format="timestamp" :clearable="false" @change="requestCourseRecords()"></el-date-picker>-->
25 25
           </div>
@@ -665,15 +665,18 @@
665 665
             </el-row>
666 666
           </div>
667 667
         </div>
668
-        <el-dialog title="新增体格检查" width="70%" top="5vh" :visible.sync="show_dialog">
668
+        <el-dialog title="新增体格检查" width="80%" top="5vh" :visible.sync="show_dialog">
669 669
           <div>
670 670
             <div class="new_record_form">
671 671
               <div class="record_content_panel">
672
-                <div style="background-color:rgb(245, 247, 250)" class="title">体格检查</div>
672
+                <div style="background-color:rgb(245, 247, 250);margin-bottom: 10px;" class="title">体格检查</div>
673 673
 
674
-                <el-form>
675
-                  <el-row style="margin-top: 20px;">
676
-                    <el-col :span="9" >
674
+                <el-form class="form" label-position="right" label-width="130px">
675
+
676
+
677
+
678
+                  <el-row style="margin-top: 20px;margin-left: 20px;">
679
+                    <el-col :span="8" >
677 680
                       <el-form-item label="日期:">
678 681
                         <el-date-picker v-model="add_form.record_time" prefix-icon="el-icon-date" :editable="false"
679 682
                                         style="width: 200px;"
@@ -681,13 +684,15 @@
681 684
                                         value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
682 685
                       </el-form-item>
683 686
                     </el-col>
684
-                    <el-col :span="6" >
687
+                    <el-col :span="8" >
685 688
                       <el-form-item label="医生:">
686 689
                         <el-select style="width: 100px;" v-model="add_form.doctor_id" placeholder="请选择医生">
687 690
                           <el-option v-for="(item,index) in doctorOptions" :label="item.name" :value="item.id" :key="index"></el-option>
688 691
                         </el-select>
689 692
                       </el-form-item>
690 693
                     </el-col>
694
+                    <el-col :span="8"></el-col>
695
+                    <el-col :span="8"></el-col>
691 696
                   </el-row>
692 697
 
693 698
                   <el-row   style="margin-left: 20px;">
@@ -3087,9 +3092,17 @@
3087 3092
     }
3088 3093
 
3089 3094
     }
3090
-
3095
+    .Second_title{
3096
+      border-left: 5px solid rgb(58, 142, 230);
3097
+      width: 85px;
3098
+      text-align: left;
3099
+      padding: 5px;
3100
+      margin-left: 10px;
3101
+      margin-bottom: 18px;
3102
+      font-size: 16px;
3103
+    }
3091 3104
   </style>
3092
-  <style>
3105
+  <style lang="scss">
3093 3106
   /* .el-input--medium .el-input__inner {
3094 3107
       padding:0px 0px;
3095 3108
       text-align: center;
@@ -3105,4 +3118,9 @@
3105 3118
   .el-table::before {
3106 3119
     background-color: #d0d3da;
3107 3120
   }
3121
+  .form{
3122
+    .el-form-item__label{
3123
+      padding: 0 0 0 0 !important;
3124
+    }
3125
+  }
3108 3126
   </style>

File diff suppressed because it is too large
+ 4249 - 0
src/xt_pages/user/Physicalexamination_new.vue


+ 25 - 25
src/xt_pages/user/components/PatientDetail.vue Vedi File

@@ -393,23 +393,23 @@
393 393
               </el-form-item>
394 394
             </el-col>
395 395
 
396
-            <el-col :span="24" :style="isEdit ? 'width:600px' : ''">
397
-                <el-form-item
398
-                  label="患者类型 : "
399
-                  class="is-required"
400
-                  prop="source"
401
-                >
402
-                  <el-radio-group v-model="form.patient_type">
403
-                    <el-radio
404
-                      v-for="item in patientType"
405
-                      :key="item.value"
406
-                      :label="item.value"
407
-                      :value="item.value"
408
-                      >{{ item.label }}</el-radio
409
-                    >
410
-                  </el-radio-group>
411
-                </el-form-item>
412
-              </el-col>
396
+            <!-- <el-col :span="24" :style="isEdit ? 'width:600px' : ''">
397
+              <el-form-item
398
+                label="患者类型 : "
399
+                class="is-required"
400
+                prop="source"
401
+              >
402
+                <el-radio-group v-model="form.patient_type">
403
+                  <el-radio
404
+                    v-for="item in patientType"
405
+                    :key="item.value"
406
+                    :label="item.value"
407
+                    :value="item.value"
408
+                    >{{ item.label }}</el-radio
409
+                  >
410
+                </el-radio-group>
411
+              </el-form-item>
412
+            </el-col> -->
413 413
 
414 414
 
415 415
             <el-col :span="8" :style="isEdit ? 'width:360px' : ''">
@@ -990,7 +990,7 @@
990 990
           ></el-button>
991 991
         </el-form-item>
992 992
       </el-col> -->
993
-      
993
+
994 994
       <el-row>
995 995
         <el-col :span="24" style="height:100%;">
996 996
           <el-form-item label="家族史 : " prop="famality_record" style="height:100%;">
@@ -1006,7 +1006,7 @@
1006 1006
           </el-form-item>
1007 1007
        </el-col>
1008 1008
       </el-row>
1009
-      
1009
+
1010 1010
       <el-row>
1011 1011
         <el-col :span="24" style="height:100%;">
1012 1012
           <el-form-item label="登记人员 : " style="height:100%;">
@@ -1029,7 +1029,7 @@
1029 1029
           </el-form-item>
1030 1030
        </el-col>
1031 1031
       </el-row>
1032
-      
1032
+
1033 1033
     </el-form>
1034 1034
     <!-- 打印预览 style="display: none"-->
1035 1035
     <div style="display: none">
@@ -1841,13 +1841,13 @@ export default {
1841 1841
     const birthYear = parseInt(idNumber.substring(6, 10), 10);
1842 1842
     const birthMonth = parseInt(idNumber.substring(10, 12), 10);
1843 1843
     const birthDay = parseInt(idNumber.substring(12, 14), 10);
1844
- 
1844
+
1845 1845
     const today = new Date();
1846 1846
     // console.log("today============",today)
1847 1847
     var ageYear = year - birthYear;
1848 1848
     let ageMonth = month - birthMonth; // 月份是从0开始的
1849 1849
     let ageDay = day - birthDay;
1850
- 
1850
+
1851 1851
     // 调整月份和日期,以便于正确计算
1852 1852
       if (ageDay < 0) {
1853 1853
           ageMonth -= 1;
@@ -1859,8 +1859,8 @@ export default {
1859 1859
           ageYear -= 1;
1860 1860
           ageMonth += 12;
1861 1861
       }
1862
-   
1863
-     return ageYear 
1862
+
1863
+     return ageYear
1864 1864
     },
1865 1865
     getTime(val) {
1866 1866
       return uParseTime(val, "{y}年{m}月{d}日");
@@ -2431,7 +2431,7 @@ export default {
2431 2431
             } else {
2432 2432
               this.patientPrint.hospital_first_dialysis_date = "";
2433 2433
             }
2434
-          
2434
+
2435 2435
             // this.checkIdCardNo();
2436 2436
           } else {
2437 2437
             console.log("patient get err state");

+ 0 - 209
src/xt_pages/user/components/PatientSidebar.1.vue Vedi File

@@ -1,209 +0,0 @@
1
-<template>
2
-  <div>
3
-    <div class="patient-menu">
4
-      <el-autocomplete
5
-        style="margin:16px 5px"
6
-        popper-class="my-autocomplete"
7
-        v-model.trim="value"
8
-        :fetch-suggestions="querySearchAsync"
9
-        :trigger-on-focus="false"
10
-        placeholder="病人名字或者透析号"
11
-        @select="handleSelect"
12
-       >
13
-        <i
14
-          class="el-icon-search el-input__icon"
15
-          slot="suffix"
16
-         >
17
-        </i>
18
-        <template slot-scope="{ item }">
19
-          <div class="name">{{ item.name }}</div>
20
-        </template>
21
-      </el-autocomplete>
22
-
23
-      <el-select v-model="selectID" style="margin:0 5px 0px 5px;text-align: center;" @change="changePatient"
24
-                 placeholder="请选择">
25
-        <el-option
26
-          v-for="item in patientsList"
27
-          :key="item.id"
28
-          :label="item.name"
29
-          :value="item.id">
30
-        </el-option>
31
-      </el-select>
32
-
33
-      <el-menu :default-active="defaultActive" class="el-menu-vertical-demo patient-center-menu">
34
-        <el-submenu index="1">
35
-          <template slot="title">
36
-            <i class="el-icon-setting"></i>
37
-            <span>电子病历</span>
38
-          </template>
39
-          <router-link :to="'/patients/patient/'+this.id">
40
-            <el-menu-item index="1-1">基本信息</el-menu-item>
41
-          </router-link>
42
-          <router-link :to="'/patients/patient/'+this.id+'/doctorAdvice'">
43
-            <el-menu-item index="1-4">医嘱管理</el-menu-item>
44
-          </router-link>
45
-          <router-link :to="'/patients/patient/'+this.id+'/dryWeight'">
46
-            <el-menu-item index="1-6">干体重</el-menu-item>
47
-          </router-link>
48
-          <router-link :to="'/patients/course?id='+this.id">
49
-            <el-menu-item index="1-2">病程管理</el-menu-item>
50
-          </router-link>
51
-          <router-link :to="'/patients/inspection?id='+this.id">
52
-            <el-menu-item index="1-3">检验检查</el-menu-item>
53
-          </router-link>
54
-          <router-link :to="'/patients/rescue?id='+this.id">
55
-            <el-menu-item index="1-5">抢救记录</el-menu-item>
56
-          </router-link>
57
-          <!-- <router-link :to="'/patients/patient/'+this.id+'/weight'">
58
-              <el-menu-item  index="2-5">干体重</el-menu-item>
59
-          </router-link> -->
60
-        </el-submenu>
61
-        <el-submenu index="2">
62
-          <template slot="title">
63
-            <i class="el-icon-setting"></i>
64
-            <span>透析管理</span>
65
-          </template>
66
-          <router-link :to="'/patients/patient/'+this.id+'/dialysisSolution'">
67
-            <el-menu-item index="2-1">长期透析处方</el-menu-item>
68
-          </router-link>
69
-          <router-link :to="'/patients/patient/'+this.id+'/dialysisRecord'">
70
-            <el-menu-item index="2-2">透析记录</el-menu-item>
71
-          </router-link>
72
-          <router-link :to="'/patients/patient/'+this.id+'/scheduling'">
73
-            <el-menu-item index="2-4">排班信息</el-menu-item>
74
-          </router-link>
75
-          <router-link :to="'/patients/patient/'+this.id+'/proeducation'">
76
-            <el-menu-item index="2-5">宣教信息</el-menu-item>
77
-          </router-link>
78
-          <!-- <router-link :to="'/patients/patient/'+this.id+'/weight'">
79
-              <el-menu-item  index="2-5">干体重</el-menu-item>
80
-          </router-link> -->
81
-        </el-submenu>
82
-     
83
-      </el-menu>
84
-    </div>
85
-    <div class="patient-app-container ">
86
-      <span class="patient-name">姓名:{{currentPatient.name}} &nbsp;&nbsp; 性别:{{tranSex(currentPatient.gender)}} &nbsp;&nbsp; 年龄:{{tranAge(currentPatient.birthday)}} &nbsp;&nbsp; 透析号:{{currentPatient.dialysis_no}} </span>
87
-    </div>
88
-  </div>
89
-
90
-</template>
91
-<script>
92
-  import { fetchAllList, PostSearch } from '@/api/patient'
93
-import { jsGetAge, uParseTime } from '@/utils/tools'
94
-
95
-export default {
96
-    name: 'patientSidebar',
97
-    value: '',
98
-    searchArray: [],
99
-    props: {
100
-      id: 0,
101
-      defaultActive: {
102
-        type: String,
103
-        default: '1-1'
104
-      }
105
-
106
-    },
107
-    data() {
108
-      return {
109
-        thedefaultActive: 1,
110
-        patientsList: null,
111
-        currentPatient: {},
112
-        selectID: 0,
113
-        keyword: '',
114
-        value: ''
115
-      }
116
-    },
117
-    methods: {
118
-      changePatient(value) {
119
-        console.log(value)
120
-        this.$router.push('/patients/patient/' + value)
121
-      },
122
-      getList() {
123
-        fetchAllList().then(response => {
124
-          if (response.data.state == 1) {
125
-            this.patientsList = response.data.data.patients
126
-            console.log("哈哈哈哈哈",this.patientsList)
127
-            var len = this.patientsList.length
128
-            if (len > 0) {
129
-              for (let index = 0; index < len; index++) {
130
-                if (this.patientsList[index].id == this.id) {
131
-                  this.currentPatient = this.patientsList[index]
132
-
133
-                  this.selectID = this.patientsList[index].id
134
-                  this.$emit('tran-patient', this.currentPatient)
135
-                  break
136
-                }
137
-              }
138
-            }
139
-          }
140
-        })
141
-      },
142
-      tranAge(birthday) {
143
-        var birth = uParseTime(birthday, '{y}-{m}-{d}')
144
-        return jsGetAge(birth, '-')
145
-      },
146
-      tranSex(gender) {
147
-        var sex = '未知'
148
-        switch (gender) {
149
-          case 1:
150
-            sex = '男'
151
-            break
152
-          case 2:
153
-            sex = '女'
154
-            break
155
-          default:
156
-            break
157
-        }
158
-        return sex
159
-      },
160
-       querySearchAsync(keyword, cb) {
161
-        let key = ''
162
-        if (keyword != undefined) {
163
-          key = keyword
164
-        }
165
-        let searchArray = []
166
-        PostSearch(key).then(response => {
167
-          if (response.data.state == 1) {
168
-            searchArray = response.data.data.patient
169
-            cb(searchArray)
170
-          } else {
171
-            this.$message.error(response.data.msg)
172
-            cb([])
173
-          }
174
-        })
175
-      },
176
-       handleSelect(val) {
177
-        this.$router.push('/patients/patient/' + val.id)
178
-      }
179
-
180
-    },
181
-    created() {
182
-      this.getList()
183
-  }
184
-  }
185
-</script>
186
-
187
-<style>
188
-
189
-  .patient-menu {
190
-    -webkit-transition: width 0.28s;
191
-    transition: width 0.28s;
192
-    width: 180px !important;
193
-    height: 100%;
194
-    position: relative;
195
-    font-size: 0px;
196
-    top: 0;
197
-    float: left;
198
-    bottom: 0;
199
-    left: 0;
200
-    /* z-index: 99; */
201
-    overflow: hidden;
202
-  }
203
-
204
-  .patient-center-menu .el-icon-arrow-down:before {
205
-    content: '';
206
-  }
207
-
208
- 
209
-</style>

+ 7 - 0
src/xt_pages/user/components/PatientSidebar.vue Vedi File

@@ -163,6 +163,10 @@ export default {
163 163
               name: '3-2',
164 164
               label: '体格检查'
165 165
             },
166
+            {
167
+              name: '3-3',
168
+              label: '体格检查新'
169
+            },
166 170
             {
167 171
               name: '1-11',
168 172
               label: '首次病程记录'
@@ -347,6 +351,9 @@ export default {
347 351
       } else if(name == '3-2'){
348 352
         this.$router.push({path:'/patients/physicalexamination?id='+this.id})
349 353
 
354
+      } else if(name == '3-3'){
355
+        this.$router.push({path:'/patients/new_physicalexamination?id='+this.id})
356
+
350 357
       } else if(name == '4-1'){
351 358
         this.$router.push({path:'/patients/inspection_check?id='+this.id})
352 359
       } else if(name == '4-3'){

+ 623 - 0
src/xt_pages/user/components/PatientSidebar_new.vue Vedi File

@@ -0,0 +1,623 @@
1
+<template>
2
+  <div>
3
+    <div class="patient-menu">
4
+      <el-autocomplete
5
+        style="margin:16px 5px"
6
+        popper-class="my-autocomplete"
7
+        v-model.trim="value"
8
+        :fetch-suggestions="querySearchAsync"
9
+        :trigger-on-focus="false"
10
+        placeholder="病人名字或者透析号"
11
+        @select="handleSelect"
12
+      >
13
+        <i class="el-icon-search el-input__icon" slot="suffix"> </i>
14
+        <template slot-scope="{ item }">
15
+          <div class="name">{{ item.name }}</div>
16
+        </template>
17
+      </el-autocomplete>
18
+      <el-select
19
+        v-model="selectID"
20
+        style="margin:0 5px 0px 5px;text-align: center;"
21
+        @change="changePatient"
22
+        placeholder="请选择"
23
+      >
24
+        <el-option
25
+          v-for="item in patientsList"
26
+          :key="item.id"
27
+          :label="item.name"
28
+          :value="item.id"
29
+        >
30
+        </el-option>
31
+      </el-select>
32
+
33
+      <el-tree
34
+        :data="treeData"
35
+        accordion
36
+        node-key="name"
37
+        :key="treeKey"
38
+        :current-node-key="treeKey"
39
+        :default-expanded-keys="[defaultActive]"
40
+        @node-click="handleNodeClick"
41
+      >
42
+      </el-tree>
43
+    </div>
44
+    <div class="patient-app-container" :style="{width:treeKey!='3-4' ?'100vw':''}">
45
+      <span class="patient-name"
46
+        >姓名:{{ currentPatient.name }} &nbsp;&nbsp; 性别:{{
47
+          tranSex(currentPatient.gender)
48
+        }}
49
+        &nbsp;&nbsp; 年龄:{{ getAge(currentPatient) }} &nbsp;&nbsp; 透析号:{{
50
+          currentPatient.dialysis_no
51
+        }}
52
+      </span>
53
+    </div>
54
+  </div>
55
+</template>
56
+<script>
57
+import { fetchAllList, PostSearch } from '@/api/patient'
58
+import { jsGetAge, uParseTime } from '@/utils/tools'
59
+
60
+export default {
61
+  name: 'patientSidebar',
62
+  value: '',
63
+  searchArray: [],
64
+  props: {
65
+    id: 0,
66
+    defaultActive: {
67
+      type: String,
68
+      default: '1-1'
69
+    }
70
+  },
71
+  data() {
72
+    return {
73
+      thedefaultActive: 1,
74
+      patientsList: [],
75
+      currentPatient: {},
76
+      selectID: 0,
77
+      keyword: '',
78
+      value: '',
79
+      treeKey: '',
80
+      org_id:0,
81
+      treeData: [
82
+        {
83
+          name: '1',
84
+          label: '电子病历',
85
+          children: [
86
+            {
87
+              name: '1-1',
88
+              label: '基本信息'
89
+            },
90
+            {
91
+              name: '1-4',
92
+              label: '医嘱管理'
93
+            },
94
+            {
95
+              name: '1-6',
96
+              label: '干体重'
97
+            },
98
+            {
99
+              name:'1-7',
100
+              label:'血管通路'
101
+            },
102
+            // {
103
+            //   name: '1-2',
104
+            //   label: '病程管理'
105
+            // },
106
+            // {
107
+            //   name: '1-9',
108
+            //   label: '阶段小结'
109
+            // },
110
+            // {
111
+            //   name: '1-10',
112
+            //   label: '出院小结'
113
+            // },
114
+            // {
115
+            //   name: '1-3',
116
+            //   label: '检验检查'
117
+            // },
118
+            // {
119
+            //   name:'1-8',
120
+            //   label:'传染病管理'
121
+            // },
122
+            // {
123
+            //   name: '1-5',
124
+            //   label: '抢救记录'
125
+            // },
126
+            // {
127
+            //   name: '1-11',
128
+            //   label: '首次病程记录'
129
+            // }
130
+          ]
131
+        },
132
+        {
133
+          name: '2',
134
+          label: '透析管理',
135
+          children: [
136
+            {
137
+              name: '2-1',
138
+              label: '长期透析处方'
139
+            },
140
+            {
141
+              name: '2-2',
142
+              label: '透析记录'
143
+            },
144
+            {
145
+              name: '2-4',
146
+              label: '排班信息'
147
+            },
148
+            {
149
+              name: '2-5',
150
+              label: '宣教信息'
151
+            }
152
+          ]
153
+        },
154
+        {
155
+          name: '3',
156
+          label: '病情记录',
157
+          children: [
158
+            {
159
+              name: '3-1',
160
+              label: '病史'
161
+            },
162
+            {
163
+              name: '3-4',
164
+              label: '病史新'
165
+            },
166
+            {
167
+              name: '3-2',
168
+              label: '体格检查'
169
+            },
170
+            {
171
+              name: '3-3',
172
+              label: '体格检查新'
173
+            },
174
+            {
175
+              name: '1-11',
176
+              label: '首次病程记录'
177
+            },
178
+            {
179
+              name: '1-2',
180
+              label: '病程记录'
181
+            }, {
182
+              name: '1-5',
183
+              label: '抢救记录'
184
+            }, {
185
+              name: '1-9',
186
+              label: '阶段小结'
187
+            }, {
188
+              name: '1-10',
189
+              label: '出院小结'
190
+            },
191
+          ]
192
+        },
193
+        {
194
+          name: '4',
195
+          label: '检验检查',
196
+          children: [
197
+            {
198
+              name: '1-3',
199
+              label: '肾科检验'
200
+            },
201
+            // {
202
+            //   name: '4-12',
203
+            //   label: '新版肾科检验'
204
+            // },
205
+            {
206
+              name: '4-1',
207
+              label: '肾科检查'
208
+            },
209
+            {
210
+              name: '4-3',
211
+              label: 'KT/V'
212
+            },
213
+            {
214
+              name: '1-8',
215
+              label: '传染病管理'
216
+            },
217
+          ]
218
+        },
219
+         {
220
+          name: '5',
221
+          label: '评估工具',
222
+          children: [
223
+            {
224
+              name: '5-1',
225
+              label: '跌倒评估'
226
+            },
227
+            {
228
+              name: '5-2',
229
+              label: '小儿跌倒风险评估'
230
+            },
231
+            {
232
+              name: '5-3',
233
+              label: '压疮风险评估'
234
+            },
235
+            {
236
+              name: '5-4',
237
+              label: 'OH压疮评估'
238
+            },
239
+            {
240
+              name: '5-5',
241
+              label: '日常生活能力评估'
242
+            },
243
+            {
244
+              name: '5-6',
245
+              label: '导管脱落风险评估'
246
+            },
247
+            {
248
+              name: '5-7',
249
+              label: 'RASS及疼痛评估'
250
+            },
251
+            {
252
+              name: '5-8',
253
+              label: '营养状况评估'
254
+            },
255
+            // {
256
+            //   name: '5-9',
257
+            //   label: '约束告知单'
258
+            // },
259
+            {
260
+              name: '5-10',
261
+              label: '心理评估'
262
+            },
263
+            {
264
+              name: '5-11',
265
+              label: '瘙痒评估'
266
+            },
267
+            {
268
+              name: '5-12',
269
+              label: '血液透析患者评估'
270
+            },
271
+            {
272
+              name: '5-13',
273
+              label: 'Glasgow昏迷评分量表'
274
+            },
275
+            {
276
+              name: '5-14',
277
+              label: '肌力评估表'
278
+            },
279
+           ]
280
+         },
281
+        {
282
+          name: '6',
283
+          label: '文书管理',
284
+          children: [
285
+            {
286
+              name: '6-1',
287
+              label: '知情同意书'
288
+            },
289
+          ]
290
+        },
291
+        {
292
+          name: '7',
293
+          label: '转归记录',
294
+        },
295
+
296
+      ],
297
+      name:""
298
+    }
299
+  },
300
+  methods: {
301
+    handleNodeClick(data) {
302
+
303
+      var name = data.name
304
+      this.name = data.name
305
+      window.sessionStorage.setItem('patientKey',data.name)
306
+      if (name == '1-1') {
307
+        this.$router.push({ path: '/patients/patient/' + this.id })
308
+      } else if (name == '1-2') {
309
+        this.$router.push({ path: '/patients/course?id=' + this.id })
310
+      } else if (name == '1-3') {
311
+        this.$router.push({ path: '/patients/inspection?id=' + this.id })
312
+      } else if (name == '1-4') {
313
+        this.$router.push({
314
+          path: '/patients/patient/' + this.id + '/doctorAdvice'
315
+        })
316
+      } else if (name == '1-6') {
317
+        this.$router.push({
318
+          path: '/patients/patient/' + this.id + '/dryWeight'
319
+        })
320
+      } else if (name == '1-5') {
321
+        this.$router.push({ path: '/patients/rescue?id=' + this.id })
322
+      } else if (name == '2-1') {
323
+        this.$router.push({
324
+          path: '/patients/patient/' + this.id + '/dialysisSolution'
325
+        })
326
+      } else if (name == '2-2') {
327
+        this.$router.push({
328
+          path: '/patients/patient/' + this.id + '/dialysisRecord'
329
+        })
330
+      } else if (name == '2-4') {
331
+        this.$router.push({
332
+          path: '/patients/patient/' + this.id + '/scheduling'
333
+        })
334
+      } else if (name == '2-5') {
335
+        this.$router.push({
336
+          path: '/patients/patient/' + this.id + '/proeducation'
337
+        })
338
+      } else if (name == '1-7'){
339
+        this.$router.push({path:'/patients/patient/'+this.id+'/vascularAccess'})
340
+      } else if (name == '1-8'){
341
+        this.$router.push({path:'/patients/patients/'+this.id+'/inspectionInfectious'})
342
+      } else if (name == '1-9'){
343
+        this.$router.push({path:'/patient/patient/'+this.id+'/templateSummary'})
344
+      } else if(name == '1-10'){
345
+        this.$router.push({path:'/patient/patient/'+this.id+'/hospitalSummary'})
346
+      } else if(name == '1-11'){
347
+        this.$router.push({path:'/patient/patient/'+this.id+'/firstDisease'})
348
+      } else if(name == '3-1'){
349
+        this.$router.push({ path: '/patients/sickhistory?id=' + this.id })
350
+      } else if(name == '3-2'){
351
+        this.$router.push({path:'/patients/physicalexamination?id='+this.id})
352
+      } else if(name == '3-3'){
353
+        this.$router.push({path:'/patients/new_physicalexamination?id='+this.id})
354
+      } else if(name == '3-4'){
355
+        this.$router.push({ path: '/patients/sickHistory_new?id='+ this.id })
356
+      } else if(name == '4-1'){
357
+        this.$router.push({path:'/patients/inspection_check?id='+this.id})
358
+      } else if(name == '4-3'){
359
+        this.$router.push({path:'/patients/ktv?id='+this.id})
360
+      }else if(name == '4-12'){
361
+        this.$router.push({path:'/patients/newInspection?id='+this.id})
362
+      }
363
+      else if (name == '5-1') {
364
+        this.$router.push({
365
+          path: '/patients/patient/'+ this.id +'/Fallassessment'
366
+        })
367
+      } else if (name == '5-2') {
368
+        this.$router.push({
369
+          path: '/patients/patient/' + this.id + '/pediatricFallAssessment'
370
+        })
371
+      } else if (name == '5-3') {
372
+        this.$router.push({
373
+          path: '/patients/patient/' + this.id + '/pressuresore'
374
+        })
375
+      } else if (name == '5-4') {
376
+        this.$router.push({
377
+          path: '/patients/patient/' + this.id + '/OHpressuresore'
378
+        })
379
+      } else if (name == '5-5'){
380
+        this.$router.push({path:'/patients/patient/'+this.id+'/dailyLife'})
381
+      } else if (name == '5-6'){
382
+        this.$router.push({path:'/patients/patient/'+this.id+'/Cathetershedding'})
383
+      } else if (name == '5-7'){
384
+        this.$router.push({path:'/patients/patient/'+this.id+'/RassAssessment'})
385
+      } else if(name == '5-8'){
386
+        this.$router.push({path:'/patients/patient/'+this.id+'/nourishmentAssessment'})
387
+      } else if(name == '5-9'){
388
+        this.$router.push({path:'/patients/patient/'+this.id+'/Constraintnotification'})
389
+      } else if(name == '5-10'){
390
+        this.$router.push({ path: '/patients/patient/' + this.id+'/mindAssessment'})
391
+      } else if(name == '5-11'){
392
+        this.$router.push({path:'/patients/patient/' + this.id+'/pruritusAssessment'})
393
+
394
+      } else if(name == '5-12'){
395
+        this.$router.push({path:'/patients/patient/' + this.id+'/hemodialysis'})
396
+      } else if(name == '5-13'){
397
+        this.$router.push({path:'/patients/patient/' + this.id+'/Glasgow'})
398
+      } else if(name == '5-14'){
399
+        this.$router.push({path:'/patients/patient/' + this.id+'/Muscleforce'})
400
+      }else if(name == '6-1'){
401
+        this.$router.push({path: '/patients/patient/' + this.id+ '/Informedconsent'})
402
+      }else if(name == '7'){
403
+        this.$router.push({path:'/patient/patient/'+this.id+'/lapsoSummary'})
404
+      }
405
+
406
+    },
407
+    changePatient(value) {
408
+      console.log(value)
409
+      if(this.$route.path.indexOf('edit') > -1){
410
+        this.$confirm('是否保存当前病历', '保存', {
411
+          confirmButtonText: '确 定',
412
+          cancelButtonText: '取 消',
413
+          type: 'warning'
414
+        }).then(() => {
415
+            this.$emit('updateInfo')
416
+            setTimeout(() => {
417
+              this.$router.push('/patients/patient/' + value)
418
+            },1000)
419
+        }).catch(() => {
420
+          this.$router.push('/patients/patient/' + value)
421
+        })
422
+      }else{
423
+        this.$router.push('/patients/patient/' + value)
424
+      }
425
+
426
+
427
+    },
428
+    getList() {
429
+      fetchAllList().then(response => {
430
+        if (response.data.state == 1) {
431
+          if(this.org_id ==10191){
432
+             var patients = response.data.data.patients
433
+            //  console.log("patients",patients)
434
+             for(let i=0;i<patients.length;i++){
435
+               if(patients[i].lapseto ==1){
436
+                this.patientsList.push(patients[i])
437
+               }
438
+
439
+             }
440
+          }else{
441
+            this.patientsList = response.data.data.patients
442
+          }
443
+
444
+
445
+          var len = this.patientsList.length
446
+          if (len > 0) {
447
+            for (let index = 0; index < len; index++) {
448
+              if (this.patientsList[index].id == this.id) {
449
+                this.currentPatient = this.patientsList[index]
450
+                // console.log("curr", this.currentPatient);
451
+                this.selectID = this.patientsList[index].id
452
+                this.$emit('tran-patient', this.currentPatient)
453
+                break
454
+              }
455
+            }
456
+          }
457
+        }
458
+      })
459
+    },
460
+    tranAge(birthday) {
461
+      var birth = uParseTime(birthday, '{y}-{m}-{d}')
462
+      return jsGetAge(birth, '-')
463
+    },
464
+    tranSex(gender) {
465
+      var sex = '未知'
466
+      switch (gender) {
467
+        case 1:
468
+          sex = '男'
469
+          break
470
+        case 2:
471
+          sex = '女'
472
+          break
473
+        default:
474
+          break
475
+      }
476
+      return sex
477
+    },
478
+    querySearchAsync(keyword, cb) {
479
+
480
+      let key = ''
481
+      if (keyword != undefined) {
482
+        key = keyword
483
+      }
484
+      let searchArray = []
485
+      PostSearch(key).then(response => {
486
+        if (response.data.state == 1) {
487
+          searchArray = response.data.data.patient
488
+          cb(searchArray)
489
+        } else {
490
+          this.$message.error(response.data.msg)
491
+          cb([])
492
+        }
493
+      })
494
+    },
495
+    handleSelect(val) {
496
+      this.$router.push('/patients/patient/' + val.id)
497
+    },
498
+    getAge: function(val) {
499
+      if (val.id_card_no == undefined) {
500
+        return false
501
+      }
502
+      var thisLen = val.id_card_no.length
503
+      var birth = ''
504
+      if (thisLen == 15) {
505
+        birth = '19' + val.id_card_no.substr(6, 6)
506
+      } else {
507
+        birth = val.id_card_no.substr(6, 8)
508
+      }
509
+      var birthtwo =
510
+        birth.substr(0, 4) +
511
+        '-' +
512
+        birth.substr(4, 2) +
513
+        '-' +
514
+        birth.substr(6, 2)
515
+
516
+      var age = jsGetAge(birthtwo, '-')
517
+      return age
518
+    }
519
+  },
520
+  created() {
521
+    var patientKey = window.sessionStorage.getItem('patientKey')
522
+    console.log("patient-----------------",patientKey)
523
+    this.org_id = this.$store.getters.xt_user.template_info.org_id
524
+    var query = this.$route.path
525
+    console.log("query",this.$route.path)
526
+    if(patientKey){
527
+     this.treeKey = patientKey
528
+     if(query.indexOf('edit') == -1){
529
+      if (patientKey == '1-1') {
530
+        this.$router.push({ path: '/patients/patient/' + this.id })
531
+      } else if (patientKey == '1-2') {
532
+        this.$router.push({ path: '/patients/course?id=' + this.id })
533
+      } else if (patientKey == '1-3') {
534
+        this.$router.push({ path: '/patients/inspection?id=' + this.id })
535
+      } else if (patientKey == '1-4') {
536
+        this.$router.push({
537
+          path: '/patients/patient/' + this.id + '/doctorAdvice'
538
+        })
539
+      } else if (patientKey == '1-6') {
540
+        this.$router.push({
541
+          path: '/patients/patient/' + this.id + '/dryWeight'
542
+        })
543
+      }else if(patientKey == '1-11'){
544
+       this.$router.push({path: '/patients/patient/' + this.id + '/firstDisease'})
545
+      }else if (patientKey == '1-5') {
546
+        this.$router.push({ path: '/patients/rescue?id=' + this.id })
547
+      } else if (patientKey == '2-1') {
548
+        this.$router.push({
549
+          path: '/patients/patient/' + this.id + '/dialysisSolution'
550
+        })
551
+      } else if (patientKey == '2-2') {
552
+        this.$router.push({
553
+          path: '/patients/patient/' + this.id + '/dialysisRecord'
554
+        })
555
+      } else if (patientKey == '2-4') {
556
+        this.$router.push({
557
+          path: '/patients/patient/' + this.id + '/scheduling'
558
+        })
559
+      } else if (patientKey == '2-5') {
560
+        this.$router.push({
561
+          path: '/patients/patient/' + this.id + '/proeducation'
562
+        })
563
+      } else if (patientKey == '3-1') {
564
+        this.$router.push({ path: '/patients/sickhistory?id=' + this.id })
565
+      }else if(patientKey == '7'){
566
+        this.$router.push({path:'/patient/patient/'+this.id+'/lapsoSummary'})
567
+      }else if(patientKey == '4-12'){
568
+        this.$router.push({path:'/patients/newInspection?id='+this.id})
569
+      }
570
+
571
+     }else{
572
+       this.treeKey = "1-1"
573
+
574
+     }
575
+    }else{
576
+       this.treeKey = this.defaultActive
577
+
578
+    }
579
+
580
+
581
+    this.getList()
582
+  },
583
+
584
+}
585
+</script>
586
+
587
+<style>
588
+.patient-menu .el-tree-node__content {
589
+  font-size: 14px;
590
+  height: 40px;
591
+  font-weight: 400;
592
+}
593
+.patient-menu .el-tree-node__label:hover {
594
+  color: #409eff;
595
+}
596
+.patient-menu .el-tree-node:focus > .el-tree-node__content {
597
+  color: #409eff;
598
+}
599
+.patient-menu .el-tree-node .el-tree-node.is-current > .el-tree-node__content {
600
+  color: #409eff;
601
+}
602
+.patient-menu .el-tree {
603
+  background: #f6f8f9;
604
+}
605
+.patient-menu {
606
+  -webkit-transition: width 0.28s;
607
+  transition: width 0.28s;
608
+  width: 180px !important;
609
+  height: 100%;
610
+  position: relative;
611
+  font-size: 0px;
612
+  top: 0;
613
+  float: left;
614
+  bottom: 0;
615
+  left: 0;
616
+  /* z-index: 99; */
617
+  overflow: hidden;
618
+}
619
+
620
+.patient-center-menu .el-icon-arrow-down:before {
621
+  content: "";
622
+}
623
+</style>

+ 8 - 3
src/xt_pages/user/patientInfo.vue Vedi File

@@ -1,7 +1,8 @@
1 1
 
2 2
 <template>
3 3
   <div class="patient-container">
4
-  <patient-sidebar :id="patientID"></patient-sidebar>
4
+  <!-- <patient-sidebar :id="patientID"></patient-sidebar> -->
5
+   <PatientSidebar_new :id="patientID"></PatientSidebar_new>
5 6
   <patient-detail :is-edit='true' :class='panelClass' v-on:tran-patient-info="patientInfo=$event"></patient-detail>
6 7
   </div>
7 8
 </template>
@@ -9,10 +10,14 @@
9 10
 <script>
10 11
 import PatientDetail from './components/PatientDetail'
11 12
 import PatientSidebar from './components/PatientSidebar'
12
-
13
+import PatientSidebar_new from './components/PatientSidebar_new'
13 14
 export default {
14 15
    name: 'editForm',
15
-  components: { PatientDetail, PatientSidebar},
16
+  components: {
17
+    PatientDetail,
18
+    PatientSidebar,
19
+    PatientSidebar_new
20
+  },
16 21
   data() {
17 22
     return {
18 23
       patientID: 0,

+ 748 - 0
src/xt_pages/user/sickHistory_new.vue Vedi File

@@ -0,0 +1,748 @@
1
+<template>
2
+  <div class="patient-container">
3
+    <!-- <patient-sidebar :id="patient_id" defaultActive="3-1"></patient-sidebar> -->
4
+        <PatientSidebar_new :id="patient_id" defaultActive="3-4"></PatientSidebar_new>
5
+    <!-- <div class="app-container"> -->
6
+    <div v-loading="loading">
7
+      <div class="patient-app-container advice-container app-container">
8
+        <div style="display: flex;">
9
+          <div style="width: 25%;">
10
+            <div style="display: flex;">
11
+              <div style="flex: 1.1;">
12
+                <span style="display: inline-block;border-left: 5px solid #3891f1f5;padding-left: 5px;">病史列表</span>
13
+              </div>
14
+              <div style="flex: 0.9;text-align: right;">
15
+                <el-button type="primary" size="small" @click="add_click">添加</el-button>
16
+              </div>
17
+            </div>
18
+            <div>
19
+              <el-table class="table"
20
+                ref="phy_table"
21
+                :data="tableData"
22
+                :highlight-current-row="true"
23
+                @row-click="rowclick"
24
+                style="width: 100%">
25
+                <el-table-column
26
+                  prop="index"
27
+                  label="序号"
28
+                  width="50">
29
+                </el-table-column>
30
+                <el-table-column
31
+                  prop="date"
32
+                  label="时间"
33
+                  width="">
34
+                </el-table-column>
35
+                <el-table-column
36
+                  prop="doctor"
37
+                  label="医生">
38
+                </el-table-column>
39
+              </el-table>
40
+            </div>
41
+          </div>
42
+          <div style="width: 75%;margin-left: 10px;">
43
+            <div style="display: flex;">
44
+              <div style="flex: 1;">
45
+                <span style="display: inline-block;border-left: 5px solid #3891f1f5;padding-left: 5px;">详情</span>
46
+              </div>
47
+              <div style="flex: 1;text-align: right;">
48
+                <div v-if='add_index == 0'>
49
+                  <el-button type="primary" size="small" @click="showEdit">修改</el-button>
50
+                  <el-button size="small" type="danger" @click="deleteAction">删除</el-button>
51
+                  <el-button type="primary" size="small" @click="prints">打印</el-button>
52
+                </div>
53
+                <div v-if="add_index == 1">
54
+                  <el-button type="primary" size="small" @click="showSave">保存</el-button>
55
+                  <el-button size="small" @click="showCancel">取消</el-button>
56
+                </div>
57
+              </div>
58
+            </div>
59
+            <div style="display: flex;margin: 20px 0;">
60
+              <div style="flex: 1;">
61
+                日期:
62
+                <el-date-picker
63
+                  v-model="history_date"
64
+                  type="date"
65
+                  :disabled="disabled"
66
+                  style="width: 150px;"
67
+                  placeholder="选择日期">
68
+                </el-date-picker>
69
+              </div>
70
+              <div style="flex: 1;">
71
+                肾移植史:
72
+                <el-select v-model="shen_yizhi" placeholder="请选择" style="width: 120px;" :disabled="disabled">
73
+                  <el-option
74
+                    v-for="item in yizhi_options"
75
+                    :key="item.value"
76
+                    :label="item.label"
77
+                    :value="item.value">
78
+                  </el-option>
79
+                </el-select>
80
+              </div>
81
+              <div style="flex: 1;">
82
+                腹膜透析史:
83
+                <el-select v-model="shen_fumo" placeholder="请选择" style="width: 120px;" :disabled="disabled">
84
+                  <el-option
85
+                    v-for="item in yizhi_options"
86
+                    :key="item.value"
87
+                    :label="item.label"
88
+                    :value="item.value">
89
+                  </el-option>
90
+                </el-select>
91
+              </div>
92
+            </div>
93
+            <div style="display: flex;">
94
+              <div style="width: 30%;">
95
+                医生:
96
+                <el-select v-model="shen_yishen" placeholder="请选择" style="width: 120px;" :disabled="disabled">
97
+                  <el-option
98
+                    v-for="item in yishen_options"
99
+                    :key="item.value"
100
+                    :label="item.label"
101
+                    :value="item.value">
102
+                  </el-option>
103
+                </el-select>
104
+              </div>
105
+              <div style="width: 30%;">
106
+                过敏药物:
107
+                <el-select v-model="shen_guomi" placeholder="请选择" style="width: 120px;" :disabled="disabled">
108
+                  <el-option
109
+                    v-for="item in guomi_options"
110
+                    :key="item.value"
111
+                    :label="item.label"
112
+                    :value="item.value">
113
+                  </el-option>
114
+                </el-select>
115
+              </div>
116
+            </div>
117
+
118
+            <div style="margin-top: 30px;">
119
+              <span style="display: inline-block;border-left: 5px solid #3891f1f5;padding-left: 5px;margin-bottom: 5px;">详情</span>
120
+              <keep-alive>
121
+                <ueditor ref="ue" :content="new_content" id="editor"></ueditor>
122
+              </keep-alive>
123
+            </div>
124
+          </div>
125
+        </div>
126
+
127
+      </div>
128
+      <!-- </div> -->
129
+      <el-dialog title="新增病史记录" width="70%" top="5vh" :visible.sync="show_dialog">
130
+        <div>
131
+          <div class="new_record_form">
132
+            <div class="cell clearfix" style="margin-bottom: 20px;">
133
+              <label class="title"><span class="name">病程标题</span> : </label>
134
+              <el-input v-model="title" style="width: 150px"></el-input>
135
+
136
+              <label class="title" style="margin-left: 20px;"><span class="name">日期</span> : </label>
137
+              <el-date-picker v-model="sick_history_time" prefix-icon="el-icon-date" :editable="false"
138
+                              style="width: 150px;"
139
+                              type="datetime" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
140
+                              value-format="yyyy-MM-dd "></el-date-picker>
141
+
142
+
143
+              <label class="title" style="margin-left: 20px;"><span class="name">肾移植史</span> : </label>
144
+              <el-select style="width: 150px;" v-model="is_shenyizhishi" placeholder="选择肾移植史" >
145
+                <el-option label="无" value="0"></el-option>
146
+                <el-option label="有" value="1"></el-option>
147
+              </el-select>
148
+            </div>
149
+
150
+            <div class="cell clearfix" style="margin-bottom: 20px;">
151
+
152
+              <label class="title" ><span class="name">腹膜透析史</span> : </label>
153
+              <el-select style="width: 150px;" v-model="is_fumotouxishi" placeholder="选择腹膜透析史" >
154
+                <el-option label="无" value="0"></el-option>
155
+                <el-option label="有" value="1"></el-option>
156
+              </el-select>
157
+
158
+              <label class="title" style="margin-left: 20px;"><span class="name">医生</span> : </label>
159
+              <el-select style="width: 100px;" v-model="doctor_id" placeholder="请选择医生">
160
+                <el-option v-for="(item,index) in doctorOptions" :label="item.name" :value="item.id" :key="index"></el-option>
161
+              </el-select>
162
+
163
+              <label class="title" style="margin-left: 20px;"><span class="name">过敏药物</span> : </label>
164
+              <el-select style="width: 100px;" v-model="is_guominyaowu" placeholder="选择过敏药物">
165
+                <el-option label="无" value="0"></el-option>
166
+                <el-option label="有" value="1"></el-option>
167
+                <el-option label="不详" value="2"></el-option>
168
+
169
+              </el-select>
170
+              <el-input v-if="is_guominyaowu == 1" v-model="guominyaowu_desc"></el-input>
171
+
172
+            </div>
173
+
174
+            <div class="cell clearfix" >
175
+              <label class="title"><span class="name">病史模版</span> : </label>
176
+              <el-select v-model="select_template" placeholder="选择病史模板" @change="didSelectTemplate">
177
+                <el-option v-for="(option, index) in templates" :key="index" :label="option.title"
178
+                           :value="option.content"></el-option>
179
+              </el-select>
180
+            </div>
181
+
182
+            <div class="textarea_panel">
183
+              <keep-alive>
184
+                <editor ref="editor"
185
+                        id="editors"
186
+                        style="width: 100%"
187
+                        v-bind:r_content="new_content"
188
+                >
189
+                </editor>
190
+              </keep-alive>
191
+            </div>
192
+
193
+            <div style="text-align: right; padding-right: 0px; padding-top: 20px; padding-bottom: 10px;">
194
+              <el-button @click="show_dialog = false">取消</el-button>
195
+              <el-button :disabled="$store.getters.xt_user.subscibe.state==3?true:false" type="primary"
196
+                         @click="createAction" :loading="uploading_new_record">保存
197
+              </el-button>
198
+            </div>
199
+          </div>
200
+        </div>
201
+      </el-dialog>
202
+
203
+      <el-dialog title="修改病史记录" width="50%" top="5vh" :visible.sync="show_edit_dialog">
204
+        <div>
205
+          <div class="new_record_form">
206
+            <div class="cell clearfix" style="margin-bottom: 20px;">
207
+              <label class="title"><span class="name">病程标题</span> : </label>
208
+              <el-input v-model="edit_title" style="width: 150px"></el-input>
209
+
210
+              <label class="title" style="margin-left: 20px;"><span class="name">日期</span> : </label>
211
+              <el-date-picker v-model="edit_sick_history_time" prefix-icon="el-icon-date" :editable="false"
212
+                              style="width: 150px;"
213
+                              type="datetime" placeholder="选择日期时间" align="right" format="yyyy-MM-dd "
214
+                              value-format="yyyy-MM-dd "></el-date-picker>
215
+
216
+
217
+              <label class="title" style="margin-left: 20px;"><span class="name">肾移植史</span> : </label>
218
+              <el-select style="width: 150px;" v-model="edit_is_shenyizhishi" placeholder="选择肾移植史" >
219
+                <el-option label="无" value="0"></el-option>
220
+                <el-option label="有" value="1"></el-option>
221
+              </el-select>
222
+            </div>
223
+
224
+            <div class="cell clearfix" style="margin-bottom: 20px;">
225
+
226
+              <label class="title" ><span class="name">腹膜透析史</span> : </label>
227
+              <el-select style="width: 150px;" v-model="edit_is_fumotouxishi" placeholder="选择腹膜透析史" >
228
+                <el-option label="无" value="0"></el-option>
229
+                <el-option label="有" value="1"></el-option>
230
+              </el-select>
231
+
232
+              <label class="title" style="margin-left: 20px;"><span class="name">医生</span> : </label>
233
+              <el-select style="width: 100px;" v-model="edit_doctor_id" placeholder="请选择医生">
234
+                <el-option v-for="(item,index) in doctorOptions" :label="item.name" :value="item.id" :key="index"></el-option>
235
+              </el-select>
236
+
237
+              <label class="title" style="margin-left: 20px;"><span class="name">过敏药物</span> : </label>
238
+              <el-select style="width: 100px;" v-model="edit_is_guominyaowu" placeholder="选择过敏药物">
239
+                <el-option label="无" value="0"></el-option>
240
+                <el-option label="有" value="1"></el-option>
241
+              </el-select>
242
+              <el-input v-if="edit_is_guominyaowu == 1" v-model="edit_guominyaowu_desc"></el-input>
243
+
244
+            </div>
245
+
246
+            <div class="cell clearfix">
247
+              <label class="title"><span class="name">病史模版</span> : </label>
248
+              <el-select v-model="select_template" placeholder="选择病史模板" @change="didSelectTemplate">
249
+                <el-option v-for="(option, index) in templates" :key="index" :label="option.title"
250
+                           :value="option.content"></el-option>
251
+              </el-select>
252
+            </div>
253
+
254
+            <div class="textarea_panel">
255
+              <keep-alive>
256
+                <editor ref="edit_neditor"
257
+                        id="editors"
258
+                        style="width: 100%"
259
+                        v-bind:r_content="edit_new_content"
260
+                >
261
+                </editor>
262
+              </keep-alive>
263
+            </div>
264
+
265
+
266
+            <div style="text-align: right; padding-right: 0px; padding-top: 20px; padding-bottom: 10px;">
267
+              <el-button @click="show_edit_dialog = false">取消</el-button>
268
+              <el-button type="primary"
269
+                         @click="modifyAction" :loading="uploading_new_record">保存
270
+              </el-button>
271
+            </div>
272
+          </div>
273
+        </div>
274
+      </el-dialog>
275
+    </div>
276
+  </div>
277
+
278
+  <!-- </div> -->
279
+</template>
280
+
281
+<script>
282
+import PatientSidebar from './components/PatientSidebar'
283
+import PatientSidebar_new from './components/PatientSidebar_new'
284
+import Editor from '@/components/Editor'
285
+import ueditor from '@/components/Uedtior'
286
+import { fetchAllDoctorAndNurse } from "@/api/doctor";
287
+ import print from 'print-js'
288
+import {
289
+  createSickHistoryRecord,
290
+  deleteSickHistoryRecords,
291
+  GetSickHistoryRecords,
292
+  ModifySickHistoryRecord,
293
+} from '@/api/patient'
294
+import { parseTime } from '@/utils'
295
+import BreadCrumb from '@/xt_pages/components/bread-crumb'
296
+
297
+export default {
298
+  name: 'CourseOfDisease',
299
+  components: {
300
+    PatientSidebar,
301
+    BreadCrumb,
302
+    Editor,
303
+    ueditor,
304
+    PatientSidebar_new
305
+  },
306
+  data() {
307
+    return {
308
+      loading: false,
309
+      title: '',
310
+      patient_id: 0,
311
+      date: [],
312
+      start_time: '',
313
+      end_time: '',
314
+      sick_history_time: '',
315
+      is_shenyizhishi:'',
316
+      is_fumotouxishi:'',
317
+      is_guominyaowu:'',
318
+      guominyaowu_desc:"",
319
+
320
+      edit_is_shenyizhishi:'',
321
+      edit_is_fumotouxishi:'',
322
+      edit_is_guominyaowu:'',
323
+      edit_guominyaowu_desc:"",
324
+
325
+      doctor_id:"",
326
+      doctorOptions:null,
327
+      records: [],
328
+      doctors: [],
329
+      current_select_record: null,
330
+      show_dialog: false,
331
+      show_edit_dialog: false,
332
+      uploading_new_record: false,
333
+      templates: this.$store.getters.configlist.sick_history,
334
+      select_template:"",
335
+      new_content: '111111',
336
+      edit_new_content: '',
337
+      edit_sick_history_time: '',
338
+      selectingRows: [],
339
+      table_current_index: -1,
340
+      edit_current_id: 0,
341
+      edit_doctor_id:0,
342
+      edit_title: '',
343
+      ids:"",
344
+      idArr:[],
345
+
346
+      add_index:0,
347
+      disabled:true,
348
+      history_date:'',
349
+      shen_yizhi:'',
350
+      shen_fumo:'',
351
+      shen_yishen:'',
352
+      shen_guomi:'',
353
+      yizhi_options:[{value:1,label:'无'},{value:2,label:'有'}],
354
+      yishen_options:[],
355
+      guomi_options:[{value:1,label:'无'},{value:2,label:'有'},{value:3,label:'不详'}],
356
+      tableData:[{index:1,date:'2024-11-12',doctor:'王启年'}],
357
+    }
358
+  },
359
+  created() {
360
+    this.patient_id = parseInt(this.$route.query.id)
361
+    if (isNaN(this.patient_id) || this.patient_id <= 0) {
362
+      this.$notify.error({
363
+        title: '错误',
364
+        message: '无效的id'
365
+      })
366
+      this.$router.push('/patients/patients')
367
+      return
368
+    }
369
+    var now = new Date()
370
+    this.date = [now.getTime() - (7 * 24 * 60 * 60 * 1000), now.getTime()]
371
+
372
+    var nowDate = new Date()
373
+    var nowYear = nowDate.getFullYear()
374
+    var nowMonth = nowDate.getMonth() + 1
375
+    var nowDay = nowDate.getDate()
376
+    this.end_time =
377
+      nowYear +
378
+      '-' +
379
+      (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
380
+      '-' +
381
+      (nowDay < 10 ? '0' + nowDay : nowDay)
382
+    nowDate.setMonth(nowDate.getMonth() - 1)
383
+    nowYear = nowDate.getFullYear()
384
+    nowMonth = nowDate.getMonth() + 1
385
+    nowDay = nowDate.getDate()
386
+    this.start_time =
387
+      nowYear +
388
+      '-' +
389
+      (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
390
+      '-' +
391
+      (nowDay < 10 ? '0' + nowDay : nowDay)
392
+
393
+    this.requestSickHistory()
394
+    this.fetchAllDoctorAndNurse()
395
+
396
+  },
397
+  methods: {
398
+    add_click(){
399
+      this.disabled = false
400
+      this.add_index = 1
401
+    },
402
+    showSave(){
403
+      // this.disabled = true
404
+      this.add_index = 0
405
+    },
406
+    showCancel(){
407
+      this.add_index = 0
408
+    },
409
+    rowclick(row,column, eventc){
410
+      console.log('row',row);
411
+      // this.edit_index = row.index
412
+    },
413
+    template_click(){
414
+      console.log('this.add_index',this.add_index);
415
+
416
+      if(this.add_index ==0){
417
+        this.template_dialog = true
418
+      }else{
419
+        this.library_dialog = true
420
+      }
421
+
422
+    },
423
+    template_save(){
424
+      this.template_dialog = false
425
+      this.$message({
426
+        message: '模板设置成功',
427
+        type: 'success'
428
+      })
429
+    },
430
+    prints(){
431
+      const style ='@media print{.content{width:960px;margin:0 auto;font-size: 23px;}}'
432
+      printJS({
433
+        printable: 'Physical_print_content',
434
+        type: 'html',
435
+        style: style,
436
+        scanStyles: false
437
+      })
438
+    },
439
+
440
+
441
+
442
+
443
+    fetchAllDoctorAndNurse() {
444
+      fetchAllDoctorAndNurse().then(response => {
445
+        if (response.data.state == 1) {
446
+          this.doctorOptions = response.data.data.doctors;
447
+        }
448
+      });
449
+    },
450
+    requestSickHistory: function() {
451
+      this.loading = true
452
+      let params = {
453
+        patient_id:this.patient_id,
454
+        start_time:this.start_time,
455
+        end_time:this.end_time,
456
+      }
457
+      GetSickHistoryRecords(params).then(rs => {
458
+        this.loading = false
459
+        var resp = rs.data
460
+        if (resp.state == 1) {
461
+          this.current_select_record = null
462
+          this.records = resp.data.records
463
+          this.doctors = resp.data.doctors
464
+          this.$refs.record_table.setCurrentRow(this.records[0])
465
+        } else {
466
+          this.$message.error(resp.msg)
467
+        }
468
+      }).catch(error => {
469
+        this.loading = false
470
+        this.$message.error(error)
471
+      })
472
+    },
473
+
474
+    didChangeCurrentRecord: function(record) {
475
+      this.current_select_record = record
476
+    },
477
+    recordTime: function(timestamp) {
478
+      var time = new Date(timestamp * 1000)
479
+      return parseTime(time, '{y}-{m}-{d} {h}:{i}:{s}')
480
+    },
481
+    doctorName: function(doctor_id) {
482
+      for (let index = 0; index < this.doctorOptions.length; index++) {
483
+        const doctor = this.doctorOptions[index]
484
+        if (doctor.id == doctor_id) {
485
+          return doctor.name
486
+        }
487
+      }
488
+      return ''
489
+    },
490
+    modifyAction: function() {
491
+      this.edit_new_content = this.$refs.edit_neditor.content
492
+      if (this.edit_new_content.length == 0) {
493
+        this.$message.error('请填写病程内容')
494
+        return
495
+      }
496
+      this.uploading_new_record = true
497
+      let params = {
498
+        id:this.edit_current_id,
499
+        patient_id: this.patient_id,
500
+        content: this.edit_new_content,
501
+        record_time: this.edit_sick_history_time + " 00:00:00",
502
+        title: this.edit_title,
503
+        is_shenyizhishi:this.edit_is_shenyizhishi,
504
+        is_fumotouxishi:this.edit_is_fumotouxishi,
505
+        is_guominyaowu:this.edit_is_guominyaowu,
506
+        guominyaowu_desc:this.edit_guominyaowu_desc,
507
+        doctor_id: this.edit_doctor_id
508
+      }
509
+
510
+      ModifySickHistoryRecord(params).then(rs => {
511
+        this.uploading_new_record = false
512
+        var resp = rs.data
513
+        if (resp.state == 1) {
514
+          this.records[this.table_current_index].content = resp.data.record.content
515
+          this.records[this.table_current_index].record_time = resp.data.record.record_time
516
+          this.records[this.table_current_index].recorder = resp.data.record.recorder
517
+          this.records[this.table_current_index].title = resp.data.record.title
518
+          this.records[this.table_current_index].doctor_id = resp.data.record.doctor_id
519
+          this.records[this.table_current_index].is_shenyizhi_history = resp.data.record.is_shenyizhi_history
520
+          this.records[this.table_current_index].is_fumo_dialysis_history = resp.data.record.is_fumo_dialysis_history
521
+          this.records[this.table_current_index].is_hypersusceptibility = resp.data.record.is_hypersusceptibility
522
+          this.records[this.table_current_index].hypersusceptibility_desc = resp.data.record.hypersusceptibility_desc
523
+          this.show_edit_dialog = false
524
+          this.edit_new_content = ''
525
+          this.table_current_index = -1
526
+        } else {
527
+          this.table_current_index = -1
528
+          this.$message.error(resp.msg)
529
+        }
530
+
531
+      }).catch(error => {
532
+        this.table_current_index = -1
533
+        this.uploading_new_record = false
534
+        this.$message.error(error)
535
+      })
536
+
537
+    },
538
+
539
+    createAction: function() {
540
+      this.new_content = this.$refs.editor.content
541
+      if (this.new_content.length == 0) {
542
+        this.$message.error('请填写病程内容')
543
+        return
544
+      }
545
+      this.uploading_new_record = true
546
+      let params = {
547
+        patient_id: this.patient_id,
548
+        content: this.new_content,
549
+        record_time: this.sick_history_time +" 00:00:00",
550
+        title: this.title,
551
+        is_shenyizhishi:this.is_shenyizhishi,
552
+        is_fumotouxishi:this.is_fumotouxishi,
553
+        is_guominyaowu:this.is_guominyaowu,
554
+        guominyaowu_desc:this.guominyaowu_desc,
555
+        doctor_id: this.doctor_id
556
+      }
557
+      createSickHistoryRecord(params).then(rs => {
558
+        this.uploading_new_record = false
559
+        this.$message.success("新增成功")
560
+        var resp = rs.data
561
+        if (resp.state == 1) {
562
+          this.records.unshift(resp.data.record)
563
+          this.show_dialog = false
564
+          this.new_content = ''
565
+          this.title = ''
566
+          this.$refs.record_table.setCurrentRow(this.records[0])
567
+        } else {
568
+          this.$message.error(resp.msg)
569
+        }
570
+
571
+      }).catch(error => {
572
+        this.uploading_new_record = false
573
+        this.$message.error(error)
574
+      })
575
+    },
576
+    didSelectTemplate: function(templateContent) {
577
+      this.new_content = this.new_content.length > 0 ? (this.new_content + templateContent) : templateContent
578
+
579
+    }, didEditSelectTemplate: function(templateContent) {
580
+      this.edit_new_content = this.edit_new_content.length > 0 ? (this.edit_new_content + templateContent) : templateContent
581
+    },
582
+
583
+    didSelectionChange: function(selectRows) {
584
+
585
+      var arr = []
586
+      for(let i=0;i<selectRows.length;i++){
587
+        arr.push(selectRows[i].id)
588
+      }
589
+      var newArr = arr.join(',')
590
+      this.ids = newArr
591
+      console.log("select23322332",this.ids)
592
+      this.selectingRows = selectRows
593
+    },
594
+    deleteAction: function() {
595
+      if (this.selectingRows.length == 0) {
596
+        return
597
+      }
598
+      var ids = []
599
+      for (let index = 0; index < this.selectingRows.length; index++) {
600
+        const row = this.selectingRows[index]
601
+        ids.push(row.id)
602
+      }
603
+      var ids_str = ids.join(',')
604
+      this.loading = true
605
+
606
+      let params={
607
+        patient_id:this.patient_id,
608
+        ids:ids_str,
609
+      }
610
+
611
+      deleteSickHistoryRecords(params).then(rs => {
612
+        var resp = rs.data
613
+        if (resp.state == 1) {
614
+          for (let id_index = 0; id_index < ids.length; id_index++) {
615
+            for (let record_index = 0; record_index < this.records.length; record_index++) {
616
+              if (ids[id_index] == this.records[record_index].id) {
617
+                this.records.splice(record_index, 1)
618
+                break
619
+              }
620
+            }
621
+          }
622
+          this.selectingRows = []
623
+          this.$message.success('已删除')
624
+
625
+        } else {
626
+          this.$message.error(resp.msg)
627
+        }
628
+        this.loading = false
629
+      }).catch(err => {
630
+        this.loading = false
631
+        this.$message.error(err)
632
+      })
633
+    }, startTimeChange(val) {
634
+      this.requestSickHistory()
635
+    }, endTimeChange(val) {
636
+      this.requestSickHistory()
637
+    },
638
+    showDialog(){
639
+      for(let i = 0; i < this.doctorOptions.length; i++){
640
+        if(this.doctorOptions[i].id == this.$store.getters.xt_user.user.id){
641
+          this.doctor_id =this.$store.getters.xt_user.user.id
642
+        }
643
+      }
644
+      this.show_dialog = true
645
+
646
+    },showEdit() {
647
+      if (this.table_current_index == -1) {
648
+        this.$message.error('请选择要修改的病程内容')
649
+        return
650
+      }
651
+      this.edit_is_shenyizhishi = this.records[this.table_current_index].is_shenyizhi_history.toString()
652
+      this.edit_is_fumotouxishi = this.records[this.table_current_index].is_fumo_dialysis_history.toString()
653
+      this.edit_is_guominyaowu = this.records[this.table_current_index].is_hypersusceptibility.toString()
654
+      this.edit_guominyaowu_desc = this.records[this.table_current_index].hypersusceptibility_desc
655
+      this.edit_sick_history_time = this.recordTime(this.records[this.table_current_index].record_time)
656
+      this.edit_new_content = this.records[this.table_current_index].content
657
+      this.edit_current_id = this.records[this.table_current_index].id
658
+      this.edit_doctor_id = this.records[this.table_current_index].doctor_id
659
+      console.log(this.edit_new_content )
660
+      this.edit_title = this.records[this.table_current_index].title//
661
+      this.show_edit_dialog = true
662
+
663
+      this.$refs.record_table.setCurrentRow(null)
664
+
665
+    }, tableRow({ row, rowIndex }) {
666
+      // 把每一行的索引放进row
667
+      row.index = rowIndex
668
+    }, onRowClick(row, event, column) {
669
+      this.table_current_index = row.index
670
+    },
671
+    print(){
672
+      // if (this.table_current_index == -1) {
673
+      //   this.$message.error('请选择要打印的病程')
674
+      //   return
675
+      // }
676
+      if(this.ids.length == 0){
677
+        this.$message.error('请选择要打印的病程')
678
+        return
679
+      }
680
+      this.$router.push({ path: "/sickhistory/print?ids="+this.ids+"&patient_id="+this.patient_id});
681
+    }
682
+  }
683
+}
684
+</script>
685
+
686
+<style rel="stylesheet/css" lang="scss" scoped>
687
+.container {
688
+  margin-left: 180px;
689
+  padding: 20px;
690
+  background: #fff;
691
+  min-height: calc(100vh - 173px);
692
+  margin-bottom: 15px;
693
+
694
+.record {
695
+  padding-top: 20px;
696
+}
697
+
698
+}
699
+.record_content_panel {
700
+  border-width: 1px;
701
+  border-style: solid;
702
+  border-color: #ebeef5;
703
+  min-height: 200px;
704
+
705
+.title {
706
+  font-size: 14px;
707
+  font-weight: 500;
708
+  color: #909399;
709
+  line-height: 44px;
710
+  height: 44px;
711
+  text-align: center;
712
+  border-bottom-width: 1px;
713
+  border-bottom-style: solid;
714
+  border-bottom-color: #ebeef5;
715
+}
716
+
717
+.content {
718
+  padding: 12px 15px;
719
+  font-size: 15px;
720
+  color: gray;
721
+  line-height: 22px;
722
+}
723
+
724
+}
725
+
726
+.new_record_form {
727
+
728
+/*/ / padding: 10 px, 25 px;*/
729
+
730
+.textarea_panel {
731
+  margin-top: 10px;
732
+}
733
+
734
+}
735
+</style>
736
+<style>
737
+.el-table td,
738
+.el-table th.is-leaf,
739
+.el-table--border,
740
+.el-table--group {
741
+  border-color: #d0d3da;
742
+}
743
+.el-table--border::after,
744
+.el-table--group::after,
745
+.el-table::before {
746
+  background-color: #d0d3da;
747
+}
748
+</style>

+ 40 - 0
static/ueditor/dialogs/anchor/anchor.html Vedi File

@@ -0,0 +1,40 @@
1
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2
+    "http://www.w3.org/TR/html4/loose.dtd">
3
+<html>
4
+    <head>
5
+        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
6
+        <title></title>
7
+        <style type="text/css">
8
+            *{color: #838383;margin: 0;padding: 0}
9
+            html,body {font-size: 12px;overflow: hidden; }
10
+            .content{padding:5px 0 0 15px;}
11
+            input{width:210px;height:21px;line-height:21px;margin-left: 4px;}
12
+        </style>
13
+    </head>
14
+    <body>
15
+        <div class="content">
16
+            <span><var id="lang_input_anchorName"></var></span><input id="anchorName"  value="" />
17
+        </div>
18
+        <script type="text/javascript" src="../internal.js"></script>
19
+        <script type="text/javascript">
20
+            var anchorInput = $G('anchorName'),
21
+                node = editor.selection.getRange().getClosedNode();
22
+            if(node && node.tagName == 'IMG' && (node = node.getAttribute('anchorname'))){
23
+                anchorInput.value = node;
24
+            }
25
+            anchorInput.onkeydown = function(evt){
26
+                evt = evt || window.event;
27
+                if(evt.keyCode == 13){
28
+                    editor.execCommand('anchor', anchorInput.value);
29
+                    dialog.close();
30
+                    domUtils.preventDefault(evt)
31
+                }
32
+            };
33
+            dialog.onok = function (){
34
+                editor.execCommand('anchor', anchorInput.value);
35
+                dialog.close();
36
+            };
37
+            $focus(anchorInput);
38
+        </script>
39
+    </body>
40
+</html>

+ 681 - 0
static/ueditor/dialogs/attachment/attachment.css Vedi File

@@ -0,0 +1,681 @@
1
+@charset "utf-8";
2
+/* dialog样式 */
3
+.wrapper {
4
+    zoom: 1;
5
+    width: 630px;
6
+    *width: 626px;
7
+    height: 380px;
8
+    margin: 0 auto;
9
+    padding: 10px;
10
+    position: relative;
11
+    font-family: sans-serif;
12
+}
13
+
14
+/*tab样式框大小*/
15
+.tabhead {
16
+    float:left;
17
+}
18
+.tabbody {
19
+    width: 100%;
20
+    height: 346px;
21
+    position: relative;
22
+    clear: both;
23
+}
24
+
25
+.tabbody .panel {
26
+    position: absolute;
27
+    width: 0;
28
+    height: 0;
29
+    background: #fff;
30
+    overflow: hidden;
31
+    display: none;
32
+}
33
+
34
+.tabbody .panel.focus {
35
+    width: 100%;
36
+    height: 346px;
37
+    display: block;
38
+}
39
+
40
+/* 上传附件 */
41
+.tabbody #upload.panel {
42
+    width: 0;
43
+    height: 0;
44
+    overflow: hidden;
45
+    position: absolute !important;
46
+    clip: rect(1px, 1px, 1px, 1px);
47
+    background: #fff;
48
+    display: block;
49
+}
50
+
51
+.tabbody #upload.panel.focus {
52
+    width: 100%;
53
+    height: 346px;
54
+    display: block;
55
+    clip: auto;
56
+}
57
+
58
+#upload .queueList {
59
+    margin: 0;
60
+    width: 100%;
61
+    height: 100%;
62
+    position: absolute;
63
+    overflow: hidden;
64
+}
65
+
66
+#upload p {
67
+    margin: 0;
68
+}
69
+
70
+.element-invisible {
71
+    width: 0 !important;
72
+    height: 0 !important;
73
+    border: 0;
74
+    padding: 0;
75
+    margin: 0;
76
+    overflow: hidden;
77
+    position: absolute !important;
78
+    clip: rect(1px, 1px, 1px, 1px);
79
+}
80
+
81
+#upload .placeholder {
82
+    margin: 10px;
83
+    border: 2px dashed #e6e6e6;
84
+    *border: 0px dashed #e6e6e6;
85
+    height: 172px;
86
+    padding-top: 150px;
87
+    text-align: center;
88
+    background: url(./images/image.png) center 70px no-repeat;
89
+    color: #cccccc;
90
+    font-size: 18px;
91
+    position: relative;
92
+    top:0;
93
+    *top: 10px;
94
+}
95
+
96
+#upload .placeholder .webuploader-pick {
97
+    font-size: 18px;
98
+    background: #00b7ee;
99
+    border-radius: 3px;
100
+    line-height: 44px;
101
+    padding: 0 30px;
102
+    *width: 120px;
103
+    color: #fff;
104
+    display: inline-block;
105
+    margin: 0 auto 20px auto;
106
+    cursor: pointer;
107
+    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
108
+}
109
+
110
+#upload .placeholder .webuploader-pick-hover {
111
+    background: #00a2d4;
112
+}
113
+
114
+
115
+#filePickerContainer {
116
+    text-align: center;
117
+}
118
+
119
+#upload .placeholder .flashTip {
120
+    color: #666666;
121
+    font-size: 12px;
122
+    position: absolute;
123
+    width: 100%;
124
+    text-align: center;
125
+    bottom: 20px;
126
+}
127
+
128
+#upload .placeholder .flashTip a {
129
+    color: #0785d1;
130
+    text-decoration: none;
131
+}
132
+
133
+#upload .placeholder .flashTip a:hover {
134
+    text-decoration: underline;
135
+}
136
+
137
+#upload .placeholder.webuploader-dnd-over {
138
+    border-color: #999999;
139
+}
140
+
141
+#upload .filelist {
142
+    list-style: none;
143
+    margin: 0;
144
+    padding: 0;
145
+    overflow-x: hidden;
146
+    overflow-y: auto;
147
+    position: relative;
148
+    height: 300px;
149
+}
150
+
151
+#upload .filelist:after {
152
+    content: '';
153
+    display: block;
154
+    width: 0;
155
+    height: 0;
156
+    overflow: hidden;
157
+    clear: both;
158
+}
159
+
160
+#upload .filelist li {
161
+    width: 113px;
162
+    height: 113px;
163
+    background: url(./images/bg.png);
164
+    text-align: center;
165
+    margin: 9px 0 0 9px;
166
+    *margin: 6px 0 0 6px;
167
+    position: relative;
168
+    display: block;
169
+    float: left;
170
+    overflow: hidden;
171
+    font-size: 12px;
172
+}
173
+
174
+#upload .filelist li p.log {
175
+    position: relative;
176
+    top: -45px;
177
+}
178
+
179
+#upload .filelist li p.title {
180
+    position: absolute;
181
+    top: 0;
182
+    left: 0;
183
+    width: 100%;
184
+    overflow: hidden;
185
+    white-space: nowrap;
186
+    text-overflow: ellipsis;
187
+    top: 5px;
188
+    text-indent: 5px;
189
+    text-align: left;
190
+}
191
+
192
+#upload .filelist li p.progress {
193
+    position: absolute;
194
+    width: 100%;
195
+    bottom: 0;
196
+    left: 0;
197
+    height: 8px;
198
+    overflow: hidden;
199
+    z-index: 50;
200
+    margin: 0;
201
+    border-radius: 0;
202
+    background: none;
203
+    -webkit-box-shadow: 0 0 0;
204
+}
205
+
206
+#upload .filelist li p.progress span {
207
+    display: none;
208
+    overflow: hidden;
209
+    width: 0;
210
+    height: 100%;
211
+    background: #1483d8 url(./images/progress.png) repeat-x;
212
+
213
+    -webit-transition: width 200ms linear;
214
+    -moz-transition: width 200ms linear;
215
+    -o-transition: width 200ms linear;
216
+    -ms-transition: width 200ms linear;
217
+    transition: width 200ms linear;
218
+
219
+    -webkit-animation: progressmove 2s linear infinite;
220
+    -moz-animation: progressmove 2s linear infinite;
221
+    -o-animation: progressmove 2s linear infinite;
222
+    -ms-animation: progressmove 2s linear infinite;
223
+    animation: progressmove 2s linear infinite;
224
+
225
+    -webkit-transform: translateZ(0);
226
+}
227
+
228
+@-webkit-keyframes progressmove {
229
+    0% {
230
+        background-position: 0 0;
231
+    }
232
+    100% {
233
+        background-position: 17px 0;
234
+    }
235
+}
236
+
237
+@-moz-keyframes progressmove {
238
+    0% {
239
+        background-position: 0 0;
240
+    }
241
+    100% {
242
+        background-position: 17px 0;
243
+    }
244
+}
245
+
246
+@keyframes progressmove {
247
+    0% {
248
+        background-position: 0 0;
249
+    }
250
+    100% {
251
+        background-position: 17px 0;
252
+    }
253
+}
254
+
255
+#upload .filelist li p.imgWrap {
256
+    position: relative;
257
+    z-index: 2;
258
+    line-height: 113px;
259
+    vertical-align: middle;
260
+    overflow: hidden;
261
+    width: 113px;
262
+    height: 113px;
263
+
264
+    -webkit-transform-origin: 50% 50%;
265
+    -moz-transform-origin: 50% 50%;
266
+    -o-transform-origin: 50% 50%;
267
+    -ms-transform-origin: 50% 50%;
268
+    transform-origin: 50% 50%;
269
+
270
+    -webit-transition: 200ms ease-out;
271
+    -moz-transition: 200ms ease-out;
272
+    -o-transition: 200ms ease-out;
273
+    -ms-transition: 200ms ease-out;
274
+    transition: 200ms ease-out;
275
+}
276
+#upload .filelist li p.imgWrap.notimage {
277
+    margin-top: 0;
278
+    width: 111px;
279
+    height: 111px;
280
+    border: 1px #eeeeee solid;
281
+}
282
+#upload .filelist li p.imgWrap.notimage i.file-preview {
283
+    margin-top: 15px;
284
+}
285
+
286
+#upload .filelist li img {
287
+    width: 100%;
288
+}
289
+
290
+#upload .filelist li p.error {
291
+    background: #f43838;
292
+    color: #fff;
293
+    position: absolute;
294
+    bottom: 0;
295
+    left: 0;
296
+    height: 28px;
297
+    line-height: 28px;
298
+    width: 100%;
299
+    z-index: 100;
300
+    display:none;
301
+}
302
+
303
+#upload .filelist li .success {
304
+    display: block;
305
+    position: absolute;
306
+    left: 0;
307
+    bottom: 0;
308
+    height: 40px;
309
+    width: 100%;
310
+    z-index: 200;
311
+    background: url(./images/success.png) no-repeat right bottom;
312
+    background-image: url(./images/success.gif) \9;
313
+}
314
+
315
+#upload .filelist li.filePickerBlock {
316
+    width: 113px;
317
+    height: 113px;
318
+    background: url(./images/image.png) no-repeat center 12px;
319
+    border: 1px solid #eeeeee;
320
+    border-radius: 0;
321
+}
322
+#upload .filelist li.filePickerBlock div.webuploader-pick  {
323
+    width: 100%;
324
+    height: 100%;
325
+    margin: 0;
326
+    padding: 0;
327
+    opacity: 0;
328
+    background: none;
329
+    font-size: 0;
330
+}
331
+
332
+#upload .filelist div.file-panel {
333
+    position: absolute;
334
+    height: 0;
335
+    filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#80000000', endColorstr='#80000000') \0;
336
+    background: rgba(0, 0, 0, 0.5);
337
+    width: 100%;
338
+    top: 0;
339
+    left: 0;
340
+    overflow: hidden;
341
+    z-index: 300;
342
+}
343
+
344
+#upload .filelist div.file-panel span {
345
+    width: 24px;
346
+    height: 24px;
347
+    display: inline;
348
+    float: right;
349
+    text-indent: -9999px;
350
+    overflow: hidden;
351
+    background: url(./images/icons.png) no-repeat;
352
+    background: url(./images/icons.gif) no-repeat \9;
353
+    margin: 5px 1px 1px;
354
+    cursor: pointer;
355
+    -webkit-tap-highlight-color: rgba(0,0,0,0);
356
+    -webkit-user-select: none;
357
+    -moz-user-select: none;
358
+    -ms-user-select: none;
359
+    user-select: none;
360
+}
361
+
362
+#upload .filelist div.file-panel span.rotateLeft {
363
+    display:none;
364
+    background-position: 0 -24px;
365
+}
366
+
367
+#upload .filelist div.file-panel span.rotateLeft:hover {
368
+    background-position: 0 0;
369
+}
370
+
371
+#upload .filelist div.file-panel span.rotateRight {
372
+    display:none;
373
+    background-position: -24px -24px;
374
+}
375
+
376
+#upload .filelist div.file-panel span.rotateRight:hover {
377
+    background-position: -24px 0;
378
+}
379
+
380
+#upload .filelist div.file-panel span.cancel {
381
+    background-position: -48px -24px;
382
+}
383
+
384
+#upload .filelist div.file-panel span.cancel:hover {
385
+    background-position: -48px 0;
386
+}
387
+
388
+#upload .statusBar {
389
+    height: 45px;
390
+    border-bottom: 1px solid #dadada;
391
+    margin: 0 10px;
392
+    padding: 0;
393
+    line-height: 45px;
394
+    vertical-align: middle;
395
+    position: relative;
396
+}
397
+
398
+#upload .statusBar .progress {
399
+    border: 1px solid #1483d8;
400
+    width: 198px;
401
+    background: #fff;
402
+    height: 18px;
403
+    position: absolute;
404
+    top: 12px;
405
+    display: none;
406
+    text-align: center;
407
+    line-height: 18px;
408
+    color: #6dbfff;
409
+    margin: 0 10px 0 0;
410
+}
411
+#upload .statusBar .progress span.percentage {
412
+    width: 0;
413
+    height: 100%;
414
+    left: 0;
415
+    top: 0;
416
+    background: #1483d8;
417
+    position: absolute;
418
+}
419
+#upload .statusBar .progress span.text {
420
+    position: relative;
421
+    z-index: 10;
422
+}
423
+
424
+#upload .statusBar .info {
425
+    display: inline-block;
426
+    font-size: 14px;
427
+    color: #666666;
428
+}
429
+
430
+#upload .statusBar .btns {
431
+    position: absolute;
432
+    top: 7px;
433
+    right: 0;
434
+    line-height: 30px;
435
+}
436
+
437
+#filePickerBtn {
438
+    display: inline-block;
439
+    float: left;
440
+}
441
+#upload .statusBar .btns .webuploader-pick,
442
+#upload .statusBar .btns .uploadBtn,
443
+#upload .statusBar .btns .uploadBtn.state-uploading,
444
+#upload .statusBar .btns .uploadBtn.state-paused {
445
+    background: #ffffff;
446
+    border: 1px solid #cfcfcf;
447
+    color: #565656;
448
+    padding: 0 18px;
449
+    display: inline-block;
450
+    border-radius: 3px;
451
+    margin-left: 10px;
452
+    cursor: pointer;
453
+    font-size: 14px;
454
+    float: left;
455
+    -webkit-user-select: none;
456
+    -moz-user-select: none;
457
+    -ms-user-select: none;
458
+    user-select: none;
459
+}
460
+#upload .statusBar .btns .webuploader-pick-hover,
461
+#upload .statusBar .btns .uploadBtn:hover,
462
+#upload .statusBar .btns .uploadBtn.state-uploading:hover,
463
+#upload .statusBar .btns .uploadBtn.state-paused:hover {
464
+    background: #f0f0f0;
465
+}
466
+
467
+#upload .statusBar .btns .uploadBtn,
468
+#upload .statusBar .btns .uploadBtn.state-paused{
469
+    background: #00b7ee;
470
+    color: #fff;
471
+    border-color: transparent;
472
+}
473
+#upload .statusBar .btns .uploadBtn:hover,
474
+#upload .statusBar .btns .uploadBtn.state-paused:hover{
475
+    background: #00a2d4;
476
+}
477
+
478
+#upload .statusBar .btns .uploadBtn.disabled {
479
+    pointer-events: none;
480
+    filter:alpha(opacity=60);
481
+    -moz-opacity:0.6;
482
+    -khtml-opacity: 0.6;
483
+    opacity: 0.6;
484
+}
485
+
486
+
487
+
488
+/* 图片管理样式 */
489
+#online {
490
+    width: 100%;
491
+    height: 336px;
492
+    padding: 10px 0 0 0;
493
+}
494
+#online #fileList{
495
+    width: 100%;
496
+    height: 100%;
497
+    overflow-x: hidden;
498
+    overflow-y: auto;
499
+    position: relative;
500
+}
501
+#online ul {
502
+    display: block;
503
+    list-style: none;
504
+    margin: 0;
505
+    padding: 0;
506
+}
507
+#online li {
508
+    float: left;
509
+    display: block;
510
+    list-style: none;
511
+    padding: 0;
512
+    width: 113px;
513
+    height: 113px;
514
+    margin: 0 0 9px 9px;
515
+    *margin: 0 0 6px 6px;
516
+    background-color: #eee;
517
+    overflow: hidden;
518
+    cursor: pointer;
519
+    position: relative;
520
+}
521
+#online li.clearFloat {
522
+    float: none;
523
+    clear: both;
524
+    display: block;
525
+    width:0;
526
+    height:0;
527
+    margin: 0;
528
+    padding: 0;
529
+}
530
+#online li img {
531
+    cursor: pointer;
532
+}
533
+#online li div.file-wrapper {
534
+    cursor: pointer;
535
+    position: absolute;
536
+    display: block;
537
+    width: 111px;
538
+    height: 111px;
539
+    border: 1px solid #eee;
540
+    background: url("./images/bg.png") repeat;
541
+}
542
+#online li div span.file-title{
543
+    display: block;
544
+    padding: 0 3px;
545
+    margin: 3px 0 0 0;
546
+    font-size: 12px;
547
+    height: 13px;
548
+    color: #555555;
549
+    text-align: center;
550
+    width: 107px;
551
+    white-space: nowrap;
552
+    word-break: break-all;
553
+    overflow: hidden;
554
+    text-overflow: ellipsis;
555
+}
556
+#online li .icon {
557
+    cursor: pointer;
558
+    width: 113px;
559
+    height: 113px;
560
+    position: absolute;
561
+    top: 0;
562
+    left: 0;
563
+    z-index: 2;
564
+    border: 0;
565
+    background-repeat: no-repeat;
566
+}
567
+#online li .icon:hover {
568
+    width: 107px;
569
+    height: 107px;
570
+    border: 3px solid #1094fa;
571
+}
572
+#online li.selected .icon {
573
+    background-image: url(images/success.png);
574
+    background-image: url(images/success.gif) \9;
575
+    background-position: 75px 75px;
576
+}
577
+#online li.selected .icon:hover {
578
+    width: 107px;
579
+    height: 107px;
580
+    border: 3px solid #1094fa;
581
+    background-position: 72px 72px;
582
+}
583
+
584
+
585
+/* 在线文件的文件预览图标 */
586
+i.file-preview {
587
+    display: block;
588
+    margin: 10px auto;
589
+    width: 70px;
590
+    height: 70px;
591
+    background-image: url("./images/file-icons.png");
592
+    background-image: url("./images/file-icons.gif") \9;
593
+    background-position: -140px center;
594
+    background-repeat: no-repeat;
595
+}
596
+i.file-preview.file-type-dir{
597
+    background-position: 0 center;
598
+}
599
+i.file-preview.file-type-file{
600
+    background-position: -140px center;
601
+}
602
+i.file-preview.file-type-filelist{
603
+    background-position: -210px center;
604
+}
605
+i.file-preview.file-type-zip,
606
+i.file-preview.file-type-rar,
607
+i.file-preview.file-type-7z,
608
+i.file-preview.file-type-tar,
609
+i.file-preview.file-type-gz,
610
+i.file-preview.file-type-bz2{
611
+    background-position: -280px center;
612
+}
613
+i.file-preview.file-type-xls,
614
+i.file-preview.file-type-xlsx{
615
+    background-position: -350px center;
616
+}
617
+i.file-preview.file-type-doc,
618
+i.file-preview.file-type-docx{
619
+    background-position: -420px center;
620
+}
621
+i.file-preview.file-type-ppt,
622
+i.file-preview.file-type-pptx{
623
+    background-position: -490px center;
624
+}
625
+i.file-preview.file-type-vsd{
626
+    background-position: -560px center;
627
+}
628
+i.file-preview.file-type-pdf{
629
+    background-position: -630px center;
630
+}
631
+i.file-preview.file-type-txt,
632
+i.file-preview.file-type-md,
633
+i.file-preview.file-type-json,
634
+i.file-preview.file-type-htm,
635
+i.file-preview.file-type-xml,
636
+i.file-preview.file-type-html,
637
+i.file-preview.file-type-js,
638
+i.file-preview.file-type-css,
639
+i.file-preview.file-type-php,
640
+i.file-preview.file-type-jsp,
641
+i.file-preview.file-type-asp{
642
+    background-position: -700px center;
643
+}
644
+i.file-preview.file-type-apk{
645
+    background-position: -770px center;
646
+}
647
+i.file-preview.file-type-exe{
648
+    background-position: -840px center;
649
+}
650
+i.file-preview.file-type-ipa{
651
+    background-position: -910px center;
652
+}
653
+i.file-preview.file-type-mp4,
654
+i.file-preview.file-type-swf,
655
+i.file-preview.file-type-mkv,
656
+i.file-preview.file-type-avi,
657
+i.file-preview.file-type-flv,
658
+i.file-preview.file-type-mov,
659
+i.file-preview.file-type-mpg,
660
+i.file-preview.file-type-mpeg,
661
+i.file-preview.file-type-ogv,
662
+i.file-preview.file-type-webm,
663
+i.file-preview.file-type-rm,
664
+i.file-preview.file-type-rmvb{
665
+    background-position: -980px center;
666
+}
667
+i.file-preview.file-type-ogg,
668
+i.file-preview.file-type-wav,
669
+i.file-preview.file-type-wmv,
670
+i.file-preview.file-type-mid,
671
+i.file-preview.file-type-mp3{
672
+    background-position: -1050px center;
673
+}
674
+i.file-preview.file-type-jpg,
675
+i.file-preview.file-type-jpeg,
676
+i.file-preview.file-type-gif,
677
+i.file-preview.file-type-bmp,
678
+i.file-preview.file-type-png,
679
+i.file-preview.file-type-psd{
680
+    background-position: -140px center;
681
+}

+ 60 - 0
static/ueditor/dialogs/attachment/attachment.html Vedi File

@@ -0,0 +1,60 @@
1
+<!doctype html>
2
+<html>
3
+<head>
4
+    <meta charset="UTF-8">
5
+    <title>ueditor图片对话框</title>
6
+    <script type="text/javascript" src="../internal.js"></script>
7
+
8
+    <!-- jquery -->
9
+    <script type="text/javascript" src="../../third-party/jquery-1.10.2.min.js"></script>
10
+
11
+    <!-- webuploader -->
12
+    <script src="../../third-party/webuploader/webuploader.min.js"></script>
13
+    <link rel="stylesheet" type="text/css" href="../../third-party/webuploader/webuploader.css">
14
+
15
+    <!-- attachment dialog -->
16
+    <link rel="stylesheet" href="attachment.css" type="text/css" />
17
+</head>
18
+<body>
19
+
20
+    <div class="wrapper">
21
+        <div id="tabhead" class="tabhead">
22
+            <span class="tab focus" data-content-id="upload"><var id="lang_tab_upload"></var></span>
23
+            <span class="tab" data-content-id="online"><var id="lang_tab_online"></var></span>
24
+        </div>
25
+        <div id="tabbody" class="tabbody">
26
+            <!-- 上传图片 -->
27
+            <div id="upload" class="panel focus">
28
+                <div id="queueList" class="queueList">
29
+                    <div class="statusBar element-invisible">
30
+                        <div class="progress">
31
+                            <span class="text">0%</span>
32
+                            <span class="percentage"></span>
33
+                        </div><div class="info"></div>
34
+                        <div class="btns">
35
+                            <div id="filePickerBtn"></div>
36
+                            <div class="uploadBtn"><var id="lang_start_upload"></var></div>
37
+                        </div>
38
+                    </div>
39
+                    <div id="dndArea" class="placeholder">
40
+                        <div class="filePickerContainer">
41
+                            <div id="filePickerReady"></div>
42
+                        </div>
43
+                    </div>
44
+                    <ul class="filelist element-invisible">
45
+                        <li id="filePickerBlock" class="filePickerBlock"></li>
46
+                    </ul>
47
+                </div>
48
+            </div>
49
+
50
+            <!-- 在线图片 -->
51
+            <div id="online" class="panel">
52
+                <div id="fileList"><var id="lang_imgLoading"></var></div>
53
+            </div>
54
+
55
+        </div>
56
+    </div>
57
+    <script type="text/javascript" src="attachment.js"></script>
58
+
59
+</body>
60
+</html>

+ 754 - 0
static/ueditor/dialogs/attachment/attachment.js Vedi File

@@ -0,0 +1,754 @@
1
+/**
2
+ * User: Jinqn
3
+ * Date: 14-04-08
4
+ * Time: 下午16:34
5
+ * 上传图片对话框逻辑代码,包括tab: 远程图片/上传图片/在线图片/搜索图片
6
+ */
7
+
8
+(function () {
9
+
10
+    var uploadFile,
11
+        onlineFile;
12
+
13
+    window.onload = function () {
14
+        initTabs();
15
+        initButtons();
16
+    };
17
+
18
+    /* 初始化tab标签 */
19
+    function initTabs() {
20
+        var tabs = $G('tabhead').children;
21
+        for (var i = 0; i < tabs.length; i++) {
22
+            domUtils.on(tabs[i], "click", function (e) {
23
+                var target = e.target || e.srcElement;
24
+                setTabFocus(target.getAttribute('data-content-id'));
25
+            });
26
+        }
27
+
28
+        setTabFocus('upload');
29
+    }
30
+
31
+    /* 初始化tabbody */
32
+    function setTabFocus(id) {
33
+        if(!id) return;
34
+        var i, bodyId, tabs = $G('tabhead').children;
35
+        for (i = 0; i < tabs.length; i++) {
36
+            bodyId = tabs[i].getAttribute('data-content-id')
37
+            if (bodyId == id) {
38
+                domUtils.addClass(tabs[i], 'focus');
39
+                domUtils.addClass($G(bodyId), 'focus');
40
+            } else {
41
+                domUtils.removeClasses(tabs[i], 'focus');
42
+                domUtils.removeClasses($G(bodyId), 'focus');
43
+            }
44
+        }
45
+        switch (id) {
46
+            case 'upload':
47
+                uploadFile = uploadFile || new UploadFile('queueList');
48
+                break;
49
+            case 'online':
50
+                onlineFile = onlineFile || new OnlineFile('fileList');
51
+                break;
52
+        }
53
+    }
54
+
55
+    /* 初始化onok事件 */
56
+    function initButtons() {
57
+
58
+        dialog.onok = function () {
59
+            var list = [], id, tabs = $G('tabhead').children;
60
+            for (var i = 0; i < tabs.length; i++) {
61
+                if (domUtils.hasClass(tabs[i], 'focus')) {
62
+                    id = tabs[i].getAttribute('data-content-id');
63
+                    break;
64
+                }
65
+            }
66
+
67
+            switch (id) {
68
+                case 'upload':
69
+                    list = uploadFile.getInsertList();
70
+                    var count = uploadFile.getQueueCount();
71
+                    if (count) {
72
+                        $('.info', '#queueList').html('<span style="color:red;">' + '还有2个未上传文件'.replace(/[\d]/, count) + '</span>');
73
+                        return false;
74
+                    }
75
+                    break;
76
+                case 'online':
77
+                    list = onlineFile.getInsertList();
78
+                    break;
79
+            }
80
+
81
+            editor.execCommand('insertfile', list);
82
+        };
83
+    }
84
+
85
+
86
+    /* 上传附件 */
87
+    function UploadFile(target) {
88
+        this.$wrap = target.constructor == String ? $('#' + target) : $(target);
89
+        this.init();
90
+    }
91
+    UploadFile.prototype = {
92
+        init: function () {
93
+            this.fileList = [];
94
+            this.initContainer();
95
+            this.initUploader();
96
+        },
97
+        initContainer: function () {
98
+            this.$queue = this.$wrap.find('.filelist');
99
+        },
100
+        /* 初始化容器 */
101
+        initUploader: function () {
102
+            var _this = this,
103
+                $ = jQuery,    // just in case. Make sure it's not an other libaray.
104
+                $wrap = _this.$wrap,
105
+            // 图片容器
106
+                $queue = $wrap.find('.filelist'),
107
+            // 状态栏,包括进度和控制按钮
108
+                $statusBar = $wrap.find('.statusBar'),
109
+            // 文件总体选择信息。
110
+                $info = $statusBar.find('.info'),
111
+            // 上传按钮
112
+                $upload = $wrap.find('.uploadBtn'),
113
+            // 上传按钮
114
+                $filePickerBtn = $wrap.find('.filePickerBtn'),
115
+            // 上传按钮
116
+                $filePickerBlock = $wrap.find('.filePickerBlock'),
117
+            // 没选择文件之前的内容。
118
+                $placeHolder = $wrap.find('.placeholder'),
119
+            // 总体进度条
120
+                $progress = $statusBar.find('.progress').hide(),
121
+            // 添加的文件数量
122
+                fileCount = 0,
123
+            // 添加的文件总大小
124
+                fileSize = 0,
125
+            // 优化retina, 在retina下这个值是2
126
+                ratio = window.devicePixelRatio || 1,
127
+            // 缩略图大小
128
+                thumbnailWidth = 113 * ratio,
129
+                thumbnailHeight = 113 * ratio,
130
+            // 可能有pedding, ready, uploading, confirm, done.
131
+                state = '',
132
+            // 所有文件的进度信息,key为file id
133
+                percentages = {},
134
+                supportTransition = (function () {
135
+                    var s = document.createElement('p').style,
136
+                        r = 'transition' in s ||
137
+                            'WebkitTransition' in s ||
138
+                            'MozTransition' in s ||
139
+                            'msTransition' in s ||
140
+                            'OTransition' in s;
141
+                    s = null;
142
+                    return r;
143
+                })(),
144
+            // WebUploader实例
145
+                uploader,
146
+                actionUrl = editor.getActionUrl(editor.getOpt('fileActionName')),
147
+                fileMaxSize = editor.getOpt('fileMaxSize'),
148
+                acceptExtensions = (editor.getOpt('fileAllowFiles') || []).join('').replace(/\./g, ',').replace(/^[,]/, '');;
149
+
150
+            if (!WebUploader.Uploader.support()) {
151
+                $('#filePickerReady').after($('<div>').html(lang.errorNotSupport)).hide();
152
+                return;
153
+            } else if (!editor.getOpt('fileActionName')) {
154
+                $('#filePickerReady').after($('<div>').html(lang.errorLoadConfig)).hide();
155
+                return;
156
+            }
157
+
158
+            uploader = _this.uploader = WebUploader.create({
159
+                pick: {
160
+                    id: '#filePickerReady',
161
+                    label: lang.uploadSelectFile
162
+                },
163
+                swf: '../../third-party/webuploader/Uploader.swf',
164
+                server: actionUrl,
165
+                fileVal: editor.getOpt('fileFieldName'),
166
+                duplicate: true,
167
+                fileSingleSizeLimit: fileMaxSize,
168
+                compress: false
169
+            });
170
+            uploader.addButton({
171
+                id: '#filePickerBlock'
172
+            });
173
+            uploader.addButton({
174
+                id: '#filePickerBtn',
175
+                label: lang.uploadAddFile
176
+            });
177
+
178
+            setState('pedding');
179
+
180
+            // 当有文件添加进来时执行,负责view的创建
181
+            function addFile(file) {
182
+                var $li = $('<li id="' + file.id + '">' +
183
+                        '<p class="title">' + file.name + '</p>' +
184
+                        '<p class="imgWrap"></p>' +
185
+                        '<p class="progress"><span></span></p>' +
186
+                        '</li>'),
187
+
188
+                    $btns = $('<div class="file-panel">' +
189
+                        '<span class="cancel">' + lang.uploadDelete + '</span>' +
190
+                        '<span class="rotateRight">' + lang.uploadTurnRight + '</span>' +
191
+                        '<span class="rotateLeft">' + lang.uploadTurnLeft + '</span></div>').appendTo($li),
192
+                    $prgress = $li.find('p.progress span'),
193
+                    $wrap = $li.find('p.imgWrap'),
194
+                    $info = $('<p class="error"></p>').hide().appendTo($li),
195
+
196
+                    showError = function (code) {
197
+                        switch (code) {
198
+                            case 'exceed_size':
199
+                                text = lang.errorExceedSize;
200
+                                break;
201
+                            case 'interrupt':
202
+                                text = lang.errorInterrupt;
203
+                                break;
204
+                            case 'http':
205
+                                text = lang.errorHttp;
206
+                                break;
207
+                            case 'not_allow_type':
208
+                                text = lang.errorFileType;
209
+                                break;
210
+                            default:
211
+                                text = lang.errorUploadRetry;
212
+                                break;
213
+                        }
214
+                        $info.text(text).show();
215
+                    };
216
+
217
+                if (file.getStatus() === 'invalid') {
218
+                    showError(file.statusText);
219
+                } else {
220
+                    $wrap.text(lang.uploadPreview);
221
+                    if ('|png|jpg|jpeg|bmp|gif|'.indexOf('|'+file.ext.toLowerCase()+'|') == -1) {
222
+                        $wrap.empty().addClass('notimage').append('<i class="file-preview file-type-' + file.ext.toLowerCase() + '"></i>' +
223
+                        '<span class="file-title" title="' + file.name + '">' + file.name + '</span>');
224
+                    } else {
225
+                        if (browser.ie && browser.version <= 7) {
226
+                            $wrap.text(lang.uploadNoPreview);
227
+                        } else {
228
+                            uploader.makeThumb(file, function (error, src) {
229
+                                if (error || !src) {
230
+                                    $wrap.text(lang.uploadNoPreview);
231
+                                } else {
232
+                                    var $img = $('<img src="' + src + '">');
233
+                                    $wrap.empty().append($img);
234
+                                    $img.on('error', function () {
235
+                                        $wrap.text(lang.uploadNoPreview);
236
+                                    });
237
+                                }
238
+                            }, thumbnailWidth, thumbnailHeight);
239
+                        }
240
+                    }
241
+                    percentages[ file.id ] = [ file.size, 0 ];
242
+                    file.rotation = 0;
243
+
244
+                    /* 检查文件格式 */
245
+                    if (!file.ext || acceptExtensions.indexOf(file.ext.toLowerCase()) == -1) {
246
+                        showError('not_allow_type');
247
+                        uploader.removeFile(file);
248
+                    }
249
+                }
250
+
251
+                file.on('statuschange', function (cur, prev) {
252
+                    if (prev === 'progress') {
253
+                        $prgress.hide().width(0);
254
+                    } else if (prev === 'queued') {
255
+                        $li.off('mouseenter mouseleave');
256
+                        $btns.remove();
257
+                    }
258
+                    // 成功
259
+                    if (cur === 'error' || cur === 'invalid') {
260
+                        showError(file.statusText);
261
+                        percentages[ file.id ][ 1 ] = 1;
262
+                    } else if (cur === 'interrupt') {
263
+                        showError('interrupt');
264
+                    } else if (cur === 'queued') {
265
+                        percentages[ file.id ][ 1 ] = 0;
266
+                    } else if (cur === 'progress') {
267
+                        $info.hide();
268
+                        $prgress.css('display', 'block');
269
+                    } else if (cur === 'complete') {
270
+                    }
271
+
272
+                    $li.removeClass('state-' + prev).addClass('state-' + cur);
273
+                });
274
+
275
+                $li.on('mouseenter', function () {
276
+                    $btns.stop().animate({height: 30});
277
+                });
278
+                $li.on('mouseleave', function () {
279
+                    $btns.stop().animate({height: 0});
280
+                });
281
+
282
+                $btns.on('click', 'span', function () {
283
+                    var index = $(this).index(),
284
+                        deg;
285
+
286
+                    switch (index) {
287
+                        case 0:
288
+                            uploader.removeFile(file);
289
+                            return;
290
+                        case 1:
291
+                            file.rotation += 90;
292
+                            break;
293
+                        case 2:
294
+                            file.rotation -= 90;
295
+                            break;
296
+                    }
297
+
298
+                    if (supportTransition) {
299
+                        deg = 'rotate(' + file.rotation + 'deg)';
300
+                        $wrap.css({
301
+                            '-webkit-transform': deg,
302
+                            '-mos-transform': deg,
303
+                            '-o-transform': deg,
304
+                            'transform': deg
305
+                        });
306
+                    } else {
307
+                        $wrap.css('filter', 'progid:DXImageTransform.Microsoft.BasicImage(rotation=' + (~~((file.rotation / 90) % 4 + 4) % 4) + ')');
308
+                    }
309
+
310
+                });
311
+
312
+                $li.insertBefore($filePickerBlock);
313
+            }
314
+
315
+            // 负责view的销毁
316
+            function removeFile(file) {
317
+                var $li = $('#' + file.id);
318
+                delete percentages[ file.id ];
319
+                updateTotalProgress();
320
+                $li.off().find('.file-panel').off().end().remove();
321
+            }
322
+
323
+            function updateTotalProgress() {
324
+                var loaded = 0,
325
+                    total = 0,
326
+                    spans = $progress.children(),
327
+                    percent;
328
+
329
+                $.each(percentages, function (k, v) {
330
+                    total += v[ 0 ];
331
+                    loaded += v[ 0 ] * v[ 1 ];
332
+                });
333
+
334
+                percent = total ? loaded / total : 0;
335
+
336
+                spans.eq(0).text(Math.round(percent * 100) + '%');
337
+                spans.eq(1).css('width', Math.round(percent * 100) + '%');
338
+                updateStatus();
339
+            }
340
+
341
+            function setState(val, files) {
342
+
343
+                if (val != state) {
344
+
345
+                    var stats = uploader.getStats();
346
+
347
+                    $upload.removeClass('state-' + state);
348
+                    $upload.addClass('state-' + val);
349
+
350
+                    switch (val) {
351
+
352
+                        /* 未选择文件 */
353
+                        case 'pedding':
354
+                            $queue.addClass('element-invisible');
355
+                            $statusBar.addClass('element-invisible');
356
+                            $placeHolder.removeClass('element-invisible');
357
+                            $progress.hide(); $info.hide();
358
+                            uploader.refresh();
359
+                            break;
360
+
361
+                        /* 可以开始上传 */
362
+                        case 'ready':
363
+                            $placeHolder.addClass('element-invisible');
364
+                            $queue.removeClass('element-invisible');
365
+                            $statusBar.removeClass('element-invisible');
366
+                            $progress.hide(); $info.show();
367
+                            $upload.text(lang.uploadStart);
368
+                            uploader.refresh();
369
+                            break;
370
+
371
+                        /* 上传中 */
372
+                        case 'uploading':
373
+                            $progress.show(); $info.hide();
374
+                            $upload.text(lang.uploadPause);
375
+                            break;
376
+
377
+                        /* 暂停上传 */
378
+                        case 'paused':
379
+                            $progress.show(); $info.hide();
380
+                            $upload.text(lang.uploadContinue);
381
+                            break;
382
+
383
+                        case 'confirm':
384
+                            $progress.show(); $info.hide();
385
+                            $upload.text(lang.uploadStart);
386
+
387
+                            stats = uploader.getStats();
388
+                            if (stats.successNum && !stats.uploadFailNum) {
389
+                                setState('finish');
390
+                                return;
391
+                            }
392
+                            break;
393
+
394
+                        case 'finish':
395
+                            $progress.hide(); $info.show();
396
+                            if (stats.uploadFailNum) {
397
+                                $upload.text(lang.uploadRetry);
398
+                            } else {
399
+                                $upload.text(lang.uploadStart);
400
+                            }
401
+                            break;
402
+                    }
403
+
404
+                    state = val;
405
+                    updateStatus();
406
+
407
+                }
408
+
409
+                if (!_this.getQueueCount()) {
410
+                    $upload.addClass('disabled')
411
+                } else {
412
+                    $upload.removeClass('disabled')
413
+                }
414
+
415
+            }
416
+
417
+            function updateStatus() {
418
+                var text = '', stats;
419
+
420
+                if (state === 'ready') {
421
+                    text = lang.updateStatusReady.replace('_', fileCount).replace('_KB', WebUploader.formatSize(fileSize));
422
+                } else if (state === 'confirm') {
423
+                    stats = uploader.getStats();
424
+                    if (stats.uploadFailNum) {
425
+                        text = lang.updateStatusConfirm.replace('_', stats.successNum).replace('_', stats.successNum);
426
+                    }
427
+                } else {
428
+                    stats = uploader.getStats();
429
+                    text = lang.updateStatusFinish.replace('_', fileCount).
430
+                        replace('_KB', WebUploader.formatSize(fileSize)).
431
+                        replace('_', stats.successNum);
432
+
433
+                    if (stats.uploadFailNum) {
434
+                        text += lang.updateStatusError.replace('_', stats.uploadFailNum);
435
+                    }
436
+                }
437
+
438
+                $info.html(text);
439
+            }
440
+
441
+            uploader.on('fileQueued', function (file) {
442
+                fileCount++;
443
+                fileSize += file.size;
444
+
445
+                if (fileCount === 1) {
446
+                    $placeHolder.addClass('element-invisible');
447
+                    $statusBar.show();
448
+                }
449
+
450
+                addFile(file);
451
+            });
452
+
453
+            uploader.on('fileDequeued', function (file) {
454
+                fileCount--;
455
+                fileSize -= file.size;
456
+
457
+                removeFile(file);
458
+                updateTotalProgress();
459
+            });
460
+
461
+            uploader.on('filesQueued', function (file) {
462
+                if (!uploader.isInProgress() && (state == 'pedding' || state == 'finish' || state == 'confirm' || state == 'ready')) {
463
+                    setState('ready');
464
+                }
465
+                updateTotalProgress();
466
+            });
467
+
468
+            uploader.on('all', function (type, files) {
469
+                switch (type) {
470
+                    case 'uploadFinished':
471
+                        setState('confirm', files);
472
+                        break;
473
+                    case 'startUpload':
474
+                        /* 添加额外的GET参数 */
475
+                        var params = utils.serializeParam(editor.queryCommandValue('serverparam')) || '',
476
+                            url = utils.formatUrl(actionUrl + (actionUrl.indexOf('?') == -1 ? '?':'&') + 'encode=utf-8&' + params);
477
+                        uploader.option('server', url);
478
+                        setState('uploading', files);
479
+                        break;
480
+                    case 'stopUpload':
481
+                        setState('paused', files);
482
+                        break;
483
+                }
484
+            });
485
+
486
+            uploader.on('uploadBeforeSend', function (file, data, header) {
487
+                //这里可以通过data对象添加POST参数
488
+                header['X_Requested_With'] = 'XMLHttpRequest';
489
+            });
490
+
491
+            uploader.on('uploadProgress', function (file, percentage) {
492
+                var $li = $('#' + file.id),
493
+                    $percent = $li.find('.progress span');
494
+
495
+                $percent.css('width', percentage * 100 + '%');
496
+                percentages[ file.id ][ 1 ] = percentage;
497
+                updateTotalProgress();
498
+            });
499
+
500
+            uploader.on('uploadSuccess', function (file, ret) {
501
+                var $file = $('#' + file.id);
502
+                try {
503
+                    var responseText = (ret._raw || ret),
504
+                        json = utils.str2json(responseText);
505
+                    if (json.state == 'SUCCESS') {
506
+                        _this.fileList.push(json);
507
+                        $file.append('<span class="success"></span>');
508
+                    } else {
509
+                        $file.find('.error').text(json.state).show();
510
+                    }
511
+                } catch (e) {
512
+                    $file.find('.error').text(lang.errorServerUpload).show();
513
+                }
514
+            });
515
+
516
+            uploader.on('uploadError', function (file, code) {
517
+            });
518
+            uploader.on('error', function (code, file) {
519
+                if (code == 'Q_TYPE_DENIED' || code == 'F_EXCEED_SIZE') {
520
+                    addFile(file);
521
+                }
522
+            });
523
+            uploader.on('uploadComplete', function (file, ret) {
524
+            });
525
+
526
+            $upload.on('click', function () {
527
+                if ($(this).hasClass('disabled')) {
528
+                    return false;
529
+                }
530
+
531
+                if (state === 'ready') {
532
+                    uploader.upload();
533
+                } else if (state === 'paused') {
534
+                    uploader.upload();
535
+                } else if (state === 'uploading') {
536
+                    uploader.stop();
537
+                }
538
+            });
539
+
540
+            $upload.addClass('state-' + state);
541
+            updateTotalProgress();
542
+        },
543
+        getQueueCount: function () {
544
+            var file, i, status, readyFile = 0, files = this.uploader.getFiles();
545
+            for (i = 0; file = files[i++]; ) {
546
+                status = file.getStatus();
547
+                if (status == 'queued' || status == 'uploading' || status == 'progress') readyFile++;
548
+            }
549
+            return readyFile;
550
+        },
551
+        getInsertList: function () {
552
+            var i, link, data, list = [],
553
+                prefix = editor.getOpt('fileUrlPrefix');
554
+            for (i = 0; i < this.fileList.length; i++) {
555
+                data = this.fileList[i];
556
+                link = data.url;
557
+                list.push({
558
+                    title: data.original || link.substr(link.lastIndexOf('/') + 1),
559
+                    url: prefix + link
560
+                });
561
+            }
562
+            return list;
563
+        }
564
+    };
565
+
566
+
567
+    /* 在线附件 */
568
+    function OnlineFile(target) {
569
+        this.container = utils.isString(target) ? document.getElementById(target) : target;
570
+        this.init();
571
+    }
572
+    OnlineFile.prototype = {
573
+        init: function () {
574
+            this.initContainer();
575
+            this.initEvents();
576
+            this.initData();
577
+        },
578
+        /* 初始化容器 */
579
+        initContainer: function () {
580
+            this.container.innerHTML = '';
581
+            this.list = document.createElement('ul');
582
+            this.clearFloat = document.createElement('li');
583
+
584
+            domUtils.addClass(this.list, 'list');
585
+            domUtils.addClass(this.clearFloat, 'clearFloat');
586
+
587
+            this.list.appendChild(this.clearFloat);
588
+            this.container.appendChild(this.list);
589
+        },
590
+        /* 初始化滚动事件,滚动到地步自动拉取数据 */
591
+        initEvents: function () {
592
+            var _this = this;
593
+
594
+            /* 滚动拉取图片 */
595
+            domUtils.on($G('fileList'), 'scroll', function(e){
596
+                var panel = this;
597
+                if (panel.scrollHeight - (panel.offsetHeight + panel.scrollTop) < 10) {
598
+                    _this.getFileData();
599
+                }
600
+            });
601
+            /* 选中图片 */
602
+            domUtils.on(this.list, 'click', function (e) {
603
+                var target = e.target || e.srcElement,
604
+                    li = target.parentNode;
605
+
606
+                if (li.tagName.toLowerCase() == 'li') {
607
+                    if (domUtils.hasClass(li, 'selected')) {
608
+                        domUtils.removeClasses(li, 'selected');
609
+                    } else {
610
+                        domUtils.addClass(li, 'selected');
611
+                    }
612
+                }
613
+            });
614
+        },
615
+        /* 初始化第一次的数据 */
616
+        initData: function () {
617
+
618
+            /* 拉取数据需要使用的值 */
619
+            this.state = 0;
620
+            this.listSize = editor.getOpt('fileManagerListSize');
621
+            this.listIndex = 0;
622
+            this.listEnd = false;
623
+
624
+            /* 第一次拉取数据 */
625
+            this.getFileData();
626
+        },
627
+        /* 向后台拉取图片列表数据 */
628
+        getFileData: function () {
629
+            var _this = this;
630
+
631
+            if(!_this.listEnd && !this.isLoadingData) {
632
+                this.isLoadingData = true;
633
+                ajax.request(editor.getActionUrl(editor.getOpt('fileManagerActionName')), {
634
+                    timeout: 100000,
635
+                    data: utils.extend({
636
+                            start: this.listIndex,
637
+                            size: this.listSize
638
+                        }, editor.queryCommandValue('serverparam')),
639
+                    method: 'get',
640
+                    onsuccess: function (r) {
641
+                        try {
642
+                            var json = eval('(' + r.responseText + ')');
643
+                            if (json.state == 'SUCCESS') {
644
+                                _this.pushData(json.list);
645
+                                _this.listIndex = parseInt(json.start) + parseInt(json.list.length);
646
+                                if(_this.listIndex >= json.total) {
647
+                                    _this.listEnd = true;
648
+                                }
649
+                                _this.isLoadingData = false;
650
+                            }
651
+                        } catch (e) {
652
+                            if(r.responseText.indexOf('ue_separate_ue') != -1) {
653
+                                var list = r.responseText.split(r.responseText);
654
+                                _this.pushData(list);
655
+                                _this.listIndex = parseInt(list.length);
656
+                                _this.listEnd = true;
657
+                                _this.isLoadingData = false;
658
+                            }
659
+                        }
660
+                    },
661
+                    onerror: function () {
662
+                        _this.isLoadingData = false;
663
+                    }
664
+                });
665
+            }
666
+        },
667
+        /* 添加图片到列表界面上 */
668
+        pushData: function (list) {
669
+            var i, item, img, filetype, preview, icon, _this = this,
670
+                urlPrefix = editor.getOpt('fileManagerUrlPrefix');
671
+            for (i = 0; i < list.length; i++) {
672
+                if(list[i] && list[i].url) {
673
+                    item = document.createElement('li');
674
+                    icon = document.createElement('span');
675
+                    filetype = list[i].url.substr(list[i].url.lastIndexOf('.') + 1);
676
+
677
+                    if ( "png|jpg|jpeg|gif|bmp".indexOf(filetype) != -1 ) {
678
+                        preview = document.createElement('img');
679
+                        domUtils.on(preview, 'load', (function(image){
680
+                            return function(){
681
+                                _this.scale(image, image.parentNode.offsetWidth, image.parentNode.offsetHeight);
682
+                            };
683
+                        })(preview));
684
+                        preview.width = 113;
685
+                        preview.setAttribute('src', urlPrefix + list[i].url + (list[i].url.indexOf('?') == -1 ? '?noCache=':'&noCache=') + (+new Date()).toString(36) );
686
+                    } else {
687
+                        var ic = document.createElement('i'),
688
+                            textSpan = document.createElement('span');
689
+                        textSpan.innerHTML = list[i].url.substr(list[i].url.lastIndexOf('/') + 1);
690
+                        preview = document.createElement('div');
691
+                        preview.appendChild(ic);
692
+                        preview.appendChild(textSpan);
693
+                        domUtils.addClass(preview, 'file-wrapper');
694
+                        domUtils.addClass(textSpan, 'file-title');
695
+                        domUtils.addClass(ic, 'file-type-' + filetype);
696
+                        domUtils.addClass(ic, 'file-preview');
697
+                    }
698
+                    domUtils.addClass(icon, 'icon');
699
+                    item.setAttribute('data-url', urlPrefix + list[i].url);
700
+                    if (list[i].original) {
701
+                        item.setAttribute('data-title', list[i].original);
702
+                    }
703
+
704
+                    item.appendChild(preview);
705
+                    item.appendChild(icon);
706
+                    this.list.insertBefore(item, this.clearFloat);
707
+                }
708
+            }
709
+        },
710
+        /* 改变图片大小 */
711
+        scale: function (img, w, h, type) {
712
+            var ow = img.width,
713
+                oh = img.height;
714
+
715
+            if (type == 'justify') {
716
+                if (ow >= oh) {
717
+                    img.width = w;
718
+                    img.height = h * oh / ow;
719
+                    img.style.marginLeft = '-' + parseInt((img.width - w) / 2) + 'px';
720
+                } else {
721
+                    img.width = w * ow / oh;
722
+                    img.height = h;
723
+                    img.style.marginTop = '-' + parseInt((img.height - h) / 2) + 'px';
724
+                }
725
+            } else {
726
+                if (ow >= oh) {
727
+                    img.width = w * ow / oh;
728
+                    img.height = h;
729
+                    img.style.marginLeft = '-' + parseInt((img.width - w) / 2) + 'px';
730
+                } else {
731
+                    img.width = w;
732
+                    img.height = h * oh / ow;
733
+                    img.style.marginTop = '-' + parseInt((img.height - h) / 2) + 'px';
734
+                }
735
+            }
736
+        },
737
+        getInsertList: function () {
738
+            var i, lis = this.list.children, list = [];
739
+            for (i = 0; i < lis.length; i++) {
740
+                if (domUtils.hasClass(lis[i], 'selected')) {
741
+                    var url = lis[i].getAttribute('data-url');
742
+                    var title = lis[i].getAttribute('data-title') || url.substr(url.lastIndexOf('/') + 1);
743
+                    list.push({
744
+                        title: title,
745
+                        url: url
746
+                    });
747
+                }
748
+            }
749
+            return list;
750
+        }
751
+    };
752
+
753
+
754
+})();

BIN
static/ueditor/dialogs/attachment/fileTypeImages/icon_chm.gif Vedi File


BIN
static/ueditor/dialogs/attachment/fileTypeImages/icon_default.png Vedi File


BIN
static/ueditor/dialogs/attachment/fileTypeImages/icon_doc.gif Vedi File


BIN
static/ueditor/dialogs/attachment/fileTypeImages/icon_exe.gif Vedi File


BIN
static/ueditor/dialogs/attachment/fileTypeImages/icon_jpg.gif Vedi File


BIN
static/ueditor/dialogs/attachment/fileTypeImages/icon_mp3.gif Vedi File


BIN
static/ueditor/dialogs/attachment/fileTypeImages/icon_mv.gif Vedi File


BIN
static/ueditor/dialogs/attachment/fileTypeImages/icon_pdf.gif Vedi File


BIN
static/ueditor/dialogs/attachment/fileTypeImages/icon_ppt.gif Vedi File


BIN
static/ueditor/dialogs/attachment/fileTypeImages/icon_psd.gif Vedi File


BIN
static/ueditor/dialogs/attachment/fileTypeImages/icon_rar.gif Vedi File


BIN
static/ueditor/dialogs/attachment/fileTypeImages/icon_txt.gif Vedi File


BIN
static/ueditor/dialogs/attachment/fileTypeImages/icon_xls.gif Vedi File


BIN
static/ueditor/dialogs/attachment/images/alignicon.gif Vedi File


BIN
static/ueditor/dialogs/attachment/images/alignicon.png Vedi File


BIN
static/ueditor/dialogs/attachment/images/bg.png Vedi File


BIN
static/ueditor/dialogs/attachment/images/file-icons.gif Vedi File


BIN
static/ueditor/dialogs/attachment/images/file-icons.png Vedi File


BIN
static/ueditor/dialogs/attachment/images/icons.gif Vedi File


BIN
static/ueditor/dialogs/attachment/images/icons.png Vedi File


BIN
static/ueditor/dialogs/attachment/images/image.png Vedi File


BIN
static/ueditor/dialogs/attachment/images/progress.png Vedi File


BIN
static/ueditor/dialogs/attachment/images/success.gif Vedi File


BIN
static/ueditor/dialogs/attachment/images/success.png Vedi File


+ 94 - 0
static/ueditor/dialogs/background/background.css Vedi File

@@ -0,0 +1,94 @@
1
+.wrapper{ width: 424px;margin: 10px auto; zoom:1;position: relative}
2
+.tabbody{height:225px;}
3
+.tabbody .panel { position: absolute;width:100%; height:100%;background: #fff; display: none;}
4
+.tabbody .focus { display: block;}
5
+
6
+body{font-size: 12px;color: #888;overflow: hidden;}
7
+input,label{vertical-align:middle}
8
+.clear{clear: both;}
9
+.pl{padding-left: 18px;padding-left: 23px\9;}
10
+
11
+#imageList {width: 420px;height: 215px;margin-top: 10px;overflow: hidden;overflow-y: auto;}
12
+#imageList div {float: left;width: 100px;height: 95px;margin: 5px 10px;}
13
+#imageList img {cursor: pointer;border: 2px solid white;}
14
+
15
+.bgarea{margin: 10px;padding: 5px;height: 84%;border: 1px solid #A8A297;}
16
+.content div{margin: 10px 0 10px 5px;}
17
+.content .iptradio{margin: 0px 5px 5px 0px;}
18
+.txt{width:280px;}
19
+
20
+.wrapcolor{height: 19px;}
21
+div.color{float: left;margin: 0;}
22
+#colorPicker{width: 17px;height: 17px;border: 1px solid #CCC;display: inline-block;border-radius: 3px;box-shadow: 2px 2px 5px #D3D6DA;margin: 0;float: left;}
23
+div.alignment,#custom{margin-left: 23px;margin-left: 28px\9;}
24
+#custom input{height: 15px;min-height: 15px;width:20px;}
25
+#repeatType{width:100px;}
26
+
27
+
28
+/* 图片管理样式 */
29
+#imgManager {
30
+    width: 100%;
31
+    height: 225px;
32
+}
33
+#imgManager #imageList{
34
+    width: 100%;
35
+    overflow-x: hidden;
36
+    overflow-y: auto;
37
+}
38
+#imgManager ul {
39
+    display: block;
40
+    list-style: none;
41
+    margin: 0;
42
+    padding: 0;
43
+}
44
+#imgManager li {
45
+    float: left;
46
+    display: block;
47
+    list-style: none;
48
+    padding: 0;
49
+    width: 113px;
50
+    height: 113px;
51
+    margin: 9px 0 0 19px;
52
+    background-color: #eee;
53
+    overflow: hidden;
54
+    cursor: pointer;
55
+    position: relative;
56
+}
57
+#imgManager li.clearFloat {
58
+    float: none;
59
+    clear: both;
60
+    display: block;
61
+    width:0;
62
+    height:0;
63
+    margin: 0;
64
+    padding: 0;
65
+}
66
+#imgManager li img {
67
+    cursor: pointer;
68
+}
69
+#imgManager li .icon {
70
+    cursor: pointer;
71
+    width: 113px;
72
+    height: 113px;
73
+    position: absolute;
74
+    top: 0;
75
+    left: 0;
76
+    z-index: 2;
77
+    border: 0;
78
+    background-repeat: no-repeat;
79
+}
80
+#imgManager li .icon:hover {
81
+    width: 107px;
82
+    height: 107px;
83
+    border: 3px solid #1094fa;
84
+}
85
+#imgManager li.selected .icon {
86
+    background-image: url(images/success.png);
87
+    background-position: 75px 75px;
88
+}
89
+#imgManager li.selected .icon:hover {
90
+    width: 107px;
91
+    height: 107px;
92
+    border: 3px solid #1094fa;
93
+    background-position: 72px 72px;
94
+}

+ 56 - 0
static/ueditor/dialogs/background/background.html Vedi File

@@ -0,0 +1,56 @@
1
+<!DOCTYPE HTML>
2
+<html>
3
+<head>
4
+    <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
5
+    <script type="text/javascript" src="../internal.js"></script>
6
+    <link rel="stylesheet" type="text/css" href="background.css">
7
+</head>
8
+<body>
9
+    <div id="bg_container" class="wrapper">
10
+        <div id="tabHeads" class="tabhead">
11
+            <span class="focus" data-content-id="normal"><var id="lang_background_normal"></var></span>
12
+            <span class="" data-content-id="imgManager"><var id="lang_background_local"></var></span>
13
+        </div>
14
+        <div id="tabBodys" class="tabbody">
15
+            <div id="normal" class="panel focus">
16
+                <fieldset class="bgarea">
17
+                    <legend><var id="lang_background_set"></var></legend>
18
+                    <div class="content">
19
+                        <div>
20
+                            <label><input id="nocolorRadio" class="iptradio" type="radio" name="t" value="none" checked="checked"><var id="lang_background_none"></var></label>
21
+                            <label><input id="coloredRadio" class="iptradio" type="radio" name="t" value="color"><var id="lang_background_colored"></var></label>
22
+                        </div>
23
+                        <div class="wrapcolor pl">
24
+                            <div class="color">
25
+                                <var id="lang_background_color"></var>:
26
+                            </div>
27
+                            <div id="colorPicker"></div>
28
+                            <div class="clear"></div>
29
+                        </div>
30
+                        <div class="wrapcolor pl">
31
+                            <label><var id="lang_background_netimg"></var>:</label><input class="txt" type="text" id="url">
32
+                        </div>
33
+                        <div id="alignment" class="alignment">
34
+                            <var id="lang_background_align"></var>:<select id="repeatType">
35
+                                <option value="center"></option>
36
+                                <option value="repeat-x"></option>
37
+                                <option value="repeat-y"></option>
38
+                                <option value="repeat"></option>
39
+                                <option value="self"></option>
40
+                            </select>
41
+                        </div>
42
+                        <div id="custom" >
43
+                            <var id="lang_background_position"></var>:x:<input type="text" size="1" id="x" maxlength="4" value="0">px&nbsp;&nbsp;y:<input type="text" size="1" id="y" maxlength="4" value="0">px
44
+                        </div>
45
+                    </div>
46
+                </fieldset>
47
+
48
+            </div>
49
+            <div id="imgManager" class="panel">
50
+                <div id="imageList" style=""></div>
51
+            </div>
52
+        </div>
53
+    </div>
54
+    <script type="text/javascript" src="background.js"></script>
55
+</body>
56
+</html>

+ 376 - 0
static/ueditor/dialogs/background/background.js Vedi File

@@ -0,0 +1,376 @@
1
+(function () {
2
+
3
+    var onlineImage,
4
+        backupStyle = editor.queryCommandValue('background');
5
+
6
+    window.onload = function () {
7
+        initTabs();
8
+        initColorSelector();
9
+    };
10
+
11
+    /* 初始化tab标签 */
12
+    function initTabs(){
13
+        var tabs = $G('tabHeads').children;
14
+        for (var i = 0; i < tabs.length; i++) {
15
+            domUtils.on(tabs[i], "click", function (e) {
16
+                var target = e.target || e.srcElement;
17
+                for (var j = 0; j < tabs.length; j++) {
18
+                    if(tabs[j] == target){
19
+                        tabs[j].className = "focus";
20
+                        var contentId = tabs[j].getAttribute('data-content-id');
21
+                        $G(contentId).style.display = "block";
22
+                        if(contentId == 'imgManager') {
23
+                            initImagePanel();
24
+                        }
25
+                    }else {
26
+                        tabs[j].className = "";
27
+                        $G(tabs[j].getAttribute('data-content-id')).style.display = "none";
28
+                    }
29
+                }
30
+            });
31
+        }
32
+    }
33
+
34
+    /* 初始化颜色设置 */
35
+    function initColorSelector () {
36
+        var obj = editor.queryCommandValue('background');
37
+        if (obj) {
38
+            var color = obj['background-color'],
39
+                repeat = obj['background-repeat'] || 'repeat',
40
+                image = obj['background-image'] || '',
41
+                position = obj['background-position'] || 'center center',
42
+                pos = position.split(' '),
43
+                x = parseInt(pos[0]) || 0,
44
+                y = parseInt(pos[1]) || 0;
45
+
46
+            if(repeat == 'no-repeat' && (x || y)) repeat = 'self';
47
+
48
+            image = image.match(/url[\s]*\(([^\)]*)\)/);
49
+            image = image ? image[1]:'';
50
+            updateFormState('colored', color, image, repeat, x, y);
51
+        } else {
52
+            updateFormState();
53
+        }
54
+
55
+        var updateHandler = function () {
56
+            updateFormState();
57
+            updateBackground();
58
+        }
59
+        domUtils.on($G('nocolorRadio'), 'click', updateBackground);
60
+        domUtils.on($G('coloredRadio'), 'click', updateHandler);
61
+        domUtils.on($G('url'), 'keyup', function(){
62
+            if($G('url').value && $G('alignment').style.display == "none") {
63
+                utils.each($G('repeatType').children, function(item){
64
+                    item.selected = ('repeat' == item.getAttribute('value') ? 'selected':false);
65
+                });
66
+            }
67
+            updateHandler();
68
+        });
69
+        domUtils.on($G('repeatType'), 'change', updateHandler);
70
+        domUtils.on($G('x'), 'keyup', updateBackground);
71
+        domUtils.on($G('y'), 'keyup', updateBackground);
72
+
73
+        initColorPicker();
74
+    }
75
+
76
+    /* 初始化颜色选择器 */
77
+    function initColorPicker() {
78
+        var me = editor,
79
+            cp = $G("colorPicker");
80
+
81
+        /* 生成颜色选择器ui对象 */
82
+        var popup = new UE.ui.Popup({
83
+            content: new UE.ui.ColorPicker({
84
+                noColorText: me.getLang("clearColor"),
85
+                editor: me,
86
+                onpickcolor: function (t, color) {
87
+                    updateFormState('colored', color);
88
+                    updateBackground();
89
+                    UE.ui.Popup.postHide();
90
+                },
91
+                onpicknocolor: function (t, color) {
92
+                    updateFormState('colored', 'transparent');
93
+                    updateBackground();
94
+                    UE.ui.Popup.postHide();
95
+                }
96
+            }),
97
+            editor: me,
98
+            onhide: function () {
99
+            }
100
+        });
101
+
102
+        /* 设置颜色选择器 */
103
+        domUtils.on(cp, "click", function () {
104
+            popup.showAnchor(this);
105
+        });
106
+        domUtils.on(document, 'mousedown', function (evt) {
107
+            var el = evt.target || evt.srcElement;
108
+            UE.ui.Popup.postHide(el);
109
+        });
110
+        domUtils.on(window, 'scroll', function () {
111
+            UE.ui.Popup.postHide();
112
+        });
113
+    }
114
+
115
+    /* 初始化在线图片列表 */
116
+    function initImagePanel() {
117
+        onlineImage = onlineImage || new OnlineImage('imageList');
118
+    }
119
+
120
+    /* 更新背景色设置面板 */
121
+    function updateFormState (radio, color, url, align, x, y) {
122
+        var nocolorRadio = $G('nocolorRadio'),
123
+            coloredRadio = $G('coloredRadio');
124
+
125
+        if(radio) {
126
+            nocolorRadio.checked = (radio == 'colored' ? false:'checked');
127
+            coloredRadio.checked = (radio == 'colored' ? 'checked':false);
128
+        }
129
+        if(color) {
130
+            domUtils.setStyle($G("colorPicker"), "background-color", color);
131
+        }
132
+
133
+        if(url && /^\//.test(url)) {
134
+            var a = document.createElement('a');
135
+            a.href = url;
136
+            browser.ie && (a.href = a.href);
137
+            url = browser.ie ? a.href:(a.protocol + '//' + a.host + a.pathname + a.search + a.hash);
138
+        }
139
+
140
+        if(url || url === '') {
141
+            $G('url').value = url;
142
+        }
143
+        if(align) {
144
+            utils.each($G('repeatType').children, function(item){
145
+                item.selected = (align == item.getAttribute('value') ? 'selected':false);
146
+            });
147
+        }
148
+        if(x || y) {
149
+            $G('x').value = parseInt(x) || 0;
150
+            $G('y').value = parseInt(y) || 0;
151
+        }
152
+
153
+        $G('alignment').style.display = coloredRadio.checked && $G('url').value ? '':'none';
154
+        $G('custom').style.display = coloredRadio.checked && $G('url').value && $G('repeatType').value == 'self' ? '':'none';
155
+    }
156
+
157
+    /* 更新背景颜色 */
158
+    function updateBackground () {
159
+        if ($G('coloredRadio').checked) {
160
+            var color = domUtils.getStyle($G("colorPicker"), "background-color"),
161
+                bgimg = $G("url").value,
162
+                align = $G("repeatType").value,
163
+                backgroundObj = {
164
+                    "background-repeat": "no-repeat",
165
+                    "background-position": "center center"
166
+                };
167
+
168
+            if (color) backgroundObj["background-color"] = color;
169
+            if (bgimg) backgroundObj["background-image"] = 'url(' + bgimg + ')';
170
+            if (align == 'self') {
171
+                backgroundObj["background-position"] = $G("x").value + "px " + $G("y").value + "px";
172
+            } else if (align == 'repeat-x' || align == 'repeat-y' || align == 'repeat') {
173
+                backgroundObj["background-repeat"] = align;
174
+            }
175
+
176
+            editor.execCommand('background', backgroundObj);
177
+        } else {
178
+            editor.execCommand('background', null);
179
+        }
180
+    }
181
+
182
+
183
+    /* 在线图片 */
184
+    function OnlineImage(target) {
185
+        this.container = utils.isString(target) ? document.getElementById(target) : target;
186
+        this.init();
187
+    }
188
+    OnlineImage.prototype = {
189
+        init: function () {
190
+            this.reset();
191
+            this.initEvents();
192
+        },
193
+        /* 初始化容器 */
194
+        initContainer: function () {
195
+            this.container.innerHTML = '';
196
+            this.list = document.createElement('ul');
197
+            this.clearFloat = document.createElement('li');
198
+
199
+            domUtils.addClass(this.list, 'list');
200
+            domUtils.addClass(this.clearFloat, 'clearFloat');
201
+
202
+            this.list.id = 'imageListUl';
203
+            this.list.appendChild(this.clearFloat);
204
+            this.container.appendChild(this.list);
205
+        },
206
+        /* 初始化滚动事件,滚动到地步自动拉取数据 */
207
+        initEvents: function () {
208
+            var _this = this;
209
+
210
+            /* 滚动拉取图片 */
211
+            domUtils.on($G('imageList'), 'scroll', function(e){
212
+                var panel = this;
213
+                if (panel.scrollHeight - (panel.offsetHeight + panel.scrollTop) < 10) {
214
+                    _this.getImageData();
215
+                }
216
+            });
217
+            /* 选中图片 */
218
+            domUtils.on(this.container, 'click', function (e) {
219
+                var target = e.target || e.srcElement,
220
+                    li = target.parentNode,
221
+                    nodes = $G('imageListUl').childNodes;
222
+
223
+                if (li.tagName.toLowerCase() == 'li') {
224
+                    updateFormState('nocolor', null, '');
225
+                    for (var i = 0, node; node = nodes[i++];) {
226
+                        if (node == li && !domUtils.hasClass(node, 'selected')) {
227
+                            domUtils.addClass(node, 'selected');
228
+                            updateFormState('colored', null, li.firstChild.getAttribute("_src"), 'repeat');
229
+                        } else {
230
+                            domUtils.removeClasses(node, 'selected');
231
+                        }
232
+                    }
233
+                    updateBackground();
234
+                }
235
+            });
236
+        },
237
+        /* 初始化第一次的数据 */
238
+        initData: function () {
239
+
240
+            /* 拉取数据需要使用的值 */
241
+            this.state = 0;
242
+            this.listSize = editor.getOpt('imageManagerListSize');
243
+            this.listIndex = 0;
244
+            this.listEnd = false;
245
+
246
+            /* 第一次拉取数据 */
247
+            this.getImageData();
248
+        },
249
+        /* 重置界面 */
250
+        reset: function() {
251
+            this.initContainer();
252
+            this.initData();
253
+        },
254
+        /* 向后台拉取图片列表数据 */
255
+        getImageData: function () {
256
+            var _this = this;
257
+
258
+            if(!_this.listEnd && !this.isLoadingData) {
259
+                this.isLoadingData = true;
260
+                var url = editor.getActionUrl(editor.getOpt('imageManagerActionName')),
261
+                    isJsonp = utils.isCrossDomainUrl(url);
262
+                ajax.request(url, {
263
+                    'timeout': 100000,
264
+                    'dataType': isJsonp ? 'jsonp':'',
265
+                    'data': utils.extend({
266
+                            start: this.listIndex,
267
+                            size: this.listSize
268
+                        }, editor.queryCommandValue('serverparam')),
269
+                    'method': 'get',
270
+                    'onsuccess': function (r) {
271
+                        try {
272
+                            var json = isJsonp ? r:eval('(' + r.responseText + ')');
273
+                            if (json.state == 'SUCCESS') {
274
+                                _this.pushData(json.list);
275
+                                _this.listIndex = parseInt(json.start) + parseInt(json.list.length);
276
+                                if(_this.listIndex >= json.total) {
277
+                                    _this.listEnd = true;
278
+                                }
279
+                                _this.isLoadingData = false;
280
+                            }
281
+                        } catch (e) {
282
+                            if(r.responseText.indexOf('ue_separate_ue') != -1) {
283
+                                var list = r.responseText.split(r.responseText);
284
+                                _this.pushData(list);
285
+                                _this.listIndex = parseInt(list.length);
286
+                                _this.listEnd = true;
287
+                                _this.isLoadingData = false;
288
+                            }
289
+                        }
290
+                    },
291
+                    'onerror': function () {
292
+                        _this.isLoadingData = false;
293
+                    }
294
+                });
295
+            }
296
+        },
297
+        /* 添加图片到列表界面上 */
298
+        pushData: function (list) {
299
+            var i, item, img, icon, _this = this,
300
+                urlPrefix = editor.getOpt('imageManagerUrlPrefix');
301
+            for (i = 0; i < list.length; i++) {
302
+                if(list[i] && list[i].url) {
303
+                    item = document.createElement('li');
304
+                    img = document.createElement('img');
305
+                    icon = document.createElement('span');
306
+
307
+                    domUtils.on(img, 'load', (function(image){
308
+                        return function(){
309
+                            _this.scale(image, image.parentNode.offsetWidth, image.parentNode.offsetHeight);
310
+                        }
311
+                    })(img));
312
+                    img.width = 113;
313
+                    img.setAttribute('src', urlPrefix + list[i].url + (list[i].url.indexOf('?') == -1 ? '?noCache=':'&noCache=') + (+new Date()).toString(36) );
314
+                    img.setAttribute('_src', urlPrefix + list[i].url);
315
+                    domUtils.addClass(icon, 'icon');
316
+
317
+                    item.appendChild(img);
318
+                    item.appendChild(icon);
319
+                    this.list.insertBefore(item, this.clearFloat);
320
+                }
321
+            }
322
+        },
323
+        /* 改变图片大小 */
324
+        scale: function (img, w, h, type) {
325
+            var ow = img.width,
326
+                oh = img.height;
327
+
328
+            if (type == 'justify') {
329
+                if (ow >= oh) {
330
+                    img.width = w;
331
+                    img.height = h * oh / ow;
332
+                    img.style.marginLeft = '-' + parseInt((img.width - w) / 2) + 'px';
333
+                } else {
334
+                    img.width = w * ow / oh;
335
+                    img.height = h;
336
+                    img.style.marginTop = '-' + parseInt((img.height - h) / 2) + 'px';
337
+                }
338
+            } else {
339
+                if (ow >= oh) {
340
+                    img.width = w * ow / oh;
341
+                    img.height = h;
342
+                    img.style.marginLeft = '-' + parseInt((img.width - w) / 2) + 'px';
343
+                } else {
344
+                    img.width = w;
345
+                    img.height = h * oh / ow;
346
+                    img.style.marginTop = '-' + parseInt((img.height - h) / 2) + 'px';
347
+                }
348
+            }
349
+        },
350
+        getInsertList: function () {
351
+            var i, lis = this.list.children, list = [], align = getAlign();
352
+            for (i = 0; i < lis.length; i++) {
353
+                if (domUtils.hasClass(lis[i], 'selected')) {
354
+                    var img = lis[i].firstChild,
355
+                        src = img.getAttribute('_src');
356
+                    list.push({
357
+                        src: src,
358
+                        _src: src,
359
+                        floatStyle: align
360
+                    });
361
+                }
362
+
363
+            }
364
+            return list;
365
+        }
366
+    };
367
+
368
+    dialog.onok = function () {
369
+        updateBackground();
370
+        editor.fireEvent('saveScene');
371
+    };
372
+    dialog.oncancel = function () {
373
+        editor.execCommand('background', backupStyle);
374
+    };
375
+
376
+})();

BIN
static/ueditor/dialogs/background/images/bg.png Vedi File


BIN
static/ueditor/dialogs/background/images/success.png Vedi File


+ 65 - 0
static/ueditor/dialogs/charts/chart.config.js Vedi File

@@ -0,0 +1,65 @@
1
+/*
2
+ * 图表配置文件
3
+ * */
4
+
5
+
6
+//不同类型的配置
7
+var typeConfig = [
8
+    {
9
+        chart: {
10
+            type: 'line'
11
+        },
12
+        plotOptions: {
13
+            line: {
14
+                dataLabels: {
15
+                    enabled: false
16
+                },
17
+                enableMouseTracking: true
18
+            }
19
+        }
20
+    }, {
21
+        chart: {
22
+            type: 'line'
23
+        },
24
+        plotOptions: {
25
+            line: {
26
+                dataLabels: {
27
+                    enabled: true
28
+                },
29
+                enableMouseTracking: false
30
+            }
31
+        }
32
+    }, {
33
+        chart: {
34
+            type: 'area'
35
+        }
36
+    }, {
37
+        chart: {
38
+            type: 'bar'
39
+        }
40
+    }, {
41
+        chart: {
42
+            type: 'column'
43
+        }
44
+    }, {
45
+        chart: {
46
+            plotBackgroundColor: null,
47
+            plotBorderWidth: null,
48
+            plotShadow: false
49
+        },
50
+        plotOptions: {
51
+            pie: {
52
+                allowPointSelect: true,
53
+                cursor: 'pointer',
54
+                dataLabels: {
55
+                    enabled: true,
56
+                    color: '#000000',
57
+                    connectorColor: '#000000',
58
+                    formatter: function() {
59
+                        return '<b>'+ this.point.name +'</b>: '+ ( Math.round( this.point.percentage*100 ) / 100 ) +' %';
60
+                    }
61
+                }
62
+            }
63
+        }
64
+    }
65
+];

+ 165 - 0
static/ueditor/dialogs/charts/charts.css Vedi File

@@ -0,0 +1,165 @@
1
+html, body {
2
+    width: 100%;
3
+    height: 100%;
4
+    margin: 0;
5
+    padding: 0;
6
+    overflow-x: hidden;
7
+}
8
+
9
+.main {
10
+    width: 100%;
11
+    overflow: hidden;
12
+}
13
+
14
+.table-view {
15
+    height: 100%;
16
+    float: left;
17
+    margin: 20px;
18
+    width: 40%;
19
+}
20
+
21
+.table-view .table-container {
22
+    width: 100%;
23
+    margin-bottom: 50px;
24
+    overflow: scroll;
25
+}
26
+
27
+.table-view th {
28
+    padding: 5px 10px;
29
+    background-color: #F7F7F7;
30
+}
31
+
32
+.table-view td {
33
+    width: 50px;
34
+    text-align: center;
35
+    padding:0;
36
+}
37
+
38
+.table-container input {
39
+    width: 40px;
40
+    padding: 5px;
41
+    border: none;
42
+    outline: none;
43
+}
44
+
45
+.table-view caption {
46
+    font-size: 18px;
47
+    text-align: left;
48
+}
49
+
50
+.charts-view {
51
+    /*margin-left: 49%!important;*/
52
+    width: 50%;
53
+    margin-left: 49%;
54
+    height: 400px;
55
+}
56
+
57
+.charts-container {
58
+    border-left: 1px solid #c3c3c3;
59
+}
60
+
61
+.charts-format fieldset {
62
+    padding-left: 20px;
63
+    margin-bottom: 50px;
64
+}
65
+
66
+.charts-format legend {
67
+    padding-left: 10px;
68
+    padding-right: 10px;
69
+}
70
+
71
+.format-item-container {
72
+    padding: 20px;
73
+}
74
+
75
+.format-item-container label {
76
+    display: block;
77
+    margin: 10px 0;
78
+}
79
+
80
+.charts-format .data-item {
81
+    border: 1px solid black;
82
+    outline: none;
83
+    padding: 2px 3px;
84
+}
85
+
86
+/* 图表类型 */
87
+
88
+.charts-type {
89
+    margin-top: 50px;
90
+    height: 300px;
91
+}
92
+
93
+.scroll-view {
94
+    border: 1px solid #c3c3c3;
95
+    border-left: none;
96
+    border-right: none;
97
+    overflow: hidden;
98
+}
99
+
100
+.scroll-container {
101
+    margin: 20px;
102
+    width: 100%;
103
+    overflow: hidden;
104
+}
105
+
106
+.scroll-bed {
107
+    width: 10000px;
108
+    _margin-top: 20px;
109
+    -webkit-transition: margin-left .5s ease;
110
+    -moz-transition: margin-left .5s ease;
111
+    transition: margin-left .5s ease;
112
+}
113
+
114
+.view-box {
115
+    display: inline-block;
116
+    *display: inline;
117
+    *zoom: 1;
118
+    margin-right: 20px;
119
+    border: 2px solid white;
120
+    line-height: 0;
121
+    overflow: hidden;
122
+    cursor: pointer;
123
+}
124
+
125
+.view-box img {
126
+    border: 1px solid #cecece;
127
+}
128
+
129
+.view-box.selected {
130
+    border-color: #7274A7;
131
+}
132
+
133
+.button-container {
134
+    margin-bottom: 20px;
135
+    text-align: center;
136
+}
137
+
138
+.button-container a {
139
+    display: inline-block;
140
+    width: 100px;
141
+    height: 25px;
142
+    line-height: 25px;
143
+    border: 1px solid #c2ccd1;
144
+    margin-right: 30px;
145
+    text-decoration: none;
146
+    color: black;
147
+    -webkit-border-radius: 2px;
148
+    -moz-border-radius: 2px;
149
+    border-radius: 2px;
150
+}
151
+
152
+.button-container a:HOVER {
153
+    background: #fcfcfc;
154
+}
155
+
156
+.button-container a:ACTIVE {
157
+    border-top-color: #c2ccd1;
158
+    box-shadow:inset 0 5px 4px -4px rgba(49, 49, 64, 0.1);
159
+}
160
+
161
+.edui-charts-not-data {
162
+    height: 100px;
163
+    line-height: 100px;
164
+    text-align: center;
165
+}

+ 89 - 0
static/ueditor/dialogs/charts/charts.html Vedi File

@@ -0,0 +1,89 @@
1
+<!DOCTYPE html>
2
+<html>
3
+    <head>
4
+        <title>chart</title>
5
+        <meta chartset="utf-8">
6
+        <link rel="stylesheet" type="text/css" href="charts.css">
7
+        <script type="text/javascript" src="../internal.js"></script>
8
+    </head>
9
+    <body>
10
+        <div class="main">
11
+            <div class="table-view">
12
+                <h3><var id="lang_data_source"></var></h3>
13
+                <div id="tableContainer" class="table-container"></div>
14
+                <h3><var id="lang_chart_format"></var></h3>
15
+                <form name="data-form">
16
+                    <div class="charts-format">
17
+                        <fieldset>
18
+                            <legend><var id="lang_data_align"></var></legend>
19
+                            <div class="format-item-container">
20
+                                <label>
21
+                                    <input type="radio" class="format-ctrl not-pie-item" name="charts-format" value="1" checked="checked">
22
+                                    <var id="lang_chart_align_same"></var>
23
+                                </label>
24
+                                <label>
25
+                                    <input type="radio" class="format-ctrl not-pie-item" name="charts-format" value="-1">
26
+                                    <var id="lang_chart_align_reverse"></var>
27
+                                </label>
28
+                                <br>
29
+                            </div>
30
+                        </fieldset>
31
+                        <fieldset>
32
+                            <legend><var id="lang_chart_title"></var></legend>
33
+                            <div class="format-item-container">
34
+                                <label>
35
+                                    <var id="lang_chart_main_title"></var><input type="text" name="title" class="data-item">
36
+                                </label>
37
+                                <label>
38
+                                    <var id="lang_chart_sub_title"></var><input type="text" name="sub-title" class="data-item not-pie-item">
39
+                                </label>
40
+                                <label>
41
+                                    <var id="lang_chart_x_title"></var><input type="text" name="x-title" class="data-item not-pie-item">
42
+                                </label>
43
+                                <label>
44
+                                    <var id="lang_chart_y_title"></var><input type="text" name="y-title" class="data-item not-pie-item">
45
+                                </label>
46
+                            </div>
47
+                        </fieldset>
48
+                        <fieldset>
49
+                            <legend><var id="lang_chart_tip"></var></legend>
50
+                            <div class="format-item-container">
51
+                                <label>
52
+                                    <var id="lang_cahrt_tip_prefix"></var>
53
+                                    <input type="text" id="tipInput" name="tip" class="data-item" disabled="disabled">
54
+                                </label>
55
+                                <p><var id="lang_cahrt_tip_description"></var></p>
56
+                            </div>
57
+                        </fieldset>
58
+                        <fieldset>
59
+                            <legend><var id="lang_chart_data_unit"></var></legend>
60
+                            <div class="format-item-container">
61
+                                <label><var id="lang_chart_data_unit_title"></var><input type="text" name="unit" class="data-item"></label>
62
+                                <p><var id="lang_chart_data_unit_description"></var></p>
63
+                            </div>
64
+                        </fieldset>
65
+                    </div>
66
+                </form>
67
+            </div>
68
+            <div class="charts-view">
69
+                <div id="chartsContainer" class="charts-container"></div>
70
+                <div id="chartsType" class="charts-type">
71
+                    <h3><var id="lang_chart_type"></var></h3>
72
+                    <div class="scroll-view">
73
+                        <div class="scroll-container">
74
+                            <div id="scrollBed" class="scroll-bed"></div>
75
+                        </div>
76
+                        <div id="buttonContainer" class="button-container">
77
+                            <a href="#" data-title="prev"><var id="lang_prev_btn"></var></a>
78
+                            <a href="#" data-title="next"><var id="lang_next_btn"></var></a>
79
+                        </div>
80
+                    </div>
81
+                </div>
82
+            </div>
83
+        </div>
84
+        <script src="../../third-party/jquery-1.10.2.min.js"></script>
85
+        <script src="../../third-party/highcharts/highcharts.js"></script>
86
+        <script src="chart.config.js"></script>
87
+        <script src="charts.js"></script>
88
+    </body>
89
+</html>

+ 519 - 0
static/ueditor/dialogs/charts/charts.js Vedi File

@@ -0,0 +1,519 @@
1
+/*
2
+ * 图片转换对话框脚本
3
+ **/
4
+
5
+var tableData = [],
6
+    //编辑器页面table
7
+    editorTable = null,
8
+    chartsConfig = window.typeConfig,
9
+    resizeTimer = null,
10
+    //初始默认图表类型
11
+    currentChartType = 0;
12
+
13
+window.onload = function () {
14
+
15
+    editorTable = domUtils.findParentByTagName( editor.selection.getRange().startContainer, 'table', true);
16
+
17
+    //未找到表格, 显示错误页面
18
+    if ( !editorTable ) {
19
+        document.body.innerHTML = "<div class='edui-charts-not-data'>未找到数据</div>";
20
+        return;
21
+    }
22
+
23
+    //初始化图表类型选择
24
+    initChartsTypeView();
25
+    renderTable( editorTable );
26
+    initEvent();
27
+    initUserConfig( editorTable.getAttribute( "data-chart" ) );
28
+    $( "#scrollBed .view-box:eq("+ currentChartType +")" ).trigger( "click" );
29
+    updateViewType( currentChartType );
30
+
31
+    dialog.addListener( "resize", function () {
32
+
33
+        if ( resizeTimer != null ) {
34
+            window.clearTimeout( resizeTimer );
35
+        }
36
+
37
+        resizeTimer = window.setTimeout( function () {
38
+
39
+            resizeTimer = null;
40
+
41
+            renderCharts();
42
+
43
+        }, 500 );
44
+
45
+    } );
46
+
47
+};
48
+
49
+function initChartsTypeView () {
50
+
51
+    var contents = [];
52
+
53
+    for ( var i = 0, len = chartsConfig.length; i<len; i++ ) {
54
+
55
+        contents.push( '<div class="view-box" data-chart-type="'+ i +'"><img width="300" src="images/charts'+ i +'.png"></div>' );
56
+
57
+    }
58
+
59
+    $( "#scrollBed" ).html( contents.join( "" ) );
60
+
61
+}
62
+
63
+//渲染table, 以便用户修改数据
64
+function renderTable ( table ) {
65
+
66
+    var tableHtml = [];
67
+
68
+    //构造数据
69
+    for ( var i = 0, row; row = table.rows[ i ]; i++ ) {
70
+
71
+        tableData[ i ] = [];
72
+        tableHtml[ i ] = [];
73
+
74
+        for ( var j = 0, cell; cell = row.cells[ j ]; j++ ) {
75
+
76
+            var value = getCellValue( cell );
77
+
78
+            if ( i > 0 && j > 0 ) {
79
+                value = +value;
80
+            }
81
+
82
+            if ( i === 0 || j === 0 ) {
83
+                tableHtml[ i ].push( '<th>'+ value +'</th>' );
84
+            } else {
85
+                tableHtml[ i ].push( '<td><input type="text" class="data-item" value="'+ value +'"></td>' );
86
+            }
87
+
88
+            tableData[ i ][ j ] = value;
89
+
90
+        }
91
+
92
+        tableHtml[ i ] = tableHtml[ i ].join( "" );
93
+
94
+    }
95
+
96
+    //draw 表格
97
+    $( "#tableContainer" ).html( '<table id="showTable" border="1"><tbody><tr>'+ tableHtml.join( "</tr><tr>" ) +'</tr></tbody></table>' );
98
+
99
+}
100
+
101
+/*
102
+ * 根据表格已有的图表属性初始化当前图表属性
103
+ */
104
+function initUserConfig ( config ) {
105
+
106
+    var parsedConfig = {};
107
+
108
+    if ( !config ) {
109
+        return;
110
+    }
111
+
112
+    config = config.split( ";" );
113
+
114
+    $.each( config, function ( index, item ) {
115
+
116
+        item = item.split( ":" );
117
+        parsedConfig[ item[ 0 ] ] = item[ 1 ];
118
+
119
+    } );
120
+
121
+    setUserConfig( parsedConfig );
122
+
123
+}
124
+
125
+function initEvent () {
126
+
127
+    var cacheValue = null,
128
+        //图表类型数
129
+        typeViewCount = chartsConfig.length- 1,
130
+        $chartsTypeViewBox = $( '#scrollBed .view-box' );
131
+
132
+    $( ".charts-format" ).delegate( ".format-ctrl", "change", function () {
133
+
134
+        renderCharts();
135
+
136
+    } )
137
+
138
+    $( ".table-view" ).delegate( ".data-item", "focus", function () {
139
+
140
+        cacheValue = this.value;
141
+
142
+    } ).delegate( ".data-item", "blur", function () {
143
+
144
+        if ( this.value !== cacheValue ) {
145
+            renderCharts();
146
+        }
147
+
148
+        cacheValue = null;
149
+
150
+    } );
151
+
152
+    $( "#buttonContainer" ).delegate( "a", "click", function (e) {
153
+
154
+        e.preventDefault();
155
+
156
+        if ( this.getAttribute( "data-title" ) === 'prev' ) {
157
+
158
+            if ( currentChartType > 0 ) {
159
+                currentChartType--;
160
+                updateViewType( currentChartType );
161
+            }
162
+
163
+        } else {
164
+
165
+            if ( currentChartType < typeViewCount ) {
166
+                currentChartType++;
167
+                updateViewType( currentChartType );
168
+            }
169
+
170
+        }
171
+
172
+    } );
173
+
174
+    //图表类型变化
175
+    $( '#scrollBed' ).delegate( ".view-box", "click", function (e) {
176
+
177
+        var index = $( this ).attr( "data-chart-type" );
178
+        $chartsTypeViewBox.removeClass( "selected" );
179
+        $( $chartsTypeViewBox[ index ] ).addClass( "selected" );
180
+
181
+        currentChartType = index | 0;
182
+
183
+        //饼图, 禁用部分配置
184
+        if ( currentChartType === chartsConfig.length - 1 ) {
185
+
186
+            disableNotPieConfig();
187
+
188
+        //启用完整配置
189
+        } else {
190
+
191
+            enableNotPieConfig();
192
+
193
+        }
194
+
195
+        renderCharts();
196
+
197
+    } );
198
+
199
+}
200
+
201
+function renderCharts () {
202
+
203
+    var data = collectData();
204
+
205
+    $('#chartsContainer').highcharts( $.extend( {}, chartsConfig[ currentChartType ], {
206
+
207
+        credits: {
208
+            enabled: false
209
+        },
210
+        exporting: {
211
+            enabled: false
212
+        },
213
+        title: {
214
+            text: data.title,
215
+            x: -20 //center
216
+        },
217
+        subtitle: {
218
+            text: data.subTitle,
219
+            x: -20
220
+        },
221
+        xAxis: {
222
+            title: {
223
+                text: data.xTitle
224
+            },
225
+            categories: data.categories
226
+        },
227
+        yAxis: {
228
+            title: {
229
+                text: data.yTitle
230
+            },
231
+            plotLines: [{
232
+                value: 0,
233
+                width: 1,
234
+                color: '#808080'
235
+            }]
236
+        },
237
+        tooltip: {
238
+            enabled: true,
239
+            valueSuffix: data.suffix
240
+        },
241
+        legend: {
242
+            layout: 'vertical',
243
+            align: 'right',
244
+            verticalAlign: 'middle',
245
+            borderWidth: 1
246
+        },
247
+        series: data.series
248
+
249
+    } ));
250
+
251
+}
252
+
253
+function updateViewType ( index ) {
254
+
255
+    $( "#scrollBed" ).css( 'marginLeft', -index*324+'px' );
256
+
257
+}
258
+
259
+function collectData () {
260
+
261
+    var form = document.forms[ 'data-form' ],
262
+        data = null;
263
+
264
+    if ( currentChartType !== chartsConfig.length - 1 ) {
265
+
266
+        data = getSeriesAndCategories();
267
+        $.extend( data, getUserConfig() );
268
+
269
+    //饼图数据格式
270
+    } else {
271
+        data = getSeriesForPieChart();
272
+        data.title = form[ 'title' ].value;
273
+        data.suffix = form[ 'unit' ].value;
274
+    }
275
+
276
+    return data;
277
+
278
+}
279
+
280
+/**
281
+ * 获取用户配置信息
282
+ */
283
+function getUserConfig () {
284
+
285
+    var form = document.forms[ 'data-form' ],
286
+        info = {
287
+            title: form[ 'title' ].value,
288
+            subTitle: form[ 'sub-title' ].value,
289
+            xTitle: form[ 'x-title' ].value,
290
+            yTitle: form[ 'y-title' ].value,
291
+            suffix: form[ 'unit' ].value,
292
+            //数据对齐方式
293
+            tableDataFormat: getTableDataFormat (),
294
+            //饼图提示文字
295
+            tip: $( "#tipInput" ).val()
296
+        };
297
+
298
+    return info;
299
+
300
+}
301
+
302
+function setUserConfig ( config ) {
303
+
304
+    var form = document.forms[ 'data-form' ];
305
+
306
+    config.title && ( form[ 'title' ].value = config.title );
307
+    config.subTitle && ( form[ 'sub-title' ].value = config.subTitle );
308
+    config.xTitle && ( form[ 'x-title' ].value = config.xTitle );
309
+    config.yTitle && ( form[ 'y-title' ].value = config.yTitle );
310
+    config.suffix && ( form[ 'unit' ].value = config.suffix );
311
+    config.dataFormat == "-1" && ( form[ 'charts-format' ][ 1 ].checked = true );
312
+    config.tip && ( form[ 'tip' ].value = config.tip );
313
+    currentChartType = config.chartType || 0;
314
+
315
+}
316
+
317
+function getSeriesAndCategories () {
318
+
319
+    var form = document.forms[ 'data-form' ],
320
+        series = [],
321
+        categories = [],
322
+        tmp = [],
323
+        tableData = getTableData();
324
+
325
+    //反转数据
326
+    if ( getTableDataFormat() === "-1" ) {
327
+
328
+        for ( var i = 0, len = tableData.length; i < len; i++ ) {
329
+
330
+            for ( var j = 0, jlen = tableData[ i ].length; j < jlen; j++ ) {
331
+
332
+                if ( !tmp[ j ] ) {
333
+                    tmp[ j ] = [];
334
+                }
335
+
336
+                tmp[ j ][ i ] = tableData[ i ][ j ];
337
+
338
+            }
339
+
340
+        }
341
+
342
+        tableData = tmp;
343
+
344
+    }
345
+
346
+    categories = tableData[0].slice( 1 );
347
+
348
+    for ( var i = 1, data; data = tableData[ i ]; i++ ) {
349
+
350
+        series.push( {
351
+            name: data[ 0 ],
352
+            data: data.slice( 1 )
353
+        } );
354
+
355
+    }
356
+
357
+    return {
358
+        series: series,
359
+        categories: categories
360
+    };
361
+
362
+}
363
+
364
+/*
365
+ * 获取数据源数据对齐方式
366
+ */
367
+function getTableDataFormat () {
368
+
369
+    var form = document.forms[ 'data-form' ],
370
+        items = form['charts-format'];
371
+
372
+    return items[ 0 ].checked ? items[ 0 ].value : items[ 1 ].value;
373
+
374
+}
375
+
376
+/*
377
+ * 禁用非饼图类型的配置项
378
+ */
379
+function disableNotPieConfig() {
380
+
381
+    updateConfigItem( 'disable' );
382
+
383
+}
384
+
385
+/*
386
+ * 启用非饼图类型的配置项
387
+ */
388
+function enableNotPieConfig() {
389
+
390
+    updateConfigItem( 'enable' );
391
+
392
+}
393
+
394
+function updateConfigItem ( value ) {
395
+
396
+    var table = $( "#showTable" )[ 0 ],
397
+        isDisable = value === 'disable' ? true : false;
398
+
399
+    //table中的input处理
400
+    for ( var i = 2 , row; row = table.rows[ i ]; i++ ) {
401
+
402
+        for ( var j = 1, cell; cell = row.cells[ j ]; j++ ) {
403
+
404
+            $( "input", cell ).attr( "disabled", isDisable );
405
+
406
+        }
407
+
408
+    }
409
+
410
+    //其他项处理
411
+    $( "input.not-pie-item" ).attr( "disabled", isDisable );
412
+    $( "#tipInput" ).attr( "disabled", !isDisable )
413
+
414
+}
415
+
416
+/*
417
+ * 获取饼图数据
418
+ * 饼图的数据只取第一行的
419
+ **/
420
+function getSeriesForPieChart () {
421
+
422
+    var series = {
423
+            type: 'pie',
424
+            name: $("#tipInput").val(),
425
+            data: []
426
+        },
427
+        tableData = getTableData();
428
+
429
+
430
+    for ( var j = 1, jlen = tableData[ 0 ].length; j < jlen; j++ ) {
431
+
432
+        var title = tableData[ 0 ][ j ],
433
+            val = tableData[ 1 ][ j ];
434
+
435
+        series.data.push( [ title, val ] );
436
+
437
+    }
438
+
439
+    return {
440
+        series: [ series ]
441
+    };
442
+
443
+}
444
+
445
+function getTableData () {
446
+
447
+    var table = document.getElementById( "showTable" ),
448
+        xCount = table.rows[0].cells.length - 1,
449
+        values = getTableInputValue();
450
+
451
+    for ( var i = 0, value; value = values[ i ]; i++ ) {
452
+
453
+        tableData[ Math.floor( i / xCount ) + 1 ][ i % xCount + 1 ] = values[ i ];
454
+
455
+    }
456
+
457
+    return tableData;
458
+
459
+}
460
+
461
+function getTableInputValue () {
462
+
463
+    var table = document.getElementById( "showTable" ),
464
+        inputs = table.getElementsByTagName( "input" ),
465
+        values = [];
466
+
467
+    for ( var i = 0, input; input = inputs[ i ]; i++ ) {
468
+        values.push( input.value | 0 );
469
+    }
470
+
471
+    return values;
472
+
473
+}
474
+
475
+function getCellValue ( cell ) {
476
+
477
+    var value = utils.trim( ( cell.innerText || cell.textContent || '' ) );
478
+
479
+    return value.replace( new RegExp( UE.dom.domUtils.fillChar, 'g' ), '' ).replace( /^\s+|\s+$/g, '' );
480
+
481
+}
482
+
483
+
484
+//dialog确认事件
485
+dialog.onok = function () {
486
+
487
+    //收集信息
488
+    var form = document.forms[ 'data-form' ],
489
+        info = getUserConfig();
490
+
491
+    //添加图表类型
492
+    info.chartType = currentChartType;
493
+
494
+    //同步表格数据到编辑器
495
+    syncTableData();
496
+
497
+    //执行图表命令
498
+    editor.execCommand( 'charts', info );
499
+
500
+};
501
+
502
+/*
503
+ * 同步图表编辑视图的表格数据到编辑器里的原始表格
504
+ */
505
+function syncTableData () {
506
+
507
+    var tableData = getTableData();
508
+
509
+    for ( var i = 1, row; row = editorTable.rows[ i ]; i++ ) {
510
+
511
+        for ( var j = 1, cell; cell = row.cells[ j ]; j++ ) {
512
+
513
+            cell.innerHTML = tableData[ i ] [ j ];
514
+
515
+        }
516
+
517
+    }
518
+
519
+}

BIN
static/ueditor/dialogs/charts/images/charts0.png Vedi File


BIN
static/ueditor/dialogs/charts/images/charts1.png Vedi File


BIN
static/ueditor/dialogs/charts/images/charts2.png Vedi File


BIN
static/ueditor/dialogs/charts/images/charts3.png Vedi File


BIN
static/ueditor/dialogs/charts/images/charts4.png Vedi File


BIN
static/ueditor/dialogs/charts/images/charts5.png Vedi File


+ 43 - 0
static/ueditor/dialogs/emotion/emotion.css Vedi File

@@ -0,0 +1,43 @@
1
+.jd img{
2
+    background:transparent url(images/jxface2.gif?v=1.1) no-repeat scroll left top;
3
+    cursor:pointer;width:35px;height:35px;display:block;
4
+}
5
+.pp img{
6
+    background:transparent url(images/fface.gif?v=1.1) no-repeat scroll left top;
7
+    cursor:pointer;width:25px;height:25px;display:block;
8
+}
9
+.ldw img{
10
+    background:transparent url(images/wface.gif?v=1.1) no-repeat scroll left top;
11
+    cursor:pointer;width:35px;height:35px;display:block;
12
+}
13
+.tsj img{
14
+    background:transparent url(images/tface.gif?v=1.1) no-repeat scroll left top;
15
+    cursor:pointer;width:35px;height:35px;display:block;
16
+}
17
+.cat img{
18
+    background:transparent url(images/cface.gif?v=1.1) no-repeat scroll left top;
19
+    cursor:pointer;width:35px;height:35px;display:block;
20
+}
21
+.bb img{
22
+    background:transparent url(images/bface.gif?v=1.1) no-repeat scroll left top;
23
+    cursor:pointer;width:35px;height:35px;display:block;
24
+}
25
+.youa img{
26
+    background:transparent url(images/yface.gif?v=1.1) no-repeat scroll left top;
27
+    cursor:pointer;width:35px;height:35px;display:block;
28
+}
29
+
30
+.smileytable td {height: 37px;}
31
+#tabPanel{margin-left:5px;overflow: hidden;}
32
+#tabContent {float:left;background:#FFFFFF;}
33
+#tabContent div{display: none;width:480px;overflow:hidden;}
34
+#tabIconReview.show{left:17px;display:block;}
35
+.menuFocus{background:#ACCD3C;}
36
+.menuDefault{background:#FFFFFF;}
37
+#tabIconReview{position:absolute;left:406px;left:398px \9;top:41px;z-index:65533;width:90px;height:76px;}
38
+img.review{width:90px;height:76px;border:2px solid #9cb945;background:#FFFFFF;background-position:center;background-repeat:no-repeat;}
39
+
40
+.wrapper .tabbody{position:relative;float:left;clear:both;padding:10px;width: 95%;}
41
+.tabbody table{width: 100%;}
42
+.tabbody td{border:1px solid #BAC498;}
43
+.tabbody td span{display: block;zoom:1;padding:0 4px;}

+ 54 - 0
static/ueditor/dialogs/emotion/emotion.html Vedi File

@@ -0,0 +1,54 @@
1
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
2
+<html xmlns="http://www.w3.org/1999/xhtml">
3
+<head>
4
+    <title></title>
5
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
6
+    <meta name="robots" content="noindex, nofollow"/>
7
+    <script type="text/javascript" src="../internal.js"></script>
8
+    <link rel="stylesheet" type="text/css" href="emotion.css">
9
+</head>
10
+<body>
11
+<div id="tabPanel" class="wrapper">
12
+    <div id="tabHeads" class="tabhead">
13
+        <span><var id="lang_input_choice"></var></span>
14
+        <span><var id="lang_input_Tuzki"></var></span>
15
+        <span><var id="lang_input_lvdouwa"></var></span>
16
+        <span><var id="lang_input_BOBO"></var></span>
17
+        <span><var id="lang_input_babyCat"></var></span>
18
+        <span><var id="lang_input_bubble"></var></span>
19
+        <span><var id="lang_input_youa"></var></span>
20
+    </div>
21
+    <div id="tabBodys" class="tabbody">
22
+        <div id="tab0"></div>
23
+        <div id="tab1"></div>
24
+        <div id="tab2"></div>
25
+        <div id="tab3"></div>
26
+        <div id="tab4"></div>
27
+        <div id="tab5"></div>
28
+        <div id="tab6"></div>
29
+    </div>
30
+</div>
31
+<div id="tabIconReview">
32
+    <img id='faceReview' class='review' src="../../themes/default/images/spacer.gif"/>
33
+</div>
34
+<script type="text/javascript" src="emotion.js"></script>
35
+<script type="text/javascript">
36
+    var emotion = {
37
+        tabNum:7, //切换面板数量
38
+        SmilmgName:{ tab0:['j_00', 84], tab1:['t_00', 40], tab2:['w_00', 52], tab3:['B_00', 63], tab4:['C_00', 20], tab5:['i_f', 50], tab6:['y_00', 40] }, //图片前缀名
39
+        imageFolders:{ tab0:'jx2/', tab1:'tsj/', tab2:'ldw/', tab3:'bobo/', tab4:'babycat/', tab5:'face/', tab6:'youa/'}, //图片对应文件夹路径
40
+        imageCss:{tab0:'jd', tab1:'tsj', tab2:'ldw', tab3:'bb', tab4:'cat', tab5:'pp', tab6:'youa'}, //图片css类名
41
+        imageCssOffset:{tab0:35, tab1:35, tab2:35, tab3:35, tab4:35, tab5:25, tab6:35}, //图片偏移
42
+        SmileyInfor:{
43
+            tab0:['Kiss', 'Love', 'Yeah', '啊!', '背扭', '顶', '抖胸', '88', '汗', '瞌睡', '鲁拉', '拍砖', '揉脸', '生日快乐', '大笑', '瀑布汗~', '惊讶', '臭美', '傻笑', '抛媚眼', '发怒', '打酱油', '俯卧撑', '气愤', '?', '吻', '怒', '胜利', 'HI', 'KISS', '不说', '不要', '扯花', '大心', '顶', '大惊', '飞吻', '鬼脸', '害羞', '口水', '狂哭', '来', '发财了', '吃西瓜', '套牢', '害羞', '庆祝', '我来了', '敲打', '晕了', '胜利', '臭美', '被打了', '贪吃', '迎接', '酷', '微笑', '亲吻', '调皮', '惊恐', '耍酷', '发火', '害羞', '汗水', '大哭', '', '加油', '困', '你NB', '晕倒', '开心', '偷笑', '大哭', '滴汗', '叹气', '超赞', '??', '飞吻', '天使', '撒花', '生气', '被砸', '吓傻', '随意吐'],
44
+            tab1:['Kiss', 'Love', 'Yeah', '啊!', '背扭', '顶', '抖胸', '88', '汗', '瞌睡', '鲁拉', '拍砖', '揉脸', '生日快乐', '摊手', '睡觉', '瘫坐', '无聊', '星星闪', '旋转', '也不行', '郁闷', '正Music', '抓墙', '撞墙至死', '歪头', '戳眼', '飘过', '互相拍砖', '砍死你', '扔桌子', '少林寺', '什么?', '转头', '我爱牛奶', '我踢', '摇晃', '晕厥', '在笼子里', '震荡'],
45
+            tab2:['大笑', '瀑布汗~', '惊讶', '臭美', '傻笑', '抛媚眼', '发怒', '我错了', 'money', '气愤', '挑逗', '吻', '怒', '胜利', '委屈', '受伤', '说啥呢?', '闭嘴', '不', '逗你玩儿', '飞吻', '眩晕', '魔法', '我来了', '睡了', '我打', '闭嘴', '打', '打晕了', '刷牙', '爆揍', '炸弹', '倒立', '刮胡子', '邪恶的笑', '不要不要', '爱恋中', '放大仔细看', '偷窥', '超高兴', '晕', '松口气', '我跑', '享受', '修养', '哭', '汗', '啊~', '热烈欢迎', '打酱油', '俯卧撑', '?'],
46
+            tab3:['HI', 'KISS', '不说', '不要', '扯花', '大心', '顶', '大惊', '飞吻', '鬼脸', '害羞', '口水', '狂哭', '来', '泪眼', '流泪', '生气', '吐舌', '喜欢', '旋转', '再见', '抓狂', '汗', '鄙视', '拜', '吐血', '嘘', '打人', '蹦跳', '变脸', '扯肉', '吃To', '吃花', '吹泡泡糖', '大变身', '飞天舞', '回眸', '可怜', '猛抽', '泡泡', '苹果', '亲', '', '骚舞', '烧香', '睡', '套娃娃', '捅捅', '舞倒', '西红柿', '爱慕', '摇', '摇摆', '杂耍', '招财', '被殴', '被球闷', '大惊', '理想', '欧打', '呕吐', '碎', '吐痰'],
47
+            tab4:['发财了', '吃西瓜', '套牢', '害羞', '庆祝', '我来了', '敲打', '晕了', '胜利', '臭美', '被打了', '贪吃', '迎接', '酷', '顶', '幸运', '爱心', '躲', '送花', '选择'],
48
+            tab5:['微笑', '亲吻', '调皮', '惊讶', '耍酷', '发火', '害羞', '汗水', '大哭', '得意', '鄙视', '困', '夸奖', '晕倒', '疑问', '媒婆', '狂吐', '青蛙', '发愁', '亲吻', '', '爱心', '心碎', '玫瑰', '礼物', '哭', '奸笑', '可爱', '得意', '呲牙', '暴汗', '楚楚可怜', '困', '哭', '生气', '惊讶', '口水', '彩虹', '夜空', '太阳', '钱钱', '灯泡', '咖啡', '蛋糕', '音乐', '爱', '胜利', '赞', '鄙视', 'OK'],
49
+            tab6:['男兜', '女兜', '开心', '乖乖', '偷笑', '大笑', '抽泣', '大哭', '无奈', '滴汗', '叹气', '狂晕', '委屈', '超赞', '??', '疑问', '飞吻', '天使', '撒花', '生气', '被砸', '口水', '泪奔', '吓傻', '吐舌头', '点头', '随意吐', '旋转', '困困', '鄙视', '狂顶', '篮球', '再见', '欢迎光临', '恭喜发财', '稍等', '我在线', '恕不议价', '库房有货', '货在路上']
50
+        }
51
+    };
52
+</script>
53
+</body>
54
+</html>

+ 186 - 0
static/ueditor/dialogs/emotion/emotion.js Vedi File

@@ -0,0 +1,186 @@
1
+window.onload = function () {
2
+    editor.setOpt({
3
+        emotionLocalization:false
4
+    });
5
+
6
+    emotion.SmileyPath = editor.options.emotionLocalization === true ? 'images/' : "http://img.baidu.com/hi/";
7
+    emotion.SmileyBox = createTabList( emotion.tabNum );
8
+    emotion.tabExist = createArr( emotion.tabNum );
9
+
10
+    initImgName();
11
+    initEvtHandler( "tabHeads" );
12
+};
13
+
14
+function initImgName() {
15
+    for ( var pro in emotion.SmilmgName ) {
16
+        var tempName = emotion.SmilmgName[pro],
17
+                tempBox = emotion.SmileyBox[pro],
18
+                tempStr = "";
19
+
20
+        if ( tempBox.length ) return;
21
+        for ( var i = 1; i <= tempName[1]; i++ ) {
22
+            tempStr = tempName[0];
23
+            if ( i < 10 ) tempStr = tempStr + '0';
24
+            tempStr = tempStr + i + '.gif';
25
+            tempBox.push( tempStr );
26
+        }
27
+    }
28
+}
29
+
30
+function initEvtHandler( conId ) {
31
+    var tabHeads = $G( conId );
32
+    for ( var i = 0, j = 0; i < tabHeads.childNodes.length; i++ ) {
33
+        var tabObj = tabHeads.childNodes[i];
34
+        if ( tabObj.nodeType == 1 ) {
35
+            domUtils.on( tabObj, "click", (function ( index ) {
36
+                return function () {
37
+                    switchTab( index );
38
+                };
39
+            })( j ) );
40
+            j++;
41
+        }
42
+    }
43
+    switchTab( 0 );
44
+    $G( "tabIconReview" ).style.display = 'none';
45
+}
46
+
47
+function InsertSmiley( url, evt ) {
48
+    var obj = {
49
+        src:editor.options.emotionLocalization ? editor.options.UEDITOR_HOME_URL + "dialogs/emotion/" + url : url
50
+    };
51
+    obj._src = obj.src;
52
+    editor.execCommand( 'insertimage', obj );
53
+    if ( !evt.ctrlKey ) {
54
+        dialog.popup.hide();
55
+    }
56
+}
57
+
58
+function switchTab( index ) {
59
+
60
+    autoHeight( index );
61
+    if ( emotion.tabExist[index] == 0 ) {
62
+        emotion.tabExist[index] = 1;
63
+        createTab( 'tab' + index );
64
+    }
65
+    //获取呈现元素句柄数组
66
+    var tabHeads = $G( "tabHeads" ).getElementsByTagName( "span" ),
67
+            tabBodys = $G( "tabBodys" ).getElementsByTagName( "div" ),
68
+            i = 0, L = tabHeads.length;
69
+    //隐藏所有呈现元素
70
+    for ( ; i < L; i++ ) {
71
+        tabHeads[i].className = "";
72
+        tabBodys[i].style.display = "none";
73
+    }
74
+    //显示对应呈现元素
75
+    tabHeads[index].className = "focus";
76
+    tabBodys[index].style.display = "block";
77
+}
78
+
79
+function autoHeight( index ) {
80
+    var iframe = dialog.getDom( "iframe" ),
81
+            parent = iframe.parentNode.parentNode;
82
+    switch ( index ) {
83
+        case 0:
84
+            iframe.style.height = "380px";
85
+            parent.style.height = "392px";
86
+            break;
87
+        case 1:
88
+            iframe.style.height = "220px";
89
+            parent.style.height = "232px";
90
+            break;
91
+        case 2:
92
+            iframe.style.height = "260px";
93
+            parent.style.height = "272px";
94
+            break;
95
+        case 3:
96
+            iframe.style.height = "300px";
97
+            parent.style.height = "312px";
98
+            break;
99
+        case 4:
100
+            iframe.style.height = "140px";
101
+            parent.style.height = "152px";
102
+            break;
103
+        case 5:
104
+            iframe.style.height = "260px";
105
+            parent.style.height = "272px";
106
+            break;
107
+        case 6:
108
+            iframe.style.height = "230px";
109
+            parent.style.height = "242px";
110
+            break;
111
+        default:
112
+
113
+    }
114
+}
115
+
116
+
117
+function createTab( tabName ) {
118
+    var faceVersion = "?v=1.1", //版本号
119
+            tab = $G( tabName ), //获取将要生成的Div句柄
120
+            imagePath = emotion.SmileyPath + emotion.imageFolders[tabName], //获取显示表情和预览表情的路径
121
+            positionLine = 11 / 2, //中间数
122
+            iWidth = iHeight = 35, //图片长宽
123
+            iColWidth = 3, //表格剩余空间的显示比例
124
+            tableCss = emotion.imageCss[tabName],
125
+            cssOffset = emotion.imageCssOffset[tabName],
126
+            textHTML = ['<table class="smileytable">'],
127
+            i = 0, imgNum = emotion.SmileyBox[tabName].length, imgColNum = 11, faceImage,
128
+            sUrl, realUrl, posflag, offset, infor;
129
+
130
+    for ( ; i < imgNum; ) {
131
+        textHTML.push( '<tr>' );
132
+        for ( var j = 0; j < imgColNum; j++, i++ ) {
133
+            faceImage = emotion.SmileyBox[tabName][i];
134
+            if ( faceImage ) {
135
+                sUrl = imagePath + faceImage + faceVersion;
136
+                realUrl = imagePath + faceImage;
137
+                posflag = j < positionLine ? 0 : 1;
138
+                offset = cssOffset * i * (-1) - 1;
139
+                infor = emotion.SmileyInfor[tabName][i];
140
+
141
+                textHTML.push( '<td  class="' + tableCss + '"   border="1" width="' + iColWidth + '%" style="border-collapse:collapse;" align="center"  bgcolor="transparent" onclick="InsertSmiley(\'' + realUrl.replace( /'/g, "\\'" ) + '\',event)" onmouseover="over(this,\'' + sUrl + '\',\'' + posflag + '\')" onmouseout="out(this)">' );
142
+                textHTML.push( '<span>' );
143
+                textHTML.push( '<img  style="background-position:left ' + offset + 'px;" title="' + infor + '" src="' + emotion.SmileyPath + (editor.options.emotionLocalization ? '0.gif" width="' : 'default/0.gif" width="') + iWidth + '" height="' + iHeight + '"></img>' );
144
+                textHTML.push( '</span>' );
145
+            } else {
146
+                textHTML.push( '<td width="' + iColWidth + '%"   bgcolor="#FFFFFF">' );
147
+            }
148
+            textHTML.push( '</td>' );
149
+        }
150
+        textHTML.push( '</tr>' );
151
+    }
152
+    textHTML.push( '</table>' );
153
+    textHTML = textHTML.join( "" );
154
+    tab.innerHTML = textHTML;
155
+}
156
+
157
+function over( td, srcPath, posFlag ) {
158
+    td.style.backgroundColor = "#ACCD3C";
159
+    $G( 'faceReview' ).style.backgroundImage = "url(" + srcPath + ")";
160
+    if ( posFlag == 1 ) $G( "tabIconReview" ).className = "show";
161
+    $G( "tabIconReview" ).style.display = 'block';
162
+}
163
+
164
+function out( td ) {
165
+    td.style.backgroundColor = "transparent";
166
+    var tabIconRevew = $G( "tabIconReview" );
167
+    tabIconRevew.className = "";
168
+    tabIconRevew.style.display = 'none';
169
+}
170
+
171
+function createTabList( tabNum ) {
172
+    var obj = {};
173
+    for ( var i = 0; i < tabNum; i++ ) {
174
+        obj["tab" + i] = [];
175
+    }
176
+    return obj;
177
+}
178
+
179
+function createArr( tabNum ) {
180
+    var arr = [];
181
+    for ( var i = 0; i < tabNum; i++ ) {
182
+        arr[i] = 0;
183
+    }
184
+    return arr;
185
+}
186
+

BIN
static/ueditor/dialogs/emotion/images/0.gif Vedi File


BIN
static/ueditor/dialogs/emotion/images/bface.gif Vedi File


BIN
static/ueditor/dialogs/emotion/images/cface.gif Vedi File


BIN
static/ueditor/dialogs/emotion/images/fface.gif Vedi File


BIN
static/ueditor/dialogs/emotion/images/jxface2.gif Vedi File


BIN
static/ueditor/dialogs/emotion/images/neweditor-tab-bg.png Vedi File


BIN
static/ueditor/dialogs/emotion/images/tface.gif Vedi File


BIN
static/ueditor/dialogs/emotion/images/wface.gif Vedi File


BIN
static/ueditor/dialogs/emotion/images/yface.gif Vedi File


+ 89 - 0
static/ueditor/dialogs/gmap/gmap.html Vedi File

@@ -0,0 +1,89 @@
1
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2
+        "http://www.w3.org/TR/html4/loose.dtd">
3
+<html>
4
+<head>
5
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+    <title></title>
7
+    <script type="text/javascript" src="../internal.js"></script>
8
+    <style type="text/css">
9
+        .content{width:530px; height: 350px;margin: 10px auto;}
10
+        .content table{width: 100%}
11
+        .content table td{vertical-align: middle;}
12
+        #address{width:220px;height:21px;background: #FFF;border:1px solid #d7d7d7; line-height: 21px;}
13
+    </style>
14
+    <script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false"></script>
15
+</head>
16
+<body>
17
+<div class="content">
18
+    <table>
19
+        <tr>
20
+            <td><label for="address"><var id="lang_input_address"></var></label></td>
21
+            <td><input id="address" type="text" /></td>
22
+            <td><a id="doSearch" href="javascript:void(0)" class="button"><var id="lang_input_search"></var></a></td>
23
+        </tr>
24
+    </table>
25
+    <div id="container" style="width: 100%; height: 340px;margin: 5px auto; border: 1px solid gray;"></div>
26
+</div>
27
+<script type="text/javascript">
28
+    domUtils.on(window,"load",function(){
29
+        var map = new google.maps.Map(document.getElementById('container'), {
30
+                zoom: 3,
31
+                streetViewControl: false,
32
+                scaleControl: true,
33
+                mapTypeId: google.maps.MapTypeId.ROADMAP
34
+            });
35
+            var imgcss;
36
+            var marker = new google.maps.Marker({
37
+                map: map,
38
+                draggable: true
39
+            });
40
+            function doSearch(){
41
+                var address = document.getElementById('address').value;
42
+                var geocoder = new google.maps.Geocoder();
43
+                geocoder.geocode( { 'address': address}, function (results, status) {
44
+                    if (status == google.maps.GeocoderStatus.OK) {
45
+                        var bounds = results[0].geometry.viewport;
46
+                        map.fitBounds(bounds);
47
+                        marker.setPosition(results[0].geometry.location);
48
+                        marker.setTitle(address);
49
+                    } else alert(lang.searchError);
50
+                });
51
+            }
52
+            $G('address').onkeydown = function (evt){
53
+                evt = evt || event;
54
+                if (evt.keyCode == 13) {
55
+                    doSearch();
56
+                }
57
+            };
58
+            $G("doSearch").onclick = doSearch;
59
+            dialog.onok = function (){
60
+                var center = map.getCenter();
61
+                var point = marker.getPosition();
62
+                var url = "http://maps.googleapis.com/maps/api/staticmap?center=" + center.lat() + ',' + center.lng() + "&zoom=" + map.zoom + "&size=520x340&maptype=" + map.getMapTypeId() + "&markers=" + point.lat() + ',' + point.lng() + "&sensor=false";
63
+                editor.execCommand('inserthtml', '<img width="520" height="340" src="' + url + '"' + (imgcss ? ' style="' + imgcss + '"' :'') + '/>');
64
+            };
65
+
66
+            function getPars(str,par){
67
+                var reg = new RegExp(par+"=((\\d+|[.,])*)","g");
68
+                return reg.exec(str)[1];
69
+            }
70
+            var img = editor.selection.getRange().getClosedNode();
71
+            if(img && img.src.indexOf("http://maps.googleapis.com/maps/api/staticmap")!=-1){
72
+                var url = img.getAttribute("src");
73
+                var centers = getPars(url,"center").split(",");
74
+                point = new google.maps.LatLng(Number(centers[0]),Number(centers[1]));
75
+                map.setCenter(point);
76
+                map.setZoom(Number(getPars(url,"zoom")));
77
+                centers = getPars(url,"markers").split(",");
78
+                marker.setPosition(new google.maps.LatLng(Number(centers[0]),Number(centers[1])));
79
+                imgcss = img.style.cssText;
80
+            }else{
81
+                setTimeout(function(){
82
+                    doSearch();
83
+                },30)
84
+            }
85
+    });
86
+
87
+</script>
88
+</body>
89
+</html>

+ 0 - 0
static/ueditor/dialogs/help/help.css Vedi File


Some files were not shown because too many files changed in this diff