"use strict"; const common_vendor = require("../../common/vendor.js"); const pages_addjigou_api_addjigou = require("../addjigou/api/addjigou.js"); if (!Math) { downMenu(); } const downMenu = () => "../../compontent/public/downmenu.js"; const _sfc_main = { __name: "index", setup(__props) { const buttonArray = common_vendor.ref(["单元", "仓库", "后勤", "工区", "办公室 ", "员工", "机构维护"]); const which = common_vendor.ref(0); const changecard = (e) => { which.value = e; whichMenu.value = which.value; }; const moveend = () => { which.value = menuArray.value.length; whichMenu.value = which.value; }; const addjigou = () => { common_vendor.index.setStorageSync("specicalid", ""); common_vendor.index.setStorageSync("baddata", ""); common_vendor.index.setStorageSync("backhuancun", {}); common_vendor.index.navigateTo({ url: `/pages/addjigou/name` }); }; const look = (element) => { common_vendor.index.navigateTo({ url: `/pages/addjigou/all?element=${JSON.stringify(element)}` }); }; const jumptolist = () => { common_vendor.index.navigateTo({ url: `/pages/login/workjoin?type=1` }); }; const again = (item) => { common_vendor.index.__f__("log", "at pages/index/index.vue:245", "????", item); common_vendor.index.setStorageSync("baddata", item); common_vendor.index.setStorageSync("specicalid", item.id); common_vendor.index.setStorageSync("backhuancun", {}); common_vendor.index.navigateTo({ url: `/pages/addjigou/name` }); }; 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([]); common_vendor.onLoad(() => { common_vendor.index.getStorage({ key: "openid", success: function(res) { pages_addjigou_api_addjigou.getMessageList(res.data).then((res2) => { menuArray.value = res2.result; }); } }); }); return (_ctx, _cache) => { return common_vendor.e({ a: whichMenu.value < menuArray.value.length }, whichMenu.value < menuArray.value.length ? { b: common_vendor.t(menuArray.value[whichMenu.value].comName) } : {}, { c: common_vendor.f(menuArray.value, (item, index, i0) => { return common_vendor.e({ a: item.status == `1` }, item.status == `1` ? { b: common_vendor.t(item.comName), c: common_vendor.o(($event) => look(item), index) } : {}, { d: item.status == `3` }, item.status == `3` ? { e: common_vendor.t(item.comName), f: common_vendor.o(($event) => again(item), index), g: common_vendor.o(jumptolist, index) } : {}, { h: item.status == `2` }, item.status == `2` ? { i: common_vendor.f(buttonArray.value, (item2, index2, i1) => { return { a: `https://www.focusnu.com/media/directive/index/addjiji/${index2}.png`, b: common_vendor.t(item2), c: index2 }; }) } : {}, { j: index }); }), d: common_vendor.o(addjigou), e: `700rpx`, f: which.value, g: common_vendor.o(swiperchange), h: common_vendor.f(menuArray.value, (item, index, i0) => { return { a: common_vendor.n(whichMenu.value == index ? `black-box` : `gray-box`), b: index, c: common_vendor.o(($event) => changecard(index), index) }; }), i: `https://www.focusnu.com/media/directive/index/addjiji/add.png`, j: common_vendor.o(moveend), k: common_vendor.p({ itemTarget: 0 }) }); }; } }; 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