mainqaq 2 年之前
父節點
當前提交
e6a44d8c34
共有 1 個文件被更改,包括 272 次插入170 次删除
  1. 272 170
      src/xt_pages/outpatientDoctorStation/batch_mode_template.vue

+ 272 - 170
src/xt_pages/outpatientDoctorStation/batch_mode_template.vue 查看文件

50
           </div>
50
           </div>
51
         </div>
51
         </div>
52
 
52
 
53
-        <!--<button @click="lili">调试</button>-->
53
+        <button @click="lili">调试</button>
54
         <el-button @click="save">保存</el-button>
54
         <el-button @click="save">保存</el-button>
55
       </div>
55
       </div>
56
 
56
 
81
             v-model="editableTabsValue"
81
             v-model="editableTabsValue"
82
             type="border-card"
82
             type="border-card"
83
             editable
83
             editable
84
+            @tab-click="dian"
84
             @edit="handleTabsEdit"
85
             @edit="handleTabsEdit"
85
           >
86
           >
86
             <el-tab-pane
87
             <el-tab-pane
88
               :key="index"
89
               :key="index"
89
               :label="item.title"
90
               :label="item.title"
90
               :name="item.name"
91
               :name="item.name"
92
+
91
             >
93
             >
92
               <el-select
94
               <el-select
93
                 v-model="item.patient_value"
95
                 v-model="item.patient_value"
96
                 style="width: 50%"
98
                 style="width: 50%"
97
               >
99
               >
98
                 <el-option
100
                 <el-option
99
-                  v-for="item in options_patient"
101
+                  v-for="item in options_2"
100
                   :key="item.id"
102
                   :key="item.id"
101
                   :label="item.name"
103
                   :label="item.name"
102
                   :value="item.id"
104
                   :value="item.id"
122
                       v-model="scope.row.drug_name"
124
                       v-model="scope.row.drug_name"
123
                       placeholder="请选择"
125
                       placeholder="请选择"
124
                       @focus="clicktmp(item.patient_value, scope.row)"
126
                       @focus="clicktmp(item.patient_value, scope.row)"
125
-                      @change="changeid(scope.row)"
127
+                      @change="changeid(scope.row,scope.$index)"
126
                     >
128
                     >
127
                       <el-option
129
                       <el-option
128
                         v-for="item in tmplist"
130
                         v-for="item in tmplist"
148
                     >
150
                     >
149
                       <el-option
151
                       <el-option
150
                         v-for="item in unit"
152
                         v-for="item in unit"
151
-                        :key="item.id"
153
+                        :key="item.name"
152
                         :label="item.name"
154
                         :label="item.name"
153
-                        :value="item.id"
155
+                        :value="item.name"
154
                       >
156
                       >
155
                       </el-option>
157
                       </el-option>
156
                     </el-select>
158
                     </el-select>
212
                     >
214
                     >
213
                       <el-option
215
                       <el-option
214
                         v-for="item in unit"
216
                         v-for="item in unit"
215
-                        :key="item.id"
217
+                        :key="item.name"
216
                         :label="item.name"
218
                         :label="item.name"
217
-                        :value="item.id"
219
+                        :value="item.name"
218
                       >
220
                       >
219
                       </el-option>
221
                       </el-option>
220
                     </el-select>
222
                     </el-select>
223
                 <el-table-column label="单价" width="120">
225
                 <el-table-column label="单价" width="120">
224
                   <template slot-scope="scope">
226
                   <template slot-scope="scope">
225
                     <el-input
227
                     <el-input
226
-                      :disabled="true"
227
                       v-model="scope.row.price"
228
                       v-model="scope.row.price"
228
                       style="width: 80px"
229
                       style="width: 80px"
229
                     ></el-input
230
                     ></el-input
276
                       v-model="scope.row.drug_name"
277
                       v-model="scope.row.drug_name"
277
                       placeholder="请选择"
278
                       placeholder="请选择"
278
                       @focus="clicktmp(item.patient_value, scope.row)"
279
                       @focus="clicktmp(item.patient_value, scope.row)"
279
-                      @change="changeid(scope.row)"
280
+                      @change="changeid2(scope.row,scope.$index)"
280
                     >
281
                     >
281
                       <el-option
282
                       <el-option
282
                         v-for="item in tmplist"
283
                         v-for="item in tmplist"
289
                   </template>
290
                   </template>
290
                 </el-table-column>
