From bdae23a40c461c2c6b6ee614f661eac731c949c8 Mon Sep 17 00:00:00 2001
From: Mila <Mila@pollex.com.tw>
Date: 星期三, 22 十二月 2021 14:12:05 +0800
Subject: [PATCH] Merge branch 'master' of https://192.168.0.10:8443/r/pcalife/PAM

---
 PAMapp/pages/recommendConsultant/index.vue |  113 ++++++++++++++++++++++++++++++++++----------------------
 1 files changed, 69 insertions(+), 44 deletions(-)

diff --git a/PAMapp/pages/recommendConsultant/index.vue b/PAMapp/pages/recommendConsultant/index.vue
index ab41747..0d0eb55 100644
--- a/PAMapp/pages/recommendConsultant/index.vue
+++ b/PAMapp/pages/recommendConsultant/index.vue
@@ -3,16 +3,17 @@
     <div class="pb-10 mdTxt">憿批��批</div>
     <SingleSelectBtn :singleSelected.sync="strictQueryDto.gender" :options="genderOptions"/>
     <div class="pam-paragraph">
-      <div class="pb-10 mdTxt required">憿批������</div>
-      <div class="job-pick cursor--pointer"
+      <div class="pb-10 mdTxt required">憿批�����</div>
+      <div class="job-pick"
         @click="showAddress = true">
-        <input class="fz-20 input cursor--pointer pl-10"
+        <input class="text--middle cursor--pointer input pl-10"
           :value="strictQueryDto.area"
-          placeholder="隢���">
+          placeholder="隢���"
+          readonly>
         <i class="icon-down down-icon"></i>
       </div>
       <PopUpFrame :isOpen.sync="showAddress"
-        :drawerSize="'65%'">
+      >
         <AddressPicker
           @confirm="confirmAddress" />
       </PopUpFrame>
@@ -27,15 +28,16 @@
       </div>
       <MultiSelectBtn :mutiSelect.sync="strictQueryDto.requirements" :options="requirementOptions" class="rec-multi-select" />
     </div>
-    <div class="pam-paragraph pam-tags">
+    <div class="pam-paragraph">
       <div class="pb-10 mdTxt">憿批�僑鞈�</div>
         <SingleSelectBtn :singleSelected.sync="strictQueryDto.seniority" :options="seniorityOptions"/>
     </div>
-    <div class="pam-paragraph">
-      <div class="pb-10 mdTxt">靽憿批�遛��漲</div>
+    <!-- <div class="pam-paragraph">
+      TODO:���遛��漲
+      <div class="pb-10 mdTxt">憿批�遛��漲</div>
       <el-rate class="pam-consultant-rate" v-model="strictQueryDto.avgScore">
       </el-rate>
-    </div>
+    </div> -->
     <div class="pam-paragraph">
       <div class="rec-popular">
         <div class="pb-10 mdTxt">���瑼Y揣</div>
@@ -54,7 +56,7 @@
     </div>
 
     <PopUpFrame :isOpen.sync="showDialog"
-      :drawerSize=" '95%' ">
+    >
       <div class="qaTextTitle mdTxt">
         <strong>�閬岷������</strong>
       </div>
@@ -67,7 +69,7 @@
           </div>
         </div>
       </div>
-      <div class="text--center mdTxt mt-30 mb-30">
+      <div class="text--center mdTxt mt-30">
         <el-button type="primary" @click="showDialog = false">������</el-button>
       </div>
     </PopUpFrame>
@@ -82,26 +84,33 @@
     </PopUpFrame>
   </div>
 </template>
+
 <script lang="ts">
   import {
     Vue,
     Component,
-    Mutation
+    Mutation,
+    namespace,
+    Action,
+    State
   } from 'nuxt-property-decorator';
-  import {strictQuery} from '~/assets/ts/api/consultant';
   import * as _ from 'lodash';
