|
@@ -241,15 +241,8 @@
|
241
|
241
|
direction: "vertical",
|
242
|
242
|
// 悬浮按钮展开菜单内容配置项
|
243
|
243
|
content: [{
|
244
|
|
- text: "检查信息",
|
245
|
|
- },
|
246
|
|
- {
|
247
|
|
- text: "患者信息",
|
248
|
|
- },
|
249
|
|
- {
|
250
|
|
- text: "我的任务",
|
251
|
|
- },
|
252
|
|
- ],
|
|
244
|
+ text: "我的任务",
|
|
245
|
+ }, ],
|
253
|
246
|
// 当前选中tab页名称
|
254
|
247
|
selectedLabelSlots: "待接单",
|
255
|
248
|
// tab页信息
|
|
@@ -306,25 +299,38 @@
|
306
|
299
|
},
|
307
|
300
|
methods: {
|
308
|
301
|
// 获取科室二维码设置开关
|
309
|
|
- getDeptQRCode() {
|
310
|
|
- let postData = {
|
311
|
|
- "idx": 0,
|
312
|
|
- "sum": 1,
|
313
|
|
- systemConfiguration: {
|
314
|
|
- keyconfig: "deptQRCode"
|
315
|
|
- }
|
316
|
|
- };
|
317
|
|
- post("/simple/data/fetchDataList/systemConfiguration", postData).then((result) => {
|
318
|
|
- if (result.status == 200) {
|
319
|
|
- let flag = result.list[0].valueconfig;
|
320
|
|
- if (flag == 1) {
|
|
302
|
+ getMenu() {
|
|
303
|
+ let menu = uni.getStorageSync('userData').menu;
|
|
304
|
+ //判断当前登陆人具体角色 start
|
|
305
|
+ let roles = uni.getStorageSync("userData").user.role;
|
|
306
|
+ this.pharmacistFlag = roles.some(item => item.rolecode === "pharmacist");
|
|
307
|
+ //判断当前登陆人具体角色 end
|
|
308
|
+ console.log(menu);
|
|
309
|
+ menu.forEach(item => {
|
|
310
|
+ if (item.link === 'wxInspect') {
|
|
311
|
+ this.content.push({
|
|
312
|
+ text: "检查信息",
|
|
313
|
+ });
|
|
314
|
+ } else if (item.link === 'wxPatient') {
|
|
315
|
+ this.content.push({
|
|
316
|
+ text: "患者信息",
|
|
317
|
+ });
|
|
318
|
+ } else if (item.link === 'wxPharmacy') {
|
|
319
|
+ // 如果是配药师人员,则增加药房
|
|
320
|
+ if (this.pharmacistFlag) {
|
321
|
321
|
this.content.push({
|
322
|
|
- text: "二维码设置",
|
|
322
|
+ text: "药房",
|
323
|
323
|
});
|
324
|
|
- } else {
|
325
|
|
- this.content = this.content.filter(item => item.text !== '二维码设置');
|
326
|
324
|
}
|
|
325
|
+ } else if (item.link === 'wxCode') {
|
|
326
|
+ this.content.push({
|
|
327
|
+ text: "二维码设置",
|
|
328
|
+ });
|
327
|
329
|
}
|
|
330
|
+ // --------------------------
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+ // --------------------------
|
328
|
334
|
})
|
329
|
335
|
},
|
330
|
336
|
// 拍照
|
|
@@ -822,24 +828,14 @@
|
822
|
828
|
},
|
823
|
829
|
},
|
824
|
830
|
onLoad() {
|
825
|
|
- // 获取科室二维码设置开关
|
826
|
|
- this.getDeptQRCode();
|
827
|
|
- //判断当前登陆人具体角色 start
|
828
|
|
- let roles = uni.getStorageSync("userData").user.role;
|
829
|
|
- this.pharmacistFlag = roles.some(item => item.rolecode === "pharmacist");
|
830
|
|
- //判断当前登陆人具体角色 end
|
|
831
|
+ // 获取菜单权限
|
|
832
|
+ this.getMenu();
|
831
|
833
|
if (uni.getStorageSync("setDeptConfg")) {
|
832
|
834
|
//如果有设置科室的配置,则显示
|
833
|
835
|
this.content.unshift({
|
834
|
836
|
text: "负责科室",
|
835
|
837
|
});
|
836
|
838
|
}
|
837
|
|
- // 如果是配药师人员,则增加药房
|
838
|
|
- if (this.pharmacistFlag) {
|
839
|
|
- this.content.unshift({
|
840
|
|
- text: "药房",
|
841
|
|
- });
|
842
|
|
- }
|
843
|
839
|
// #ifdef APP-PLUS
|
844
|
840
|
this.content.push({
|
845
|
841
|
text: "退出登录",
|