Browse Source

检查列表的检查状态多选

seimin 4 years ago
parent
commit
4545752822

+ 1 - 1
components/bigScreen/bigScreen.vue

@@ -111,7 +111,7 @@ export default {
111
   left: 0;
111
   left: 0;
112
   right: 0;
112
   right: 0;
113
   bottom: 0;
113
   bottom: 0;
114
-  z-index: 9999;
114
+  z-index: 999;
115
   height: 88rpx;
115
   height: 88rpx;
116
   display: flex;
116
   display: flex;
117
   justify-content: center;
117
   justify-content: center;

+ 34 - 38
components/fjj-condition/fjj-condition.vue

@@ -9,19 +9,23 @@
9
               <view>
9
               <view>
10
                 {{item.title}}
10
                 {{item.title}}
11
               </view>
11
               </view>
12
-              <text v-if="item.detailList.length>showLenght" @tap="showMore(index)">{{item.showMoreList ? '收起' : '更多'}}</text>
12
+              <text v-if="item.detailList.length>showLenght"
13
+                @tap="showMore(index)">{{item.showMoreList ? '收起' : '更多'}}</text>
13
             </view>
14
             </view>
14
             <view class="draer-list-con">
15
             <view class="draer-list-con">
15
               <template v-if="!item.showMoreList">
16
               <template v-if="!item.showMoreList">
16
-                <text :style="{background: textItem.isSelected ? color : '', color:  textItem.isSelected ? '#ffffff' : ''}"
17
-                  v-if="idx<showLenght" v-for="(textItem, idx) in item.detailList" :key="idx" :class="textItem.isSelected ? 'on' : ''"
18
-                  @tap="itemTap(idx,item.detailList,item.key, item.isMutiple)">
17
+                <text
18
+                  :style="{background: textItem.isSelected ? color : '', color:  textItem.isSelected ? '#ffffff' : ''}"
19
+                  v-if="idx<showLenght" v-for="(textItem, idx) in item.detailList" :key="idx"
20
+                  :class="textItem.isSelected ? 'on' : ''" @tap="itemTap(idx,item.detailList,item.key, item.isMutiple)">
19
                   {{textItem.title}}
21
                   {{textItem.title}}
20
                 </text>
22
                 </text>
21
               </template>
23
               </template>
22
               <template v-else>
24
               <template v-else>
23
-                <text :style="{background: textItem.isSelected ? color : '', color:  textItem.isSelected ? '#ffffff' : ''}"
24
-                  v-for="(textItem, idx) in item.detailList" :key="idx" :class="textItem.isSelected ? 'on' : ''" @tap="itemTap(idx,item.detailList,item.key, item.isMutiple)">
25
+                <text
26
+                  :style="{background: textItem.isSelected ? color : '', color:  textItem.isSelected ? '#ffffff' : ''}"
27
+                  v-for="(textItem, idx) in item.detailList" :key="idx" :class="textItem.isSelected ? 'on' : ''"
28
+                  @tap="itemTap(idx,item.detailList,item.key, item.isMutiple)">
25
                   {{textItem.title}}
29
                   {{textItem.title}}
26
                 </text>
30
                 </text>
27
               </template>
31
               </template>
@@ -89,13 +93,13 @@
89
             </view>
93
             </view>
90
             <view class="dateContent rangenumber-content flex">
94
             <view class="dateContent rangenumber-content flex">
91
               <view class="rangenumber-input">
95
               <view class="rangenumber-input">
92
-                <input class="m-input" type="number" clearable v-model="minNumber" :placeholder="item.minPlaceholder || '最小值'"
93
-                  @blur="numberInputBlur(item.key)"></input>
96
+                <input class="m-input" type="number" clearable v-model="minNumber"
97
+                  :placeholder="item.minPlaceholder || '最小值'" @blur="numberInputBlur(item.key)"></input>
94
               </view>
98
               </view>
95
               <text>-</text>
99
               <text>-</text>
96
               <view class="rangenumber-input">
100
               <view class="rangenumber-input">
97
-                <input class="m-input" type="number" clearable v-model="maxNumber" :placeholder="item.maxPlaceholder || '最大值'"
98
-                  @blur="numberInputBlur(item.key)"></input>
101
+                <input class="m-input" type="number" clearable v-model="maxNumber"
102
+                  :placeholder="item.maxPlaceholder || '最大值'" @blur="numberInputBlur(item.key)"></input>
99
               </view>
103
               </view>
100
             </view>
104
             </view>
101
           </view>
105
           </view>
@@ -109,7 +113,8 @@
109
             </view>
113
             </view>
110
             <view class="dateContent text-content flex">
114
             <view class="dateContent text-content flex">
111
               <view class="text-input">
115
               <view class="text-input">
112
-                <input class="m-input" type="text" clearable v-model="keyWord" :placeholder="'请输入'+item.title" @blur="keyWordInputBlur(item.key)"></input>
116
+                <input class="m-input" type="text" clearable v-model="keyWord" :placeholder="'请输入'+item.title"
117
+                  @blur="keyWordInputBlur(item.key)"></input>
113
               </view>
118
               </view>
114
             </view>
119
             </view>
115
           </view>
120
           </view>
@@ -134,9 +139,9 @@
134
               </view>
139
               </view>
135
             </view>
140
             </view>
136
             <view class="dateContent inspectState-content flex">
141
             <view class="dateContent inspectState-content flex">
137
-              <picker @change="inspectStateChange" :value="inspectStateIndex" :range="inspectStateNameList">
138
-                <view class="uni-input">{{inspectStateNameList[inspectStateIndex]}}</view>
139
-              </picker>
142
+              <!-- https://ext.dcloud.net.cn/plugin?id=1873#detail -->
143
+              <ld-select :multiple="true" :list="inspectStateList" label-key="label" value-key="value" placeholder="请选择"
144
+                v-model="result.inspectState" @change="inspectStateChange"></ld-select>
140
             </view>
145
             </view>
141
           </view>
146
           </view>
142
         </block>
147
         </block>
@@ -165,6 +170,7 @@
165
    * rangenumber形式-可能为["",1]或[1,""]表示只有一个最大值或最小值
170
    * rangenumber形式-可能为["",1]或[1,""]表示只有一个最大值或最小值
166
    ***/
171
    ***/
167
   import uniDrawer from "@/components/uni-drawer/uni-drawer.vue";
172
   import uniDrawer from "@/components/uni-drawer/uni-drawer.vue";
173
+  import ldSelect from "@/components/ld-select/ld-select.vue";
168
   import MxDatePicker from "@/components/mx-datepicker/mx-datepicker.vue";
174
   import MxDatePicker from "@/components/mx-datepicker/mx-datepicker.vue";
169
   export default {
175
   export default {
170
     props: {
176
     props: {
@@ -200,6 +206,7 @@
200
     components: {
206
     components: {
201
       uniDrawer,
207
       uniDrawer,
202
       MxDatePicker,
208
       MxDatePicker,
209
+      ldSelect,
203
     },
210
     },
204
     created() {
211
     created() {
205
       this.keyWord = this.keyWordGvie;
212
       this.keyWord = this.keyWordGvie;
@@ -211,12 +218,6 @@
211
         },
218
         },
212
       });
219
       });
213
     },
