Browse Source

hah阿凡达

28169 4 months ago
parent
commit
8d372e6268

+ 19 - 0
src/api/patient.js View File

@@ -1221,4 +1221,23 @@ export function deletePatientDeathSummary(params){
1221 1221
     method:"get",
1222 1222
     params:params
1223 1223
   })
1224
+}
1225
+
1226
+
1227
+export function createNewSickHistoryRecord(data){
1228
+
1229
+  return request({
1230
+    url:"/api/patient/createnewsickhistoryrecord",
1231
+    method:"post",
1232
+    data:data,
1233
+  })
1234
+}
1235
+
1236
+export function getNewSickHistory(){
1237
+
1238
+  return request({
1239
+    url:"/api/patient/getnewsickhistory",
1240
+    method:"get",
1241
+    params:params,
1242
+  })
1224 1243
 }

+ 4 - 0
src/main.js View File

@@ -31,6 +31,10 @@ import './xt_permission'
31 31
 // import '../static/ueditor/lang/zh-cn/zh-cn.js'
32 32
 // import '../static/ueditor/ueditor.parse.min.js'
33 33
 // import './mock' // simulation data
34
+import '../static/ueditor/ueditor.config.js'
35
+import '../static/ueditor/ueditor.all.min.js'
36
+import '../static/ueditor/lang/zh-cn/zh-cn.js'
37
+import '../static/ueditor/ueditor.parse.min.js'
34 38
 import VueClipboard from 'vue-clipboard2'
35 39
 
36 40
 import * as filters from './filters' // global filters

+ 1 - 1
src/xt_pages/user/patientInfo.vue View File

@@ -1,7 +1,7 @@
1 1
 
2 2
 <template>
3 3
   <div class="patient-container">
4
-  <patient-sidebar :id="patientID" v-if="org_id!=0&&org_id!=10702"></patient-sidebar>
4
+  <patient-sidebar :id="patientID" v-if="org_id!=10702"></patient-sidebar>
5 5
   <PatientSidebar_ord :id="patientID" v-if="org_id==10702"></PatientSidebar_ord>
6 6
   <!-- <PatientSidebar_new :id="patientID" v-if="org_id == 0"></PatientSidebar_new> -->
7 7
   <patient-detail :is-edit='true' :class='panelClass' v-on:tran-patient-info="patientInfo=$event"></patient-detail>

+ 1 - 1
src/xt_pages/user/patients.vue View File

@@ -427,7 +427,7 @@
427 427
               :to="'/patients/patient/' + scope.row.id"
428 428
               style="color:#409eff;width:100%;display:block;"
429 429
             >
430
-              <span v-if="scope.row.is_infectious == 1">{{ scope.row.name }}</span> 
430
+              <span v-if="scope.row.is_infectious == 1 || scope.row.is_infectious == 0">{{ scope.row.name }}</span> 
431 431
               <span v-if="scope.row.is_infectious == 2" style="color: red;">{{ scope.row.name }}</span> 
432 432
             </router-link
433 433
             >

+ 62 - 218
src/xt_pages/user/sickHistory_new.vue View File

@@ -51,7 +51,7 @@
51 51
                   <el-button type="primary" size="small" @click="prints">打印</el-button>
52 52
                 </div>
53 53
                 <div v-if="add_index == 1">
54
-                  <el-button type="primary" size="small" @click="showSave">保存</el-button>
54
+                  <el-button type="primary" size="small" @click="createAction">保存2</el-button>
55 55
                   <el-button size="small" @click="showCancel">取消</el-button>
56 56
                 </div>
57 57
               </div>
@@ -60,7 +60,7 @@
60 60
               <div style="flex: 1;">
61 61
                 日期:
62 62
                 <el-date-picker
63
-                  v-model="history_date"
63
+                  v-model="start_time"
64 64
                   type="date"
65 65
                   :disabled="disabled"
66 66
                   style="width: 150px;"
@@ -93,12 +93,12 @@
93 93
             <div style="display: flex;">
94 94
               <div style="width: 30%;">
95 95
                 医生:
96
-                <el-select v-model="shen_yishen" placeholder="请选择" style="width: 120px;" :disabled="disabled">
96
+                <el-select v-model="admin_user_id" placeholder="请选择" style="width: 120px;" :disabled="disabled">
97 97
                   <el-option
98
-                    v-for="item in yishen_options"
99
-                    :key="item.value"
100
-                    :label="item.label"
101
-                    :value="item.value">
98
+                    v-for="item in doctorOptions"
99
+                    :key="item.id"
100
+                    :label="item.name"
101
+                    :value="item.id">
102 102
                   </el-option>
