|
@@ -1,56 +1,65 @@
|
|
|
<template>
|
|
|
<div id="corpDetail">
|
|
|
- <el-row style="padding:10px;background:#fff;">
|
|
|
+ <el-row style="padding:10px;background:#fff;min-height: 736px;" v-if="!loading">
|
|
|
<el-col :span="24" class="top">
|
|
|
<el-col :span="4" class="image">
|
|
|
- <el-image style="width:60px;height:60px;" :src="info.logo_url"></el-image>
|
|
|
+ <el-image style="width:60px;height:60px;" :src="getData('identity.logo_url')"></el-image>
|
|
|
</el-col>
|
|
|
<el-col :span="19" class="right">
|
|
|
<el-col :span="24" class="corpname">
|
|
|
- <p class="textOver">{{ info.corpname }}</p>
|
|
|
+ <p class="textOver">{{ getData('base.corpname') }}</p>
|
|
|
</el-col>
|
|
|
<el-col :span="24" class="zhuye">
|
|
|
- <p class="textOver">{{ info.url }}</p>
|
|
|
+ <p class="textOver">{{ getData('info.url') }}</p>
|
|
|
</el-col>
|
|
|
</el-col>
|
|
|
</el-col>
|
|
|
<el-col :span="24" class="main">
|
|
|
- <p>所属行业:{{ info.industry }}</p>
|
|
|
- <p>标签:{{ info.tags }}</p>
|
|
|
- <p>规模:{{ info.scale }}</p>
|
|
|
- <p>地址:{{ info.address }}</p>
|
|
|
- <p>性质:{{ info.nature }}</p>
|
|
|
- <p>注册资金:{{ info.reg_capital }}</p>
|
|
|
+ <p>所属行业:{{ getData('identity.industry') }}</p>
|
|
|
+ <p>
|
|
|
+ 标签:<span v-for="(item, index) in getData('identity.tags')" :key="index">{{ item }}</span>
|
|
|
+ </p>
|
|
|
+ <p>规模:{{ getData('info.scale') }}</p>
|
|
|
+ <p>地址:{{ getData('info.address') }}</p>
|
|
|
+ <p>性质:{{ getData('identity.nature') }}</p>
|
|
|
+ <p>注册资金:{{ getData('identity.reg_capital') }}</p>
|
|
|
</el-col>
|
|
|
<el-col :span="24" class="content">
|
|
|
- <p>{{ info.intro }}</p>
|
|
|
+ <p>{{ getData('info.intro') }}</p>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import { mapActions, mapState } from 'vuex';
|
|
|
+import _ from 'lodash';
|
|
|
export default {
|
|
|
name: 'corpDetail',
|
|
|
props: {},
|
|
|
components: {},
|
|
|
data: () => ({
|
|
|
- info: {
|
|
|
- logo_url: require('@/assets/logo.png'),
|
|
|
- corpname: '测试企业',
|
|
|
- url: 'http://www.baidu.com',
|
|
|
- industry: '所属行业',
|
|
|
- tags: '500强',
|
|
|
- scale: '1万人',
|
|
|
- address: '吉林省长春市力旺广场B座16楼1608',
|
|
|
- nature: '其他企业',
|
|
|
- reg_capital: '1000万以上',
|
|
|
- intro: '这是企业介绍',
|
|
|
- },
|
|
|
+ corpInfo: {},
|
|
|
+ loading: true,
|
|
|
}),
|
|
|
- created() {},
|
|
|
+ async created() {
|
|
|
+ if (this.$route.params.id) {
|
|
|
+ await this.search();
|
|
|
+ }
|
|
|
+ },
|
|
|
computed: {},
|
|
|
- methods: {},
|
|
|
+ methods: {
|
|
|
+ ...mapActions(['corpOperation']),
|
|
|
+ async search() {
|
|
|
+ let { info, base, identity } = await this.corpOperation({ type: 'search', data: { corpid: this.$route.params.id } });
|
|
|
+ this.$set(this, 'corpInfo', { info: info, identity: identity, base: base });
|
|
|
+ this.$set(this, `loading`, false);
|
|
|
+ console.log(this.corpInfo);
|
|
|
+ },
|
|
|
+ getData(target) {
|
|
|
+ return _.get(this.corpInfo, target);
|
|
|
+ },
|
|
|
+ },
|
|
|
};
|
|
|
</script>
|
|
|
|