hldy_xcx/unpackage/dist/dev/mp-weixin/pages/yuangongindex/index.js

145 lines
5.2 KiB
JavaScript

"use strict";
const common_vendor = require("../../common/vendor.js");
const pages_addstaff_api_addjigou = require("../addstaff/api/addjigou.js");
const pages_yuangongindex_api = require("./api.js");
if (!Math) {
(model + downMenu)();
}
const downMenu = () => "../../compontent/public/yuangongdownmenu.js";
const model = () => "../../compontent/public/model.js";
const _sfc_main = {
__name: "index",
setup(__props) {
const show = common_vendor.ref(false);
const content = common_vendor.ref("");
const buttonArray = common_vendor.ref(["技能培训", "考勤排班", "每日工作", "员工功能", "员工功能", "员工功能", "员工功能"]);
const statusarray = ["loading", "success", "fail"];
const which = common_vendor.ref(0);
const searchjigou = () => {
common_vendor.index.navigateTo({
url: "/pages/yuangongindex/searchjigou"
});
};
const changecard = (e) => {
which.value = e;
whichMenu.value = which.value;
};
const moveend = () => {
which.value = menuArray.value.length;
whichMenu.value = which.value;
};
const look = (element) => {
common_vendor.index.navigateTo({
url: `/pages/yuangongindex/workjoin`
});
};
const again = (item) => {
common_vendor.index.navigateTo({
url: "/pages/yuangongindex/searchjigou"
});
};
const whichMenu = common_vendor.ref(0);
const swiperchange = (res) => {
whichMenu.value = res.detail.current;
which.value = res.detail.current;
};
common_vendor.onMounted(async () => {
});
common_vendor.onUnmounted(() => {
});
const menuArray = common_vendor.ref([]);
const loadingData = () => {
common_vendor.index.getStorage({
key: "openid",
success: function(res) {
pages_yuangongindex_api.getIndex(res.data).then((res2) => {
menuArray.value = res2.result;
menuArray.value.push({
applyStatus: `-1`
});
});
pages_addstaff_api_addjigou.getMessageList(res.data).then((res2) => {
common_vendor.index.setStorageSync("staff", res2.result[0]);
});
}
});
};
common_vendor.onShow(() => {
loadingData();
});
return (_ctx, _cache) => {
return {
a: common_vendor.o(($event) => show.value = false),
b: common_vendor.p({
show: show.value,
content: content.value
}),
c: common_vendor.f(menuArray.value, (item, index, i0) => {
return common_vendor.e({
a: item.applyStatus == `1`
}, item.applyStatus == `1` ? {
b: `https://www.focusnu.com/media/directive/index/refresh.png`,
c: common_vendor.o(loadingData, index)
} : {}, {
d: item.applyStatus == `1`
}, item.applyStatus == `1` ? {
e: `https://www.focusnu.com/media/directive/index/${statusarray[Number(item.applyStatus) - 1]}.png`,
f: common_vendor.t(item.comName),
g: common_vendor.o(($event) => look(), index)
} : {}, {
h: item.applyStatus == `3`
}, item.applyStatus == `3` ? {
i: `https://www.focusnu.com/media/directive/index/${statusarray[Number(item.applyStatus) - 1]}.png`,
j: common_vendor.t(item.comName),
k: common_vendor.o(($event) => again(), index)
} : {}, {
l: item.applyStatus == `2`
}, item.applyStatus == `2` ? {
m: common_vendor.f(buttonArray.value, (item2, index2, i1) => {
return {
a: `https://www.focusnu.com/media/directive/index/addstaff/${index2}.png`,
b: common_vendor.t(item2),
c: index2
};
})
} : {}, {
n: item.applyStatus == `-1`
}, item.applyStatus == `-1` ? {} : {}, {
o: item.applyStatus == `-1`
}, item.applyStatus == `-1` ? {
p: common_vendor.o(($event) => searchjigou(), index)
} : {}, {
q: item.applyStatus == `2`
}, item.applyStatus == `2` ? {} : {}, {
r: index
});
}),
d: `100vh`,
e: which.value,
f: common_vendor.o(swiperchange),
g: common_vendor.f(menuArray.value, (item, index, i0) => {
return common_vendor.e({
a: index != menuArray.value.length - 1
}, index != menuArray.value.length - 1 ? {
b: common_vendor.n(whichMenu.value == index ? `black-box` : `gray-box`)
} : {}, {
c: index == menuArray.value.length - 1
}, index == menuArray.value.length - 1 ? {
d: `https://www.focusnu.com/media/directive/index/bluejia.png`,
e: common_vendor.o(moveend, index)
} : {}, {
f: index,
g: common_vendor.o(($event) => changecard(index), index)
});
}),
h: common_vendor.p({
itemTarget: 0
})
};
};
}
};
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-f6d04c18"]]);
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/yuangongindex/index.js.map