See999 il y a 5 ans
Parent
révision
1487bccc48

+ 8 - 8
src/xt_pages/medicalScheduling/index.vue Voir le fichier

@@ -51,7 +51,7 @@
51 51
                                 <div @click="hangdleClick(scope.row,scope.$index,0)">
52 52
                                     <el-dropdown trigger="click" @command="changeSchedule">
53 53
                                         <span class="el-dropdown-link">
54
-                                        {{ getClass(scope.row.user_name,1) }}<i class="el-icon-arrow-down el-icon--right"></i>
54
+                                        {{ getClass(scope.row.user_name,1) }}<i v-if="getTimestamp(weekDayArr[0])>=timeNow?true:false" class="el-icon-arrow-down el-icon--right"></i>
55 55
                                         </span>
56 56
                                         <el-dropdown-menu slot="dropdown" >
57 57
                                             <el-dropdown-item  :command="item.id" icon="el-icon-plus" :disabled="getTimestamp(weekDayArr[0])<timeNow?true:false" v-for="(item,index) in schedulelist" :key="index">{{item.class_name}}</el-dropdown-item>
@@ -65,7 +65,7 @@
65 65
                                 <div @click="hangdleClick(scope.row,scope.$index,1)">
66 66
                                     <el-dropdown trigger="click" @command="changeSchedule">
67 67
                                         <span class="el-dropdown-link">
68
-                                        {{ getClass(scope.row.user_name,2) }}<i class="el-icon-arrow-down el-icon--right"></i>
68
+                                        {{ getClass(scope.row.user_name,2) }}<i v-if="getTimestamp(weekDayArr[1])>=timeNow?true:false" class="el-icon-arrow-down el-icon--right"></i>
69 69
                                         </span>
70 70
                                         <el-dropdown-menu slot="dropdown" >
71 71
                                             <el-dropdown-item  :command="item.id" icon="el-icon-plus" :disabled="getTimestamp(weekDayArr[1])<timeNow?true:false" v-for="(item,index) in schedulelist" :key="index">{{item.class_name}}</el-dropdown-item>
@@ -79,7 +79,7 @@
79 79
                                 <div @click="hangdleClick(scope.row,scope.$index,2)">
80 80
                                     <el-dropdown trigger="click" @command="changeSchedule">
81 81
                                         <span class="el-dropdown-link">
82
-                                        {{ getClass(scope.row.user_name,3) }}<i class="el-icon-arrow-down el-icon--right"></i>
82
+                                        {{ getClass(scope.row.user_name,3) }}<i v-if="getTimestamp(weekDayArr[2])>=timeNow?true:false" class="el-icon-arrow-down el-icon--right"></i>
83 83
                                         </span>
84 84
                                         <el-dropdown-menu slot="dropdown" >
85 85
                                             <el-dropdown-item  :command="item.id" icon="el-icon-plus" :disabled="getTimestamp(weekDayArr[2])<timeNow?true:false" v-for="(item,index) in schedulelist" :key="index">{{item.class_name}}</el-dropdown-item>
@@ -93,7 +93,7 @@
93 93
                                 <div @click="hangdleClick(scope.row,scope.$index,3)">
94 94
                                     <el-dropdown trigger="click" @command="changeSchedule">
95 95
                                         <span class="el-dropdown-link">
96
-                                        {{ getClass(scope.row.user_name,4) }}<i class="el-icon-arrow-down el-icon--right"></i>
96
+                                        {{ getClass(scope.row.user_name,4) }}<i v-if="getTimestamp(weekDayArr[3])>=timeNow?true:false" class="el-icon-arrow-down el-icon--right"></i>
97 97
                                         </span>
98 98
                                         <el-dropdown-menu slot="dropdown" >
99 99
                                             <el-dropdown-item  :command="item.id" icon="el-icon-plus" :disabled="getTimestamp(weekDayArr[3])<timeNow?true:false" v-for="(item,index) in schedulelist" :key="index">{{item.class_name}}</el-dropdown-item>
@@ -107,7 +107,7 @@
107 107
                                 <div @click="hangdleClick(scope.row,scope.$index,4)">
