|
@@ -3,7 +3,7 @@
|
|
|
<ion-header>
|
|
|
<ion-toolbar>
|
|
|
<ion-buttons slot="start">
|
|
|
- <ion-icon :icon="arrowBackOutline" @click="onCancel" style="padding-left:10px;width:24px;height:24px;"></ion-icon>
|
|
|
+ <ion-icon :icon="arrowBackOutline" @click="onBack" style="padding-left:10px;width:24px;height:24px;"></ion-icon>
|
|
|
</ion-buttons>
|
|
|
<ion-title>求职信息录入</ion-title>
|
|
|
</ion-toolbar>
|
|
@@ -207,7 +207,7 @@
|
|
|
<ion-item v-for="(record,key) in educationList" :key="key" >
|
|
|
<ion-label>
|
|
|
<h3>{{record.schoolName}}</h3>
|
|
|
- <p>{{record.schoolTime}}至{{record.overTime}}</p>
|
|
|
+ <p>{{record.schoolTimeStr}}至{{record.overTimeStr}}</p>
|
|
|
</ion-label>
|
|
|
<img alt="" src="@/assets/icon/forward.png" style="width:32px;height:32px;"
|
|
|
@click="onPathForward('./educationEdit',record.educationID,null,2)" />
|
|
@@ -232,9 +232,8 @@
|
|
|
@click="onPathForward( './jobHuntEdit',null,record.jobHuntID,3)" />
|
|
|
</ion-item>
|
|
|
</ion-list>
|
|
|
-
|
|
|
<ion-button class="next-btn" type="submit" v-if="curStepData.statusVal!=3">下一步</ion-button>
|
|
|
- <ion-button class="next-btn" @click="onCancel" v-if="curStepData.statusVal==3">完 成</ion-button>
|
|
|
+ <ion-button class="next-btn" @click="onFinish" v-if="curStepData.statusVal==3">完 成</ion-button>
|
|
|
</form>
|
|
|
</ion-content>
|
|
|
</ion-page>
|
|
@@ -245,18 +244,26 @@ import {reactive,defineComponent, computed,watch,ref,toRefs} from "vue";
|
|
|
import {useRoute, useRouter} from "vue-router";
|
|
|
import {required} from "@vuelidate/validators";
|
|
|
import {useVuelidate} from "@vuelidate/core";
|
|
|
-import {getDataById, baseInfoSave, getEducationList} from "@/api/jobUserInfo";
|
|
|
+import {getRegionCodeList,getStreetCodeList} from "@/api/system/area";
|
|
|
+import {getDataById,baseInfoSave} from "@/api/jobUserInfo";
|
|
|
import {getEducationListByJobUserID} from "@/api/education";
|
|
|
-import {getRegionCodeList, getStreetCodeList} from "@/api/system/area";
|
|
|
+import {getJobHuntListByJobUserID} from "@/api/jobHuntInfo";
|
|
|
import {getSiteDataList} from "@/api/siteInfo";
|
|
|
-import {getJobHuntListByJobUserID,jobHuntSave} from "@/api/jobHuntInfo";
|
|
|
import {getSysDictionaryList} from '@/api/system/dictionary';
|
|
|
-import {alertController} from "@ionic/vue";
|
|
|
+import {alertController, onIonViewDidEnter} from "@ionic/vue";
|
|
|
+import dayjs from "dayjs";
|
|
|
|
|
|
interface SelectProps {
|
|
|
name: string,
|
|
|
value: string
|
|
|
}
|
|
|
+interface educationModel{
|
|
|
+ schoolName:string,
|
|
|
+ schoolTimeStr:string,
|
|
|
+ schoolTime:Date,
|
|
|
+ overTimeStr:string
|
|
|
+ overTime:Date
|
|
|
+}
|
|
|
interface StepParams{
|
|
|
name: string,
|
|
|
statusVal: number
|
|
@@ -289,11 +296,11 @@ export default defineComponent({
|
|
|
const regionList = ref<SelectProps[]>([]);
|
|
|
const streetList = ref<SelectProps[]>([]);
|
|
|
|
|
|
- const educationList = ref<SelectProps[]>([]);
|
|
|
+
|
|
|
+ const educationList = ref<educationModel[]>([]);
|
|
|
const jobHuntList = ref<SelectProps[]>([]);
|
|
|
|
|
|
const baseInfoData = reactive({baseData:{
|
|
|
-
|
|
|
jobUserID:null,
|
|
|
name:null,
|
|
|
identityNumber: null,
|
|
@@ -352,7 +359,6 @@ export default defineComponent({
|
|
|
|
|
|
await alert.present();
|
|
|
}
|
|
|
-
|
|
|
const onSave = async function (){
|
|
|
if (curStepData.value.statusVal==1){
|
|
|
const isFormCorrect = await baseDataValid.value.$validate();
|
|
@@ -362,23 +368,34 @@ export default defineComponent({
|
|
|
}
|
|
|
baseInfoSave(baseInfoData.baseData).then(result => {
|
|
|
if (result) {
|
|
|
- router.push({path: './edit', query: {jobUserID: baseInfoData.baseData.jobUserID,status:2}});
|
|
|
+ router.push({path: './edit', query: {reload:1,jobUserID: baseInfoData.baseData.jobUserID,status:2}});
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
- else if(curStepData.value.statusVal==2){
|
|
|
- router.push({path: './edit', query: {jobUserID: baseInfoData.baseData.jobUserID,status:3}});
|
|
|
+ else{
|
|
|
+ await router.push({path: './edit', query: {reload:1,jobUserID: baseInfoData.baseData.jobUserID,status:3}});
|
|
|
}
|
|
|
}
|
|
|
|
|
|
const onPathForward = (pathValue:string,educationIDValue:any,jobHuntIDValue:any,statusValue:any)=>{
|
|
|
- router.push({path: pathValue, query: {educationID:educationIDValue,jobHuntID:jobHuntIDValue,jobUserID: baseInfoData.baseData.jobUserID,status:statusValue}});
|
|
|
+ router.push({path: pathValue, query: {reload:1,educationID:educationIDValue,jobHuntID:jobHuntIDValue,jobUserID: baseInfoData.baseData.jobUserID,status:statusValue}});
|
|
|
}
|
|
|
|
|
|
-
|
|
|
- const onCancel = () => {
|
|
|
+ const onFinish = () => {
|
|
|
router.push("./list");
|
|
|
}
|
|
|
+
|
|
|
+ const onBack = () => {
|
|
|
+ const toStepValue :number = curStepData.value.statusVal-1;
|
|
|
+ console.log("toStepValue",toStepValue);
|
|
|
+ console.log("jobUserID",baseInfoData.baseData.jobUserID);
|
|
|
+ if(toStepValue > 0){
|
|
|
+ router.push({path: './edit', query: {reload:1,jobUserID: baseInfoData.baseData.jobUserID,toStepValue}});
|
|
|
+ }else{
|
|
|
+ router.push("./list");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
const getSiteInfoList = async function(){
|
|
|
const siteInfoResult :any = await getSiteDataList();
|
|
|
siteInfoList.value = siteInfoResult;
|
|
@@ -431,21 +448,11 @@ export default defineComponent({
|
|
|
await regionChange();
|
|
|
}
|
|
|
|
|
|
-
|
|
|
const loadData = async (jobUserID: any,status:any) => {
|
|
|
pageParams.jobUserID = jobUserID;
|
|
|
+ baseInfoData.baseData.jobUserID = jobUserID;
|
|
|
curStepData.value.statusVal = status;
|
|
|
if(curStepData.value.statusVal==1){
|
|
|
- await getSiteInfoList();
|
|
|
- await getGenderList();
|
|
|
- await getJobUserStatusList();
|
|
|
- await getKeyPersonTypeList();
|
|
|
- await getCultureRankList();
|
|
|
- await getHealthTypeList();
|
|
|
- await getBloodTypeList();
|
|
|
- await getMaritalStatusList();
|
|
|
- await getRegionList();
|
|
|
- await getStreetList();
|
|
|
const reqData = await getDataById(jobUserID);
|
|
|
baseInfoData.baseData = reqData;
|
|
|
console.log('baseData',baseInfoData.baseData);
|
|
@@ -453,6 +460,11 @@ export default defineComponent({
|
|
|
else if(curStepData.value.statusVal==2){
|
|
|
const data :any = await getEducationListByJobUserID(pageParams);
|
|
|
educationList.value = data.list;
|
|
|
+ educationList.value.map(item=>{
|
|
|
+ item.schoolTimeStr = dayjs(item.schoolTime).format('YYYY-MM-DD');
|
|
|
+ item.overTimeStr = dayjs(item.overTime).format('YYYY-MM-DD');
|
|
|
+ })
|
|
|
+ console.log('educationList',educationList.value);
|
|
|
}
|
|
|
else if(curStepData.value.statusVal==3){
|
|
|
const reqData = await getJobHuntListByJobUserID(pageParams);
|
|
@@ -461,11 +473,20 @@ export default defineComponent({
|
|
|
};
|
|
|
|
|
|
watch(() => route.query, () => {
|
|
|
- if (route.query) {
|
|
|
- loadData(route.query.id,route.query.status);
|
|
|
+ if (route.query.reload) {
|
|
|
+ loadData(route.query.jobUserID,route.query.status);
|
|
|
}
|
|
|
});
|
|
|
|
|
|
+ const reload = (jobUserID:any,status:any) => {
|
|
|
+ loadData(jobUserID,status);
|
|
|
+ }
|
|
|
+
|
|
|
+ onIonViewDidEnter(() => {
|
|
|
+ if (route.query.reload)
|
|
|
+ reload(route.query.jobUserID,route.query.status);
|
|
|
+ });
|
|
|
+
|
|
|
return {
|
|
|
...toRefs(baseInfoData),
|
|
|
arrowBackOutline,
|
|
@@ -492,15 +513,37 @@ export default defineComponent({
|
|
|
provinceChange,
|
|
|
regionChange,
|
|
|
onSave,
|
|
|
- onCancel,
|
|
|
+ onBack,
|
|
|
+ onFinish,
|
|
|
onPathForward,
|
|
|
loadData,
|
|
|
+ reload,
|
|
|
route,
|
|
|
router,
|
|
|
baseDataValid,
|
|
|
+ getSiteInfoList,
|
|
|
+ getGenderList,
|
|
|
+ getJobUserStatusList,
|
|
|
+ getKeyPersonTypeList,
|
|
|
+ getCultureRankList,
|
|
|
+ getHealthTypeList,
|
|
|
+ getBloodTypeList,
|
|
|
+ getMaritalStatusList,
|
|
|
+ getRegionList,
|
|
|
+ getStreetList
|
|
|
}
|
|
|
},
|
|
|
mounted(){
|
|
|
+ this.getSiteInfoList();
|
|
|
+ this.getGenderList();
|
|
|
+ this.getJobUserStatusList();
|
|
|
+ this.getKeyPersonTypeList();
|
|
|
+ this.getCultureRankList();
|
|
|
+ this.getHealthTypeList();
|
|
|
+ this.getBloodTypeList();
|
|
|
+ this.getMaritalStatusList();
|
|
|
+ this.getRegionList();
|
|
|
+ this.getStreetList();
|
|
|
const jobUserID = this.route.query.jobUserID;
|
|
|
const status = this.route.query.status;
|
|
|
this.loadData(jobUserID,status);
|