|
@@ -22,30 +22,34 @@
|
|
|
</ion-item>
|
|
|
<ion-item mode="md" :class="[v$.dataModel.recruitCount.$error?'ion-invalid':'ion-valid']">
|
|
|
<ion-label style="width: 100px;">招聘数量<span class="danger">*</span></ion-label>
|
|
|
- <ion-input placeholder="请输入招聘数量" label-placement="stacked" :clear-input="true"
|
|
|
+ <ion-input placeholder="请输入招聘数量" label-placement="stacked" :clear-input="true"
|
|
|
v-model="formState.dataModel.recruitCount"
|
|
|
>
|
|
|
</ion-input>
|
|
|
<ion-note slot="error">请输入招聘数量</ion-note>
|
|
|
</ion-item>
|
|
|
- <ion-item mode="md" >
|
|
|
- <ion-label>招聘日期<span class="danger">*</span></ion-label>
|
|
|
- <ion-datetime-button datetime="jobVacancyTime"></ion-datetime-button>
|
|
|
- <ion-modal :keep-contents-mounted="true">
|
|
|
- <ion-datetime placeholder="招聘日期" id="jobVacancyTime"
|
|
|
- v-model="jobVacancyTime"
|
|
|
- dataformatas="YYYY-MM-DD" presentation="date" cancel-text="取消" done-text="确定"
|
|
|
- :show-default-buttons="true">
|
|
|
- </ion-datetime>
|
|
|
- </ion-modal>
|
|
|
- </ion-item>
|
|
|
<ion-item mode="md" :class="[v$.dataModel.validDay.$error?'ion-invalid':'ion-valid']">
|
|
|
<ion-label style="width: 100px;">有效天数<span class="danger">*</span></ion-label>
|
|
|
- <ion-input placeholder="请输入有效天数" label-placement="stacked" :clear-input="true"
|
|
|
+ <ion-input placeholder="请输入有效天数" label-placement="stacked" :clear-input="true"
|
|
|
v-model="formState.dataModel.validDay">
|
|
|
</ion-input>
|
|
|
<ion-note slot="error">请输入有效天数</ion-note>
|
|
|
</ion-item>
|
|
|
+ <ion-item mode="md">
|
|
|
+ <div style="width: 20%">
|
|
|
+ <ion-label>招聘日期<span class="danger">*</span></ion-label>
|
|
|
+ </div>
|
|
|
+ <div style="width: 80%;padding: 0;margin: 0;">
|
|
|
+ <ion-datetime-button datetime="jobVacancyTime" style="width: 70%;"></ion-datetime-button>
|
|
|
+ <ion-modal :keep-contents-mounted="true" >
|
|
|
+ <ion-datetime placeholder="招聘日期" id="jobVacancyTime"
|
|
|
+ v-model="jobVacancyTime"
|
|
|
+ dataformatas="YYYY-MM-DD" presentation="date" cancel-text="取消" done-text="确定"
|
|
|
+ :show-default-buttons="true">
|
|
|
+ </ion-datetime>
|
|
|
+ </ion-modal>
|
|
|
+ </div>
|
|
|
+ </ion-item>
|
|
|
</ion-list>
|
|
|
</form>
|
|
|
</ion-content>
|
|
@@ -66,6 +70,7 @@ import {arrowBackOutline} from 'ionicons/icons';
|
|
|
import {useVuelidate} from "@vuelidate/core";
|
|
|
import {post} from "@/api/common";
|
|
|
import {minLength, required} from "@vuelidate/validators";
|
|
|
+
|
|
|
interface FormState {
|
|
|
dataModel: {
|
|
|
postName?: string | null,
|
|
@@ -113,10 +118,10 @@ export default defineComponent({
|
|
|
const indexToUpdate = postList.value.findIndex(post => post.postName === formState.dataModel.postName);
|
|
|
if (indexToUpdate != -1) {
|
|
|
postList.value[indexToUpdate].recruitCount = formState.dataModel.recruitCount;
|
|
|
- postList.value[indexToUpdate].validTime =jobVacancyTime.value;
|
|
|
+ postList.value[indexToUpdate].validTime = jobVacancyTime.value;
|
|
|
postList.value[indexToUpdate].validDay = formState.dataModel.validDay;
|
|
|
} else {
|
|
|
- formState.dataModel.validTime=jobVacancyTime.value;
|
|
|
+ formState.dataModel.validTime = jobVacancyTime.value;
|
|
|
postList.value.push(formState.dataModel);
|
|
|
}
|
|
|
const jsonPostList = JSON.stringify(postList.value);
|
|
@@ -124,10 +129,10 @@ export default defineComponent({
|
|
|
localStorage.setItem("postData", jsonPostList);
|
|
|
console.log(formState.dataModel);
|
|
|
console.log(postList.value);
|
|
|
- if(route.query.id){
|
|
|
- await router.push({path: "./postList", query: {pageStatus: 2,id:route.query.id}});
|
|
|
- }else{
|
|
|
- await router.push({path: "./postList", query: {pageStatus: 2}});
|
|
|
+ if (route.query.id) {
|
|
|
+ await router.push({path: "./postList", query: {pageStatus: 3, id: route.query.id}});
|
|
|
+ } else {
|
|
|
+ await router.push({path: "./postList", query: {pageStatus: 3}});
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -159,17 +164,17 @@ export default defineComponent({
|
|
|
formState.dataModel.validDay = null;
|
|
|
formState.dataModel.postName = null;
|
|
|
}
|
|
|
- if (route.query.id){
|
|
|
- isEdit.value=true;
|
|
|
+ if (route.query.id) {
|
|
|
+ isEdit.value = true;
|
|
|
}
|
|
|
loadData(id);
|
|
|
};
|
|
|
|
|
|
const back = () => {
|
|
|
if (isEdit.value) {
|
|
|
- router.push({path:'./postList',query: {pageStatus: 2,id:route.query.id}});
|
|
|
+ router.push({path: './postList', query: {pageStatus: 2, id: route.query.id}});
|
|
|
} else {
|
|
|
- router.push({path:'./postList',query: {pageStatus: 2}});
|
|
|
+ router.push({path: './postList', query: {pageStatus: 2}});
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -210,7 +215,8 @@ export default defineComponent({
|
|
|
ion-item {
|
|
|
--border-width: 0;
|
|
|
--border-style: none;
|
|
|
- ion-label,input,ion-select,ion-datetime {
|
|
|
+
|
|
|
+ ion-label, input, ion-select, ion-datetime {
|
|
|
font-size: 14px !important;
|
|
|
}
|
|
|
}
|