hldy_app/unpackage/dist/dev/mp-weixin/component/Initialization/fuwu.js

352 lines
12 KiB
JavaScript
Raw Normal View History

2025-08-21 16:51:53 +08:00
"use strict";
const common_vendor = require("../../common/vendor.js");
const common_assets = require("../../common/assets.js");
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "fuwu",
props: { isShow: { type: Boolean, required: true } },
emits: ["nav"],
setup(__props, { emit: __emit }) {
const props = __props;
const bottomballarray = common_vendor.ref([
`清晰度`,
`分屏`,
`画面旋转`
// "/static/index/video/videobottom/0.png",
// "/static/index/video/videobottom/1.png",
// "/static/index/video/videobottom/2.png",
// "/static/index/video/videobottom/3.png",
// "/static/index/video/videobottom/4.png"
]);
const rightballarray = common_vendor.ref([
{
url: `/static/index/video/videotopright/0.png`,
name: `入住`,
bgc: `linear-gradient(to right,#008AFF,#01BCFF)`
},
{
url: `/static/index/video/videotopright/1.png`,
name: `预警`,
bgc: `linear-gradient(to right,#FF585D ,#FF4F52)`
},
{
url: `/static/index/video/videotopright/2.png`,
name: `外出`,
bgc: `linear-gradient(to right,#709EE2 ,#A0BFEC )`
},
{
url: `/static/index/video/videotopright/3.png`,
name: `空闲`,
bgc: `linear-gradient(to right,#B7BCD0,#B7BCD0)`
}
]);
const kufangarray = common_vendor.ref([
{
url: `/static/index/video/kufang/00.png`,
targeturl: `/static/index/video/kufang/01.png`,
name: `盘点`
},
{
url: `/static/index/video/kufang/10.png`,
targeturl: `/static/index/video/kufang/11.png`,
name: `请领`
},
{
url: `/static/index/video/kufang/20.png`,
targeturl: `/static/index/video/kufang/21.png`,
name: `退货`
},
{
url: `/static/index/video/kufang/30.png`,
targeturl: `/static/index/video/kufang/31.png`,
name: `采购`
},
{
url: `/static/index/video/kufang/40.png`,
targeturl: `/static/index/video/kufang/41.png`,
name: `指令`
}
]);
const rightballarrayspec = common_vendor.ref([
{
url: `/static/index/video/videotopright/4.png`,
name: `启用`,
bgc: `linear-gradient(to right,#008AFF,#01BCFF)`
},
{
url: `/static/index/video/videotopright/5.png`,
name: `停用`,
bgc: `linear-gradient(to right,#B7BCD0,#B7BCD0)`
}
]);
const righttoparray = common_vendor.ref([
{
url: `/static/index/video/videoright/00.png`,
targeturl: `/static/index/video/videoright/01.png`
},
{
url: `/static/index/video/videoright/10.png`,
targeturl: `/static/index/video/videoright/11.png`
},
{
url: `/static/index/video/videoright/20.png`,
targeturl: `/static/index/video/videoright/21.png`
},
{
url: `/static/index/video/videoright/30.png`,
targeturl: `/static/index/video/videoright/31.png`
},
{
url: `/static/index/video/videoright/40.png`,
targeturl: `/static/index/video/videoright/41.png`
}
]);
const cardarray = common_vendor.ref([
{
cardtype: 0,
states: 0,
buttontarget: [false, false, false, false, false]
},
{
cardtype: 0,
states: 1,
buttontarget: [false, false, false, false, false]
},
{
cardtype: 0,
states: 2,
buttontarget: [false, false, false, false, false]
},
{
cardtype: 0,
states: 3,
buttontarget: [false, false, false, false, false]
},
{
cardtype: 0,
states: 0,
buttontarget: [false, false, false, false, false]
},
{
cardtype: 1,
states: 0,
movestates: 0,
buttontarget: [false, false, false, false, false]
},
{
cardtype: 1,
states: 1,
movestates: 1,
buttontarget: [false, false, false, false, false]
},
{
cardtype: 1,
states: 0,
movestates: 2,
buttontarget: [false, false, false, false, false]
},
{
cardtype: 1,
states: 0,
movestates: 3,
buttontarget: [false, false, false, false, false]
},
{
cardtype: 1,
states: 0,
movestates: 4,
buttontarget: [false, false, false, false, false]
}
]);
const changearray = common_vendor.ref([]);
const transition = common_vendor.ref(true);
common_vendor.ref("");
const tabsArray = common_vendor.ref(["全部", " 护理单元", "配务室", "库房"]);
common_vendor.watch(
() => props.isShow,
(newVal, oldVal) => {
if (!oldVal && newVal) {
transition.value = false;
setTimeout(() => transition.value = true, 50);
tabnumber.value = 0;
changearray.value = JSON.parse(JSON.stringify(cardarray.value));
}
}
);
const name = common_vendor.ref("");
common_vendor.onLoad(() => {
name.value = common_vendor.index.getStorageSync("realname");
changearray.value = JSON.parse(JSON.stringify(cardarray.value));
});
const tabnumber = common_vendor.ref(0);
const clicktab = (index) => {
if (tabnumber.value !== index) {
tabnumber.value = index;
switch (index) {
case 0:
changearray.value = JSON.parse(JSON.stringify(cardarray.value));
break;
case 1:
changearray.value = [];
cardarray.value.forEach((element) => {
if (!element.cardtype) {
changearray.value.push(element);
}
});
break;
case 2:
changearray.value = [];
break;
case 3:
changearray.value = [];
cardarray.value.forEach((element) => {
if (element.cardtype === 1) {
changearray.value.push(element);
}
});
break;
default:
return "";
}
}
};
const jumptodanyuan = () => {
common_vendor.index.navigateTo({
url: "/pages/NursingNew/index"
});
};
const jumptokufang = () => {
common_vendor.index.navigateTo({
url: "/pages/Warehousing/index"
});
};
return (_ctx, _cache) => {
return {
a: common_vendor.f(tabsArray.value, (item, index, i0) => {
return {
a: common_vendor.t(item),
b: common_vendor.s(tabnumber.value === index ? {
fontWeight: 800
} : {}),
c: tabnumber.value === index,
d: index,
e: common_vendor.o(($event) => clicktab(index), index)
};
}),
b: common_vendor.f(changearray.value, (item0, index0, i0) => {
return common_vendor.e({
a: !item0.cardtype
}, !item0.cardtype ? common_vendor.e({
b: common_assets._imports_0$2,
c: common_vendor.f(bottomballarray.value, (item1, index1, i1) => {
return {
a: common_vendor.t(item1),
b: index1
};
}),
d: `/static/index/video/videobottom/${item0.states === 1 ? 1 : 0}.png`,
e: common_vendor.f(righttoparray.value, (item1, index1, i1) => {
var _a, _b;
return {
a: ((_a = cardarray.value[index0]) == null ? void 0 : _a.buttontarget[index1]) ? item1.targeturl : item1.url,
b: (_b = cardarray.value[index0]) == null ? void 0 : _b.buttontarget[index1],
c: index1,
d: common_vendor.o(($event) => cardarray.value[index0].buttontarget[index1] = !cardarray.value[index0].buttontarget[index1], index1)
};
}),
f: common_assets._imports_1$13,
g: common_assets._imports_2$9,
h: rightballarray.value[item0.states].url,
i: common_vendor.t(rightballarray.value[item0.states].name),
j: common_vendor.s(`background: ${rightballarray.value[item0.states].bgc};`),
k: item0.states == 1 || !item0.states
}, item0.states == 1 || !item0.states ? {
l: common_assets._imports_0$15,
m: common_vendor.o(jumptodanyuan, index0),
n: common_assets._imports_4,
o: common_assets._imports_5,
p: common_assets._imports_6,
q: common_assets._imports_7$2,
r: common_assets._imports_8$2
} : {}, {
s: item0.states == 2
}, item0.states == 2 ? {
t: common_assets._imports_9$2,
v: common_vendor.o(jumptodanyuan, index0)
} : {}, {
w: item0.states == 3
}, item0.states == 3 ? {
x: common_assets._imports_10$2,
y: common_vendor.o(jumptodanyuan, index0)
} : {}, {
z: common_vendor.s(item0.states === 1 ? {
border: `2rpx solid red`,
boxShadow: `none`
} : {})
}) : {}, {
A: item0.cardtype
}, item0.cardtype ? common_vendor.e({
B: common_assets._imports_11$2,
C: common_vendor.f(kufangarray.value, (item, index2, i1) => {
return {
a: item0.movestates === index2 ? item.targeturl : item.url,
b: common_vendor.t(item.name),
c: common_vendor.s(item0.movestates === index2 ? {
color: `#0096ff`
} : {}),
d: index2
};
}),
D: common_vendor.f(bottomballarray.value, (item1, index1, i1) => {
return {
a: common_vendor.t(item1),
b: index1
};
}),
E: `/static/index/video/videobottom/${item0.states === 1 ? 1 : 0}.png`,
F: common_vendor.f(righttoparray.value, (item1, index1, i1) => {
var _a, _b, _c;
return {
a: ((_a = cardarray.value[index0]) == null ? void 0 : _a.buttontarget[index1]) ? item1.targeturl : item1.url,
b: (_b = cardarray.value[index0]) == null ? void 0 : _b.buttontarget[index1],
c: index1,
d: common_vendor.n(((_c = cardarray.value[index0]) == null ? void 0 : _c.buttontarget[index1]) ? `blue-ball-father-target` : `blue-ball-father`),
e: common_vendor.o(($event) => cardarray.value[index0].buttontarget[index1] = !cardarray.value[index0].buttontarget[index1], index1)
};
}),
G: common_assets._imports_1$13,
H: common_assets._imports_2$9,
I: rightballarrayspec.value[item0.states].url,
J: common_vendor.t(rightballarrayspec.value[item0.states].name),
K: common_vendor.s(`background: ${rightballarrayspec.value[item0.states].bgc};`),
L: !item0.states
}, !item0.states ? {
M: common_assets._imports_0$15,
N: common_vendor.o(jumptokufang, index0),
O: common_assets._imports_4,
P: common_assets._imports_5,
Q: common_assets._imports_6,
R: common_assets._imports_7$2,
S: common_assets._imports_8$2
} : {}, {
T: item0.states == 1
}, item0.states == 1 ? {
U: common_assets._imports_12$1,
V: common_vendor.o(jumptokufang, index0)
} : {}) : {}, {
W: index0
});
}),
c: __props.isShow,
d: common_vendor.s(transition.value ? {
opacity: `1`
} : {
opacity: `0`
})
};
};
}
});
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-7e18bee5"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/component/Initialization/fuwu.js.map