108 108
                                     <el-dropdown trigger="click" @command="changeSchedule">
109 109
                                         <span class="el-dropdown-link">
110
-                                        {{ getClass(scope.row.user_name,5) }}<i class="el-icon-arrow-down el-icon--right"></i>
110
+                                        {{ getClass(scope.row.user_name,5) }}<i v-if="getTimestamp(weekDayArr[4])>=timeNow?true:false" class="el-icon-arrow-down el-icon--right"></i>
111 111
                                         </span>
112 112
                                         <el-dropdown-menu slot="dropdown" >
113 113
                                             <el-dropdown-item  :command="item.id" icon="el-icon-plus" :disabled="getTimestamp(weekDayArr[4])<timeNow?true:false" v-for="(item,index) in schedulelist" :key="index">{{item.class_name}}</el-dropdown-item>
@@ -121,7 +121,7 @@
121 121
                                 <div @click="hangdleClick(scope.row,scope.$index,5)">
122 122
                                     <el-dropdown trigger="click" @command="changeSchedule">
123 123
                                         <span class="el-dropdown-link">
124
-                                        {{ getClass(scope.row.user_name,6) }}<i class="el-icon-arrow-down el-icon--right"></i>
124
+                                        {{ getClass(scope.row.user_name,6) }}<i v-if="getTimestamp(weekDayArr[5])>=timeNow?true:false" class="el-icon-arrow-down el-icon--right"></i>
125 125
                                         </span>
126 126
                                         <el-dropdown-menu slot="dropdown" >
127 127
                                             <el-dropdown-item  :command="item.id" icon="el-icon-plus" :disabled="getTimestamp(weekDayArr[5])<timeNow?true:false" v-for="(item,index) in schedulelist" :key="index">{{item.class_name}}</el-dropdown-item>
@@ -135,7 +135,7 @@
135 135
                                 <div @click="hangdleClick(scope.row,scope.$index,6)">
136 136
                                     <el-dropdown trigger="click" @command="changeSchedule">
137 137
                                         <span class="el-dropdown-link">
138
-                                        {{ getClass(scope.row.user_name,0) }}<i class="el-icon-arrow-down el-icon--right"></i>
138
+                                        {{ getClass(scope.row.user_name,0) }}<i v-if="getTimestamp(weekDayArr[6])>=timeNow?true:false" class="el-icon-arrow-down el-icon--right"></i>
139 139
                                         </span>
140 140
                                         <el-dropdown-menu slot="dropdown" >
141 141
                                             <el-dropdown-item  :command="item.id" icon="el-icon-plus" :disabled="getTimestamp(weekDayArr[6])<timeNow?true:false" v-for="(item,index) in schedulelist" :key="index">{{item.class_name}}</el-dropdown-item>
