This commit is contained in:
parent
2024245b4d
commit
997166581c
|
|
@ -2,8 +2,8 @@
|
|||
"name" : "护理单元",
|
||||
"appid" : "__UNI__FB2D473",
|
||||
"description" : "护理单元",
|
||||
"versionName" : "1.0.018",
|
||||
"versionCode" : 10018,
|
||||
"versionName" : "1.0.020",
|
||||
"versionCode" : 10020,
|
||||
"transformPx" : false,
|
||||
/* 5+App特有相关 */
|
||||
"app-plus" : {
|
||||
|
|
|
|||
|
|
@ -1357,6 +1357,10 @@
|
|||
photoplay.value = true;
|
||||
init();
|
||||
yulan();
|
||||
transition.value = false;
|
||||
setTimeout(() => {
|
||||
transition.value = true;
|
||||
}, 50)
|
||||
})
|
||||
|
||||
const changeallmessage = () => {
|
||||
|
|
|
|||
|
|
@ -283,7 +283,7 @@
|
|||
const openleft = ref(false)
|
||||
|
||||
const menutarget = ref(0)
|
||||
|
||||
const emit = defineEmits(['swip'])
|
||||
const clickmenu = (index : number) => {
|
||||
menutarget.value = index
|
||||
let data = filteredMenu(0)[index]
|
||||
|
|
@ -291,7 +291,8 @@
|
|||
uni.setStorageSync('nuName', data.nuName);
|
||||
uni.setStorageSync('elderId', data.elderInfo ? data.elderInfo?.id : null);
|
||||
uni.setStorageSync('NUall', data);
|
||||
getgif()
|
||||
getgif();
|
||||
emit('swip')
|
||||
}
|
||||
const tagarray = ["市医保", "半失能", "正常计费"]
|
||||
|
||||
|
|
@ -384,6 +385,7 @@
|
|||
(newVal, oldVal) => {
|
||||
// 当旧值为false,新值为true时延迟0.2秒调用方法
|
||||
if (!oldVal && newVal) {
|
||||
console.log(oldVal && newVal)
|
||||
transition.value = false;
|
||||
// console.log("????",transition.value)
|
||||
setTimeout(() => {
|
||||
|
|
@ -431,17 +433,25 @@
|
|||
setInterval(updateTime, 1000);
|
||||
photoplay.value = true;
|
||||
getmenu();
|
||||
getgif();
|
||||
transition.value = false;
|
||||
// console.log("????",transition.value)
|
||||
setTimeout(() => {
|
||||
transition.value = true;
|
||||
// console.log("看看", uni.getStorageSync('NUall'))
|
||||
}, 50)
|
||||
})
|
||||
|
||||
const filteredMenu = (index : number) => {
|
||||
return leftMenuArray.value.filter(item => Number(item.areaFlag) - 1 == index);
|
||||
}
|
||||
const getmenu = () => {
|
||||
queryPadPageList().then((res => {
|
||||
console.log(res.result)
|
||||
leftMenuArray.value = res.result.records;
|
||||
filteredMenu(0).forEach((element : any, index : number) => {
|
||||
if (element.nuId === uni.getStorageSync('NUall').nuId) {
|
||||
menutarget.value = index
|
||||
clickmenu(menutarget.value)
|
||||
}
|
||||
})
|
||||
}))
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
<image src="/static/shouye/logo2.png" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="cont">
|
||||
<view class="items" v-for="(v,i) in list" :key='i' :class="{'act':i==dexleft}" @click="dexleft = i;emit('navurl',i)">
|
||||
<view class="items" v-for="(v,i) in list" :key='i' :class="{'act':i==dexleft}" @click="dexleft = i;emit('navurl',i,v)">
|
||||
<view class="tm guodu">
|
||||
<image :src="i==dexleft?v.urls:v.url" mode="aspectFill" class="guodu"></image>
|
||||
<text>{{v.name}}</text>
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -37,6 +37,10 @@
|
|||
});
|
||||
onMounted(()=>{
|
||||
hometype.value = 0;
|
||||
transition.value = false;
|
||||
setTimeout(() => {
|
||||
transition.value = true;
|
||||
}, 50)
|
||||
})
|
||||
watch(
|
||||
() => props.isShow,
|
||||
|
|
|
|||
|
|
@ -1,18 +1,22 @@
|
|||
<template>
|
||||
<view class="backgroundContainer">
|
||||
<!-- 左侧菜单 -->
|
||||
<leftcontent :list="tabbrarr" @navurl="navurl"></leftcontent>
|
||||
<leftcontent :list="arrlist" @navurl="navurl"></leftcontent>
|
||||
<!-- 主页 -->
|
||||
<index :isShow="menuIndexshow" v-if="!menuIndex" />
|
||||
<!-- 设备页 -->
|
||||
<equipment :isShow="menuIndexshowfifth" v-if="menuIndex==4" />
|
||||
<!-- 医嘱页 -->
|
||||
<requestform :isShow="menuIndexshowfourth" v-if="menuIndex==3" />
|
||||
<index :isShow="menuIndex==0" v-if="menuIndex==0" @swip="swip"/>
|
||||
<!-- 户嘱页 -->
|
||||
<nurse :isshow="menuIndexshowsecond"
|
||||
v-if="menuIndex==1&&uni.getStorageSync('elderId')&&uni.getStorageSync('nuId')" />
|
||||
<nurse :isshow="menuIndex==1" v-if="menuIndex==1&&uni.getStorageSync('elderId')&&uni.getStorageSync('nuId')" />
|
||||
<!-- 医嘱 -->
|
||||
<doctorask v-if="menuIndex==2&&uni.getStorageSync('elderId')&&uni.getStorageSync('nuId')" />
|
||||
<!-- 设备页 -->
|
||||
<logistics :isshow="menuIndex==3" v-if="menuIndex==3&&uni.getStorageSync('elderId')&&uni.getStorageSync('nuId')" />
|
||||
<equipment :isShow="menuIndex==5" v-if="menuIndex==5" />
|
||||
<!-- 医嘱页 -->
|
||||
<!-- <logistics :isShow="menuIndexshowfourth" v-if="menuIndex==3" /> -->
|
||||
<requestform :isShow="menuIndex==4" v-if="menuIndex==4" />
|
||||
|
||||
|
||||
|
||||
<!-- 没有数据 -->
|
||||
<view class="nomessageclass" :style="messageopit?{opacity: `1`}:{opacity: `0`}"
|
||||
v-if="(menuIndex == 1 || menuIndex == 2) && (!uni.getStorageSync('elderId') ||!uni.getStorageSync('nuId'))">
|
||||
|
|
@ -23,8 +27,10 @@
|
|||
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, onBeforeUnmount, nextTick } from 'vue';
|
||||
import { queryPadPageList ,getPermissionList } from '@/pages/watch/api/lunpan.js'
|
||||
import index from "./component/index.vue"
|
||||
import equipment from "./component/equipment.vue"
|
||||
import logistics from "./component/nurse/logistics.vue"
|
||||
import requestform from "./component/pleasetake/takehome.vue"
|
||||
import doctorask from "./component/doctorask/doctorask.vue"
|
||||
import nurse from "./component/nurse/index.vue"
|
||||
|
|
@ -33,7 +39,7 @@
|
|||
import leftcontent from "./component/leftcontent/leftcontent.vue"
|
||||
import defaultr from '@/pages/procurement/components/default.vue';
|
||||
|
||||
|
||||
const listarr = ref([]);
|
||||
onMounted(() => {
|
||||
menuIndex.value = -1;
|
||||
nextTick(() => menuIndex.value = 0)
|
||||
|
|
@ -46,6 +52,10 @@
|
|||
//缓存指令包
|
||||
uni.setStorageSync("Packagelist", res.result)
|
||||
})
|
||||
getPermissionList({employessId:uni.getStorageSync('userInfo').employessId}).then(res=>{
|
||||
console.log(res.result)
|
||||
listarr.value = res.result;
|
||||
})
|
||||
})
|
||||
|
||||
// 通用的生成函数
|
||||
|
|
@ -58,17 +68,101 @@
|
|||
})
|
||||
}
|
||||
const tabbrarr = ref([
|
||||
{ name: '首页', url: '/static/shouye/sy/h0.png', urls: '/static/shouye/sy/h1.png' },
|
||||
{ name: '护嘱', url: '/static/shouye/sy/n0.png', urls: '/static/shouye/sy/n1.png' },
|
||||
{ name: '医嘱', url: '/static/shouye/sy/y0.png', urls: '/static/shouye/sy/y1.png' },
|
||||
{ name: '后勤', url: '/static/shouye/sy/l0.png', urls: '/static/shouye/sy/l1.png' },
|
||||
{ name: '物联', url: '/static/shouye/sy/g0.png', urls: '/static/shouye/sy/g1.png' },
|
||||
{ name: '返回', url: '/static/shouye/sy/f0.png', urls: '/static/shouye/sy/f1.png' },
|
||||
{ name: '护嘱', url: '/static/shouye/sy/n0.png', urls: '/static/shouye/sy/n1.png' ,type:'hldy_hljz'},
|
||||
{ name: '医嘱', url: '/static/shouye/sy/y0.png', urls: '/static/shouye/sy/y1.png' ,type:'hldy_yljz'},
|
||||
{ name: '后勤', url: '/static/shouye/sy/l0.png', urls: '/static/shouye/sy/l1.png' ,type:'hldy_xzjz'},
|
||||
{ name: '请领', url: '/static/shouye/sy/l0.png', urls: '/static/shouye/sy/l1.png' ,type:'kf_ql'},
|
||||
])
|
||||
const navurl = (e) => {
|
||||
changeMenu(e)
|
||||
const navurl = (e,v) => {
|
||||
switch (v.type){
|
||||
case 'hldy':
|
||||
menuIndex.value = 0;
|
||||
console.log('护理单元')
|
||||
break;
|
||||
case 'hldy_hljz':
|
||||
menuIndex.value = 1;
|
||||
console.log('护理矩阵')
|
||||
break;
|
||||
case 'hldy_yljz':
|
||||
menuIndex.value = 2;
|
||||
console.log('医疗矩阵')
|
||||
break;
|
||||
case 'hldy_xzjz':
|
||||
menuIndex.value = 3;
|
||||
console.log('行政矩阵')
|
||||
break;
|
||||
case 'kf':
|
||||
console.log('库房')
|
||||
break;
|
||||
case 'kf_cg':
|
||||
console.log('采购')
|
||||
break;
|
||||
case 'kf_jh':
|
||||
console.log('拣货')
|
||||
break;
|
||||
case 'kf_wj':
|
||||
console.log('完结')
|
||||
break;
|
||||
case 'kf_ql':
|
||||
menuIndex.value = 4;
|
||||
console.log('请领')
|
||||
break;
|
||||
case 'kf_th':
|
||||
console.log('退货')
|
||||
break;
|
||||
case 'kf_pd':
|
||||
console.log('盘点')
|
||||
break;
|
||||
case 'wl':
|
||||
menuIndex.value = 5;
|
||||
console.log('物联')
|
||||
break;
|
||||
case 'back':
|
||||
uni.navigateBack()
|
||||
console.log('物联')
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
//
|
||||
|
||||
}
|
||||
const arrlist = ref([])
|
||||
const swip = ()=>{
|
||||
let nuName = uni.getStorageSync('nuName')
|
||||
queryPadPageList({'pageNo':-1,'nuName':nuName}).then((res => {
|
||||
let arr = res.result.records[0].permissionList;
|
||||
console.log(arr)
|
||||
arrlist.value = [];
|
||||
let tbr = [];
|
||||
arr.forEach((v,i)=>{
|
||||
let obj = listarr.value.find(item=>
|
||||
item.menuCode == v.menuCode
|
||||
);
|
||||
if(obj){
|
||||
tbr.push(v)
|
||||
}
|
||||
})
|
||||
tbr.forEach(item=>{
|
||||
let obj = tabbrarr.value.find(r=>
|
||||
r.type == item.menuCode
|
||||
);
|
||||
if(obj){
|
||||
arrlist.value.push(obj);
|
||||
console.log(arrlist.value)
|
||||
}
|
||||
})
|
||||
let sy = { name: '首页', url: '/static/shouye/sy/h0.png', urls: '/static/shouye/sy/h1.png' ,type:'hldy'}
|
||||
arrlist.value.unshift(sy);
|
||||
let back =[
|
||||
{ name: '物联', url: '/static/shouye/sy/g0.png', urls: '/static/shouye/sy/g1.png' ,type:'wl'},
|
||||
{ name: '返回', url: '/static/shouye/sy/f0.png', urls: '/static/shouye/sy/f1.png' ,type:'back'}
|
||||
]
|
||||
arrlist.value.push(...back);
|
||||
navurl(0,arrlist.value[0])
|
||||
}))
|
||||
}
|
||||
|
||||
// 当前选中的菜单索引
|
||||
const menuIndex = ref<number>(-1);
|
||||
const menuIndexshow = ref<boolean>(false);
|
||||
|
|
@ -87,7 +181,7 @@
|
|||
menuIndexshowsecond.value = false
|
||||
menuIndexshowfourth.value = false;
|
||||
menuIndexshowfifth.value = false
|
||||
if (index === 5) {
|
||||
if (index === arrlist.value.length-1) {
|
||||
uni.navigateBack()
|
||||
return
|
||||
}
|
||||
|
|
@ -110,6 +204,10 @@
|
|||
case 4:
|
||||
menuIndexshowfifth.value = true;
|
||||
break;
|
||||
case 5:
|
||||
menuIndexshowfourth.value = true
|
||||
break;
|
||||
|
||||
default:
|
||||
}
|
||||
}, 50)
|
||||
|
|
|
|||
|
|
@ -11,9 +11,18 @@ export const movedirection = (direction,startOrNot) => {
|
|||
|
||||
|
||||
// 获取护理单元
|
||||
export const queryPadPageList = () => {
|
||||
export const queryPadPageList = (params) => {
|
||||
return request({
|
||||
url: `${uni.getStorageSync('serverUrl')}/api/pad/baseInfo/queryPadPageList`,
|
||||
method: 'get'
|
||||
method: 'get',
|
||||
data: params,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
export const getPermissionList = (params) => {
|
||||
return request({
|
||||
url: `${uni.getStorageSync('serverUrl')}/api/employessInfo/getPermissionList`,
|
||||
method: 'get',
|
||||
data: params,
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue