From f41af9be6cf3a4edb8b222f6e351bfaa03362085 Mon Sep 17 00:00:00 2001 From: Mila <Mila@pollex.com.tw> Date: 星期一, 17 一月 2022 13:56:18 +0800 Subject: [PATCH] update: 新增約訪記錄 api 串接 --- PAMapp/components/Interview/InterviewAdd.vue | 40 +++++++++++++++++++++++++++++++++++++--- 1 files changed, 37 insertions(+), 3 deletions(-) diff --git a/PAMapp/components/Interview/InterviewAdd.vue b/PAMapp/components/Interview/InterviewAdd.vue index 6cac922..f88210e 100644 --- a/PAMapp/components/Interview/InterviewAdd.vue +++ b/PAMapp/components/Interview/InterviewAdd.vue @@ -11,23 +11,40 @@ ></DateTimePicker> <div class="mdTxt mb-10 mt-10">蝝赤蝝����</div> - <el-input type="textarea" :rows="5" placeholder="蝝赤�" resize="none"> + <el-input + type="textarea" + :rows="5" + placeholder="隢撓�蝝赤蝝����" + resize="none" + v-model="content" + > </el-input> <div class="edit-appointment-record-btn"> <el-button>����</el-button> - <el-button :disabled="!interviewTime">蝣箏��</el-button> + <el-button :disabled="!interviewTime || !content" @click="createInterviewRecord">蝣箏��</el-button> </div> + + <PopUpFrame :isOpen.sync="isConfirmPopup" + @closePopUp="closeConfirmPopup"> + <div class="text--center mdTxt">�憓���</div> + <div class="text--center mt-30"> + <el-button @click="closeConfirmPopup" type="primary">蝣箏��</el-button> + </div> + </PopUpFrame> </div> </template> <script lang="ts"> -import { AppointmentLog } from '~/shared/models/appointment.model'; +import { AppointmentLog, InterviewRecordInfo } from '~/shared/models/appointment.model'; import { Vue, Component, Prop } from 'nuxt-property-decorator'; import authService from '~/shared/services/auth.service'; +import appointmentService from '~/shared/services/appointment.service'; @Component export default class InterviewAdd extends Vue { interviewTime = ''; + content = ''; + isConfirmPopup = false; // @Prop() // myAppointmentReviewLogList!: AppointmentLog[]; @@ -39,6 +56,23 @@ // this.isUserLogin = authService.isUserLogin(); // } + createInterviewRecord() { + const interviewRecordInfo: InterviewRecordInfo = { + content: this.content, + interviewDate: this.interviewTime, + appointmentId: +this.$route.params.appointmentId + } + appointmentService.createInterviewRecord(interviewRecordInfo).then(res => { + this.isConfirmPopup = true; + }); + + } + + closeConfirmPopup() { + this.isConfirmPopup = false; + this.$router.go(-1); + } + } </script> -- Gitblit v1.8.0