合并代码

This commit is contained in:
Teng 2026-01-30 17:24:22 +08:00
parent 061528a711
commit 0330adf9e4
26 changed files with 374 additions and 115 deletions

View File

@ -2,8 +2,8 @@
"name" : "护理单元", "name" : "护理单元",
"appid" : "__UNI__FB2D473", "appid" : "__UNI__FB2D473",
"description" : "护理单元", "description" : "护理单元",
"versionName" : "1.0.027", "versionName" : "1.0.029",
"versionCode" : 10027, "versionCode" : 10029,
"transformPx" : false, "transformPx" : false,
/* 5+App */ /* 5+App */
"app-plus" : { "app-plus" : {

View File

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

View File

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

View File

@ -1,6 +1,5 @@
<template> <template>
<view class="backgroundContainer" @touchmove.stop="getxy" @touchend.stop="cleanall"> <view class="backgroundContainer" @touchmove.stop="getxy" @touchend.stop="cleanall">
<!-- 手指拖动 --> <!-- 手指拖动 -->
<view class="box" :style="boxStyle" v-if="!whoisit"> <view class="box" :style="boxStyle" v-if="!whoisit">
<view class="title-time-blue"> <view class="title-time-blue">
@ -8,7 +7,7 @@
</view> </view>
<image class="card-icon" :src="movelook.url" mode="aspectFill"></image> <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 }} {{ movelook.title }}
</view> </view>
@ -41,7 +40,7 @@
</view> </view>
</view> </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" /> <image class="delete-img" src="/static/index/trash.png" />
</view> </view>
<!-- 左侧菜单 --> <!-- 左侧菜单 -->
@ -54,7 +53,7 @@
<bignurse :isshow="menuIndex==0" <bignurse :isshow="menuIndex==0"
v-if="swipedex==0&&specialPage==1&&uni.getStorageSync('elderId')&&uni.getStorageSync('nuId')" /> 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" /> :targetrule="targetrule" @handsend="handsend" @rulepush="rulepush" />
<!-- 医嘱 --> <!-- 医嘱 -->
<doctorask v-if="swipedex==2&&uni.getStorageSync('elderId')&&uni.getStorageSync('nuId')" /> <doctorask v-if="swipedex==2&&uni.getStorageSync('elderId')&&uni.getStorageSync('nuId')" />
@ -369,7 +368,8 @@
} }
const movelook = ref({ const movelook = ref({
url: "", url: "",
title: "" title: "",
type:0
}) })
const startmoveit = ref(true) const startmoveit = ref(true)
const whoisit = ref(0); const whoisit = ref(0);
@ -382,6 +382,7 @@
function handsend(look : any) { function handsend(look : any) {
isblue.value = 0; isblue.value = 0;
console.log("look",look)
if (look.levle) { if (look.levle) {
whoisit.value = 0; whoisit.value = 0;
movelook.value.url = uni.getStorageSync('imagebase') + look.immediateFileFocus; movelook.value.url = uni.getStorageSync('imagebase') + look.immediateFileFocus;
@ -389,8 +390,17 @@
movelook.value.url = `/static/index/sharelogo.png` movelook.value.url = `/static/index/sharelogo.png`
} }
movelook.value.title = look.title; movelook.value.title = look.title;
movelook.value.type = 0;
startmoveit.value = false 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; whoisit.value = 1;
simpleobj.value.startTime = look.startTime; simpleobj.value.startTime = look.startTime;
simpleobj.value.endTime = look.endTime; simpleobj.value.endTime = look.endTime;
@ -425,6 +435,7 @@
const isblue = ref(0) const isblue = ref(0)
const getxyrel = (event) => { const getxyrel = (event) => {
event.preventDefault() event.preventDefault()
// console.log("////",)
if (!startmoveit.value) { if (!startmoveit.value) {
const touch = event.touches[0]; const touch = event.touches[0];
const a = touch.clientX.toFixed(2); const a = touch.clientX.toFixed(2);
@ -433,6 +444,9 @@
isblue.value = inArea(a, b) isblue.value = inArea(a, b)
// console.log(a, b) // console.log(a, b)
handmove([a, b]) handmove([a, b])
if (whoisit.value) {
detectorMove(a, b); // handmove([a,b])
}
} }
} }
const rules = ref([]) const rules = ref([])
@ -453,7 +467,7 @@
} }
} else { } else {
// console.log("000",x) // console.log("000",x)
if(x>1000){ if (x > 1000) {
return 3 return 3
} }
@ -481,10 +495,9 @@
} }
const getxy = throttle(getxyrel, 40); const getxy = throttle(getxyrel, 40);
const cleanall = (event) => { const cleanall = (event) => {
// const touch = event.changedTouches[0]; if (whoisit.value) {
// const a = touch.clientX.toFixed(2); detectorEnd(); // handmove([a,b])
// const b = touch.clientY.toFixed(2); }
// sendxy.value = [a, b]
handmove([-200, -200]) handmove([-200, -200])
startmoveit.value = true; startmoveit.value = true;
// isblue.value = 0 // isblue.value = 0
@ -517,6 +530,80 @@
} }
return result; 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> </script>
<style lang="less" scoped> <style lang="less" scoped>
@ -526,7 +613,7 @@
width: 100vw; width: 100vw;
height: 100vh; height: 100vh;
overflow: hidden; overflow: hidden;
z-index: 99; z-index: 9999;
background-color: #f4f4f4; background-color: #f4f4f4;
} }
@ -683,16 +770,18 @@
} }
} }
.delete-view{
.delete-view {
position: fixed; position: fixed;
right: -950rpx; right: -950rpx;
top: 3%; top: 3%;
width: 1100rpx; width: 1100rpx;
height: 1100rpx; height: 1100rpx;
border-radius: 50%; border-radius: 50%;
background-color: rgba(228, 230, 236, 0.8); background-color: rgba(238, 240, 248, 0.4);
z-index: 200; z-index: 200;
.delete-img{
.delete-img {
position: absolute; position: absolute;
top: 50%; top: 50%;
transform: translateY(-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", "id": "__UNI__FB2D473",
"name": "护理单元", "name": "护理单元",
"version": { "version": {
"name": "1.0.027", "name": "1.0.029",
"code": 10027 "code": 10029
}, },
"description": "护理单元", "description": "护理单元",
"developer": { "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