|
@@ -20,7 +20,8 @@
|
20
|
20
|
<radio-group @change="radioChange1">
|
21
|
21
|
<label class="goWorkSelect-item relative" v-for="item in zxzData" :key="item.str">
|
22
|
22
|
<radio :value="item.str" :checked="item.checked" />
|
23
|
|
- <picker class="picker" v-if="item.ruleType == 4" @change="bindPickerChange" :value="index" :range="groups" range-key="groupName">
|
|
23
|
+ <picker class="picker" v-if="item.ruleType == 4" @change="bindPickerChange" :value="index" :range="groups"
|
|
24
|
+ range-key="groupName">
|
24
|
25
|
<view>{{ item.configName }}</view>
|
25
|
26
|
</picker>
|
26
|
27
|
<view v-else>{{ item.configName }}</view>
|
|
@@ -74,8 +75,8 @@
|
74
|
75
|
:content="modelsLock.content" @ok="okLock" @cancel="cancelLock" :operate="modelsLock.operate" @know="knowLock">
|
75
|
76
|
</showModel>
|
76
|
77
|
<!-- 自选排班-科室绑定分组-弹窗 -->
|
77
|
|
- <showModel :title="models2.title" :icon="models2.icon" :disjunctor="models2.disjunctor"
|
78
|
|
- :content="models2.content" @ok="ok2" @cancel="cancel2" :operate="models2.operate">
|
|
78
|
+ <showModel :title="models2.title" :icon="models2.icon" :disjunctor="models2.disjunctor" :content="models2.content"
|
|
79
|
+ @ok="ok2" @cancel="cancel2" :operate="models2.operate">
|
79
|
80
|
</showModel>
|
80
|
81
|
</view>
|
81
|
82
|
</template>
|
|
@@ -145,12 +146,12 @@
|
145
|
146
|
},
|
146
|
147
|
groups: [],
|
147
|
148
|
index: 0,
|
148
|
|
- quickObj:{},//选择的上班快捷组合
|
|
149
|
+ quickObj: {}, //选择的上班快捷组合
|
149
|
150
|
// 自选排班-科室绑定分组-弹窗model
|
150
|
151
|
models2: {
|
151
|
152
|
disjunctor: false,
|
152
|
153
|
},
|
153
|
|
- objHistory:{}
|
|
154
|
+ objHistory: {}
|
154
|
155
|
};
|
155
|
156
|
},
|
156
|
157
|
methods: {
|
|
@@ -190,6 +191,16 @@
|
190
|
191
|
// 锁定
|
191
|
192
|
lock(data) {
|
192
|
193
|
console.log(data);
|
|
194
|
+ // 如果不是科室绑定人员,则提示
|
|
195
|
+ if (data.workAllocationQuick.ruleType != 3) {
|
|
196
|
+ this.modelsLock = {
|
|
197
|
+ disjunctor: true,
|
|
198
|
+ title: "提示",
|
|
199
|
+ content: `需科室绑定人员模式下才可快捷上班!`,
|
|
200
|
+ icon: "warn",
|
|
201
|
+ };
|
|
202
|
+ return;
|
|
203
|
+ }
|
193
|
204
|
this.itemLock = data;
|
194
|
205
|
this.modelsLock = {
|
195
|
206
|
disjunctor: true,
|
|
@@ -252,7 +263,18 @@
|
252
|
263
|
// 选择历史上班记录
|
253
|
264
|
radioChange2(value) {
|
254
|
265
|
this.objHistory = JSON.parse(value.target.value);
|
255
|
|
- if(!this.objHistory.deptList){
|
|
266
|
+ console.log(this.objHistory);
|
|
267
|
+ // 如果不是科室绑定人员,则提示
|
|
268
|
+ if (this.objHistory.workAllocationQuick.ruleType != 3) {
|
|
269
|
+ this.models = {
|
|
270
|
+ disjunctor: true,
|
|
271
|
+ title: "提示",
|
|
272
|
+ content: `需科室绑定人员模式下才可快捷上班!`,
|
|
273
|
+ icon: "warn",
|
|
274
|
+ };
|
|
275
|
+ return;
|
|
276
|
+ }
|
|
277
|
+ if (!this.objHistory.deptList) {
|
256
|
278
|
this.objHistory.deptList = [];
|
257
|
279
|
}
|
258
|
280
|
let depts = this.objHistory.deptList.map((item) => item.dept).join();
|
|
@@ -329,7 +351,7 @@
|
329
|
351
|
},
|
330
|
352
|
//确定
|
331
|
353
|
ok2() {
|
332
|
|
- uni.setStorageSync("manager", this.groups[this.index].manager);//储存分组组长
|
|
354
|
+ uni.setStorageSync("manager", this.groups[this.index].manager); //储存分组组长
|
333
|
355
|
this.models2.disjunctor = false;
|
334
|
356
|
//进入设置科室界面
|
335
|
357
|
uni.setStorageSync("setDeptConfg", {
|
|
@@ -339,7 +361,7 @@
|
339
|
361
|
ruleType: this.quickObj.ruleType,
|
340
|
362
|
id: this.quickObj.id,
|
341
|
363
|
classesId: this.quickObj.classes.id,
|
342
|
|
- selectGroupId:this.groups[this.index].id,
|
|
364
|
+ selectGroupId: this.groups[this.index].id,
|
343
|
365
|
});
|
344
|
366
|
uni.navigateTo({
|
345
|
367
|
url: `../setDept/setDept?configName=${this.quickObj.configName}&id=${this.quickObj.id}`,
|
|
@@ -351,34 +373,34 @@
|
351
|
373
|
},
|
352
|
374
|
//工作组合的工作模式是2(科室绑定分组)或4(绑定分组)
|
353
|
375
|
bindPickerChange: function(e) {
|
354
|
|
- console.log('picker发送选择改变,携带值为', e.detail.value)
|
355
|
|
- this.index = e.target.value;
|
356
|
|
- let userId = uni.getStorageSync("userData").user.id;
|
357
|
|
- let groupObj = this.groups[this.index];
|
358
|
|
- if(groupObj.manager == userId){
|
359
|
|
- //当前登陆人是该分组组长-弹窗确定
|
360
|
|
- this.models2 = {
|
361
|
|
- disjunctor: true,
|
362
|
|
- title: "提示",
|
363
|
|
- content: `请确认您选择了‘${this.quickObj.classes.name}’班次,并选择了‘${groupObj.groupName}’分组!`,
|
364
|
|
- icon: "warn",
|
365
|
|
- operate: {
|
366
|
|
- ok: "确定",
|
367
|
|
- cancel: "取消",
|
368
|
|
- },
|
369
|
|
- };
|
370
|
|
- }else{
|
371
|
|
- //当前登陆人不是该分组组长
|
372
|
|
- uni.setStorageSync("setDeptConfg", {
|
373
|
|
- //存设置科室的配置信息
|
374
|
|
- configName: this.quickObj.configName,
|
375
|
|
- workSchemeType: this.workSchemeType,
|
376
|
|
- ruleType: this.quickObj.ruleType,
|
377
|
|
- id: this.quickObj.id,
|
378
|
|
- classesId: this.quickObj.classes.id,
|
379
|
|
- });
|
380
|
|
- this.GoWork([groupObj]);
|
381
|
|
- }
|
|
376
|
+ console.log('picker发送选择改变,携带值为', e.detail.value)
|
|
377
|
+ this.index = e.target.value;
|
|
378
|
+ let userId = uni.getStorageSync("userData").user.id;
|
|
379
|
+ let groupObj = this.groups[this.index];
|
|
380
|
+ if (groupObj.manager == userId) {
|
|
381
|
+ //当前登陆人是该分组组长-弹窗确定
|
|
382
|
+ this.models2 = {
|
|
383
|
+ disjunctor: true,
|
|
384
|
+ title: "提示",
|
|
385
|
+ content: `请确认您选择了‘${this.quickObj.classes.name}’班次,并选择了‘${groupObj.groupName}’分组!`,
|
|
386
|
+ icon: "warn",
|
|
387
|
+ operate: {
|
|
388
|
+ ok: "确定",
|
|
389
|
+ cancel: "取消",
|
|
390
|
+ },
|
|
391
|
+ };
|
|
392
|
+ } else {
|
|
393
|
+ //当前登陆人不是该分组组长
|
|
394
|
+ uni.setStorageSync("setDeptConfg", {
|
|
395
|
+ //存设置科室的配置信息
|
|
396
|
+ configName: this.quickObj.configName,
|
|
397
|
+ workSchemeType: this.workSchemeType,
|
|
398
|
+ ruleType: this.quickObj.ruleType,
|
|
399
|
+ id: this.quickObj.id,
|
|
400
|
+ classesId: this.quickObj.classes.id,
|
|
401
|
+ });
|
|
402
|
+ this.GoWork([groupObj]);
|
|
403
|
+ }
|
382
|
404
|
},
|
383
|
405
|
// 选择上班快捷组合
|
384
|
406
|
radioChange1(value) {
|
|
@@ -412,7 +434,7 @@
|
412
|
434
|
uni.navigateTo({
|
413
|
435
|
url: `../setDept/setDept?configName=${this.quickObj.configName}&id=${this.quickObj.id}`,
|
414
|
436
|
});
|
415
|
|
- }else if(obj.ruleType == 2){
|
|
437
|
+ } else if (obj.ruleType == 2) {
|
416
|
438
|
//绑定分组,直接上班
|
417
|
439
|
uni.setStorageSync("setDeptConfg", {
|
418
|
440
|
//存设置科室的配置信息
|
|
@@ -423,7 +445,7 @@
|
423
|
445
|
classesId: this.quickObj.classes.id,
|
424
|
446
|
});
|
425
|
447
|
this.GoWork(obj.groups);
|
426
|
|
- }else if(obj.ruleType == 4){
|
|
448
|
+ } else if (obj.ruleType == 4) {
|
427
|
449
|
//科室绑定分组,弹出分组选择
|
428
|
450
|
this.groups = obj.groups;
|
429
|
451
|
}
|
|
@@ -536,7 +558,8 @@
|
536
|
558
|
mask: true,
|
537
|
559
|
});
|
538
|
560
|
//自选排班,科室绑定人员,科室绑定分组,绑定分组
|
539
|
|
- if (this.workSchemeType == 2 && (this.ruleType == 1 || this.ruleType == 2||this.ruleType == 3||this.ruleType == 4)) {
|
|
561
|
+ if (this.workSchemeType == 2 && (this.ruleType == 1 || this.ruleType == 2 || this.ruleType == 3 || this
|
|
562
|
+ .ruleType == 4)) {
|
540
|
563
|
let userId = uni.getStorageSync("userData").user.id;
|
541
|
564
|
let setDeptConfg = uni.getStorageSync("setDeptConfg");
|
542
|
565
|
let postData = {
|
|
@@ -544,23 +567,23 @@
|
544
|
567
|
customWorking: "on",
|
545
|
568
|
userId: userId,
|
546
|
569
|
};
|
547
|
|
- console.log(postData,this.objHistory)
|
548
|
|
- if(this.ruleType == 3||this.ruleType == 4){
|
549
|
|
- if(!this.objHistory.deptList){
|
|
570
|
+ console.log(postData, this.objHistory)
|
|
571
|
+ if (this.ruleType == 3 || this.ruleType == 4) {
|
|
572
|
+ if (!this.objHistory.deptList) {
|
550
|
573
|
this.objHistory.deptList = [];
|
551
|
574
|
}
|
552
|
575
|
let depts = this.objHistory.deptList.map((item) => item.id).join();
|
553
|
576
|
postData.deptIds = depts;
|
554
|
577
|
postData.quickId = setDeptConfg.id;
|
555
|
578
|
postData.classId = setDeptConfg.classesId;
|
556
|
|
- }else if(this.ruleType == 2 || this.ruleType == 1){
|
|
579
|
+ } else if (this.ruleType == 2 || this.ruleType == 1) {
|
557
|
580
|
postData.quickId = setDeptConfg.id;
|
558
|
581
|
postData.classId = setDeptConfg.classesId;
|
559
|
582
|
}
|
560
|
|
- console.log(postData,this.ruleType,setDeptConfg)
|
561
|
|
- if(groups){
|
562
|
|
- postData.groupIds = groups.map(v=>v.id).toString();
|
563
|
|
- if(this.ruleType == 4){
|
|
583
|
+ console.log(postData, this.ruleType, setDeptConfg)
|
|
584
|
+ if (groups) {
|
|
585
|
+ postData.groupIds = groups.map(v => v.id).toString();
|
|
586
|
+ if (this.ruleType == 4) {
|
564
|
587
|
//科室绑定分组,并且当前登陆人不是组长
|
565
|
588
|
delete postData.deptIds;
|
566
|
589
|
}
|
|
@@ -600,8 +623,8 @@
|
600
|
623
|
type: "on",
|
601
|
624
|
classId: uni.getStorageSync("setDeptConfg").classesId
|
602
|
625
|
};
|
603
|
|
- if(groups){//caocao
|
604
|
|
- postData.groupIds = groups.map(v=>v.id).toString();
|
|
626
|
+ if (groups) { //caocao
|
|
627
|
+ postData.groupIds = groups.map(v => v.id).toString();
|
605
|
628
|
}
|
606
|
629
|
post("/auth/onOrOffLine", postData).then((res) => {
|
607
|
630
|
uni.hideLoading();
|
|
@@ -1224,12 +1247,13 @@
|
1224
|
1247
|
border-bottom: 2rpx solid #e5e9ed;
|
1225
|
1248
|
padding: 16rpx;
|
1226
|
1249
|
|
1227
|
|
- &.relative{
|
1228
|
|
- position:relative;
|
1229
|
|
- .picker{
|
|
1250
|
+ &.relative {
|
|
1251
|
+ position: relative;
|
|
1252
|
+
|
|
1253
|
+ .picker {
|
1230
|
1254
|
position: absolute;
|
1231
|
1255
|
width: 100%;
|
1232
|
|
- padding-left:64rpx;
|
|
1256
|
+ padding-left: 64rpx;
|
1233
|
1257
|
}
|
1234
|
1258
|
}
|
1235
|
1259
|
|