"use strict"; const common_vendor = require("../../common/vendor.js"); const common_assets = require("../../common/assets.js"); const component_rightItemssecondnew_yaoshandiao = require("./yaoshandiao.js"); if (!Math) { (joystick + skill + skilladd + skillmove + skilmovedelete)(); } const joystick = () => "../public/game/joystick.js"; const skill = () => "../public/game/skill.js"; const skilladd = () => "../public/game/skilladd.js"; const skillmove = () => "../public/game/skilmove.js"; const skilmovedelete = () => "../public/game/skilmovedelete.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.canmove, () => { bottomisShaking.value = false; } ); common_vendor.watch( () => props.isold, () => { if (props.isold) { cardLeft.value = 1; scrollTop.value = 1; common_vendor.nextTick$1(() => { scrollTop.value = 0; cardLeft.value = saveleft.value * 113; }); } } ); common_vendor.watch( () => props.isshow, () => { bottomisShaking.value = false; shakyTable.value = false; } ); const bottomItems = common_vendor.ref([ { name: "纸尿裤", url: "/static/index/niao.png" }, { name: "呕吐", url: "/static/index/tu.png" }, { name: "吸痰", url: "/static/index/ou.png" }, { name: "大便", url: "/static/index/baba.png" } ]); const weekDays = ["周一", "周二", "周三", "周四", "周五", "周六", "周日"]; const days = Array.from({ length: 31 }, (_, i) => (i + 1).toString().padStart(2, "0")); const isweek = common_vendor.ref(true); 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 bigArray = common_vendor.ref([]); const isopen = common_vendor.ref(false); const songisopen = common_vendor.ref(false); const isopacity = common_vendor.ref(false); const songisopacity = common_vendor.ref(false); const deleteisopen = common_vendor.ref(false); const deletename = common_vendor.ref(""); const deleteisopacity = common_vendor.ref(false); const replacementisopen = common_vendor.ref(false); common_vendor.ref(""); const replacementisopacity = common_vendor.ref(false); common_vendor.ref(0); common_vendor.ref(0); const saveleft = common_vendor.ref(6); const saveright = common_vendor.ref(13); 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; isHave(); }; const changecard = (type) => { if (isMove.value) { if (replacementisopen.value) { if (type) { flyNumber.value.index0 = -1; flyNumber.value.index1 = -1; isMove.value = false; } else { getNew(); } replacementisopen.value = false; } else { if (type) { flyNumber.value.index0 = -1; flyNumber.value.index1 = -1; isMove.value = false; } else { if (timearr.value[saveEditIndex.value.index0].children[saveEditIndex.value.index1].directiveName) { replacementisopacity.value = false; replacementisopen.value = true; setTimeout(() => { replacementisopacity.value = true; }, 100); } else { getNew(); } } } } else { if (type) { deleteItems(timearr.value[saveEditIndex.value.index0].children[saveEditIndex.value.index1], saveEditIndex.value.index0, saveEditIndex.value.index1); } else { flyNumber.value.index0 = saveEditIndex.value.index0; flyNumber.value.index1 = saveEditIndex.value.index1; isMove.value = true; } } }; const openAdd = (index2) => { selectType.value = true; cardsumit.value = { op: { name: "", index: [-1, -1, -1] }, startTime: "", monthTimeNumber: -1, monthTime: "", weekTime: "", weekTimeNumber: -1 }; songisopen.value = true; songisopacity.value = false; setTimeout(() => { songisopacity.value = true; }, 100); cardsumit.value.op.index[0] = index2; cardsumit.value.op.index[1] = 0; openValue.value.time = timearr.value[saveEditIndex.value.index0].positioning; openValue.value.minute = timearr.value[saveEditIndex.value.index0].children[saveEditIndex.value.index1].typeName; openValue.value.array = bigArray.value[index2].children; indexsave.value = [saveEditIndex.value.index0, saveEditIndex.value.index1]; }; function dosomesave() { cardsumit.value.op.name = secondopenValue.value[cardsumit.value.op.index[2]].relName; switch (secondopenValue.value[cardsumit.value.op.index[2]].cycleType) { case `日常护理`: openOp.value = 0; break; case `周期护理`: openOp.value = 1; break; case `即时护理`: openOp.value = 2; break; } } const selectType = common_vendor.ref(true); const deleteButton = common_vendor.ref(false); const movecard = (where) => { if (songisopen.value) { if (!clickstauts.value) { switch (where) { case 0: if (cardsumit.value.op.index[1] > 3) { cardsumit.value.op.index[1] = cardsumit.value.op.index[1] - 4; } break; case 1: if (openValue.value.array.length - 1 == cardsumit.value.op.index[1]) { cardsumit.value.op.index[1] = 0; } else { cardsumit.value.op.index[1]++; } break; case 2: if (openValue.value.array.length > cardsumit.value.op.index[1] + 4) { cardsumit.value.op.index[1] = cardsumit.value.op.index[1] + 4; } else { cardsumit.value.op.index[1] = openValue.value.array.length - 1; } break; case 3: if (cardsumit.value.op.index[1]) { cardsumit.value.op.index[1]--; } else { cardsumit.value.op.index[1] = openValue.value.array.length - 1; } break; } } else if (clickstauts.value === 1) { switch (where) { case 0: if (cardsumit.value.op.index[2] > 2) { cardsumit.value.op.index[2] = cardsumit.value.op.index[2] - 3; dosomesave(); } break; case 1: if (secondopenValue.value.length - 1 == cardsumit.value.op.index[2]) { cardsumit.value.op.index[2] = 0; } else { cardsumit.value.op.index[2]++; } dosomesave(); break; case 2: if (secondopenValue.value.length > cardsumit.value.op.index[2] + 3) { cardsumit.value.op.index[2] = cardsumit.value.op.index[2] + 3; } else { cardsumit.value.op.index[2] = secondopenValue.value.length - 1; } dosomesave(); break; case 3: if (cardsumit.value.op.index[2]) { cardsumit.value.op.index[2]--; } else { cardsumit.value.op.index[2] = secondopenValue.value.length - 1; } dosomesave(); break; } } else if (clickstauts.value === 2) { if (selectType.value) { if (where === 1 || where === 3) { isweek.value = !isweek.value; if (isweek.value) { cardsumit.value.monthTime = ""; cardsumit.value.monthTimeNumber = -1; } else { cardsumit.value.weekTime = ""; cardsumit.value.weekTimeNumber = -1; } } else if (where === 2) { if (isweek.value) { cardsumit.value.weekTime = "周一"; cardsumit.value.weekTimeNumber = 0; } else { cardsumit.value.monthTime = "01"; cardsumit.value.monthTimeNumber = 0; } selectType.value = false; } } else { if (isweek.value) { switch (where) { case 0: if (cardsumit.value.weekTimeNumber > 4) { cardsumit.value.weekTimeNumber = cardsumit.value.weekTimeNumber - 5; cardsumit.value.weekTime = weekDays[cardsumit.value.weekTimeNumber]; } else { selectType.value = true; cardsumit.value.weekTime = ""; cardsumit.value.weekTimeNumber = -1; } break; case 1: if (weekDays.length - 1 == cardsumit.value.weekTimeNumber) { cardsumit.value.weekTimeNumber = 0; } else { cardsumit.value.weekTimeNumber++; } cardsumit.value.weekTime = weekDays[cardsumit.value.weekTimeNumber]; break; case 2: if (weekDays.length > cardsumit.value.weekTimeNumber + 5) { cardsumit.value.weekTimeNumber = cardsumit.value.weekTimeNumber + 5; } else { cardsumit.value.weekTimeNumber = weekDays.length - 1; } cardsumit.value.weekTime = weekDays[cardsumit.value.weekTimeNumber]; break; case 3: if (cardsumit.value.weekTimeNumber) { cardsumit.value.weekTimeNumber--; } else { cardsumit.value.weekTimeNumber = weekDays.length - 1; } break; } } else { switch (where) { case 0: if (cardsumit.value.monthTimeNumber > 11) { cardsumit.value.monthTimeNumber = cardsumit.value.monthTimeNumber - 12; cardsumit.value.monthTime = days[cardsumit.value.monthTimeNumber]; } else { selectType.value = true; cardsumit.value.monthTime = ""; cardsumit.value.monthTimeNumber = -1; } break; case 1: if (days.length - 1 == cardsumit.value.monthTimeNumber) { cardsumit.value.monthTimeNumber = 0; } else { cardsumit.value.monthTimeNumber++; } cardsumit.value.monthTime = days[cardsumit.value.monthTimeNumber]; break; case 2: if (days.length > cardsumit.value.monthTimeNumber + 12) { cardsumit.value.monthTimeNumber = cardsumit.value.monthTimeNumber + 12; } else { cardsumit.value.monthTimeNumber = days.length - 1; } cardsumit.value.monthTime = days[cardsumit.value.monthTimeNumber]; break; case 3: if (cardsumit.value.monthTimeNumber) { cardsumit.value.monthTimeNumber--; } else { cardsumit.value.monthTimeNumber = days.length - 1; } break; } } } } } else { if (deleteisopen.value) { deleteButton.value = !deleteButton.value; } else { 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; } isHave(); break; case 1: if (saveEditIndex.value.index0 == 23) { return; } saveEditIndex.value.index0++; if (saveEditIndex.value.index0 > saveright.value) { saveleft.value = saveEditIndex.value.index0 - 7; saveright.value = saveEditIndex.value.index0; cardLeft.value = saveleft.value * 113; } isHave(); 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; } isHave(); 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 + 7; cardLeft.value = saveleft.value * 113; } isHave(); break; } } } }; const clickWeek = () => { selectType.value = true; isweek.value = true; cardsumit.value.monthTime = ""; cardsumit.value.monthTimeNumber = -1; }; const clickMonth = () => { selectType.value = true; isweek.value = false; cardsumit.value.weekTime = ""; cardsumit.value.weekTimeNumber = -1; }; const haveName = common_vendor.ref(false); const isHave = () => { if (timearr.value[saveEditIndex.value.index0].children[saveEditIndex.value.index1].directiveName) { haveName.value = true; } else { haveName.value = false; } }; const clickdelete = (type) => { if (type) { deleteisopen.value = false; deleteButton.value = false; } else { deleteRuler(deleteindex.value[0], deleteindex.value[1]); isHave(); } }; 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 moveDownNumber = common_vendor.ref(0); function handleScrolltime(e) { let num = e.detail.scrollTop; let formattedNum = parseFloat(num.toFixed(2)); moveDownNumber.value = formattedNum; } function handleTop(e) { } 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"; }; common_vendor.ref([ { url: "/static/index/doctorsay/light/clean.png", targetUrl: "/static/index/doctorsay/dark/clean.png", name: "清洁" }, { url: "/static/index/doctorsay/light/drink.png", targetUrl: "/static/index/doctorsay/dark/drink.png", name: "饮食" }, { url: "/static/index/doctorsay/light/bed.png", targetUrl: "/static/index/doctorsay/dark/bed.png", name: "睡眠" }, { url: "/static/index/doctorsay/light/shi.png", targetUrl: "/static/index/doctorsay/dark/shi.png", name: "排泻" }, { url: "/static/index/doctorsay/light/use.png", targetUrl: "/static/index/doctorsay/dark/use.png", name: "日常" } ]); common_vendor.ref(0); common_vendor.ref(999); common_vendor.ref(false); common_vendor.ref([]); const emit = __emit; const isEdit = common_vendor.ref(false); const saveEditIndex = common_vendor.ref({ index0: -1, index1: -1 }); const clickstauts = common_vendor.ref(0); const secondopenValue = common_vendor.ref([]); const clickcircle = (index2) => { if (clickstauts.value === 2 && selectType.value) { return; } if (!index2) { clickstauts.value++; } else { if (clickstauts.value) { clickstauts.value--; } else { songisopen.value = false; } } if (clickstauts.value === 1) { cardsumit.value.op.index[2] = 1; secondopenValue.value = []; secondopenValue.value = openValue.value.array[cardsumit.value.op.index[1]].children; secondopenValue.value.forEach((element) => { element.relName = element.title + (element.tagName ? element.tagName.split(",").map((item) => `(${item})`).join("") : ""); }); clickOp(0, secondopenValue.value[0]); } else if (clickstauts.value === 2) { if (openOp.value == 1) { cardsumit.value.weekTime = ""; cardsumit.value.monthTime = ""; isweek.value = true; } else { clickstauts.value = 0; movetoruler(); } } else if (clickstauts.value === 3) { clickstauts.value = 0; movetoruler(); } }; const openEdit = () => { isEdit.value = !isEdit.value; if (isEdit.value) { 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 * 113; }); isHave(); } else { saveEditIndex.value.index0 = -1; saveEditIndex.value.index1 = -1; } }; 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: "" }); const deletebottomindex = common_vendor.ref(-1); const deletedownisopen = common_vendor.ref(false); const deletedownisopacity = common_vendor.ref(false); const deletebottom = (index2, name) => { bottomisShaking.value = false; deletebottomindex.value = index2; shakyTable.value = false; deletedownisopacity.value = false; deletedownisopen.value = true; deletename.value = name; setTimeout(() => { deletedownisopacity.value = true; }, 100); }; const deleteindex = common_vendor.ref([-1, -1]); const deleteId = common_vendor.ref(""); const deleteItems = (item, index0, index1) => { deleteindex.value = [-1, -1]; shakyTable.value = false; bottomisShaking.value = false; deleteisopacity.value = false; deleteisopen.value = true; deleteindex.value = [index0, index1]; deletename.value = item.directiveName; deleteId.value = item.id; setTimeout(() => { deleteisopacity.value = true; }, 100); }; 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/rightItemssecondnew/index.vue:1198", "success:"); }, fail: function(err) { common_vendor.index.__f__("log", "at component/rightItemssecondnew/index.vue:1201", "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 > 200 && res.left < 1067 && res.top < 570 && res.top > 140 && res.dataset.index0 == index0 && res.dataset.index1 == index1) { if (res.left > 200 && 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 }; isopen.value = false; deleteisopen.value = false; }; 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); const saveId = common_vendor.ref(""); const saveTagName = 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; } }; const openValue = common_vendor.ref({ time: "", minute: "", array: [] }); const cardsumit = common_vendor.ref({ op: { name: "", index: [-1, -1, -1] }, startTime: "", weekTimeNumber: -1, monthTimeNumber: -1, monthTime: "", weekTime: "" }); const openOp = common_vendor.ref(0); const clickOp = (index2, item) => { saveId.value = item.id; saveTagName.value = item.tagName; cardsumit.value.op.index[2] = index2; cardsumit.value.op.name = item.relName; switch (item.cycleType) { case `日常护理`: openOp.value = 0; break; case `周期护理`: openOp.value = 1; break; case `即时护理`: openOp.value = 2; break; } }; 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 movetoruler = async () => { songisopen.value = false; isweek.value = true; if (openOp.value === 2) { common_vendor.index.__f__("log", "at component/rightItemssecondnew/index.vue:1462", "????"); scrollLeft.value = 1; common_vendor.nextTick$1(() => { scrollLeft.value = 0; bottomItems.value.unshift({ name: cardsumit.value.op.name, url: "/static/index/ou.png", target: `#00a8ff` }); setTimeout(() => { bottomItems.value[0].target = `#fff`; }, 1500); setTimeout(() => { bottomItems.value[0].target = ""; }, 3e3); }); return; } let cycleType = ""; if (!openOp.value) { cycleType = "日常"; } else if (openOp.value === 1) { cycleType = cardsumit.value.weekTime || cardsumit.value.monthTime + "号"; } const startHour = Number(openValue.value.time); const startMinute = Number(openValue.value.minute); 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[indexsave.value[0]].children[indexsave.value[1]].startTime = formattedStart; timearr.value[indexsave.value[0]].children[indexsave.value[1]].endTime = formattedEnd; let param = { directiveId: saveId.value, directiveName: cardsumit.value.op.name, startTime: formattedStart, endTime: formattedEnd, positioning: indexsave.value[0].toString(), positioningLong: indexsave.value[1].toString(), tagName: saveTagName.value, cycleType, nuId: "1", customerId: "1", id: "", typeName: timearr.value[indexsave.value[0]].children[indexsave.value[1]].typeName }; timearr.value[indexsave.value[0]].children[indexsave.value[1]] = param; movecard(1); isHave(); timearr.value.forEach((element) => { element.children.forEach((res) => { }); }); saveAll(); }; const saveAll = () => { let postArray = []; 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; postArray.push(array); } else { element1.positioning = index0; element1.positioningLong = index1; postArray.push(element1); } }); }); common_vendor.index.__f__("log", "at component/rightItemssecondnew/index.vue:1551", "!!!!!!!!", postArray); }; 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) => { scrollTop.value = 0; scrollTop.value = data.index1 * 104; cardLeft.value = 0; cardLeft.value = data.index0 * 113; 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_rightItemssecondnew_yaoshandiao.myArray; downList.value = bigArray.value[0].children; cardLeft.value = 678; 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: isEdit.value, b: common_vendor.o(movecard), c: isEdit.value && songisopen.value && !isMove.value && !deleteisopen.value, d: common_vendor.o(clickcircle), e: !haveName.value && isEdit.value && !songisopen.value && !isMove.value && !deleteisopen.value, f: common_vendor.o(openAdd), g: (haveName.value && isEdit.value && !songisopen.value || isEdit.value && !songisopen.value && isMove.value) && !deleteisopen.value, h: common_vendor.o(changecard), i: common_vendor.p({ ismove: isMove.value }), j: deleteisopen.value, k: common_vendor.o(clickdelete), l: common_vendor.n(__props.darkFans ? `right-container-title-no-dark` : `right-container-title-no`), m: common_vendor.n(__props.darkFans ? `right-container-title-no-dark` : `right-container-title-no`), n: `/static/index/undericons/man.png`, o: common_vendor.n(__props.darkFans ? `right-icons-font-dark` : `right-icons-font`), p: __props.darkFans ? `/static/index/undericons/face.png` : `/static/index/undericons/facelight.png`, q: __props.darkFans ? `/static/index/undericons/hand.png` : `/static/index/undericons/handlight.png`, r: __props.darkFans ? `/static/index/undericons/out.png` : `/static/index/undericons/outlight.png`, s: common_vendor.o(($event) => newchange(0)), t: common_vendor.o(($event) => newchange(2)), v: common_vendor.o(shareToWeixin), w: common_vendor.o(routerPush), x: common_vendor.t(isEdit.value ? "取消编辑" : "编辑"), y: common_vendor.o(openEdit), z: 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 }; }), A: `-${2 * moveDownNumber.value}rpx`, B: 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 }; }), C: common_vendor.f(timearr.value, (item0, index0, i0) => { return { a: common_vendor.f(item0.children, (item1, index1, i1) => { return common_vendor.e({ a: item1.directiveName && shakyTable.value }, item1.directiveName && shakyTable.value ? { b: __props.liang.index0 !== index0 || __props.liang.index1 !== index1 || __props.canmove, c: common_vendor.o(($event) => deleteItems(item1, index0, index1), index1) } : {}, { d: saveEditIndex.value.index0 == index0 && saveEditIndex.value.index1 == index1, e: item1.startTime }, item1.startTime ? { f: common_vendor.t(item1.startTime + `-` + item1.endTime), g: item1.cycleType == "日常" ? `/static/index/yellowbian.png` : `/static/index/puoplebian.png`, h: common_vendor.t(item1.cycleType), i: __props.liang.index0 !== index0 || __props.liang.index1 !== index1 || __props.canmove } : {}, { j: common_vendor.t(splitString(item1.directiveName)[0]), k: __props.liang.index0 !== index0 || __props.liang.index1 !== index1 || __props.canmove, l: splitString(item1.directiveName)[1] }, splitString(item1.directiveName)[1] ? { m: common_vendor.f(splitString(item1.directiveName).slice(1), (item, index2, i2) => { return { a: common_vendor.t(splitString(item1.directiveName)[index2 + 1]), b: index2 }; }), n: common_vendor.s(item1.cycleType != "日常" ? { backgroundColor: `rgb(123,97,255)` } : {}), o: __props.liang.index0 !== index0 || __props.liang.index1 !== index1 || __props.canmove, p: common_vendor.s(item1.cycleType != "日常" ? { backgroundColor: `rgb(212,203,255)` } : {}) } : {}, { q: common_vendor.n(getClass(item1, index0, index1)), r: `-${computeDelay(index0, index1).toFixed(2)}s`, s: 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`), t: common_vendor.s(!targetRuler.value.bordershow && saveRulerTime.value.index0 === index0 && saveRulerTime.value.index1 === index1 ? { zIndex: 999 } : { borderTop: "1rpx solid transparent" }), v: `a${index0}_${index1}`, w: common_vendor.o(($event) => rulerTouchClick(item1, index0, index1), index1), x: common_vendor.o(($event) => rulerTouchStart(), index1), y: common_vendor.o(rulerTouchMove, index1), z: common_vendor.o(($event) => rulerTouchEnd(), index1), A: index1, B: index1 }); }), b: index0, c: index0 }; }), D: isMove.value ? `/static/index/movemode/targetcheng.png` : `/static/index/movemode/target.png`, E: scrollTop.value, F: __props.canmove && !shakyTable.value, G: common_vendor.o(handleScrolltime), H: cardLeft.value, I: common_vendor.o(handleTop), J: common_vendor.f(bottomItems.value, (item, index2, i0) => { return { a: common_vendor.o(($event) => deletebottom(index2, item.name), index2), b: item.url, c: `-${index2 * 0.1}s`, d: common_vendor.t(item.name), 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 }; }), K: bottomisShaking.value, L: common_vendor.n(bottomisShaking.value ? `super-end-items-img-father-active` : `super-end-items-img-father`), M: scrollLeft.value, N: `/static/index/teeth.png`, O: common_vendor.t((_b = (_a = timearr.value[flyNumber.value.index0]) == null ? void 0 : _a.children[flyNumber.value.index1]) == null ? void 0 : _b.value), P: 2 * openY.value - 350 + "rpx", Q: 2 * openX.value - 780 + "rpx", R: isopacity.value ? 1 : 0, S: ((_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)", T: common_vendor.o(() => { }), U: isopen.value, V: common_vendor.o(($event) => { isopen.value = false; flyNumber.value.index0 = 999; touchindex1.value = -1; }), W: songisopen.value }, songisopen.value ? { X: common_assets._imports_0$3, Y: common_vendor.t(openValue.value.time + ":" + openValue.value.minute), Z: !clickstauts.value, aa: common_vendor.f(openValue.value.array, (item, index2, i0) => { return { a: common_vendor.t(item.title), b: common_vendor.n(cardsumit.value.op.index[1] === index2 ? `arrayindex-one-target` : `arrayindex-one`), c: common_vendor.o(($event) => cardsumit.value.op.index[1] = index2, index2), d: index2 }; }), ab: !clickstauts.value, ac: clickstauts.value === 1, ad: common_vendor.f(secondopenValue.value, (item, index2, i0) => { return { a: item.cycleType === "日常护理", b: cardsumit.value.op.index[2] !== index2 ? `/static/index/ridark.png` : `/static/index/ri.png`, c: item.cycleType === "周期护理", d: cardsumit.value.op.index[2] == index2 ? `/static/index/zhoudark.png` : `/static/index/zhou.png`, e: item.cycleType === "即时护理", f: cardsumit.value.op.index[2] == index2 ? `/static/index/jidark.png` : `/static/index/ji.png`, g: common_vendor.t(item.relName), h: common_vendor.n(cardsumit.value.op.index[2] === index2 ? `arrayindex-one-target` : `arrayindex-one`), i: common_vendor.o(($event) => clickOp(index2, item), index2), j: index2 }; }), ae: clickstauts.value === 1, af: clickstauts.value === 2, ag: common_vendor.n(isweek.value ? `radio-circle-target` : `radio-circle`), ah: common_vendor.o(clickWeek), ai: common_vendor.n(isweek.value && selectType.value ? `radio-font-target` : `radio-font`), aj: common_vendor.o(clickWeek), ak: common_vendor.n(!isweek.value ? `radio-circle-target` : `radio-circle`), al: common_vendor.o(clickMonth), am: common_vendor.n(!isweek.value && selectType.value ? `radio-font-target` : `radio-font`), an: common_vendor.o(clickMonth), ao: clickstauts.value === 2, ap: common_vendor.f(weekDays, (item, index2, i0) => { return { a: common_vendor.t(item), b: common_vendor.n(cardsumit.value.weekTimeNumber === index2 ? `week-one-target` : `week-one`), c: common_vendor.o(($event) => { cardsumit.value.weekTime = item; cardsumit.value.weekTimeNumber = index2; selectType.value = false; }, index2), d: index2 }; }), aq: isweek.value && clickstauts.value === 2, ar: common_vendor.f(common_vendor.unref(days), (item, index2, i0) => { return { a: common_vendor.t(item), b: common_vendor.n(cardsumit.value.monthTimeNumber === index2 ? `month-one-target` : `month-one`), c: common_vendor.o(($event) => { cardsumit.value.monthTime = item; cardsumit.value.monthTimeNumber = index2; selectType.value = false; }, index2), d: index2 }; }), as: !isweek.value && clickstauts.value === 2, at: songisopacity.value ? 1 : 0, av: common_vendor.o(() => { }) } : {}, { aw: common_assets._imports_1$3, ax: common_vendor.t(deletename.value), ay: deleteisopacity.value ? 1 : 0, az: common_vendor.o(() => { }), aA: deleteisopen.value, aB: common_vendor.o(($event) => deleteisopen.value = false), aC: common_assets._imports_1$3, aD: replacementisopacity.value ? 1 : 0, aE: common_vendor.o(() => { }), aF: replacementisopen.value, aG: common_vendor.o(($event) => replacementisopen.value = false), aH: common_assets._imports_1$3, aI: common_vendor.t(deletename.value), aJ: common_vendor.o(($event) => deletedownisopen.value = false), aK: common_vendor.o(($event) => { bottomItems.value.splice(deletebottomindex.value, 1); deletedownisopen.value = false; }), aL: deletedownisopacity.value ? 1 : 0, aM: common_vendor.o(() => { }), aN: deletedownisopen.value, aO: common_vendor.o(($event) => deletedownisopen.value = false), aP: common_assets._imports_11, aQ: common_assets._imports_11, aR: common_vendor.o(clickshare), aS: deletedownisopacity.value ? 1 : 0, aT: common_vendor.o(() => { }), aU: shareShow.value, aV: common_vendor.o(($event) => shareShow.value = false), aW: common_vendor.s(__props.isshow ? { opacity: `1` } : { opacity: `0` }), aX: common_vendor.o(($event) => { bottomisShaking.value = false; shakyTable.value = false; }) }); }; } }); const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-68a73d3d"]]); wx.createComponent(Component); //# sourceMappingURL=../../../.sourcemap/mp-weixin/component/rightItemssecondnew/index.js.map