372 lines
18 KiB
JavaScript
372 lines
18 KiB
JavaScript
"use strict";
|
|
const common_vendor = require("../../common/vendor.js");
|
|
const common_assets = require("../../common/assets.js");
|
|
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
|
__name: "index",
|
|
setup(__props) {
|
|
const currentTime = common_vendor.ref("");
|
|
const fullDate = common_vendor.ref("");
|
|
const weekDay = common_vendor.ref("");
|
|
const iconList = common_vendor.ref([
|
|
{ url: "/static/index/lefticon/index.png", targetUrl: "/static/index/lefticontarget/blueindex.png" },
|
|
{ url: "/static/index/lefticon/nurse.png", targetUrl: "/static/index/lefticontarget/bluenurse.png" },
|
|
{ url: "/static/index/lefticon/doctor.png", targetUrl: "/static/index/lefticontarget/bluedoctor.png" },
|
|
{ url: "/static/index/lefticon/give.png", targetUrl: "/static/index/lefticontarget/givedark.png" },
|
|
{ url: "/static/index/lefticon/wifi.png", targetUrl: "/static/index/lefticontarget/bluewifi.png" },
|
|
{ url: "/static/index/lefticon/back.png", targetUrl: "/static/index/lefticontarget/blueback.png" }
|
|
]);
|
|
const undericonList = common_vendor.ref([
|
|
{ url: "/static/index/undericons/alarm.png", targetUrl: "/static/index/undericons/alarmdark.png" },
|
|
{ url: "/static/index/undericons/linshitime.png", targetUrl: "/static/index/undericons/linshitimedark.png" }
|
|
]);
|
|
const huliList = common_vendor.ref([
|
|
{ url: "/static/index/hulilist/zhuandan.png", name: "转单执行" },
|
|
{ url: "/static/index/hulilist/xiezhu.png", name: "协助执行" },
|
|
{ url: "/static/index/hulilist/zhongdian.png", name: "重点追踪" }
|
|
]);
|
|
const huliListDark = common_vendor.ref([
|
|
{ url: "/static/index/darkicon/zhuandandark.png", name: "转单执行" },
|
|
{ url: "/static/index/darkicon/xiezhudark.png", name: "协助执行" },
|
|
{ url: "/static/index/darkicon/zhongdiandark.png", name: "重点追踪" }
|
|
]);
|
|
const mediumList = common_vendor.ref([
|
|
{ url: "/static/index/medium/yaopin.png", name: "药品信息", number: 0 },
|
|
{ url: "/static/index/medium/qingling.png", name: "请领指令", number: 60 },
|
|
{ url: "/static/index/medium/peiyao.png", name: "配药指令", number: 100 },
|
|
{ url: "/static/index/medium/xinxi.png", name: "信息反馈", number: 0 },
|
|
{ url: "/static/index/medium/xinxi.png", name: "信息反馈2", number: 0 }
|
|
]);
|
|
const mediumListdark = common_vendor.ref([
|
|
{ url: "/static/index/darkicon/yaopindark.png", name: "药品信息", number: 55 },
|
|
{ url: "/static/index/darkicon/qinglingdark.png", name: "请领指令", number: 10 },
|
|
{ url: "/static/index/darkicon/peiyaodark.png", name: "配药指令", number: 100 },
|
|
{ url: "/static/index/darkicon/xinxidark.png", name: "信息反馈", number: 15 },
|
|
{ url: "/static/index/darkicon/xinxidark.png", name: "信息反馈2", number: 20 }
|
|
]);
|
|
const roomBtttonList = common_vendor.ref([
|
|
{ url: "/static/index/roomicons/zhaoming.png", targetUrl: "/static/index/roomicons/zhaomingtar.png", name: "照明" },
|
|
{ url: "/static/index/roomicons/kongtiao.png", targetUrl: "/static/index/roomicons/kongtiaotar.png", name: "空调" },
|
|
{ url: "/static/index/roomicons/nuanfeng.png", targetUrl: "/static/index/roomicons/nuanfengtar.png", name: "暖风" },
|
|
{ url: "/static/index/roomicons/dianqi.png", targetUrl: "/static/index/roomicons/dianqitar.png", name: "电器" }
|
|
]);
|
|
const roomBtttonListdark = common_vendor.ref([
|
|
{ url: "/static/index/darkicon/zhaomingdark.png", targetUrl: "/static/index/roomicons/zhaomingtar.png", name: "照明" },
|
|
{ url: "/static/index/darkicon/kontiaodark.png", targetUrl: "/static/index/roomicons/kongtiaotar.png", name: "空调" },
|
|
{ url: "/static/index/darkicon/nuanfengdark.png", targetUrl: "/static/index/roomicons/nuanfengtar.png", name: "暖风" },
|
|
{ url: "/static/index/darkicon/dianqidark.png", targetUrl: "/static/index/roomicons/dianqitar.png", name: "电器" }
|
|
]);
|
|
const menuIndex = common_vendor.ref(0);
|
|
const undermenuIndex = common_vendor.ref(0);
|
|
const darkFans = common_vendor.ref(false);
|
|
common_vendor.ref(false);
|
|
const roomTar = common_vendor.ref([]);
|
|
const firstcurrentIndex = common_vendor.ref(0);
|
|
const firstcurrentIndexup = common_vendor.ref(0);
|
|
const secondcurrentIndexup = common_vendor.ref(0);
|
|
const secondcurrentIndex = common_vendor.ref(0);
|
|
const thirdcurrentIndex = common_vendor.ref(0);
|
|
const changeMenu = (index) => {
|
|
menuIndex.value = index;
|
|
};
|
|
const changeMenuUnder = (index) => {
|
|
undermenuIndex.value = index;
|
|
};
|
|
const saveItem = (index) => {
|
|
if (roomTar.value.includes(index)) {
|
|
let array = [];
|
|
roomTar.value.forEach((res) => {
|
|
if (res !== index) {
|
|
array.push(res);
|
|
}
|
|
});
|
|
roomTar.value = array;
|
|
} else {
|
|
roomTar.value.push(index);
|
|
}
|
|
};
|
|
const updateTime = () => {
|
|
const now = /* @__PURE__ */ new Date();
|
|
const hours = now.getHours().toString().padStart(2, "0");
|
|
const minutes = now.getMinutes().toString().padStart(2, "0");
|
|
currentTime.value = `${hours}:${minutes}`;
|
|
const year = now.getFullYear();
|
|
const month = (now.getMonth() + 1).toString().padStart(2, "0");
|
|
const day = now.getDate().toString().padStart(2, "0");
|
|
fullDate.value = `${year}年${month}月${day}日`;
|
|
const weekDays = ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"];
|
|
const week = weekDays[now.getDay()];
|
|
weekDay.value = week;
|
|
};
|
|
const onSwiperChange = (event) => {
|
|
firstcurrentIndexup.value = event.detail.current;
|
|
};
|
|
const onSwiperChangesec = (event) => {
|
|
secondcurrentIndexup.value = event.detail.current;
|
|
};
|
|
const gotoLogin = () => {
|
|
};
|
|
common_vendor.onMounted(() => {
|
|
updateTime();
|
|
setInterval(updateTime, 1e3);
|
|
});
|
|
common_vendor.onBeforeUnmount(() => {
|
|
clearInterval(updateTime);
|
|
});
|
|
return (_ctx, _cache) => {
|
|
return common_vendor.e({
|
|
a: common_assets._imports_0,
|
|
b: common_vendor.n(darkFans.value ? `left-head-font-dark` : `left-head-font`),
|
|
c: common_vendor.o(gotoLogin),
|
|
d: common_vendor.f(iconList.value, (item, index, i0) => {
|
|
return {
|
|
a: index === menuIndex.value,
|
|
b: index === menuIndex.value ? item.targetUrl : item.url,
|
|
c: common_vendor.o(($event) => changeMenu(index), index),
|
|
d: index
|
|
};
|
|
}),
|
|
e: `/static/index/ray.png`,
|
|
f: common_vendor.n(darkFans.value ? `right-container-title-no-dark` : `right-container-title-no`),
|
|
g: common_vendor.n(darkFans.value ? `right-container-title-class-dark` : `right-container-title-class`),
|
|
h: `/static/index/undericons/man.png`,
|
|
i: common_vendor.n(darkFans.value ? `right-icons-font-dark` : `right-icons-font`),
|
|
j: darkFans.value ? `/static/index/undericons/face.png` : `/static/index/undericons/facelight.png`,
|
|
k: darkFans.value ? `/static/index/undericons/hand.png` : `/static/index/undericons/handlight.png`,
|
|
l: darkFans.value ? `/static/index/undericons/out.png` : `/static/index/undericons/outlight.png`,
|
|
m: common_vendor.o(($event) => darkFans.value = !darkFans.value),
|
|
n: !darkFans.value,
|
|
o: common_vendor.s(darkFans.value ? {
|
|
color: "black"
|
|
} : {}),
|
|
p: common_vendor.s(darkFans.value ? {
|
|
backgroundColor: "#fff"
|
|
} : {}),
|
|
q: common_vendor.o(($event) => darkFans.value = !darkFans.value),
|
|
r: darkFans.value,
|
|
s: `/static/index/hulilei.png`,
|
|
t: darkFans.value
|
|
}, darkFans.value ? {
|
|
v: `/static/index/cardbgc/uplight.png`
|
|
} : {}, {
|
|
w: common_vendor.f([1, 2, 3], (item, index, i0) => {
|
|
return {
|
|
a: index,
|
|
b: common_vendor.s(index === firstcurrentIndexup.value ? {
|
|
backgroundColor: `#01A0FE`
|
|
} : {})
|
|
};
|
|
}),
|
|
x: common_vendor.n(darkFans.value ? `dot-dark` : `dot`),
|
|
y: common_vendor.f([1, 2, 3], (item, index, i0) => {
|
|
return common_vendor.e({
|
|
a: common_vendor.f([1, 2, 3], (item2, index2, i1) => {
|
|
return {
|
|
a: index2
|
|
};
|
|
})
|
|
}, darkFans.value ? {
|
|
b: `/static/index/cardbgc/leftlight.png`
|
|
} : {}, {
|
|
c: index
|
|
});
|
|
}),
|
|
z: `/static/index/daizhixing.png`,
|
|
A: `/static/index/teeth.png`,
|
|
B: darkFans.value ? `/static/index/darkicon/labadark.png` : `/static/index/laba.png`,
|
|
C: common_vendor.n(darkFans.value ? `right-container-fir-left-card-main-font-dark` : `right-container-fir-left-card-main-font`),
|
|
D: darkFans.value ? `/static/index/indexvideo.png` : `/static/index/indexvideo.png`,
|
|
E: common_vendor.n(darkFans.value ? `time-font-dark` : `time-font`),
|
|
F: common_vendor.n(darkFans.value ? `time-text-dark` : `time-text`),
|
|
G: darkFans.value ? `/static/index/darkicon/zhixingpeopledark.png` : `/static/index/cardicons/zhixing.png`,
|
|
H: common_vendor.n(darkFans.value ? `time-people-font-dark` : `time-people-font`),
|
|
I: darkFans.value ? `/static/index/medium/dopeopledark.png` : `/static/index/cardicons/zhifa.png`,
|
|
J: common_vendor.n(darkFans.value ? `time-people-font-dark` : `time-people-font`),
|
|
K: common_vendor.n(darkFans.value ? `time-button-end-dark` : `time-button-end`),
|
|
L: firstcurrentIndex.value,
|
|
M: darkFans.value,
|
|
N: firstcurrentIndexup.value,
|
|
O: common_vendor.o(onSwiperChange),
|
|
P: `/static/index/hulilist/shang.png`,
|
|
Q: !darkFans.value
|
|
}, !darkFans.value ? {
|
|
R: common_vendor.f(huliList.value, (item, index, i0) => {
|
|
return {
|
|
a: item.url,
|
|
b: common_vendor.t(item.name),
|
|
c: index
|
|
};
|
|
})
|
|
} : {}, {
|
|
S: darkFans.value
|
|
}, darkFans.value ? {
|
|
T: common_vendor.f(huliListDark.value, (item, index, i0) => {
|
|
return {
|
|
a: item.url,
|
|
b: common_vendor.t(item.name),
|
|
c: index
|
|
};
|
|
})
|
|
} : {}, {
|
|
U: `/static/index/hulilist/xia.png`,
|
|
V: common_vendor.n(darkFans.value ? `right-container-fir-left-card-dark` : `right-container-fir-left-card`),
|
|
W: common_vendor.f([1, 2, 3, 4], (item, index, i0) => {
|
|
return {
|
|
a: index
|
|
};
|
|
}),
|
|
X: common_assets._imports_1,
|
|
Y: common_vendor.t(currentTime.value),
|
|
Z: common_vendor.n(darkFans.value ? `right-container-title-dark` : `right-container-title`),
|
|
aa: common_vendor.t(fullDate.value),
|
|
ab: common_vendor.n(darkFans.value ? `right-container-date-dark` : `right-container-date`),
|
|
ac: common_vendor.t(weekDay.value),
|
|
ad: common_vendor.n(darkFans.value ? `right-container-day-dark` : `right-container-day`),
|
|
ae: darkFans.value ? `/static/index/darkicon/wendudark.png` : `/static/index/roomicons/wendu.png`,
|
|
af: common_vendor.n(darkFans.value ? `right-container-tem-text-dark` : `right-container-tem-text`),
|
|
ag: darkFans.value ? `/static/index/roomicons/shidu.png` : `/static/index/darkicon/shidudark.png`,
|
|
ah: common_vendor.n(darkFans.value ? `right-container-tem-text-dark` : `right-container-tem-text`),
|
|
ai: !darkFans.value
|
|
}, !darkFans.value ? {
|
|
aj: common_vendor.f(roomBtttonList.value, (item, index, i0) => {
|
|
return {
|
|
a: roomTar.value.includes(index),
|
|
b: roomTar.value.includes(index) ? item.targetUrl : item.url,
|
|
c: common_vendor.o(($event) => saveItem(index), index),
|
|
d: common_vendor.t(item.name),
|
|
e: common_vendor.s(roomTar.value.includes(index) ? {
|
|
color: "#167ED7"
|
|
} : {}),
|
|
f: index
|
|
};
|
|
}),
|
|
ak: `/static/index/cardicons/ray2.png`
|
|
} : {}, {
|
|
al: darkFans.value
|
|
}, darkFans.value ? {
|
|
am: common_vendor.f(roomBtttonListdark.value, (item, index, i0) => {
|
|
return {
|
|
a: roomTar.value.includes(index),
|
|
b: roomTar.value.includes(index) ? item.targetUrl : item.url,
|
|
c: common_vendor.o(($event) => saveItem(index), index),
|
|
d: common_vendor.t(item.name),
|
|
e: common_vendor.s(roomTar.value.includes(index) ? {
|
|
color: "#167ED7"
|
|
} : {
|
|
color: "#fff"
|
|
}),
|
|
f: index
|
|
};
|
|
}),
|
|
an: `/static/index/cardicons/ray2.png`
|
|
} : {}, {
|
|
ao: common_vendor.n(darkFans.value ? `right-container-fir-right-dark` : `right-container-fir-right`),
|
|
ap: `/static/index/yiliao/yiliaolei.png`,
|
|
aq: common_vendor.f([1, 2, 3], (item, index, i0) => {
|
|
return {
|
|
a: index,
|
|
b: common_vendor.s(index === secondcurrentIndexup.value ? {
|
|
backgroundColor: `#01A0FE`
|
|
} : {})
|
|
};
|
|
}),
|
|
ar: common_vendor.n(darkFans.value ? `dot-dark` : `dot`),
|
|
as: darkFans.value
|
|
}, darkFans.value ? {
|
|
at: `/static/index/cardbgc/uplight.png`
|
|
} : {}, {
|
|
av: common_vendor.f([1, 2, 3], (item, index, i0) => {
|
|
return {
|
|
a: common_vendor.f([1, 2, 3], (item2, index2, i1) => {
|
|
return {
|
|
a: index2
|
|
};
|
|
}),
|
|
b: index
|
|
};
|
|
}),
|
|
aw: common_vendor.n(darkFans.value ? `time-font-dark` : `time-font`),
|
|
ax: darkFans.value ? `/static/index/medium/doctorsaydark.png` : `/static/index/medium/doctorsay.png`,
|
|
ay: common_vendor.n(darkFans.value ? `time-people-font-dark` : `time-people-font`),
|
|
az: darkFans.value ? `/static/index/medium/howtododark.png` : `/static/index/medium/howtodo.png`,
|
|
aA: common_vendor.n(darkFans.value ? `time-people-font-dark` : `time-people-font`),
|
|
aB: darkFans.value ? `/static/index/medium/useMed.png` : `/static/index/medium/yongyao.png`,
|
|
aC: common_vendor.n(darkFans.value ? `time-people-font-dark` : `time-people-font`),
|
|
aD: darkFans.value ? `/static/index/medium/domanydark.png` : `/static/index/medium/domany.png`,
|
|
aE: common_vendor.n(darkFans.value ? `time-people-font-dark` : `time-people-font`),
|
|
aF: common_vendor.n(darkFans.value ? `time-button-end-dark` : `time-button-end`),
|
|
aG: `/static/index/yiliao/project2.png`,
|
|
aH: common_vendor.n(darkFans.value ? `right-container-photo-text-dark` : `right-container-photo-text`),
|
|
aI: secondcurrentIndex.value,
|
|
aJ: secondcurrentIndexup.value,
|
|
aK: common_vendor.o(onSwiperChangesec),
|
|
aL: darkFans.value
|
|
}, darkFans.value ? {
|
|
aM: `/static/index/cardbgc/leftlight.png`
|
|
} : {}, {
|
|
aN: `/static/index/hulilist/shang.png`,
|
|
aO: !darkFans.value
|
|
}, !darkFans.value ? {
|
|
aP: common_vendor.f(mediumList.value, (item, index, i0) => {
|
|
return {
|
|
a: item.url,
|
|
b: common_vendor.t(item.name),
|
|
c: `${item.number}%`,
|
|
d: item.number !== 0,
|
|
e: index
|
|
};
|
|
})
|
|
} : {}, {
|
|
aQ: darkFans.value
|
|
}, darkFans.value ? {
|
|
aR: common_vendor.f(mediumListdark.value, (item, index, i0) => {
|
|
return {
|
|
a: item.url,
|
|
b: common_vendor.t(item.name),
|
|
c: `${item.number}%`,
|
|
d: item.number !== 0,
|
|
e: index
|
|
};
|
|
})
|
|
} : {}, {
|
|
aS: `/static/index/hulilist/xia.png`,
|
|
aT: common_vendor.n(darkFans.value ? `right-container-left-dark` : `right-container-left`),
|
|
aU: common_vendor.n(darkFans.value ? `right-container-right-text-dark` : `right-container-right-text`),
|
|
aV: darkFans.value ? `/static/index/darkicon/diandark.png` : `/static/index/medium/whitedian.png`,
|
|
aW: common_vendor.f([1, 2, 3], (item, index, i0) => {
|
|
return {
|
|
a: index
|
|
};
|
|
}),
|
|
aX: darkFans.value ? `/static/index/darkicon/baojieleidark.png` : `/static/index/label.png`,
|
|
aY: common_vendor.n(darkFans.value ? `right-container-right-down-card-card-font-dark` : `right-container-right-down-card-card-font`),
|
|
aZ: `/static/index/project3.png`,
|
|
ba: common_vendor.n(darkFans.value ? `right-container-right-down-card-font-dark` : `right-container-right-down-card-font`),
|
|
bb: common_vendor.n(darkFans.value ? `time-font-dark` : `time-font`),
|
|
bc: darkFans.value ? `/static/index/darkicon/zhixingrenyuanddark.png` : `/static/index/cardicons/zhifa.png`,
|
|
bd: common_vendor.n(darkFans.value ? `time-people-font-dark` : `time-people-font`),
|
|
be: darkFans.value ? `/static/index/darkicon/zhixingfangshidark.png` : `/static/index/cardicons/zhixing.png`,
|
|
bf: common_vendor.n(darkFans.value ? `time-people-font-dark` : `time-people-font`),
|
|
bg: common_vendor.n(darkFans.value ? `time-button-end-dark` : `time-button-end`),
|
|
bh: common_vendor.n(darkFans.value ? `right-container-right-down-card-dark` : `right-container-right-down-card`),
|
|
bi: thirdcurrentIndex.value,
|
|
bj: common_vendor.s(darkFans.value ? {
|
|
backgroundColor: "rgb(22, 48, 76)"
|
|
} : ""),
|
|
bk: common_vendor.f(undericonList.value, (item, index, i0) => {
|
|
return {
|
|
a: index === undermenuIndex.value,
|
|
b: index === undermenuIndex.value ? item.targetUrl : item.url,
|
|
c: index,
|
|
d: common_vendor.o(($event) => changeMenuUnder(index), index)
|
|
};
|
|
}),
|
|
bl: common_assets._imports_2,
|
|
bm: common_vendor.n(darkFans.value ? `darkbackgroundContainer` : `backgroundContainer`)
|
|
});
|
|
};
|
|
}
|
|
});
|
|
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-1cf27b2a"]]);
|
|
wx.createPage(MiniProgramPage);
|
|
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/index/index.js.map
|