This commit is contained in:
wangweidong 2026-01-30 17:33:30 +08:00
commit 70ad2399bf
26 changed files with 377 additions and 113 deletions

View File

@ -2,8 +2,13 @@
"name" : "护理单元",
"appid" : "__UNI__FB2D473",
"description" : "护理单元",
<<<<<<< HEAD
"versionName" : "1.0.028",
"versionCode" : 10028,
=======
"versionName" : "1.0.029",
"versionCode" : 10029,
>>>>>>> d85f0ba3d246357246f9a3023d63f206efe66fc3
"transformPx" : false,
/* 5+App */
"app-plus" : {

View File

@ -707,6 +707,7 @@
height: 1350rpx;
display: flex;
margin-top: 30rpx;
.doctorsay-container-container {
width: 100%;
@ -2323,7 +2324,8 @@
background-color: #F6F9FF;
flex-direction: column;
}
.title-time-border-error{
.title-time-border-error {
border: 2rpx solid red;
width: calc(100% - 15rpx);
height: calc(100% - 15rpx);
@ -2333,7 +2335,8 @@
background-color: rgba(238, 44, 53, 0.05);
flex-direction: column;
}
.title-time-border-own{
.title-time-border-own {
border: 2rpx dashed #5E8EF6;
width: calc(100% - 15rpx);
height: calc(100% - 15rpx);
@ -2344,6 +2347,7 @@
flex-direction: column;
opacity: 0.3;
}
.title-time {
display: flex;
width: 100%;
@ -2426,7 +2430,56 @@
position: absolute;
top: 0;
left: 0;
/* box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); */
.explain-text {
position: absolute;
right: 4%;
top: 70rpx;
width: 93%;
z-index: 1;
height: 80rpx;
background-color: #fff;
color: #999;
display: flex;
justify-content: center;
align-items: center;
/* flex-direction: column; */
border: 2rpx solid rgba(0, 137, 254, 0.29);
border-radius: 25rpx;
font-size: 30rpx;
padding: 0 20rpx;
.triangle {
position: absolute;
top: -8.34rpx;
right: 22rpx;
width: 0;
height: 0;
border-left: 14.44rpx solid transparent;
border-right: 14.44rpx solid transparent;
border-bottom: 8.34rpx solid rgba(0, 137, 254, 0.29);
.triangle-small {
position: absolute;
top: 1.6rpx;
right: 50%;
transform: translateX(50%);
width: 0;
height: 0;
border-left: 14.44rpx solid transparent;
border-right: 14.44rpx solid transparent;
border-bottom: 8.34rpx solid #fff;
}
}
}
.explain-icon {
position: absolute;
right: 40rpx;
top: 20rpx;
width: 35rpx;
height: 35rpx;
}
}
.right-instant-more {
@ -2607,15 +2660,17 @@
top: 55rpx;
width: 93%;
z-index: 1;
height: 90rpx;
height: 120rpx;
background-color: #fff;
color: #999;
display: flex;
justify-content: center;
align-items: center;
/* flex-direction: column; */
border: 2rpx solid rgba(0, 137, 254, 0.29);
border-radius: 25rpx;
font-size: 30rpx;
padding: 0 20rpx;
.triangle {
position: absolute;
@ -3003,6 +3058,7 @@
margin-top: -10rpx;
color: #818181;
font-size: 26rpx;
text-align: center;
}
}
}
@ -3162,7 +3218,7 @@
.pack-title {
width: 100%;
height: 160rpx;
height: 180rpx;
.pack-father {
display: flex;
@ -3172,22 +3228,35 @@
.packs {
height: 100%;
min-width: 180rpx;
/* border: 1rpx solid black; */
border-top-right-radius: 30rpx;
border-top-left-radius: 30rpx;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
white-space: nowrap;
/* 不换行 */
overflow: hidden;
/* 超出隐藏 */
/* text-overflow: ellipsis; */
/* 显示省略号 */
position: relative;
.blue-heng{
position: absolute;
bottom: 0rpx;
left: 50%;
transform: translateX(-50%);
width: 30%;
height: 3rpx;
background-color: #73B8FF;
}
.pack-icon {
width: 48rpx;
height: 48rpx;
margin-bottom: 5rpx;
width: 80rpx;
height: 80rpx;
margin-bottom: 3rpx;
margin-top: -30rpx;
}
.pack-text {
width: 100%;
height: 10rpx;
text-align: center;
}
}
}
@ -3196,7 +3265,12 @@
.pack-detail {
width: 100%;
height: 300rpx;
margin-top: 20rpx;
/* border-bottom-left-radius: 40rpx;
border-bottom-right-radius: 40rpx; */
/* background-color: #fafafa; */
/* padding: 30rpx 0; */
padding-top: 15rpx;
padding-bottom: 10rpx;
.detail-father {
display: flex;
@ -3214,9 +3288,9 @@
justify-content: center;
align-items: center;
flex-direction: column;
white-space: nowrap;
/* white-space: nowrap; */
/* 不换行 */
overflow: hidden;
/* overflow: hidden; */
.detail-icon {
@ -3234,8 +3308,8 @@
width: 100%;
height: 1rpx;
background-color: #E5E5E5;
margin-top: 13rpx;
margin-left: -12rpx;
margin-top: 0rpx;
/* margin-left: -12rpx; */
}
.packtargetmessage {
@ -3309,6 +3383,7 @@
height: 100%;
flex-wrap: wrap;
color: #666666;
.details {
height: 125rpx;
@ -3319,9 +3394,9 @@
justify-content: center;
align-items: center;
flex-direction: column;
white-space: nowrap;
/* white-space: nowrap; */
/* 不换行 */
overflow: hidden;
/* overflow: hidden; */
font-size: 25rpx;
.detail-icon {

View File

@ -21,7 +21,8 @@
</view>
</view>
<view class="super-card-container">
<view class="super-card-container"
:style="isTuoing&&(postitem.levle||postitem.packageName)?{borderColor:`red`}:{}">
<scroll-view style="width: 100%;" scroll-with-animation :scroll-left="cardLeft"
:scroll-x="canmovechange" @scroll="handleTop" :show-scrollbar="false">
<view style="display: flex;width:4824rpx;">
@ -53,7 +54,8 @@
<image class="blue-img" src="/static/index/newtarget.png" />
</view>
<view class="title-time-blue"
v-show="targetrule[0] == index0 && targetrule[1] == index1 && isTuoing">
v-if="!(Number(postitem.positioning) == index0 && Number(postitem.positioningLong) == index1) && !(postitem.levle||postitem.packageName)"
v-show="targetrule[0] == index0 && targetrule[1] == index1 && isTuoing ">
<image class="blue-img"
:src="`/static/index/newtarget${timearr[index0]?.children[index1]?.id?`red`:``}.png`" />
</view>
@ -121,7 +123,7 @@
<image class="tags-img"
:src="item.pic ? (serverUrl + item.pic) : noimageshow" />
<view style="white-space: nowrap;">
{{ item.tagName }}
{{ shortText(item.tagName,3) }}
</view>
</view>
</view>
@ -138,7 +140,7 @@
<image class="tags-img"
:src="item.pic ? (serverUrl + item.pic) : noimageshow" />
<view class="">
{{ item.tagName }}
{{ shortText(item.tagName,3) }}
</view>
</view>
</view>
@ -171,7 +173,7 @@
</view>
<image class="check-img" :src="
item.izSelected === 'Y'
? (item.picFocus ? serverUrl + item.picFocus : noimageshow)
? (item.picFocus ? serverUrl + item.picFocus : noimageshowtarget)
: (item.pic ? serverUrl + item.pic : noimageshow)" />
<view class=" check-text-view">
<view class="check-weight"
@ -194,13 +196,24 @@
<view class="forfixed" @click.stop>
<view class="right-instant" v-show="!openmore"
:style="isblue==`1`&&isTuoing?{border:`4rpx dashed #0089FE`}:{border:`4rpx dashed #fff`}">
:style="isblue==`1`&&isTuoing?postitem?.packageName?{border:`4rpx dashed red`}:{border:`4rpx dashed #0089FE`}:{border:`4rpx dashed #fff`}">
<view class="right-instant-title">
<view class="blue-shu" style="margin-left: 30rpx;"></view>
<view class="blue-font">
即时标签
</view>
</view>
<image class="explain-icon" @click="jishiopen=!jishiopen"
src="/static/index/procurement/explain.png" mode="aspectFill"></image>
<view class="explain-text" v-show="jishiopen">
<view class="triangle">
<view class="triangle-small"></view>
</view>
<view class="">
长按可进行删除操作
</view>
</view>
<view class="right-instant-items">
<image class="haven-img" v-if="!bottomItems.length"
src="/static/index/procurement/haven.png" mode="aspectFill"></image>
@ -213,7 +226,7 @@
:src="item.immediateFile? (serverUrl + item.immediateFile ) : noimageshow "
:class="deleteshake?`wiggle`:``" mode="aspectFill"></image>
<view class="instant-text">
{{ item.directiveName }}
{{ shortText(item.directiveName,6) }}
</view>
<view class="instant-close" v-show="deleteshake"
@click.stop="killinstantopen(item)">
@ -236,6 +249,7 @@
即时标签
</view>
</view>
<view class="right-instant-items" style="height: 430rpx;">
<view class="small-instant">
<scroll-view style="height: 100%;width:100%;" scroll-with-animation scroll-y
@ -245,12 +259,12 @@
@click="clickinstant(index)">
<image class="instant-icon" :class="deleteshake?`wiggle`:``" :src="
index === moreindex
? (item.immediateFileFocus ? serverUrl + item.immediateFileFocus : noimageshow)
? (item.immediateFileFocus ? serverUrl + item.immediateFileFocus : noimageshowtarget)
: (item.immediateFile ? serverUrl + item.immediateFile : noimageshow)
" mode="aspectFill"></image>
<view class="instant-text"
:style="index === moreindex?{color:`#0084ff`}:{}">
{{ item.directiveName }}
{{ shortText(item.directiveName,6) }}
</view>
<view class="instant-close" v-show="deleteshake"
@click.stop="killinstantopen(item)">
@ -313,7 +327,9 @@
<view class="triangle">
<view class="triangle-small"></view>
</view>
双击服务指令可编辑矩阵
<view class="">
双击服务指令可添加矩阵, 长按服务指令可拖动到即时指令区进行添加
</view>
</view>
</view>
<view class="three-items" v-show="!ruleritem.directiveName && !servertype">
@ -326,12 +342,12 @@
@click="clickaddnew(item,index)">
<image class="card-icon" :src="
index === thirdmenuIndex
? (item.immediateFileFocus ? serverUrl + item.immediateFileFocus : noimageshow)
? (item.immediateFileFocus ? serverUrl + item.immediateFileFocus : noimageshowtarget)
: (item.immediateFile ? serverUrl + item.immediateFile : noimageshow)
" mode="aspectFill"></image>
<view class="card-text" style="margin-top: 0;"
:style="index === thirdmenuIndex?{color:`#0084ff`}:{}">
{{ item.title }}
{{ shortText(item.title,6) }}
</view>
</view>
</scroll-view>
@ -365,17 +381,21 @@
</view>
</view>
<view class="three-items" v-show="!ruleritem.directiveName && servertype"
style="flex-direction: column;">
style="flex-direction: column;margin-left: 25rpx;width: 91.8%;">
<scroll-view class="pack-title" scroll-with-animation :scroll-x="canmovechange">
<view class="pack-father">
<view class="packs" :style="packnumber==index?{color:`#0089FE`}:{}"
v-for="(item,index) in savePackagelist" :key="index"
@click="packclick(item,index)">
@touchstart="handleTouchStart(item,$event)" @click="packclick(item,index)">
<image class="pack-icon"
:src=" `/static/index/pack${packnumber==index?`target`:``}.png`"
mode="aspectFill">
</image>
{{ item.packageName }}
<view class="pack-text"
:style="item.packageName.length>6?{fontSize:`24rpx`}:{}">
{{ item.packageName }}
</view>
<view class="blue-heng" v-show="packnumber==index"></view>
</view>
</view>
</scroll-view>
@ -394,7 +414,7 @@
<view class="">
{{ splitString(item.directiveName)[0] }}
</view>
<view style="height: 3rpx;font-size: 20rpx;">
<view style="font-size: 20rpx;">
{{ splitString(item.directiveName)[1] ? `(${splitString(item.directiveName)[1]})`:``}}
</view>
</view>
@ -489,10 +509,10 @@
<view class="detail-father">
<view class="details" :style="packtargetindex==index?{color:`#0089FE`}:{}"
v-for="(item,index) in ruleritem?.directivesList"
@click="packtargetindex=index" :key="index">
@click="packtargetindex=index;killbaddata = true" :key="index">
<image class="detail-icon" :src="
index === packtargetindex
? (item.immediateFileFocus ? serverUrl + item.immediateFileFocus : noimageshow)
? (item.immediateFileFocus ? serverUrl + item.immediateFileFocus : noimageshowtarget)
: (item.immediateFile ? serverUrl + item.immediateFile : noimageshow)
" mode="aspectFill">
</image>
@ -762,22 +782,39 @@
type: Array,
required: true
},
howtomove: {
type: Array,
required: true
}
});
const canmovechange = ref(true)
watch(() => props.howtomove, (newVal : [number, number], oldVal : [number, number]) => {
if (oldVal[0] === 2) {
const nextX = notrelxy.value[0] + newVal[0]
if (nextX >= 0 && nextX <= 23) {
notrelxy.value[0] = nextX
}
const nextY = notrelxy.value[1] + newVal[1]
if (nextY >= 0 && nextY <= 11) {
notrelxy.value[1] = nextY
}
notrelcenter(notrelxy.value[0], notrelxy.value[1])
}
},
{ deep: true });
watch(() => props.canmove, (newVal, oldVal) => {
if (oldVal === false && newVal === true) {
console.log("结束")
isTuoing.value = false;
canmovechange.value = true;
if (props.isblue == 1) {
addinstantcommand()
} else if (props.isblue == 2) {
// console.log("", postitem.value,props.sendxy)
// console.log("",props.sendxy[0])
getNew()
}
else if (props.isblue == 3) {
// console.log("", postitem.value)
isDelete.value = true;
@ -787,7 +824,6 @@
}
});
const killruleclick = () => {
isDelete.value = false;
deleteDirective({ id: postitem.value.id }).then((res) => {
@ -804,6 +840,7 @@
}
const noimageshow = `/static/logo.png`;
const noimageshowtarget = `/static/logotarget.png`;
const clickrighttoclean = () => {
// console.log("")
openmore.value = false;
@ -925,31 +962,34 @@
}, 1000)
const enddelete = () => clearTimeout(t)
const addinstantcommand = () => {
const exists = bottomItems.value.some((element : any) => {
return element.directiveId === postitem.value.id
})
if (!postitem.value.packageName) {
const exists = bottomItems.value.some((element : any) => {
return element.directiveId === postitem.value.id
})
if (exists) {
errshow.value = "请勿添加相同的服务指令"
openerror.value = true
return // return
}
let allobject = postitem.value
let postdata = {
nuId: uni.getStorageSync('nuId'),
directiveId: allobject.id,
izPackage: `N`,
cycleTypeId: 2,
}
addDirective(postdata).then((res) => {
console.log("kankan", postdata, res)
if (res.success) {
geteverything()
setTimeout(() => {
playFirstPop()
}, 200)
if (exists) {
errshow.value = "请勿添加相同的服务指令"
openerror.value = true
return // return
}
})
let allobject = postitem.value
let postdata = {
nuId: uni.getStorageSync('nuId'),
directiveId: allobject.id,
izPackage: `N`,
cycleTypeId: 2,
}
addDirective(postdata).then((res) => {
console.log("kankan", postdata, res)
if (res.success) {
geteverything()
setTimeout(() => {
playFirstPop()
}, 200)
}
})
}
}
const moreindex = ref(-1)
const editingmode = ref(false);
@ -968,6 +1008,7 @@
const settingopen = ref(false);
const explainopen = ref(false);
const jishiopen = ref(false)
/* ---- transform ----
注意虽然这是响应式但我们只在 rAF 里更新它受控更新避免频繁触发 Vue 渲染 */
@ -1126,7 +1167,8 @@
openmore.value = true;
deleteshake.value = false
moreindex.value = -1;
secondinstantshow.value = [-1, -1]
secondinstantshow.value = [-1, -1];
jishiopen.value = false
}
//
const getNew = () => {
@ -1206,10 +1248,10 @@
// console.log("start",`${String(newHour)}:${pad2(newStartMin)}`,`${String(newEndHour)}:${pad2(newEndMin)}`,indexsave.value)
timearr.value[indexsave.value[0]].children[indexsave.value[1]].startTime =
`${String(newHour)}:${pad2(newStartMin)}`;
`${padZero(String(newHour))}:${pad2(newStartMin)}`;
timearr.value[indexsave.value[0]].children[indexsave.value[1]].endTime =
`${String(newEndHour)}:${pad2(newEndMin)}`;
`${padZero(String(newEndHour))}:${pad2(newEndMin)}`;
let infoValue = object
infoValue.positioning = indexsave.value[0];
@ -1224,7 +1266,7 @@
setTimeout(() => {
rulerTouchClick(timearr.value[indexsave.value[0]].children[indexsave.value[1]], indexsave.value[0], indexsave.value[1])
// whereEvent(indexsave.value);
}, 200)
}, 300)
})
}
//
@ -1382,13 +1424,13 @@
//
const getClass = (item, index0, index1) => {
if (item.startTime) {
if (props.targetrule[0] == index0 && props.targetrule[1] == index1 && isTuoing.value) {
if (Number(postitem.value.positioning) == index0 && Number(postitem.value.positioningLong) == index1 && isTuoing.value && !(postitem.levle||postitem.packageName)) {
return `title-time-border-own`
}
else if (props.targetrule[0] == index0 && props.targetrule[1] == index1 && isTuoing.value &&!(postitem.levle||postitem.packageName)) {
if (timearr.value[index0]?.children[index1]?.id) {
return `title-time-border-error`
}
} else if (Number(postitem.value.positioning) == index0 && Number(postitem.value.positioningLong) == index1 && isTuoing.value) {
return `title-time-border-own`
}
return 'title-time-border-hisOk';
@ -1571,7 +1613,7 @@
const packtargetindex = ref(0)
const rulerTouchClick = (item : any, index0 : number, index1 : number) => {
// isDelete.value = false;
killbaddata.value = true
saveEditIndex.value.index0 = index0;
saveEditIndex.value.index1 = index1;
centerCell();
@ -1737,6 +1779,7 @@
let cycleValue = "";
const startHour = Number(saveEditIndex.value.index0)
const startMinute = Number(timearr.value[saveEditIndex.value.index0]?.children[saveEditIndex.value.index1].tagName)
const endMinute = startMinute + Number(allobject.serviceDuration)
const endHour = startHour + Math.floor(endMinute / 60)
const formattedStart = `${String(startHour)}:${String(startMinute).padStart(2, '0')}`
@ -2096,7 +2139,7 @@
})
if (!element.url) {
element.url = [`/static/index/sharelogo.png`]
element.url = [`/static/logo.png`]
}
} else {
let array = []
@ -2106,7 +2149,7 @@
if (array.length) {
element.url = array
} else {
element.url = [`/static/index/sharelogo.png`]
element.url = [`/static/logo.png`]
}
}
element?.children.forEach((res1 : any) => {
@ -2117,7 +2160,7 @@
}
})
if (!res1.url) {
res1.url = [`/static/index/sharelogo.png`]
res1.url = [`/static/logo.png`]
}
// console.log("zzzz",res1)
} else {
@ -2128,7 +2171,7 @@
if (array.length) {
res1.url = array
} else {
res1.url = [`/static/index/sharelogo.png`]
res1.url = [`/static/logo.png`]
}
}
@ -2319,6 +2362,42 @@
scrollTop.value = Math.max(0, Math.min(scrollTop.value, totalHeight - visibleHeight)) / 2;
}
}
function notrelcenter(index0, index1) {
// (rpx)
const cellCenterX = (index0 + 0.5) * 259;
const cellCenterY = (index1 + 0.5) * 245;
// scrollLeft scrollTop使
cardLeft.value = cellCenterX - visibleWidth / 2;
scrollTop.value = cellCenterY - visibleHeight / 2;
//
const totalWidth = totalColumns * 259;
const totalHeight = totalRows * 245;
canmovechange.value = true;
// scrollLeft scrollTop
cardLeft.value = Math.max(0, Math.min(cardLeft.value, totalWidth - visibleWidth)) / 2;
// scrollTop.value = 0
scrollTop.value = Math.max(0, Math.min(scrollTop.value, totalHeight - visibleHeight)) / 2;
setTimeout(() => {
let reldata = []
const query = uni.createSelectorQuery()
query
.selectAll('.super-card-time-card')
.boundingClientRect((data : any) => {
data.forEach((res : any) => {
//
if (res.left > 88 && res.left < 723 && res.top < 622 && res.top > 32) {
reldata.push(res)
}
})
emit('rulepush', reldata)
})
.exec()
canmovechange.value = false;
}, 300)
}
const iszhiling = ref(false)
const zhilingbao = () => {
iszhiling.value = !iszhiling.value
@ -2408,6 +2487,7 @@
const isTuoing = ref(false);
//
const postitem = ref({});
const notrelxy = ref([0, 0])
const handleTouchStart1 = (item : any, e : any) => {
//
// console.log("", item)
@ -2422,6 +2502,7 @@
if (isScrolling.value) return
if (item.directiveName) {
if (killbaddata.value) return
let reldata = []
const query = uni.createSelectorQuery()
query
@ -2431,8 +2512,11 @@
//
if (res.left > 88 && res.left < 723 && res.top < 622 && res.top > 32) {
reldata.push(res)
// console.log("res",res.dataset.index0,res.dataset.index1)
}
})
// console.log("",reldata[12].dataset.index0,reldata[12].dataset.index1)
notrelxy.value = [reldata[12].dataset.index0, reldata[12].dataset.index1]
if (killbaddata.value) return
canmovechange.value = false;
isTuoing.value = true;
@ -2448,7 +2532,7 @@
}
const handleTouchStart = (item : any, e : any) => {
//
// console.log("",item)
if (!editingmode.value) return
// thirdmenuIndex.value = index
shakyTable.value = false
@ -2464,6 +2548,7 @@
isTuoing.value = true;
emit('handsend', item)
postitem.value = item
}, 800)
}
const isScrolling = ref(false)
@ -2508,6 +2593,7 @@
const lastClick = ref(0)
let singleTimer = null
const clickaddnew = (item, index) => {
isTuoing.value = false
killbaddata.value = true
thirdmenuIndex.value = index
const now = Date.now()
@ -2568,7 +2654,7 @@
const startMinute = Number(timearr.value[saveEditIndex.value.index0].children[saveEditIndex.value.index1].tagName)
const endMinute = startMinute + Number(allobject.serviceDuration)
const endHour = startHour + Math.floor(endMinute / 60)
const formattedStart = `${String(startHour)}:${String(startMinute).padStart(2, '0')}`
const formattedStart = `${padZero(String(startHour))}:${String(startMinute).padStart(2, '0')}`
const formattedEnd = `${String(endHour)}:${String(endMinute % 60).padStart(2, '0')}`
//
let param = {
@ -2627,6 +2713,7 @@
izPackage: servertype.value ? `Y` : `N`,
cycleTypeId: 1,
}
console.log("看看开始时间", formattedStart)
if (cardvalue.directiveId) {
postdata.id = cardvalue.id,
editDirective(postdata).then((res) => {
@ -2635,7 +2722,7 @@
geteverything()
setTimeout(() => {
rulerTouchClick(timearr.value[saveEditIndex.value.index0].children[saveEditIndex.value.index1], saveEditIndex.value.index0, saveEditIndex.value.index1)
}, 200)
}, 300)
}
})
} else {
@ -2645,7 +2732,7 @@
geteverything()
setTimeout(() => {
rulerTouchClick(timearr.value[saveEditIndex.value.index0].children[saveEditIndex.value.index1], saveEditIndex.value.index0, saveEditIndex.value.index1)
}, 200)
}, 300)
}
})
@ -2676,6 +2763,8 @@
}
const packnumber = ref(0)
const packclick = (item, index) => {
isTuoing.value = false
killbaddata.value = true
packnumber.value = index;
const now = Date.now()
if (now - lastClick.value < dblDelay) {
@ -2700,6 +2789,12 @@
}
lastClick.value = now
}
function shortText(str : string, number : number) {
return str.length > number ? str.slice(0, number) + '.' : str
}
function padZero(str : string) {
return str.length === 1 ? '0' + str : str
}
</script>
<style lang="less" scoped>

