From abfd26bb700d93a92da6a04703b0187d4acaaeb5 Mon Sep 17 00:00:00 2001
From: Tomas <tomasysh@gmail.com>
Date: 星期三, 22 十二月 2021 10:13:02 +0800
Subject: [PATCH] refactor: move ts folder to shared folder

---
 PAMapp/pages/recommendConsultant/index.vue |   46 ++++++++++++++++++++++++----------------------
 1 files changed, 24 insertions(+), 22 deletions(-)

diff --git a/PAMapp/pages/recommendConsultant/index.vue b/PAMapp/pages/recommendConsultant/index.vue
index 8e6ad59..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="text--middle  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>
@@ -31,11 +32,12 @@
       <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,16 +84,18 @@
     </PopUpFrame>
   </div>
 </template>
+
 <script lang="ts">
   import {
     Vue,
     Component,
     Mutation,
-    namespace
+    namespace,
+    Action,
+    State
   } from 'nuxt-property-decorator';
   import * as _ from 'lodash';
-  import { strictQuery } from '~/assets/ts/api/consultant';
-  import { Seniority } from '~/assets/ts/models/enum/Seniority';
+  import { Seniority } from '~/shared/models/enum/seniority';
 
   const localStorage = namespace('localStorage');
 
@@ -219,14 +223,15 @@
       },
       {
         title: '����',
-        content: '���� ���������憸券�����鈭怒�����嚗���摰帘摰漲嚗��隞亙��澈��ˊ�靽���嚗�'
+        content: '���������憸券�����鈭怒�����嚗���摰帘摰漲嚗��隞亙��澈��ˊ�靽���嚗�'
       }
     ];
     showDialog = false;
     showAddress = false;
 
     @Mutation updateStrictQueryList!: (data: any) => void;
-    @localStorage.Mutation storageRecommendConsultant!: (data: any) => void;
+    @Action storeStrictQueryList!: (data: any) => Promise<number>;
+    @State strictQueryList!: any;
     @localStorage.State recommendConsultantItem!: string;
 
     mounted() {
@@ -234,12 +239,9 @@
         this.strictQueryDto = JSON.parse(this.recommendConsultantItem);
       }
     }
-    makePair():void{
-      strictQuery(this.strictQueryDto).then(res=>{
-        console.log('resultData',res.data);
-        this.storageRecommendConsultant(JSON.stringify(this.strictQueryDto));
-        this.updateStrictQueryList(res.data);
-        if (res.data.length === 0) {
+    async makePair() {
+      await this.storeStrictQueryList(this.strictQueryDto).then(dataLength => {
+        if (dataLength === 0) {
           this.isVisiblePopUp = true;
           return;
         }
@@ -360,7 +362,7 @@
 
   .qa-dialog {
     overflow-y: auto;
-    height: 500px;
+    height: 60vh;
     margin-top: 20px;
     text-align: justify;
   }

--
Gitblit v1.8.0