167 lines
6.9 KiB
JavaScript
167 lines
6.9 KiB
JavaScript
"use strict";
|
|
const common_vendor = require("../../common/vendor.js");
|
|
const request_index = require("../../request/index.js");
|
|
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("");
|
|
const headImge0 = common_vendor.ref("");
|
|
const nameArray0 = ["企业名称", "注册地址", "信用代码", "法人"];
|
|
const textArray0 = common_vendor.reactive(["", "", "", "", "", "", ""]);
|
|
const nameArray1 = ["机构位置", "详细地址", "机构负责人", "机构负责人电话", "房屋性质", "建筑面积"];
|
|
const textArray1 = common_vendor.reactive(["", "", "", "", "", ""]);
|
|
const backImge = common_vendor.ref("");
|
|
common_vendor.ref("");
|
|
common_vendor.ref("");
|
|
const statesTarget = common_vendor.ref(0);
|
|
common_vendor.ref("");
|
|
function getMessage(url) {
|
|
common_vendor.index.previewImage({
|
|
current: url,
|
|
// 当前显示图片的链接
|
|
urls: [url],
|
|
// 可以预览的图片列表
|
|
indicator: "default",
|
|
// 显示面板指示点,'default'|'number'|'none'
|
|
loop: true,
|
|
// 是否可循环预览
|
|
longPressActions: {
|
|
itemList: ["保存图片"],
|
|
success: (data) => {
|
|
common_vendor.index.__f__("log", "at pages/addjigou/all.vue:185", "长按操作成功", data);
|
|
},
|
|
fail: (err) => {
|
|
common_vendor.index.__f__("error", "at pages/addjigou/all.vue:188", "长按操作失败", err);
|
|
}
|
|
}
|
|
});
|
|
}
|
|
const next = () => {
|
|
let trans = alldata.value;
|
|
trans.id = null;
|
|
common_vendor.index.setStorageSync("baddata", trans);
|
|
common_vendor.index.setStorageSync("specicalid", trans.id);
|
|
common_vendor.index.setStorageSync("backhuancun", {});
|
|
common_vendor.index.navigateTo({
|
|
url: `/pages/addjigou/name`
|
|
});
|
|
};
|
|
function isAtLeastEightChars(str) {
|
|
return typeof str === "string" && str.length >= 8;
|
|
}
|
|
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("");
|
|
const special = common_vendor.ref(false);
|
|
common_vendor.onLoad((options) => {
|
|
if (options.special) {
|
|
special.value = true;
|
|
}
|
|
alldata.value = JSON.parse(options.element);
|
|
statesTarget.value = Number(alldata.value.status);
|
|
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;
|
|
textArray[7] = `${data.startTime}-${data.endTime}`;
|
|
headImge.value = `${request_index.base_url}/sys/common/static/${data.cardZmPath}`;
|
|
backImge.value = `${request_index.base_url}/sys/common/static/${data.cardFmPath}`;
|
|
textArray0[0] = data.comName;
|
|
textArray0[1] = data.comRegisterAddress;
|
|
textArray0[2] = data.comCreditCode;
|
|
textArray0[3] = data.comLegalPerson;
|
|
headImge0.value = `${request_index.base_url}/sys/common/static/${data.comBusinessLicense}`;
|
|
textArray1[0] = (data.orgProvince_dictText || "") + (data.orgCity_dictText != null ? data.orgCity_dictText : ``) + (data.orgDistrict_dictText != null ? data.orgDistrict_dictText : ``);
|
|
textArray1[1] = data.orgAddress;
|
|
textArray1[2] = data.orgLeader;
|
|
textArray1[3] = data.orgLeaderPhone;
|
|
textArray1[4] = data.orgPropertyType;
|
|
if (data.orgBuildingArea) {
|
|
textArray1[5] = data.orgBuildingArea + "平方米";
|
|
}
|
|
});
|
|
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),
|
|
d: statesTarget.value == 3 || alldata.value.status == `5` || alldata.value.status == `3`
|
|
}, statesTarget.value == 3 || alldata.value.status == `5` || alldata.value.status == `3` ? {
|
|
e: common_vendor.t(contentred.value)
|
|
} : {}, {
|
|
f: special.value && alldata.value.modifyStatus != `1`
|
|
}, special.value && alldata.value.modifyStatus != `1` ? {
|
|
g: common_vendor.o(next)
|
|
} : {}, {
|
|
h: !special.value ? `https://www.focusnu.com/media/directive/index/${statusarray[statesTarget.value - 1]}.png` : ``,
|
|
i: headImge.value ? headImge.value : `https://www.focusnu.com/media/directive/index/IDcard.png`,
|
|
j: !headImge.value
|
|
}, !headImge.value ? {} : {}, {
|
|
k: common_vendor.o(($event) => getMessage(headImge.value)),
|
|
l: backImge.value ? backImge.value : `https://www.focusnu.com/media/directive/index/backIDcard.png`,
|
|
m: !backImge.value
|
|
}, !backImge.value ? {} : {}, {
|
|
n: common_vendor.o(($event) => getMessage(backImge.value)),
|
|
o: common_vendor.f(nameArray, (item, index, i0) => {
|
|
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)
|
|
};
|
|
}),
|
|
p: headImge0.value ? headImge0.value : `https://www.focusnu.com/media/directive/index/zhizhao.png`,
|
|
q: !headImge0.value
|
|
}, !headImge0.value ? {} : {}, {
|
|
r: common_vendor.o(($event) => getMessage(headImge0.value)),
|
|
s: common_vendor.f(nameArray0, (item, index, i0) => {
|
|
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)
|
|
};
|
|
}),
|
|
t: common_vendor.f(nameArray1, (item, index, i0) => {
|
|
return {
|
|
a: common_vendor.t(item),
|
|
b: common_vendor.t(textArray1[index] ? textArray1[index] : "自动获取"),
|
|
c: index,
|
|
d: common_vendor.o(($event) => openLook(textArray1[index]), index)
|
|
};
|
|
})
|
|
});
|
|
};
|
|
}
|
|
};
|
|
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-9afbabf9"]]);
|
|
wx.createPage(MiniProgramPage);
|
|
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/addjigou/all.js.map
|