291
                 </el-table-column>
291
                 <el-table-column label="组" width="120">
292
                 <el-table-column label="组" width="120">
292
-                  <template slot-scope="scope">
293
-                    <el-input
294
-                      v-model="scope.row.single_dose"
295
-                      placeholder="请输入内容"
296
-                    ></el-input>
293
+                  <template slot-scope="scope" width="100">
294
+                    {{scrope.row.translate}}
297
                   </template>
295
                   </template>
298
                 </el-table-column>
296
                 </el-table-column>
299
                 <el-table-column label="单次用量" width="120">
297
                 <el-table-column label="单次用量" width="120">
302
                       v-model="scope.row.single_dose"
300
                       v-model="scope.row.single_dose"
303
                       placeholder="请输入内容"
301
                       placeholder="请输入内容"
304
                     ></el-input>
302
                     ></el-input>
305
-                    单位
303
+                    {{ scope.row.unit }}
306
                   </template>
304
                   </template>
307
                 </el-table-column>
305
                 </el-table-column>
308
                 <el-table-column label="用法" width="120">
306
                 <el-table-column label="用法" width="120">
352
                       v-model="scope.row.prescribing_number"
350
                       v-model="scope.row.prescribing_number"
353
                       placeholder="请输入内容"
351
                       placeholder="请输入内容"
354
                     ></el-input>
352
                     ></el-input>
355
-                    单位
353
+                    {{ scope.row.unit }}
356
                   </template>
354
                   </template>
357
                 </el-table-column>
355
                 </el-table-column>
358
                 <el-table-column label="单价" width="120">
356
                 <el-table-column label="单价" width="120">
359
-                  <template slot-scope="scope">
357
+                  <template slot-scope="scope"><!--:disabled="true"-->
360
                     <el-input
358
                     <el-input
361
-                      :disabled="true"
362
                       v-model="scope.row.price"
359
                       v-model="scope.row.price"
363
                     ></el-input
360
                     ></el-input
364
                     >元
361
                     >元
374
                 </el-table-column>
371
                 </el-table-column>
375
                 <el-table-column fixed="right" label="操作" width="120">
372
                 <el-table-column fixed="right" label="操作" width="120">
376
                   <template slot-scope="scope">
373
                   <template slot-scope="scope">
374
+                    <el-button
375
+                      @click.native.prevent="addopen(scope.$index)"
376
+                      type="text"
377
+                      size="small">
378
+                      推送
379
+                    </el-button>
377
                     <el-button
380
                     <el-button
378
                       @click.native.prevent="
381
                       @click.native.prevent="
379
-                        addRow(scope.$index, item.tableDatas)
382
+                        addRow2(scope.$index, item.project)
380
                       "
383
                       "
381
                       type="text"
384
                       type="text"
382
                       size="small"
385
                       size="small"
385
                     </el-button>
388
                     </el-button>
386
                     <el-button
389
                     <el-button
387
                       @click.native.prevent="
390
                       @click.native.prevent="
388
-                        deleteRow(scope.$index, item.tableDatas)
391
+                        deleteRow(scope.$index, item.project)
389
                       "
392
                       "
390
                       type="text"
393
                       type="text"
391
                       size="small"
394
                       size="small"
396
                 </el-table-column>
399
                 </el-table-column>
397
               </el-table>
400
               </el-table>
398
             </el-tab-pane>
401
             </el-tab-pane>
399
-         
402
+
400
           </el-tabs>
403
           </el-tabs>
401
         </el-main>
404
         </el-main>
402
       </el-container>
405
       </el-container>
403
     </div>
406
     </div>
