|
@@ -5,6 +5,11 @@ Page({
|
|
|
jobArr: [],
|
|
|
jobtext: '请选择',
|
|
|
kaihutext: '请选择',
|
|
|
+ dytext: '请选择',
|
|
|
+ wgztext: '请选择',
|
|
|
+ ldztext: '请选择',
|
|
|
+ dyztext: '请选择',
|
|
|
+ gygtext: '请选择',
|
|
|
kaihuList: [{
|
|
|
name: '高中'
|
|
|
},
|
|
@@ -46,13 +51,28 @@ Page({
|
|
|
checked: false,
|
|
|
value: '1',
|
|
|
}],
|
|
|
+ dyArr: ['否', '是'],
|
|
|
+ wgzArr: ['否', '是'],
|
|
|
+ ldzArr: ['否', '是'],
|
|
|
+ dyzArr: ['否', '是'],
|
|
|
+ gygArr: ['否', '是'],
|
|
|
renzhiDate: '',
|
|
|
postshow: false,
|
|
|
postshow1: false,
|
|
|
errorIsTrue: false,
|
|
|
+ // currentDate: new Date().getTime(),
|
|
|
+ // currentDate1: new Date().getTime(),
|
|
|
+ // minDate: new Date().getTime,
|
|
|
+ // formatter(type, value) {
|
|
|
+ // if (type === 'year') {
|
|
|
+ // return `${value}年`;
|
|
|
+ // } else if (type === 'month') {
|
|
|
+ // return `${value}月`;
|
|
|
+ // }
|
|
|
+ // return value;
|
|
|
+ // },
|
|
|
currentDate: new Date().getTime(),
|
|
|
- currentDate1: new Date().getTime(),
|
|
|
- minDate: new Date().getTime,
|
|
|
+ // minDate: new Date().getTime(),
|
|
|
formatter(type, value) {
|
|
|
if (type === 'year') {
|
|
|
return `${value}年`;
|
|
@@ -62,6 +82,11 @@ Page({
|
|
|
return value;
|
|
|
},
|
|
|
},
|
|
|
+ // ontimeInput(e){
|
|
|
+ // this.setData({
|
|
|
+ // currentDate: e.detail,
|
|
|
+ // });
|
|
|
+ // },
|
|
|
onChange(event) {
|
|
|
this.setData({
|
|
|
radio: event.detail,
|
|
@@ -70,10 +95,49 @@ Page({
|
|
|
jobChange(e) {
|
|
|
console.log(e)
|
|
|
this.setData({
|
|
|
- jobIndex: e.detail.value,
|
|
|
+ zwIndex: e.detail.value,
|
|
|
jobtext: this.data.jobArr[e.detail.value].dictLabel
|
|
|
})
|
|
|
},
|
|
|
+ dyChange(e) {
|
|
|
+ console.log(e)
|
|
|
+ this.setData({
|
|
|
+ dyIndex: e.detail.value,
|
|
|
+ dytext: this.data.dyArr[e.detail.value]
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 网格长
|
|
|
+ wgzChange(e) {
|
|
|
+ console.log(e)
|
|
|
+ this.setData({
|
|
|
+ wgzIndex: e.detail.value,
|
|
|
+ wgztext: this.data.wgzArr[e.detail.value]
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 楼栋长
|
|
|
+ ldzChange(e) {
|
|
|
+ console.log(e)
|
|
|
+ this.setData({
|
|
|
+ ldzIndex: e.detail.value,
|
|
|
+ ldztext: this.data.ldzArr[e.detail.value]
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 单元长
|
|
|
+ dyzChange(e) {
|
|
|
+ console.log(e)
|
|
|
+ this.setData({
|
|
|
+ dyzIndex: e.detail.value,
|
|
|
+ dyztext: this.data.dyzArr[e.detail.value]
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 公益岗
|
|
|
+ gygChange(e) {
|
|
|
+ console.log(e)
|
|
|
+ this.setData({
|
|
|
+ gygIndex: e.detail.value,
|
|
|
+ gygtext: this.data.gygArr[e.detail.value]
|
|
|
+ })
|
|
|
+ },
|
|
|
share() {
|
|
|
this.setData({
|
|
|
show: true
|
|
@@ -89,17 +153,16 @@ Page({
|
|
|
postshow1: false
|
|
|
});
|
|
|
},
|
|
|
- onInput(event) {
|
|
|
- this.setData({
|
|
|
- currentDate: event.detail,
|
|
|
- });
|
|
|
- },
|
|
|
+ // onInput(event) {
|
|
|
+ // this.setData({
|
|
|
+ // currentDate: event.detail,
|
|
|
+ // });
|
|
|
+ // },
|
|
|
onInput1(event) {
|
|
|
this.setData({
|
|
|
currentDate1: event.detail,
|
|
|
});
|
|
|
},
|
|
|
-
|
|
|
formatDate(date) {
|
|
|
date = new Date(date);
|
|
|
return `${date.getFullYear()-1}/${date.getMonth() + 1}/${date.getDate()}`;
|
|
@@ -257,13 +320,18 @@ Page({
|
|
|
peixunshijianTrue: false
|
|
|
})
|
|
|
}
|
|
|
- console.log(this.data.jobArr,this.data.jobIndex, "55555555")
|
|
|
+ console.log(this.data.jobArr, this.data.jobIndex, "55555555")
|
|
|
e.detail.value.culture = this.data.kaihuList[this.data.kaihuindex].name;
|
|
|
- const jIndex = this.data.jobArr.findIndex(o=> o.dictLabel==this.data.jobtext)
|
|
|
- console.log(this.data.jobArr[jIndex].dictValue,"000000000000000000")
|
|
|
- e.detail.value.studentDuty = this.data.jobArr[jIndex].dictValue;
|
|
|
+ // const jIndex = this.data.jobArr.findIndex(o => o.dictLabel == this.data.jobtext)
|
|
|
+ // console.log(this.data.jobArr[jIndex].dictValue, "000000000000000000")
|
|
|
+ e.detail.value.studentDuty = Number(this.data.zwIndex)+1;
|
|
|
+ // e.detail.value.studentDuty=
|
|
|
+ // e.detail.value.isdy = this.data.dyArr[dyIndex];
|
|
|
e.detail.value.tenure = this.data.tenure;
|
|
|
e.detail.value.sessionKey = this.data.sessionKey;
|
|
|
+ // if (this.data.wgzIndex) {
|
|
|
+ // e.detail.value.wgzIndex = this.data.wgzIndex
|
|
|
+ // }
|
|
|
let aa = e.detail.value
|
|
|
console.log(aa, "00000000")
|
|
|
if (aa.culture && aa.school && aa.studentDuty && aa.tenure && aa.studentDept) {
|
|
@@ -279,6 +347,12 @@ Page({
|
|
|
studentPhone: aa.studentPhone,
|
|
|
sessionKey: this.data.sessionKey,
|
|
|
mcajor: aa.mcajor,
|
|
|
+ gridLeader: this.data.wgzIndex, //网格长
|
|
|
+ buildingLeader: this.data.ldzIndex, //楼栋长
|
|
|
+ unitLeader: this.data.dyzIndex, //单元长
|
|
|
+ welfarePosition: this.data.gygIndex, //公益岗位
|
|
|
+ partyMember: this.data.dyIndex //党员
|
|
|
+ // isdy: aa.isdy
|
|
|
},
|
|
|
success: () => {
|
|
|
wx.showModal({
|
|
@@ -307,7 +381,7 @@ Page({
|
|
|
} else {
|
|
|
wx.showModal({
|
|
|
showCancel: false,
|
|
|
- content: '请补全除了“所学专业”以外的其他信息'
|
|
|
+ content: '请确认是否还有其他必填项没有填写'
|
|
|
})
|
|
|
}
|
|
|
},
|
|
@@ -336,8 +410,8 @@ Page({
|
|
|
sessionKey
|
|
|
},
|
|
|
success: (res) => {
|
|
|
- console.log(res,'我是获取到的数组')
|
|
|
- let Arr=[];
|
|
|
+ console.log(res, '我是获取到的数组')
|
|
|
+ let Arr = [];
|
|
|
res.data.data.forEach(item => {
|
|
|
let newdata = {};
|
|
|
newdata.dictLabel = item.dictLabel;
|
|
@@ -345,9 +419,10 @@ Page({
|
|
|
Arr.push(newdata);
|
|
|
});
|
|
|
this.setData({
|
|
|
- jobArr:Arr
|
|
|
+ jobArr: Arr
|
|
|
})
|
|
|
- console.log(this.data.jobArr,'我是新组成的数组')
|
|
|
+ this.getBanner(sessionKey);
|
|
|
+ console.log(this.data.jobArr, '我是新组成的数组')
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -358,8 +433,9 @@ Page({
|
|
|
this.setData({
|
|
|
sessionKey: sessionKey
|
|
|
})
|
|
|
- this.getBanner(sessionKey);
|
|
|
this.getjob(sessionKey)
|
|
|
+
|
|
|
+
|
|
|
},
|
|
|
getBanner(sessionKey) {
|
|
|
wx.request({
|
|
@@ -380,11 +456,17 @@ Page({
|
|
|
info: res.data.data,
|
|
|
parameter: this.data.parameter,
|
|
|
studentDept: res.data.data.studentDept,
|
|
|
- jobtext: res.data.data.studentDuty,
|
|
|
+ zwIndex: Number(res.data.data.studentDuty) - 1,
|
|
|
+ // jobtext: res.data.data.studentDuty,
|
|
|
kaihutext: res.data.data.culture,
|
|
|
major: res.data.data.major,
|
|
|
tenure: res.data.data.tenure,
|
|
|
studentPhone: res.data.data.studentPhone,
|
|
|
+ wgzIndex: res.data.data.gridLeader, //网格长
|
|
|
+ ldzIndex: res.data.data.buildingLeader, //楼栋长
|
|
|
+ dyzIndex: res.data.data.unitLeader, //单元长
|
|
|
+ gygIndex: res.data.data.welfarePosition, //公益岗位
|
|
|
+ dyIndex: res.data.data.partyMember //党员
|
|
|
})
|
|
|
}
|
|
|
}
|