"use strict"; const common_vendor = require("../../../common/vendor.js"); const common_assets = require("../../../common/assets.js"); if (!Array) { const _component_donghua = common_vendor.resolveComponent("donghua"); _component_donghua(); } const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({ __name: "index", props: { isShow: { type: Boolean, required: true }, propsmove: { type: Number }, isMain: { type: Boolean } }, emits: ["back"], setup(__props, { emit: __emit }) { const props = __props; const movetype = common_vendor.ref(-1); common_vendor.watch( () => props.isMain, (newVal, oldVal) => { if (typeof oldVal !== "boolean") return; if (!props.isShow) return; if (oldVal === true && newVal === false) { movetype.value = 0; zeroIndex.value = 0; typeNow.value = zeroIndex.value; } else if (oldVal === false && newVal === true) { movetype.value = -1; zeroIndex.value = -1; typeNow.value = 0; } } ); const zeroIndex = common_vendor.ref(-1); const emit = __emit; common_vendor.watch( () => props.propsmove, () => { if (movetype.value != -1) { switch (movetype.value) { case 0: switch (props.propsmove) { case 0: movetype.value = -1; zeroIndex.value = -1; emit("back"); break; case 1: if (zeroIndex.value < typeArray.value.length - 1) { zeroIndex.value++; typeNow.value = zeroIndex.value; } break; case 2: movetype.value = 1; zeroIndex.value = 0; break; case 3: if (zeroIndex.value) { zeroIndex.value--; typeNow.value = zeroIndex.value; } else { movetype.value = -1; zeroIndex.value = -1; emit("back"); } break; case 4: typeNow.value = zeroIndex.value; break; } break; case 1: switch (props.propsmove) { case 0: if (zeroIndex.value) { zeroIndex.value--; } else { movetype.value = 0; zeroIndex.value = 0; typeNow.value = zeroIndex.value; } break; case 1: zeroIndex.value = 0; movetype.value = 2; break; case 2: if (zeroIndex.value < 2) { zeroIndex.value++; } else { zeroIndex.value = 0; movetype.value = 3; } break; case 3: movetype.value = -1; zeroIndex.value = -1; emit("back"); break; } break; case 2: switch (props.propsmove) { case 0: if (zeroIndex.value) { zeroIndex.value--; } else { movetype.value = 0; zeroIndex.value = 0; typeNow.value = zeroIndex.value; } break; case 1: zeroIndex.value = 0; movetype.value = 3; break; case 2: if (zeroIndex.value < 2) { zeroIndex.value++; } else { zeroIndex.value = 0; movetype.value = 3; } break; case 3: zeroIndex.value = 0; movetype.value = 1; break; } break; case 3: switch (props.propsmove) { case 0: zeroIndex.value = 0; movetype.value = 1; break; case 1: if (zeroIndex.value === 0) { zeroIndex.value++; } else { zeroIndex.value = 2; movetype.value = 2; } break; case 2: break; case 3: if (zeroIndex.value === 1) { zeroIndex.value--; } else { zeroIndex.value = 2; movetype.value = 1; } break; } break; } } } ); const typeNow = common_vendor.ref(-1); const photoplay = common_vendor.ref(false); common_vendor.ref(); const scrollTop = common_vendor.ref(0); function onScroll(e) { scrollTop.value = e.detail.scrollTop; } function genPaths(base2, prefix, count, ext = "png", startIndex = 0, pad = false) { return Array.from({ length: count }, (_, i) => { const idx = pad ? String(i + startIndex).padStart(2, "0") : i + startIndex; return `${base2}/${prefix}${idx}.${ext}`; }); } const rightMenu = common_vendor.ref([ { url: "/static/index/newindex/rightmenu/0.png", name: "重点追踪" }, { url: "/static/index/newindex/rightmenu/1.png", name: "转单执行" }, { url: "/static/index/newindex/rightmenu/2.png", name: "协助执行" } // { // url: "/static/index/newindex/rightmenu/0.png", // name: '重点追踪' // }, // { // url: "/static/index/newindex/rightmenu/1.png", // name: '转单执行' // }, // { // url: "/static/index/newindex/rightmenu/2.png", // name: '协助执行' // }, ]); const downStates = common_vendor.ref([ { url: "/static/index/newindex/states/0.png", name: "狂躁" }, { url: "/static/index/newindex/states/1.png", name: "易怒" }, { url: "/static/index/newindex/states/2.png", name: "大体重" }, { url: "/static/index/newindex/states/3.png", name: "四肢" } ]); const leftArray = common_vendor.ref(genPaths( "/static/index/newindex/leftmenu", "", 3, // 张数 "png", 0, // 起始索引 false // 不补零 )); common_vendor.ref(genPaths( "/static/index/newindex/huli", "care", 9, // 张数 "png", 0, // 起始索引 false // 不补零 )); const base = genPaths( "/static/index/newindex/curve", "curve_", 9, "png", 1, false ); const blueArray = common_vendor.ref([ ...base, ...[...base].reverse() // 先拷贝一份再反转,避免修改原 base ]); const basesmall = genPaths( "/static/index/newindex/curve", "breathe_", 9, "png", 1, false ); const bluesmallArray = common_vendor.ref([ ...basesmall, ...[...basesmall].reverse() // 先拷贝一份再反转,避免修改原 base ]); const typeArray = common_vendor.ref([ { url: genPaths( "/static/index/newindex/huli", "care", 8, // 张数 "png", 0, // 起始索引为 1 false // 不补零 ), name: "护理类" }, { url: genPaths( "/static/index/newindex/yiliao", "health_", 9, // 张数 "png", 1, // 起始索引为 1 false // 不补零 ), name: "医疗类" }, { url: genPaths( "/static/index/newindex/kufang", "storeroom_", 11, // 张数 "png", 1, // 起始索引为 1 false // 不补零 ), name: "库房类" }, { url: genPaths( "/static/index/newindex/baojie", "clean_", 12, // 张数 "png", 1, // 起始索引为 1 false // 不补零 ), name: "保洁类" }, { url: genPaths( "/static/index/newindex/xiaoxi", "wash_", 14, // 张数 "png", 1, // 起始索引为 1 false // 不补零 ), name: "消洗类" }, { url: genPaths( "/static/index/newindex/kangfu", "recovery_", 6, // 张数 "png", 1, // 起始索引为 1 false // 不补零 ), name: "康复类" } ]); const transition = common_vendor.ref(false); common_vendor.watch( () => props.isShow, (newVal, oldVal) => { if (!oldVal && newVal) { transition.value = false; setTimeout(() => { transition.value = true; }, 50); } else { transition.value = false; } } ); const name = common_vendor.ref(""); common_vendor.onMounted(() => { name.value = common_vendor.index.getStorageSync("realname"); typeNow.value = 0; photoplay.value = true; }); return (_ctx, _cache) => { return { a: common_assets._imports_0$4, b: common_assets._imports_1, c: `/static/index/undericons/man.png`, d: common_vendor.t(name.value), e: common_vendor.f(typeArray.value, (item, index, i0) => { return { a: "5b62ffe9-0-" + i0, b: common_vendor.p({ links: item.url, playing: typeNow.value === index }), c: common_vendor.t(item.name), d: typeNow.value === index ? 1 : "", e: common_vendor.s(typeNow.value === index ? { color: `#008FF5` } : {}), f: index, g: movetype.value === 0 && zeroIndex.value === index ? 1 : "", h: movetype.value === 0 && zeroIndex.value === index ? `#ddf0ff` : ``, i: common_vendor.o(($event) => { typeNow.value = index; zeroIndex.value = index; }, index) }; }), f: common_vendor.p({ width: `1500rpx`, height: `1000rpx`, links: blueArray.value, playing: photoplay.value, loop: true, interval: 120 }), g: common_vendor.p({ width: `800rpx`, height: `500rpx`, links: bluesmallArray.value, playing: photoplay.value, loop: true, interval: 120 }), h: `/static/index/newindex/states/pao.png`, i: `/static/index/newindex/wendu/2.png`, j: `/static/index/newindex/states/left.png`, k: common_vendor.f(downStates.value, (item, index, i0) => { return { a: item.url, b: common_vendor.t(item.name), c: index }; }), l: `/static/index/newindex/states/right.png`, m: movetype.value === 3 && zeroIndex.value === 0 ? 1 : "", n: movetype.value === 3 && zeroIndex.value === 1 ? 1 : "", o: common_vendor.f(leftArray.value, (item, index, i0) => { return { a: item, b: movetype.value === 1 && zeroIndex.value === index ? `#ddf0ff` : ``, c: index, d: movetype.value === 1 && zeroIndex.value === index ? 1 : "" }; }), p: common_vendor.o(($event) => scrollTop.value -= 115), q: common_vendor.o(($event) => scrollTop.value += 115), r: `/static/index/newindex/rightmenu/top.png`, s: common_vendor.o(($event) => scrollTop.value > 0 ? scrollTop.value -= 115 : scrollTop.value = 0), t: common_vendor.f(rightMenu.value, (item, index, i0) => { return { a: item.url, b: common_vendor.t(item.name), c: movetype.value === 2 && zeroIndex.value === index ? `#ddf0ff` : ``, d: movetype.value === 2 && zeroIndex.value === index ? 1 : "" }; }), v: scrollTop.value, w: common_vendor.o(onScroll), x: `/static/index/newindex/rightmenu/bottom.png`, y: common_vendor.o(($event) => scrollTop.value > 55 * rightMenu.value.length ? scrollTop.value = 55 * rightMenu.value.length : scrollTop.value += 115), z: common_vendor.s(transition.value ? { opacity: `1` } : { opacity: `0` }) }; }; } }); const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-5b62ffe9"]]); wx.createComponent(Component); //# sourceMappingURL=../../../../.sourcemap/mp-weixin/pages/NursingNew/component/index.js.map