Browse Source

app端人员标签

lizeyu 11 months ago
parent
commit
9bdc61fe33

+ 2 - 2
h5app/src/components/companySelectionLike.vue

@@ -1,9 +1,9 @@
 <template>
-  <ion-button id="companySelectionLike" style="color: #02a6f1;font-size: 15px;" fill="clear" @click="onOpen()">选择
+  <ion-button style="color: #02a6f1;font-size: 15px;" fill="clear" @click="onOpen()">选择
   </ion-button>
   <ion-page>
     <ion-content class="ion-padding">
-      <ion-modal trigger="companySelectionLike" :is-open="isOpen" @willPresent="onRest()">
+      <ion-modal :is-open="isOpen" @willPresent="onRest()">
         <ion-header class="header-theme2">
           <ion-toolbar>
             <ion-buttons slot="start">

+ 2 - 2
h5app/src/components/industrySelection.vue

@@ -1,9 +1,9 @@
 <template>
-  <ion-button id="industryModel" style="color: #02a6f1;font-size: 15px;" fill="clear" @click="loadIndustryID()">选择
+  <ion-button style="color: #02a6f1;font-size: 15px;" fill="clear" @click="loadIndustryID()">选择
   </ion-button>
   <ion-page>
     <ion-content class="ion-padding">
-      <ion-modal class="cascade-model" trigger="industryModel" :backdrop-dismiss="false" :is-open="isOpen"
+      <ion-modal class="cascade-model" :backdrop-dismiss="false" :is-open="isOpen"
                  :initial-breakpoint="1"
                  :breakpoints="[0, 1]">
         <ion-toolbar>

+ 51 - 28
h5app/src/components/labelSelection.vue

@@ -1,15 +1,16 @@
 <template>
-  <ion-button id="labelSelection" style="color: #02a6f1;font-size: 15px;" fill="clear" @click="loadData()">选择标签
+  <ion-button style="color: #02a6f1;font-size: 15px;" fill="clear" @click="onOpen()">选择标签
   </ion-button>
   <ion-page>
     <ion-content class="ion-padding">
-      <ion-modal trigger="labelSelection" :is-open="isOpen">
+      <ion-modal :is-open="searchParams.isOpen"
+                 @willDismiss="onWillDismiss()" @willPresent="onWillPresent()">
         <ion-header class="header-theme2">
           <ion-toolbar>
             <ion-buttons slot="start">
-              <ion-icon :icon="arrowBackOutline" @click="onCancel()"></ion-icon>
+              <ion-icon :icon="arrowBackOutline" @click="onClose()"></ion-icon>
             </ion-buttons>
-            <ion-title>{{ title }}</ion-title>
+            <ion-title>{{ searchParams.title }}</ion-title>
             <ion-buttons slot="end">
               <ion-button fill="clear" @click="onConfirm()">确定</ion-button>
             </ion-buttons>
@@ -64,13 +65,13 @@
 
 <script lang="ts">
 
