保誠-保戶業務員媒合平台
Tomas
2022-04-06 277a354ac5ba5452286ced03b6b32bc81559bc58
fix#137459: [前台] 編輯顧問資料 : 編輯到職日期,日曆選擇器位移
修改1個檔案
15 ■■■■■ 已變更過的檔案
PAMapp/pages/agentInfo/edit/_agentNo.vue 15 ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
PAMapp/pages/agentInfo/edit/_agentNo.vue
@@ -127,6 +127,7 @@
        </UiField>
        <UiField :span="12" icon="calender" label="到職日期" class="pam-editInfo-date-picker">
          <UiDatePicker
              id="el-date-picker"
              class="mt-10"
              :defaultValue ="agentInfo.entryDate"
              @changeDate="onChangeDate($event)"
@@ -274,6 +275,7 @@
import { agentCommunicationStyleList } from '~/shared/const/agent-communication-style-list';
import { taiwanCities } from '~/shared/const/taiwan-cities';
const localStorageTest = namespace('localStorage');
const loginStore = namespace('login.store');
@@ -370,6 +372,19 @@
  mounted(){
    this.setAgentInfo(this.agentInfo);
    const bodyEl = document.querySelector('body');
    bodyEl?.addEventListener('scroll', function() {
      const elDatePickerEl = document.querySelector('#el-date-picker');
      const elDatePickerPanelEl = document.querySelector('.el-picker-panel');
      if (elDatePickerPanelEl) {
        elDatePickerPanelEl['style']['z-index'] = 5;
        const elDatePickerOffsetTop = elDatePickerEl!.getBoundingClientRect().top;
        elDatePickerPanelEl!['style'].top = elDatePickerOffsetTop + 30 + 'px';
      }
    });
  }
  private setAgentInfo(agentInfo: AgentInfo): void {