+  import { Seniority } from '~/shared/models/enum/seniority';
+
+  const localStorage = namespace('localStorage');
+
   @Component
   export default class RecommendConsultant extends Vue {
     isVisiblePopUp = false;
-    strictQueryDto={
+    strictQueryDto: StrictQueryDto ={
       gender:'',
       area:'',
       status:'',
-      requirements:[],
+      requirements: [],
       otherRequirement:'',
       seniority:'',
       avgScore:0,
-      popularTags:[],
+      popularTags: [],
       otherPopularTags:'',
     };
     genderOptions=[
@@ -136,31 +145,31 @@
         label:'靽�瑼�/閬��',
       },
       {
-        title:'��������',
-        label:'��������',
+        title:'����',
+        label:'����',
       },
     ];
     seniorityOptions=[
       {
         title:'銝��',
         subTitle:'撟湧翩銝����',
-        label:'銝��',
+        label:Seniority.UNLIMITED,
       },
       {
         title:'撟渲��',
         subTitle:'蝯血僑頛犖銝�����',
-        label:'撟渲��',
+        label:Seniority.YOUNG,
       },
       {
         title:'鞈楛',
         subTitle:'����麾',
-        label:'鞈楛',
+        label:Seniority.SENIOR,
       }
     ];
     popularOptions=[
       {
         title: '#��',
-        label:''
+        label:'��'
       },
       {
         title: '#憭梯',
@@ -194,43 +203,45 @@
     queaAboutList = [
       {
         title: '�摨瑁����',
-        content: '蝒���������敺����犖��振摨剜����������������������靘��'
+        content: '����澈擃憿批末嚗�靽�兢蝳�嚗��������嚗��飩������摮拙��粥銝��頝荔�犖����迤閬����'
       },
       {
         title: '摮戊��',
-        content: '������嚗������� ���摮戊雿�����暑�������'
+        content: '摮拙���������葦銋摮貊��撠靘�蒂�雿嚗飛���������������瓷嚗��楝銝���韏瑕飛��'
       },
       {
         title: '鞈閬��',
-        content: '�鞎∪�痊隞餃�������雲������������風嚗鈭箇����撥�����'
+        content: '��迤��瓷撖��雓寡�����嚗鈭箇�����蝳西瓷��◢�����Ⅱ靽�蝛拙��嚗�摰嗆��靘�末��皞���'
       },
       {
         title: '璅暑��隡�',
-        content: '��靽�������嚗��暑����車������犖�����挾���暑��閬��'
+        content: '�銝�頛拙����隡��摮���翰瘣鳴�停敺�����������隡瓷����撌勗�帘摰�嚗蝎曉蔗���僑鈭箇�������'
       },
       {
         title: '靽�瑼�/閬��',
-        content: '��瑼Z�撌梁������蝚血����靘�◢�蝘餉��瘙�������������銝��'
+        content: '��瑼Z�撌梁������蝚血����靘�◢�蝘餉��瘙��'
       },
       {
-        title: '��靽',
-        content: '���漲��������翰�祟�敺����雿�憿批����脰�������蝯行�����潘��隞乩������“������潦��'
-      },
-      {
-        title: '�隞�',
-        content: '���漲��������翰�祟�敺����雿�憿批����脰�������蝯行�����潘��隞乩������“������潦��'
-      },
+        title: '����',
+        content: '���������憸券�����鈭怒�����嚗���摰帘摰漲嚗��隞亙��澈��ˊ�靽���嚗�'
+      }
     ];
     showDialog = false;
     showAddress = false;
 
     @Mutation updateStrictQueryList!: (data: any) => void;
+    @Action storeStrictQueryList!: (data: any) => Promise<number>;
+    @State strictQueryList!: any;
+    @localStorage.State recommendConsultantItem!: string;
 
-    makePair():void{
-      strictQuery(this.strictQueryDto).then(res=>{
-        console.log('resultData',res.data);
-        this.updateStrictQueryList(res.data);
-        if (res.data.length === 0) {
+    mounted() {
+      if (!!this.recommendConsultantItem) {
+        this.strictQueryDto = JSON.parse(this.recommendConsultantItem);
+      }
+    }
+    async makePair() {
+      await this.storeStrictQueryList(this.strictQueryDto).then(dataLength => {
+        if (dataLength === 0) {
           this.isVisiblePopUp = true;
           return;
         }
@@ -239,7 +250,9 @@
     }
     get notFinishByRequireRules():boolean{
       const area = this.strictQueryDto.area;
-      const requirementLength = this.strictQueryDto.requirements.length;
+      const requirementLength = this.strictQueryDto.requirements
+        ? this.strictQueryDto.requirements.length
+        : 0;
       return !(area && requirementLength >0)
     }
 
@@ -253,9 +266,21 @@
     MALE="male",
     FEMALE="female",
   }
+
+  export interface StrictQueryDto {
+    gender: string,
+    area: string,
+    status: string,
+    requirements: string[],
+    otherRequirement: string,
+    seniority: string,
+    avgScore: number,
+    popularTags: string[],
+    otherPopularTags: string
+  }
 </script>
 
-<style lang="scss" >
+<style lang="scss">
 
 .pam-rec-cosultant-page {
   .rec-pop-container{
@@ -337,8 +362,9 @@
 
   .qa-dialog {
     overflow-y: auto;
-    height: 500px;
+    height: 60vh;
     margin-top: 20px;
+    text-align: justify;
   }
 
   .qaTextTitle {
@@ -486,7 +512,7 @@
       z-index: 5;
     }
   }
-  
+
   .area-txt {
     display: flex;
     align-items: center;
@@ -544,7 +570,6 @@
       flex-wrap: wrap;
     }
   }
-
   }
 }
 

--
Gitblit v1.8.0