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

92 lines
3.3 KiB
JavaScript

"use strict";
const common_vendor = require("../../common/vendor.js");
const pages_yuangongindex_api = require("./api.js");
const pages_addstaff_api_addjigou = require("../addstaff/api/addjigou.js");
const _sfc_main = {
__name: "workjoin",
setup(__props) {
common_vendor.ref(0);
const workArray = common_vendor.ref([]);
common_vendor.ref(false);
const statusarray = ["loading", "success", "fail"];
common_vendor.onLoad((options) => {
common_vendor.index.getStorage({
key: "openid",
success: function(res) {
pages_yuangongindex_api.getEmployeesOrgRela(res.data).then((res2) => {
workArray.value = res2.result;
});
}
});
});
common_vendor.onPullDownRefresh(() => {
common_vendor.index.getStorage({
key: "openid",
success: function(res) {
pages_yuangongindex_api.getEmployeesOrgRela(res.data).then((res2) => {
workArray.value = res2.result;
});
}
});
common_vendor.index.stopPullDownRefresh();
});
const goBack = () => {
common_vendor.index.navigateBack();
};
const again = (item) => {
common_vendor.index.getStorage({
key: "openid",
success: function(res) {
pages_addstaff_api_addjigou.getMessageList(res.data).then((res2) => {
if (res2.success) {
common_vendor.index.setStorageSync("baddata", res2.result[0]);
common_vendor.index.setStorageSync("specicalid", res2.result[0].id);
common_vendor.index.setStorageSync("backhuancun", {});
common_vendor.index.navigateTo({
url: `/pages/addstaff/information`
});
}
});
}
});
};
const jumpToAll = (element) => {
common_vendor.index.__f__("log", "at pages/yuangongindex/workjoin.vue:128", "????", element.applyStatus);
common_vendor.index.getStorage({
key: "openid",
success: function(res) {
pages_addstaff_api_addjigou.getMessageList(res.data).then((res2) => {
if (res2.success) {
common_vendor.index.navigateTo({
url: `/pages/addstaff/all?element=${JSON.stringify(res2.result[0])}&applyStatus=${element.applyStatus}`
});
}
});
}
});
};
return (_ctx, _cache) => {
return {
a: common_vendor.o(goBack),
b: common_vendor.f(workArray.value, (item, index, i0) => {
return common_vendor.e({
a: common_vendor.t(item.comName),
b: common_vendor.t(item.applyTime),
c: common_vendor.t(item.auditTime),
d: `https://www.focusnu.com/media/directive/index/${statusarray[Number(item.applyStatus) - 1]}.png`,
e: item.applyStatus != 1 && item.applyStatus != 2
}, item.applyStatus != 1 && item.applyStatus != 2 ? {
f: common_vendor.o(($event) => again(), index)
} : {}, {
g: common_vendor.o(($event) => jumpToAll(item), index),
h: index
});
})
};
};
}
};
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-9f30267b"]]);
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/yuangongindex/workjoin.js.map