103 103
                 </el-select>
104 104
               </div>
@@ -112,13 +112,14 @@
112 112
                     :value="item.value">
113 113
                   </el-option>
114 114
                 </el-select>
115
+                <el-input v-if="shen_guomi == 2" v-model="guominyaowu_desc"></el-input>
115 116
               </div>
116 117
             </div>
117 118
 
118 119
             <div style="margin-top: 15px;">
119 120
               <span style="display: inline-block;border-left: 5px solid #3891f1f5;padding-left: 5px;margin-bottom: 5px;">详情</span>
120 121
               <keep-alive>
121
-                <ueditor ref="ue" :content="new_content" id="editor"></ueditor>
122
+                <ueditor ref="edit" :content="new_content" id="editor"></ueditor>
122 123
               </keep-alive>
123 124
             </div>
124 125
             <div style="text-align: right;margin-top:10px ;">
@@ -174,7 +175,7 @@
174 175
               <div class="Second_title">模板内容</div>
175 176
               <div style="">
176 177
                 <keep-alive>
177
-                  <ueditor ref="ue" :content="new_content" id="editor"></ueditor>
178
+                  <ueditor ref="editor" id="editors" v-bind:r_content="new_content"></ueditor>
178 179
                 </keep-alive>
179 180
               </div>
180 181
             </div>
@@ -196,156 +197,11 @@
196 197
 
197 198
 
198 199
 