@@ -244,7 +244,7 @@ export default {
244 244
         search(){},
245 245
         toPrint(){
246 246
             this.$router.push({
247
-                path: '/medicalScheduling/schedule/print?starttime='+this.getTimestamp(this.weekDayArr[0])+"&endtime="+this.getTimestamp(this.weekDayArr[6]),
247
+                path: '/medicalScheduling/schedule/print?starttime='+this.getTimestamp(this.weekDayArr[0])+"&endtime="+this.getTimestamp(this.weekDayArr[6])+"&weekArr="+ this.weekDayArr,
248 248
                 // query: { date: date }
249 249
             })
250 250
         },

+ 24 - 10
src/xt_pages/medicalScheduling/medical_print.vue Voir le fichier

@@ -22,13 +22,13 @@
22 22
                             <thead>
23 23
                                 <tr>
24 24
                                     <td width="120">医护姓名</td>
25
-                                    <td width="120">周一</td>
26
-                                    <td width="120">周二</td>
27
-                                    <td width="120">周三</td>
28
-                                    <td width="120">周四</td>
29
-                                    <td width="120">周五</td>
30
-                                    <td width="120">周六</td>
31
-                                    <td width="120">周日</td>
25
+                                    <td width="120">周一<br />({{ weekArr[0] }})</td>
26
+                                    <td width="120">周二<br />({{ weekArr[1] }})</td>
27
+                                    <td width="120">周三<br />({{ weekArr[2] }})</td>
28
+                                    <td width="120">周四<br />({{ weekArr[3] }})</td>
29
+                                    <td width="120">周五<br />({{ weekArr[4] }})</td>
30
+                                    <td width="120">周六<br />({{ weekArr[5] }})</td>
31
+                                    <td width="120">周日<br />({{ weekArr[6] }})</td>
32 32
                                 </tr>
33 33
                             </thead>
34 34
                             <tbody>
@@ -74,7 +74,7 @@ export default {
74 74
     },
75 75
     methods:{
76 76
       printAction: function() {
77
-          const style = '@media print { .print_main_content { background-color: white; width:960px;  margin:0 auto; padding: 0 0 20px 0; } .order_title_panl { text-align: center; } .main_title { font-size: 18px; line-height: 40px; font-weight: 500; } .table_panel { } .table { width: 100%; border: 1px solid; border-collapse: collapse; padding: 2px; } thead tr td { border: 1px solid; text-align: center; font-size: 20px; padding: 15px 5px; } tbody tr td { border: 1px solid; text-align: center; font-size: 18px; padding: 10px 5px; } .proj { padding: 5px 0; text-align: left; } .proj_title { font-size: 16px; font-weight: 500; line-height: 25px; } .proj_item { font-size: 15px; line-height: 20px; } .zone_name { font-weight: 500; } }'
77
+          const style = '@media print { .print_main_content { background-color: white; width:960px;  margin:0 auto; padding: 0 0 20px 0; } .order_title_panl { text-align: center; } .main_title { font-size: 18px; line-height: 40px; font-weight: 500; } .table_panel { } .table { width: 100%; border: 1px solid; border-collapse: collapse; padding: 2px; } thead tr td { border: 1px solid; text-align: center; font-size: 16px; padding: 15px 5px; } tbody tr td { border: 1px solid; text-align: center; font-size: 16px; padding: 10px 5px; white-space: pre-line;} .proj { padding: 5px 0; text-align: left; } .proj_title { font-size: 16px; font-weight: 500; line-height: 25px; } .proj_item { font-size: 15px; line-height: 20px; } .zone_name { font-weight: 500; } }'
78 78
 
79 79
           printJS({
80 80
           printable: 'print_content',
@@ -152,7 +152,18 @@ export default {
152 152
               } 
153 153
             }
154 154
           })
155
-          return newClass
155
+          if(newClass.indexOf("(") > -1){
156
+            let num = newClass.indexOf("(")
157
+            let a = newClass.slice(0, num) + '\n' + newClass.slice(num)
158
+            return a
159
+          }else if(newClass.indexOf("(") > -1) {
160
+            let num = newClass.indexOf("(")
161
+            let a = newClass.slice(0, num) + '\n' + newClass.slice(num)
162
+            return a
163
+          }else{
164
+            return newClass
165
+          }
166
+          
156 167
         }
157 168
       },
158 169
       getNowFormatDate() {
@@ -185,6 +196,8 @@ export default {
185 196
       var endtime =  this.$route.query.endtime
186 197
       console.log("endtime",endtime)
187 198
       this.end_time = endtime
199
+      this.weekArr = this.$route.query.weekArr.split(',')
200
+      console.log(22222222222,this.$route.query.weekArr.split(','))
188 201
       //获取该机构所有医护人员
189 202
       this.getDoctorList()
190 203
     }
@@ -214,6 +227,7 @@ export default {
214 227
       border: 1px solid;
215 228
       border-collapse: collapse;
216 229
       padding: 2px;
230
+      
217 231
 
218 232
       thead {
219 233
         tr {
@@ -232,7 +246,7 @@ export default {
232 246
             text-align: center;
233 247
             font-size: 18px;
234 248
             padding: 10px 5px;
235
-
249
+            white-space: pre-line;
236 250
             .proj {
237 251
               padding: 5px 0;
238 252
               text-align: left;