Преглед изворни кода

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

csx пре 4 година
родитељ
комит
71b63b4286

+ 0 - 1
src/api/dialysis.js Прегледај датотеку

@@ -145,7 +145,6 @@ export function getDialysisRecord(params) {
145 145
 }
146 146
 
147 147
 export function postPrescription(params) {
148
-  console.log('params是----', params)
149 148
   return request({
150 149
     url: '/api/dialysis/prescription',
151 150
     method: 'Post',

+ 62 - 0
src/api/doctorSchedule.js Прегледај датотеку

@@ -0,0 +1,62 @@
1
+import request from '@/utils/request'
2
+import { data } from 'autoprefixer'
3
+
4
+export function saveDoctorSchedules(params) {
5
+  return request({
6
+    url: '/api/schedules/savedoctorschedules',
7
+    methods: 'get',
8
+    params: params
9
+  })
10
+}
11
+
12
+export function getDoctorScheduleList(params) {
13
+  return request({
14
+    url: '/api/schedules/getdoctorschedulelist',
15
+    methods: 'get',
16
+    params: params
17
+  })
18
+}
19
+
20
+export function getScheduleDetail(id, params) {
21
+  return request({
22
+    url: '/api/schedules/getscheduledetail?id=' + id,
23
+    methods: 'get',
24
+    params: params
25
+  })
26
+}
27
+
28
+export function UpdateSchedule(params) {
29
+  return request({
30
+    url: '/api/schedules/updateschedule',
31
+    methods: 'get',
32
+    params: params
33
+  })
34
+}
35
+
36
+export function deleteScheduleById(id, orgid) {
37
+  const params = {
38
+    id: id,
39
+    orgid: orgid
40
+  }
41
+  return request({
42
+    url: '/api/schedule/deleteschedule',
43
+    methods: 'get',
44
+    params: params
45
+  })
46
+}
47
+
48
+export function getDoctorList(params) {
49
+  return request({
50
+    url: '/api/schedule/getdoctorlist',
51
+    methods: 'get',
52
+    params: params
53
+  })
54
+}
55
+
56
+export function getScheduleList(params) {
57
+  return request({
58
+    url: '/api/schedule/getschedulelist',
59
+    methods: 'get',
60
+    params: params
61
+  })
62
+}

+ 3 - 0
src/lang/zh.js Прегледај датотеку

@@ -61,6 +61,9 @@ export default {
61 61
     theme: '换肤',
62 62
     clipboardDemo: 'Clipboard',
63 63
     i18n: '国际化',
64
+    medicalScheduling:'医护排班',
65
+    medicalSchedulingIndex:'医护排班',
66
+    class:'班种列表',
64 67
     permissionManage: '权限管理',
65 68
     adminManage: '员工管理',
66 69
     roleManage: '权限管理',

+ 2 - 0
src/router/index.js Прегледај датотеку

@@ -17,6 +17,7 @@ import org from './modules/org'
17 17
 import systems from './modules/systems'
18 18
 import data_upload from './modules/data_upload'
19 19
 import integration from './modules/integration'
20
+import medicalScheduling from './modules/medical_scheduling'
20 21
 import slow from './modules/slow'
21 22
 import scrm from './modules/scrm'
22 23
 import shop from './modules/shop'
@@ -100,6 +101,7 @@ var _constant_router_map = [{
100 101
 var _asy_router_map = [
101 102
   patient,
102 103
   workforce,
104
+  medicalScheduling,
103 105
   weight_sign,
104 106
   dialysis,
105 107
   stock,

+ 42 - 0
src/router/modules/medical_scheduling.js Прегледај датотеку

@@ -0,0 +1,42 @@
1
+import Layout from '@/views/layout/Layout'
2
+export default {
3
+  path: '/medicalScheduling',
4
+  component: Layout,
5
+  redirect: 'noredirect',
6
+  name: 'medicalScheduling',
7
+  alwaysShow: true,
8
+  meta: {
9
+    title: 'medicalScheduling',
10
+    icon: 'paiban'
11
+  },
12
+  children: [{
13
+    path: '/medicalScheduling/index',
14
+    component: () => import('@/xt_pages/medicalScheduling/index'),
15
+    name: 'medicalSchedulingIndex',
16
+    meta: {
17
+      title: 'medicalSchedulingIndex',
18
+      noCache: true
19
+    }
20
+  },
21
+  {
22
+    path: '/medicalScheduling/class',
23
+    component: () => import('@/xt_pages/medicalScheduling/class'),
24
+    name: 'class',
25
+    meta: {
26
+      title: 'class',
27
+      noCache: true
28
+    }
29
+  },
30
+  {
31
+    path: '/medicalScheduling/schedule/print',
32
+    component: () => import('@/xt_pages/medicalScheduling/medical_print'),
33
+    name: 'medical_print',
34
+    hidden: true,
35
+    is_menu: false,
36
+    meta: {
37
+      title: 'medical_print',
38
+      noCache: true
39
+    }
40
+  },
41
+  ]
42
+}

+ 1 - 1
src/xt_pages/dialysis/template/DialysisPrintOrderTwentyOne.vue Прегледај датотеку

@@ -352,7 +352,7 @@
352 352
                             <td width="70">透前体重:</td>
353 353
                             <td width="50">
354 354
                                 <div class="under-line">
355
-                                    &nbsp;{{ predialysis.weight_before ? (predialysis.weight_before - predialysis.additional_weight) : "" }}
355
+                                    &nbsp;{{ predialysis.weight_before ? parseFloat(predialysis.weight_before - predialysis.additional_weight).toFixed(2) : "" }}
356 356
                                 </div>
357 357
                             </td>
358 358
                             <td width="20">Kg</td>

+ 524 - 0
src/xt_pages/medicalScheduling/class.vue Прегледај датотеку

@@ -0,0 +1,524 @@
1
+<template>
2
+    <div class="main-contain">
3
+        <div class="position">
4
+            <bread-crumb :crumbs="crumbs"></bread-crumb>
5
+            <div style="display:flex;align-items:center">
6
+                <el-button type="primary" @click="newVisible = true">新增</el-button>
7
+            </div>
8
+        </div>
9
+        <div class="app-container">
10
+            <el-table :data="tableData" border style="width: 100%" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)', color: '#606266'}" :row-style="{ color: '#303133' }">
11
+                <el-table-column prop="name" label="序号" width="80" align="center" type="index"></el-table-column>
12
+                <el-table-column prop="name" label="班种名称" width="100" align="center">
13
+                    <template slot-scope="scope">
14
+                        {{scope.row.class_name}}
15
+                    </template>
16
+                </el-table-column>
17
+                <el-table-column prop="name" label="班种属性" width="100" align="center">
18
+                    <template slot-scope="scope">
19
+                        {{scope.row.class_attributes}}
20
+                    </template> 
21
+                </el-table-column>
22
+                <el-table-column prop="name" label="班种时间" width="270" align="center">
23
+                   <template slot-scope="scope">
24
+                     <span>{{scope.row.timeone_start}} - {{scope.row.timeone_type}}{{scope.row.timeone_end}}</span>
25
+                     <span>&nbsp;&nbsp;</span>
26
+                     <span v-if="scope.row.timetwo_start!=''">{{scope.row.timetwo_start}} - {{scope.row.timetwo_type}}{{scope.row.timetwo_end}}</span> 
27
+                    </template> 
28
+                </el-table-column>
29
+                <el-table-column prop="name" label="时长" width="80" align="center">
30
+                    <template slot-scope="scope">
31
+                        {{scope.row.work_time}}
32
+                    </template> 
33
+                </el-table-column>
34
+                <el-table-column prop="name" label="备注" align="center">
35
+                     <template slot-scope="scope">
36
+                        {{scope.row.remarks}}
37
+                    </template> 
38
+                </el-table-column>
39
+                <el-table-column prop="name" label="操作" width="200" align="center">
40
+                    <template slot-scope="scope">
41
+                        <el-button
42
+                        size="mini"
43
+                        type="primary"
44
+                        @click="handleEdit(scope.row.id)">编辑</el-button>
45
+                        <el-button
46
+                        size="mini"
47
+                        type="danger"
48
+                        @click="handleDelete(scope.row.id,scope.row.user_org_id)">删除</el-button>
49
+                    </template>
50
+                </el-table-column>
51
+            </el-table>
52
+
53
+             <el-pagination
54
+                @size-change="handleSizeChange"
55
+                @current-change="handleCurrentChange"
56
+                :page-sizes="[10, 20, 50, 100]"
57
+                :page-size="10"
58
+                background
59
+                style="margin-top:20px;float: right"
60
+                layout="total, sizes, prev, pager, next, jumper"
61
+                :total="total"
62
+             ></el-pagination>
63
+
64
+
65
+            <el-dialog
66
+                title="新建班种"
67
+                width="800px"
68
+                :visible.sync="newVisible"
69
+            >
70
+             <el-form :model="form" :rules="rules" ref="form" label-width="90px">
71
+                <el-form-item label="班种名称 : " required prop="class_name">
72
+                    <el-input v-model="form.class_name" placeholder="" ></el-input>
73
+                </el-form-item>
74
+                <el-form-item label="班种属性 : " required  prop="class_attributes">
75
+                    <el-select v-model="form.class_attributes" placeholder="请选择">
76
+                        <el-option
77
+                        v-for="item in typeOptions"
78
+                        :key="item.value"
79
+                        :label="item.label"
80
+                        :value="item.value">
81
+                        </el-option>
82
+                    </el-select>
83
+                </el-form-item>
84
+                <el-form-item label="班种时间1 : " required prop="timeone_start" label-width="100px">
85
+                    <el-time-select
86
+                    style="width:140px;"
87
+                    v-model="form.timeone_start"
88
+                    :picker-options="{
89
+                    start: '08:00',
90
+                    step: '00:15',
91
+                    end: '18:00'
92
+                    }"
93
+                    placeholder="选择时间">
94
+                    </el-time-select>
95
+                     ~
96
+                    <el-select style="width:100px;" v-model="form.timeone_type" placeholder="请选择">
97
+                        <el-option
98
+                        v-for="item in dayOptions"
99
+                        :key="item.value"
100
+                        :label="item.label"
101
+                        :value="item.value">
102
+                        </el-option>
103
+                    </el-select>
104
+                    <el-time-select
105
+                    style="width:140px;"
106
+                    v-model="form.timeone_end"
107
+                    :picker-options="{
108
+                    start: '08:00',
109
+                    step: '00:15',
110
+                    end: '18:00'
111
+                    }"
112
+                    placeholder="选择时间">
113
+                    </el-time-select>
114
+                   <div class="el-form-item__error" v-show="showError">
115
+                      请选择班种时间1
116
+                   </div>
117
+                </el-form-item>
118
+              
119
+                <el-form-item label="班种时间2 : " prop="type">
120
+                    <el-time-select
121
+                    style="width:140px;"
122
+                    v-model="form.timetwo_start"
123
+                    :picker-options="{
124
+                    start: '08:00',
125
+                    step: '00:15',
126
+                    end: '18:00'
127
+                    }"
128
+                    placeholder="选择时间">
129
+                    </el-time-select> ~
130
+                    <el-select style="width:100px;" v-model="form.timetwo_type" placeholder="请选择">
131
+                        <el-option
132
+                        v-for="item in dayOptions"
133
+                        :key="item.value"
134
+                        :label="item.label"
135
+                        :value="item.value">
136
+                        </el-option>
137
+                    </el-select>
138
+                    <el-time-select
139
+                    style="width:140px;"
140
+                    v-model="form.timetwo_end"
141
+                    :picker-options="{
142
+                    start: '08:00',
143
+                    step: '00:15',
144
+                    end: '18:00'
145
+                    }"
146
+                    placeholder="选择时间">
147
+                    </el-time-select>
148
+                </el-form-item>
149
+                <el-form-item label="上班时长 : ">
150
+                    <el-input v-model="form.work_time" placeholder="" maxlength="30"></el-input>
151
+                </el-form-item>
152
+                <el-form-item label="备注 : ">
153
+                    <el-input
154
+                    type="textarea"
155
+                    v-model="form.remarks"
156
+                    placeholder=""
157
+                    resize="none"
158
+                    rows="2"
159
+                    ></el-input>
160
+                </el-form-item>
161
+                </el-form>
162
+                <div slot="footer" class="dialog-footer">
163
+                <el-button @click="newVisible=false">取 消</el-button>
164
+                <el-button type="primary" @click="submitAction('form')">保 存</el-button>
165
+                </div>
166
+            </el-dialog>
167
+
168
+
169
+             <el-dialog
170
+                title="编辑班种"
171
+                width="800px"
172
+                :visible.sync="EditNewVisible"
173
+            >
174
+             <el-form :model="form" :rules="rules" ref="form" label-width="90px">
175
+                <el-form-item label="班种名称 : " required prop="class_name">
176
+                    <el-input v-model="form.class_name" placeholder="" ></el-input>
177
+                </el-form-item>
178
+                <el-form-item label="班种属性 : " required  prop="class_attributes">
179
+                    <el-select v-model="form.class_attributes" placeholder="请选择">
180
+                        <el-option
181
+                        v-for="item in typeOptions"
182
+                        :key="item.value"
183
+                        :label="item.label"
184
+                        :value="item.value">
185
+                        </el-option>
186
+                    </el-select>
187
+                </el-form-item>
188
+                <el-form-item label="班种时间1 : " required prop="timeone_start" label-width="100px">
189
+                    <el-time-select
190
+                    style="width:140px;"
191
+                    v-model="form.timeone_start"
192
+                    :picker-options="{
193
+                    start: '08:00',
194
+                    step: '00:15',
195
+                    end: '18:00'
196
+                    }"
197
+                    placeholder="选择时间">
198
+                    </el-time-select>
199
+                     ~
200
+                    <el-select style="width:100px;" v-model="form.timeone_type" placeholder="请选择">
201
+                        <el-option
202
+                        v-for="item in dayOptions"
203
+                        :key="item.value"
204
+                        :label="item.label"
205
+                        :value="item.value">
206
+                        </el-option>
207
+                    </el-select>
208
+                    <el-time-select
209
+                    style="width:140px;"
210
+                    v-model="form.timeone_end"
211
+                    :picker-options="{
212
+                    start: '08:00',
213
+                    step: '00:15',
214
+                    end: '18:00'
215
+                    }"
216
+                    placeholder="选择时间">
217
+                    </el-time-select>
218
+                   <div class="el-form-item__error" v-show="showError">
219
+                      请选择班种时间1
220
+                   </div>
221
+                </el-form-item>
222
+              
223
+                <el-form-item label="班种时间2 : " prop="type">
224
+                    <el-time-select
225
+                    style="width:140px;"
226
+                    v-model="form.timetwo_start"
227
+                    :picker-options="{
228
+                    start: '08:00',
229
+                    step: '00:15',
230
+                    end: '18:00'
231
+                    }"
232
+                    placeholder="选择时间">
233
+                    </el-time-select> ~
234
+                    <el-select style="width:100px;" v-model="form.timetwo_type" placeholder="请选择">
235
+                        <el-option
236
+                        v-for="item in dayOptions"
237
+                        :key="item.value"
238
+                        :label="item.label"
239
+                        :value="item.value">
240
+                        </el-option>
241
+                    </el-select>
242
+                    <el-time-select
243
+                    style="width:140px;"
244
+                    v-model="form.timetwo_end"
245
+                    :picker-options="{
246
+                    start: '08:00',
247
+                    step: '00:15',
248
+                    end: '18:00'
249
+                    }"
250
+                    placeholder="选择时间">
251
+                    </el-time-select>
252
+                </el-form-item>
253
+                <el-form-item label="上班时长 : ">
254
+                    <el-input v-model="form.work_time" placeholder="" maxlength="30"></el-input>
255
+                </el-form-item>
256
+                <el-form-item label="备注 : ">
257
+                    <el-input
258
+                    type="textarea"
259
+                    v-model="form.remarks"
260
+                    placeholder=""
261
+                    resize="none"
262
+                    rows="2"
263
+                    ></el-input>
264
+                </el-form-item>
265
+                </el-form>
266
+                <div slot="footer" class="dialog-footer">
267
+                <el-button @click="EditNewVisible=false">取 消</el-button>
268
+                <el-button type="primary" @click="UpdateSubmitAction('form')">保 存</el-button>
269
+                </div>
270
+            </el-dialog>
271
+        </div>
272
+    </div>
273
+</template>
274
+
275
+
276
+<script>
277
+import {saveDoctorSchedules,getDoctorScheduleList,getScheduleDetail,UpdateSchedule,deleteScheduleById } from '@/api/doctorSchedule'
278
+import BreadCrumb from '@/xt_pages/components/bread-crumb'
279
+export default {
280
+    components:{
281
+        BreadCrumb
282
+    },
283
+    data(){
284
+        return{
285
+            crumbs: [
286
+                { path: false, name: '医护排班' },
287
+                { path: '/medicalScheduling/index', name: '班种列表' }
288
+            ],
289
+            tableData: [],
290
+            newVisible:false,
291
+            EditNewVisible:false,
292
+            form: {
293
+                id: 0,
294
+                class_name: "",
295
+                class_attributes:'',
296
+                timeone_start:'',
297
+                timeone_type:'',
298
+                timeone_end:'',
299
+                timetwo_start:'',
300
+                timetwo_type:'',
301
+                timetwo_end:'',
302
+                work_time:'',
303
+                remarks: "",
304
+                user_org_id:0,
305
+            },
306
+            rules: {
307
+              class_name: [{ required: true, message: "请输入班种名称", trigger: "blur" }],
308
+              class_attributes: [{ required: true, message: "请选择班种属性", trigger: "blur" }],  
309
+              timeone_start: [{ required: true, message: "请选择班种时间1", trigger: "blur" }], 
310
+              timeone_type: [{ required: true, message: "请选择班种时间1类型", trigger: "blur" }], 
311
+              timeone_end: [{ required: true, message: "请选择班种时间1结束时间", trigger: "blur" }], 
312
+            },
313
+            typeOptions:[{ value: 1, label: '出勤'},{ value: 2, label: '缺勤'}],
314
+            dayOptions:[{ value: 1, label: '当日'},{ value: 2, label: '次日'}],
315
+            showError:false,
316
+            limit:10,
317
+            page:1,
318
+            total:0
319
+        }
320
+    },
321
+    methods:{
322
+        submitAction(formName){
323
+           if(this.form.timeone_type ==""){
324
+              this.showError = true
325
+              return false
326
+           }
327
+           
328
+           if(this.form.timeone_end == ""){
329
+              this.showError = true
330
+              return false
331
+           }
332
+          const params = {
333
+             class_name:this.form.class_name,
334
+             class_attributes:this.form.class_attributes,
335
+             timeone_start:this.form.timeone_start,
336
+             timeone_type:this.form.timeone_type,
337
+             timeone_end:this.form.timeone_end,
338
+             timetwo_start:this.form.timetwo_start,
339
+             timetwo_type:this.form.timetwo_type,
340
+             timetwo_end:this.form.timetwo_end,
341
+             work_time:this.form.work_time,
342
+             remarks:this.form.remarks
343
+         }
344
+         this.$refs[formName].validate((valid=>{
345
+            if(valid){
346
+                saveDoctorSchedules(params).then(response=>{
347
+                  if(response.data.state == 1){
348
+                    var schedules = response.data.data.schedules
349
+                    this.newVisible = false
350
+                    this.$message.success("保存成功")
351
+                    this.getList()
352
+                    this.form.class_name = ""
353
+                    this.form.class_attributes = ""
354
+                    this.form.timeone_start = ""
355
+                    this.form.timeone_type =""
356
+                    this.form.timeone_end = ""
357
+                    this.form.timetwo_start = ""
358
+                    this.form.timetwo_type = ""
359
+                    this.form.timetwo_end=""
360
+                    this.form.work_time = ""
361
+                    this.form.remarks = ""
362
+                  }
363
+               })
364
+             }
365
+          }))
366
+        },
367
+        getList(){
368
+            const params = {
369
+              limit:this.limit,
370
+              page:this.page,         
371
+            }
372
+           getDoctorScheduleList(params).then(response=>{
373
+              if(response.data.state == 1){
374
+                 var schedules = response.data.data.schedules
375
+                  console.log("schedules",schedules)
376
+                 for(let i=0;i<schedules.length;i++){
377
+                    if(schedules[i].class_attributes == 1){
378
+                        schedules[i].class_attributes ="出勤"
379
+                    }
380
+                    if(schedules[i].class_attributes == 2){
381
+                        schedules[i].class_attributes ="缺勤"
382
+                    }
383
+
384
+                    if(schedules[i].timeone_type == 0){
385
+                       schedules[i].timeone_type = ""
386
+                    }
387
+                    if(schedules[i].timeone_type == 1){
388
+                       schedules[i].timeone_type = "当日"
389
+                    }
390
+                    if(schedules[i].timeone_type == 2){
391
+                       schedules[i].timeone_type = "次日"
392
+                    }
393
+                    if(schedules[i].timetwo_type == 0){
394
+                       schedules[i].timetwo_type = ""
395
+                    }
396
+                    if(schedules[i].timetwo_type == 1){
397
+                       schedules[i].timetwo_type = "当日"
398
+                    }
399
+                    if(schedules[i].timetwo_type == 2){
400
+                       schedules[i].timetwo_type = "次日"
401
+                    }
402
+                 }
403
+             
404
+                 this.tableData = schedules
405
+                 var total =  response.data.data.total
406
+                 this.total = total
407
+              }
408
+           })
409
+        },
410
+       handleSizeChange(limit) {
411
+        this.limit = limit;
412
+        this.getList();
413
+      },
414
+        handleCurrentChange(page) {
415
+         this.page = page;
416
+         this.getList();
417
+      },
418
+
419
+      handleEdit(id){
420
+        this.EditNewVisible = true
421
+        getScheduleDetail(id).then(response=>{
422
+           if(response.data.state == 1){
423
+             var scheduleDetail = response.data.data.scheduleDetail
424
+             console.log("scheduledetail",scheduleDetail)
425
+             this.form.id = scheduleDetail.id
426
+             this.form.class_name = scheduleDetail.class_name
427
+             this.form.class_attributes = scheduleDetail.class_attributes
428
+             this.form.timeone_start = scheduleDetail.timeone_start
429
+             this.form.timeone_end = scheduleDetail.timeone_end
430
+             if(scheduleDetail.timeone_type == 0){
431
+                this.form.timeone_type = ""
432
+             }else{
433
+                this.form.timeone_type = scheduleDetail.timeone_type
434
+             }       
435
+             this.form.timetwo_start =scheduleDetail.timetwo_start
436
+             this.form.timetwo_end = scheduleDetail.timetwo_end
437
+              if(scheduleDetail.timetwo_type == 0){
438
+                this.form.timetwo_type = ""
439
+             }else{
440
+                this.form.timetwo_type = scheduleDetail.timetwo_type
441
+             }
442
+             this.form.work_time = scheduleDetail.work_time
443
+             this.form.remarks = scheduleDetail.remarks
444
+             this.form.user_org_id = scheduleDetail.user_org_id
445
+             this.$forceUpdate()
446
+           }
447
+        })
448
+      },
449
+      UpdateSubmitAction(formName){
450
+           if(this.form.timeone_type ==""){
451
+              this.showError = true
452
+              return false
453
+           }
454
+           
455
+           if(this.form.timeone_end == ""){
456
+              this.showError = true
457
+              return false
458
+           }
459
+          const params = {
460
+              id:this.form.id,
461
+             class_name:this.form.class_name,
462
+             class_attributes:this.form.class_attributes,
463
+             timeone_start:this.form.timeone_start,
464
+             timeone_type:this.form.timeone_type,
465
+             timeone_end:this.form.timeone_end,
466
+             timetwo_start:this.form.timetwo_start,
467
+             timetwo_type:this.form.timetwo_type,
468
+             timetwo_end:this.form.timetwo_end,
469
+             work_time:this.form.work_time,
470
+             remarks:this.form.remarks,
471
+             user_org_id:this.form.user_org_id,
472
+         }
473
+        this.$refs[formName].validate(valid=>{
474
+          if(valid){
475
+            UpdateSchedule(params).then(response=>{
476
+             if(response.data.state == 1){
477
+                var schedules =  response.data.data.schedules
478
+                 this.$message.success("修改成功")
479
+                 this.EditNewVisible = false
480
+                 this.getList()
481
+                 
482
+               }
483
+             })
484
+          }
485
+        })
486
+      },
487
+      handleDelete(id,orgid){
488
+        this.$confirm(
489
+          '确认要删除所选记录吗? <br>删除后,信息将无法恢复',
490
+          '删除提示',
491
+          {
492
+            dangerouslyUseHTMLString: true,
493
+            confirmButtonText: '确定',
494
+            cancelButtonText: '取消',
495
+            type: 'warning'
496
+          }
497
+        ).then(()=>{
498
+           deleteScheduleById(id,orgid).then(response=>{
499
+              if(response.data.state == 1){
500
+                var msg = response.data.data.msg
501
+                this.$message.success("删除成功")
502
+                this.getList()
503
+              }
504
+           }) 
505
+        })
506
+      }
507
+    },
508
+    created(){
509
+        //获取班种列表
510
+        this.getList()
511
+    }
512
+}
513
+</script>
514
+<style scoped>
515
+  .el-form-item__error{
516
+    color: #F56C6C;
517
+    font-size: 12px;
518
+    line-height: 1;
519
+    padding-top: 4px;
520
+    position: absolute;
521
+    top: 100%;
522
+    left: 0;
523
+  }
524
+</style>

