Browse Source

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

28169 1 year ago
parent
commit
3095d7c99c

+ 9 - 9
src/router/modules/workforce.js View File

@@ -56,15 +56,15 @@ export default {
56 56
       noCache: true
57 57
     }
58 58
   },
59
-  // {//患者调班
60
-  //   path: '/workforce/Patientshift',
61
-  //   component: () => import('@/xt_pages/workforce/Patientshift'),
62
-  //   name: '患者调班',
63
-  //   meta: {
64
-  //     title: '患者调班',
65
-  //     noCache: true
66
-  //   }
67
-  // },
59
+  {//患者调班
60
+    path: '/workforce/Patientshift',
61
+    component: () => import('@/xt_pages/workforce/Patientshift'),
62
+    name: '患者调班',
63
+    meta: {
64
+      title: '患者调班',
65
+      noCache: true
66
+    }
67
+  },
68 68
   {
69 69
     path: '/workforce/schedule/printone',
70 70
     component: () => import('@/xt_pages/workforce/printOne'),

+ 1 - 1
src/xt_pages/outpatientDoctorStation/template/prinSeven.vue View File

@@ -129,7 +129,7 @@
129 129
                   
130 130
                   <div style="margin-left: 70px">
131 131
                     用法:
132
-                    <span v-if="(item.arr.length>0 && item.arr[0][0].groupno!=it.groupno)||arr.length<0">{{ it.single_dose }}{{ it.single_dose_unit }}</span>
132
+                    <span v-if="(item.arr.length>0 && item.arr[0][0].groupno!=it.groupno)||item.arr.length==0">{{ it.single_dose }}{{ it.single_dose_unit }}</span>
133 133
                     &nbsp;&nbsp;<span>
134 134
                       {{ it.execution_frequency }}&nbsp;{{
135 135
                         it.delivery_way

+ 54 - 42
src/xt_pages/user/Sitemap.vue View File

@@ -59,15 +59,19 @@
59 59
 
60 60
             <!-- 穿刺文字 @mousedown="mousedown($event)"   active  @mousedown="startDrag"   @mousedown="A_mousedow($event)" @mouseup="A_moouseup($event)" left:text_left+'px',top:text_top+'px',-->
61 61
             <!-- <div   
62
-            >  -->
62
+            >  width:(item.width + 10)+'px',-->
63 63
               <div v-for="(item,index) in text_arr" :key="index" class="add-mark-text-wrap active text" id="text" @mousedown="mousedown($event)"
64
-              :style="{width:(item.width + 10)+'px',left:item.left+'px',top:item.top+'px','font-size':14+'px', position: 'absolute'}"
64
+              :style="{width: 'fit-content',left:item.left+'px',top:item.top+'px','font-size':14+'px', position: 'absolute'}"
65 65
               > 
66
-                <!-- <div  style="width:82px;left:62.17%;top:39.00%;display: inline-block;" @mousedown="A_mousedow($event)" @mouseup="A_moouseup($event)">position: 'absolute',top: 36+'%',left: 48+'%' -->
67
-                  <!-- {{ item }} @mousedown.self="A_mousedow($event)" @mouseup.self="A_moouseup($event)"-->
66
+              <!-- <el-input v-model="item.text" class="inputStyle">
67
+                <template slot="prefix">
68
+                  {{ item.text }}
69
+                </template>
70
+              </el-input> -->
71
+
68 72
                   <!-- <el-input v-model:value="item.text" size="mini" :style="{width:item.width+'px', border: 1+'px solid transparent', cursor: 'default'}"></el-input> -->
69 73
                   <!-- <input id="inpu" type="text" :value="item.text" data-width="82" :style="{width:item.width+'px', border: 1+'px solid transparent', cursor: 'default',outline: 'none'}" class="mark-text-ipt"> -->
70
-                  <input id="inpu" type="text" v-model="item.text" data-width="82" :style="{width:item.width+'px', border: 1+'px solid transparent', cursor: 'default',outline: 'none'}" class="mark-text-ipt">
74
+                  <input id="inpu" type="text" @input="changewidth" v-model="item.text" data-width="82" :style="{width:'fit-content', border: 1+'px solid transparent', cursor: 'default',outline: 'none'}" class="mark-text-ipt">
71 75
                   <!-- <input v-if="value!=''" id="inpu" type="text" v-model="value" data-width="82" :style="{width:item.width+'px', border: 1+'px solid transparent', cursor: 'default',outline: 'none'}" class="mark-text-ipt"> -->
72 76
                   <!-- </div> -->
73 77
                 <span class="remove-mark-text" @click="input_deldte($event,item)">×</span>
@@ -248,6 +252,9 @@
248 252
       width="50%"
249 253
       center>
250 254
       <div>
255
+        <div @click="dayin">
256
+          <el-button type="primary" @click="dayin">打印</el-button>
257
+        </div>
251 258
         <div id="print_img">
252 259
           <div class="parint_content">
253 260
             <!-- <div> -->
@@ -261,31 +268,16 @@
261 268
               
262 269
               <div style="width: 530px;margin: 20px auto;">
263 270
                 <img :src="imgUrls" alt="" srcset="">
264
-                <!-- <img v-if="fileList.length==0" id="ossPointMarkImg" src="@/assets/evaluate/xgtl_default.png" alt="" srcset="">
265
-                <div v-for="(item,indexa) in Aarr" :key="indexa">
266
-                  <div v-if="item.status==2" title="长按右键调整线条角度" class="mark-target mark-target-a mark-target-a1" data-num="1" id="mark-target-a"
267
-                      :style="{left:item.left+'px', top:item.top+'px', cursor: 'move',position: 'absolute'}"
268
-                      @mousedown.self="A_mousedow($event)" @mouseup.self="A_moouseup($event)">{{item.markNum}}
269
-                    <span class="mark-line mark-line-a" style="transform: rotate(160deg);" data-rotate="160"></span>
270
-                  </div>
271
-                </div>
272
-
273
-                <div v-for="(item,indexv) in Varr" :key="indexv">
274
-                  <div v-if="item.status==2" title="长按右键调整线条角度" class="mark-target mark-target-v mark-target-v1" data-num="1" id="mark-target-v"
275
-                        :style="{left: item.left+'px', top: item.top+'px', cursor: 'move', position: 'absolute'}"
276
-                        @mousedown="A_mousedow($event)" @mouseup="A_moouseup($event)">{{item.markNum}}
277
-                    <span class="mark-line mark-line-v" style="transform: rotate(20deg);" data-rotate="20"></span>
278
-                  </div>
279
-                </div> -->
271
+                
280 272
               </div>
281 273
             <!-- </div> -->
282 274
           </div>
283 275
         </div>
284 276
       </div>
285
-      <span slot="footer" class="dialog-footer">
277
+      <!-- <span slot="footer" class="dialog-footer">
286 278
         <el-button @click="dayinDialogVisible = false">取 消</el-button>
287 279
         <el-button type="primary" @click="dayin">确 定</el-button>
288
-      </span>
280
+      </span> -->
289 281
     </el-dialog>
290 282
   </div>
291 283
 </template>
@@ -382,6 +374,7 @@ export default{
382 374
       imgUrls:'',
383 375
       patients:{},
384 376
       date:moment(new Date()).format("YYYY-MM-DD"),
377
+      widthtext:null,
385 378
     }
386 379
   },
387 380
   created(){
@@ -653,7 +646,6 @@ export default{
653 646
       console.log('event',e,'value',this.value);
654 647
       const text=e.target
655 648
       const textlen=this.text_arr.length
656
-
657 649
       if(text.innerText == val.text){
658 650
         this.text_num=2
659 651
        const obj={text:'',left:'',top:'',width:''}
@@ -662,6 +654,7 @@ export default{
662 654
        obj.left=this.text_left
663 655
        obj.top=this.text_top+(textlen*30)
664 656
        obj.width=e.target.offsetWidth
657
+      // obj.width= this.widthtext
665 658
         this.text_arr.push(obj)
666 659
       }
667 660
 
@@ -770,30 +763,17 @@ export default{
770 763
       }
771 764
     },
772 765
     printtup(){
773
-      if(this.id==0){
774
-        this.$message('请先保存');
775
-      }else{
766
+      // if(this.id==0){
767
+      //   this.$message('请先保存');
768
+      // }else{
776 769
       this.dayinDialogVisible = true
777
-      }
770
+      // }
778 771
       html2canvas(this.$refs.imageWrapper,{backgroundColor: null}).then(canvas => {
779 772
         // 转成图片,生成图片地址
780 773
         this.imgUrls = canvas.toDataURL("image/png");
781 774
         // console.log('123424534',this.imgUrls)
782 775
       });
783
-      // const style='@media print{.print_main_content{#ossPointMarkImg {width: 520px;min-height: 600px;height: auto;border-radius: 2px;pointer-events: none;} #point_mark_img_wrap1 {-webkit-user-select: none;-moz-user-select: none;-ms-user-select: none;user-select: none;position: relative;padding: 4px;width: 600px;background-color: #fff;border: 1px solid #ddd;border-radius: 4px;} 
784
-       
785
-      // div.add-mark-text-wrap {position: absolute;top: 36%;left: 48%;border-radius: 4px;width: 60px;height: 24px;line-height: 24px;z-index: 1005;display: inline-block;} .remove-mark-text{overflow: hidden;} b.xtgl-ccz-arrow-a {border-left-color: #E73535;border-top-color: #E73535;} b.xtgl-ccz-arrow-v {border-left-color: #35a2e7;border-top-color: #35a2e7;} b.xtgl-ccz-arrow {position: absolute;width: 7px;height: 7px;border-left-width: 2px;border-left-style: solid;border-top-width: 2px;border-top-style: solid;top: -3px;right: 0;transform: rotate(138deg);} b.xtgl-ccz-arrow-v {border-left-color: #35a2e7;border-top-color: #35a2e7;}div.frame-image {position: absolute;overflow: hidden;top: 0px;left: 0px;width: 100%;height: 100%;background-image: url('+'../../assets/evaluate/tool-a.png'+');background-position: center center;background-size: 100%; background-repeat: no-repeat;}}}'
786
-      // // // const style='@media print{.print_main_content{#ossPointMarkImg {width: 100%;min-height: 600px;height: auto;border-radius: 2px;pointer-events: none;} #point_mark_img_wrap1 {-webkit-user-select: none;-moz-user-select: none;-ms-user-select: none;user-select: none;position: relative;padding: 4px;width: 600px;background-color: #fff;border: 1px solid #ddd;border-radius: 4px;}  b.xtgl-ccz-arrow-a {border-left-color: #E73535;border-top-color: #E73535;}
787
-      // // b.xtgl-ccz-arrow {position: absolute;width: 7px;height: 7px;border-left-width: 2px;border-left-style: solid;border-top-width: 2px;border-top-style: solid;top: -3px;right: 0;transform: rotate(138deg);} b.xtgl-ccz-arrow-v {border-left-color: #35a2e7;border-top-color: #35a2e7;}
788
-      // // .mark-target-a{background: #E73535;top: 40px;left: 40px;} .mark-line{background: #E73535;}}}'
789
-      // // const style='@media print{.print_main_content{#ossPointMarkImg {width: 100%;min-height: 600px;height: auto;border-radius: 2px;pointer-events: none;} #point_mark_img_wrap1 {-webkit-user-select: none;-moz-user-select: none;-ms-user-select: none;user-select: none;position: relative;padding: 4px;width: 600px;background-color: #fff;border: 1px solid #ddd;border-radius: 4px;} .mark-target-a{background: #E73535;top: 40px; left: 40px;} .mark-line{background: #E73535;} .mark-target-v{background: rgb(53,162,231);.mark-line{background: #35A2E7;}}  .mark-target-a,.mark-target-v {position: absolute;z-index: 1001;width: 26px;border-radius: 13px;height: 26px;text-align: center;line-height: 26px;font-size: 18px;cursor: move;color: rgb(255,255,255);.mark-line {transform: rotate(160deg);transform-origin: left bottom;}.mark-line {display: inline-block;position: absolute;left: 50%;top: 50%;width: 86px;height: 1px;cursor: default;z-index: -1;} div.add-mark-text-wrap {position: absolute;top: 36%;left: 48%;border-radius: 4px;width: 60px;height: 24px;line-height: 24px;z-index: 1005;display: inline-block;} input {width: 100px;width: 60px;max-width: 400px;border: 1px solid transparent;padding: 4px;color: #333;height: 24px;cursor: pointer;background-color: #fcfcfc;position: absolute;left: 0;top: 0;font-size: 13px;z-index: 1002;border-radius: 2px !important;outline: none;}.mark-text-ipt {cursor: default;}}}}'
790
-
791
-      // printJS({
792
-      //   printable: "print_mark_img",
793
-      //   type: "html",
794
-      //   style: style,
795
-      //   scanStyles: false
796
-      // });
776
+     
797 777
       
798 778
     },
799 779
     // 打印
@@ -1256,6 +1236,12 @@ export default{
1256 1236
         u8arr[n] = bstr.charCodeAt(n);
1257 1237
       }
1258 1238
       return new Blob([u8arr], { type: mime });
1239
+    },
1240
+    changewidth(){
1241
+      // let input = document.getElementById("inpu");
1242
+      // const l = input.value.length;
1243
+      // this.widthtext=(l+1) * 15 + "px"
1244
+      // input.style.width = (l+1) * 15 + "px"; 
1259 1245
     }
1260 1246
   },
1261 1247
   created(){
@@ -1649,6 +1635,32 @@ span.chuanci:hover{
1649 1635
     opacity: 0;
1650 1636
     z-index: -1;
1651 1637
 }
1638
+// .inputStyle {
1639
+//   margin-top: 30px;
1640
+//   text-align: start;    // 这里一样要设置,否则不是对齐的居中状态
1641
+//   min-width: 160px;   //这里给一个最小宽度
1642
+// }
1643
+// .el-input {
1644
+//    width: auto;  // 这里一定要设置为auto 否则由于input是默认width :100%的
1645
+// }
1646
+// .inputStyle >>> .el-input__prefix {
1647
+//   display: inline-block;
1648
+//   position: relative;
1649
+//   border: 1px solid #dcdfe6;
1650
+//   box-sizing: border-box;
1651
+//   color: #606266;
1652
+//   font-size: inherit;
1653
+//   height: 40px;
1654
+//   line-height: 40px;
1655
+//   padding: 0 30px;
1656
+//   transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
1657
+//   padding-left: 30px;
1658
+//   left: 0;
1659
+//   visibility: hidden;
1660
+// }
1661
+// .inputStyle >>> .el-input__inner {
1662
+//   position: absolute;
1663
+// }
1652 1664
 </style>
1653 1665
 <style lang="scss">
1654 1666
 .ql-snow .ql-tooltip[data-mode="link"]::before {

+ 909 - 0
src/xt_pages/workforce/Patientshift.vue View File

@@ -0,0 +1,909 @@
1
+<template>
2
+  <div class="main-contain">
3
+    <div class="position">
4
+      <bread-crumb :crumbs="crumbs" style="flex:1;"></bread-crumb>
5
+    </div>
6
+    <div class="app-container" style="background-color: white">
7
+      <div id="print_content">
8
+        <div style="margin: 20px 0;">
9
+          <div class="content_top">日期:
10
+            <el-date-picker
11
+              @change="date_picker"
12
+              v-model="date"
13
+              type="date"
14
+              placeholder="选择日期">
15
+            </el-date-picker>
16
+          </div>
17
+          <div class="content_top">排班班次:
18
+            <el-select v-model="classes" placeholder="请选择" @change="banci_select">
19
+              <el-option
20
+                v-for="item in schedulArr"
21
+                :key="item.value"
22
+                :label="item.label"
23
+                :value="item.value">
24
+              </el-option>
25
+            </el-select>
26
+          </div>
27
+          <div class="content_top">病区选择:
28
+            <el-select v-model="bingqu" placeholder="请选择" @change="bingqu_select">
29
+              <el-option
30
+                v-for="item in partitionArr"
31
+                :key="item.value"
32
+                :label="item.name"
33
+                :value="item.id">
34
+              </el-option>
35
+            </el-select>
36
+          </div>
37
+          <div class="content_top">隐藏备注:
38
+            <el-switch
39
+              v-model="value"
40
+              active-color="#13ce66"
41
+              inactive-color="#ff4949"
42
+              active-text="ON"
43
+              inactive-text="OFF">
44
+            </el-switch>
45
+          </div>
46
+        </div>
47
+        <div class="table_panel"  v-for="(item, index) in tableData" :key="index">
48
+          <table class="table">
49
+            <thead>
50
+              <tr>
51
+                <td :width="td_1_width">分区</td>
52
+                <td :width="td_3_width">病人姓名</td>
53
+              </tr>
54
+            </thead>
55
+            <tbody>
56
+              <tr v-for="(ite,index) in item.zones" :key="index">
57
+                <td style="text-align: center;">{{ getZoneName(ite.partition_id) }}</td>
58
+                <td>
59
+                  <template  v-for="(it,index) in item.list">
60
+                  <div  v-if="ite.partition_id==it.partition_id" class="huanzhekuai"  style="" @dblclick="db_click">                    
61
+                    <div style="max-height: 110px; margin-top: 10px;margin-bottom: 5px;background: rgb(74 197 235);" @dragstart.self="curInfoDragStart($event,it)" @drop.self="drop($event,it)" @dragover="allowDrop" draggable="true" >
62
+                      <span>{{ it.name }}({{ getmode(it.mode_id) }})</span><br>
63
+                      <div v-if="value" >
64
+                        <span style="font-size: 14px;color: rgb(12, 185, 50);margin-bottom: 5px;">{{it.order.DeviceNumber.zone.name}}-{{it.order.DeviceNumber.number}}</span><br>
65
+                        <span style="font-size: 14px;color:orange;margin-bottom: 5px;">{{getBloodAccess(it.order.blood_access_id)}}</span><br>
66
+                        <span style="font-size: 13px;color:rgb(102, 13, 161);margin-bottom: 5px;">{{it.order.schedule_remark}}</span>
67
+                      </div> 
68
+                    </div>
69
+                    
70
+                  </div>
71
+                  </template>
72
+                </td>
73
+              </tr>
74
+            </tbody>
75
+          </table>
76
+          
77
+        </div>
78
+        <!-- 双击弹窗 -->
79
+        <el-dialog
80
+          title="提示"
81
+          :visible.sync="centerDialogVisible"
82
+          width="30%"
83
+          center>
84
+          <div>
85
+            <div style="display: flex;">
86
+              <div style="width:300px;margin-right: 10px;">
87
+                <div style="margin: 10px 0;">分区
88
+                  <el-select v-model="fenqu_dialog" placeholder="请选择">
89
+                    <el-option
90
+                      v-for="item in options"
91
+                      :key="item.value"
92
+                      :label="item.label"
93
+                      :value="item.value">
94
+                    </el-option>
95
+                  </el-select>
96
+                </div>
97
+                <div>床位
98
+                  <el-select v-model="chuangwei" placeholder="请选择">
99
+                    <el-option
100
+                      v-for="item in options"
101
+                      :key="item.value"
102
+                      :label="item.label"
103
+                      :value="item.value">
104
+                    </el-option>
105
+                  </el-select>
106
+                </div>
107
+              </div>
108
+              <div style="width:200px">
109
+                <div style="margin-top: 10px;margin-bottom: 5px;background: rgb(74 197 235);height: 110px;width: 125px;text-align: center;">
110
+                  <span >周建(HD)</span><br>
111
+                  <span style="font-size: 14px;color: rgb(12, 185, 50);margin-bottom: 5px;">A1区-6号床</span><br>
112
+                  <span style="font-size: 14px;color:orange;margin-bottom: 5px;">颈部长期置管</span><br>
113
+                  <span style="font-size: 13px;color:rgb(102, 13, 161);margin-bottom: 5px;">不睡7区,下机动脉用纱布压。用德朗</span>
114
+                </div>
115
+              </div>
116
+            </div>
117
+          </div>
118
+          <span slot="footer" class="dialog-footer">
119
+            <el-button @click="centerDialogVisible = false">取 消</el-button>
120
+            <el-button type="primary" @click="centerDialogVisible = false">确 定</el-button>
121
+          </span>
122
+        </el-dialog>
123
+          <!-- 排班替换/交换提示弹窗 -->
124
+        <el-dialog
125
+          title="提示"
126
+          :visible.sync="tipDialogVisible"
127
+          width="300px"
128
+          :modal-append-to-body='false'
129
+          :close-on-click-modal="false"
130
+        >
131
+          <div>
132
+            所选位置已有排班,请选择操作
133
+          </div>
134
+          <span slot="footer" class="dialog-footer">
135
+            <el-button
136
+              type="danger"
137
+              @click="tipDialogVisibleTwo = true"
138
+            >替换</el-button>
139
+                <el-button
140
+                  type="primary"
141
+                  @click="tipDialogVisibleThree = true"
142
+                >交换</el-button>
143
+            <el-button @click="tipDialogVisible = false">取 消</el-button>
144
+          </span>
145
+        </el-dialog>
146
+        <!-- 排班替换   -->
147
+        <el-dialog
148
+          title="提示"
149
+          :visible.sync="tipDialogVisibleTwo"
150
+          width="300px"
151
+          class="replace"
152
+          :modal-append-to-body='false'
153
+          :close-on-click-modal="false"
154
+        >
155
+          <div>
156
+            是否将此位置排班替换
157
+          </div>
158
+          <span slot="footer" class="dialog-footer">
159
+            <el-button
160
+              type="primary"
161
+              @click="coverSch()"
162
+            >确定</el-button>
163
+
164
+            <el-button @click="tipDialogVisibleTwo = false">取 消</el-button>
165
+          </span>
166
+        </el-dialog>
167
+        <!-- 将此位置排班互换  -->
168
+        <el-dialog
169
+          title="提示"
170
+          :visible.sync="tipDialogVisibleThree"
171
+          width="300px"
172
+          class="exchange"
173
+          :modal-append-to-body='false'
174
+          :close-on-click-modal="false"
175
+        >
176
+          <div>
177
+            是否将此位置排班互换
178
+          </div>
179
+          <span slot="footer" class="dialog-footer">
180
+            <el-button
181
+              type="primary"
182
+              @click="changeSchTwo()"
183
+            >确定</el-button>
184
+            <el-button @click="tipDialogVisibleThree = false">取 消</el-button>
185
+          </span>
186
+        </el-dialog>
187
+      </div>
188
+    </div>
189
+  </div>
190
+</template>
191
+
192
+<script>
193
+import { GetAllZone, getSchedualPrintList } from '@/api/dialysis'
194
+import { parseTime } from '@/utils'
195
+import { uParseTime } from '@/utils/tools'
196
+import { getDataConfig } from '@/utils/data'
197
+import {getSchedulesOne  } from "@/api/schedule";
198
+import {CoverSch,ExchangeSch,} from "@/api/schedule_template/sch_template";
199
+import BreadCrumb from '@/xt_pages/components/bread-crumb'
200
+import print from 'print-js'
201
+const moment = require('moment')
202
+// import {getAllZones} from "@/api/schedule"
203
+export default {
204
+  name: 'SchedulePrint',
205
+  data() {
206
+    return {
207
+      crumbs: [
208
+        { path: false, name: '排班管理' },
209
+        { path: false, name: '患者调班' }
210
+      ],
211
+      tipDialogVisible:false,
212
+      tipDialogVisibleTwo:false,
213
+      tipDialogVisibleThree:false,
214
+      value: false,
215
+      td_1_width: '8%',
216
+      td_3_width: '90%',
217
+      date:'',
218
+      classes:1,
219
+      bingqu:0,
220
+      chuangwei:'',
221
+      fenqu:'',
222
+      fenqu_dialog:'',
223
+      chuangwei:'',
224
+      options:[],
225
+      centerDialogVisible:false,
226
+      cur_drag_info:{
227
+        id:'',
228
+        name:'',
229
+        quhao:'',
230
+       chaung:'',
231
+      },
232
+      currentData:{
233
+        currentData_id:'',
234
+        currentData_name:'',
235
+        currentData_quhao:'',
236
+        currentData_chaung:'',
237
+      },
238
+      schedulArr: [
239
+        { value: 1, label: "上午" },
240
+        { value: 2, label: "下午" },
241
+        { value: 3, label: "晚上" }
242
+      ],
243
+      zones:[],
244
+      schedules: [
245
+        {
246
+          day: 1,
247
+          weekday: '星期一',
248
+          all: {
249
+            am: {
250
+              /* zone_name: [ schedule, ... ] */
251
+            },
252
+            pm: {
253
+              /* zone_name: [ schedule, ... ] */
254
+            },
255
+            evening: {
256
+              /* zone_name: [ schedule, ... ] */
257
+            }
258
+          },
259
+          hdf: [
260
+            /* schedule, ... */
261
+          ],
262
+          hd_hp: [
263
+            /* schedule, ... */
264
+          ],
265
+
266
+          new_hdf: {
267
+            am: {
268
+              /* zone_name: [ schedule, ... ] */
269
+            },
270
+            pm: {
271
+              /* zone_name: [ schedule, ... ] */
272
+            },
273
+            evening: {
274
+              /* zone_name: [ schedule, ... ] */
275
+            }
276
+          },
277
+          new_hd_hp: {
278
+            am: {
279
+              /* zone_name: [ schedule, ... ] */
280
+            },
281
+            pm: {
282
+              /* zone_name: [ schedule, ... ] */
283
+            },
284
+            evening: {
285
+              /* zone_name: [ schedule, ... ] */
286
+            }
287
+          }
288
+        },
289
+        {
290
+          day: 2,
291
+          weekday: '星期二',
292
+          all: {
293
+            am: {
294
+              /* zone_name: [ schedule, ... ] */
295
+            },
296
+            pm: {
297
+              /* zone_name: [ schedule, ... ] */
298
+            },
299
+            evening: {
300
+              /* zone_name: [ schedule, ... ] */
301
+            }
302
+          },
303
+          hdf: [
304
+            /* schedule, ... */
305
+          ],
306
+          hd_hp: [
307
+            /* schedule, ... */
308
+          ],
309
+          new_hdf: {
310
+            am: {
311
+              /* zone_name: [ schedule, ... ] */
312
+            },
313
+            pm: {
314
+              /* zone_name: [ schedule, ... ] */
315
+            },
316
+            evening: {
317
+              /* zone_name: [ schedule, ... ] */
318
+            }
319
+          },
320
+          new_hd_hp: {
321
+            am: {
322
+              /* zone_name: [ schedule, ... ] */
323
+            },
324
+            pm: {
325
+              /* zone_name: [ schedule, ... ] */
326
+            },
327
+            evening: {
328
+              /* zone_name: [ schedule, ... ] */
329
+            }
330
+          }
331
+        },
332
+        {
333
+          day: 3,
334
+          weekday: '星期三',
335
+          all: {
336
+            am: {
337
+              /* zone_name: [ schedule, ... ] */
338
+            },
339
+            pm: {
340
+              /* zone_name: [ schedule, ... ] */
341
+            },
342
+            evening: {
343
+              /* zone_name: [ schedule, ... ] */
344
+            }
345
+          },
346
+          hdf: [
347
+            /* schedule, ... */
348
+          ],
349
+          hd_hp: [
350
+            /* schedule, ... */
351
+          ],
352
+          new_hdf: {
353
+            am: {
354
+              /* zone_name: [ schedule, ... ] */
355
+            },
356
+            pm: {
357
+              /* zone_name: [ schedule, ... ] */
358
+            },
359
+            evening: {
360
+              /* zone_name: [ schedule, ... ] */
361
+            }
362
+          },
363
+          new_hd_hp: {
364
+            am: {
365
+              /* zone_name: [ schedule, ... ] */
366
+            },
367
+            pm: {
368
+              /* zone_name: [ schedule, ... ] */
369
+            },
370
+            evening: {
371
+              /* zone_name: [ schedule, ... ] */
372
+            }
373
+          }
374
+        },
375
+        {
376
+          day: 4,
377
+          weekday: '星期四',
378
+          all: {
379
+            am: {
380
+              /* zone_name: [ schedule, ... ] */
381
+            },
382
+            pm: {
383
+              /* zone_name: [ schedule, ... ] */
384
+            },
385
+            evening: {
386
+              /* zone_name: [ schedule, ... ] */
387
+            }
388
+          },
389
+          hdf: [
390
+            /* schedule, ... */
391
+          ],
392
+          hd_hp: [
393
+            /* schedule, ... */
394
+          ],
395
+          new_hdf: {
396
+            am: {
397
+              /* zone_name: [ schedule, ... ] */
398
+            },
399
+            pm: {
400
+              /* zone_name: [ schedule, ... ] */
401
+            },
402
+            evening: {
403
+              /* zone_name: [ schedule, ... ] */
404
+            }
405
+          },
406
+          new_hd_hp: {
407
+            am: {
408
+              /* zone_name: [ schedule, ... ] */
409
+            },
410
+            pm: {
411
+              /* zone_name: [ schedule, ... ] */
412
+            },
413
+            evening: {
414
+              /* zone_name: [ schedule, ... ] */
415
+            }
416
+          }
417
+        },
418
+        {
419
+          day: 5,
420
+          weekday: '星期五',
421
+          all: {
422
+            am: {
423
+              /* zone_name: [ schedule, ... ] */
424
+            },
425
+            pm: {
426
+              /* zone_name: [ schedule, ... ] */
427
+            },
428
+            evening: {
429
+              /* zone_name: [ schedule, ... ] */
430
+            }
431
+          },
432
+          hdf: [
433
+            /* schedule, ... */
434
+          ],
435
+          hd_hp: [
436
+            /* schedule, ... */
437
+          ],
438
+          new_hdf: {
439
+            am: {
440
+              /* zone_name: [ schedule, ... ] */
441
+            },
442
+            pm: {
443
+              /* zone_name: [ schedule, ... ] */
444
+            },
445
+            evening: {
446
+              /* zone_name: [ schedule, ... ] */
447
+            }
448
+          },
449
+          new_hd_hp: {
450
+            am: {
451
+              /* zone_name: [ schedule, ... ] */
452
+            },
453
+            pm: {
454
+              /* zone_name: [ schedule, ... ] */
455
+            },
456
+            evening: {
457
+              /* zone_name: [ schedule, ... ] */
458
+            }
459
+          }
460
+        },
461
+        {
462
+          day: 6,
463
+          weekday: '星期六',
464
+          all: {
465
+            am: {
466
+              /* zone_name: [ schedule, ... ] */
467
+            },
468
+            pm: {
469
+              /* zone_name: [ schedule, ... ] */
470
+            },
471
+            evening: {
472
+              /* zone_name: [ schedule, ... ] */
473
+            }
474
+          },
475
+          hdf: [
476
+            /* schedule, ... */
477
+          ],
478
+          hd_hp: [
479
+            /* schedule, ... */
480
+          ],
481
+          new_hdf: {
482
+            am: {
483
+              /* zone_name: [ schedule, ... ] */
484
+            },
485
+            pm: {
486
+              /* zone_name: [ schedule, ... ] */
487
+            },
488
+            evening: {
489
+              /* zone_name: [ schedule, ... ] */
490
+            }
491
+          },
492
+          new_hd_hp: {
493
+            am: {
494
+              /* zone_name: [ schedule, ... ] */
495
+            },
496
+            pm: {
497
+              /* zone_name: [ schedule, ... ] */
498
+            },
499
+            evening: {
500
+              /* zone_name: [ schedule, ... ] */
501
+            }
502
+          }
503
+        },
504
+        {
505
+          day: 7,
506
+          weekday: '星期日',
507
+          all: {
508
+            am: {
509
+              /* zone_name: [ schedule, ... ] */
510
+            },
511
+            pm: {
512
+              /* zone_name: [ schedule, ... ] */
513
+            },
514
+            evening: {
515
+              /* zone_name: [ schedule, ... ] */
516
+            }
517
+          },
518
+          hdf: [
519
+            /* schedule, ... */
520
+          ],
521
+          hd_hp: [
522
+            /* schedule, ... */
523
+          ],
524
+          new_hdf: {
525
+            am: {
526
+              /* zone_name: [ schedule, ... ] */
527
+            },
528
+            pm: {
529
+              /* zone_name: [ schedule, ... ] */
530
+            },
531
+            evening: {
532
+              /* zone_name: [ schedule, ... ] */
533
+            }
534
+          },
535
+          new_hd_hp: {
536
+            am: {
537
+              /* zone_name: [ schedule, ... ] */
538
+            },
539
+            pm: {
540
+              /* zone_name: [ schedule, ... ] */
541
+            },
542
+            evening: {
543
+              /* zone_name: [ schedule, ... ] */
544
+            }
545
+          }
546
+        }
547
+      ],
548
+      total: [],
549
+      list: [],
550
+      loading: false,
551
+      tableData: [],
552
+      numberList: [],
553
+      partitionArr: [],
554
+      listname:[],
555
+      mode:[{id:1,name:'HD'},{id:2,name:'HDF'},{id:3,name:'HD+HP'},{id:4,name:'HP'},{id:5,name:'HF'},{id:6,name:'SCUF'},{id:7,name:'IUF'},{id:8,name:'HFHD'},
556
+      {id:9,name:'HFHD+HP'},{id:10,name:'PHF'},{id:11,name:'HFR'},{id:12,name:'HDF+HP'},{id:13,name:'CRRT'},{id:14,name:'腹水回输'},{id:15,name:'IUF+HD'},{id:16,name:'UF'},
557
+      {id:17,name:'HD+'},{id:18,name:'血浆胆红素吸附+HDF'},{id:19,name:'血浆胆红素吸附'},{id:20,name:'I-HDF'},{id:21,name:'HD高通'},{id:22,name:'CVVH'},{id:23,name:'CVVHD'},
558
+      {id:24,name:'CVVHDF'},{id:25,name:'PE'},{id:26,name:'血浆胆红素吸附+HP'},{id:27,name:'HPD'},{id:28,name:'HDP'}]
559
+
560
+    }
561
+  },
562
+  components: {
563
+    BreadCrumb
564
+  },
565
+  created() {
566
+   this.date= moment(new Date()).format("YYYY-MM-DD");
567
+   console.log('dsafas',this.date);
568
+    this.getAllZones()
569
+    this.getlist()
570
+    this.getSchedulesOne()
571
+  },
572
+  methods:{
573
+    db_click(e){
574
+      this.centerDialogVisible=true
575
+      console.log('2222',e);
576
+    },
577
+    drop(e,val){
578
+      this.allowDrop(e)
579
+      
580
+      this.currentData={
581
+        currentData_id:val.order.id,
582
+        currentData_name:val.name,
583
+        currentData_quhao:val.order.DeviceNumber.zone.name,
584
+        currentData_chaung:val.order.DeviceNumber.number,
585
+      },
586
+      this.tipDialogVisible=true
587
+      // this.currentData={
588
+      //   currentData_id:this.cur_drag_info.id,
589
+      //   currentData_name:this.cur_drag_info.name,
590
+      //   currentData_quhao:this.cur_drag_info.quhao,
591
+      //   currentData_chaung:this.cur_drag_info.chaung,
592
+      // },
593
+
594
+      console.log('3333',this.currentData);
595
+      console.log('6666',val);
596
+    },
597
+    allowDrop(e) {
598
+      e.preventDefault();
599
+    },
600
+     // 替换
601
+     coverSch(){
602
+      this.tipDialogVisible=false
603
+      this.currentData={
604
+        currentData_id:this.cur_drag_info.id,
605
+        currentData_name:this.cur_drag_info.name,
606
+        currentData_quhao:this.cur_drag_info.quhao,
607
+        currentData_chaung:this.cur_drag_info.chaung,
608
+      }
609
+      let params={
610
+        id_one:this.cur_drag_info.id,
611
+        id_two:this.currentData.currentData_id
612
+      }
613
+        CoverSch(params).then((response) => {
614
+        if (response.data.state == 0) {
615
+          this.$message.error(response.data.msg);
616
+          this.tipDialogVisibleTwo = false
617
+        } else {
618
+          console.log('888888888888',response.data);
619
+          this.$message.success("替换成功");
620
+          this.tipDialogVisible = false
621
+          this.tipDialogVisibleTwo = false
622
+          this.getSchedulesOne();
623
+        }
624
+      });
625
+    },
626
+    // 交换
627
+    changeSchTwo(){
628
+      this.tipDialogVisible=false
629
+      let params={
630
+        id_one:this.cur_drag_info.id,
631
+        id_two:this.currentData.id
632
+
633
+      }
634
+      ExchangeSch(params).then((response) => {
635
+        if (response.data.state == 0) {
636
+          this.$message.error(response.data.msg);
637
+          this.tipDialogVisibleThree = false
638
+        } else {
639
+          console.log('22222222',response.data);
640
+          this.$message.success("交换成功");
641
+          this.tipDialogVisible = false
642
+          this.tipDialogVisibleThree = false
643
+          this.getlist();
644
+        }
645
+      });
646
+    },
647
+    curInfoDragStart(e,val){
648
+      this.cur_drag_info={
649
+        id:val.order.id,
650
+        name:val.name,
651
+        quhao:val.order.DeviceNumber.zone.name,
652
+       chaung:val.order.DeviceNumber.number,
653
+      
654
+      }
655
+      console.log('4444',e);
656
+      console.log('5555',this.cur_drag_info);
657
+    },
658
+     // 选中日期
659
+     date_picker(e){
660
+      var time=moment(e).format("YYYY-MM-DD");
661
+      console.log('sfddas',time);
662
+      this.date=time
663
+      this.getlist()
664
+    },
665
+    // 选择班次
666
+    banci_select(e){
667
+      console.log(e);
668
+      for(let i=0;i<this.schedulArr.length;i++){
669
+        if(e==this.schedulArr[i].value){
670
+          this.classes = e
671
+        }
672
+        this.getlist()
673
+      }
674
+    },
675
+    // 选择分区
676
+    bingqu_select(e){
677
+      console.log('1234546',e);
678
+      for (let i = 0; i < this.partitionArr.length; i++) {
679
+        if(e==this.partitionArr[i].id){
680
+          this.bingqu=e
681
+        }
682
+      }
683
+      this.getlist()
684
+    },
685
+    // 分区
686
+    getAllZones() {
687
+      GetAllZone().then(response => {
688
+        if (response.data.state == 0) {
689
+          this.$message.error(response.data.msg);
690
+          return false;
691
+        } else {
692
+          this.partitionArr = response.data.data.zone;
693
+          this.partitionArr.unshift({ id: 0, name: "全部" });
694
+          console.log('asfasdfsadfa',this.partitionArr);
695
+        }
696
+      });
697
+    },
698
+    getlist() {
699
+      var params = {
700
+        schedule_date: this.date,
701
+        schedule_type: this.classes,
702
+        partition_type: this.bingqu,
703
+        keywords: '',
704
+        page: 1,
705
+        limit: 5000
706
+      }
707
+      this.loading = true
708
+      this.tableData = []
709
+      console.log('111111111',params);
710
+      getSchedualPrintList(params).then((response) => {
711
+        if (response.data.state == 1) {
712
+          this.loading = false
713
+          console.log('111111',response.data.data);
714
+          var list = response.data.data.list
715
+          this.list = list
716
+          var listOne = response.data.data.listOne
717
+          this.zones =listOne
718
+          if (list != null && list.length > 0) {
719
+            const dataInfo = {}
720
+            list.forEach((item, index) => {
721
+              const { schedule_type } = item
722
+              if (!dataInfo[schedule_type]) {
723
+                dataInfo[schedule_type] = {
724
+                  schedule_type: item.schedule_type,
725
+                  schedule_date: item.schedule_date,
726
+                  zones: [],
727
+                  list:[]
728
+                }
729
+              }
730
+            })
731
+            const arr = Object.values(dataInfo)
732
+            // console.log('arr222', arr)
733
+
734
+            if (arr != null && arr.length > 0) {
735
+              for (let i = 0; i < arr.length; i++) {
736
+                for (let j = 0; j < listOne.length; j++) {
737
+                  if (arr[i].schedule_type == listOne[j].schedule_type) {
738
+                    arr[i].zones.push(listOne[j])
739
+                  }
740
+                }
741
+                for(let x=0;x<list.length;x++){
742
+                  arr[i].list.push(list[x])
743
+                }
744
+              }
745
+            }
746
+            // console.log('排班数据------------------', arr)
747
+
748
+            this.tableData = arr
749
+            console.log('22222222',this.tableData);
750
+          }
751
+
752
+          this.numberList = response.data.data.numberList
753
+          // console.log('list2332233232wo', list)
754
+          // console.log('numberList', this.numberList)
755
+        }
756
+      })
757
+    },
758
+    
759
+    getTimeOne(val) {
760
+      if (val == '') {
761
+        return ''
762
+      } else {
763
+        return uParseTime(val, '{y}-{m}-{d}')
764
+      }
765
+    },
766
+   
767
+    getPatientName(schedule_type, partition_id) {
768
+      var str = ''
769
+      var arr = []
770
+      if (this.list != null && this.list.length > 0) {
771
+        for (let i = 0; i < this.list.length; i++) {
772
+          if (this.list[i].schedule_type == schedule_type && this.list[i].partition_id == partition_id) {
773
+            arr.push(this.list[i])
774
+          }
775
+        }
776
+      }
777
+      if (arr.length > 0) {
778
+        for (let i = 0; i < arr.length; i++) {
779
+          arr[i].name = this.nameSplit(arr[i].name)
780
+          console.log('666666',arr[i].name);
781
+          if (this.hiddenFlag) {
782
+            str+= arr[i].name + '&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp '
783
+          } else {
784
+            str+=arr[i].name
785
+          }
786
+        }
787
+      }
788
+      // console.log(str, 'strstrstr')
789
+      return str
790
+    },
791
+    // 透析模式
792
+    getmode(id){
793
+      for(let i=0;i<this.mode.length;i++){
794
+        if(id=this.mode[i].id){
795
+          return this.mode[i].name
796
+        }
797
+      }
798
+    },
799
+    // 切割患者姓名
800
+    nameSplit(val) {
801
+      var reg = /[\u4e00-\u9fa5]/g
802
+      let name = val
803
+      name = name.substr(-4)
804
+      var names = name.match(reg)
805
+      name = names.join('')
806
+      if (name.includes('区')) {
807
+        name = name.replace('区', '')
808
+      }
809
+      if (name.includes('号')) {
810
+        name = name.replace('号', '')
811
+      }
812
+      return name
813
+    },
814
+    // 分区
815
+    getZoneName(id) {
816
+      var name = ''
817
+      for (let i = 0; i < this.partitionArr.length; i++) {
818
+        if (id == this.partitionArr[i].id) {
819
+          name = this.partitionArr[i].name
820
+        }
821
+      }
822
+
823
+      return name
824
+    },
825
+    getBloodAccess(id) {
826
+      var name = ''
827
+      var list = getDataConfig(
828
+        'hemodialysis',
829
+        'vascular_access_desc'
830
+      )
831
+      for (let i = 0; i < list.length; i++) {
832
+        if (id == list[i].id) {
833
+          name = list[i].name
834
+        }
835
+      }
836
+      return name
837
+    },
838
+    getSchedulesOne(){
839
+      const params = {
840
+        weekTime: 2,
841
+        patitionid: '375,376,384,424,425,',
842
+        schedule_type: '',
843
+      };
844
+      getSchedulesOne(params).then((res)=>{
845
+        console.log('qqqqwwwwweeee',res.data.data);
846
+      })
847
+    }
848
+    
849
+  }
850
+ 
851
+}
852
+</script>
853
+
854
+<style rel="stylesheet/scss" lang="scss" scoped>
855
+#print_content {
856
+  background-color: white;
857
+  padding: 0 0 20px 0;
858
+  .content_top{
859
+    display: inline-block;
860
+  }
861
+  .order_title_panl {
862
+    text-align: center;
863
+
864
+    .main_title {
865
+      font-size: 18px;
866
+      line-height: 40px;
867
+      font-weight: 500;
868
+    }
869
+  }
870
+  .table_panel {
871
+    .table {
872
+      width: 100%;
873
+      border: 1px solid;
874
+      border-collapse: collapse;
875
+      padding: 2px;
876
+
877
+      thead {
878
+        tr {
879
+          td {
880
+            border: 1px solid;
881
+            text-align: center;
882
+            font-size: 20px;
883
+            padding: 15px 5px;
884
+          }
885
+        }
886
+      }
887
+      tbody {
888
+        tr {
889
+          td {
890
+            border: 1px solid;
891
+            // text-align: center;
892
+            font-size: 18px;
893
+            padding: 5px 5px;
894
+
895
+           .huanzhekuai{
896
+            width: 125px;
897
+            display: inline-block;
898
+            text-align: center;
899
+            margin:0 10px;
900
+           }
901
+           
902
+          }
903
+        }
904
+      }
905
+    }
906
+  }
907
+}
908
+</style>
909
+