View File

@ -1,6 +1,5 @@
<template>
<view class="backgroundContainer" @touchmove.stop="getxy" @touchend.stop="cleanall">
<!-- 手指拖动 -->
<view class="box" :style="boxStyle" v-if="!whoisit">
<view class="title-time-blue">
@ -8,7 +7,7 @@
</view>
<image class="card-icon" :src="movelook.url" mode="aspectFill"></image>
<view class="card-text" style="margin-top: 0;">
<view class="card-text" style="margin-top: 0;" :style="movelook.title.length>6?{fontSize:`24rpx`}:{}">
{{ movelook.title }}
</view>
@ -41,7 +40,7 @@
</view>
</view>
</view>
<view class="delete-view" :style="isblue==`3`?{backgroundColor:`#0080FC`}:{}" v-if="!startmoveit&&whoisit">
<view class="delete-view" :style="isblue==`3`?{backgroundColor: `rgba(222, 227, 240, 0.8)`}:{}" v-if="!startmoveit&&whoisit">
<image class="delete-img" src="/static/index/trash.png" />
</view>
<!-- 左侧菜单 -->
@ -54,7 +53,7 @@
<bignurse :isshow="menuIndex==0"
v-if="swipedex==0&&specialPage==1&&uni.getStorageSync('elderId')&&uni.getStorageSync('nuId')" />
<!-- 户嘱页 -->
<newnurse :isshow="menuIndex==1" v-if="swipedex==1" :canmove="startmoveit" :sendxy="targetrule" :isblue='isblue'
<newnurse :isshow="menuIndex==1" v-if="swipedex==1" :canmove="startmoveit" :sendxy="targetrule" :isblue='isblue' :howtomove="howtomove"
:targetrule="targetrule" @handsend="handsend" @rulepush="rulepush" />
<!-- 医嘱 -->
<doctorask v-if="swipedex==2&&uni.getStorageSync('elderId')&&uni.getStorageSync('nuId')" />
@ -363,13 +362,14 @@
boxStyle.value = {
transform: `translate3d(${nx - 100}px, ${ny - 70}px, 0)`
};
}
}
const movelook = ref({
url: "",
title: ""
title: "",
type:0
})
const startmoveit = ref(true)
const whoisit = ref(0);
@ -382,6 +382,7 @@
function handsend(look : any) {
isblue.value = 0;
console.log("look",look)
if (look.levle) {
whoisit.value = 0;
movelook.value.url = uni.getStorageSync('imagebase') + look.immediateFileFocus;
@ -389,8 +390,17 @@
movelook.value.url = `/static/index/sharelogo.png`
}
movelook.value.title = look.title;
movelook.value.type = 0;
startmoveit.value = false
} else {
} else if(look.packageName){
whoisit.value = 0;
movelook.value.url = `/static/index/packtarget.png`
movelook.value.title = look.packageName;
movelook.value.type = 1;
startmoveit.value = false
}
else {
whoisit.value = 1;
simpleobj.value.startTime = look.startTime;
simpleobj.value.endTime = look.endTime;
@ -425,6 +435,7 @@
const isblue = ref(0)
const getxyrel = (event) => {
event.preventDefault()
// console.log("////",)
if (!startmoveit.value) {
const touch = event.touches[0];
const a = touch.clientX.toFixed(2);
@ -433,6 +444,9 @@
isblue.value = inArea(a, b)
// console.log(a, b)
handmove([a, b])
if (whoisit.value) {
detectorMove(a, b); // handmove([a,b])
}
}
}
const rules = ref([])
@ -453,10 +467,10 @@
}
} else {
// console.log("000",x)
if(x>1000){
if (x > 1000) {
return 3
}
for (let i = rules.value.length - 1; i >= 0; i--) {
const it = rules.value[i]
if (x >= it.left && x <= it.right && y >= it.top && y <= it.bottom) {
@ -481,10 +495,9 @@
}
const getxy = throttle(getxyrel, 40);
const cleanall = (event) => {
// const touch = event.changedTouches[0];
// const a = touch.clientX.toFixed(2);
// const b = touch.clientY.toFixed(2);
// sendxy.value = [a, b]
if (whoisit.value) {
detectorEnd(); // handmove([a,b])
}
handmove([-200, -200])
startmoveit.value = true;
// isblue.value = 0
@ -517,6 +530,80 @@
}
return result;
}
// ---------- ----------
const HOLD_MS = 350; // 0.5s
const RESET_MS = 100; // 0.1s
// [-1/0/1, -1/0/1]x, y
function getDir(x, y) {
const dx = (x <= 150 ? -1 : (x >= 710 && x < 825? 1 : 0));
const dy = (y <= 80 ? -1 : (y >= 550 ? 1 : 0));
return [dx, dy];
}
const howtomove = ref([2,2])
// ---------- ----------
let windowTimer = null; // 500ms id
let windowStartDir = null; // [dx,dy]
let windowValid = false; //
let inCooldown = false; // 0.1s
// setState
function onDetected(arr) {
howtomove.value = arr
// console.log('DETECT ->', arr); // [1,1] [-1,-1] [2,2]
// arr ref /
}
//
function finishWindow() {
windowTimer = null;
// [0,0]
if (windowValid && windowStartDir && (windowStartDir[0] !== 0 || windowStartDir[1] !== 0)) {
onDetected(windowStartDir.slice()); //
inCooldown = true;
// 0.1s [2,2] cooldown
setTimeout(() => {
onDetected([2, 2]);
inCooldown = false;
}, RESET_MS);
}
// move
windowStartDir = null;
windowValid = false;
}
// touchmove/getxyrel x,y
function detectorMove(x, y) {
if (inCooldown) return; //
const dir = getDir(x, y); // [dx,dy]
if (!windowTimer) {
//
windowStartDir = dir.slice ? dir.slice() : [dir[0], dir[1]];
windowValid = true;
windowTimer = setTimeout(finishWindow, HOLD_MS);
return;
}
//
if (dir[0] !== windowStartDir[0] || dir[1] !== windowStartDir[1]) {
windowValid = false;
}
}
// touchend / touchcancel
function detectorEnd() {
if (windowTimer) {
clearTimeout(windowTimer);
windowTimer = null;
}
windowStartDir = null;
windowValid = false;
inCooldown = false;
}
</script>
<style lang="less" scoped>
@ -526,7 +613,7 @@
width: 100vw;
height: 100vh;
overflow: hidden;
z-index: 99;
z-index: 9999;
background-color: #f4f4f4;
}
@ -683,16 +770,18 @@
}
}
.delete-view{
.delete-view {
position: fixed;
right: -950rpx;
top: 3%;
width: 1100rpx;
height: 1100rpx;
border-radius: 50%;
background-color: rgba(228, 230, 236, 0.8);
background-color: rgba(238, 240, 248, 0.4);
z-index: 200;
.delete-img{
.delete-img {
position: absolute;
top: 50%;
transform: translateY(-50%);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 788 B

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 729 B

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
static/logotarget.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -7,8 +7,8 @@
"id": "__UNI__FB2D473",
"name": "护理单元",
"version": {
"name": "1.0.027",
"code": 10027
"name": "1.0.029",
"code": 10029
},
"description": "护理单元",
"developer": {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
{"@platforms":["android","iPhone","iPad"],"id":"__UNI__FB2D473","name":"护理单元","version":{"name":"1.0.027","code":10027},"description":"护理单元","developer":{"name":"","email":"","url":""},"permissions":{"Share":{},"VideoPlayer":{},"Camera":{},"UniNView":{"description":"UniNView原生渲染"}},"plus":{"useragent":{"value":"uni-app","concatenate":true},"splashscreen":{"target":"id:1","autoclose":true,"waiting":true,"delay":0},"popGesture":"close","launchwebview":{"render":"always","id":"1","kernel":"WKWebview"},"usingComponents":true,"nvueStyleCompiler":"uni-app","compilerVersion":3,"nativePlugins":{"MonitorModule":{"__plugin_info__":{"name":"MonitorModule","description":"bugly升级","platforms":"Android","url":"","android_package_name":"","ios_bundle_id":"","isCloud":false,"bought":-1,"pid":"","parameters":{}}}},"statusbar":{"immersed":"supportedDevice","style":"dark","background":"#000000"},"uniStatistics":{"enable":false},"allowsInlineMediaPlayback":true,"uni-app":{"control":"uni-v3","vueVersion":"3","compilerVersion":"4.76","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"normal","webView":{"minUserAgentVersion":"49.0"}}},"app-harmony":{"useragent":{"value":"uni-app","concatenate":true},"uniStatistics":{"enable":false}},"screenOrientation":["landscape-primary","landscape-secondary"],"launch_path":"__uniappview.html"}
{"@platforms":["android","iPhone","iPad"],"id":"__UNI__FB2D473","name":"护理单元","version":{"name":"1.0.029","code":10029},"description":"护理单元","developer":{"name":"","email":"","url":""},"permissions":{"Share":{},"VideoPlayer":{},"Camera":{},"UniNView":{"description":"UniNView原生渲染"}},"plus":{"useragent":{"value":"uni-app","concatenate":true},"splashscreen":{"target":"id:1","autoclose":true,"waiting":true,"delay":0},"popGesture":"close","launchwebview":{"render":"always","id":"1","kernel":"WKWebview"},"usingComponents":true,"nvueStyleCompiler":"uni-app","compilerVersion":3,"nativePlugins":{"MonitorModule":{"__plugin_info__":{"name":"MonitorModule","description":"bugly升级","platforms":"Android","url":"","android_package_name":"","ios_bundle_id":"","isCloud":false,"bought":-1,"pid":"","parameters":{}}}},"statusbar":{"immersed":"supportedDevice","style":"dark","background":"#000000"},"uniStatistics":{"enable":false},"allowsInlineMediaPlayback":true,"uni-app":{"control":"uni-v3","vueVersion":"3","compilerVersion":"4.76","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"normal","webView":{"minUserAgentVersion":"49.0"}}},"app-harmony":{"useragent":{"value":"uni-app","concatenate":true},"uniStatistics":{"enable":false}},"screenOrientation":["landscape-primary","landscape-secondary"],"launch_path":"__uniappview.html"}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB