123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250 |
- <!-- 企业详情 -->
- <template>
- <view class="business-details">
- <!-- 背景 -->
- <view class="business-details-bg"></view>
- <!-- 内容 -->
- <view class="business-details-content">
- <view class="business-details-content-logo">
- <image :src="companyInfo.logoUrl" mode=""></image>
- </view>
- <view class="business-details-content-name">{{ companyInfo.companyName }}</view>
- <!-- <view class="business-details-content-evaluate">
- <view class="left">
- <view class="evaluate">优秀</view>
- <view class="describe">综合评分</view>
- <view class="star">
- <u-icon name="star-fill" color="#EF651F"></u-icon>
- <u-icon name="star-fill" color="#EF651F"></u-icon>
- <u-icon name="star-fill" color="#EF651F"></u-icon>
- <u-icon name="star-fill" color="#EF651F"></u-icon>
- <u-icon name="star-fill" color="#EF651F"></u-icon>
- </view>
- <view class="grade">4.8</view>
- </view>
- <view class="right">
- 详情
- <u-icon class="icon" name="arrow-right" color="#666666"></u-icon>
- </view>
- </view> -->
-
- <!-- 公司概况 -->
- <view class="business-details-content-survey">
- <view class="title">公司概况</view>
- <view class="item">
- <view>公司全称:{{ companyInfo.companyName }}</view>
- <view>公司简称:{{ companyInfo.nickName }}</view>
- <view>所属行业:{{ getCompanyTradeName(companyInfo.trade) }}</view>
- <view>公司规模:{{ getCompanyScopeName(companyInfo.scope) }}</view>
- <view>联系方式:{{ companyInfo.linkPhone }}</view>
- <view class="address">
- <view>公司地址:{{ companyInfo.companyAddress }}</view>
- <view>
- <image src="../../static/img/dingwei.png"/>
- 查看位置
- </view>
- </view>
- </view>
- </view>
-
- <!-- 公司介绍 -->
- <view class="business-details-content-introduce">
- <view class="title">公司介绍</view>
- <view class="content">
- <view class="content" v-if="companyInfo.detatil">
- <u-parse :html="companyInfo.detatil"/>
- </view>
- <u-empty v-else text="暂无公司介绍" mode="data"></u-empty>
- </view>
- </view>
-
- <!-- 公司相册 -->
- <view class="business-details-content-album">
- <view class="title">公司相册</view>
- <scroll-view scroll-x="true" class="pic" style="width: 100%; overflow:hidden; white-space: nowrap;" v-if="companyInfo.environmentUrlList && companyInfo.environmentUrlList.length > 0">
- <view class="pic-list">
- <view class="pic-list-item" v-for="(item, index) in companyInfo.environmentUrlList" :key="index">
- <u-image :src="item" mode="" height="206" @tap="picClick(index)"/>
- </view>
- </view>
- </scroll-view>
- <u-empty v-else text="该公司暂未发布公司相册" mode="data"></u-empty>
- </view>
-
- <!-- 公司职位 -->
- <view class="business-details-content-position">
- <view class="title">公司职位</view>
- <view class="position-list" v-if="positionList.length > 0">
- <view
- class="position-list-item"
- v-for="(item, index) in positionList"
- :key="index"
- @click="jumpPage('/pages/jobDetails/jobDetails', { id: item.id })"
- >
- <view class="left">
- <view class="logo">
- <image :src="item.companyLogoUrl" mode=""></image>
- </view>
- <view class="info">
- <view>{{ item.postName }}</view>
- <view>{{ `${item.workPlace} | 经验${item.workYear ? item.workYear + '年' : '不限'} | ${item.educationBg}` }}</view>
- <view>{{ item.workPlace }}</view>
- </view>
- </view>
- <view class="right">
- <view>{{ item.salary }}</view>
- <view>{{ item.createTime ? item.createTime.split(' ')[0] : '-' }}</view>
- </view>
- </view>
- </view>
- <u-empty v-else text="该公司暂未发布职位" mode="data"></u-empty>
- </view>
- </view>
- <u-toast ref="uToast" />
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- // 公司id
- companyId: '',
- // 公司详情
- companyInfo: '',
- companyScopeList: [],
- companyTradeList: [],
- // 公司职位
- positionList: []
- }
- },
- onLoad(page) {
- this.getDict('company_scope');
- this.getDict('company_trade');
- if (page.id) {
- this.companyId = page.id
- }
- },
- onShow() {
- if (this.companyId) {
- this.getDetails(this.companyId)
- this.getCompanyPost(this.companyId, 1, 1000)
- } else {
- this.$refs.uToast.show({
- title: '参数不全!',
- type: 'warning'
- })
- }
- },
- methods: {
- /**
- * 获取详情
- * @param { String } id 获取详情企业id
- */
- getDetails(id) {
- this.$u.api.company.getCompanyDetails({
- id: id
- }).then(res => {
- if (res.code === 200) {
- this.companyInfo = res.data
- } else {
- this.$refs.uToast.show({
- title: res.msg,
- type: 'error'
- })
- }
- }).catch((err) => {
- this.$refs.uToast.show({
- title: '系统异常!',
- type: 'error'
- })
- })
- },
- /**
- * 获取字典
- * company_scope 公司规模
- * company_trade 公司类型
- */
- getDict(key) {
- this.$u.api.getDictdataUrl({
- key: key
- }).then(res => {
- if (res.code === 200) {
- if (key === 'company_scope') {
- this.companyScopeList = res.data
- } else if (key === 'company_trade') {
- this.companyTradeList = res.data;
- }
- }
- })
- },
- /**
- * @param {Object} val
- */
- getCompanyScopeName(val) {
- let name;
- this.companyScopeList.forEach(item => {
- if (Number(item.text) === Number(val)) {
- name = item.label
- }
- })
- return name;
- },
- /**
- * @param {Object} val
- */
- getCompanyTradeName(val) {
- let name;
- this.companyTradeList.forEach(item => {
- if (Number(item.text) === Number(val)) {
- name = item.label
- }
- })
- return name;
- },
- /**
- * @param {Object} url
- */
- getCompanyPost(id, pageNum, pageSize) {
- this.$u.api.company.getCompanyPostList({ id, pageNum, pageSize}).then(res => {
- if (res.code === 200) {
- this.positionList = res.rows
- } else {
- this.$refs.uToast.show({
- title: res.msg,
- type: 'error'
- })
- }
- }).catch((err) => {
- this.$refs.uToast.show({
- title: '系统异常!',
- type: 'error'
- })
- })
- },
- /**
- * 跳转到指定页面
- */
- jumpPage(url, params) {
- this.$u.route({
- url,
- params
- })
- },
- /**
- * 图片预览
- * @param { Number } index
- */
- picClick(index) {
- uni.previewImage({
- current: index,
- urls: this.companyInfo.environmentUrlList
- })
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- @import './businessDetails.scss';
- </style>
|