220
     },
214
-    watch: {
215
-      inspectStateList(val) {
216
-        this.inspectStateNameList = this.inspectStateList.map(item => item.name);
217
-        this.inspectStateValueList = this.inspectStateList.map(item => item.value);
218
-      }
219
-    },
220
     computed: {
221
     computed: {
221
       defaultSelectedObj() {
222
       defaultSelectedObj() {
222
         // 保存初始状态
223
         // 保存初始状态
@@ -264,12 +265,8 @@
264
         maxNumber: "",
265
         maxNumber: "",
265
         keyWord: "",
266
         keyWord: "",
266
         bedNumSort: false,
267
         bedNumSort: false,
267
-        inspectStateIndex: 1,
268
-        inspectStateNameList: [], //检查状态名称列表
269
-        inspectStateValueList: [], //检查状态value列表
270
       };
268
       };
271
     },
269
     },
272
-
273
     methods: {
270
     methods: {
274
       getSelectedObj() {
271
       getSelectedObj() {
275
         return this.commonResultObj();
272
         return this.commonResultObj();
@@ -279,6 +276,7 @@
279
       },
276
       },
280
       commonResultObj() {
277
       commonResultObj() {
281
         let obj = {};
278
         let obj = {};
279
+        console.log(this.menuList)
282
         this.menuList.map((item) => {
280
         this.menuList.map((item) => {
283
           item.isMutiple ?
281
           item.isMutiple ?
284
             (obj[item.key] = []) :
282
             (obj[item.key] = []) :
@@ -287,7 +285,7 @@
287
             item.type === "bedNumSort" ?
285
             item.type === "bedNumSort" ?
288
             (obj[item.key] = false) :
286
             (obj[item.key] = false) :
289
             item.type === "inspectState" ?
287
             item.type === "inspectState" ?
290
-            (obj[item.key] = 0) :
288
+            (obj[item.key] = ['1', '30']) :
291
             item.type === "single" ?
289
             item.type === "single" ?
292
             (obj[item.key] = [new Date().Format("yyyy/MM/dd")]) :
290
             (obj[item.key] = [new Date().Format("yyyy/MM/dd")]) :
293
             (obj[item.key] = "");
291
             (obj[item.key] = "");
@@ -351,10 +349,9 @@
351
         this.maxNumber = "";
349
         this.maxNumber = "";
352
         this.keyWord = "";
350
         this.keyWord = "";
353
         this.bedNumSort = false;
351
         this.bedNumSort = false;
354
-        this.inspectStateIndex = 1;
355
         this.single = [new Date().Format("yyyy/MM/dd")];
352
         this.single = [new Date().Format("yyyy/MM/dd")];
356
         for (let key in this.result) {
353
         for (let key in this.result) {
357
-          if (typeof this.result[key] == "object") {
354
+          if ((typeof this.result[key] == "object") && key != "inspectState") {
358
             if (key == "yyTime") {
355
             if (key == "yyTime") {
359
               this.result[key] = [new Date().Format("yyyy/MM/dd")];
356
               this.result[key] = [new Date().Format("yyyy/MM/dd")];
360
             } else {
357
             } else {
@@ -364,8 +361,7 @@
364
             if (key == "bedNumSort") {
361
             if (key == "bedNumSort") {
365
               this.result[key] = false;
362
               this.result[key] = false;
366
             } else if (key == "inspectState") {
363
             } else if (key == "inspectState") {
367
-              this.result[key] = 0;
368
-              this.inspectStateIndex = 1;
364
+              this.result[key] = ['1', '30'];
369
             } else {
365
             } else {
370
               this.result[key] = "";
366
               this.result[key] = "";
371
             }
367
             }
@@ -440,9 +436,8 @@
440
         this.result.bedNumSort = e.detail.value.length > 0;
436
         this.result.bedNumSort = e.detail.value.length > 0;
441
         this.bedNumSort = e.detail.value.length > 0;
437
         this.bedNumSort = e.detail.value.length > 0;
442
       },
438
       },
443
-      inspectStateChange(e) { //baba
444
-        this.result.inspectState = this.inspectStateValueList[e.detail.value];
445
-        this.inspectStateIndex = e.detail.value;
439
+      inspectStateChange(val) {
440
+        this.result.inspectState = val;
446
       },
441
       },
447
     },
442
     },
448
   };
443
   };
@@ -524,7 +519,7 @@
524
     &>view {
519
     &>view {
525
       background: rgba(244, 244, 244, 1);
520
       background: rgba(244, 244, 244, 1);
526
       border-radius: 8rpx;
521
       border-radius: 8rpx;
527
-      width: 90%;
522
+      width: 100%;
528
       height: 64rpx;
523
       height: 64rpx;
529
       line-height: 64rpx;
524
       line-height: 64rpx;
530
       margin-bottom: 12rpx;
525
       margin-bottom: 12rpx;
@@ -562,7 +557,7 @@
562
     }
557
     }
563
 
558
 
564
     .text-input {
559
     .text-input {
565
-      width: 90%;
560
+      width: 100%;
566
       display: inline-block;
561
       display: inline-block;
567
       padding: 0 12rpx;
562
       padding: 0 12rpx;
568
 
563
 
@@ -584,16 +579,17 @@
584
   }
579
   }
585
 
580
 
586
   .inspectState-content {
581
   .inspectState-content {
587
-    background: #f4f4f4;
588
     border-radius: 4px;
582
     border-radius: 4px;
589
-    width: 90%;
583
+    width: 100%;
590
     height: 32px;
584
     height: 32px;
591
     line-height: 32px;
585
     line-height: 32px;
592
     margin-bottom: 6px;
586
     margin-bottom: 6px;
593
-    uni-picker{
587
+
588
+    uni-picker {
594
       width: 100%;
589
       width: 100%;
595
     }
590
     }
596
-    .uni-input{
591
+
592
+    .uni-input {
597
       padding-left: 16rpx;
593
       padding-left: 16rpx;
598
     }
594
     }
599
   }
595
   }

File diff suppressed because it is too large
+ 328 - 0
components/ld-select/ld-select.vue


+ 7 - 5
pages/inspectList/inspectList.vue

@@ -156,7 +156,7 @@
156
           yyTime: new Date().Format("yyyy/MM/dd"),
156
           yyTime: new Date().Format("yyyy/MM/dd"),
157
           keyWord: "",
157
           keyWord: "",
158
           bedNumSort: false,
158
           bedNumSort: false,
159
-          inspectState: 1,
159
+          inspectState: "1,30",
160
         },
160
         },
161
         // 检查信息状态列表
161
         // 检查信息状态列表
162
         inspectStateList: [],
162
         inspectStateList: [],
@@ -194,13 +194,13 @@
194
         post("/common/common/getDictionary", postData).then((result) => {
194
         post("/common/common/getDictionary", postData).then((result) => {
195
           this.inspectStateList = result.map(item => {
195
           this.inspectStateList = result.map(item => {
196
             return {
196
             return {
197
-              name: item.name,
197
+              label: item.name,
198
               value: item.value
198
               value: item.value
199
             }
199
             }
200
           });
200
           });
201
           this.inspectStateList.unshift({
201
           this.inspectStateList.unshift({
202
-            name: '全部',
203
-            value: 0
202
+            label: '全部',
203
+            value: '0'
204
           });
204
           });
205
           uni.hideLoading();
205
           uni.hideLoading();
206
           this.visibleDrawer = true;
206
           this.visibleDrawer = true;
@@ -377,8 +377,10 @@
377
           },
377
           },
378
         };
378
         };
379
         if (this.searchlist.inspectState) {
379
         if (this.searchlist.inspectState) {
380
+          let arr = this.searchlist.inspectState.split(',');
381
+          let flag = arr.includes('0');
380
           postData.inspect.inspectState = {
382
           postData.inspect.inspectState = {
381
-            "value": this.searchlist.inspectState
383
+            "value": flag ? '0' : arr.join(',')
382
           };
384
           };
383
         }
385
         }
384
         // url传递过来的住院号
386
         // url传递过来的住院号

BIN
static/font_components/font_1833441_ycfzdhg2u3.eot


File diff suppressed because it is too large
+ 32 - 0
static/font_components/font_1833441_ycfzdhg2u3.svg


BIN
static/font_components/font_1833441_ycfzdhg2u3.ttf


BIN
static/font_components/font_1833441_ycfzdhg2u3.woff