407
+    <el-dialog
408
+      title="推送频率设置"
409
+      :visible.sync="dialogVisible"
410
+      width="30%"
411
+      :before-close="handleClose">
412
+      <span>周期提醒</span>
413
+      <el-radio-group v-model="frequency_type">
414
+        <el-radio :label="1">每次必推</el-radio>
415
+        <el-radio :label="2">天数频率</el-radio>
416
+        <el-radio :label="3">星期频率</el-radio>
417
+      </el-radio-group>
418
+      <div v-if="frequency_type == 2">
419
+        <el-input style="width: 50px" v-model="day_count"></el-input>&nbsp;
420
+        天/一次
421
+      </div>
422
+      <div v-if="frequency_type == 3">
423
+        <el-checkbox-group v-model="week_days">
424
+          <el-checkbox label="周一" name="周一" key="1">周一</el-checkbox>
425
+          <el-checkbox label="周二" name="周二" key="2">周二</el-checkbox>
426
+          <el-checkbox label="周三" name="周三" key="3">周三</el-checkbox>
427
+          <el-checkbox label="周四" name="周四" key="4">周四</el-checkbox>
428
+          <el-checkbox label="周五" name="周五" key="5">周五</el-checkbox>
429
+          <el-checkbox label="周六" name="周六" key="6">周六</el-checkbox>
430
+          <el-checkbox label="周日" name="周日" key="7">周日</el-checkbox>
431
+        </el-checkbox-group>
432
+      </div>
433
+
434
+      <span slot="footer" class="dialog-footer">
435
+        <button @click="lili">调试</button>
436
+    <el-button @click="dialogVisible = false">取 消</el-button>
437
+    <el-button type="primary" @click="baocun">确 定</el-button>
438
+  </span>
439
+    </el-dialog>
404
   </div>
440
   </div>
405
 </template>
441
 </template>
406
 <script>
442
 <script>
409
   getdialysismodename,
445
   getdialysismodename,
410
   getdrugsname,
446
   getdrugsname,
411
   getmodeconfigs,
447
   getmodeconfigs,
448
+  getdrugsinformation,
412
 } from "@/api/batch/batch";
449
 } from "@/api/batch/batch";
413
 
450
 
