This commit is contained in:
wangweidong 2026-01-05 09:29:43 +08:00
parent 2024245b4d
commit 997166581c
8 changed files with 1976 additions and 28 deletions

View File

@ -2,8 +2,8 @@
"name" : "护理单元", "name" : "护理单元",
"appid" : "__UNI__FB2D473", "appid" : "__UNI__FB2D473",
"description" : "护理单元", "description" : "护理单元",
"versionName" : "1.0.018", "versionName" : "1.0.020",
"versionCode" : 10018, "versionCode" : 10020,
"transformPx" : false, "transformPx" : false,
/* 5+App */ /* 5+App */
"app-plus" : { "app-plus" : {

View File

@ -1357,6 +1357,10 @@
photoplay.value = true; photoplay.value = true;
init(); init();
yulan(); yulan();
transition.value = false;
setTimeout(() => {
transition.value = true;
}, 50)
}) })
const changeallmessage = () => { const changeallmessage = () => {

View File

@ -283,7 +283,7 @@
const openleft = ref(false) const openleft = ref(false)
const menutarget = ref(0) const menutarget = ref(0)
const emit = defineEmits(['swip'])
const clickmenu = (index : number) => { const clickmenu = (index : number) => {
menutarget.value = index menutarget.value = index
let data = filteredMenu(0)[index] let data = filteredMenu(0)[index]
@ -291,7 +291,8 @@
uni.setStorageSync('nuName', data.nuName); uni.setStorageSync('nuName', data.nuName);
uni.setStorageSync('elderId', data.elderInfo ? data.elderInfo?.id : null); uni.setStorageSync('elderId', data.elderInfo ? data.elderInfo?.id : null);
uni.setStorageSync('NUall', data); uni.setStorageSync('NUall', data);
getgif() getgif();
emit('swip')
} }
const tagarray = ["市医保", "半失能", "正常计费"] const tagarray = ["市医保", "半失能", "正常计费"]
@ -384,6 +385,7 @@
(newVal, oldVal) => { (newVal, oldVal) => {
// falsetrue0.2 // falsetrue0.2
if (!oldVal && newVal) { if (!oldVal && newVal) {
console.log(oldVal && newVal)
transition.value = false; transition.value = false;
// console.log("????",transition.value) // console.log("????",transition.value)
setTimeout(() => { setTimeout(() => {
@ -431,17 +433,25 @@
setInterval(updateTime, 1000); setInterval(updateTime, 1000);
photoplay.value = true; photoplay.value = true;
getmenu(); getmenu();
getgif(); transition.value = false;
// console.log("????",transition.value)
setTimeout(() => {
transition.value = true;
// console.log("", uni.getStorageSync('NUall'))
}, 50)
}) })
const filteredMenu = (index : number) => { const filteredMenu = (index : number) => {
return leftMenuArray.value.filter(item => Number(item.areaFlag) - 1 == index); return leftMenuArray.value.filter(item => Number(item.areaFlag) - 1 == index);
} }
const getmenu = () => { const getmenu = () => {
queryPadPageList().then((res => { queryPadPageList().then((res => {
console.log(res.result)
leftMenuArray.value = res.result.records; leftMenuArray.value = res.result.records;
filteredMenu(0).forEach((element : any, index : number) => { filteredMenu(0).forEach((element : any, index : number) => {
if (element.nuId === uni.getStorageSync('NUall').nuId) { if (element.nuId === uni.getStorageSync('NUall').nuId) {
menutarget.value = index menutarget.value = index
clickmenu(menutarget.value)
} }
}) })
})) }))

View File

@ -5,7 +5,7 @@
<image src="/static/shouye/logo2.png" mode="aspectFill"></image> <image src="/static/shouye/logo2.png" mode="aspectFill"></image>
</view> </view>
<view class="cont"> <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"> <view class="tm guodu">
<image :src="i==dexleft?v.urls:v.url" mode="aspectFill" class="guodu"></image> <image :src="i==dexleft?v.urls:v.url" mode="aspectFill" class="guodu"></image>
<text>{{v.name}}</text> <text>{{v.name}}</text>

File diff suppressed because it is too large Load Diff

View File

@ -37,6 +37,10 @@
}); });
onMounted(()=>{ onMounted(()=>{
hometype.value = 0; hometype.value = 0;
transition.value = false;
setTimeout(() => {
transition.value = true;
}, 50)
}) })
watch( watch(
() => props.isShow, () => props.isShow,

View File

@ -1,18 +1,22 @@
<template> <template>
<view class="backgroundContainer"> <view class="backgroundContainer">
<!-- 左侧菜单 --> <!-- 左侧菜单 -->
<leftcontent :list="tabbrarr" @navurl="navurl"></leftcontent> <leftcontent :list="arrlist" @navurl="navurl"></leftcontent>
<!-- 主页 --> <!-- 主页 -->
<index :isShow="menuIndexshow" v-if="!menuIndex" /> <index :isShow="menuIndex==0" v-if="menuIndex==0" @swip="swip"/>
<!-- 设备页 -->
<equipment :isShow="menuIndexshowfifth" v-if="menuIndex==4" />
<!-- 医嘱页 -->
<requestform :isShow="menuIndexshowfourth" v-if="menuIndex==3" />
<!-- 户嘱页 --> <!-- 户嘱页 -->
<nurse :isshow="menuIndexshowsecond" <nurse :isshow="menuIndex==1" v-if="menuIndex==1&&uni.getStorageSync('elderId')&&uni.getStorageSync('nuId')" />
v-if="menuIndex==1&&uni.getStorageSync('elderId')&&uni.getStorageSync('nuId')" />
<!-- 医嘱 --> <!-- 医嘱 -->
<doctorask v-if="menuIndex==2&&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`}" <view class="nomessageclass" :style="messageopit?{opacity: `1`}:{opacity: `0`}"
v-if="(menuIndex == 1 || menuIndex == 2) && (!uni.getStorageSync('elderId') ||!uni.getStorageSync('nuId'))"> v-if="(menuIndex == 1 || menuIndex == 2) && (!uni.getStorageSync('elderId') ||!uni.getStorageSync('nuId'))">
@ -23,8 +27,10 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref, onMounted, onBeforeUnmount, nextTick } from 'vue'; import { ref, onMounted, onBeforeUnmount, nextTick } from 'vue';
import { queryPadPageList ,getPermissionList } from '@/pages/watch/api/lunpan.js'
import index from "./component/index.vue" import index from "./component/index.vue"
import equipment from "./component/equipment.vue" import equipment from "./component/equipment.vue"
import logistics from "./component/nurse/logistics.vue"
import requestform from "./component/pleasetake/takehome.vue" import requestform from "./component/pleasetake/takehome.vue"
import doctorask from "./component/doctorask/doctorask.vue" import doctorask from "./component/doctorask/doctorask.vue"
import nurse from "./component/nurse/index.vue" import nurse from "./component/nurse/index.vue"
@ -33,7 +39,7 @@
import leftcontent from "./component/leftcontent/leftcontent.vue" import leftcontent from "./component/leftcontent/leftcontent.vue"
import defaultr from '@/pages/procurement/components/default.vue'; import defaultr from '@/pages/procurement/components/default.vue';
const listarr = ref([]);
onMounted(() => { onMounted(() => {
menuIndex.value = -1; menuIndex.value = -1;
nextTick(() => menuIndex.value = 0) nextTick(() => menuIndex.value = 0)
@ -46,6 +52,10 @@
// //
uni.setStorageSync("Packagelist", res.result) 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([ 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' ,type:'hldy_hljz'},
{ 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' ,type:'hldy_yljz'},
{ 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' ,type:'hldy_xzjz'},
{ name: '后勤', url: '/static/shouye/sy/l0.png', urls: '/static/shouye/sy/l1.png' }, { name: '请领', url: '/static/shouye/sy/l0.png', urls: '/static/shouye/sy/l1.png' ,type:'kf_ql'},
{ 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' },
]) ])
const navurl = (e) => { const navurl = (e,v) => {
changeMenu(e) 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 menuIndex = ref<number>(-1);
const menuIndexshow = ref<boolean>(false); const menuIndexshow = ref<boolean>(false);
@ -87,7 +181,7 @@
menuIndexshowsecond.value = false menuIndexshowsecond.value = false
menuIndexshowfourth.value = false; menuIndexshowfourth.value = false;
menuIndexshowfifth.value = false menuIndexshowfifth.value = false
if (index === 5) { if (index === arrlist.value.length-1) {
uni.navigateBack() uni.navigateBack()
return return
} }
@ -110,6 +204,10 @@
case 4: case 4:
menuIndexshowfifth.value = true; menuIndexshowfifth.value = true;
break; break;
case 5:
menuIndexshowfourth.value = true
break;
default: default:
} }
}, 50) }, 50)

View File

@ -11,9 +11,18 @@ export const movedirection = (direction,startOrNot) => {
// 获取护理单元 // 获取护理单元
export const queryPadPageList = () => { export const queryPadPageList = (params) => {
return request({ return request({
url: `${uni.getStorageSync('serverUrl')}/api/pad/baseInfo/queryPadPageList`, 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,
})
}