199
-      <!-- </div> -->
200
-      <el-dialog title="新增病史记录" width="70%" top="5vh" :visible.sync="show_dialog">
201
-        <div>
202
-          <div class="new_record_form">
203
-            <div class="cell clearfix" style="margin-bottom: 20px;">
204
-              <label class="title"><span class="name">病程标题</span> : </label>
205
-              <el-input v-model="title" style="width: 150px"></el-input>
206
-
207
-              <label class="title" style="margin-left: 20px;"><span class="name">日期</span> : </label>
208
-              <el-date-picker v-model="sick_history_time" prefix-icon="el-icon-date" :editable="false"
209
-                              style="width: 150px;"
210
-                              type="datetime" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
211
-                              value-format="yyyy-MM-dd "></el-date-picker>
212
-
213
-
214
-              <label class="title" style="margin-left: 20px;"><span class="name">肾移植史</span> : </label>
215
-              <el-select style="width: 150px;" v-model="is_shenyizhishi" placeholder="选择肾移植史" >
216
-                <el-option label="无" value="0"></el-option>
217
-                <el-option label="有" value="1"></el-option>
218
-              </el-select>
219
-            </div>
220
-
221
-            <div class="cell clearfix" style="margin-bottom: 20px;">
222
-
223
-              <label class="title" ><span class="name">腹膜透析史</span> : </label>
224
-              <el-select style="width: 150px;" v-model="is_fumotouxishi" placeholder="选择腹膜透析史" >
225
-                <el-option label="无" value="0"></el-option>
226
-                <el-option label="有" value="1"></el-option>
227
-              </el-select>
228
-
229
-              <label class="title" style="margin-left: 20px;"><span class="name">医生</span> : </label>
230
-              <el-select style="width: 100px;" v-model="doctor_id" placeholder="请选择医生">
231
-                <el-option v-for="(item,index) in doctorOptions" :label="item.name" :value="item.id" :key="index"></el-option>
232
-              </el-select>
233
-
234
-              <label class="title" style="margin-left: 20px;"><span class="name">过敏药物</span> : </label>
235
-              <el-select style="width: 100px;" v-model="is_guominyaowu" placeholder="选择过敏药物">
236
-                <el-option label="无" value="0"></el-option>
237
-                <el-option label="有" value="1"></el-option>
238
-                <el-option label="不详" value="2"></el-option>
239
-
240
-              </el-select>
241
-              <el-input v-if="is_guominyaowu == 1" v-model="guominyaowu_desc"></el-input>
242
-
243
-            </div>
244
-
245
-            <div class="cell clearfix" >
246
-              <label class="title"><span class="name">病史模版</span> : </label>
247
-              <el-select v-model="select_template" placeholder="选择病史模板" @change="didSelectTemplate">
248
-                <el-option v-for="(option, index) in templates" :key="index" :label="option.title"
249
-                           :value="option.content"></el-option>
250
-              </el-select>
251
-            </div>
252
-
253
-            <div class="textarea_panel">
254
-              <keep-alive>
255
-                <editor ref="editor"
256
-                        id="editors"
257
-                        style="width: 100%"
258
-                        v-bind:r_content="new_content"
259
-                >
260
-                </editor>
261
-              </keep-alive>
262
-            </div>
263
-
264
-            <div style="text-align: right; padding-right: 0px; padding-top: 20px; padding-bottom: 10px;">
265
-              <el-button @click="show_dialog = false">取消</el-button>
266
-              <el-button :disabled="$store.getters.xt_user.subscibe.state==3?true:false" type="primary"
267
-                         @click="createAction" :loading="uploading_new_record">保存
268
-              </el-button>
269
-            </div>
270
-          </div>
271
-        </div>
272
-      </el-dialog>
273
-
274
-      <el-dialog title="修改病史记录" width="50%" top="5vh" :visible.sync="show_edit_dialog">
275
-        <div>
276
-          <div class="new_record_form">
277
-            <div class="cell clearfix" style="margin-bottom: 20px;">
278
-              <label class="title"><span class="name">病程标题</span> : </label>
279
-              <el-input v-model="edit_title" style="width: 150px"></el-input>
280
-
281
-              <label class="title" style="margin-left: 20px;"><span class="name">日期</span> : </label>
282
-              <el-date-picker v-model="edit_sick_history_time" prefix-icon="el-icon-date" :editable="false"
283
-                              style="width: 150px;"
284
-                              type="datetime" placeholder="选择日期时间" align="right" format="yyyy-MM-dd "
285
-                              value-format="yyyy-MM-dd "></el-date-picker>
286
-
287
-
288
-              <label class="title" style="margin-left: 20px;"><span class="name">肾移植史</span> : </label>
289
-              <el-select style="width: 150px;" v-model="edit_is_shenyizhishi" placeholder="选择肾移植史" >
290
-                <el-option label="无" value="0"></el-option>
291
-                <el-option label="有" value="1"></el-option>
292
-              </el-select>
293
-            </div>
294
-
295
-            <div class="cell clearfix" style="margin-bottom: 20px;">
296
-
297
-              <label class="title" ><span class="name">腹膜透析史</span> : </label>
298
-              <el-select style="width: 150px;" v-model="edit_is_fumotouxishi" placeholder="选择腹膜透析史" >
299
-                <el-option label="无" value="0"></el-option>
300
-                <el-option label="有" value="1"></el-option>
301
-              </el-select>
302
-
303
-              <label class="title" style="margin-left: 20px;"><span class="name">医生</span> : </label>
304
-              <el-select style="width: 100px;" v-model="edit_doctor_id" placeholder="请选择医生">
305
-                <el-option v-for="(item,index) in doctorOptions" :label="item.name" :value="item.id" :key="index"></el-option>
306
-              </el-select>
307
-
308
-              <label class="title" style="margin-left: 20px;"><span class="name">过敏药物</span> : </label>
309
-              <el-select style="width: 100px;" v-model="edit_is_guominyaowu" placeholder="选择过敏药物">
310
-                <el-option label="无" value="0"></el-option>
311
-                <el-option label="有" value="1"></el-option>
312
-              </el-select>
313
-              <el-input v-if="edit_is_guominyaowu == 1" v-model="edit_guominyaowu_desc"></el-input>
314
-
315
-            </div>
316
-
317
-            <div class="cell clearfix">
318
-              <label class="title"><span class="name">病史模版</span> : </label>
319
-              <el-select v-model="select_template" placeholder="选择病史模板" @change="didSelectTemplate">
320
-                <el-option v-for="(option, index) in templates" :key="index" :label="option.title"
321
-                           :value="option.content"></el-option>
322
-              </el-select>
323
-            </div>
324
-
325
-            <div class="textarea_panel">
326
-              <keep-alive>
327
-                <editor ref="edit_neditor"
328
-                        id="editors"
329
-                        style="width: 100%"
330
-                        v-bind:r_content="edit_new_content"
331
-                >
332
-                </editor>
333
-              </keep-alive>
334
-            </div>
335
-
336
-
337
-            <div style="text-align: right; padding-right: 0px; padding-top: 20px; padding-bottom: 10px;">
338
-              <el-button @click="show_edit_dialog = false">取消</el-button>
339
-              <el-button type="primary"
340
-                         @click="modifyAction" :loading="uploading_new_record">保存
341
-              </el-button>
342
-            </div>
343
-          </div>
344
-        </div>
345
-      </el-dialog>
200
+     
201
+     
346 202
     </div>
347 203
   </div>
348
-  <!-- </div> -->
204
+ 
349 205
 </template>
350 206
 
351 207
 <script>
