瀏覽代碼

调度台展示形式默认值

seimin 4 月之前
父節點
當前提交
1fe675bd1f
共有 1 個文件被更改,包括 18 次插入26 次删除
  1. 18 26
      src/app/views/fuwutai/fuwutai.component.ts

+ 18 - 26
src/app/views/fuwutai/fuwutai.component.ts

@@ -4655,40 +4655,32 @@ export class FuwutaiComponent implements OnInit {
4655 4655
   }
4656 4656
 
4657 4657
   // 初始化展示形式
4658
-  controlView = {}; //展示形式
4658
+  controlView:any = {}; //展示形式
4659 4659
   initControlView() {
4660
-    let that = this;
4661 4660
     let postData = {
4662 4661
       controlView: {},
4663 4662
       idx: 0,
4664 4663
       sum: 1,
4665 4664
     };
4666
-    that.mainService
4665
+    this.mainService
4667 4666
       .coopTypeConfig("fetchDataList", "controlView", postData)
4668 4667
       .subscribe((data) => {
4669
-        that.controlView = data.list[0] ? data.list[0] : [];
4670
-        if (!data.list.length) return;
4671
-        // switch (data.list[0].workerNum) {
4672
-        //   case 1:
4673
-        //     that.patientCareCol = 6;
4674
-        //     break;
4675
-        //   case 2:
4676
-        //     that.patientCareCol = 7;
4677
-        //     break;
4678
-        //   case 3:
4679
-        //     that.patientCareCol = 4;
4680
-        //     break;
4681
-        // }
4682
-        that.patientCareCol = 7;
4683
-        this.hurseInfoHiding = data.list[0].hurseInfoHiding ? 1 : 0;
4684
-        // that.txtLabelCol = data.list[0].labelNum;
4685
-        that.txtLabelCol = 1;
4686
-        that.orderRefreshTime = that.orderInfoTime = data.list[0].orderInfoTime;
4687
-        that.workerRefreshTime = that.workerInfoTime =
4688
-          data.list[0].workerInfoTime;
4689
-        that.audioNotDispatched = data.list[0].unsendOrderVoice !== false;
4690
-        this.orderType = data.list[0].orderType || 'priority';
4691
-        that.checkTab(this.typeId);
4668
+        this.controlView = data.list[0] ? data.list[0] : {
4669
+          hurseInfoHiding: 1,
4670
+          orderInfoTime: 60,
4671
+          workerInfoTime: 60,
4672
+          unsendOrderVoice: true,
4673
+          orderType: 'priority',
4674
+        };
4675
+
4676
+        this.patientCareCol = 7;
4677
+        this.hurseInfoHiding = this.controlView.hurseInfoHiding ? 1 : 0;
4678
+        this.txtLabelCol = 1;
4679
+        this.orderRefreshTime = this.orderInfoTime = this.controlView.orderInfoTime;
4680
+        this.workerRefreshTime = this.workerInfoTime = this.controlView.workerInfoTime;
4681
+        this.audioNotDispatched = this.controlView.unsendOrderVoice !== false;
4682
+        this.orderType = this.controlView.orderType || 'priority';
4683
+        this.checkTab(this.typeId);
4692 4684
 
4693 4685
         this.getOrderList(1);
4694 4686
         this.getOrderList(2);