414
 export default {
451
 export default {
415
   data() {
452
   data() {
416
     return {
453
     return {
454
+      dialogVisible: false,
417
       patientList: [{ id: 1, name: "张三" }],
455
       patientList: [{ id: 1, name: "张三" }],
418
       tableList: [],
456
       tableList: [],
419
-      editableTabsValue: "2",
457
+      editableTabsValue: "1",
420
       modeOptions: {},
458
       modeOptions: {},
421
       editableTabs: [
459
       editableTabs: [
422
         {
460
         {
423
-          title: "Tab 1",
461
+          title: "处方1",
424
           name: "1",
462
           name: "1",
425
           patient_value: 1,
463
           patient_value: 1,
426
           tableDatas: [
464
           tableDatas: [
442
             {
480
             {
443
               id: "",
481
               id: "",
444
               drug_name: "王小美",
482
               drug_name: "王小美",
483
+              translate:"组",
445
               single_dose: 0,
484
               single_dose: 0,
446
-              single_dose_unit: "",
447
-              delivery_way: "给药途径",
448
-              execution_frequency: "执行频率",
449
-              day: 0,
450
-              prescribing_number: 0,
451
-              prescribing_number_unit: "",
452
-              price: "",
453
-              remark: "",
454
-            },
455
-          ],
456
-        },
457
-        {
458
-          title: "Tab 2",
459
-          name: "2",
460
-          patient_value: 1,
461
-          tableDatas: [
462
-            {
463
-              id: "",
464
-              drug_name: "",
465
-              single_dose: 0,
466
-              single_dose_unit: "",
467
-              delivery_way: "给药途径",
468
-              execution_frequency: "执行频率",
469
-              day: 0,
470
-              prescribing_number: 0,
471
-              prescribing_number_unit: "",
472
-              price: "",
473
-              remark: "",
474
-            },
475
-          ],
476
-          project: [
477
-            {
478
-              id: "",
479
-              drug_name: "王小美",
480
-              single_dose: 0,
481
-              single_dose_unit: "",
485
+              unit: "嘎",
482
               delivery_way: "给药途径",
486
               delivery_way: "给药途径",
483
               execution_frequency: "执行频率",
487
               execution_frequency: "执行频率",
484
               day: 0,
488
               day: 0,
485
               prescribing_number: 0,
489
               prescribing_number: 0,
486
-              prescribing_number_unit: "",
487
               price: "",
490
               price: "",
488
               remark: "",
491
               remark: "",
492
+              frequency_type:"",
493
+              day_count:"",
494
+              week_days:"",
489
             },
495
             },
490
           ],
496
           ],
491
         },
497
         },
493
       tabIndex: 2,
499
       tabIndex: 2,
494
       modeOptions_value: 1, //透析模式
500
       modeOptions_value: 1, //透析模式
495
       multipleSelection: [],
501
       multipleSelection: [],
496
-      tableData: [],
497
-      options: [
498
-        { id: 1, name: "药品" },
499
-        { id: 2, name: "项目" },
500
-      ],
501
-      options_patient: [
502
-        { id: 1, name: "普通门诊" },
503
-        { id: 2, name: "门诊特殊病" },
504
-      ],
505
-      new_type: 1, //新增类型
506
-      patient_value: 1, //是否选择所有患者
507
-      druglist: [], //药品规格_门诊特殊
508
-      druglist2: [], //药品规格_普通
509
-      projectlist: [], //项目规格—特俗
510
-      projectlist2: [], //项目规格——普通
511
-      tmplist: [], //临时
512
-      unit: [
513
-        { id: 1, name: "g" },
514
-        { id: 2, name: "mg" },
515
-        { id: 3, name: "u" },
516
-        { id: 4, name: "ml" },
517
-        { id: 5, name: "万U" },
518
-        { id: 6, name: "枚" },
519
-        { id: 7, name: "粒" },
520
-        { id: 8, name: "片" },
521
-        { id: 9, name: "支" },
522
-        { id: 10, name: "μg" },
523
-        { id: 11, name: "iu" },
524
-        { id: 12, name: "包" },
525
-        { id: 13, name: "袋" },
526
-        { id: 14, name: "万" },
527
-        { id: 15, name: "万iu" },
528
-        { id: 16, name: "丸" },
529
-        { id: 17, name: "盒" },
530
-        { id: 18, name: "瓶" },
531
-        { id: 19, name: "瓶(袋)" },
532
-        { id: 20, name: "次" },
533
-      ],
534
-      usage: [], //用法
535
-      frequency: [], //频率
536
-    };
502
+      tableData:[],
503
+      options:[{id:1,name:"药品"},{id:2,name:"项目"}],
504
+      options_patient:[{id:1,name:"是"},{id:2,name:"否"}],
505
+      options_2:[{id:1,name:"普通门诊"},{id:2,name:"门诊特殊病"}],
506
+      new_type:1,//新增类型
507
+      patient_value:1,//是否选择所有患者
508
+      druglist:[],//药品规格_门诊特殊
509
+      druglist2:[],//药品规格_普通
510
+      projectlist:[],//项目规格—特俗
511
+      projectlist2:[],//项目规格——普通
512
+      tmplist:[],//临时
513
+      unit:[{id:1,name:"g"},{id:2,name:"mg"},{id:3,name:"u"},{id:4,name:"ml"},{id:5,name:"万U"},{id:6,name:"枚"},{id:7,name:"粒"},
514
+        {id:8,name:"片"},{id:9,name:"支"},{id:10,name:"μg"},{id:11,name:"iu"},{id:12,name:"包"},{id:13,name:"袋"},{id:14,name:"万"},
515
+        {id:15,name:"万iu"},{id:16,name:"丸"},{id:17,name:"盒"},{id:18,name:"瓶"},{id:19,name:"瓶(袋)"},{id:20,name:"次"}],
516
+      usage:[],//用法
517
+      frequency:[],//频率
518
+      frequency_type:"",//周期提醒
519
+      day_count:"",//周期提醒天
520
+      week_days:[],//周期提醒星期
521
+      tabhang:0,//tab的下标
522
+      hang:0,//行数
523
+
524
+    }
537
   },
525
   },
538
   created() {
526
   created() {
539
     // console.log("this.$store.getters.treatment_mode",this.$store.getters.treatment_mode)
527
     // console.log("this.$store.getters.treatment_mode",this.$store.getters.treatment_mode)
540
     for (let key in this.$store.getters.treatment_mode) {
528
     for (let key in this.$store.getters.treatment_mode) {
541
-      this.modeOptions[key] = this.$store.getters.treatment_mode[key];
529
+      this.modeOptions[key] = this.$store.getters.treatment_mode[key]
542
     }
530
     }
543
     // console.log("this.modeOptions",this.modeOptions)
531
     // console.log("this.modeOptions",this.modeOptions)
544
     this.getusernames();
532
     this.getusernames();
559
     },
547
     },
560
 
548
 
561
     lili() {
549
     lili() {
562
-      console.log("this.editableTabs", this.editableTabs);
563
-      // console.log("this.projectlist",this.projectlist)
564
-      // console.log("this.druglist2",this.druglist2)
550
+      console.log("this.hang",this.hang);
551
+      console.log("this.week_days",this.week_days)
552
+      console.log("this.editableTabs",this.editableTabs)
565
       // console.log("this.projectlist2",this.projectlist2)
553
       // console.log("this.projectlist2",this.projectlist2)
566
       // console.log("patient_value",this.patient_value)
554
       // console.log("patient_value",this.patient_value)
567
     },
555
     },
568
-    changeid(item, index) {
569
-      console.log("ididiididid", item);
570
-      console.log("index", index);
571
-      item.id = item.drug_name;
556
+    addopen(hang){
557
+      this.hang = hang
558
+      //清空
559
+      this.week_days = [];
560
+      this.day_count = "";
561
+      this.frequency_type = 1;
562
+      this.dialogVisible = true
563
+    },
564
+    baocun(){
565
+      let tmp = ""
566
+      for (let i = 0;i < this.week_days.length;i++){
567
+        tmp = tmp+","+this.week_days[i]
568
+      }
569
+      console.log("tmp",tmp)
570
+      this.editableTabs[this.tabhang].project[this.hang].frequency_type = this.frequency_type
571
+      this.editableTabs[this.tabhang].project[this.hang].day_count = this.day_count
572
+      this.editableTabs[this.tabhang].project[this.hang].week_days = tmp
573
+      this.dialogVisible = false
572
     },
574
     },
573
-    clicktmp(tmp, item) {
574
-      console.log("hahahhatmp", tmp);
575
-      console.log("hahahitem", item);
576
-      if (this.new_type == 1) {
577
-        if (tmp == 2) {
578
-          this.tmplist = this.druglist;
579
-        } else {
580
-          this.tmplist = this.druglist2;
575
+    dian(tab,event){
576
+      console.log("tabtabtabtab",tab.index)
577
+      this.tabhang = tab.index
578
+    },
579
+    changeid(item,index){
580
+      console.log("this.tabhang",this.tabhang)
581
+      console.log("this.hang",this.hang)
582
+      this.hang = index
583
+      item.id = item.drug_name
584
+      var params = {
585
+        id:item.id
586
+      }
587
+      getdrugsinformation(params).then((res) =>{
588
+        if (res.data.state == 1){
589
+          console.log("res??",res)
590
+          this.editableTabs[this.tabhang].tableDatas[this.hang].single_dose = res.data.data.list[0].single_dose;
591
+          this.editableTabs[this.tabhang].tableDatas[this.hang].single_dose_unit = res.data.data.list[0].single_dose_unit;
592
+          this.editableTabs[this.tabhang].tableDatas[this.hang].delivery_way = res.data.data.list[0].delivery_way;
593
+          this.editableTabs[this.tabhang].tableDatas[this.hang].execution_frequency = res.data.data.list[0].execution_frequency;
594
+          this.editableTabs[this.tabhang].tableDatas[this.hang].day = res.data.data.list[0].drug_day;
595
+          this.editableTabs[this.tabhang].tableDatas[this.hang].prescribing_number = res.data.data.list[0].prescribing_number;
596
+          this.editableTabs[this.tabhang].tableDatas[this.hang].prescribing_number_unit = res.data.data.list[0].prescribing_number_unit;
597
+          this.editableTabs[this.tabhang].tableDatas[this.hang].price = res.data.data.list[0].retail_price;
598
+          this.editableTabs[this.tabhang].tableDatas[this.hang].remark = res.data.data.list[0].remark;
599
+        }
600
+      })
601
+    },
602
+    changeid2(item,index){
603
+      console.log("ididiididid",item)
604
+      console.log("index???",index)
605
+      this.hang = index
606
+      item.id = item.drug_name
607
+      var params = {
608
+        id:item.id
609
+      }
610
+      getdrugsinformation(params).then((res) =>{
611
+        if (res.data.state == 1){
612
+          console.log("res??",res)
613
+          this.editableTabs[this.tabhang].project[this.hang].single_dose = res.data.data.list[0].single_dose;
614
+          this.editableTabs[this.tabhang].project[this.hang].translate = res.data.data.list[0].translate;
615
+          this.editableTabs[this.tabhang].project[this.hang].delivery_way = res.data.data.list[0].delivery_way;
616
+          this.editableTabs[this.tabhang].project[this.hang].execution_frequency = res.data.data.list[0].execution_frequency;
617
+          this.editableTabs[this.tabhang].project[this.hang].day = res.data.data.list[0].day;
618
+          this.editableTabs[this.tabhang].project[this.hang].prescribing_number = res.data.data.list[0].prescribing_number;
619
+          this.editableTabs[this.tabhang].project[this.hang].unit = res.data.data.list[0].unit;
620
+          this.editableTabs[this.tabhang].project[this.hang].price = res.data.data.list[0].retail_price;
621
+          this.editableTabs[this.tabhang].project[this.hang].remark = res.data.data.list[0].remark;
622
+        }
623
+      })
624
+    },
625
+    clicktmp(tmp,item){
626
+      // console.log("hahahhatmp",tmp)
627
+      // console.log("hahahitem",item)
628
+      if (this.new_type == 1){
629
+        if(tmp == 2){
630
+          this.tmplist = this.druglist
631
+        }else{
632
+          this.tmplist = this.druglist2
581
         }
633
         }
582
-      } else {
583
-        if (tmp == 2) {
584
-          this.tmplist = this.projectlist;
585
-        } else {
586
-          this.tmplist = this.projectlist2;
634
+      }else{
635
+        if(tmp == 2){
636
+          this.tmplist = this.projectlist
637
+        }else{
638
+          this.tmplist = this.projectlist2
587
         }
639
         }
588
       }
640
       }
589
     },
641
     },
590
-    changelist() {
591
-      console.log("patient_value", this.patient_value);
592
-      if (this.patient_value == 1) {
642
+    changelist(){
643
+      console.log("patient_value",this.patient_value)
644
+      if (this.patient_value == 1){
593
         this.getusernames();
645
         this.getusernames();
594
       }
646
       }
595
-      if (this.patient_value == 2) {
647
+      if (this.patient_value == 2){
596
         this.qieusername();
648
         this.qieusername();
597
       }
649
       }
598
     },
650
     },
599
-    changemode() {
600
-      if (this.patient_value == 2) {
651
+    changemode(){
652
+      if (this.patient_value == 2){
601
         this.qieusername();
653
         this.qieusername();
602
       }
654
       }
603
     },
655
     },
604
     deleteRow(index, rows) {
656
     deleteRow(index, rows) {
605
-      console.log("index", index);
606
-      console.log("rows", rows);
657
+      console.log("index",index)
658
+      console.log("rows",rows)
607
       rows.splice(index, 1);
659
       rows.splice(index, 1);
608
     },
660
     },
609
-    addRow(index, rows) {
610
-      rows.splice(index + 1, 0, {
611
-        date: "2016-05-02",
612
-        name: "hah",
613
-        province: "上海",
614
-        city: "普陀区",
615
-        address: "shngahai",
616
-        zip: 20033,
661
+    addRow(index, rows){
662
+      rows.splice(index+1,0,{
663
+        id:"",
664
+        drug_name: '',
665
+        single_dose:0,
666
+        single_dose_unit: '',
667
+        delivery_way: '给药途径',
668
+        execution_frequency: '执行频率',
669
+        day: 0,
670
+        prescribing_number:0,
671
+        prescribing_number_unit:"",
672
+        price:"",
673
+        remark:"",
617
       });
674
       });
618
     },
675
     },
619
-    qieusername() {
676
+    addRow2(index, rows){
677
+      rows.splice(index+1,0,{
678
+        id: "",
679
+        drug_name: "王小美",
680
+        single_dose: 0,
681
+        unit: "嘎",
682
+        delivery_way: "给药途径",
683
+        execution_frequency: "执行频率",
684
+        day: 0,
685
+        prescribing_number: 0,
686
+        price: "",
687
+        remark: "",
688
+        frequency_type:"",
689
+        day_count:"",
690
+        week_days:"",
691
+      });
692
+    },
693
+    qieusername(){
620
       var params = {
694
       var params = {
621
-        mode: this.modeOptions_value,
622
-      };
623
-      getdialysismodename(params).then((res) => {
624
-        if (res.data.state == 1) {
695
+        mode:this.modeOptions_value
696
+      }
697
+      getdialysismodename(params).then((res) =>{
698
+        if (res.data.state == 1){
625
           this.tableData = res.data.data.list;
699
           this.tableData = res.data.data.list;
626
         }
700
         }
627
       });
701
       });
628
     },
702
     },
629
-    getusernames() {
630
-      var params = {};
631
-      gethisusertoalive(params).then((res) => {
632
-        console.log("this.res", res);
633
-        if (res.data.state == 1) {
703
+    getusernames(){
704
+      var params = {}
705
+      gethisusertoalive(params).then((res) =>{
706
+        console.log("this.res",res)
707
+        if (res.data.state == 1){
634
           this.tableData = res.data.data.list;
708
           this.tableData = res.data.data.list;
635
           console.log("this.tableData", this.tableData);
709
           console.log("this.tableData", this.tableData);
636
         }
710
         }
637
       });
711
       });
638
     },
712
     },
639
-    getthisdrugname() {
713
+    getthisdrugname(){
640
       var params = {
714
       var params = {
641
-        addtype: 1,
642
-      };
643
-      getdrugsname(params).then((res) => {
644
-        if (res.data.state == 1) {
715
+        addtype:1
716
+      }
717
+      getdrugsname(params).then((res) =>{
718
+        if (res.data.state == 1){
645
           this.druglist = res.data.data.list;
719
           this.druglist = res.data.data.list;
646
           this.druglist2 = res.data.data.list2;
720
           this.druglist2 = res.data.data.list2;
647
         }
721
         }
648
       });
722
       });
649
       var params2 = {
723
       var params2 = {
650
-        addtype: 2,
651
-      };
652
-      getdrugsname(params2).then((res) => {
653
-        if (res.data.state == 1) {
724
+        addtype:2
725
+      }
726
+      getdrugsname(params2).then((res) =>{
727
+        if (res.data.state == 1){
654
           this.projectlist = res.data.data.list;
728
           this.projectlist = res.data.data.list;
655
           this.projectlist2 = res.data.data.list2;
729
           this.projectlist2 = res.data.data.list2;
656
         }
730
         }
659
     handleSelectionChange(val) {
733
     handleSelectionChange(val) {
660
       this.multipleSelection = val;
734
       this.multipleSelection = val;
661
     },
735
     },
662
-    handleTabsEdit(targetName, action) {
736
+    handleTabsEdit(targetName, action,tab) {
737
+      this.tabhang = this.editableTabs.length
738
+      console.log("this.tabhang",this.tabhang)
663
       if (action === "add") {
739
       if (action === "add") {
664
         let newTabName = ++this.tabIndex + "";
740
         let newTabName = ++this.tabIndex + "";
665
         let tmp = this.editableTabs.length + 1;
741
         let tmp = this.editableTabs.length + 1;
682
               remark: "",
758
               remark: "",
683
             },
759
             },
684
           ],
760
           ],
761
+          project: [
762
+            {
763
+              id: "",
764
+              drug_name: "王小美",
765
+              single_dose: 0,
766
+              unit: "嘎",
767
+              delivery_way: "给药途径",
768
+              execution_frequency: "执行频率",
769
+              day: 0,
770
+              prescribing_number: 0,
771
+              price: "",
772
+              remark: "",
773
+              frequency_type:"",
774
+              day_count:"",
775
+              week_days:"",
776
+            },
777
+          ],
778
+
685
         });
779
         });
686
         this.editableTabsValue = newTabName;
780
         this.editableTabsValue = newTabName;
687
       }
781
       }
699
           });
793
           });
