瀏覽代碼

解决冲突

seimin 1 周之前
父節點
當前提交
95dfaae8d3

+ 9 - 1
pages.json

@@ -736,7 +736,15 @@
736 736
           "titleNView": false
737 737
         }
738 738
       }
739
-    }
739
+    },
740
+		{
741
+		  "path": "pages/searchFloor/searchFloor",
742
+		  "style": {
743
+		    "h5": {
744
+		      "titleNView": false
745
+		    }
746
+		  }
747
+		}
740 748
   ],
741 749
   "globalStyle": {
742 750
     "navigationBarTextStyle": "black",

+ 99 - 69
pages/mypage/mypage.vue

@@ -1,21 +1,36 @@
1 1
 <template>
2 2
   <view class="mypage">
3 3
     <view class="myTop">
4
-      <view class="goWork" @click="GoWork()">
4
+			<view class="topText">
5
+			  <view class="topTextHeader">
6
+			    <view class="text">
7
+						<view>
8
+							您好,{{ userData.name }}
9
+						</view>
10
+						<view>{{userData.currentHospital.hosName}}</view>
11
+						</view>
12
+			  <!--  <button v-show="!userData.online" class="changeHospital" size="mini" type="default" @click="changeHospital">
13
+			      切换院区
14
+			    </button> -->
15
+					<view class="goWork_btn_E">
16
+					  <view class="goWork_btn_W" v-show="userData.online"> 
17
+							<text class="left-icon newicon newicon-xiuxizhong"></text>
18
+							<text class="state">工作中</text> 
19
+						</view>
20
+					  <view class="goWork_btn_X" v-show="!userData.online"> 
21
+							<text class="left-icon newicon newicon-gongzuozhong"></text>
22
+							<text class="state">休息中</text> 
23
+						</view>
24
+					</view>
25
+			  </view>
26
+			  <!-- <view>当前积分 : {{ tabNum.score }}</view> -->
27
+			</view>
28
+  <!--    <view class="goWork" @click="GoWork()">
5 29
         <view class="goWork_btn_E">
6 30
           <view class="goWork_btn_W" v-show="userData.online"> 下班 </view>
7 31
           <view class="goWork_btn_X" v-show="!userData.online"> 上班 </view>
8 32
         </view>
9
-      </view>
10
-      <view class="topText">
11
-        <view class="topTextHeader">
12
-          <text>您好,{{ userData.name }}</text>
13
-          <button v-show="!userData.online" class="changeHospital" size="mini" type="default" @click="changeHospital">
14
-            切换院区
15
-          </button>
16
-        </view>
17
-        <view>当前积分 : {{ tabNum.score }}</view>
18
-      </view>
33
+      </view> -->
19 34
     </view>
20 35
     <view class="myCont">
21 36
       <view class="myCont_cont">
@@ -73,6 +88,13 @@
73 88
         </view>
74 89
       </view>
75 90
     </view>
91
+		<view v-if="!userData.online" class="df-fl">
92
+			<view class="page_item_btn width-50" hover-class="seimin-btn-hover" @click="changeHospital">切换院区</view>
93
+			<view class="page_item_btn width-50" hover-class="seimin-btn-hover" @click="GoWork()">继续工作</view>
94
+		</view>
95
+		<view v-if="userData.online">
96
+			<view class="page_item_btn width-100" hover-class="seimin-btn-hover" @click="GoWork()">我要下班</view>
97
+		</view>
76 98
     <!-- 弹窗 -->
77 99
     <showModel :title="models.title" :icon="models.icon" :disjunctor="models.disjunctor" :content="models.content"
78 100
       @ok="ok" @cancel="cancel" :operate="models.operate"></showModel>
@@ -160,6 +182,9 @@
160 182
             userData.user.currentHospital = result.user.user.currentHospital;
161 183
             uni.setStorageSync("userData", userData);
162 184
             this.tab("day", "今日");
185
+						setTimeout(_=>{
186
+							this.userData = uni.getStorageSync("userData").user;
187
+						})
163 188
           } else {
164 189
             uni.showToast({
165 190
               icon: "none",
@@ -514,6 +539,9 @@
514 539
 </script>
515 540
 <style lang="less">
516 541
   .mypage {
542
+		padding: 20rpx;
543
+		background: #F0F6ED;
544
+		position: relative;
517 545
     .charts {
518 546
       width: 625upx;
519 547
       height: 500upx;
@@ -530,67 +558,42 @@
530 558
     }
531 559
 
532 560
     .myTop {
533
-      height: 390rpx;
534
-      background-image: url(../../static/img/BG_xiaban.png);
535
-      background-repeat: no-repeat;
536
-      background-size: 100% 100%;
537
-
538
-      .goWork {
539
-        margin: 0 auto 20rpx auto;
540
-        padding-top: 30rpx;
541
-        width: 240rpx;
542
-        height: 240rpx;
543
-
544
-        .goWork_btn_E {
545
-          width: 100%;
546
-          height: 100%;
547
-          background: #bee1a7;
548
-          border-radius: 30%;
549
-          text-align: center;
550
-
551
-          .goWork_btn_W {
552
-            width: 75%;
553
-            height: 75%;
554
-            background-image: linear-gradient(to right, #72c172, #3bb197);
555
-            border-radius: 30%;
556
-            margin: 0 auto;
557
-            /*水平居中*/
558
-            position: relative;
559
-            /*脱离文档流*/
560
-            top: 12.5%;
561
-            /*偏移*/
562
-            line-height: 180rpx;
563
-            color: #fff;
564
-            font-size: 36rpx;
565
-          }
566
-
567
-          .goWork_btn_X {
568
-            width: 75%;
569
-            height: 75%;
570
-            background-image: linear-gradient(to left, #72c172, #3bb197);
571
-            border-radius: 30%;
572
-            margin: 0 auto;
573
-            /*水平居中*/
574
-            position: relative;
575
-            /*脱离文档流*/
576
-            top: 12.5%;
577
-            /*偏移*/
578
-            line-height: 180rpx;
579
-            color: #fff;
580
-            font-size: 36rpx;
581
-          }
561
+      height: 160rpx;
562
+			background: #fff;
563
+			border-radius: 8rpx;
564
+			padding: 40rpx;
565
+      .goWork_btn_E {
566
+        text-align: center;
567
+				margin-top: 70rpx;
568
+				font-weight: bold;
569
+				
570
+				.state{
571
+					margin-left: 8rpx;
572
+				}
573
+				
574
+				.newicon{
575
+					font-size: 42rpx !important;
576
+				}
577
+				
578
+        .goWork_btn_W {
579
+          color: #FFBA30;
580
+          font-size: 40rpx;
581
+        }
582
+      
583
+        .goWork_btn_X {
584
+          color: #64BD7B;
585
+          font-size: 40rpx;
582 586
         }
583 587
       }
584 588
 
585 589
       .topText {
586
-        font-size: 36rpx;
587
-        text-align: center;
588
-
589 590
         .topTextHeader {
590
-          display: flex;
591
-          justify-content: center;
592
-          align-items: center;
593
-
591
+					.text{
592
+						display: flex;
593
+						justify-content: space-between;
594
+						font-size: 30rpx;
595
+						font-weight: bold;
596
+					}
594 597
           .changeHospital {
595 598
             margin-left: 16rpx;
596 599
             margin-right: 0;
@@ -600,6 +603,9 @@
600 603
     }
601 604
 
602 605
     .myCont {
606
+			background: #fff;
607
+			margin-top: 20rpx;
608
+			border-radius: 8rpx;
603 609
       .myCont_top {
604 610
         text-align: left;
605 611
         line-height: 90rpx;
@@ -628,6 +634,10 @@
628 634
       }
629 635
 
630 636
       .myCont_cont {
637
+				height: calc(100vh - 410rpx);
638
+				overflow-y: auto;
639
+				overflow-x: hidden;
640
+				margin-bottom: 20rpx;
631 641
         .myCont_cont_tab {
632 642
           height: 90rpx;
633 643
           line-height: 90rpx;
@@ -669,7 +679,7 @@
669 679
         }
670 680
 
671 681
         .TB1 {
672
-          height: 200rpx;
682
+          height: 180rpx;
673 683
 
674 684
           .title {
675 685
             text-align: left;
@@ -695,7 +705,6 @@
695 705
         .TB_list {
696 706
           width: 100%;
697 707
           text-align: left;
698
-
699 708
           view {
700 709
             height: 84rpx;
701 710
             line-height: 84rpx;
@@ -718,5 +727,26 @@
718 727
         }
719 728
       }
720 729
     }
730
+		.df-fl{
731
+			display: flex;
732
+			justify-content: space-between;
733
+		}
734
+		.page_item_btn {
735
+			// position: fixed;
736
+		  height: 88rpx;
737
+		  background-image: linear-gradient(to right, #72c172, #3bb197);
738
+		  border-radius: 8rpx;
739
+		  line-height: 88rpx;
740
+		  color: #fff;
741
+		  font-size: 36rpx;
742
+		  font-weight: 700;
743
+		  text-align: center;
744
+		}
745
+		.width-50{
746
+			width: 48%;
747
+		}
748
+		.width-100{
749
+			width: 100%;
750
+		}
721 751
   }
722 752
 </style>

+ 87 - 3
pages/newDrug/detail.vue

@@ -11,7 +11,7 @@
11 11
     <view class="Scanning_cont">
12 12
       <template v-if="config.showDrugsBagDetails == 1">
13 13
         <view class="column head">
14
-          <view class="value1">药品名称+规格<text class="red">({{drugsList.length}})</text></view>
14
+          <view class="value1" @click="viewName(item)">药品名称+规格<text class="red">({{drugsList.length}})</text></view>
15 15
           <view class="value2">数量</view>
16 16
         </view>
17 17
         <scroll-view scroll-y class="scrollContent">
@@ -28,6 +28,22 @@
28 28
         <view class="btn" @click="goBack()">返回</view>
29 29
       </view>
30 30
     </view>
31
+
32
+		<!-- 查看患者 -->
33
+		<view class="showModel" v-if="infoModel">
34
+			<view class="showModel__wrap">
35
+				<view class="showModel__header">
36
+				  患者信息
37
+				</view>
38
+				<view class="content">
39
+					<view>{{itemData.patientNames}}</view>
40
+				</view>
41
+				<view class="bottom">
42
+					<button class="bottom-btn confirm-btn" @click="infoModel = false">知道了</button>
43
+				</view>
44
+			</view>
45
+		</view>
46
+
31 47
   </view>
32 48
 </template>
33 49
 <script>
@@ -45,9 +61,19 @@
45 61
         queryObj: {}, //路由传递过来的数据
46 62
         drugsBag: {}, //药包信息
47 63
         config: {}, //配置
64
+				infoModel:false,
65
+				itemData:{}
48 66
       };
49 67
     },
50 68
     methods: {
69
+			// 查看患者
70
+			viewName(item){
71
+				console.log(222,this.queryObj)
72
+				if(this.queryObj.showPatientInfo==1){
73
+					this.itemData = item
74
+					this.infoModel = true
75
+				}
76
+			},
51 77
       // 返回
52 78
       goBack(){
53 79
         uni.navigateBack()
@@ -75,7 +101,7 @@
75 101
           title: "加载中",
76 102
           mask: true,
77 103
         });
78
-        
104
+
79 105
         post(`/simple/data/fetchDataList/taskTypeConfig`, {
80 106
             "idx": 0,
81 107
             "sum": 1,
@@ -94,7 +120,7 @@
94 120
           if(res.status == 200){
95 121
             let list  = res.list || [];
96 122
             this.config = list.length ? list[0] : {};
97
-            
123
+
98 124
             if(this.queryObj.drugsBagId){
99 125
               // 根据药包id查询药品
100 126
               this.getDrugsByDrugsBugId(this.queryObj.drugsBagId);
@@ -206,6 +232,7 @@
206 232
           text-align: left;
207 233
           word-break: break-all;
208 234
           flex-shrink: 0;
235
+					text-align: center;
209 236
         }
210 237
         .value2,.value3{
211 238
           flex: 1;
@@ -246,4 +273,61 @@
246 273
       }
247 274
     }
248 275
   }
276
+
277
+	.showModel {
278
+	  position: fixed;
279
+	  left: 0;
280
+	  right: 0;
281
+	  top: 0;
282
+	  bottom: 0;
283
+	  background-color: rgba(0, 0, 0, 0.2);
284
+	  z-index: 99;
285
+
286
+	  .showModel__wrap {
287
+	    width: 90%;
288
+	    position: absolute;
289
+	    left: 50%;
290
+	    top: 50%;
291
+	    transform: translate(-50%, -50%);
292
+	    background-color: #fff;
293
+	    border-radius: 12rpx;
294
+
295
+	    .showModel__header {
296
+	      font-size: 36rpx;
297
+	      color: #000;
298
+				font-weight: bold;
299
+	      height: 84rpx;
300
+	      display: flex;
301
+	      justify-content: center;
302
+	      align-items: center;
303
+	    }
304
+			.content{
305
+				background: #fff;
306
+				text-align: center;
307
+				padding: 20rpx 0;
308
+			}
309
+			.bottom{
310
+				border-top: 1px solid #ccc;
311
+				display: flex;
312
+				uni-button{
313
+					background: #fff !important;
314
+				}
315
+				uni-button:after{
316
+					border: none !important;
317
+				}
318
+				.bottom-btn{
319
+					color: #A8A8A8;
320
+					font-size: 30rpx;
321
+					padding: 10rpx 0;
322
+					width: 100%;
323
+					display: flex;
324
+					align-items: center;
325
+					justify-content: center;
326
+				}
327
+				.confirm-btn{
328
+					color: #5DAC6B;
329
+				}
330
+			}
331
+	  }
332
+	}
249 333
 </style>

+ 11 - 8
pages/newDrug/list.vue

@@ -8,10 +8,13 @@
8 8
             <view class="value">{{item.drugsState ? item.drugsState.name : ''}}</view>
9 9
           </view>
10 10
           <view class="body">
11
-            <view class="bodyColumn" v-if="config.showDrugsBagTypeCount == 1">
12
-              <view class="name">种类数:{{item.drugsTypeCount}}</view>
13
-              <view class="value">总数:{{item.drugsCount}}</view>
11
+            <view class="bodyColumn" v-if="queryObj.showPatientInfo==1">
12
+              <view class="name">姓名:{{item.patientNames ? item.patientNames : ''}}</view>
14 13
             </view>
14
+						<view class="bodyColumn" v-if="config.showDrugsBagTypeCount == 1">
15
+						  <view class="name">种类数:{{item.drugsTypeCount}}</view>
16
+						  <view class="value">总数:{{item.drugsCount}}</view>
17
+						</view>
15 18
             <view class="bodyColumn">
16 19
               <view class="name">收取人:<template v-if="item.startLog">{{item.startLog.username}}</template></view>
17 20
               <view class="value">收取时间:<template v-if="item.startLog">{{item.startLog.operationTime | formatDate('yyyy-MM-dd hh:mm')}}</template></view>
@@ -54,7 +57,7 @@
54 57
           return;
55 58
         }
56 59
         uni.navigateTo({
57
-          url: `/pages/newDrug/detail?drugsBagType=${this.queryObj.drugsBagType}&drugsBagId=${drugsBagId}`,
60
+          url: `/pages/newDrug/detail?drugsBagType=${this.queryObj.drugsBagType}&drugsBagId=${drugsBagId}&showPatientInfo=${this.queryObj.showPatientInfo}`,
58 61
         });
59 62
       },
60 63
       //获取页面信息
@@ -63,7 +66,7 @@
63 66
           title: "加载中",
64 67
           mask: true,
65 68
         });
66
-        
69
+
67 70
         let info$ = post(`/transflow/extra`, {type: this.queryObj.drugsBagType, extraType: 'orderInfo', orderId: +this.queryObj.orderId});
68 71
         let config$ = post(`/simple/data/fetchDataList/taskTypeConfig`, {
69 72
             "idx": 0,
@@ -80,11 +83,11 @@
80 83
                 }
81 84
             }
82 85
         });
83
-        
86
+
84 87
         Promise.all([info$, config$]).then(result => {
85 88
           uni.hideLoading();
86 89
           let [info, config] = result || [];
87
-        
90
+
88 91
           if(info.state == 200){
89 92
             if(info.data){
90 93
               this.drugsBagList = info.data.drugsBagList || [];
@@ -96,7 +99,7 @@
96 99
               title: info.msg || "接口获取数据失败!",
97 100
             });
98 101
           }
99
-        
102
+
100 103
           if(config.status == 200){
101 104
             let list  = config.list || [];
102 105
             this.config = list.length ? list[0] : {};

+ 2 - 2
pages/receipt_infopage/receipt_infopage.vue

@@ -1140,11 +1140,11 @@
1140 1140
               let config = list[0];
1141 1141
               if(config.drugsModel === 1){
1142 1142
                 uni.navigateTo({
1143
-                  url: `/pages/newDrug/detail?drugsBagType=${type}&orderId=${workOrder.id}`,
1143
+                  url: `/pages/newDrug/detail?drugsBagType=${type}&orderId=${workOrder.id}&showPatientInfo=${config.showPatientInfo}`,
1144 1144
                 });
1145 1145
               } else if(config.drugsModel === 2){
1146 1146
                 uni.navigateTo({
1147
-                  url: `/pages/newDrug/list?drugsBagType=${type}&orderId=${workOrder.id}`,
1147
+                  url: `/pages/newDrug/list?drugsBagType=${type}&orderId=${workOrder.id}&showPatientInfo=${config.showPatientInfo}`,
1148 1148
                 });
1149 1149
               }
1150 1150
             }else{

+ 61 - 30
pages/receiptpage/receiptpage.vue

@@ -38,19 +38,19 @@
38 38
                 <view class="page_item_cont_start emergency1" v-if="item.emergencyType.value == 1">
39 39
                   <image mode="widthFix" class="page_item_cont_start-img" src="../../static/img/icon_shandian.png">
40 40
                   </image>
41
-                  {{ item.emergencyType.name }}
41
+									{{ item.emergencyType.name }}</text>
42 42
                 </view>
43 43
                 <view class="page_item_cont_start emergency" v-if="item.emergencyType.value == 2">
44 44
                   <image mode="widthFix" class="page_item_cont_start-img" src="../../static/img/icon_shandian.png">
45 45
                   </image>
46
-                  {{ item.emergencyType.name }}
46
+                  {{ item.emergencyType.name }}</text>
47 47
                 </view>
48 48
                 <view class="page_item_cont_start emergencys" v-if="item.emergencyType.value == 3">
49 49
                   <image mode="widthFix" class="page_item_cont_start-img" src="../../static/img/icon_shandian.png">
50 50
                   </image>
51
-                  {{ item.emergencyType.name }}
51
+                  {{ item.emergencyType.name }}</text>
52 52
                 </view>
53
-                <view class="page_item_top_R type" style="margin-left: 16rpx;">
53
+                <view class="page_item_top_R type" :style="{color: item.taskType?item.taskType.renderColors:'#333'}" style="margin-left: 16rpx;">
54 54
                   {{ item.taskType.taskName }}<template v-if="item.goodsRemark">-{{item.goodsRemark}}</template>
55 55
                 </view>
56 56
                 <!-- <text class="L_time" v-if="item.overdueTime">{{ item.overdueTime }}前送达</text> -->
@@ -82,17 +82,17 @@
82 82
                 <!-- <view class="page_item_cont_start emergency1" v-if="item.emergencyType.value == 1">
83 83
                   <image mode="widthFix" class="page_item_cont_start-img" src="../../static/img/icon_shandian.png">
84 84
                   </image>
85
-                  {{ item.emergencyType.name }}
85
+                  {{ item.emergencyType.name }}</text>
86 86
                 </view>
87 87
                 <view class="page_item_cont_start emergency" v-if="item.emergencyType.value == 2">
88 88
                   <image mode="widthFix" class="page_item_cont_start-img" src="../../static/img/icon_shandian.png">
89 89
                   </image>
90
-                  {{ item.emergencyType.name }}
90
+                  {{ item.emergencyType.name }}</text>
91 91
                 </view>
92 92
                 <view class="page_item_cont_start emergencys" v-if="item.emergencyType.value == 3">
93 93
                   <image mode="widthFix" class="page_item_cont_start-img" src="../../static/img/icon_shandian.png">
94 94
                   </image>
95
-                  {{ item.emergencyType.name }}
95
+                  {{ item.emergencyType.name }}</text>
96 96
                 </view> -->
97 97
               </view>
98 98
               <view class="page_item_conts" v-if="item.taskType.associationType.value == 'specimen'">
@@ -623,6 +623,7 @@
623 623
 				keyArr: [],
624 624
 				isApp:false,
625 625
 				isUpdate:false,
626
+				taskTypeList:[]
626 627
       };
627 628
     },
628 629
 		components: {
@@ -656,7 +657,7 @@
656 657
         } else {
657 658
           return "-";
658 659
         }
659
-      },
660
+      }
660 661
     },
661 662
     components: {
662 663
       uniFab,
@@ -668,6 +669,24 @@
668 669
 			appUpdata
669 670
     },
670 671
     methods: {
672
+			// 获取任务类型
673
+			getTaskType(){
674
+				let postData = {
675
+				  idx: 0,
676
+				  sum: 9999,
677
+					taskType:{
678
+						hosIds:this.hosId,
679
+						simpleQuery: true
680
+					}
681
+				};
682
+				
683
+				post("/configuration/fetchDataList/taskType",postData).then((res) => {
684
+				    if (res.status == 200) {
685
+							this.taskTypeList = res.list
686
+							console.log(444,this.taskTypeList)
687
+				    }
688
+				  });
689
+			},
671 690
 			confirmKey(data){
672 691
 				this.padChange(data)
673 692
 				this.showKey = false
@@ -2696,17 +2715,21 @@
2696 2715
           if (res.status == 200) {
2697 2716
             this.triggered = false;
2698 2717
             this.freshing = true;
2699
-            this.totalNum = res.data.resultCount;
2700
-            res.data.data = res.data.data || [];
2701
-            res.data.data.forEach(v => {
2702
-              v.clinicalTaskIdsFlag = this.clinicalTaskIds.includes(v.taskType.id.toString());
2703
-            })
2704
-            if (idx === 0) {
2705
-              this.zxzData = res.data.data;
2706
-            } else {
2707
-              this.zxzData.push(...res.data.data);
2708
-            }
2709
-            this.tabs[1].num = res.data.resultCount;
2718
+						if(res.data){
2719
+							this.totalNum = res.data.resultCount;
2720
+							res.data.data = res.data.data || [];
2721
+							res.data.data.forEach(v => {
2722
+								v.taskTypeConfig = this.taskTypeList.find(i=>i.id == v.taskType.id)
2723
+								v.clinicalTaskIdsFlag = this.clinicalTaskIds.includes(v.taskType.id.toString());
2724
+							})
2725
+							if (idx === 0) {
2726
+							  this.zxzData = res.data.data;
2727
+							} else {
2728
+							  this.zxzData.push(...res.data.data);
2729
+							}
2730
+							console.log(4444,res.data.data)
2731
+							this.tabs[1].num = res.data.resultCount;
2732
+						}
2710 2733
           } else {
2711 2734
             uni.showToast({
2712 2735
               icon: "none",
@@ -2751,13 +2774,20 @@
2751 2774
           if (res.status == 200) {
2752 2775
             this.triggered = false;
2753 2776
             this.freshing = true;
2754
-            this.totalNum = res.data.resultCount;
2755
-            if (idx === 0) {
2756
-              this.zxzData = res.data.data;
2757
-            } else {
2758
-              this.zxzData.push(...res.data.data);
2759
-            }
2760
-            this.tabs[0].num = res.data.resultCount;
2777
+						if(res.data){
2778
+							this.totalNum = res.data.resultCount;
2779
+							res.data.data.forEach(v => {
2780
+								v.taskTypeConfig = this.taskTypeList.find(i=>i.id == v.taskType.id)
2781
+								v.clinicalTaskIdsFlag = this.clinicalTaskIds.includes(v.taskType.id.toString());
2782
+							})
2783
+							if (idx === 0) {
2784
+							  this.zxzData = res.data.data;
2785
+							} else {
2786
+							  this.zxzData.push(...res.data.data);
2787
+							}
2788
+							this.tabs[0].num = res.data.resultCount;
2789
+						}
2790
+						
2761 2791
           } else {
2762 2792
             uni.showToast({
2763 2793
               icon: "none",
@@ -2822,7 +2852,7 @@
2822 2852
         }
2823 2853
         post("/workerOrder/executingOrders", data).then((res) => {
2824 2854
           if (res.status == 200) {
2825
-            this.tabs[1].num = res.data.resultCount;
2855
+            this.tabs[1].num = res.data ? res.data.resultCount : 0;
2826 2856
           } else {
2827 2857
             uni.showToast({
2828 2858
               icon: "none",
@@ -2839,7 +2869,7 @@
2839 2869
         };
2840 2870
         post("/workerOrder/waitingOrders", data).then((res) => {
2841 2871
           if (res.status == 200) {
2842
-            this.tabs[0].num = res.data.resultCount;
2872
+            this.tabs[0].num = res.data ? res.data.resultCount : 0;
2843 2873
           } else {
2844 2874
             uni.showToast({
2845 2875
               icon: "none",
@@ -2947,7 +2977,8 @@
2947 2977
       // });
2948 2978
       // #endif
2949 2979
       this.selectedLabelSlots = "执行中";
2950
-      this.initList();
2980
+			// this.getTaskType();
2981
+			this.initList();
2951 2982
       this.getConfig();
2952 2983
       // 科室二维码切换科室回显
2953 2984
       if (options.showDepartmentQrcodeId && options.showDepartmentQrcodeDept) {
@@ -3377,7 +3408,7 @@
3377 3408
 
3378 3409
                 &.type {
3379 3410
                   margin-right: 32rpx;
3380
-                  color: red;
3411
+                  // color: red;
3381 3412
                   max-width: 260rpx;
3382 3413
                   white-space: nowrap;
3383 3414
                   text-overflow: ellipsis;

+ 510 - 0
pages/searchFloor/searchFloor.vue

@@ -0,0 +1,510 @@
1
+<template>
2
+  <view class="content">
3
+		<view class="df-fl">
4
+			<view class="df-all">
5
+				<checkbox-group @change="allCheckChange">
6
+					<checkbox value="all" color="#42b983" :checked="allCheck"/>
7
+					<text class="text">全选</text>
8
+				</checkbox-group>
9
+			</view>
10
+			<view class="title">{{name}}</view>
11
+			<view class="top-right">{{num}}/{{allNum}}</view>
12
+		</view>
13
+    <view class="search-keyword">
14
+      <scroll-view class="keyword-list-box" scroll-y>
15
+				<checkbox-group @change="checkboxChange">
16
+					<view v-for="(row, index) in dataList" :key="index" class="view-box">
17
+							<checkbox @click="paClick(row)" class="top-check1" color="#42b983" :value="row.floor.id" :checked="row.checked" />
18
+							<view class="right-ab">{{row.num}}/{{row.children.length}}</view>
19
+							<uni-collapse ref="collapse" v-model="row.floor.collapseValue">
20
+								<uni-collapse-item :title="row.floor.floorName + '楼'">
21
+									<view v-for="(item, index) in row.children" :key="item.id">
22
+										<view class="keyword-entry">
23
+											<view class="keyword-text">
24
+												<checkbox @click="chClick(item)" class="top-check2" color="#42b983" :value="item.id" :checked="item.checked" />
25
+												<view class="title-2">{{item.dept}}</view>
26
+											</view>
27
+										</view>
28
+									</view>
29
+								</uni-collapse-item>
30
+							</uni-collapse>
31
+					</view>
32
+				</checkbox-group>
33
+      </scroll-view>
34
+    </view>
35
+    <view class="toolbar">
36
+      <view class="back" @click="back()">返回</view>
37
+			<view class="confirm" @click="confirm()">确定</view>
38
+    </view>
39
+    <!-- 弹窗 -->
40
+    <showModel :title="models.title" :icon="models.icon" :disjunctor="models.disjunctor" :content="models.content" @know="know" :operate="models.operate"></showModel>
41
+  </view>
42
+</template>
43
+
44
+<script>
45
+  import {
46
+    post,
47
+    webHandle
48
+  } from "../../http/http.js";
49
+  export default {
50
+    data() {
51
+      return {
52
+        type: "", //进入该页面的类型
53
+        configName: "", //快速组合名称
54
+        id: "", //快速组合id
55
+				name:"",
56
+        changedept: 0, //是否从列表过来的切换负责科室
57
+        hosId: "",
58
+        dataList: [],
59
+        //系统设置的科室类型
60
+        sysDeptType: 0,
61
+        quickCombinationDeptType: 0,
62
+        // 弹窗model
63
+        models: {
64
+          disjunctor: false,
65
+        },
66
+				valueColl:false,
67
+				allCheck:false,
68
+				buildIds:[],
69
+				pid:[],
70
+				cid:[],
71
+				allNum:0,
72
+				num:0
73
+      };
74
+    },
75
+    onLoad(options) {
76
+      this.hosId = uni.getStorageSync("userData").user.currentHospital.id;
77
+      console.log(options, 'options');
78
+			this.name = options.name
79
+			this.id = options.id;
80
+			this.configName = options.configName;
81
+			this.changedept = options.changedept;
82
+      this.getBuildings();
83
+      // #ifdef APP-PLUS
84
+      webHandle("no", "app");
85
+      // #endif
86
+      // #ifdef H5
87
+      webHandle("no", "wx");
88
+      // #endif
89
+    },
90
+		onShow(){
91
+			// this.getBuildings();
92
+		},
93
+    methods: {
94
+			// 全选
95
+			allCheckChange(e){
96
+				this.num = 0
97
+				if(e.detail.value.length>0){
98
+					this.dataList.forEach((item, index)=>{
99
+						item.checked = true
100
+						if(item.children && item.children.length>0){
101
+							for(let i of item.children){
102
+								i.checked = true
103
+								this.buildIds.push(i)
104
+							}
105
+						}
106
+						item.num = item.children.filter(x=>x.checked).length
107
+						this.num += item.num 
108
+					})
109
+				}else{
110
+					this.dataList.forEach((item, index)=>{
111
+						item.checked = false
112
+						if(item.children && item.children.length>0){
113
+							for(let i of item.children){
114
+								i.checked = false
115
+								this.buildIds = []
116
+							}
117
+						}
118
+						item.num = item.children.filter(x=>x.checked).length
119
+						this.num += item.num 
120
+					})
121
+				}
122
+				// this.buildIds = this.buildIds.filter(v => v.indexOf('parent')==-1);
123
+				console.log(888,this.buildIds)
124
+			},
125
+      //知道了
126
+      know() {
127
+        this.models.disjunctor = false;
128
+      },
129
+			back(){
130
+				uni.navigateBack({
131
+					delta: 1,
132
+				})
133
+			},
134
+			paClick(row){
135
+				if(row.checked){
136
+					row.checked = false
137
+				}else{
138
+					row.checked = true
139
+				}
140
+				for(let item of row.children){
141
+					if (row.checked) {
142
+						this.$set(item, 'checked', true)
143
+					} else {
144
+						this.$set(item, 'checked', false)
145
+					}
146
+				}
147
+				this.num = 0
148
+				for (let i of this.dataList) {
149
+					i.num = i.children.filter(x=>x.checked).length
150
+					this.num += i.num
151
+				}	
152
+				console.log(44545454,this.dataList)	
153
+			},
154
+			chClick(row){
155
+				this.num = 0
156
+				if(row.checked){
157
+					row.checked = false
158
+				}else{
159
+					row.checked = true
160
+				}
161
+				for (let i of this.dataList) {
162
+					i.num = i.children.filter(x=>x.checked).length
163
+					this.num += i.num
164
+				}	
165
+			},
166
+      // 确认
167
+      confirm() {
168
+				let data = uni.getStorageSync("setDepts")
169
+				let dataList = []
170
+				this.dataList.forEach(i=>{
171
+					for(let i of i.children){
172
+						if(i.checked){
173
+							dataList.push(i)
174
+						}
175
+					}
176
+				})
177
+        console.log(3333,dataList);
178
+				if (dataList.length === 0) {
179
+          this.models = {
180
+            disjunctor: true,
181
+            title: "提示",
182
+            content: "请选择至少一个楼层",
183
+            icon: "warn",
184
+            operate: {
185
+              know: "知道了",
186
+            },
187
+          };
188
+        } else {
189
+					let allData = null
190
+					let data = uni.getStorageSync("setDepts")
191
+					if(data){
192
+						data.forEach(i=>{
193
+							dataList.push(i)
194
+						})
195
+						allData = dataList
196
+					}else{
197
+						allData = dataList
198
+					}
199
+					let newList2 = []
200
+					let newList3 = []
201
+					allData.forEach((item) => {
202
+						if (!newList2.includes(item.id)) {
203
+							newList2.push(item.id)
204
+						}
205
+					})
206
+					newList2.forEach(i=>{
207
+						newList3.push(allData.find(x=> x.id == i))
208
+					})
209
+					// console.log(555,newList3)
210
+					uni.setStorageSync("setDepts", newList3)
211
+          uni.navigateTo({
212
+            url: `../setDept/setDept?configName=${this.configName}&id=${this.id}&changedept=${this.changedept}`,
213
+          });
214
+        }
215
+      },
216
+
217
+			// 选择楼栋
218
+			itemClick(item){
219
+
220
+			},
221
+			changeColl(){
222
+				
223
+			},
224
+      // 选择楼栋
225
+      checkboxChange: function(e) {
226
+
227
+      },
228
+      //获取楼栋列表
229
+      getBuildings() {
230
+				this.allNum = 0
231
+				let data = uni.getStorageSync("floorList")
232
+				data.forEach((item, index)=>{
233
+					item.num = 0
234
+					item.floor.collapseValue = []
235
+					item.floor.id = item.floor.id.toString() + 'parent'
236
+					item.checked = false
237
+					this.allNum += item.children.length
238
+					if(item.children && item.children.length>0){
239
+						for(let i of item.children){
240
+							i.checked = false
241
+							i.id = i.id.toString()
242
+							i.floor.id = i.floor.id.toString() + 'parent'
243
+						}
244
+					}
245
+       })
246
+			 console.log(3232131,this.allNum)
247
+       this.dataList = data || [];
248
+      }
249
+    },
250
+  };
251
+</script>
252
+<style>
253
+	uni-checkbox-group{
254
+	/* 	display: flex;
255
+		align-items: center;
256
+		position: relative; */
257
+	}
258
+	/deep/ .uni-collapse-item__title-box{
259
+		margin-left: 50rpx
260
+	}
261
+</style>
262
+<style scoped lang="less">
263
+  view {
264
+    display: block;
265
+  }
266
+	.df-fl{
267
+		display: flex;
268
+		align-items: center;
269
+		justify-content: center;
270
+		position: relative;
271
+		.top-right{
272
+			position: absolute;
273
+			right: 40rpx;
274
+		}
275
+	}
276
+	.df-all{
277
+		position: absolute;
278
+		left: 16rpx;
279
+		.text{
280
+			margin-left: 8rpx;
281
+		}
282
+	}
283
+	.view-box{
284
+		position: relative;
285
+	}
286
+	.top-check1{
287
+		position: absolute;
288
+		left: 0;
289
+		top: 20rpx;
290
+		z-index: 999;
291
+	}
292
+	.top-check2{
293
+		position: absolute;
294
+		left: 0;
295
+		top: 20rpx;
296
+		z-index: 999;
297
+	}
298
+	.right-ab{
299
+		position: absolute;
300
+		right: 64rpx;
301
+		top: 28rpx;
302
+		z-index: 999;
303
+		color: #303133;
304
+	}
305
+	.title{
306
+		padding: 30rpx;
307
+		font-size: 32rpx;
308
+		text-align: center;
309
+		font-weight: bold;
310
+	}
311
+  // 底部
312
+  .toolbar {
313
+    position: fixed;
314
+    left: 0;
315
+    right: 0;
316
+    bottom: 30rpx;
317
+		width: 96%;
318
+		margin-left: 2%;
319
+    z-index: 9999;
320
+    height: 88rpx;
321
+    display: flex;
322
+    justify-content: space-between;
323
+    align-items: center;
324
+    box-sizing: border-box;
325
+		color: #fff;
326
+		
327
+		.back{
328
+			width: 48%;
329
+			height: 88rpx;
330
+			display: flex;
331
+			justify-content: center;
332
+			align-items: center;
333
+			box-sizing: border-box;
334
+			border-radius: 10rpx;
335
+			background-color: #8F939C;
336
+		}
337
+		.confirm{
338
+			width: 46%;
339
+			height: 88rpx;
340
+			display: flex;
341
+			justify-content: center;
342
+			align-items: center;
343
+			box-sizing: border-box;
344
+			border-radius: 10rpx;
345
+			background-color: #49B856;
346
+		}
347
+  }
348
+
349
+  .search-box {
350
+    width: 95%;
351
+    background-color: rgb(242, 242, 242);
352
+    padding: 15upx 2.5%;
353
+    display: flex;
354
+    justify-content: space-between;
355
+    position: sticky;
356
+    top: 0;
357
+  }
358
+
359
+  .search-box .mSearch-input-box {
360
+    width: 100%;
361
+  }
362
+
363
+  .search-box .input-box {
364
+    width: 85%;
365
+    flex-shrink: 1;
366
+    display: flex;
367
+    justify-content: center;
368
+    align-items: center;
369
+  }
370
+
371
+  .search-box .search-btn {
372
+    width: 15%;
373
+    margin: 0 0 0 2%;
374
+    display: flex;
375
+    justify-content: flex-start;
376
+    align-items: center;
377
+    flex-shrink: 0;
378
+    font-size: 28upx;
379
+    color: #fff;
380
+    background: linear-gradient(to right, #ff9801, #ff570a);
381
+    border-radius: 60upx;
382
+  }
383
+
384
+  .search-box .input-box>input {
385
+    width: 100%;
386
+    height: 60upx;
387
+    font-size: 32upx;
388
+    border: 0;
389
+    border-radius: 60upx;
390
+    -webkit-appearance: none;
391
+    -moz-appearance: none;
392
+    appearance: none;
393
+    padding: 0 3%;
394
+    margin: 0;
395
+    background-color: #ffffff;
396
+  }
397
+
398
+  .placeholder-class {
399
+    color: #9e9e9e;
400
+  }
401
+
402
+  .search-keyword {
403
+    width: 100%;
404
+    background-color: rgb(242, 242, 242);
405
+  }
406
+
407
+  .keyword-list-box {
408
+    height: calc(100vh - 230rpx);
409
+    padding-top: 10upx;
410
+		// padding: 0 20rpx;
411
+    border-radius: 20upx 20upx 0 0;
412
+    background-color: #fff;
413
+		width: 96%;
414
+		padding-left: 2%;
415
+  }
416
+
417
+  .keyword-entry-tap {
418
+    background-color: #eee;
419
+  }
420
+
421
+  .keyword-entry {
422
+    width: 94%;
423
+    height: 80rpx;
424
+    margin: 0 3%;
425
+    font-size: 30rpx;
426
+    color: #333;
427
+    display: flex;
428
+    justify-content: start;
429
+    align-items: center;
430
+    border-bottom: solid 1rpx #DEDEDE;
431
+  }
432
+
433
+  .keyword-entry image {
434
+    width: 60upx;
435
+    height: 60upx;
436
+  }
437
+
438
+  .keyword-entry .keyword-text,
439
+  .keyword-entry .keyword-img {
440
+    height: 80upx;
441
+    display: flex;
442
+    align-items: center;
443
+		position: relative;
444
+  }
445
+	
446
+	.title-2{
447
+		padding-left: 76rpx;
448
+	}
449
+	
450
+  .keyword-entry .keyword-text {
451
+    // width: 90%;
452
+  }
453
+
454
+  .keyword-entry .keyword-img {
455
+    width: 10%;
456
+    justify-content: center;
457
+  }
458
+
459
+  .keyword-box {
460
+    height: calc(100vh - 110upx);
461
+    border-radius: 20upx 20upx 0 0;
462
+    background-color: #fff;
463
+  }
464
+
465
+  .keyword-box .keyword-block {
466
+    padding: 10upx 0;
467
+  }
468
+
469
+  .keyword-box .keyword-block .keyword-list-header {
470
+    width: 94%;
471
+    padding: 10upx 3%;
472
+    font-size: 27upx;
473
+    color: #333;
474
+    display: flex;
475
+    justify-content: space-between;
476
+  }
477
+
478
+  .keyword-box .keyword-block .keyword-list-header image {
479
+    width: 40upx;
480
+    height: 40upx;
481
+  }
482
+
483
+  .keyword-box .keyword-block .keyword {
484
+    width: 94%;
485
+    padding: 3px 3%;
486
+    display: flex;
487
+    flex-flow: wrap;
488
+    justify-content: flex-start;
489
+  }
490
+
491
+  .keyword-box .keyword-block .hide-hot-tis {
492
+    display: flex;
493
+    justify-content: center;
494
+    font-size: 28upx;
495
+    color: #6b6b6b;
496
+  }
497
+
498
+  .keyword-box .keyword-block .keyword>view {
499
+    display: flex;
500
+    justify-content: center;
501
+    align-items: center;
502
+    border-radius: 60upx;
503
+    padding: 0 20upx;
504
+    margin: 10upx 20upx 10upx 0;
505
+    height: 60upx;
506
+    font-size: 28upx;
507
+    background-color: rgb(242, 242, 242);
508
+    color: #6b6b6b;
509
+  }
510
+</style>

+ 75 - 74
pages/searchMuti/searchMuti.vue

@@ -1,8 +1,9 @@
1 1
 <template>
2 2
   <view class="content">
3
+		<view class="title">请选择楼栋</view>
3 4
     <view class="search-keyword">
4 5
       <scroll-view class="keyword-list-box" scroll-y>
5
-        <checkbox-group @change="checkboxChange">
6
+        <!-- <checkbox-group @change="checkboxChange">
6 7
           <label v-for="(row, index) in dataList" :key="row.id">
7 8
             <view class="keyword-entry" hover-class="keyword-entry-tap">
8 9
               <view class="keyword-text">
@@ -14,11 +15,18 @@
14 15
               </view>
15 16
             </view>
16 17
           </label>
17
-        </checkbox-group>
18
+        </checkbox-group> -->
19
+				<label v-for="(row, index) in dataList" :key="row.id" @click="itemClick(row)">
20
+				  <view class="keyword-entry" hover-class="keyword-entry-tap">
21
+				    <view class="keyword-text">
22
+				      {{row.buildingName}}
23
+				    </view>
24
+				  </view>
25
+				</label>
18 26
       </scroll-view>
19 27
     </view>
20 28
     <view class="toolbar" @click="determine()" hover-class="seimin-btn-hover">
21
-      <text class="toolbar-sao">确定</text>
29
+      返回
22 30
     </view>
23 31
     <!-- 弹窗 -->
24 32
     <showModel :title="models.title" :icon="models.icon" :disjunctor="models.disjunctor" :content="models.content" @know="know" :operate="models.operate"></showModel>
@@ -103,72 +111,51 @@
103 111
       },
104 112
       // 确认
105 113
       determine() {
106
-        console.log(this.dataList);
107
-        const dataList = this.dataList.filter(v => v.checked);
108
-        if (dataList.length === 0) {
109
-          this.models = {
110
-            disjunctor: true,
111
-            title: "提示",
112
-            content: "请选择至少一个楼栋",
113
-            icon: "warn",
114
-            operate: {
115
-              know: "返回",
116
-            },
117
-          };
118
-        } else {
119
-          let postData = {
120
-            "idx": 0,
121
-            "sum": 9999,
122
-            department: {
123
-              buildIds: dataList.map(v => v.id).toString()
124
-            }
125
-          }
114
+				uni.navigateBack({
115
+					delta: 1,
116
+				})
117
+      },
118
+			// 选择楼栋
119
+			itemClick(item){
120
+				console.log(3333,item)
121
+				let postData = {
122
+				  "idx": 0,
123
+				  "sum": 9999,
124
+				  department: {
125
+				    buildIds: item.id,
126
+						groupByFloor: true
127
+				  }
128
+				}
126 129
 
127
-          if(this.quickCombinationDeptType){
128
-            postData.department.deptTypeIds = this.quickCombinationDeptType;
129
-          } else if (this.sysDeptType === 0) {
130
-            return;
131
-          } else {
132
-            postData.department.type = {
133
-              id: this.sysDeptType
134
-            }
135
-          }
130
+				if(this.quickCombinationDeptType){
131
+				  postData.department.deptTypeIds = this.quickCombinationDeptType;
132
+				} else if (this.sysDeptType === 0) {
133
+				  return;
134
+				} else {
135
+				  postData.department.type = {
136
+				    id: this.sysDeptType
137
+				  }
138
+				}
136 139
 
137
-          uni.showLoading({
138
-            title: "加载中",
139
-          });
140
-          post("/data/fetchDataList/department", postData).then((res) => {
141
-            uni.hideLoading();
142
-            if (res.status == 200) {
143
-              let obj = uni.getStorageSync("setDepts");
144
-              console.log(res.list,obj)
145
-              if (obj) {
146
-                let list = [...res.list, ...obj];
147
-                let newArr = [];
148
-                let obj1 = {};
149
-                for (let i = 0; i < list.length; i++) {
150
-                  if (!obj1[list[i].id]) {
151
-                    newArr.push(list[i]);
152
-                    obj1[list[i].id] = true;
153
-                  }
154
-                }
155
-                console.log(newArr);
156
-                uni.setStorageSync("setDepts", newArr);
157
-              } else {
158
-                uni.setStorageSync("setDepts", res.list);
159
-              }
160
-              uni.navigateTo({
161
-                url: `../setDept/setDept?configName=${this.configName}&id=${this.id}&changedept=${this.changedept}`,//不知道
162
-              });
163
-            } else {
164
-              uni.showToast({
165
-                icon: "none",
166
-                title: res.msg || "接口获取数据失败!",
167
-              });
168
-            }
169
-          })
170
-        }
171
-      },
140
+				uni.showLoading({
141
+				  title: "加载中",
142
+				});
143
+				post("/data/fetchDataList/department", postData).then((res) => {
144
+				  uni.hideLoading();
145
+				  if (res.status == 200) {
146
+						console.log(2222,res.list)
147
+				    uni.setStorageSync("floorList", res.list)
148
+						uni.navigateTo({
149
+						  url: `../searchFloor/searchFloor?name=${item.buildingName}&configName=${this.configName}&id=${this.id}&changedept=${this.changedept}`
150
+						});
151
+				  } else {
152
+				    uni.showToast({
153
+				      icon: "none",
154
+				      title: res.msg || "接口获取数据失败!",
155
+				    });
156
+				  }
157
+				})
158
+			},
172 159
       // 选择楼栋
173 160
       checkboxChange: function(e) {
174 161
         var dataList = this.dataList,
@@ -234,18 +221,27 @@
234 221
   view {
235 222
     display: block;
236 223
   }
224
+	.title{
225
+		padding: 30rpx;
226
+		font-size: 32rpx;
227
+		text-align: center;
228
+		font-weight: bold;
229
+	}
237 230
   // 底部
238 231
   .toolbar {
239 232
     position: fixed;
240 233
     left: 0;
241 234
     right: 0;
242
-    bottom: 0;
235
+    bottom: 30rpx;
236
+		width: 96%;
237
+		margin-left: 2%;
243 238
     z-index: 9999;
244 239
     height: 88rpx;
245 240
     display: flex;
246 241
     justify-content: center;
247 242
     align-items: center;
248 243
     box-sizing: border-box;
244
+<<<<<<< HEAD
249 245
     border-radius: 4rpx;
250 246
     box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.24);
251 247
     background-color: #e5e9ed;
@@ -254,6 +250,11 @@
254 250
       font-size: 36rpx;
255 251
       color: #49b856;
256 252
     }
253
+=======
254
+    border-radius: 10rpx;
255
+    background-color: #8F939C;
256
+		color: #fff;
257
+>>>>>>> 4d9d7bbc8b04c37d7024b340569a845c221b83d2
257 258
   }
258 259
 
259 260
   .search-box {
@@ -315,7 +316,7 @@
315 316
   }
316 317
 
317 318
   .keyword-list-box {
318
-    height: calc(100vh - 110upx);
319
+    height: calc(100vh - 230rpx);
319 320
     padding-top: 10upx;
320 321
     border-radius: 20upx 20upx 0 0;
321 322
     background-color: #fff;
@@ -327,14 +328,14 @@
327 328
 
328 329
   .keyword-entry {
329 330
     width: 94%;
330
-    height: 80upx;
331
+    height: 80rpx;
331 332
     margin: 0 3%;
332
-    font-size: 30upx;
333
+    font-size: 30rpx;
333 334
     color: #333;
334 335
     display: flex;
335
-    justify-content: space-between;
336
+    justify-content: center;
336 337
     align-items: center;
337
-    border-bottom: solid 1upx #e7e7e7;
338
+    border-bottom: solid 1rpx #DEDEDE;
338 339
   }
339 340
 
340 341
   .keyword-entry image {
@@ -350,7 +351,7 @@
350 351
   }
351 352
 
352 353
   .keyword-entry .keyword-text {
353
-    width: 90%;
354
+    // width: 90%;
354 355
   }
355 356
 
356 357
   .keyword-entry .keyword-img {

+ 10 - 3
pages/setDept/setDept.vue

@@ -2,8 +2,8 @@
2 2
   <view class="setDept">
3 3
     <view class="page_tab">
4 4
       <view class="page_tab_bar active">
5
+				<view class="dept_title">{{ configName }}</view>
5 6
         <view class="tab_dept">
6
-          {{ configName}}
7 7
           <button type="default" size="mini" class="addDept" @click="addDeptClick">
8 8
             添加科室
9 9
           </button>
@@ -350,10 +350,17 @@
350 350
           width: 100%;
351 351
           background-color: transparent;
352 352
         }
353
-
353
+				
354
+				.dept_title{
355
+					font-size: 30rpx;
356
+					width: 220rpx;
357
+					overflow: hidden;
358
+					white-space: nowrap; 
359
+					text-overflow: ellipsis;
360
+				}
361
+				
354 362
         .tab_dept {
355 363
           position: relative;
356
-
357 364
           .addDept {
358 365
             white-space: nowrap;
359 366
             margin: 0;

+ 49 - 3
static/font/demo_index.html

@@ -55,6 +55,18 @@
55 55
           <ul class="icon_lists dib-box">
56 56
           
57 57
             <li class="dib">
58
+              <span class="icon newicon">&#xea89;</span>
59
+                <div class="name">休息中</div>
60
+                <div class="code-name">&amp;#xea89;</div>
61
+              </li>
62
+          
63
+            <li class="dib">
64
+              <span class="icon newicon">&#xe68d;</span>
65
+                <div class="name">工作中</div>
66
+                <div class="code-name">&amp;#xe68d;</div>
67
+              </li>
68
+          
69
+            <li class="dib">
58 70
               <span class="icon newicon">&#xe653;</span>
59 71
                 <div class="name">密钥</div>
60 72
                 <div class="code-name">&amp;#xe653;</div>
@@ -720,9 +732,9 @@
720 732
 <pre><code class="language-css"
721 733
 >@font-face {
722 734
   font-family: 'newicon';
723
-  src: url('iconfont.woff2?t=1731394849627') format('woff2'),
724
-       url('iconfont.woff?t=1731394849627') format('woff'),
725
-       url('iconfont.ttf?t=1731394849627') format('truetype');
735
+  src: url('iconfont.woff2?t=1744858396442') format('woff2'),
736
+       url('iconfont.woff?t=1744858396442') format('woff'),
737
+       url('iconfont.ttf?t=1744858396442') format('truetype');
726 738
 }
727 739
 </code></pre>
728 740
           <h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
@@ -749,6 +761,24 @@
749 761
         <ul class="icon_lists dib-box">
750 762
           
751 763
           <li class="dib">
764
+            <span class="icon newicon newicon-xiuxizhong"></span>
765
+            <div class="name">
766
+              休息中
767
+            </div>
768
+            <div class="code-name">.newicon-xiuxizhong
769
+            </div>
770
+          </li>
771
+          
772
+          <li class="dib">
773
+            <span class="icon newicon newicon-gongzuozhong"></span>
774
+            <div class="name">
775
+              工作中
776
+            </div>
777
+            <div class="code-name">.newicon-gongzuozhong
778
+            </div>
779
+          </li>
780
+          
781
+          <li class="dib">
752 782
             <span class="icon newicon newicon-miyue"></span>
753 783
             <div class="name">
754 784
               密钥
@@ -1749,6 +1779,22 @@
1749 1779
           
1750 1780
             <li class="dib">
1751 1781
                 <svg class="icon svg-icon" aria-hidden="true">
1782
+                  <use xlink:href="#newicon-xiuxizhong"></use>
1783
+                </svg>
1784
+                <div class="name">休息中</div>
1785
+                <div class="code-name">#newicon-xiuxizhong</div>
1786
+            </li>
1787
+          
1788
+            <li class="dib">
1789
+                <svg class="icon svg-icon" aria-hidden="true">
1790
+                  <use xlink:href="#newicon-gongzuozhong"></use>
1791
+                </svg>
1792
+                <div class="name">工作中</div>
1793
+                <div class="code-name">#newicon-gongzuozhong</div>
1794
+            </li>
1795
+          
1796
+            <li class="dib">
1797
+                <svg class="icon svg-icon" aria-hidden="true">
1752 1798
                   <use xlink:href="#newicon-miyue"></use>
1753 1799
                 </svg>
1754 1800
                 <div class="name">密钥</div>

+ 11 - 3
static/font/iconfont.css

@@ -1,8 +1,8 @@
1 1
 @font-face {
2 2
   font-family: "newicon"; /* Project id 4304849 */
3
-  src: url('~@/static/font/iconfont.woff2?t=1728893186075') format('woff2'),
4
-       url('~@/static/font/iconfont.woff?t=1728893186075') format('woff'),
5
-       url('~@/static/font/iconfont.ttf?t=1728893186075') format('truetype');
3
+  src: url('~@/static/font/iconfont.woff2?t=1744858396442') format('woff2'),
4
+       url('~@/static/font/iconfont.woff?t=1744858396442') format('woff'),
5
+       url('~@/static/font/iconfont.ttf?t=1744858396442') format('truetype');
6 6
 }
7 7
 
8 8
 .newicon {
@@ -13,6 +13,14 @@
13 13
   -moz-osx-font-smoothing: grayscale;
14 14
 }
15 15
 
16
+.newicon-xiuxizhong:before {
17
+  content: "\ea89";
18
+}
19
+
20
+.newicon-gongzuozhong:before {
21
+  content: "\e68d";
22
+}
23
+
16 24
 .newicon-miyue:before {
17 25
   content: "\e653";
18 26
 }

File diff suppressed because it is too large
+ 1 - 1
static/font/iconfont.js


+ 14 - 0
static/font/iconfont.json

@@ -6,6 +6,20 @@
6 6
   "description": "",
7 7
   "glyphs": [
8 8
     {
9
+      "icon_id": "8189388",
10
+      "name": "休息中",
11
+      "font_class": "xiuxizhong",
12
+      "unicode": "ea89",
13
+      "unicode_decimal": 60041
14
+    },
15
+    {
16
+      "icon_id": "10690611",
17
+      "name": "工作中",
18
+      "font_class": "gongzuozhong",
19
+      "unicode": "e68d",
20
+      "unicode_decimal": 59021
21
+    },
22
+    {
9 23
       "icon_id": "8655877",
10 24
       "name": "密钥",
11 25
       "font_class": "miyue",

二進制
static/font/iconfont.ttf


二進制
static/font/iconfont.woff


二進制
static/font/iconfont.woff2


+ 38 - 0
uni_modules/uni-collapse/changelog.md

@@ -0,0 +1,38 @@
1
+## 1.4.4(2024-03-20)
2
+- 修复 titleBorder类型修正
3
+## 1.4.3(2022-01-25)
4
+- 修复 初始化的时候 ,open 属性失效的bug
5
+## 1.4.2(2022-01-21)
6
+- 修复 微信小程序resize后组件收起的bug
7
+## 1.4.1(2021-11-22)
8
+- 修复 vue3中个别scss变量无法找到的问题
9
+## 1.4.0(2021-11-19)
10
+- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
11
+- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-collapse](https://uniapp.dcloud.io/component/uniui/uni-collapse)
12
+## 1.3.3(2021-08-17)
13
+- 优化 show-arrow 属性默认为true
14
+## 1.3.2(2021-08-17)
15
+- 新增 show-arrow 属性,控制是否显示右侧箭头
16
+## 1.3.1(2021-07-30)
17
+- 优化 vue3下小程序事件警告的问题
18
+## 1.3.0(2021-07-30)
19
+- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
20
+## 1.2.2(2021-07-21)
21
+- 修复 由1.2.0版本引起的 change 事件返回 undefined 的Bug
22
+## 1.2.1(2021-07-21)
23
+- 优化 组件示例
24
+## 1.2.0(2021-07-21)
25
+- 新增 组件折叠动画
26
+- 新增 value\v-model 属性 ,动态修改面板折叠状态
27
+- 新增 title 插槽 ,可定义面板标题
28
+- 新增 border 属性 ,显示隐藏面板内容分隔线
29
+- 新增 title-border 属性 ,显示隐藏面板标题分隔线
30
+- 修复 resize 方法失效的Bug
31
+- 修复 change 事件返回参数不正确的Bug
32
+- 优化 H5、App 平台自动更具内容更新高度,无需调用 reszie() 方法
33
+## 1.1.7(2021-05-12)
34
+- 新增 组件示例地址
35
+## 1.1.6(2021-02-05)
36
+- 优化 组件引用关系,通过uni_modules引用组件
37
+## 1.1.5(2021-02-05)
38
+- 调整为uni_modules目录规范

+ 402 - 0
uni_modules/uni-collapse/components/uni-collapse-item/uni-collapse-item.vue

@@ -0,0 +1,402 @@
1
+<template>
2
+	<view class="uni-collapse-item">
3
+		<!-- onClick(!isOpen) -->
4
+		<view @click="onClick(!isOpen)" class="uni-collapse-item__title"
5
+			:class="{'is-open':isOpen &&titleBorder === 'auto' ,'uni-collapse-item-border':titleBorder !== 'none'}">
6
+			<view class="uni-collapse-item__title-wrap">
7
+				<slot name="title">
8
+					<view class="uni-collapse-item__title-box" :class="{'is-disabled':disabled}">
9
+						<image v-if="thumb" :src="thumb" class="uni-collapse-item__title-img" />
10
+						<text class="uni-collapse-item__title-text">{{ title }}</text>
11
+					</view>
12
+				</slot>
13
+			</view>
14
+			<view v-if="showArrow"
15
+				:class="{ 'uni-collapse-item__title-arrow-active': isOpen, 'uni-collapse-item--animation': showAnimation === true }"
16
+				class="uni-collapse-item__title-arrow">
17
+				<uni-icons :color="disabled?'#ddd':'#bbb'" size="14" type="bottom" />
18
+			</view>
19
+		</view>
20
+		<view class="uni-collapse-item__wrap" :class="{'is--transition':showAnimation}"
21
+			:style="{height: (isOpen?height:0) +'px'}">
22
+			<view :id="elId" ref="collapse--hook" class="uni-collapse-item__wrap-content"
23
+				:class="{open:isheight,'uni-collapse-item--border':border&&isOpen}">
24
+				<slot></slot>
25
+			</view>
26
+		</view>
27
+
28
+	</view>
29
+</template>
30
+
31
+<script>
32
+	// #ifdef APP-NVUE
33
+	const dom = weex.requireModule('dom')
34
+	// #endif
35
+	/**
36
+	 * CollapseItem 折叠面板子组件
37
+	 * @description 折叠面板子组件
38
+	 * @property {String} title 标题文字
39
+	 * @property {String} thumb 标题左侧缩略图
40
+	 * @property {String} name 唯一标志符
41
+	 * @property {Boolean} open = [true|false] 是否展开组件
42
+	 * @property {Boolean} titleBorder = [true|false] 是否显示标题分隔线
43
+	 * @property {String} border = ['auto'|'show'|'none'] 是否显示分隔线
44
+	 * @property {Boolean} disabled = [true|false] 是否展开面板
45
+	 * @property {Boolean} showAnimation = [true|false] 开启动画
46
+	 * @property {Boolean} showArrow = [true|false] 是否显示右侧箭头
47
+	 */
48
+	export default {
49
+		name: 'uniCollapseItem',
50
+		props: {
51
+			// 列表标题
52
+			title: {
53
+				type: String,
54
+				default: ''
55
+			},
56
+			name: {
57
+				type: [Number, String],
58
+				default: ''
59
+			},
60
+			// 是否禁用
61
+			disabled: {
62
+				type: Boolean,
63
+				default: false
64
+			},
65
+			// #ifdef APP-PLUS
66
+			// 是否显示动画,app 端默认不开启动画,卡顿严重
67
+			showAnimation: {
68
+				type: Boolean,
69
+				default: false
70
+			},
71
+			// #endif
72
+			// #ifndef APP-PLUS
73
+			// 是否显示动画
74
+			showAnimation: {
75
+				type: Boolean,
76
+				default: true
77
+			},
78
+			// #endif
79
+			// 是否展开
80
+			open: {
81
+				type: Boolean,
82
+				default: false
83
+			},
84
+			// 缩略图
85
+			thumb: {
86
+				type: String,
87
+				default: ''
88
+			},
89
+			// 标题分隔线显示类型
90
+			titleBorder: {
91
+				type: String,
92
+				default: 'auto'
93
+			},
94
+			border: {
95
+				type: Boolean,
96
+				default: true
97
+			},
98
+			showArrow: {
99
+				type: Boolean,
100
+				default: true
101
+			}
102
+		},
103
+		data() {
104
+			// TODO 随机生生元素ID,解决百度小程序获取同一个元素位置信息的bug
105
+			const elId = `Uni_${Math.ceil(Math.random() * 10e5).toString(36)}`
106
+			return {
107
+				isOpen: false,
108
+				isheight: null,
109
+				height: 0,
110
+				elId,
111
+				nameSync: 0
112
+			}
113
+		},
114
+		watch: {
115
+			open(val) {
116
+				this.isOpen = val
117
+				this.onClick(val, 'init')
118
+			}
119
+		},
120
+		updated(e) {
121
+			this.$nextTick(() => {
122
+				this.init(true)
123
+			})
124
+		},
125
+		created() {
126
+			this.collapse = this.getCollapse()
127
+			this.oldHeight = 0
128
+			this.onClick(this.open, 'init')
129
+		},
130
+		// #ifndef VUE3
131
+		// TODO vue2
132
+		destroyed() {
133
+			if (this.__isUnmounted) return
134
+			this.uninstall()
135
+		},
136
+		// #endif
137
+		// #ifdef VUE3
138
+		// TODO vue3
139
+		unmounted() {
140
+			this.__isUnmounted = true
141
+			this.uninstall()
142
+		},
143
+		// #endif
144
+		mounted() {
145
+			if (!this.collapse) return
146
+			if (this.name !== '') {
147
+				this.nameSync = this.name
148
+			} else {
149
+				this.nameSync = this.collapse.childrens.length + ''
150
+			}
151
+			if (this.collapse.names.indexOf(this.nameSync) === -1) {
152
+				this.collapse.names.push(this.nameSync)
153
+			} else {
154
+				console.warn(`name 值 ${this.nameSync} 重复`);
155
+			}
156
+			if (this.collapse.childrens.indexOf(this) === -1) {
157
+				this.collapse.childrens.push(this)
158
+			}
159
+			this.init()
160
+		},
161
+		methods: {
162
+			init(type) {
163
+				// #ifndef APP-NVUE
164
+				this.getCollapseHeight(type)
165
+				// #endif
166
+				// #ifdef APP-NVUE
167
+				this.getNvueHwight(type)
168
+				// #endif
169
+			},
170
+			uninstall() {
171
+				if (this.collapse) {
172
+					this.collapse.childrens.forEach((item, index) => {
173
+						if (item === this) {
174
+							this.collapse.childrens.splice(index, 1)
175
+						}
176
+					})
177
+					this.collapse.names.forEach((item, index) => {
178
+						if (item === this.nameSync) {
179
+							this.collapse.names.splice(index, 1)
180
+						}
181
+					})
182
+				}
183
+			},
184
+			onClick(isOpen, type) {
185
+				if (this.disabled) return
186
+				this.isOpen = isOpen
187
+				if (this.isOpen && this.collapse) {
188
+					this.collapse.setAccordion(this)
189
+				}
190
+				if (type !== 'init') {
191
+					this.collapse.onChange(isOpen, this)
192
+				}
193
+			},
194
+			getCollapseHeight(type, index = 0) {
195
+				const views = uni.createSelectorQuery().in(this)
196
+				views
197
+					.select(`#${this.elId}`)
198
+					.fields({
199
+						size: true
200
+					}, data => {
201
+						// TODO 百度中可能获取不到节点信息 ,需要循环获取
202
+						if (index >= 10) return
203
+						if (!data) {
204
+							index++
205
+							this.getCollapseHeight(false, index)
206
+							return
207
+						}
208
+						// #ifdef APP-NVUE
209
+						this.height = data.height + 1
210
+						// #endif
211
+						// #ifndef APP-NVUE
212
+						this.height = data.height
213
+						// #endif
214
+						this.isheight = true
215
+						if (type) return
216
+						this.onClick(this.isOpen, 'init')
217
+					})
218
+					.exec()
219
+			},
220
+			getNvueHwight(type) {
221
+				const result = dom.getComponentRect(this.$refs['collapse--hook'], option => {
222
+					if (option && option.result && option.size) {
223
+						// #ifdef APP-NVUE
224
+						this.height = option.size.height + 1
225
+						// #endif
226
+						// #ifndef APP-NVUE
227
+						this.height = option.size.height
228
+						// #endif
229
+						this.isheight = true
230
+						if (type) return
231
+						this.onClick(this.open, 'init')
232
+					}
233
+				})
234
+			},
235
+			/**
236
+			 * 获取父元素实例
237
+			 */
238
+			getCollapse(name = 'uniCollapse') {
239
+				let parent = this.$parent;
240
+				let parentName = parent.$options.name;
241
+				while (parentName !== name) {
242
+					parent = parent.$parent;
243
+					if (!parent) return false;
244
+					parentName = parent.$options.name;
245
+				}
246
+				return parent;
247
+			}
248
+		}
249
+	}
250
+</script>
251
+
252
+<style lang="scss">
253
+	.uni-collapse-item {
254
+		/* #ifndef APP-NVUE */
255
+		box-sizing: border-box;
256
+
257
+		/* #endif */
258
+		&__title {
259
+			/* #ifndef APP-NVUE */
260
+			display: flex;
261
+			width: 100%;
262
+			box-sizing: border-box;
263
+			/* #endif */
264
+			flex-direction: row;
265
+			align-items: center;
266
+			transition: border-bottom-color .3s;
267
+
268
+			// transition-property: border-bottom-color;
269
+			// transition-duration: 5s;
270
+			&-wrap {
271
+				width: 100%;
272
+				flex: 1;
273
+
274
+			}
275
+
276
+			&-box {
277
+				padding: 0 15px;
278
+				/* #ifndef APP-NVUE */
279
+				display: flex;
280
+				width: 100%;
281
+				box-sizing: border-box;
282
+				/* #endif */
283
+				flex-direction: row;
284
+				justify-content: space-between;
285
+				align-items: center;
286
+				height: 48px;
287
+				line-height: 48px;
288
+				background-color: #fff;
289
+				color: #303133;
290
+				font-size: 13px;
291
+				font-weight: 500;
292
+				/* #ifdef H5 */
293
+				cursor: pointer;
294
+				outline: none;
295
+
296
+				/* #endif */
297
+				&.is-disabled {
298
+					.uni-collapse-item__title-text {
299
+						color: #999;
300
+					}
301
+				}
302
+
303
+			}
304
+
305
+			&.uni-collapse-item-border {
306
+				border-bottom: 1px solid #ebeef5;
307
+			}
308
+
309
+			&.is-open {
310
+				border-bottom-color: transparent;
311
+			}
312
+
313
+			&-img {
314
+				height: 22px;
315
+				width: 22px;
316
+				margin-right: 10px;
317
+			}
318
+
319
+			&-text {
320
+				flex: 1;
321
+				font-size: 14px;
322
+				/* #ifndef APP-NVUE */
323
+				white-space: nowrap;
324
+				color: inherit;
325
+				/* #endif */
326
+				/* #ifdef APP-NVUE */
327
+				lines: 1;
328
+				/* #endif */
329
+				overflow: hidden;
330
+				text-overflow: ellipsis;
331
+			}
332
+
333
+			&-arrow {
334
+				/* #ifndef APP-NVUE */
335
+				display: flex;
336
+				box-sizing: border-box;
337
+				/* #endif */
338
+				align-items: center;
339
+				justify-content: center;
340
+				width: 20px;
341
+				height: 20px;
342
+				margin-right: 10px;
343
+				transform: rotate(0deg);
344
+
345
+				&-active {
346
+					transform: rotate(-180deg);
347
+				}
348
+			}
349
+
350
+
351
+		}
352
+
353
+		&__wrap {
354
+			/* #ifndef APP-NVUE */
355
+			will-change: height;
356
+			box-sizing: border-box;
357
+			/* #endif */
358
+			background-color: #fff;
359
+			overflow: hidden;
360
+			position: relative;
361
+			height: 0;
362
+
363
+			&.is--transition {
364
+				// transition: all 0.3s;
365
+				transition-property: height, border-bottom-width;
366
+				transition-duration: 0.3s;
367
+				/* #ifndef APP-NVUE */
368
+				will-change: height;
369
+				/* #endif */
370
+			}
371
+
372
+
373
+
374
+			&-content {
375
+				position: absolute;
376
+				font-size: 13px;
377
+				color: #303133;
378
+				// transition: height 0.3s;
379
+				border-bottom-color: transparent;
380
+				border-bottom-style: solid;
381
+				border-bottom-width: 0;
382
+
383
+				&.uni-collapse-item--border {
384
+					border-bottom-width: 1px;
385
+					border-bottom-color: red;
386
+					border-bottom-color: #ebeef5;
387
+				}
388
+
389
+				&.open {
390
+					position: relative;
391
+				}
392
+			}
393
+		}
394
+
395
+		&--animation {
396
+			transition-property: transform;
397
+			transition-duration: 0.3s;
398
+			transition-timing-function: ease;
399
+		}
400
+
401
+	}
402
+</style>

+ 147 - 0
uni_modules/uni-collapse/components/uni-collapse/uni-collapse.vue

@@ -0,0 +1,147 @@
1
+<template>
2
+	<view class="uni-collapse">
3
+		<slot />
4
+	</view>
5
+</template>
6
+<script>
7
+	/**
8
+	 * Collapse 折叠面板
9
+	 * @description 展示可以折叠 / 展开的内容区域
10
+	 * @tutorial https://ext.dcloud.net.cn/plugin?id=23
11
+	 * @property {String|Array} value 当前激活面板改变时触发(如果是手风琴模式,参数类型为string,否则为array)
12
+	 * @property {Boolean} accordion = [true|false] 是否开启手风琴效果是否开启手风琴效果
13
+	 * @event {Function} change 切换面板时触发,如果是手风琴模式,返回类型为string,否则为array
14
+	 */
15
+	export default {
16
+		name: 'uniCollapse',
17
+		emits:['change','activeItem','input','update:modelValue'],
18
+		props: {
19
+			value: {
20
+				type: [String, Array],
21
+				default: ''
22
+			},
23
+			modelValue: {
24
+				type: [String, Array],
25
+				default: ''
26
+			},
27
+			accordion: {
28
+				// 是否开启手风琴效果
29
+				type: [Boolean, String],
30
+				default: false
31
+			},
32
+		},
33
+		data() {
34
+			return {}
35
+		},
36
+		computed: {
37
+			// TODO 兼容 vue2 和 vue3
38
+			dataValue() {
39
+				let value = (typeof this.value === 'string' && this.value === '') ||
40
+					(Array.isArray(this.value) && this.value.length === 0)
41
+				let modelValue = (typeof this.modelValue === 'string' && this.modelValue === '') ||
42
+					(Array.isArray(this.modelValue) && this.modelValue.length === 0)
43
+				if (value) {
44
+					return this.modelValue
45
+				}
46
+				if (modelValue) {
47
+					return this.value
48
+				}
49
+
50
+				return this.value
51
+			}
52
+		},
53
+		watch: {
54
+			dataValue(val) {
55
+				this.setOpen(val)
56
+			}
57
+		},
58
+		created() {
59
+			this.childrens = []
60
+			this.names = []
61
+		},
62
+		mounted() {
63
+			this.$nextTick(()=>{
64
+				this.setOpen(this.dataValue)
65
+			})
66
+		},
67
+		methods: {
68
+			setOpen(val) {
69
+				let str = typeof val === 'string'
70
+				let arr = Array.isArray(val)
71
+				this.childrens.forEach((vm, index) => {
72
+					if (str) {
73
+						if (val === vm.nameSync) {
74
+							if (!this.accordion) {
75
+								console.warn('accordion 属性为 false ,v-model 类型应该为 array')
76
+								return
77
+							}
78
+							vm.isOpen = true
79
+						}
80
+					}
81
+					if (arr) {
82
+						val.forEach(v => {
83
+							if (v === vm.nameSync) {
84
+								if (this.accordion) {
85
+									console.warn('accordion 属性为 true ,v-model 类型应该为 string')
86
+									return
87
+								}
88
+								vm.isOpen = true
89
+							}
90
+						})
91
+					}
92
+				})
93
+				this.emit(val)
94
+			},
95
+			setAccordion(self) {
96
+				if (!this.accordion) return
97
+				this.childrens.forEach((vm, index) => {
98
+					if (self !== vm) {
99
+						vm.isOpen = false
100
+					}
101
+				})
102
+			},
103
+			resize() {
104
+				this.childrens.forEach((vm, index) => {
105
+					// #ifndef APP-NVUE
106
+					vm.getCollapseHeight()
107
+					// #endif
108
+					// #ifdef APP-NVUE
109
+					vm.getNvueHwight()
110
+					// #endif
111
+				})
112
+			},
113
+			onChange(isOpen, self) {
114
+				let activeItem = []
115
+
116
+				if (this.accordion) {
117
+					activeItem = isOpen ? self.nameSync : ''
118
+				} else {
119
+					this.childrens.forEach((vm, index) => {
120
+						if (vm.isOpen) {
121
+							activeItem.push(vm.nameSync)
122
+						}
123
+					})
124
+				}
125
+				this.$emit('change', activeItem)
126
+				this.emit(activeItem)
127
+			},
128
+			emit(val){
129
+				this.$emit('input', val)
130
+				this.$emit('update:modelValue', val)
131
+			}
132
+		}
133
+	}
134
+</script>
135
+<style lang="scss" >
136
+	.uni-collapse {
137
+		/* #ifndef APP-NVUE */
138
+		width: 100%;
139
+		display: flex;
140
+		/* #endif */
141
+		/* #ifdef APP-NVUE */
142
+		flex: 1;
143
+		/* #endif */
144
+		flex-direction: column;
145
+		background-color: #fff;
146
+	}
147
+</style>

+ 86 - 0
uni_modules/uni-collapse/package.json

@@ -0,0 +1,86 @@
1
+{
2
+  "id": "uni-collapse",
3
+  "displayName": "uni-collapse 折叠面板",
4
+  "version": "1.4.4",
5
+  "description": "Collapse 组件,可以折叠 / 展开的内容区域。",
6
+  "keywords": [
7
+    "uni-ui",
8
+    "折叠",
9
+    "折叠面板",
10
+    "手风琴"
11
+],
12
+  "repository": "https://github.com/dcloudio/uni-ui",
13
+  "engines": {
14
+    "HBuilderX": ""
15
+  },
16
+  "directories": {
17
+    "example": "../../temps/example_temps"
18
+  },
19
+"dcloudext": {
20
+    "sale": {
21
+      "regular": {
22
+        "price": "0.00"
23
+      },
24
+      "sourcecode": {
25
+        "price": "0.00"
26
+      }
27
+    },
28
+    "contact": {
29
+      "qq": ""
30
+    },
31
+    "declaration": {
32
+      "ads": "无",
33
+      "data": "无",
34
+      "permissions": "无"
35
+    },
36
+    "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
37
+    "type": "component-vue"
38
+  },
39
+  "uni_modules": {
40
+    "dependencies": [
41
+			"uni-scss",
42
+      "uni-icons"
43
+    ],
44
+    "encrypt": [],
45
+    "platforms": {
46
+      "cloud": {
47
+        "tcb": "y",
48
+        "aliyun": "y"
49
+      },
50
+      "client": {
51
+        "App": {
52
+          "app-vue": "y",
53
+          "app-nvue": "y"
54
+        },
55
+        "H5-mobile": {
56
+          "Safari": "y",
57
+          "Android Browser": "y",
58
+          "微信浏览器(Android)": "y",
59
+          "QQ浏览器(Android)": "y"
60
+        },
61
+        "H5-pc": {
62
+          "Chrome": "y",
63
+          "IE": "y",
64
+          "Edge": "y",
65
+          "Firefox": "y",
66
+          "Safari": "y"
67
+        },
68
+        "小程序": {
69
+          "微信": "y",
70
+          "阿里": "y",
71
+          "百度": "y",
72
+          "字节跳动": "y",
73
+          "QQ": "y"
74
+        },
75
+        "快应用": {
76
+          "华为": "u",
77
+          "联盟": "u"
78
+        },
79
+        "Vue": {
80
+            "vue2": "y",
81
+            "vue3": "y"
82
+        }
83
+      }
84
+    }
85
+  }
86
+}

+ 12 - 0
uni_modules/uni-collapse/readme.md

@@ -0,0 +1,12 @@
1
+
2
+
3
+## Collapse 折叠面板
4
+> **组件名:uni-collapse**
5
+> 代码块: `uCollapse`
6
+> 关联组件:`uni-collapse-item`、`uni-icons`。
7
+
8
+
9
+折叠面板用来折叠/显示过长的内容或者是列表。通常是在多内容分类项使用,折叠不重要的内容,显示重要内容。点击可以展开折叠部分。
10
+
11
+### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-collapse)
12
+#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839