| | |
| | | <el-col :xs="22" :sm="23"> |
| | | <el-row type="flex"> |
| | | <el-col class="flex_column" :xs="5" :sm="3"> |
| | | <el-avatar |
| | | <UiAvatar |
| | | :size="50" |
| | | :src="agentInfo.img" |
| | | class="cursor--pointer" |
| | | @click.native="$router.push(`/agentInfo`)" |
| | | ></el-avatar> |
| | | :fileName="agentInfo.img" |
| | | @click.native="showAgentDetail(agentInfo.agentNo)" |
| | | ></UiAvatar> |
| | | <div class="satisfaction"> |
| | | <i class="icon-star pam-icon icon--yellow satisfaction"></i> |
| | | <span>{{agentInfo.avgScore }}</span> |
| | |
| | | @click="reserveCommunication" |
| | | :class="agentInfo.contactStatus + 'Btn'" |
| | | >{{ contactTxt }}</el-button> |
| | | <div class="updateTime">{{updateTime}}</div> |
| | | <div class="updateTime" v-if="updateTime">{{updateTime | formatDate}}</div> |
| | | </el-col> |
| | | </el-row> |
| | | </el-col> |
| | |
| | | } |
| | | |
| | | 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 isLogin() ? `${year}/${month}/${date} ${hours} : ${minutes}` : '' |
| | | return isLogin() ? this.agentInfo.updateTime : ''; |
| | | } |
| | | |
| | | reserveCommunication() { |
| | | const contactStatus = this.agentInfo.contactStatus; |
| | | if (contactStatus !== 'reserved' && contactStatus !== 'contacted') { |
| | | isLogin() ? this.$router.push('/questionnaire') : this.$router.push('/login'); |
| | | isLogin() ? this.$router.push(`/questionnaire/${this.agentInfo.agentNo}`) : this.$router.push('/login'); |
| | | } else { |
| | | this.width = isMobileDevice() ? '80%' : ''; |
| | | this.isVisibleDialog = true; |
| | |
| | | @Emit('removeAgent') removeAgent() { |
| | | return this.agentInfo.agentNo; |
| | | } |
| | | |
| | | showAgentDetail(agentNo: string): void { |
| | | this.$router.push(`/agentInfo/${agentNo}`); |
| | | } |
| | | } |
| | | </script> |
| | | |