1051 lines
39 KiB
JavaScript
1051 lines
39 KiB
JavaScript
"use strict";
|
||
const common_vendor = require("../../common/vendor.js");
|
||
const common_assets = require("../../common/assets.js");
|
||
const component_rightItemssecondrelnew_yaoshandiao = require("./yaoshandiao.js");
|
||
if (!Math) {
|
||
joystick();
|
||
}
|
||
const joystick = () => "../public/newgame/joysticknew.js";
|
||
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
||
__name: "index",
|
||
props: {
|
||
isshow: {
|
||
type: Boolean,
|
||
required: true
|
||
},
|
||
darkFans: {
|
||
type: Boolean,
|
||
required: true
|
||
},
|
||
canmove: {
|
||
type: Boolean,
|
||
required: true
|
||
},
|
||
liang: {
|
||
type: Object
|
||
},
|
||
isold: {
|
||
type: Boolean,
|
||
required: true
|
||
}
|
||
},
|
||
emits: ["darkchange", "savename", "saveruler", "closename", "changefangkuang", "changeold"],
|
||
setup(__props, { expose: __expose, emit: __emit }) {
|
||
const props = __props;
|
||
common_vendor.watch(
|
||
() => props.isold,
|
||
() => {
|
||
if (props.isold) {
|
||
saveEditIndex.value.index0 = saveleft.value;
|
||
saveEditIndex.value.index1 = 0;
|
||
cardLeft.value = 1;
|
||
scrollTop.value = 1;
|
||
common_vendor.nextTick$1(() => {
|
||
scrollTop.value = 0;
|
||
cardLeft.value = saveleft.value * 117;
|
||
});
|
||
}
|
||
}
|
||
);
|
||
common_vendor.watch(
|
||
() => props.canmove,
|
||
() => {
|
||
bottomisShaking.value = false;
|
||
}
|
||
);
|
||
common_vendor.watch(
|
||
() => props.isshow,
|
||
() => {
|
||
bottomisShaking.value = false;
|
||
shakyTable.value = false;
|
||
cardLeft.value = 1;
|
||
common_vendor.nextTick$1(() => {
|
||
cardLeft.value = 702;
|
||
});
|
||
}
|
||
);
|
||
const bottomItems = common_vendor.ref([
|
||
{
|
||
name: "纸尿裤",
|
||
url: "/static/index/niao.png",
|
||
target: "#fff",
|
||
id: -1
|
||
},
|
||
{
|
||
name: "呕吐",
|
||
url: "/static/index/tu.png",
|
||
target: "#fff",
|
||
id: -1
|
||
},
|
||
{
|
||
name: "吸痰",
|
||
url: "/static/index/ou.png",
|
||
target: "#fff",
|
||
id: -1
|
||
},
|
||
{
|
||
name: "大便",
|
||
url: "/static/index/baba.png",
|
||
target: "#fff",
|
||
id: -1
|
||
},
|
||
{
|
||
name: "纸尿裤",
|
||
url: "/static/index/niao.png",
|
||
target: "#fff",
|
||
id: -1
|
||
},
|
||
{
|
||
name: "呕吐",
|
||
url: "/static/index/tu.png",
|
||
target: "#fff",
|
||
id: -1
|
||
},
|
||
{
|
||
name: "吸痰",
|
||
url: "/static/index/ou.png",
|
||
target: "#fff",
|
||
id: -1
|
||
},
|
||
{
|
||
name: "大便",
|
||
url: "/static/index/baba.png",
|
||
target: "#fff",
|
||
id: -1
|
||
}
|
||
]);
|
||
const nameArray = [
|
||
`狂躁`,
|
||
`正常`,
|
||
`大体重`,
|
||
`口腔`,
|
||
`小体重`,
|
||
`头部`,
|
||
`面部`,
|
||
`躯干`,
|
||
`四肢`,
|
||
`修甲`,
|
||
`颅骨缺损`
|
||
];
|
||
const weekDays = ["周一", "周二", "周三", "周四", "周五", "周六", "周日"];
|
||
const days = Array.from({ length: 31 }, (_, i) => (i + 1).toString().padStart(2, "0"));
|
||
const isweek = common_vendor.ref(true);
|
||
const iszhouqi = common_vendor.ref(false);
|
||
const firsttop = common_vendor.ref(0);
|
||
const secondtop = common_vendor.ref(0);
|
||
const scrollLeft = common_vendor.ref(0);
|
||
const cardLeft = common_vendor.ref(678);
|
||
const scrollTop = common_vendor.ref(0);
|
||
const downList = common_vendor.ref();
|
||
common_vendor.ref([
|
||
// "三分段",
|
||
// "四分段",
|
||
]);
|
||
const isop = common_vendor.ref(false);
|
||
const bigArray = common_vendor.ref([]);
|
||
const isopen = common_vendor.ref(false);
|
||
common_vendor.ref(false);
|
||
const isopacity = common_vendor.ref(false);
|
||
common_vendor.ref(false);
|
||
common_vendor.ref(false);
|
||
common_vendor.ref("");
|
||
common_vendor.ref(false);
|
||
const sayisopen = common_vendor.ref(false);
|
||
common_vendor.ref("");
|
||
const sayisopacity = common_vendor.ref(false);
|
||
common_vendor.ref(0);
|
||
common_vendor.ref(0);
|
||
const saveleft = common_vendor.ref(6);
|
||
const saveright = common_vendor.ref(11);
|
||
const savetop = common_vendor.ref(0);
|
||
const savebottom = common_vendor.ref(3);
|
||
const isMove = common_vendor.ref(false);
|
||
const getNew = () => {
|
||
let object = JSON.parse(JSON.stringify(timearr.value[flyNumber.value.index0].children[flyNumber.value.index1]));
|
||
indexsave.value = [saveEditIndex.value.index0, saveEditIndex.value.index1];
|
||
let typeName = timearr.value[flyNumber.value.index0].children[flyNumber.value.index1].typeName;
|
||
timearr.value[flyNumber.value.index0].children[flyNumber.value.index1] = { directiveName: "", typeName };
|
||
let newtypeName = timearr.value[indexsave.value[0]].children[indexsave.value[1]].typeName;
|
||
timearr.value[indexsave.value[0]].children[indexsave.value[1]] = object;
|
||
timearr.value[indexsave.value[0]].children[indexsave.value[1]].typeName = newtypeName;
|
||
let startTime = timearr.value[indexsave.value[0]].children[indexsave.value[1]].startTime;
|
||
let endTime = timearr.value[indexsave.value[0]].children[indexsave.value[1]].endTime;
|
||
let positioning = timearr.value[indexsave.value[0]].positioning;
|
||
const rest = startTime.split(":")[1];
|
||
const rest0 = endTime.split(":")[1];
|
||
let many = Number(rest0) - Number(rest);
|
||
let start = newtypeName;
|
||
let end = Number(start) + many;
|
||
timearr.value[indexsave.value[0]].children[indexsave.value[1]].startTime = positioning + ":" + start.padStart(2, "0");
|
||
timearr.value[indexsave.value[0]].children[indexsave.value[1]].endTime = positioning + ":" + String(end % 60).padStart(2, "0");
|
||
flyNumber.value.index0 = -1;
|
||
flyNumber.value.index1 = -1;
|
||
isMove.value = false;
|
||
let data = {
|
||
index0: saveEditIndex.value.index0,
|
||
index1: saveEditIndex.value.index1
|
||
};
|
||
whereEvent(data);
|
||
};
|
||
const changLeft = (index2) => {
|
||
if (index2 === 5) {
|
||
return;
|
||
}
|
||
iszhouqi.value = false;
|
||
weekIndex.value = -1;
|
||
monthIndex.value = -1;
|
||
weekValue.value = "";
|
||
monthValue.value = "";
|
||
secondtop.value = 1;
|
||
firsttop.value = 1;
|
||
common_vendor.nextTick$1(() => {
|
||
secondtop.value = 0;
|
||
firsttop.value = 0;
|
||
});
|
||
upmenuIndex.value = index2;
|
||
downList.value = bigArray.value[index2].children;
|
||
downmenuIndex.value = 0;
|
||
thirdmenuIndex.value = 0;
|
||
};
|
||
const changecard = () => {
|
||
isDelete.value = false;
|
||
if (isMove.value) {
|
||
getNew();
|
||
} else {
|
||
if (timearr.value[saveEditIndex.value.index0].children[saveEditIndex.value.index1].directiveName) {
|
||
flyNumber.value.index0 = saveEditIndex.value.index0;
|
||
flyNumber.value.index1 = saveEditIndex.value.index1;
|
||
isMove.value = true;
|
||
}
|
||
}
|
||
};
|
||
common_vendor.ref(true);
|
||
common_vendor.ref(false);
|
||
const movecard = (where) => {
|
||
isDelete.value = false;
|
||
if (saveleft.value * 117 - leftIn.value > 5 || leftIn.value - saveleft.value * 117 > 0) {
|
||
cardLeft.value = 1;
|
||
common_vendor.nextTick$1(() => {
|
||
cardLeft.value = saveleft.value * 117;
|
||
});
|
||
}
|
||
if (savetop.value * 104.5 - topIn.value > 5 || topIn.value - savetop.value * 104.5 > 0) {
|
||
scrollTop.value = 1;
|
||
common_vendor.nextTick$1(() => {
|
||
scrollTop.value = savetop.value * 104.5;
|
||
});
|
||
}
|
||
switch (where) {
|
||
case 0:
|
||
if (saveEditIndex.value.index1) {
|
||
saveEditIndex.value.index1--;
|
||
}
|
||
if (saveEditIndex.value.index1 < savetop.value) {
|
||
savetop.value = saveEditIndex.value.index1;
|
||
savebottom.value = saveEditIndex.value.index1 + 3;
|
||
scrollTop.value = saveEditIndex.value.index1 * 104.5;
|
||
}
|
||
break;
|
||
case 1:
|
||
if (saveEditIndex.value.index0 == 23) {
|
||
return;
|
||
}
|
||
saveEditIndex.value.index0++;
|
||
if (saveEditIndex.value.index0 > saveright.value) {
|
||
saveleft.value = saveEditIndex.value.index0 - 5;
|
||
saveright.value = saveEditIndex.value.index0;
|
||
cardLeft.value = saveleft.value * 117;
|
||
}
|
||
break;
|
||
case 2:
|
||
if (saveEditIndex.value.index1 == 11) {
|
||
return;
|
||
}
|
||
saveEditIndex.value.index1++;
|
||
if (saveEditIndex.value.index1 > savebottom.value) {
|
||
savetop.value = saveEditIndex.value.index1 - 3;
|
||
savebottom.value = saveEditIndex.value.index1;
|
||
scrollTop.value = savetop.value * 104.5;
|
||
}
|
||
break;
|
||
case 3:
|
||
if (saveEditIndex.value.index0 == 0) {
|
||
return;
|
||
}
|
||
saveEditIndex.value.index0--;
|
||
if (saveEditIndex.value.index0 < saveleft.value) {
|
||
saveleft.value = saveEditIndex.value.index0;
|
||
saveright.value = saveEditIndex.value.index0 + 5;
|
||
cardLeft.value = saveleft.value * 117;
|
||
}
|
||
break;
|
||
}
|
||
};
|
||
const weekValue = common_vendor.ref("");
|
||
const weekIndex = common_vendor.ref(-1);
|
||
const monthValue = common_vendor.ref("");
|
||
const monthIndex = common_vendor.ref(-1);
|
||
const clickWeek = (item, index2) => {
|
||
weekValue.value = item;
|
||
weekIndex.value = index2;
|
||
};
|
||
const clickMonth = (item, index2) => {
|
||
monthValue.value = item;
|
||
monthIndex.value = index2;
|
||
};
|
||
const isDelete = common_vendor.ref(false);
|
||
const openDelete = () => {
|
||
if (timearr.value[saveEditIndex.value.index0].children[saveEditIndex.value.index1].directiveName) {
|
||
if (!isDelete.value) {
|
||
isDelete.value = true;
|
||
} else {
|
||
isDelete.value = false;
|
||
deleteRuler(saveEditIndex.value.index0, saveEditIndex.value.index1);
|
||
}
|
||
}
|
||
};
|
||
common_vendor.ref(false);
|
||
function pseudoRandom(index0, index1) {
|
||
const seed = index0 * 55.9898 + index1 * 78.233;
|
||
return Math.abs(Math.sin(seed) * 43758.5453) % 1;
|
||
}
|
||
function computeDelay(index0, index1) {
|
||
const range = 2;
|
||
return pseudoRandom(index0, index1) * range;
|
||
}
|
||
common_vendor.ref(0);
|
||
const topIn = common_vendor.ref(0);
|
||
const moveDownNumber = common_vendor.ref(0);
|
||
function handleScrolltime(e) {
|
||
let num = e.detail.scrollTop;
|
||
topIn.value = e.detail.scrollTop;
|
||
let formattedNum = parseFloat(num.toFixed(2));
|
||
moveDownNumber.value = formattedNum;
|
||
}
|
||
const leftIn = common_vendor.ref(0);
|
||
function handleTop(e) {
|
||
leftIn.value = e.detail.scrollLeft;
|
||
}
|
||
common_vendor.ref(true);
|
||
const getClass = (item, index0, index1) => {
|
||
if (item.cycleType === "日常") {
|
||
if (flyNumber.value.index0 === index0 && flyNumber.value.index1 === index1) {
|
||
return "title-time-border-yellow-active-transparent";
|
||
} else if (shakyTable.value) {
|
||
return "title-time-border-yellow-active";
|
||
} else {
|
||
return "title-time-border-yellow";
|
||
}
|
||
} else if (item.cycleType) {
|
||
if (flyNumber.value.index0 === index0 && flyNumber.value.index1 === index1) {
|
||
return "title-time-border-pouple-active-transparent";
|
||
} else if (shakyTable.value) {
|
||
return "title-time-border-pouple-active";
|
||
} else {
|
||
return "title-time-border-pouple";
|
||
}
|
||
}
|
||
return "title-time-border";
|
||
};
|
||
const doctorsayList = common_vendor.ref([
|
||
{ url: "/static/index/firstTags/30.png", targetUrl: "/static/index/firstTags/21.png", name: "日常" },
|
||
{ url: "/static/index/firstTags/10.png", targetUrl: "/static/index/firstTags/99.png", name: "清洁" },
|
||
{ url: "/static/index/firstTags/40.png", targetUrl: "/static/index/firstTags/31.png", name: "饮食" },
|
||
{ url: "/static/index/firstTags/00.png", targetUrl: "/static/index/firstTags/01.png", name: "睡眠" },
|
||
{ url: "/static/index/firstTags/20.png", targetUrl: "/static/index/firstTags/11.png", name: "排泻" },
|
||
{ url: "/static/index/firstTags/50.png", targetUrl: "/static/index/firstTags/41.png", name: "影像" }
|
||
]);
|
||
const upmenuIndex = common_vendor.ref(0);
|
||
const downmenuIndex = common_vendor.ref(0);
|
||
const thirdmenuIndex = common_vendor.ref(0);
|
||
common_vendor.ref(false);
|
||
common_vendor.ref([]);
|
||
const emit = __emit;
|
||
common_vendor.ref(false);
|
||
const saveEditIndex = common_vendor.ref({
|
||
index0: -1,
|
||
index1: -1
|
||
});
|
||
common_vendor.ref(0);
|
||
common_vendor.ref([]);
|
||
const secondContant = (index2) => {
|
||
iszhouqi.value = false;
|
||
weekIndex.value = -1;
|
||
monthIndex.value = -1;
|
||
weekValue.value = "";
|
||
monthValue.value = "";
|
||
downmenuIndex.value = index2;
|
||
thirdmenuIndex.value = 0;
|
||
firsttop.value = 1;
|
||
common_vendor.nextTick$1(() => {
|
||
firsttop.value = 0;
|
||
});
|
||
};
|
||
const newchange = (type) => {
|
||
emit("changeold", type);
|
||
};
|
||
const timer = common_vendor.ref(null);
|
||
common_vendor.ref({});
|
||
const moveX = common_vendor.ref(0);
|
||
const moveY = common_vendor.ref(0);
|
||
const openX = common_vendor.ref(0);
|
||
const openY = common_vendor.ref(0);
|
||
const flyNumber = common_vendor.ref({
|
||
index0: 999,
|
||
index1: 999,
|
||
typeName: ""
|
||
});
|
||
common_vendor.ref(-1);
|
||
common_vendor.ref(false);
|
||
const deletedownisopacity = common_vendor.ref(false);
|
||
const touchindex1 = common_vendor.ref(-1);
|
||
const shareShow = common_vendor.ref(false);
|
||
const shareToWeixin = () => {
|
||
shareShow.value = true;
|
||
deletedownisopacity.value = false;
|
||
setTimeout(() => {
|
||
deletedownisopacity.value = true;
|
||
}, 100);
|
||
};
|
||
const clickshare = () => {
|
||
common_vendor.index.share({
|
||
provider: "weixin",
|
||
scene: "WXSceneSession",
|
||
type: 0,
|
||
href: "http://192.168.2.31:3101/daytoday",
|
||
title: "护理日程分享",
|
||
summary: "九泰护理日程测试",
|
||
imageUrl: "https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/uni@2x.png",
|
||
success: function(res) {
|
||
common_vendor.index.__f__("log", "at component/rightItemssecondrelnew/index.vue:1232", "success:");
|
||
},
|
||
fail: function(err) {
|
||
common_vendor.index.__f__("log", "at component/rightItemssecondrelnew/index.vue:1235", "fail:");
|
||
}
|
||
});
|
||
};
|
||
const rulerTouchClick = (item, index0, index1, e) => {
|
||
if (item.directiveName) {
|
||
touchindex1.value = index1;
|
||
const query = common_vendor.index.createSelectorQuery();
|
||
query.selectAll(".super-card-time-card").boundingClientRect((data) => {
|
||
data.forEach(async (res) => {
|
||
if (res.left > 100 && res.left < 1067 && res.top < 570 && res.top > 140 && res.dataset.index0 == index0 && res.dataset.index1 == index1) {
|
||
if (res.left > 100 && res.left < 500) {
|
||
openX.value = Math.floor(res.left) + 520;
|
||
} else {
|
||
openX.value = Math.floor(res.left);
|
||
}
|
||
if (res.top > 140 && res.top < 300) {
|
||
openY.value = Math.floor(res.top) + 250;
|
||
} else {
|
||
openY.value = Math.floor(res.top);
|
||
}
|
||
await common_vendor.nextTick$1();
|
||
isopen.value = true;
|
||
isopacity.value = false;
|
||
setTimeout(() => {
|
||
isopacity.value = true;
|
||
}, 100);
|
||
}
|
||
});
|
||
}).exec();
|
||
}
|
||
};
|
||
const shakyTable = common_vendor.ref(false);
|
||
common_vendor.ref([]);
|
||
const rulerTouchStart = (item, index0, index1, e) => {
|
||
};
|
||
const rulerTouchMove = (e) => {
|
||
const moveXa = Math.floor(e.touches[0].pageX);
|
||
const moveYa = Math.floor(e.touches[0].pageY);
|
||
if (Math.abs(moveXa - moveX.value) > 0 || Math.abs(moveYa - moveY.value) > 0) {
|
||
if (timer.value) {
|
||
clearTimeout(timer.value);
|
||
timer.value = null;
|
||
}
|
||
}
|
||
};
|
||
const rulerTouchEnd = () => {
|
||
isTuoing.value = false;
|
||
if (timer.value) {
|
||
clearTimeout(timer.value);
|
||
timer.value = null;
|
||
}
|
||
};
|
||
const deleteRuler = (index0, index1) => {
|
||
let typeName = timearr.value[index0].children[index1].typeName;
|
||
timearr.value[index0].children[index1] = { directiveName: "", typeName };
|
||
};
|
||
common_vendor.ref(null);
|
||
common_vendor.ref(false);
|
||
common_vendor.ref(false);
|
||
const saveX = common_vendor.ref(0);
|
||
const saveY = common_vendor.ref(0);
|
||
const isTuoing = common_vendor.ref(false);
|
||
common_vendor.ref("");
|
||
common_vendor.ref("");
|
||
const bottomTimer = common_vendor.ref(null);
|
||
const bottomisShaking = common_vendor.ref(false);
|
||
const bottomTouchStart = (e) => {
|
||
saveX.value = Math.floor(e.touches[0].pageX);
|
||
saveY.value = Math.floor(e.touches[0].pageY);
|
||
bottomTimer.value = setTimeout(() => {
|
||
bottomisShaking.value = true;
|
||
}, 500);
|
||
};
|
||
const bottomTouchMove = (e) => {
|
||
const moveX2 = Math.floor(e.touches[0].pageX);
|
||
const moveY2 = Math.floor(e.touches[0].pageY);
|
||
if (Math.abs(moveX2 - saveX.value) > 0 || Math.abs(moveY2 - saveY.value) > 0) {
|
||
if (bottomTimer.value) {
|
||
clearTimeout(bottomTimer.value);
|
||
bottomTimer.value = null;
|
||
}
|
||
}
|
||
};
|
||
const bottomTouchEnd = () => {
|
||
if (bottomTimer.value) {
|
||
clearTimeout(bottomTimer.value);
|
||
bottomTimer.value = null;
|
||
}
|
||
};
|
||
common_vendor.ref({
|
||
time: "",
|
||
minute: "",
|
||
array: []
|
||
});
|
||
common_vendor.ref({
|
||
op: {
|
||
name: "",
|
||
index: [-1, -1, -1]
|
||
},
|
||
startTime: "",
|
||
weekTimeNumber: -1,
|
||
monthTimeNumber: -1,
|
||
monthTime: "",
|
||
weekTime: ""
|
||
});
|
||
common_vendor.ref(0);
|
||
const indexsave = common_vendor.ref([-1, -1]);
|
||
const rulerMoveEnd = (object) => {
|
||
if (props.liang.index0 !== 999 && object.cycleType) {
|
||
indexsave.value = [props.liang.index0, props.liang.index1];
|
||
let typeName = timearr.value[flyNumber.value.index0].children[flyNumber.value.index1].typeName;
|
||
timearr.value[flyNumber.value.index0].children[flyNumber.value.index1] = { directiveName: "", typeName };
|
||
let newtypeName = timearr.value[indexsave.value[0]].children[indexsave.value[1]].typeName;
|
||
timearr.value[indexsave.value[0]].children[indexsave.value[1]] = object;
|
||
timearr.value[indexsave.value[0]].children[indexsave.value[1]].typeName = newtypeName;
|
||
let startTime = timearr.value[indexsave.value[0]].children[indexsave.value[1]].startTime;
|
||
let endTime = timearr.value[indexsave.value[0]].children[indexsave.value[1]].endTime;
|
||
let positioning = timearr.value[indexsave.value[0]].positioning;
|
||
const rest = startTime.split(":")[1];
|
||
const rest0 = endTime.split(":")[1];
|
||
let many = Number(rest0) - Number(rest);
|
||
let start = newtypeName;
|
||
let end = Number(start) + many;
|
||
timearr.value[indexsave.value[0]].children[indexsave.value[1]].startTime = positioning + ":" + start.padStart(2, "0");
|
||
timearr.value[indexsave.value[0]].children[indexsave.value[1]].endTime = positioning + ":" + String(end % 60).padStart(2, "0");
|
||
}
|
||
};
|
||
common_vendor.ref(null);
|
||
const opensay = () => {
|
||
sayisopacity.value = false;
|
||
sayisopen.value = true;
|
||
setTimeout(() => {
|
||
sayisopacity.value = true;
|
||
}, 50);
|
||
};
|
||
const addnew = () => {
|
||
if (isDelete.value) {
|
||
isDelete.value = false;
|
||
deleteRuler(saveEditIndex.value.index0, saveEditIndex.value.index1);
|
||
return;
|
||
}
|
||
if (isMove.value) {
|
||
getNew();
|
||
return;
|
||
}
|
||
flyNumber.value.index0 = -1;
|
||
flyNumber.value.index1 = -1;
|
||
isMove.value = false;
|
||
let stopIt = false;
|
||
let allobject = bigArray.value[upmenuIndex.value].children[downmenuIndex.value].children[thirdmenuIndex.value];
|
||
if (allobject.cycleType === "即时护理") {
|
||
scrollLeft.value = 1;
|
||
bottomItems.value.forEach((element, index2) => {
|
||
if (element.id === allobject.id) {
|
||
stopIt = true;
|
||
}
|
||
});
|
||
common_vendor.nextTick$1(() => {
|
||
if (!stopIt) {
|
||
scrollLeft.value = 0;
|
||
if (bottomItems.value.length && bottomItems.value[0].target === "#00a8ff") {
|
||
bottomItems.value[0].target = "#fff";
|
||
clearTimeout(cleansettimeout.value);
|
||
}
|
||
bottomItems.value.unshift({
|
||
name: allobject.title,
|
||
url: "/static/index/ou.png",
|
||
target: `#00a8ff`,
|
||
id: allobject.id
|
||
});
|
||
common_vendor.index.__f__("log", "at component/rightItemssecondrelnew/index.vue:1529", "!!!!", bottomItems.value);
|
||
cleansettimeout.value = setTimeout(() => {
|
||
bottomItems.value[0].target = `#fff`;
|
||
}, 1500);
|
||
} else {
|
||
clearTimeout(cleansettimeoutrel.value);
|
||
isop.value = true;
|
||
cleansettimeoutrel.value = setTimeout(() => {
|
||
isop.value = false;
|
||
}, 1e3);
|
||
}
|
||
});
|
||
return;
|
||
}
|
||
if (allobject.cycleType === "周期护理" && iszhouqi.value && weekIndex.value == -1 && monthIndex.value == -1) {
|
||
return;
|
||
} else if (allobject.cycleType === "周期护理" && !iszhouqi.value) {
|
||
iszhouqi.value = true;
|
||
return;
|
||
}
|
||
let cycleType = "";
|
||
if (allobject.cycleType === "日常护理") {
|
||
cycleType = "日常";
|
||
} else {
|
||
if (weekIndex.value !== -1) {
|
||
cycleType = weekValue.value;
|
||
} else {
|
||
cycleType = monthValue.value + "号";
|
||
}
|
||
iszhouqi.value = false;
|
||
weekIndex.value = -1;
|
||
monthIndex.value = -1;
|
||
weekValue.value = "";
|
||
monthValue.value = "";
|
||
}
|
||
const startHour = Number(saveEditIndex.value.index0);
|
||
const startMinute = Number(timearr.value[saveEditIndex.value.index0].children[saveEditIndex.value.index1].typeName);
|
||
const endMinute = startMinute + 10;
|
||
const endHour = startHour + Math.floor(endMinute / 60);
|
||
const formattedStart = `${String(startHour)}:${String(startMinute).padStart(2, "0")}`;
|
||
const formattedEnd = `${String(endHour)}:${String(endMinute % 60).padStart(2, "0")}`;
|
||
timearr.value[saveEditIndex.value.index0].children[saveEditIndex.value.index1].startTime = formattedStart;
|
||
timearr.value[saveEditIndex.value.index0].children[saveEditIndex.value.index1].endTime = formattedEnd;
|
||
let param = {
|
||
directiveId: allobject.id,
|
||
directiveName: allobject.title,
|
||
startTime: formattedStart,
|
||
endTime: formattedEnd,
|
||
positioning: saveEditIndex.value.index0.toString(),
|
||
positioningLong: saveEditIndex.value.index1.toString(),
|
||
tagName: allobject.tagName,
|
||
cycleType,
|
||
nuId: "1",
|
||
customerId: "1",
|
||
id: "",
|
||
typeName: timearr.value[saveEditIndex.value.index0].children[saveEditIndex.value.index1].typeName
|
||
};
|
||
timearr.value[saveEditIndex.value.index0].children[saveEditIndex.value.index1] = param;
|
||
let data = {
|
||
index0: saveEditIndex.value.index0,
|
||
index1: saveEditIndex.value.index1
|
||
};
|
||
whereEvent(data);
|
||
saveAll();
|
||
};
|
||
const cleansettimeout = common_vendor.ref(null);
|
||
const cleansettimeoutrel = common_vendor.ref(null);
|
||
const saveAll = () => {
|
||
timearr.value.forEach((element0, index0) => {
|
||
element0.children.forEach((element1, index1) => {
|
||
let saveTypeName = "";
|
||
if (!element1.directiveName && !element1.id) {
|
||
let array = {};
|
||
if (element1.typeName) {
|
||
saveTypeName = element1.typeName;
|
||
}
|
||
array = JSON.parse(JSON.stringify(moBan.value));
|
||
saveTypeName ? array.typeName = saveTypeName : "";
|
||
array.positioning = index0;
|
||
array.positioningLong = index1;
|
||
} else {
|
||
element1.positioning = index0;
|
||
element1.positioningLong = index1;
|
||
}
|
||
});
|
||
});
|
||
};
|
||
const routerPush = () => {
|
||
common_vendor.index.setStorage({
|
||
key: "myArray",
|
||
data: timearr.value,
|
||
success: function() {
|
||
common_vendor.index.navigateTo({
|
||
url: `/pages/timeMatrix/indexnew`
|
||
});
|
||
}
|
||
});
|
||
};
|
||
const saveRulerTime = common_vendor.ref({
|
||
index0: -1,
|
||
index1: -1
|
||
});
|
||
const targetRuler = common_vendor.ref({
|
||
index0: -1,
|
||
index1: -1,
|
||
current: -1,
|
||
bordershow: true
|
||
});
|
||
const whereEvent = (data) => {
|
||
targetRuler.value.index0 = data.index0;
|
||
targetRuler.value.index1 = data.index1;
|
||
saveRulerTime.value.index0 = targetRuler.value.index0;
|
||
saveRulerTime.value.index1 = targetRuler.value.index1;
|
||
targetRuler.value.bordershow = false;
|
||
setTimeout(() => {
|
||
targetRuler.value.index0 = -1;
|
||
targetRuler.value.index1 = -1;
|
||
targetRuler.value.current = -1;
|
||
}, 400);
|
||
setTimeout(() => {
|
||
targetRuler.value.bordershow = true;
|
||
saveRulerTime.value.index0 = -1;
|
||
saveRulerTime.value.index1 = -1;
|
||
}, 1e3);
|
||
};
|
||
const minuteArr = ["00", "05", "10", "15", "20", "25", "30", "35", "40", "45", "50", "55"];
|
||
const timearr = common_vendor.ref(
|
||
Array.from({ length: 24 }, (_, hour) => ({
|
||
positioning: hour.toString(),
|
||
children: minuteArr.map((time) => ({
|
||
typeName: time,
|
||
// 表示分钟,如 '00', '05' 等
|
||
directiveName: ""
|
||
// 默认的 directiveName
|
||
}))
|
||
}))
|
||
);
|
||
common_vendor.onShow(() => {
|
||
bigArray.value = component_rightItemssecondrelnew_yaoshandiao.myArray;
|
||
downList.value = bigArray.value[0].children;
|
||
common_vendor.index.$on("where", whereEvent);
|
||
});
|
||
common_vendor.onHide(() => {
|
||
common_vendor.index.$off("where", whereEvent);
|
||
});
|
||
__expose({
|
||
// rulerEnd,
|
||
rulerMoveEnd
|
||
// nextItems,
|
||
});
|
||
common_vendor.ref({
|
||
index0: 999,
|
||
index1: 999
|
||
});
|
||
const moBan = common_vendor.ref({
|
||
directiveId: "",
|
||
directiveName: "",
|
||
startTime: "",
|
||
endTime: "",
|
||
positioning: "",
|
||
positioningLong: "",
|
||
tagName: "",
|
||
cycleType: "",
|
||
nuId: "1",
|
||
customerId: "1",
|
||
id: "",
|
||
typeName: ""
|
||
});
|
||
function splitString(str) {
|
||
let result = [];
|
||
let remainingStr = str;
|
||
let regex = /([^((]*)[((]([^))]+)[))]/;
|
||
while (regex.test(remainingStr)) {
|
||
let match = remainingStr.match(regex);
|
||
if (match) {
|
||
if (match[1].trim()) {
|
||
result.push(match[1].trim());
|
||
}
|
||
if (match[2].trim()) {
|
||
result.push(match[2].trim());
|
||
}
|
||
remainingStr = remainingStr.replace(match[0], "").trim();
|
||
}
|
||
}
|
||
if (remainingStr.trim()) {
|
||
result.push(remainingStr.trim());
|
||
}
|
||
return result;
|
||
}
|
||
return (_ctx, _cache) => {
|
||
var _a, _b, _c, _d;
|
||
return common_vendor.e({
|
||
a: common_vendor.o(movecard),
|
||
b: common_vendor.n(__props.darkFans ? `right-container-title-no-dark` : `right-container-title-no`),
|
||
c: common_vendor.n(__props.darkFans ? `right-container-title-no-dark` : `right-container-title-no`),
|
||
d: `/static/index/undericons/man.png`,
|
||
e: common_vendor.n(__props.darkFans ? `right-icons-font-dark` : `right-icons-font`),
|
||
f: __props.darkFans ? `/static/index/undericons/face.png` : `/static/index/undericons/facelight.png`,
|
||
g: __props.darkFans ? `/static/index/undericons/hand.png` : `/static/index/undericons/handlight.png`,
|
||
h: __props.darkFans ? `/static/index/undericons/out.png` : `/static/index/undericons/outlight.png`,
|
||
i: common_vendor.o(($event) => newchange(0)),
|
||
j: common_vendor.o(shareToWeixin),
|
||
k: common_vendor.o(routerPush),
|
||
l: common_vendor.f(timearr.value[0].children, (item, index2, i0) => {
|
||
return {
|
||
a: common_vendor.t(item.typeName),
|
||
b: common_vendor.n(touchindex1.value === index2 || __props.liang.index1 === index2 && !__props.canmove || flyNumber.value.index1 === index2 && shakyTable.value ? `boom-son-target` : `boom-son`),
|
||
c: item.typeName,
|
||
d: index2
|
||
};
|
||
}),
|
||
m: `-${2 * moveDownNumber.value}rpx`,
|
||
n: common_vendor.f(timearr.value, (item0, index0, i0) => {
|
||
return {
|
||
a: common_vendor.t((item0.positioning.length == 1 ? "0" + item0.positioning : item0.positioning) + ":00"),
|
||
b: index0
|
||
};
|
||
}),
|
||
o: common_vendor.f(timearr.value, (item0, index0, i0) => {
|
||
return {
|
||
a: common_vendor.f(item0.children, (item1, index1, i1) => {
|
||
return common_vendor.e({
|
||
a: flyNumber.value.index0 === index0 && flyNumber.value.index1 === index1 && index1 == 0
|
||
}, flyNumber.value.index0 === index0 && flyNumber.value.index1 === index1 && index1 == 0 ? {} : {}, {
|
||
b: flyNumber.value.index0 === index0 && flyNumber.value.index1 === index1 && index1
|
||
}, flyNumber.value.index0 === index0 && flyNumber.value.index1 === index1 && index1 ? {} : {}, {
|
||
c: saveEditIndex.value.index0 == index0 && saveEditIndex.value.index1 == index1 && index1 == 0 && isDelete.value
|
||
}, saveEditIndex.value.index0 == index0 && saveEditIndex.value.index1 == index1 && index1 == 0 && isDelete.value ? {} : {}, {
|
||
d: saveEditIndex.value.index0 == index0 && saveEditIndex.value.index1 == index1 && index1 && isDelete.value
|
||
}, saveEditIndex.value.index0 == index0 && saveEditIndex.value.index1 == index1 && index1 && isDelete.value ? {} : {}, {
|
||
e: saveEditIndex.value.index0 == index0 && saveEditIndex.value.index1 == index1,
|
||
f: item1.startTime
|
||
}, item1.startTime ? {
|
||
g: common_vendor.t(item1.startTime + `-` + item1.endTime),
|
||
h: item1.cycleType == "日常" ? `/static/index/yellowbian.png` : `/static/index/puoplebian.png`,
|
||
i: common_vendor.t(item1.cycleType),
|
||
j: __props.liang.index0 !== index0 || __props.liang.index1 !== index1 || __props.canmove
|
||
} : {}, {
|
||
k: item1.startTime
|
||
}, item1.startTime ? {
|
||
l: common_assets._imports_0$5
|
||
} : {}, {
|
||
m: item1.startTime
|
||
}, item1.startTime ? {
|
||
n: common_vendor.t(splitString(item1.directiveName)[0])
|
||
} : {}, {
|
||
o: item1.startTime
|
||
}, item1.startTime ? {
|
||
p: common_assets._imports_1$4,
|
||
q: common_assets._imports_2
|
||
} : {}, {
|
||
r: common_vendor.n(getClass(item1, index0, index1)),
|
||
s: `-${computeDelay(index0, index1).toFixed(2)}s`,
|
||
t: common_vendor.n(targetRuler.value.index0 === index0 && targetRuler.value.index1 === index1 ? targetRuler.value.index1 ? `title-time-border-big` : `title-time-border-big-top` : `super-card-time-card`),
|
||
v: common_vendor.s(!targetRuler.value.bordershow && saveRulerTime.value.index0 === index0 && saveRulerTime.value.index1 === index1 ? {
|
||
zIndex: 999
|
||
} : {
|
||
borderBottom: "1rpx solid transparent"
|
||
}),
|
||
w: `a${index0}_${index1}`,
|
||
x: common_vendor.o(($event) => rulerTouchClick(item1, index0, index1), index1),
|
||
y: common_vendor.o(($event) => rulerTouchStart(), index1),
|
||
z: common_vendor.o(rulerTouchMove, index1),
|
||
A: common_vendor.o(($event) => rulerTouchEnd(), index1),
|
||
B: index1,
|
||
C: index1
|
||
});
|
||
}),
|
||
b: index0,
|
||
c: index0
|
||
};
|
||
}),
|
||
p: isMove.value ? `/static/index/movemode/targetcheng.png` : `/static/index/movemode/target.png`,
|
||
q: scrollTop.value,
|
||
r: __props.canmove && !shakyTable.value,
|
||
s: common_vendor.o(handleScrolltime),
|
||
t: cardLeft.value,
|
||
v: common_vendor.o(handleTop),
|
||
w: common_vendor.f(bottomItems.value, (item, index2, i0) => {
|
||
return {
|
||
a: item.url,
|
||
b: `-${index2 * 0.1}s`,
|
||
c: common_vendor.t(item.name),
|
||
d: common_vendor.o(($event) => bottomItems.value.splice(index2, 1), index2),
|
||
e: common_vendor.o(bottomTouchStart, index2),
|
||
f: common_vendor.o(bottomTouchMove, index2),
|
||
g: common_vendor.o(bottomTouchEnd, index2),
|
||
h: common_vendor.s(item.target ? {
|
||
background: item.target,
|
||
transition: `all 1.5s ease-in-out`
|
||
} : {
|
||
transition: `all 1.5s ease-in-out`
|
||
}),
|
||
i: index2
|
||
};
|
||
}),
|
||
x: common_assets._imports_3,
|
||
y: common_vendor.n(bottomisShaking.value ? `super-end-items-img-father-active` : `super-end-items-img-father`),
|
||
z: common_assets._imports_1$4,
|
||
A: common_assets._imports_2,
|
||
B: bottomisShaking.value,
|
||
C: scrollLeft.value,
|
||
D: common_vendor.o(($event) => {
|
||
isweek.value = false;
|
||
weekIndex.value = -1;
|
||
weekValue.value = "";
|
||
}),
|
||
E: isweek.value,
|
||
F: common_vendor.o(($event) => {
|
||
isweek.value = true;
|
||
monthIndex.value = -1;
|
||
monthValue.value = "";
|
||
}),
|
||
G: !isweek.value,
|
||
H: isweek.value
|
||
}, isweek.value ? {
|
||
I: common_vendor.f(weekDays, (item, index2, i0) => {
|
||
return {
|
||
a: common_vendor.t(item),
|
||
b: common_vendor.n(weekIndex.value === index2 ? `items-card-target` : `items-card`),
|
||
c: index2,
|
||
d: common_vendor.o(($event) => clickWeek(item, index2), index2)
|
||
};
|
||
})
|
||
} : {}, {
|
||
J: !isweek.value
|
||
}, !isweek.value ? {
|
||
K: common_vendor.f(common_vendor.unref(days), (item, index2, i0) => {
|
||
return {
|
||
a: common_vendor.t(item),
|
||
b: common_vendor.n(monthIndex.value === index2 ? `items-card-target` : `items-card`),
|
||
c: index2,
|
||
d: common_vendor.o(($event) => clickMonth(item, index2), index2)
|
||
};
|
||
})
|
||
} : {}, {
|
||
L: firsttop.value,
|
||
M: iszhouqi.value,
|
||
N: common_vendor.f(bigArray.value[upmenuIndex.value].children[downmenuIndex.value].children, (item, index2, i0) => {
|
||
return {
|
||
a: item.cycleType === "日常护理",
|
||
b: item.cycleType === "周期护理",
|
||
c: item.cycleType === "即时护理",
|
||
d: common_vendor.t(item.title),
|
||
e: common_vendor.s(thirdmenuIndex.value == index2 ? {
|
||
color: `rgb(54, 159, 239)`
|
||
} : {}),
|
||
f: common_vendor.s(thirdmenuIndex.value == index2 ? {
|
||
border: `2rpx solid rgb(54, 159, 239)`,
|
||
backgroundColor: `#fff`
|
||
} : {
|
||
border: `2rpx solid rgb(229, 233, 249)`
|
||
}),
|
||
g: index2,
|
||
h: common_vendor.o(($event) => thirdmenuIndex.value = index2, index2)
|
||
};
|
||
}),
|
||
O: common_assets._imports_4,
|
||
P: common_assets._imports_5,
|
||
Q: common_assets._imports_6,
|
||
R: common_assets._imports_0$5,
|
||
S: common_assets._imports_1$4,
|
||
T: common_assets._imports_2,
|
||
U: firsttop.value,
|
||
V: !iszhouqi.value,
|
||
W: common_vendor.f(downList.value, (item, index2, i0) => {
|
||
return {
|
||
a: common_vendor.t(item.title),
|
||
b: common_vendor.n(downmenuIndex.value == index2 ? `downList-box-target` : `downList-box`),
|
||
c: index2,
|
||
d: common_vendor.o(($event) => secondContant(index2), index2)
|
||
};
|
||
}),
|
||
X: common_assets._imports_0$5,
|
||
Y: secondtop.value,
|
||
Z: common_vendor.f(doctorsayList.value, (item, index2, i0) => {
|
||
return {
|
||
a: index2 === upmenuIndex.value ? item.targetUrl : item.url,
|
||
b: common_vendor.t(item.name),
|
||
c: common_vendor.n(index2 === upmenuIndex.value ? `doctorsay-container-card-font-dark` : `doctorsay-container-card-font`),
|
||
d: index2 === upmenuIndex.value && index2,
|
||
e: index2 === upmenuIndex.value && index2 !== 5,
|
||
f: common_vendor.n(index2 === upmenuIndex.value ? `doctorsay-container-card-target` : `doctorsay-container-card`),
|
||
g: index2,
|
||
h: common_vendor.o(($event) => changLeft(index2), index2)
|
||
};
|
||
}),
|
||
aa: common_vendor.s(isop.value ? {
|
||
opacity: 1
|
||
} : {
|
||
opacity: 0
|
||
}),
|
||
ab: common_assets._imports_7,
|
||
ac: common_vendor.o(changecard),
|
||
ad: common_assets._imports_8,
|
||
ae: common_vendor.o(openDelete),
|
||
af: common_assets._imports_9,
|
||
ag: common_vendor.o(opensay),
|
||
ah: common_assets._imports_10,
|
||
ai: common_vendor.o(addnew),
|
||
aj: `/static/index/teeth.png`,
|
||
ak: common_vendor.t((_b = (_a = timearr.value[flyNumber.value.index0]) == null ? void 0 : _a.children[flyNumber.value.index1]) == null ? void 0 : _b.value),
|
||
al: 2 * openY.value - 350 + "rpx",
|
||
am: 2 * openX.value - 780 + "rpx",
|
||
an: isopacity.value ? 1 : 0,
|
||
ao: ((_d = (_c = timearr.value[flyNumber.value.index0]) == null ? void 0 : _c.children[flyNumber.value.index1]) == null ? void 0 : _d.type) === "日常" ? "#fffcf6" : "rgb(246, 244, 254)",
|
||
ap: common_vendor.o(() => {
|
||
}),
|
||
aq: isopen.value,
|
||
ar: common_vendor.o(($event) => {
|
||
isopen.value = false;
|
||
flyNumber.value.index0 = 999;
|
||
touchindex1.value = -1;
|
||
}),
|
||
as: common_vendor.f(nameArray.slice(0, 2), (item, index2, i0) => {
|
||
return {
|
||
a: `/static/index/tagNames/${index2}.png`,
|
||
b: common_vendor.t(item),
|
||
c: index2
|
||
};
|
||
}),
|
||
at: common_vendor.f(nameArray.slice(2, 11), (item, index2, i0) => {
|
||
return {
|
||
a: `/static/index/tagNames/${index2 + 2}.png`,
|
||
b: common_vendor.t(item),
|
||
c: index2
|
||
};
|
||
}),
|
||
av: sayisopacity.value ? 1 : 0,
|
||
aw: common_vendor.o(() => {
|
||
}),
|
||
ax: sayisopen.value,
|
||
ay: common_vendor.o(($event) => sayisopen.value = false),
|
||
az: common_assets._imports_11,
|
||
aA: common_assets._imports_11,
|
||
aB: common_vendor.o(clickshare),
|
||
aC: deletedownisopacity.value ? 1 : 0,
|
||
aD: common_vendor.o(() => {
|
||
}),
|
||
aE: shareShow.value,
|
||
aF: common_vendor.o(($event) => shareShow.value = false),
|
||
aG: common_vendor.s(__props.isshow ? {
|
||
opacity: `1`
|
||
} : {
|
||
opacity: `0`
|
||
}),
|
||
aH: common_vendor.o(($event) => {
|
||
bottomisShaking.value = false;
|
||
shakyTable.value = false;
|
||
})
|
||
});
|
||
};
|
||
}
|
||
});
|
||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-72bcf905"]]);
|
||
wx.createComponent(Component);
|
||
//# sourceMappingURL=../../../.sourcemap/mp-weixin/component/rightItemssecondrelnew/index.js.map
|