hldy_xcx/unpackage/dist/dev/mp-weixin/pages/addstaff/all.js

204 lines
8.7 KiB
JavaScript
Raw Normal View History

2025-08-21 16:52:59 +08:00
"use strict";
const common_vendor = require("../../common/vendor.js");
const request_index = require("../../request/index.js");
2025-09-15 17:23:33 +08:00
const compontent_public_long = require("../../compontent/public/long.js");
2025-08-21 16:52:59 +08:00
if (!Math) {
model();
}
const model = () => "../../compontent/public/model.js";
const _sfc_main = {
__name: "all",
setup(__props) {
const show = common_vendor.ref(false);
const content = common_vendor.ref("");
const statusarray = ["loading", "success", "fail"];
const nameArray = ["姓名", "性别", "身份证号码", "民族", "出生日期", "住址", "签发机关", "有效期限"];
const textArray = common_vendor.reactive(["", "", "", "", "", "", "", ""]);
const headImge = common_vendor.ref("");
2025-09-09 17:45:04 +08:00
common_vendor.ref("");
const fontphoto0 = common_vendor.ref("");
const endphoto0 = common_vendor.ref("");
const imgArray = common_vendor.ref(["", "", "", ""]);
const nameArray0 = ["开户行", "开户行卡号"];
const textArray0 = common_vendor.reactive(["", ""]);
2025-10-28 14:36:13 +08:00
const nameArray1 = ["婚否", "联系电话", "身高", "体重", "健康状态", "政治面貌", "紧急联系人", "紧急联系人电话", "联系人与本人关系", "户口性质", "现住址"];
const textArray1 = common_vendor.reactive(["", "", "", "", "", "", "", "", "", "", ""]);
2025-08-21 16:52:59 +08:00
const backImge = common_vendor.ref("");
common_vendor.ref("");
common_vendor.ref("");
2025-09-09 17:45:04 +08:00
common_vendor.ref(0);
2025-08-21 16:52:59 +08:00
common_vendor.ref("");
function getMessage(url) {
2025-09-09 17:45:04 +08:00
if (!url) {
return;
}
2025-08-21 16:52:59 +08:00
common_vendor.index.previewImage({
current: url,
// 当前显示图片的链接
urls: [url],
// 可以预览的图片列表
indicator: "default",
// 显示面板指示点,'default'|'number'|'none'
loop: true,
// 是否可循环预览
longPressActions: {
itemList: ["保存图片"],
success: (data) => {
2025-10-13 14:58:45 +08:00
common_vendor.index.__f__("log", "at pages/addstaff/all.vue:301", "长按操作成功", data);
2025-08-21 16:52:59 +08:00
},
fail: (err) => {
2025-10-13 14:58:45 +08:00
common_vendor.index.__f__("error", "at pages/addstaff/all.vue:304", "长按操作失败", err);
2025-08-21 16:52:59 +08:00
}
}
});
}
function isAtLeastEightChars(str) {
return typeof str === "string" && str.length >= 12;
}
const openLook = (res) => {
if (isAtLeastEightChars(res)) {
content.value = res;
show.value = true;
}
};
const goBack = () => {
common_vendor.index.navigateBack();
};
const alldata = common_vendor.ref("");
const contentred = common_vendor.ref("");
2025-09-09 17:45:04 +08:00
const applyStatus = common_vendor.ref(false);
2025-08-21 16:52:59 +08:00
common_vendor.onLoad((options) => {
2025-09-09 17:45:04 +08:00
if (options.applyStatus) {
applyStatus.value = options.applyStatus;
2025-08-21 16:52:59 +08:00
}
alldata.value = JSON.parse(options.element);
let data = alldata.value;
if (data.content) {
contentred.value = data.content;
}
textArray[0] = data.name;
textArray[1] = data.sex;
textArray[2] = data.idCard;
textArray[3] = data.national;
textArray[4] = data.birthDate;
textArray[5] = data.idCardAddress;
textArray[6] = data.issuingAuthority;
2025-09-15 17:23:33 +08:00
textArray[7] = `${data.startTime}-${compontent_public_long.swapLongTerm(data.endTime)}`;
2025-10-28 14:36:13 +08:00
headImge.value = `${request_index.media_base_url}${data.cardZmPath}`;
backImge.value = `${request_index.media_base_url}${data.cardFmPath}`;
2025-09-09 17:45:04 +08:00
textArray0[0] = data.openingBank;
textArray0[1] = data.bankCard;
2025-10-28 14:36:13 +08:00
fontphoto0.value = `${request_index.media_base_url}${data.bankZmPath}`;
endphoto0.value = `${request_index.media_base_url}${data.bankFmPath}`;
2025-09-09 17:45:04 +08:00
imgArray.value[0] = data.healthZmPath;
imgArray.value[1] = data.healthFmPath;
imgArray.value[2] = data.qualificationPath;
imgArray.value[3] = data.noCrimeCertificate;
const keys = [
"maritalStatus",
"tel",
"height",
"weight",
"healthStatus",
"politicalAppearance",
"contactName",
"contactTel",
"contactRelationship",
2025-10-28 14:36:13 +08:00
"hukouType",
"currentAddress"
2025-09-09 17:45:04 +08:00
];
keys.forEach((key, index) => {
textArray1[index] = data[key] || "";
});
2025-10-28 14:36:13 +08:00
textArray1[2] = Number(textArray1[2]) + "cm";
textArray1[3] = Number(textArray1[3]) + "kg";
2025-08-21 16:52:59 +08:00
});
2025-09-09 17:45:04 +08:00
const changeMessage = () => {
2025-10-28 14:36:13 +08:00
common_vendor.index.__f__("log", "at pages/addstaff/all.vue:377", "????", alldata.value);
2025-09-25 17:30:11 +08:00
if (alldata.value.modifyState == "1") {
openLook("该信息正在审核中,请等待");
} else {
common_vendor.index.setStorageSync("baddata", alldata.value);
common_vendor.index.setStorageSync("specicalid", alldata.value.id);
common_vendor.index.setStorageSync("backhuancun", {});
common_vendor.index.navigateTo({
url: `/pages/addstaff/information`
});
}
2025-09-09 17:45:04 +08:00
};
2025-08-21 16:52:59 +08:00
return (_ctx, _cache) => {
return common_vendor.e({
a: common_vendor.o(($event) => show.value = false),
b: common_vendor.p({
show: show.value,
content: content.value
}),
c: common_vendor.o(goBack),
2025-10-20 09:29:15 +08:00
d: `${common_vendor.index.getStorageSync("moveHeight") + 40}px`,
2025-10-13 14:58:45 +08:00
e: `${common_vendor.index.getStorageSync("moveHeight") + 30}px`,
f: applyStatus.value ? `https://www.focusnu.com/media/directive/index/${statusarray[applyStatus.value - 1]}.png` : ``,
g: !applyStatus.value
2025-09-09 17:45:04 +08:00
}, !applyStatus.value ? {
2025-10-13 14:58:45 +08:00
h: common_vendor.o(changeMessage)
2025-08-21 16:52:59 +08:00
} : {}, {
2025-10-13 14:58:45 +08:00
i: common_vendor.f(nameArray1, (item, index, i0) => {
2025-09-09 17:45:04 +08:00
return {
a: common_vendor.t(item),
b: common_vendor.t(textArray1[index] ? textArray1[index] : "自动获取"),
c: index,
d: common_vendor.o(($event) => openLook(textArray[index]), index)
};
}),
2025-10-13 14:58:45 +08:00
j: common_vendor.s(!applyStatus.value ? {
2025-08-21 16:52:59 +08:00
height: `100rpx`
} : {
height: `140rpx`
}),
2025-10-13 14:58:45 +08:00
k: headImge.value ? headImge.value : `https://www.focusnu.com/media/directive/index/IDcard.png`,
l: !headImge.value
2025-08-21 16:52:59 +08:00
}, !headImge.value ? {} : {}, {
2025-10-13 14:58:45 +08:00
m: common_vendor.o(($event) => getMessage(headImge.value)),
n: backImge.value ? backImge.value : `https://www.focusnu.com/media/directive/index/backIDcard.png`,
o: !backImge.value
2025-08-21 16:52:59 +08:00
}, !backImge.value ? {} : {}, {
2025-10-13 14:58:45 +08:00
p: common_vendor.o(($event) => getMessage(backImge.value)),
q: common_vendor.f(nameArray, (item, index, i0) => {
2025-08-21 16:52:59 +08:00
return {
a: common_vendor.t(item),
b: common_vendor.t(textArray[index] ? textArray[index] : "自动获取"),
c: index,
d: common_vendor.o(($event) => openLook(textArray[index]), index)
};
}),
2025-10-13 14:58:45 +08:00
r: fontphoto0.value ? fontphoto0.value : `https://www.focusnu.com/media/directive/index/bankfront.png`,
s: fontphoto0.value ? `` : `https://www.focusnu.com/media/directive/index/bian.png`,
t: !fontphoto0.value
2025-09-09 17:45:04 +08:00
}, !fontphoto0.value ? {} : {}, {
2025-10-13 14:58:45 +08:00
v: common_vendor.o(($event) => getMessage(fontphoto0.value)),
w: endphoto0.value ? endphoto0.value : `https://www.focusnu.com/media/directive/index/bankend.png`,
x: endphoto0.value ? `` : `https://www.focusnu.com/media/directive/index/bian.png`,
y: !endphoto0.value
2025-09-09 17:45:04 +08:00
}, !endphoto0.value ? {} : {}, {
2025-10-13 14:58:45 +08:00
z: common_vendor.o(($event) => getMessage(endphoto0.value)),
A: common_vendor.f(nameArray0, (item, index, i0) => {
2025-08-21 16:52:59 +08:00
return {
a: common_vendor.t(item),
b: common_vendor.t(textArray0[index] ? textArray0[index] : "自动获取"),
c: index,
d: common_vendor.o(($event) => openLook(textArray0[index]), index)
};
}),
2025-10-28 14:36:13 +08:00
B: imgArray.value[0] ? `${common_vendor.unref(request_index.media_base_url)}${imgArray.value[0]}` : ``,
C: common_vendor.o(($event) => getMessage(imgArray.value[0] ? `${common_vendor.unref(request_index.media_base_url)}${imgArray.value[0]}` : "")),
D: imgArray.value[2] ? `${common_vendor.unref(request_index.media_base_url)}${imgArray.value[2]}` : ``,
E: common_vendor.o(($event) => getMessage(imgArray.value[2] ? `${common_vendor.unref(request_index.media_base_url)}${imgArray.value[2]}` : "")),
F: imgArray.value[3] ? `${common_vendor.unref(request_index.media_base_url)}${imgArray.value[3]}` : ``,
G: common_vendor.o(($event) => getMessage(imgArray.value[3] ? `${common_vendor.unref(request_index.media_base_url)}${imgArray.value[3]}` : ""))
2025-08-21 16:52:59 +08:00
});
};
}
};
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-919262b9"]]);
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/addstaff/all.js.map