From c2210d5c8e7365112c971d8775f886b4e74e2cc6 Mon Sep 17 00:00:00 2001 From: wangweidong <850489345@qq.com> Date: Wed, 1 Apr 2026 17:02:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- manifest.json | 4 +- pages/NursingNew/component/api.js | 2 +- pages/NursingNew/component/index.vue | 58 ++++---- .../component/leftcontent/serveswipe.vue | 136 ++++++++++-------- request/index.js | 6 +- 5 files changed, 115 insertions(+), 91 deletions(-) diff --git a/manifest.json b/manifest.json index 70bd76f..93f7ecc 100644 --- a/manifest.json +++ b/manifest.json @@ -2,8 +2,8 @@ "name" : "护理单元", "appid" : "__UNI__FB2D473", "description" : "护理单元", - "versionName" : "1.0.037", - "versionCode" : 10037, + "versionName" : "1.0.038", + "versionCode" : 10038, "transformPx" : false, /* 5+App特有相关 */ "app-plus" : { diff --git a/pages/NursingNew/component/api.js b/pages/NursingNew/component/api.js index b771b9e..d07d114 100644 --- a/pages/NursingNew/component/api.js +++ b/pages/NursingNew/component/api.js @@ -155,7 +155,7 @@ export const queryCountByType = (data) => { // 即时指令内容 export const queryAll = (data) => { return request({ - url: `${uni.getStorageSync('serverUrl')}/api/pad/care/directive/getImmediatelyOrderByNuID?nuId=${data.nuId}&elderId=${data.elderId}`, + url: `${uni.getStorageSync('serverUrl')}/api/pad/care/directive/getImmediatelyOrderByNuID?nuId=${data.nuId}&instructionTagId=${data.instructionTagId}`, method: 'get' }) } \ No newline at end of file diff --git a/pages/NursingNew/component/index.vue b/pages/NursingNew/component/index.vue index 59f80cd..967af23 100644 --- a/pages/NursingNew/component/index.vue +++ b/pages/NursingNew/component/index.vue @@ -112,8 +112,8 @@ 即时服务指令 - {{v}} + {{v.instructionName}} { + const zlfunc = (e) => { let data = { - nuId: nuId, - elderId: elderId + nuId: uni.getStorageSync('nuId'), + instructionTagId: e } - // console.log("入参",data) queryAll(data).then(res => { - zlarr.value = res.result; - // console.log("看看图标",res.result) - shtab(fwzlindex.value) + console.log(res) + fwzlarr.value = res.result.jsList; }) } const shtab = (e) => { fwzlindex.value = e; - - if (e == 0) { - fwzlarr.value = zlarr.value?.hlList - } - if (e == 1) { - fwzlarr.value = zlarr.value?.ylList; - } - if (e == 2) { - fwzlarr.value = zlarr.value?.hqList - } + zlfunc(typearra.value[e].instructionType) fwzldex.value = -1 - // console.log("数据呢啊", fwzlarr.value) - // console.log(zlarr.value,serverUrl.value) } const zldex = (e) => { if (e > -1 && e == fwzldex.value) { @@ -427,15 +413,22 @@ if (fwzldex.value < 0) { return } - let code = fwzlindex.value == 0 ? 1 : fwzlindex.value == 1 ? 2 : 4 let obj = { - id: fwzlarr.value[fwzldex.value].id, - triggerMode: 1, - orderType: code + nuId:uni.getStorageSync('nuId'), + instructionId:fwzlarr.value[fwzldex.value].instructionId, + directiveId:fwzlarr.value[fwzldex.value].directiveId, } generateInstant(obj).then(res => { + console.log(res) if (res.success) { - jszlshow.value = false + jszlshow.value = false; + uni.showToast({ + title:res.message, + icon:'none' + }) + setTimeout(()=>{ + inits(uni.getStorageSync('nuId')) + },800) } else { error.value = true; msg.value = res.message @@ -568,7 +561,13 @@ getmenu(); }) + const typearra = ref([]) onShow(() => { + getInstructionTag().then((res)=>{ + // console.log(res.result) + typearra.value = res.result; + shtab(0) + }) setTimeout(() => { photoplay.value = true; }, 200) @@ -1330,7 +1329,7 @@ } .spiw { - width: 14vw; + width: 24vw; height: 2vw; display: flex; justify-content: space-around; @@ -1342,6 +1341,7 @@ color: #555555; position: relative; line-height: 1.5vw; + white-space: nowrap; } .act { diff --git a/pages/NursingNew/component/leftcontent/serveswipe.vue b/pages/NursingNew/component/leftcontent/serveswipe.vue index 6a50f57..4f917ff 100644 --- a/pages/NursingNew/component/leftcontent/serveswipe.vue +++ b/pages/NursingNew/component/leftcontent/serveswipe.vue @@ -35,7 +35,7 @@ - + @@ -119,14 +118,14 @@ + :style="indexmessage?.mp3File!=''?' ':'opacity: 0.4'"> + :style="indexmessage?.mp4File!=''?' ':'opacity: 0.4'"> @@ -220,14 +219,14 @@ + :style="indexmessage?.directiveList[swipdcurrent]?.mp3File!=''?' ':'opacity: 0.4'"> + :style="indexmessage?.directiveList[swipdcurrent]?.mp4File!=''?' ':'opacity: 0.4'"> @@ -243,7 +242,7 @@ - + 转单执行 @@ -252,7 +251,7 @@ - + 协助执行 @@ -325,14 +324,16 @@ {{ v.height}}cm - - - {{ Number(v.weight).toFixed(1) }}Kg + + {{ v.weight?v.weight.slice(0, 4)+'Kg':'' }} + + 确定 + @@ -350,7 +351,7 @@ @@ -361,7 +362,7 @@ + :src="serverUrl+item" direction="180" mode="aspectFill"> 确定 - - + + @@ -432,9 +433,6 @@ swipdcurrent.value = e } const change = (e) => { - console.log(e) - // return - current.value = e.detail.current; let a = e.detail.current; if(e.detail.key==1){ @@ -462,12 +460,12 @@ plsbuy.value[current.value].chaoshitime = true } } - const timeend = () => { - // 结束超时 - return - plsbuy.value.splice(current.value, 1) - firstgetqueryCgdList(form.nuId) - } + // const timeend = () => { + // // 结束超时 + // return + // plsbuy.value.splice(current.value, 1) + // firstgetqueryCgdList(form.nuId) + // } const swip = (e) => { if (current.value == 0 && e == -1) { @@ -498,15 +496,22 @@ }) const zdxzdex = ref(0) const zdxzarr = ref(0) - const zhixing = (e, indexmessage) => { - if (indexmessage?.izStart == 'Y') { + const zhixing = (e, f) => { + if (f?.izStart == 'Y') { errmsg.value = (e == 1 ? "服务中不能转单执行!" : '服务中不能协助执行!') openerror.value = true return } + if(f.employeeIds){ + errmsg.value = (e == 1 ? "转单执行只能执行一次!" : '协助执行只能执行一次!') + openerror.value = true + return + } + indexmessage.value = f; // 打包过不了校验 - queryEmpList({ id: uni.getStorageSync('userInfo').id }).then(res => { + queryEmpList({ id: uni.getStorageSync('userInfo').employeesId }).then(res => { zdxzarr.value = res.result; + console.log(zdxzarr.value) zdxzarr.value.forEach(item => { item.flag = false }) @@ -516,6 +521,7 @@ const plsbuy = ref([]) const flag = ref(false) const zdwu = (e, k) => { + console.log(e) if (zdxzdex.value == 1) { e.flag = !e.flag; zdxzarr.value.forEach((item, i) => { @@ -564,21 +570,27 @@ employeeId: s.id, employeeName: s.name, beforeBy: indexmessage.value.employeeId, - beforeByName: indexmessage.value.employeeName + beforeByName: indexmessage.value.employeeName, + id:indexmessage.value.id } + console.log(obj) let nuId = uni.getStorageSync('nuId'); transferOrder(obj).then(res => { + console.log(res) if (res.success) { firstgetqueryCgdList(nuId); flag.value = false; zxzd.value = 0; zdxzdex.value = 0; + }else{ + errmsg.value = res.message; + openerror.value = true; } }) } if (zxzd.value == 2) { let userinfo = uni.getStorageSync('userInfo') - let id = userinfo.id + ','; + let id = userinfo.employeesId + ','; let name = userinfo.realname + ','; zdxzarr.value.forEach((item, i) => { if (item.flag) { @@ -589,19 +601,24 @@ id = id.slice(0, -1); name = name.slice(0, -1); let obj = { - mainId: indexmessage.value.mainId, - optIds: id, - optNames: name, + employeeId: id, + employeeName: name, beforeBy: indexmessage.value.employeeId, - beforeByName: indexmessage.value.employeeName + beforeByName: indexmessage.value.employeeName, + id:indexmessage.value.id } + console.log(obj) assistOrder(obj).then(res => { + console.log(res) if (res.success) { firstgetqueryCgdList(form.nuId) // clickLeftMenu(0,{id:indexmessage.value.mainId}) flag.value = false; zxzd.value = 0; zdxzdex.value = 0; + }else{ + errmsg.value = res.message; + openerror.value = true; } }) } @@ -639,12 +656,11 @@ } }) } - // const indexmessage = ref({}); + const indexmessage = ref({}); const firstgetqueryCgdList = (nuId) => { form.nuId = nuId; - console.log(nuId) + // console.log(nuId) queryOrderList(form).then(res => { - console.log(res) console.log(`这啥啊啊啊啊啊`,res.result.length, res) if (res.result.length > 0) { res.result.forEach((item, l) => { @@ -656,13 +672,13 @@ if (djs < 0) { item.chaoshitime = true } - if (item.izPackage == 'Y') { - clickLeftMenu(l, item) - } }) plsbuy.value = res.result; - console.log(plsbuy.value,uni.getStorageSync('imagebase')) - change({ detail: { current: current.value } }) + if(current.value>=plsbuy.value.length){ + change({ detail: { current: current.value-1 } }) + }else{ + change({ detail: { current: current.value } }) + } } else { plsbuy.value = []; } @@ -680,7 +696,6 @@ topbuttontarget.value = 0; donghuaopo.value = false; firstgetqueryCgdList(form.nuId) - // clickLeftMenu(0,{id:indexmessage.value.mainId}) } }) } else { @@ -690,7 +705,6 @@ topbuttontarget.value = 0; donghuaopo.value = false; firstgetqueryCgdList(form.nuId) - // clickLeftMenu(0,{id:indexmessage.value.mainId}) } }) } @@ -699,7 +713,7 @@ if (topbuttontarget.value == 1) { let u = [] arr.forEach(e => { - u.push(serverpicUrl.value + e) + u.push(serverUrl.value + e) }) uni.previewImage({ current: i, @@ -747,7 +761,11 @@ success: res => { console.log(res) const data = JSON.parse(res.data); - ilanarr.value.push(data.message) + if(data.message){ + ilanarr.value.push(data.message) + }else{ + uni.showToast({ title: '上传失败', icon: 'none' }) + } uni.hideLoading() }, fail: () => { @@ -763,14 +781,16 @@ sizeType: ['compressed'], //可以指定是原图还是压缩图,默认二者都有 sourceType: ['camera'], //从相册选择 success: (e) => { - console.log(e) + const filePath = e.tempFilePaths[0] + const fileName = filePath.substring(filePath.lastIndexOf('/') + 1 ) + const ext = fileName.substring(fileName.lastIndexOf('.')) let ar = JSON.stringify(e.tempFilePaths) uni.compressImage({ src: JSON.parse(ar)[0], quality: 60, success: res => { console.log(res.tempFilePath) - pre(res.tempFilePath,e.tempFiles[0].size) + pre(res.tempFilePath,fileName,e.tempFiles[0].size) // v.picPatharr.push(res.tempFilePath); } }) @@ -780,14 +800,17 @@ uni.chooseVideo({ sourceType: ['camera'], success: (e) => { + console.log(e) uni.showLoading({ title: '正在上传...' }) + const filePath = e.tempFilePath + const fileName = filePath.substring(filePath.lastIndexOf('/') + 1 ) uni.compressVideo({ src: e.tempFilePath, quality: 'medium', success: res => { - pre(res.tempFilePath,e.tempFiles[0].size) + pre(res.tempFilePath,fileName,e.size) // sxdupld(res.tempFilePath) // v.picPatharr.push(res.tempFilePath); } @@ -798,11 +821,12 @@ } } const strs = ref('') - const pre = (e,s)=>{ - strs.value = randomStr(); - preupload({fileName:strs.value,fileSize:s}).then(res=>{ - console.log(res,strs.value,s) - sxdupld(e,strs.value,s) + const pre = (e,n,s)=>{ + preupload({fileName:n,fileSize:s}).then(res=>{ + console.log(res,n,s) + if(res.success){ + sxdupld(e,res.message,s) + } }) } const randomStr = (length = 8)=> { @@ -1101,7 +1125,7 @@ height: 60rpx; bottom: 1.2vw; left: 20%; - z-index: 999; + z-index: 99; } .bots { height: 100%; @@ -1942,7 +1966,7 @@ .photowall-other { width: 76vw; - // height: 62vh; + height: 62vh; display: flex; margin-top: 20rpx; flex-wrap: wrap; diff --git a/request/index.js b/request/index.js index eeb5e56..3df33ff 100644 --- a/request/index.js +++ b/request/index.js @@ -1,6 +1,6 @@ // 全局请求封装 -// const base_url = 'https://www.focusnu.com/opeapi' -export const base_url = 'http://192.168.2.27:8081/opeapi/' +export const base_url = 'https://www.focusnu.com/opeapi' +// export const base_url = 'http://192.168.2.27:8081/opeapi/' // const base_url = 'http://192.168.2.55:8081/opeapi' // 请求超出时间 const timeout = 5000 @@ -28,7 +28,7 @@ export default (params) => { timeout, success(response) { const res = response - console.log("请求返回了啥啊",response) + // console.log("请求返回了啥啊",response) // 根据返回的状态码做出对应的操作 //获取成功 // console.log("接口总线",url);