-import {defineComponent, ref} from 'vue';
+import {defineComponent, nextTick, reactive, ref} from 'vue';
 import {arrowBackOutline, searchOutline} from 'ionicons/icons';
 import {IonIcon} from '@ionic/vue';
 import {getLabelList} from "@/api/label";
 
 export default defineComponent({
-  name: 'labelSelection',
+  // name: 'labelSelection',
   components: {IonIcon},
   props: {
     listLabel: {
@@ -86,40 +87,58 @@ export default defineComponent({
       default: null
     }
   },
-  setup(props, context) {
+  emits: ["result-back"],
+  setup(props, {emit}) {
+
     const loading = ref(true);
     const isOpen = ref(false);
     const basicsLabelList = ref<any>([]);
     const customLabelList = ref<any>([]);
+    const searchParams = reactive({
+      pageIndex: 1, pageSize: 9999, bigType: null,title:'',isOpen:false
+    });
+
     const loadData = async function () {
+      searchParams.title = props.title;
+      searchParams.bigType = props.bigType as any;
       loading.value = true;
-      basicsLabelList.value = [];
-      customLabelList.value = [];
-      const result: any = await getLabelList({pageIndex: 1, pageSize: 9999, bigType: props.bigType})
 
-      result.list.forEach((x: any) => {
-        if (props.listLabel) {
-          x.checked = props.listLabel.findIndex((f: any) => f.labelID == x.labelID) >= 0;
-        }
-
-        if (x.labelType === 1) {
-          basicsLabelList.value.push(x);
-        } else {
-          customLabelList.value.push(x);
-        }
+      getLabelList(searchParams).then((result: any) => {
+        result.list.forEach((x: any) => {
+          if (props.listLabel) {
+            x.checked = props.listLabel.findIndex((f: any) => f.labelID == x.labelID) >= 0;
+          }
+        })
+        basicsLabelList.value = result.list.filter((x: any)=>x.labelType === 1);
+        customLabelList.value = result.list.filter((x: any)=>x.labelType === 2);
       })
       loading.value = false;
-      isOpen.value = true;
+    }
+
+    const onOpen = () => {
+      searchParams.isOpen = true;
+    }
+
+    const onClose = () => {
+      searchParams.isOpen = false;
     }
 
     const onConfirm = () => {
-      const selects = basicsLabelList.value.filter((x: any) => x.checked == true).concat(customLabelList.value.filter((x: any) => x.checked == true))
-      context.emit("resultBack", selects)
-      isOpen.value = false;
+      searchParams.isOpen = false;
+      const selects = basicsLabelList.value.filter((x: any) => x.checked == true)
+          .concat(customLabelList.value.filter((x: any) => x.checked == true));
+      emit("result-back", selects);
+    }
+
+    const onWillPresent = ()=>{
+      loadData();
     }
 
-    const onCancel = () => {
-      isOpen.value = false;
+    const onWillDismiss = ()=>{
+      basicsLabelList.value = [];
+      customLabelList.value = [];
+      searchParams.title='';
+      searchParams.bigType=null;
     }
 
     return {
@@ -127,11 +146,15 @@ export default defineComponent({
       arrowBackOutline,
       loading,
       isOpen,
+      searchParams,
       basicsLabelList,
       customLabelList,
+      onOpen,
+      onClose,
       onConfirm,
-      onCancel,
-      loadData
+      loadData,
+      onWillPresent
+      ,onWillDismiss
     }
   }
 });

+ 2 - 2
h5app/src/components/ocCategorySelection.vue

@@ -1,9 +1,9 @@
 <template>
-  <ion-button id="ocCategoryModal" style="color: #02a6f1;font-size: 15px;" fill="clear" @click="loadOccupationalID()">选择
+  <ion-button style="color: #02a6f1;font-size: 15px;" fill="clear" @click="loadOccupationalID()">选择
   </ion-button>
   <ion-page>
     <ion-content class="ion-padding">
-      <ion-modal class="cascade-model" trigger="ocCategoryModal" :backdrop-dismiss="false" :is-open="isOpen" :initial-breakpoint="1"
+      <ion-modal class="cascade-model" :backdrop-dismiss="false" :is-open="isOpen" :initial-breakpoint="1"
                  :breakpoints="[0, 1]">
         <ion-toolbar>
           <ion-item>

+ 0 - 133
h5app/src/components/picker.vue

@@ -1,133 +0,0 @@
-<template>
-  <ion-button style="color: #02a6f1;font-size: 15px;" fill="clear" @click="openPicker()">选择</ion-button>
-</template>
-
-<script lang="ts">
-import {ref, watch, defineComponent} from 'vue';
-import {pickerController} from '@ionic/vue';
-import {PickerButton, PickerColumnOption, PickerColumn, PickerOptions} from '@ionic/core';
-import {getProfessionLevelList} from "@/api/recommendmgt";
-
-interface PickerColumnOptions extends PickerColumnOption {
-  parent?: any;
-}
-
-export default defineComponent({
-  name: 'picker',
-  props: {
-    ProfessionID: {type: String, default: ''},
-    },
-  setup(props,context) {
-    const proList = ref();
-    const pickerOptions = ref<PickerOptions>();
-    const pickerColumns = ref<PickerColumn[]>([]);
-    const pickerButtons = ref<PickerButton[]>([]);
-    const oneColumnOptions = ref<PickerColumnOptions[]>([]);
-    const twoColumnOptions = ref<PickerColumnOptions[]>([]);
-    const threeColumnOptions = ref<PickerColumnOptions[]>([]);
-    const oldColumnProfessionID1 = ref(props.ProfessionID);
-    const oldColumnProfessionID2 = ref();
-    getProfessionLevelList().then(data => {
-      proList.value = data;
-
-      oneColumnOptions.value = proList.value.filter((x: any) => x.professionLevel == "1").map((m: any) => ({
-        text: m.professionName,
-        value: m.professionID,
-        parent: m.parentProfessionID,
-        selected: false
-      }));
-      oneColumnOptions.value[0].selected=true;
-      oldColumnProfessionID1.value = pickerColumns.value[0]?.options[0].value;
-
-      twoColumnOptions.value = proList.value.filter((x: any) => x.professionLevel == "2").map((m: any) => ({
-        text: m.professionName,
-        value: m.professionID,
-        parent: m.parentProfessionID,
-        selected: false
-      }))
-      twoColumnOptions.value[0].selected=true;
-      oldColumnProfessionID2.value = pickerColumns.value[1]?.options[0].value;
-
-      threeColumnOptions.value = proList.value.filter((x: any) => x.professionLevel == "3").map((m: any) => ({
-        text: m.professionName,
-        value: m.professionID,
-        parent: m.parentProfessionID,
-        selected: false
-      }));
-
-      pickerColumns.value = [
-        {name: 'one', selectedIndex: 0, options: oneColumnOptions.value},
-        {name: 'two', selectedIndex: 1, options: twoColumnOptions.value},
-        {name: 'three', selectedIndex: 2, options: threeColumnOptions.value}
-      ]
-      pickerButtons.value = [
-        {text: '取消', role: 'cancel',},
-        {
-          text: '确定',
-          handler: (value) => {
-            context.emit("SetProfessionID",value.three);
-          },
-        },
-      ];
-    });
-    const picker = ref();
-    const openPicker = async () => {
-      picker.value = await pickerController.create({
-        columns: pickerColumns.value,
-        buttons: pickerButtons.value
-      });
-
-      watch(pickerColumns.value.filter(f=>f.name=="one")[0].options.filter(f=>f.selected==true)[0], () => {
-        const newVal = pickerColumns.value.filter(f=>f.name=="one")[0].options.filter(f=>f.selected==true)[0]
-        if (oldColumnProfessionID1.value != newVal?.value) {
-          pickerColumns.value.map(x => {
-            if (x.name == "two") {
-              x.options = twoColumnOptions.value.filter(x => x.parent==newVal?.value);
-              if(x.options.length>0){
-                oldColumnProfessionID2.value = x.options[0].value;
-                x.options[0].selected=true;
-              }
-            }
-          })
-
-          pickerColumns.value.map(x => {
-            if (x.name == "three") {
-              x.options = threeColumnOptions.value.filter(f => f.parent == oldColumnProfessionID2.value);
-              if(x.options.length>0) {
-                x.options[0].selected = true;
-              }
-            }
-          })
-
-          pickerController.dismiss().then((e) => {console.log(e)})
-          openPicker()
-          oldColumnProfessionID1.value = newVal?.value;
-        }
-      });
-
-      watch(pickerColumns.value.filter(f=>f.name=="two")[0].options.filter(f=>f.selected==true)[0], () => {
-        const newVal = pickerColumns.value.filter(f=>f.name=="two")[0].options.filter(f=>f.selected==true)[0]
-
-        if (oldColumnProfessionID2.value != newVal.value) {
-          pickerColumns.value.map(x => {
-            if (x.name == "three") {
-              x.options = threeColumnOptions.value.filter(f => f.parent == newVal.value);
-            }
-          })
-
-          pickerController.dismiss().then((e) => {console.log(e)})
-          openPicker()
-          oldColumnProfessionID2.value = newVal.value;
-        }
-      });
-
-      await picker.value.present();
-    }
-
-    return {
-      openPicker,
-    }
-  }
-});
-</script>
-

+ 2 - 2
h5app/src/components/postSelection.vue

@@ -1,9 +1,9 @@
 <template>
-  <ion-button id="open-modal" style="color: #02a6f1;font-size: 15px;" fill="clear" @click="loadProfessionInfo()">选择
+  <ion-button style="color: #02a6f1;font-size: 15px;" fill="clear" @click="loadProfessionInfo()">选择
   </ion-button>
   <ion-page >
     <ion-content class="ion-padding">
-      <ion-modal class="cascade-model" trigger="open-modal" :backdrop-dismiss="false" @willPresent="onRest()" :is-open="isOpen" :initial-breakpoint="1"
+      <ion-modal class="cascade-model" :backdrop-dismiss="false" @willPresent="onRest()" :is-open="isOpen" :initial-breakpoint="1"
                  :breakpoints="[0, 1]">
         <ion-toolbar>
           <ion-item>

+ 2 - 2
h5app/src/components/postSelectionLike.vue

@@ -1,9 +1,9 @@
 <template>
-  <ion-button id="postSelectionLike" style="color: #02a6f1;font-size: 15px;" fill="clear" @click="onOpen()">选择
+  <ion-button style="color: #02a6f1;font-size: 15px;" fill="clear" @click="onOpen()">选择
   </ion-button>
   <ion-page>
     <ion-content class="ion-padding">
-      <ion-modal trigger="postSelectionLike" :is-open="isOpen" @willPresent="onRest()">
+      <ion-modal :is-open="isOpen" @willPresent="onRest()">
         <ion-header class="header-theme2">
           <ion-toolbar>
             <ion-buttons slot="start">

+ 2 - 2
h5app/src/components/workCategorySelection.vue

@@ -1,9 +1,9 @@
 <template>
-  <ion-button id="workCategoryModal" style="color: #02a6f1;font-size: 15px;" fill="clear" @click="loadWorkCategoryInfo()">选择
+  <ion-button style="color: #02a6f1;font-size: 15px;" fill="clear" @click="loadWorkCategoryInfo()">选择
   </ion-button>
   <ion-page >
     <ion-content class="ion-padding">
-      <ion-modal class="cascade-model" trigger="workCategoryModal" :backdrop-dismiss="false" @willPresent="onRest()" :is-open="isOpen" :initial-breakpoint="1"
+      <ion-modal class="cascade-model" :backdrop-dismiss="false" @willPresent="onRest()" :is-open="isOpen" :initial-breakpoint="1"
                  :breakpoints="[0, 1]">
         <ion-toolbar>
           <ion-item>

+ 5 - 1
h5app/src/plugins/ionic.ts

@@ -52,7 +52,9 @@ import {
     IonInfiniteScrollContent,
     IonModal,
     IonPopover,
-    IonAvatar
+    IonAvatar,
+    IonNote,
+    IonAlert,
 } from '@ionic/vue';
 import type {App} from 'vue';
 import BFileList from "@/components/fileList.vue"
@@ -104,6 +106,8 @@ export function setupIonic(app: App<Element>) {
         .component("IonFabButton", IonFabButton)
         .component("IonItemOptions", IonItemOptions)
         .component("IonItemOption", IonItemOption)
+        .component("IonNote", IonNote)
+        .component("IonAlert", IonAlert)
         .component(IonText.name, IonText)
         .component(IonTextarea.name, IonTextarea)
         .component('IonPopover', IonPopover)

+ 26 - 21
h5app/src/views/pages/company/edit.vue

@@ -138,27 +138,27 @@
               <div>
                 <ion-radio v-model:checked="isLongDate" justify="start" labelPlacement="end"
                            @click="changeLongDate" style="height:30px;">至长期</ion-radio>
-                <ion-datetime-button datetime="validDate" style="position:relative;right:105px;"></ion-datetime-button>
-                <ion-modal :keep-contents-mounted="true" >
-                  <ion-datetime id="validDate" name="validDate"
-                                v-model="dataModel.validDate"  :prefer-wheel="true"  @ionChange="changeValidDate"
-                                dataformatas="YYYY-MM-DD" presentation="date" cancel-text="取消" done-text="确定"
-                                :show-default-buttons="true" >
-                  </ion-datetime>
-                </ion-modal>
+<!--                <ion-datetime-button datetime="validDate" style="position:relative;right:105px;"></ion-datetime-button>-->
+<!--                <ion-modal :keep-contents-mounted="true" >-->
+<!--                  <ion-datetime id="validDate" name="validDate"-->
+<!--                                v-model="dataModel.validDate"  :prefer-wheel="true"  @ionChange="changeValidDate"-->
+<!--                                dataformatas="YYYY-MM-DD" presentation="date" cancel-text="取消" done-text="确定"-->
+<!--                                :show-default-buttons="true" >-->
+<!--                  </ion-datetime>-->
+<!--                </ion-modal>-->
               </div>
             </div>
 
             <div class="form-input">
               <ion-label>成立日期</ion-label>
-                <ion-datetime-button datetime="establishmentTime" style="position:relative;right:110px;" ></ion-datetime-button>
-                <ion-modal :keep-contents-mounted="true" >
-                  <ion-datetime id="establishmentTime" name="establishmentTime"
-                                v-model="dataModel.establishmentTime"  :prefer-wheel="true"
-                                dataformatas="YYYY-MM-DD" presentation="date" cancel-text="取消" done-text="确定"
-                                :show-default-buttons="true" >
-                  </ion-datetime>
-                </ion-modal>
+<!--                <ion-datetime-button datetime="establishmentTime" style="position:relative;right:110px;" ></ion-datetime-button>-->
+<!--                <ion-modal :keep-contents-mounted="true" >-->
+<!--                  <ion-datetime id="establishmentTime" name="establishmentTime"-->
+<!--                                v-model="dataModel.establishmentTime"  :prefer-wheel="true"-->
+<!--                                dataformatas="YYYY-MM-DD" presentation="date" cancel-text="取消" done-text="确定"-->
+<!--                                :show-default-buttons="true" >-->
+<!--                  </ion-datetime>-->
+<!--                </ion-modal>-->
             </div>
             <div class="form-input" >
               <ion-label>注册资本(万元)</ion-label>
@@ -286,8 +286,10 @@
                 </ion-col>
                 <ion-col>
                   <ion-item style="float: right;padding:0px;margin: 0px;">
-                    <label-selection :big-type="1" :list-label="dataModel.listLabel" :title="'企业标签'"
-                                     @resultBack="onResultBackLabels"></label-selection>
+                    <label-selection :key="'refLabelSelectionKey'" :ref="refLabelSelection" :big-type="1" :list-label="dataModel.listLabel"
+                                     :title="'企业标签'" v-bind="$attrs" @resultBack="onResultBackLabels"></label-selection>
+<!--                    <component :is="refLabelSelection" :big-type="1" :list-label="dataModel.listLabel" :title="'企业标签'"-->
+<!--                               @resultBack="onResultBackLabels"></component>-->
                   </ion-item>
                 </ion-col>
               </ion-row>
@@ -343,7 +345,7 @@ interface StepParams{
   loginUserID: string
 }
 export default defineComponent({
-  name: 'CompanyEdit',
+  // name: 'CompanyEdit',
   components:{IndustrySelection,CompanySelectionLike, LabelSelection},
   setup() {
     const route = useRoute();
@@ -428,6 +430,7 @@ export default defineComponent({
     const siteList = ref<any>([]);
     const shortAgeTypeList = ref<any>([]);
     const refCompanySelectionLike = ref();
+    const refLabelSelection = ref();
 
     // /** 选择的区域 */
     // const regionChecked= ref<string>('');
@@ -649,7 +652,7 @@ export default defineComponent({
       if(isAllowCommit.value&&inputValid.value){
         saveCompany(formState.dataModel).then(result => {
           if (result) {
-              router.push({path: './postList', query: {reload:1,id:formState.dataModel.companyID,status:3,isEdit:isAdd.value!=true?1:0}});
+              router.push({path: './postList', query: {reload:1,id:formState.dataModel.companyID,status:3,isEdit:isAdd.value!=true?1:0,random:Math.random()}});
           }
         });
       }
@@ -657,6 +660,7 @@ export default defineComponent({
 
     const onResultBackLabels = (data: any) => {
       formState.dataModel.listLabel = data;
+      refLabelSelection.value = null;
     }
 
     const onResultInfo = (data: any)=>{
@@ -677,7 +681,7 @@ export default defineComponent({
     }
     const onRedirect = (statusValue:any) => {
       if(!isAdd.value && statusValue==3) {
-          router.push({path: './postList', query: {reload:1,id:formState.dataModel.companyID,status:3,isEdit:1}});
+          router.push({path: './postList', query: {reload:1,id:formState.dataModel.companyID,status:3,isEdit:1,random:Math.random()}});
       }
     }
 
@@ -766,6 +770,7 @@ export default defineComponent({
       refCompanySelectionLike,
       onOpenCompany,
       onResultInfo,
+      refLabelSelection,
       onResultBackLabels,
       isLongDate,
       curStepData,

+ 30 - 24
h5app/src/views/pages/company/editPost.vue

@@ -50,25 +50,25 @@
           </div>
           <div class="form-input">
             <ion-label>招聘日期<span class="danger">*</span></ion-label>
-            <div>
-              <ion-datetime-button datetime="startTime" style="float:left;"></ion-datetime-button>
-              <span style="float:left;padding-top: 5px;">至</span>
-              <ion-datetime-button datetime="endTime" style="float:left;"></ion-datetime-button>
-              <ion-modal :keep-contents-mounted="true">
-                <ion-datetime placeholder="招聘开始日期" id="startTime"
-                              v-model="dataModel.startTime" :prefer-wheel="true"
-                              dataformatas="YYYY-MM-DD" presentation="date" cancel-text="取消" done-text="确定"
-                              :show-default-buttons="true" style="text-align: left;width: 100%;">
-                </ion-datetime>
-              </ion-modal>
-              <ion-modal :keep-contents-mounted="true">
-                <ion-datetime placeholder="招聘结束日期" id="endTime"
-                              v-model="dataModel.endTime" :prefer-wheel="true"
-                              dataformatas="YYYY-MM-DD" presentation="date" cancel-text="取消" done-text="确定"
-                              :show-default-buttons="true" style="text-align: left;width: 100%;">
-                </ion-datetime>
-              </ion-modal>
-            </div>
+<!--            <div>-->
+<!--              <ion-datetime-button datetime="startTime" style="float:left;"></ion-datetime-button>-->
+<!--              <span style="float:left;padding-top: 5px;">至</span>-->
+<!--              <ion-datetime-button datetime="endTime" style="float:left;"></ion-datetime-button>-->
+<!--              <ion-modal :keep-contents-mounted="true">-->
+<!--                <ion-datetime placeholder="招聘开始日期" id="startTime"-->
+<!--                              v-model="dataModel.startTime" :prefer-wheel="true"-->
+<!--                              dataformatas="YYYY-MM-DD" presentation="date" cancel-text="取消" done-text="确定"-->
+<!--                              :show-default-buttons="true" style="text-align: left;width: 100%;">-->
+<!--                </ion-datetime>-->
+<!--              </ion-modal>-->
+<!--              <ion-modal :keep-contents-mounted="true">-->
+<!--                <ion-datetime placeholder="招聘结束日期" id="endTime"-->
+<!--                              v-model="dataModel.endTime" :prefer-wheel="true"-->
+<!--                              dataformatas="YYYY-MM-DD" presentation="date" cancel-text="取消" done-text="确定"-->
+<!--                              :show-default-buttons="true" style="text-align: left;width: 100%;">-->
+<!--                </ion-datetime>-->
+<!--              </ion-modal>-->
+<!--            </div>-->
           </div>
           <div style="width: 100%;overflow: hidden;"></div>
           <div class="form-input">
@@ -199,9 +199,11 @@
                 </ion-col>
                 <ion-col>
                   <ion-item style="float: right;padding:0px;margin: 0px;">
-                    <label-selection :big-type="3" :list-label="dataModel.listLabel" :title="'岗位标签'"
-                                     @resultBack="onResultBackLabels"></label-selection>
-                  </ion-item>
+                    <label-selection :key="'refLabelSelectionKey2'" :ref="refLabelSelection2" :big-type="3" :list-label="dataModel.listLabel" :title="'岗位标签'"
+                                     v-bind="$attrs" @resultBack="onResultBackLabels"></label-selection>
+<!--                    <component :is="refLabelSelection2" :big-type="3" :list-label="dataModel.listLabel" :title="'岗位标签'"-->
+<!--                               @resultBack="onResultBackLabels"></component>-->
+                 </ion-item>
                 </ion-col>
               </ion-row>
             </div>
@@ -217,7 +219,7 @@
   </ion-page>
 </template>
 <script lang="ts">
-import {computed, defineComponent, reactive, ref, toRefs, watch} from "vue";
+import {computed, defineAsyncComponent, defineComponent, reactive, ref, toRefs, watch} from "vue";
 import {arrowBackOutline} from 'ionicons/icons';
 import {useRoute, useRouter} from "vue-router";
 import {alertController, onIonViewDidEnter} from "@ionic/vue";
@@ -299,6 +301,7 @@ export default defineComponent({
     const cultureRankList = ref([]);
     const workNatureList = ref([]);
     const refPostSelectionLike = ref();
+    const refLabelSelection2 = ref();
 
     const presentAlert = async (message: string) => {
       const alert = await alertController.create({
@@ -329,7 +332,7 @@ export default defineComponent({
       if (isCommit.value && inputValid.value) {
         savePost(formState.dataModel).then(result => {
           if (result) {
-            router.push({path: "./postList", query: {reload: 1, id: formState.dataModel.companyID, status: 3}});
+            router.push({path: "./postList", query: {reload: 1, id: formState.dataModel.companyID, status: 3,random:Math.random()}});
           }
         })
       }
@@ -337,6 +340,7 @@ export default defineComponent({
 
     const onResultBackLabels = (data: any) => {
       formState.dataModel.listLabel = data;
+      refLabelSelection2.value = null;
     }
 
     const onResultInfo = (data: any) => {
@@ -510,6 +514,7 @@ export default defineComponent({
         reload(route.query.id, route.query.companyID, route.query.isEdit);
     });
 
+
     return {
       ...toRefs(formState),
       arrowBackOutline,
@@ -523,6 +528,7 @@ export default defineComponent({
       workNatureList,
       cultureRankList,
       v$,
+      refLabelSelection2,
       onResultBackLabels,
       refPostSelectionLike,
       onOpenPost,

+ 3 - 3
h5app/src/views/pages/company/postList.vue

@@ -233,13 +233,13 @@ export default defineComponent({
     }
 
     const onAdd = () => {
-      router.push({path: './editPost', query: {reload:1,id: null,companyID:pageParams.companyID,isEdit:isEditCompany.value}});
+      router.push({path: './editPost', query: {reload:1,id: null,companyID:pageParams.companyID,isEdit:isEditCompany.value, random: Math.random()}});
     };
     const onEdit = (postID:any) => {
-      router.push({path: './editPost', query: {reload:1,id:postID,companyID:pageParams.companyID,isEdit:isEditCompany.value}});
+      router.push({path: './editPost', query: {reload:1,id:postID,companyID:pageParams.companyID,isEdit:isEditCompany.value, random: Math.random()}});
     };
     const onBack = () => {
-      router.push({path: './edit', query: {reload:1,id:pageParams.companyID,status:1}});
+      router.push({path: './edit', query: {reload:1,id:pageParams.companyID,status:1, random: Math.random()}});
     };
     const onRedirect = (statusValue:any) => {
       if(isEditCompany.value==1 && statusValue==1) router.push({path: './edit', query: {reload:1,id:pageParams.companyID,status:1}});

+ 2 - 2
h5app/src/views/pages/jobhunt/edit.vue

@@ -330,8 +330,8 @@
               </ion-col>
               <ion-col>
                 <ion-item style="float: right;padding:0px;margin: 0px;">
-                  <label-selection :big-type="2" :list-label="baseData.listLabel" :title="'人员标签'"
-                                   @resultBack="onResultBackLabels"></label-selection>
+                  <label-selection :key="'refLabelSelectionKey3'"  :big-type="2" :list-label="baseData.listLabel" :title="'人员标签'"
+                                   v-bind="$attrs" @resultBack="onResultBackLabels"></label-selection>
                 </ion-item>
               </ion-col>
             </ion-row>