|
|
|
|
@ -114,44 +114,7 @@ export default {
|
|
|
|
|
onReady() {
|
|
|
|
|
rhJS.setNavStyle();
|
|
|
|
|
let that = this;
|
|
|
|
|
uni.$on("getTownsman", (data) => {
|
|
|
|
|
// 前端本地处理根据身份证号获取年龄
|
|
|
|
|
if (data.info.idCard && (data.info.idCard.length == 15 || data.info.idCard.length == 18)) {
|
|
|
|
|
let infoByIDcard = rhJS.getInfoByIDcard(data.info.idCard);
|
|
|
|
|
data.info.age = infoByIDcard.age;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (that.persenInfo.length == 0) {
|
|
|
|
|
that.persenInfo[0] = {
|
|
|
|
|
...data.info,
|
|
|
|
|
index: that.persenInfo.length,
|
|
|
|
|
};
|
|
|
|
|
} else if (data.info.index || data.info.index === 0) {
|
|
|
|
|
that.persenInfo[data.info.index] = data.info;
|
|
|
|
|
} else {
|
|
|
|
|
that.persenInfo[that.persenInfo.length] = {
|
|
|
|
|
...data.info,
|
|
|
|
|
index: that.persenInfo.length,
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
that.$forceUpdate();
|
|
|
|
|
});
|
|
|
|
|
uni.$on("changeJobInfo", function (data) {
|
|
|
|
|
that.updateInfo.jobId = data.info.leafCateId;
|
|
|
|
|
that.updateInfo.jobName = data.info.title;
|
|
|
|
|
that.currentJobInfo = data.info;
|
|
|
|
|
|
|
|
|
|
that.jobType = data.info.jobType;
|
|
|
|
|
console.log("data.info", data.info);
|
|
|
|
|
that.getJobDetail(data.info);
|
|
|
|
|
that.$forceUpdate();
|
|
|
|
|
});
|
|
|
|
|
uni.$on("resetTownsman", function (data) {
|
|
|
|
|
if (data.reset) {
|
|
|
|
|
that.persenInfo = [];
|
|
|
|
|
}
|
|
|
|
|
that.$forceUpdate();
|
|
|
|
|
});
|
|
|
|
|
console.log('0115 000 是否执行')
|
|
|
|
|
},
|
|
|
|
|
onShareAppMessage() {
|
|
|
|
|
return rhJS.shareFun();
|
|
|
|
|
@ -169,6 +132,7 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
|
console.log('0115 002 是否执行')
|
|
|
|
|
let that = this;
|
|
|
|
|
let options = this.dataoptions;
|
|
|
|
|
let params = options.params ? JSON.parse(options.params) : {};
|
|
|
|
|
@ -209,6 +173,45 @@ export default {
|
|
|
|
|
that.setFormList();
|
|
|
|
|
}
|
|
|
|
|
}, 1);
|
|
|
|
|
uni.$on("getTownsman", (data) => {
|
|
|
|
|
console.log('0115 001 是否执行')
|
|
|
|
|
// 前端本地处理根据身份证号获取年龄
|
|
|
|
|
if (data.info.idCard && (data.info.idCard.length == 15 || data.info.idCard.length == 18)) {
|
|
|
|
|
let infoByIDcard = rhJS.getInfoByIDcard(data.info.idCard);
|
|
|
|
|
data.info.age = infoByIDcard.age;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (that.persenInfo.length == 0) {
|
|
|
|
|
that.persenInfo[0] = {
|
|
|
|
|
...data.info,
|
|
|
|
|
index: that.persenInfo.length,
|
|
|
|
|
};
|
|
|
|
|
} else if (data.info.index || data.info.index === 0) {
|
|
|
|
|
that.persenInfo[data.info.index] = data.info;
|
|
|
|
|
} else {
|
|
|
|
|
that.persenInfo[that.persenInfo.length] = {
|
|
|
|
|
...data.info,
|
|
|
|
|
index: that.persenInfo.length,
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
that.$forceUpdate();
|
|
|
|
|
});
|
|
|
|
|
uni.$on("changeJobInfo", function (data) {
|
|
|
|
|
that.updateInfo.jobId = data.info.leafCateId;
|
|
|
|
|
that.updateInfo.jobName = data.info.title;
|
|
|
|
|
that.currentJobInfo = data.info;
|
|
|
|
|
|
|
|
|
|
that.jobType = data.info.jobType;
|
|
|
|
|
console.log("data.info", data.info);
|
|
|
|
|
that.getJobDetail(data.info);
|
|
|
|
|
that.$forceUpdate();
|
|
|
|
|
});
|
|
|
|
|
uni.$on("resetTownsman", function (data) {
|
|
|
|
|
if (data.reset) {
|
|
|
|
|
that.persenInfo = [];
|
|
|
|
|
}
|
|
|
|
|
that.$forceUpdate();
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
@ -247,6 +250,7 @@ export default {
|
|
|
|
|
onShow() {
|
|
|
|
|
let that = this;
|
|
|
|
|
that.pageSpeed = -1;
|
|
|
|
|
console.log('0115 003 是否执行')
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
getTownsManInfo(info) {
|
|
|
|
|
|