"use strict"; const common_vendor = require("../../common/vendor.js"); const pages_addjigou_api_addjigou = require("../addjigou/api/addjigou.js"); if (!Math) { (model + downMenu)(); } const downMenu = () => "../../compontent/public/downmenu.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 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 = (res) => { if (res) { content.value = res; show.value = true; } }; const again = (item) => { common_vendor.index.__f__("log", "at pages/index/index.vue:224", "????", 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([]); const loadingData = () => { common_vendor.index.getStorage({ key: "openid", success: function(res) { pages_addjigou_api_addjigou.getMessageList(res.data).then((res2) => { menuArray.value = res2.result; menuArray.value.push({ status: `-1` }); }); } }); }; common_vendor.onLoad(() => { 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.comName }, item.comName ? { b: common_vendor.t(item.comName) } : {}, { c: item.status == `1` }, item.status == `1` ? { d: `https://www.focusnu.com/media/directive/index/refresh.png`, e: common_vendor.o(loadingData, index) } : {}, { f: item.status == `1` }, item.status == `1` ? { g: `https://www.focusnu.com/media/directive/index/${statusarray[Number(item.status) - 1]}.png`, h: common_vendor.t(item.comName), i: common_vendor.o(($event) => look(item), index) } : {}, { j: item.status == `3` }, item.status == `3` ? { k: `https://www.focusnu.com/media/directive/index/${statusarray[Number(item.status) - 1]}.png`, l: common_vendor.t(item.comName), m: common_vendor.o(($event) => again(item), index), n: common_vendor.o(($event) => jumptolist(item.content), index) } : {}, { o: item.status == `2` }, item.status == `2` ? { p: 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 }; }) } : {}, { q: item.status == `-1` }, item.status == `-1` ? { r: common_vendor.o(addjigou, index) } : {}, { s: 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-1cf27b2a"]]); wx.createPage(MiniProgramPage); //# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/index/index.js.map