@@ -356,9 +212,9 @@ import ueditor from '@/components/Uedtior'
356 212
 import { fetchAllDoctorAndNurse } from "@/api/doctor";
357 213
  import print from 'print-js'
358 214
 import {
359
-  createSickHistoryRecord,
215
+  createNewSickHistoryRecord,
360 216
   deleteSickHistoryRecords,
361
-  GetSickHistoryRecords,
217
+  getNewSickHistory,
362 218
   ModifySickHistoryRecord,
363 219
 } from '@/api/patient'
364 220
 import { parseTime } from '@/utils'
@@ -402,7 +258,7 @@ export default {
402 258
       uploading_new_record: false,
403 259
       templates: this.$store.getters.configlist.sick_history,
404 260
       select_template:"",
405
-      new_content: '111111',
261
+      new_content: '',
406 262
       edit_new_content: '',
407 263
       edit_sick_history_time: '',
408 264
       selectingRows: [],
@@ -427,11 +283,15 @@ export default {
427 283
       yizhi_options:[{value:1,label:'无'},{value:2,label:'有'}],
428 284
       yishen_options:[],
429 285
       guomi_options:[{value:1,label:'无'},{value:2,label:'有'},{value:3,label:'不详'}],
430
-      tableData:[{index:1,date:'2024-11-12',doctor:'王启年'}],
286
+      tableData:[],
287
+      admin_user_id:"",
431 288
     }
432 289
   },
