123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103 |
- <template>
- <div class="f14 f-666 text-center fx-row fx-bet-cen">
- <div v-for="(item, index) in iconList" :key="index" class="fx-1">
- <div v-if="item.tooltips">
- <img width="50px" :src="item.img" :alt="item.desc">
- <el-popover placement="bottom" trigger="hover">
- <div v-html="item.tooltips" />
- <p slot="reference" class="mt10">
- {{ item.value }}
- <i class="el-icon-question" />
- </p>
- </el-popover>
- </div>
- <div v-else>
- <img width="50px" :src="item.img" :alt="item.desc">
- <p class="mt10">{{ item.value }}</p>
- </div>
- </div>
- </div>
- </template>
- <script>
- export default {
- name: 'UniversityIcons',
- props: {
- baseInfo: {
- type: Object,
- default: () => ({})
- }
- },
- computed: {
- iconList() {
- const baseInfo = this.baseInfo || {}
- // fixed elements
- const results = [
- {
- value: baseInfo.natureTypeCN,
- desc: '办学类型',
- img: require('@/assets/images/career/xingzhi.png')
- },
- {
- value: `${baseInfo.location} ${baseInfo.cityName}`,
- desc: '所处地',
- img: require('@/assets/images/career/location.png')
- },
- {
- value: baseInfo.managerType,
- desc: '所属部门',
- img: require('@/assets/images/career/bumen.png')
- },
- {
- value: baseInfo.level,
- desc: '学历层次',
- img: require('@/assets/images/career/xueli.png')
- },
- {
- value: baseInfo.type,
- desc: '院校类型',
- img: require('@/assets/images/career/type.png')
- }
- ]
- //
- if (baseInfo.pointsOfShuo?.length) {
- results.push({
- value: baseInfo.pointsOfShuo.map(p => p.number).join(' / '),
- desc: 'shuoshi',
- img: require('@/assets/images/career/shuoshi.png'),
- tooltips: baseInfo.pointsOfShuo.map(p => `<p>${p.type} <span class="bold">${p.number}个</span></p>`).join('')
- })
- }
- if (baseInfo.pointsOfBo?.length) {
- results.push({
- value: baseInfo.pointsOfBo.map(p => p.number).join(' / '),
- desc: 'boshi',
- img: require('@/assets/images/career/boshi.png'),
- tooltips: baseInfo.pointsOfBo.map(p => `<p>${p.type} <span class="bold">${p.number}个</span></p>`).join('')
- })
- }
- if (baseInfo.rateOfBaoYanView && baseInfo.rateOfBaoYanView != '-') {
- results.push({
- value: '保研率:' + baseInfo.rateOfBaoYanView,
- desc: 'baoyanlv',
- img: require('@/assets/images/career/baoyanlv.png'),
- tooltips: `<div class="bold mb5">保研率说明</div>` + baseInfo.remarkOfBaoYan
- })
- }
- if (results.length < 8) {
- results.splice(0, 0, {
- value: `${baseInfo.createdYear}年`,
- desc: '创办时间',
- img: require('@/assets/images/career/year.png')
- })
- }
- return results.filter(r => r.value)
- }
- }
- }
- </script>
- <style scoped>
- </style>
|