700
         }
794
         }
701
 
795
 
702
-        this.editableTabsValue = activeName;
703
-        this.editableTabs = tabs.filter((tab) => tab.name !== targetName);
704
-      }
796
+          this.editableTabsValue = activeName;
797
+          this.editableTabs = tabs.filter(tab => tab.name !== targetName);
798
+        }
705
     },
799
     },
706
-    getdrugconfigs() {
707
-      var params = {};
708
-      getmodeconfigs(params).then((res) => {
709
-        if (res.data.state == 1) {
710
-          this.frequency = res.data.data.efs;
711
-          this.usage = res.data.data.drugways;
800
+    getdrugconfigs(){
801
+      var params = {}
802
+      getmodeconfigs(params).then((res) =>{
803
+        if (res.data.state == 1){
804
+          this.frequency = res.data.data.efs
805
+          this.usage = res.data.data.drugways
712
         }
806
         }
713
-      });
807
+      })
714
     },
808
     },
715
-  },
716
-};
809
+    handleClose(done) {
810
+      this.$confirm('确认关闭?')
811
+        .then(_ => {
812
+          done();
813
+        })
814
+        .catch(_ => {});
815
+    }
816
+  }
817
+
818
+}
717
 </script>
819
 </script>
718
 
820
 
719
 
821