This commit is contained in:
wangweidong 2026-03-20 08:32:26 +08:00
parent 8bf449d2da
commit 803aa4f28e
4 changed files with 42 additions and 43 deletions

View File

@ -4,9 +4,9 @@ import request from '@/request/index.js'
// 以下 api 为博主项目示例,实际与项目相匹配 // 以下 api 为博主项目示例,实际与项目相匹配
// 查询服务类型 // 查询服务类型
export const getServiceTree0 = () => { export const getServiceTree0 = (insTags) => {
return request({ return request({
url: `${uni.getStorageSync('serverUrl')}/api/pad/care/directive/getServiceTree`, url: `${uni.getStorageSync('serverUrl')}/api/pad/care/directive/getServiceTree?insTags=${insTags}`,
method: 'get', method: 'get',
}) })
} }

View File

@ -886,8 +886,8 @@
uni.setStorageSync('rulerbase', "care") uni.setStorageSync('rulerbase', "care")
getInstructionTag().then((res)=>{ getInstructionTag().then((res)=>{
typearray.value = res.result; typearray.value = res.result;
init()
}) })
init()
}) })
const typearray = ref(["护理", "医疗", "后勤", "占位", "占位", "占位"]) const typearray = ref(["护理", "医疗", "后勤", "占位", "占位", "占位"])
@ -1858,7 +1858,7 @@
// console.log("",uni.getStorageSync('elderId')) // console.log("",uni.getStorageSync('elderId'))
if (uni.getStorageSync('nuId') && uni.getStorageSync('elderId')) { if (uni.getStorageSync('nuId') && uni.getStorageSync('elderId')) {
getNclist(uni.getStorageSync('nuId'), uni.getStorageSync('elderId'),typearray.value[whitchtype.value]?.instructionType).then((res : any) => { getNclist(uni.getStorageSync('nuId'), uni.getStorageSync('elderId'),typearray.value[whitchtype.value]?.instructionType).then((res : any) => {
console.log("通了吗", res,uni.getStorageSync('nuId'),typearray.value[whitchtype.value]?.instructionType) console.log( res )
timearr.value = Array.from({ length: 24 }, (_, hour) => ({ timearr.value = Array.from({ length: 24 }, (_, hour) => ({
positioning: hour.toString(), positioning: hour.toString(),
children: minuteArr.map(time => ({ children: minuteArr.map(time => ({
@ -1914,8 +1914,10 @@
const init = () => { const init = () => {
geteverything()
// savePackagelist.value = uni.getStorageSync('Packagelist') || [] // savePackagelist.value = uni.getStorageSync('Packagelist') || []
let res = uni.getStorageSync(`saveTree${whitchtype.value}`) let res = uni.getStorageSync(`saveTree${typearray.value[whitchtype.value]?.instructionType}`)
console.log(res,typearray.value[whitchtype.value]?.instructionType)
let goodArray = [] let goodArray = []
myArray.forEach((element : any) => { myArray.forEach((element : any) => {
element?.children.forEach((element1 : any) => { element?.children.forEach((element1 : any) => {
@ -1927,7 +1929,7 @@
}) })
secondtemp.value = goodArray secondtemp.value = goodArray
let data0 = res.result.fwzl let data0 = res
// console.log("0000", data0) // console.log("0000", data0)
if (data0) { if (data0) {
data0.forEach((element : any) => { data0.forEach((element : any) => {
@ -1978,33 +1980,33 @@
}) })
bigArray.value = data0; bigArray.value = data0;
} }
let data1 = res.result.jszl // let data1 = res.result.jszl
if (data1) { // if (data1) {
data1.forEach((element : any) => { // data1.forEach((element : any) => {
if (element.netFlag == '0') { // if (element.netFlag == '0') {
doctorsayList.value.forEach((res : any) => { // doctorsayList.value.forEach((res : any) => {
if (res.name == element.title) { // if (res.name == element.title) {
element.url = res.url // element.url = res.url
} // }
}) // })
} else { // } else {
element.url = element.animationPath // element.url = element.animationPath
} // }
element?.children.forEach((res1 : any) => { // element?.children.forEach((res1 : any) => {
if (res1.netFlag == '0') { // if (res1.netFlag == '0') {
secondtemp.value.forEach((res2 : any) => { // secondtemp.value.forEach((res2 : any) => {
if (res2.name == res1.title) { // if (res2.name == res1.title) {
res1.url = res2.url // res1.url = res2.url
} // }
}) // })
} else { // } else {
res1.url = res1.animationPath // res1.url = res1.animationPath
} // }
}) // })
}) // })
smallArray.value = data1; // smallArray.value = data1;
} // }
upmenuIndex.value = 1; upmenuIndex.value = 1;
downmenuIndex.value = 1; downmenuIndex.value = 1;
thirdmenuIndex.value = 1; thirdmenuIndex.value = 1;
@ -2014,7 +2016,6 @@
thirdmenuIndex.value = 0; thirdmenuIndex.value = 0;
}, 50) }, 50)
downdonghua.value = 0; downdonghua.value = 0;
geteverything()
nextTick(() => { nextTick(() => {
timeNowMove() timeNowMove()
}) })

View File

@ -270,17 +270,14 @@
onMounted(() => { onMounted(() => {
// //
getServiceTree0().then((res : any) => { getServiceTree0('1,2,3,4,5').then((res : any) => {
console.log(res.result)
uni.setStorageSync("saveTree1", res.result.fwzl[1])
uni.setStorageSync("saveTree2", res.result.fwzl[2])
uni.setStorageSync("saveTree3", res.result.fwzl[3])
uni.setStorageSync("saveTree4", res.result.fwzl[4])
uni.setStorageSync("saveTree5", res.result.fwzl[5])
// //
uni.setStorageSync("saveTree0", res)
getServiceTree1().then((res : any) => {
//
uni.setStorageSync("saveTree1", res)
})
getServiceTree2().then((res : any) => {
//
uni.setStorageSync("saveTree2", res)
})
}) })

View File

@ -221,6 +221,7 @@
// //
getServiceTree0().then((res : any) => { getServiceTree0().then((res : any) => {
// //
console.log(res)
uni.setStorageSync("saveTree0", res) uni.setStorageSync("saveTree0", res)
getServiceTree1().then((res : any) => { getServiceTree1().then((res : any) => {
// //