433 290
   created() {
291
+    this.admin_user_id = this.$store.getters.xt_user.user.id
292
+    
434 293
     this.patient_id = parseInt(this.$route.query.id)
294
+
435 295
     if (isNaN(this.patient_id) || this.patient_id <= 0) {
436 296
       this.$notify.error({
437 297
         title: '错误',
@@ -464,7 +324,7 @@ export default {
464 324
       '-' +
465 325
       (nowDay < 10 ? '0' + nowDay : nowDay)
466 326
 
467
-    this.requestSickHistory()
327
+    this.getlist()
468 328
     this.fetchAllDoctorAndNurse()
469 329
 
470 330
   },
@@ -476,6 +336,9 @@ export default {
476 336
     // },10)
477 337
   },
478 338
   methods: {
339
+    template_dele(){
340
+
341
+    },
479 342
     add_click(){
480 343
       this.disabled = false
481 344
       this.add_index = 1
@@ -529,29 +392,7 @@ export default {
529 392
         }
530 393
       });
531 394
     },
532
-    requestSickHistory: function() {
533
-      this.loading = true
534
-      let params = {
535
-        patient_id:this.patient_id,
536
-        start_time:this.start_time,
537
-        end_time:this.end_time,
538
-      }
539
-      GetSickHistoryRecords(params).then(rs => {
540
-        this.loading = false
541
-        var resp = rs.data
542
-        if (resp.state == 1) {
543
-          this.current_select_record = null
544
-          this.records = resp.data.records
545
-          this.doctors = resp.data.doctors
546
-          this.$refs.record_table.setCurrentRow(this.records[0])
547
-        } else {
548
-          this.$message.error(resp.msg)
549
-        }
550
-      }).catch(error => {
551
-        this.loading = false
552
-        this.$message.error(error)
553
-      })
554
-    },
395
+  
555 396
 
556 397
     didChangeCurrentRecord: function(record) {
557 398
       this.current_select_record = record
@@ -577,16 +418,16 @@ export default {
577 418
       }
578 419
       this.uploading_new_record = true
579 420
       let params = {
580
-        id:this.edit_current_id,
421
+        id:this.id,
581 422
         patient_id: this.patient_id,
582
-        content: this.edit_new_content,
583
-        record_time: this.edit_sick_history_time + " 00:00:00",
584
-        title: this.edit_title,
585
-        is_shenyizhishi:this.edit_is_shenyizhishi,
586
-        is_fumotouxishi:this.edit_is_fumotouxishi,
587
-        is_guominyaowu:this.edit_is_guominyaowu,
588
-        guominyaowu_desc:this.edit_guominyaowu_desc,
589
-        doctor_id: this.edit_doctor_id
423
+        content: this.new_content,
424
+        record_time: this.sick_history_time +" 00:00:00",
425
+        title: this.title,
426
+        is_shenyizhishi:this.shen_yizhi,
427
+        is_fumotouxishi:this.shen_fumo,
428
+        is_guominyaowu:this.shen_guomi,
429
+        guominyaowu_desc:this.guominyaowu_desc,
430
+        doctor_id: this.admin_user_id
590 431
       }
591 432
 
592 433
       ModifySickHistoryRecord(params).then(rs => {
@@ -619,36 +460,30 @@ export default {
619 460
     },
620 461
 
621 462
     createAction: function() {
622
-      this.new_content = this.$refs.editor.content
463
+    
464
+      this.new_content = this.$refs.edit.contents
623 465
       if (this.new_content.length == 0) {
624 466
         this.$message.error('请填写病程内容')
625 467
         return
626 468
       }
627
-      this.uploading_new_record = true
628 469
       let params = {
629 470
         patient_id: this.patient_id,
630 471
         content: this.new_content,
631
-        record_time: this.sick_history_time +" 00:00:00",
472
+        record_time: this.start_time,
632 473
         title: this.title,
633
-        is_shenyizhishi:this.is_shenyizhishi,
634
-        is_fumotouxishi:this.is_fumotouxishi,
635
-        is_guominyaowu:this.is_guominyaowu,
474
+        is_shenyizhishi:this.shen_yizhi,
475
+        is_fumotouxishi:this.shen_fumo,
476
+        is_guominyaowu:this.shen_guomi,
636 477
         guominyaowu_desc:this.guominyaowu_desc,
637
-        doctor_id: this.doctor_id
478
+        doctor_id: this.admin_user_id
638 479
       }
639
-      createSickHistoryRecord(params).then(rs => {
640
-        this.uploading_new_record = false
641
-        this.$message.success("新增成功")
642
-        var resp = rs.data
643
-        if (resp.state == 1) {
644
-          this.records.unshift(resp.data.record)
645
-          this.show_dialog = false
646
-          this.new_content = ''
647
-          this.title = ''
648
-          this.$refs.record_table.setCurrentRow(this.records[0])
649
-        } else {
650
-          this.$message.error(resp.msg)
651
-        }
480
+      console.log("params-------------",params)
481
+      createNewSickHistoryRecord(params).then(response => {
482
+         if(response.data.state == 1){
483
+           var patientSickHistory = response.data.data.patientSickHistory
484
+           this.$message.success("保存成功!")
485
+           
486
+         }
652 487
 
653 488
       }).catch(error => {
654 489
         this.uploading_new_record = false
@@ -712,10 +547,6 @@ export default {
712 547
         this.loading = false
713 548
         this.$message.error(err)
714 549
       })
715
-    }, startTimeChange(val) {
716
-      this.requestSickHistory()
717
-    }, endTimeChange(val) {
718
-      this.requestSickHistory()
719 550
     },
720 551
     showDialog(){
721 552
       for(let i = 0; i < this.doctorOptions.length; i++){
@@ -760,6 +591,19 @@ export default {
760 591
         return
761 592
       }
762 593
       this.$router.push({ path: "/sickhistory/print?ids="+this.ids+"&patient_id="+this.patient_id});
594
+    },
595
+    getlist(){
596
+       var params = {
597
+        patient_id:this.patient_id
598
+       }
599
+       console.log("paraosm===============",params)
600
+      getNewSickHistory(params).then(response=>{
601
+        if(response.data.state ==1 ){
602
+          var list = response.data.data.list
603
+          console.log("类别===============",list)
604
+          this.tableData = list
605
+        } 
606
+      })
763 607
     }
764 608
   }
765 609
 }

File diff suppressed because it is too large
+ 29357 - 29153
static/ueditor/ueditor.all.js


File diff suppressed because it is too large
+ 1 - 1
static/ueditor/ueditor.all.min.js


+ 3 - 3
static/ueditor/ueditor.config.js View File

@@ -229,9 +229,9 @@
229 229
         //]
230 230
 
231 231
         //打开右键菜单功能
232
-        //,enableContextMenu: true
232
+        // ,enableContextMenu: true
233 233
         //右键菜单的内容,可以参考plugins/contextmenu.js里边的默认菜单的例子,label留空支持国际化,否则以此配置为准
234
-        //,contextMenu:[
234
+        // ,contextMenu:[
235 235
         //    {
236 236
         //        label:'',       //显示的名称
237 237
         //        cmdName:'selectall',//执行的command命令,当点击这个右键菜单时
@@ -241,7 +241,7 @@
241 241
         //            //this.ui._dialogs['inserttableDialog'].open();
242 242
         //        }
243 243
         //    }
244
-        //]
244
+        // ]
245 245
 
246 246
         //快捷菜单
247 247
         //,shortcutMenu:["fontfamily", "fontsize", "bold", "italic", "underline", "forecolor", "backcolor", "insertorderedlist", "insertunorderedlist"]

File diff suppressed because it is too large
+ 878 - 1
static/ueditor/ueditor.parse.min.js