From 2b4ffaea5c43c32a9335d4aa9becceea220ce68c Mon Sep 17 00:00:00 2001 From: Mila <Mila@pollex.com.tw> Date: 星期三, 03 十一月 2021 09:16:58 +0800 Subject: [PATCH] TODO#129054 我的顧問清單 畫面刻版 --- PAMapp/components/Consultant/ConsultantCard.vue | 134 ++++++++++++++++++++++++++++++++------------ 1 files changed, 96 insertions(+), 38 deletions(-) diff --git a/PAMapp/components/Consultant/ConsultantCard.vue b/PAMapp/components/Consultant/ConsultantCard.vue index 2b7525e..88b44c4 100644 --- a/PAMapp/components/Consultant/ConsultantCard.vue +++ b/PAMapp/components/Consultant/ConsultantCard.vue @@ -5,49 +5,100 @@ <el-col :xs="22" :sm="23"> <el-row type="flex"> <el-col class="flex_column" :xs="5" :sm="3"> - <img class="avator" :src="agentInfo.img" alt=""> - <div class="star">{{agentInfo.satisfaction}}</div> - </el-col> - <el-col class="flex_column" :xs="10" :sm="15"> - <div class="smTxt_bold name">{{agentInfo.name}}</div> - <div class="tagStyle"> - <span - class="tagTxt" - v-for="(tag, index) in agentInfo.tags" :key="index">#{{tag}}</span> + <el-avatar + :size="50" + :src="agentInfo.img" + class="cursor--pointer" + @click.native="$router.push('/agentInfo')" + ></el-avatar> + <div class="satisfaction"> + <i class="icon-star pam-icon icon--yellow satisfaction"></i> + <span>{{agentInfo.satisfaction}}</span> </div> - <div class="delete" @click="removeAgent">蝘駁</div> + </el-col> + <el-col :xs="10" :sm="15"> + <div class="smTxt_bold name">{{agentInfo.name}}</div> + <div class="professionals"> + <span + class="professionalsTxt" + v-for="(professional, index) in agentInfo.professionals" + :key="index" + >#{{professional}}</span> + </div> + <div + class="delete" + v-if="agentInfo.contactStatus === 'picked'" + @click="removeAgent" + >蝘駁</div> </el-col> <el-col class="flex_column" :xs="9" :sm="6"> <el-button class="smTxt_bold outline_btn" @click="reserveCommunication" - :class="{'reservedBtn': agentInfo.reserve}" - >{{ agentInfo.reserve ? '撌脤���' : '�脰����'}}</el-button> - <div class="time">隞予 10:00 ��</div> + :class="agentInfo.contactStatus + 'Btn'" + >{{ contactTxt }}</el-button> + <div class="updateTime">{{updateTime}}</div> </el-col> </el-row> </el-col> </el-row> + + <Ui-Dialog :isVisible.sync="isVisibleDialog"> + <h5 class="subTitle text--center mb-30">������</h5> + <p class="smTxt">隞予 10:00</p> + <div class="dialogInfo"> + <p>憪������</p> + <p>�閰梧��0912345678</p> + <p>Email嚗�</p> + <p>�批 嚗��</p> + <p>撟湧翩嚗�26-30</p> + <p>�璆哨����璆�</p> + <p>��瘙���瑼�/閬���靽����</p> + <p>��蝯⊥�挾銝�嚗���,��� 18:00~21:00</p> + </div> + </Ui-Dialog> </div> </template> <script lang="ts"> -import { Vue, Component, Prop, Emit, Watch } from 'nuxt-property-decorator'; +import { Vue, Component, Prop, Emit } from 'nuxt-property-decorator'; import { Agents } from '~/plugins/api/home'; @Component export default class ConsultantCard extends Vue { @Prop() agentInfo!: Agents; + isVisibleDialog = false; + + get contactTxt() { + if (this.agentInfo.contactStatus === 'contacted') { + return '撌脰蝯�' + } else if (this.agentInfo.contactStatus === 'reserved') { + return '撌脤���' + } else { + return '�脰����' + } + } + + get updateTime() { + const newDate = new Date(this.agentInfo.updateTime); + let year = newDate.getFullYear(); + let month = newDate.getMonth() + 1; + let date = newDate.getDate(); + let hours = newDate.getHours(); + let minutes = newDate.getMinutes(); + return `${year}/${month}/${date} ${hours} : ${minutes}` + } reserveCommunication() { - if (!this.agentInfo.reserve) { + if (this.agentInfo.contactStatus === 'picked') { this.$router.push('/communication/myDemand') + } else { + this.isVisibleDialog = true; } - } @Emit('removeAgent') removeAgent() { - return this.agentInfo.id; + return this.agentInfo.agentNo; } } </script> @@ -68,28 +119,20 @@ margin: auto 0; } - .avator { - width: 50px; - height: 50px; - border-radius: 50px ; - } - - .star { + .satisfaction { font-size: 12px; font-weight: bold; - - &:before { - content: '\2605'; - color: $PRIMARY_RED; - margin: 5px; - } + margin-top: 5px; } - .tagStyle { + .professionals { + height: 20px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; - .tagTxt { + margin: 5px 0 10px 0; + + .professionalsTxt { font-size: 12px; font-weight: bold; margin-right: 5px; @@ -105,16 +148,27 @@ .reservedBtn { color: $SKY_BLUE; - cursor: auto; + border-color: $SKY_BLUE; - &:hover { - color: $SKY_BLUE; - border-color: $SKY_BLUE; - background-color: $PRIMARY_WHITE; + &:focus { + color: $PRIMARY_WHITE; + background-color: $SKY_BLUE; + opacity: 0.5; } } - .time { + .contactedBtn { + color: $GREEN; + border-color: $GREEN; + + &:focus { + color: $PRIMARY_WHITE; + background-color: $GREEN; + opacity: 0.5; + } + } + + .updateTime { font-size: 12px; font-weight: bold; color: #707070; @@ -128,4 +182,8 @@ justify-content: space-between; } + .dialogInfo { + font-size: 20px; + } + </style> -- Gitblit v1.8.0