From d173fcc2f2dfe6220034a775b15b581968de4b3c Mon Sep 17 00:00:00 2001 From: Tomas <tomasysh@gmail.com> Date: 星期六, 06 十一月 2021 11:55:53 +0800 Subject: [PATCH] update: footer - 調整 Nav-item pipe 顯示方式 --- PAMapp/components/Consultant/ConsultantCard.vue | 160 ++++++++++++++++++++++++++++++++++++----------------- 1 files changed, 108 insertions(+), 52 deletions(-) diff --git a/PAMapp/components/Consultant/ConsultantCard.vue b/PAMapp/components/Consultant/ConsultantCard.vue index 95c08f9..4202531 100644 --- a/PAMapp/components/Consultant/ConsultantCard.vue +++ b/PAMapp/components/Consultant/ConsultantCard.vue @@ -5,50 +5,106 @@ <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 btn" + 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" + :width="width" + > + <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'; +import { isMobileDevice } from '~/assets/ts/device'; @Component export default class ConsultantCard extends Vue { @Prop() agentInfo!: Agents; + isVisibleDialog = false; + width: string = ''; + + 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.width = isMobileDevice() ? '80%' : ''; + this.isVisibleDialog = true; } - } @Emit('removeAgent') removeAgent() { - console.log('removeAgent') - return this.agentInfo.id; + return this.agentInfo.agentNo; } } </script> @@ -56,7 +112,7 @@ <style lang="scss" scoped> .rowStyle { padding: 10px; - background-color: #FFFFFF; + background-color: $PRIMARY_WHITE; margin-bottom: 10px; display: flex; justify-content: space-between; @@ -65,32 +121,24 @@ width: 10px; height: 10px; border-radius: 50px; - background-color: #F2C75C; + background-color: $YELLOW; margin: auto 0; } - .avator { - width: 50px; - height: 50px; - border-radius: 50px ; - } - - .star { + .satisfaction { font-size: 12px; font-weight: bold; - - &:before { - content: '\2605'; - color: #ED1B2E; - 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; @@ -98,31 +146,35 @@ } .delete { - color: #ED1B2E; + color: $PRIMARY_RED; font-size: 14px; font-weight: bold; cursor: pointer; } - .btn { - color: #ED1B2E; - border: solid 2px; - border-radius: 30px; - padding: 10px 16px; - } - .reservedBtn { - color: #009CBD; - cursor: auto; + color: $SKY_BLUE; + border-color: $SKY_BLUE; - &:hover { - color: #009CBD; - border-color: #009CBD; - background-color: #ffffff; + &: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; @@ -136,4 +188,8 @@ justify-content: space-between; } -</style> \ No newline at end of file + .dialogInfo { + font-size: 20px; + } + +</style> -- Gitblit v1.8.0