+ 215 - 0
src/xt_pages/medicalScheduling/index.vue Прегледај датотеку

@@ -0,0 +1,215 @@
1
+<template>
2
+    <div class="main-contain">
3
+        <div class="position">
4
+            <bread-crumb :crumbs="crumbs"></bread-crumb>
5
+            <div style="display:flex;align-items:center">
6
+                <el-button type="primary">清除</el-button>
7
+                <el-button type="primary">复制</el-button>
8
+                <el-button type="primary" icon="el-icon-printer" @click="toPrint">打印</el-button>
9
+            </div>
10
+        </div>
11
+        <div class="app-container">
12
+            <div class="cell clearfix">
13
+                <el-input
14
+                size="small"
15
+                style="width: 150px;"
16
+                class="filter-item"
17
+                v-model.trim="keywords"
18
+                placeholder="病人名称/透析号"
19
+                />
20
+                <el-button
21
+                size="small"
22
+                class="filter-item"
23
+                type="primary"
24
+                icon="el-icon-search"
25
+                @click="search"
26
+                >搜索</el-button
27
+                >
28
+                <el-select style="margin-left:10px;width:150px;" v-model="typeValue" placeholder="请选择">
29
+                    <el-option
30
+                        v-for="item in options"
31
+                        :key="item.value"
32
+                        :label="item.label"
33
+                        :value="item.value">
34
+                    </el-option>
35
+                </el-select>
36
+                <el-button type="text" style="margin:0 10px;">&lt;上一周(22)</el-button>
37
+                <div class="dateBox">2019.11.25-2019.12.01(47)</div>
38
+                <el-button type="text" style="margin:0 10px;">下一周(24)&gt;</el-button>
39
+            </div>
40
+            <div style="display:flex;justify-content: space-between;">
41
+                <div style="width: 70%">
42
+                    <el-table :data="tableData" border :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)', color: '#606266'}" :row-style="{ color: '#303133' }">
43
+                        <el-table-column prop="name" label="医护姓名" style="width:16%" align="center">
44
+                            <template slot-scope="scope">
45
+                                 {{scope.row.user_name}}
46
+                            </template>
47
+                        </el-table-column>
48
+                        <el-table-column label="周一" style="width:14%" align="center">
49
+                            <template slot-scope="scope">
50
+                                <div @click="hangdleClick(scope.row,scope.$index)">
51
+                                    <el-dropdown trigger="click" @command="changeSchedule(scope.row)">
52
+                                        <span class="el-dropdown-link">
53
+                                        aaa<i class="el-icon-arrow-down el-icon--right"></i>
54
+                                        </span>
55
+                                        <el-dropdown-menu slot="dropdown" >
56
+                                            <el-dropdown-item  :command="item.class_name" icon="el-icon-plus" v-for="(item,index) in schedulelist" :key="index">{{item.class_name}}</el-dropdown-item>
57
+                                        </el-dropdown-menu>
58
+                                    </el-dropdown>
59
+                                </div>
60
+                            </template>
61
+                        </el-table-column>
62
+                        <el-table-column prop="name" label="周二" style="width:14%" align="center"></el-table-column>
63
+                        <el-table-column prop="name" label="周三" style="width:14%" align="center"></el-table-column>
64
+                        <el-table-column prop="name" label="周四" style="width:14%" align="center"></el-table-column>
65
+                        <el-table-column prop="name" label="周五" style="width:14%" align="center"></el-table-column>
66
+                        <el-table-column prop="name" label="周六" style="width:14%" align="center"></el-table-column>
67
+                        <el-table-column prop="name" label="周日" style="width:14%" align="center"></el-table-column>
68
+                    </el-table>
69
+                </div>
70
+                <div class="classBox">
71
+                    <div class="classTitle">班种</div>
72
+                    <div class="classMain">
73
+                        <div v-for="(item,index) in schedulelist" :key="index">
74
+                           <p>
75
+                            {{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> )
76
+                           </p>
77
+                        </div>
78
+                        <el-checkbox style="text-align:center" v-model="isChecked">连续排班</el-checkbox>
79
+                    </div>
80
+                </div>
81
+            </div>
82
+        </div>
83
+    </div>
84
+</template>
85
+
86
+
87
+<script>
88
+import BreadCrumb from '@/xt_pages/components/bread-crumb'
89
+import { getDoctorList,getScheduleList } from '@/api/doctorSchedule'
90
+export default {
91
+    components:{
92
+        BreadCrumb
93
+    },
94
+    data(){
95
+        return{
96
+            crumbs: [
97
+                { path: false, name: '医护排班' },
98
+                { path: '/medicalScheduling/index', name: '医护排班' }
99
+            ],
100
+            keywords:'',
101
+            options: [{
102
+                value: '1',
103
+                label: '全部'
104
+            }, {
105
+                value: '2',
106
+                label: '医生'
107
+            }, {
108
+                value: '3',
109
+                label: '护士'
110
+            }],
111
+            typeValue:'1',
112
+            tableData: [],
113
+            isChecked:true,
114
+            schedulelist:[],
115
+
116
+        }
117
+    },
118
+    methods:{
119
+        search(){},
120
+        toPrint(){
121
+            this.$router.push({
122
+                path: '/medicalScheduling/schedule/print',
123
+                // query: { date: date }
124
+            })
125
+        },
126
+      getDoctorList(){
127
+        getDoctorList().then(response=>{
128
+            if(response.data.state == 1){
129
+                var list =  response.data.data.list
130
+                console.log("list",list)
131
+                this.tableData = list
132
+            }
133
+        })
134
+     },
135
+     getScheduleList(){
136
+       getScheduleList().then(response=>{
137
+          if(response.data.state == 1){
138
+             var schedulelist = response.data.data.scheduleList
139
+             for(let i=0;i<schedulelist.length;i++){
140
+                if(schedulelist[i].timeone_type == 1){
141
+                    schedulelist[i].timeone_type = "当日"
142
+                }
143
+                if(schedulelist[i].timeone_type == 2){
144
+                   schedulelist[i].timeone_type = "次日"
145
+                }
146
+               if(schedulelist[i].timetwo_type == 1){
147
+                    schedulelist[i].timetwo_type = "当日"
148
+                }
149
+                if(schedulelist[i].timetwo_type == 2){
150
+                   schedulelist[i].timetwo_type = "次日"
151
+                }
152
+             }
153
+             this.schedulelist = schedulelist
154
+             console.log("schedulelist",schedulelist)
155
+          }
156
+       }) 
157
+     },
158
+     changeSchedule(command){
159
+       console.log("val",command)
160
+     },
161
+     beforeHandleCommand(item,row){
162
+        return {
163
+          'command': item,
164
+          'row': row
165
+        }
166
+     },
167
+     hangdleClick(val,index){
168
+      console.log("点击",val)
169
+      console.log("index",index)
170
+      this.index =index
171
+     }
172
+    },
173
+   created(){
174
+    //获取医护人员
175
+    this.getDoctorList()
176
+    //获取班种
177
+    this.getScheduleList()
178
+  }
179
+}
180
+</script>
181
+
182
+<style lang="scss" scoped>
183
+.dateBox{
184
+    border: 1px solid #DCDFE6;
185
+    height: 36px;
186
+    line-height: 36px;
187
+    text-align: center;
188
+    padding: 0 10px;
189
+    border-radius: 4px;
190
+}
191
+.classBox{
192
+    width:25%;
193
+    height: 100%;
194
+    border: 1px solid #EBEEF5;
195
+    .classTitle{
196
+        height: 42px;
197
+        text-align: center;
198
+        line-height: 42px;
199
+        background-color: rgb(245, 247, 250);
200
+        color: rgb(96, 98, 102);
201
+        font-weight:bold;
202
+        
203
+    }
204
+    .classMain{
205
+        height: 400px;
206
+        padding: 0 20px;
207
+        display: flex;
208
+        justify-content: space-between;
209
+        flex-direction: column;
210
+        >div>p{
211
+            line-height: 30px;
212
+        }
213
+    }
214
+}
215
+</style>

+ 149 - 0
src/xt_pages/medicalScheduling/medical_print.vue Прегледај датотеку

@@ -0,0 +1,149 @@
1
+<template>
2
+    <div class="main-contain">
3
+        <div class="position">
4
+        <bread-crumb :crumbs="crumbs"></bread-crumb>
5
+        <el-row style="float:right;">
6
+            <el-col :span="24">
7
+            <el-button size="small" icon="el-icon-printer" type="primary" @click="printAction">打印</el-button>
8
+            </el-col>
9
+        </el-row>
10
+        </div>
11
+        <div class="app-container" style="background-color: white;">
12
+            <div id="print_content">
13
+                <div class="print_main_content">
14
+                    <div class="order_title_panl">
15
+                        <span class="main_title">{{ $store.getters.xt_user.org.org_name }}医护排班表</span>
16
+                    </div>
17
+                    <div class="table_panel">
18
+                        <table class="table">
19
+                            <thead>
20
+                                <tr>
21
+                                    <td width="120">医护姓名</td>
22
+                                    <td width="120">周一</td>
23
+                                    <td width="120">周二</td>
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
+                                </tr>
30
+                            </thead>
31
+                            <tbody>
32
+                                <tr v-for='item in 6'>
33
+                                    <td>张三</td>
34
+                                    <td>张三</td>
35
+                                    <td>张三</td>
36
+                                    <td>张三</td>
37
+                                    <td>张三</td>
38
+                                    <td>张三</td>
39
+                                    <td>张三</td>
40
+                                    <td>张三</td>
41
+                                </tr>
42
+                            </tbody>
43
+                        </table>
44
+                    </div>
45
+                </div>
46
+            </div>
47
+        </div>
48
+    </div>
49
+</template>
50
+
51
+<script>
52
+import BreadCrumb from '@/xt_pages/components/bread-crumb'
53
+import print from 'print-js'
54
+export default {
55
+    components:{
56
+        BreadCrumb
57
+    },
58
+    data(){
59
+        return{
60
+            crumbs: [
61
+                { path: false, name: '医护排班' },
62
+                { path: false, name: '排班打印' }
63
+            ],
64
+        }
65
+    },
66
+    methods:{
67
+        printAction: function() {
68
+            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; } }'
69
+
70
+            printJS({
71
+            printable: 'print_content',
72
+            type: 'html',
73
+            documentTitle: '  ',
74
+            style: style,
75
+            scanStyles: false
76
+            })
77
+        }
78
+    }
79
+}
80
+</script>
81
+
82
+
83
+<style rel="stylesheet/scss" lang="scss" scoped>
84
+.print_main_content {
85
+  background-color: white;
86
+  max-width: 1500px;
87
+  margin: 0 auto;
88
+  padding: 0 0 20px 0;
89
+
90
+  .order_title_panl {
91
+    text-align: center;
92
+
93
+    .main_title {
94
+      font-size: 18px;
95
+      line-height: 40px;
96
+      font-weight: 500;
97
+    }
98
+  }
99
+  .table_panel {
100
+    .table {
101
+      width: 100%;
102
+      border: 1px solid;
103
+      border-collapse: collapse;
104
+      padding: 2px;
105
+
106
+      thead {
107
+        tr {
108
+          td {
109
+            border: 1px solid;
110
+            text-align: center;
111
+            font-size: 20px;
112
+            padding: 15px 5px;
113
+          }
114
+        }
115
+      }
116
+      tbody {
117
+        tr {
118
+          td {
119
+            border: 1px solid;
120
+            text-align: center;
121
+            font-size: 18px;
122
+            padding: 10px 5px;
123
+
124
+            .proj {
125
+              padding: 5px 0;
126
+              text-align: left;
127
+
128
+              .proj_title {
129
+                font-size: 16px;
130
+                font-weight: 500;
131
+                line-height: 25px;
132
+              }
133
+
134
+              .proj_item {
135
+                font-size: 15px;
136
+                line-height: 20px;
137
+
138
+                .zone_name {
139
+                  font-weight: 500;
140
+                }
141
+              }
142
+            }
143
+          }
144
+        }
145
+      }
146
+    }
147
+  }
148
+}
149
+</style>