Просмотр исходного кода

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

XMLWAN 4 лет назад
Родитель
Сommit
b20df73406
2 измененных файлов: 36 добавлений и 22 удалений
  1. 11 11
      src/xt_pages/medicalScheduling/index.vue
  2. 25 11
      src/xt_pages/medicalScheduling/medical_print.vue

+ 11 - 11
src/xt_pages/medicalScheduling/index.vue Просмотреть файл

@@ -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>
@@ -154,7 +154,7 @@
154 154
                             {{item.class_name}}&nbsp;({{item.timeone_start}}~{{item.timeone_type}}{{item.timeone_end}} <span v-if="item.timetwo_start!=''">{{item.timetwo_start}}~{{item.timetwo_type}}{{item.timetwo_end}}</span> )
155 155
                            </p>
156 156
                         </div>
157
-                        <el-checkbox style="text-align:center"  v-model="isChecked" @change="toContinuous">连续排班</el-checkbox>
157
+                        <el-checkbox style="text-align:center;padding-bottom: 10px;"  v-model="isChecked" @change="toContinuous">连续排班</el-checkbox>
158 158
                     </div>
159 159
                 </div>
160 160
             </div>
@@ -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
         },
@@ -287,7 +287,7 @@ export default {
287 287
         //  console.log("val",val)
288 288
          this.docobj = val
289 289
          if(this.getTimestamp(this.weekDayArr[num]) < this.timeNow){
290
-            this.$message.warning("过去日期不可以编辑")
290
+            this.$message.error("过去日期不可以编辑")
291 291
             return
292 292
          }
293 293
         },
@@ -897,7 +897,7 @@ export default {
897 897
 .classBox{
898 898
     width:28%;
899 899
     height: 100%;
900
-    border: 1px solid #EBEEF5;
900
+    border: 1px solid #d0d3da;
901 901
     .classTitle{
902 902
         height: 42px;
903 903
         text-align: center;

+ 25 - 11
src/xt_pages/medicalScheduling/medical_print.vue Просмотреть файл

@@ -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',
@@ -153,7 +153,18 @@ export default {
153 153
               } 
154 154
             }
155 155
           })
156
-          return newClass
156
+          if(newClass.indexOf("(") > -1){
157
+            let num = newClass.indexOf("(")
158
+            let a = newClass.slice(0, num) + '\n' + newClass.slice(num)
159
+            return a
160
+          }else if(newClass.indexOf("(") > -1) {
161
+            let num = newClass.indexOf("(")
162
+            let a = newClass.slice(0, num) + '\n' + newClass.slice(num)
163
+            return a
164
+          }else{
165
+            return newClass
166
+          }
167
+          
157 168
         }
158 169
       },
159 170
       getNowFormatDate() {
@@ -184,6 +195,8 @@ export default {
184 195
       this.start_time = starttime
185 196
       var endtime =  this.$route.query.endtime
186 197
       this.end_time = endtime
198
+      this.weekArr = this.$route.query.weekArr.split(',')
199
+      console.log(22222222222,this.$route.query.weekArr.split(','))
187 200
       //获取该机构所有医护人员
188 201
       this.getDoctorList()
189 202
     }
@@ -213,13 +226,14 @@ export default {
213 226
       border: 1px solid;
214 227
       border-collapse: collapse;
215 228
       padding: 2px;
229
+      
216 230
 
217 231
       thead {
218 232
         tr {
219 233
           td {
220 234
             border: 1px solid;
221 235
             text-align: center;
222
-            font-size: 20px;
236
+            font-size: 18px;
223 237
             padding: 15px 5px;
224 238
           }
225 239
         }
@@ -231,7 +245,7 @@ export default {
231 245
             text-align: center;
232 246
             font-size: 18px;
233 247
             padding: 10px 5px;
234
-
248
+            white-space: pre-line;
235 249
             .proj {
236 250
               padding: 5px 0;
237 251
               text-align: left;