changes 修改披露评级页面

This commit is contained in:
彭森 2024-02-27 15:53:57 +08:00
parent b91a645a10
commit 693bb2cc57
4 changed files with 82 additions and 66 deletions

View File

@ -7,6 +7,7 @@
},
"dependencies": {
"@element-plus/icons": "^0.0.11",
"axios": "^1.6.7",
"echarts": "^5.4.3",
"element-plus": "^2.3.8",
"vue": "^3.0.4",

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

View File

@ -1,23 +1,6 @@
<template>
<el-header>
<el-row>
<el-link v-for="(item, index) in routerPath" :key="index" @click="goPath(item.path)">{{ item.name }}</el-link>
</el-row>
<el-row align="middle">
<el-link to="/login" v-if="!user.email" @click="visible = true">登录</el-link>
<el-dropdown trigger="click" v-else>
<span class="el-dropdown-link" style="color:#fff">
你好{{ user.company_name }}
</span>
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item :icon="Message">{{ user.email }}</el-dropdown-item>
<el-dropdown-item :icon="SwitchButton" divided @click="logOut">退出</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown>
</el-row>
<login :visible="visible" @close="close" />
</el-header>
</template>
@ -30,9 +13,9 @@ import login from "./login.vue"
const visible = ref(false)
const routerPath = ref([
{ path: "/home", name: "首页" },
{ path: "/rank", name: "企业榜单" },
{ path: "/rating", name: "参与评级" },
{ path: "/my", name: "我的评级" },
// { path: "/rank", name: "" },
// { path: "/rating", name: "" },
// { path: "/my", name: "" },
])
const user = ref({ email: "", company_name: "" })
const router = useRouter()
@ -63,11 +46,15 @@ const close = (value) => {
display: flex;
justify-content: space-between;
align-items: center;
background-color: rgba(0, 0, 0, .05);
background-color: #fff;
background-color: rgb(255,255,255);
background-image: url('src/assets/image/banner01.jpg');
background-size: auto calc(100% - 10px); /* 图片的高度为容器高度减去上下边距 */
background-position: center 5px; /* 图片垂直居中但向下偏移5px */
background-repeat: no-repeat;
position: fixed;
width: 100%;
z-index: 999;
top: 0;
height: 60px; /* 假设你的容器高度为60px */
}
</style>

View File

@ -1,51 +1,72 @@
<template>
<el-container>
<el-row class="container" justify="center">
<h1>中小商企信用评价</h1>
<el-row class="tag-box">
<el-check-tag :checked="!checkValue" @click="checkValue = 0">公司</el-check-tag>
<el-check-tag :checked="checkValue == 1" @click="checkValue = 1">行业</el-check-tag>
<el-check-tag :checked="checkValue == 2" @click="checkValue = 2">全搜索</el-check-tag>
</el-row>
<company v-if="!checkValue" />
<industry v-if="checkValue == 1" />
<el-card shadow="never" v-for="(item, index) in 10">
<el-row align="middle" justify="space-between" style="flex-wrap: nowrap;">
<div class="logo">
</div>
<el-row>
<el-row justify="space-between" style="width:100%">
<el-row align="middle" style="width:auto">
<h5>万科企业股份有限公司</h5><el-tag style="margin-left: 20px;">存续</el-tag>
</el-row>
<p style="font-weight: 800;color: #409EFF;">98/AAA</p>
</el-row>
<el-row>
<span class="describe">法定代表人郁亮</span>
<span class="describe">注册资本1099521.0218万人民币</span>
<span class="describe">成立日期1984-05-30</span>
</el-row>
<el-row>
<span class="describe">电话0755-25609865</span>
<span class="describe">邮箱liufy@vanke.com</span>
</el-row>
<el-row>
<span class="describe">地址深圳市盐田区大梅沙环美路33号万科中心</span>
</el-row>
</el-row>
</el-row>
<el-container>
<el-row class="container" justify="center">
<h1>中小商企信用评价</h1>
<industry v-if="checkValue == 1" />
</el-card>
<el-card shadow="never" v-for="(item, index) in companyData" :key="index">
<el-row align="middle" justify="space-between" style="flex-wrap: nowrap;">
<div class="logo">
{{ item.company_name.substring(0, 1) }}
</div>
<el-row>
<el-row justify="space-between" style="width:100%">
<el-row align="middle" style="width:auto">
<h5>{{ item.company_name }}</h5>
<el-tag style="margin-left: 20px;">{{ item.regStatus }}</el-tag>
</el-row>
<p style="font-weight: 800;color: rgb(194,44,44);">{{ item.rate_scope }}/{{ item.rate_level }}</p>
</el-row>
<el-row>
<span class="describe">法定代表人{{ item.legalPersonName }}</span>
<span class="describe">注册资本{{ item.regCapital }}</span>
</el-row>
<el-row>
<span class="describe">成立日期{{ item.estiblishTime }}</span>
</el-row>
<el-row>
<span class="describe">电话{{ item.phoneNumber }}</span>
<span class="describe">邮箱{{ item.email }}</span>
</el-row>
<el-row>
<span class="describe address">地址{{ item.regLocation }}</span>
</el-row>
</el-row>
</el-row>
</el-container>
</el-card>
</el-row>
</el-container>
</template>
<script setup lang='ts'>
import { ref } from "vue"
import company from "./company.vue"
import { ref, onMounted } from "vue"
import axios from 'axios'
import industry from "./industry.vue"
const checkValue = ref(0)
const companyData = ref([]) // API
const count = ref(0) //
// API
const fetchData = async () => {
try {
const params = {
id: null,
publish_state: "已披露",
page: 1,
page_size: 10
};
const response = await axios.post('http://127.0.0.1:8008/wd-smebiz/smebiz_rate/company_rate/disclose_data', { params })
companyData.value = response.data.result // result
count.value = response.data.count
} catch (error) {
console.error('API请求错误:', error)
}
}
//
onMounted(fetchData)
</script>
<style scoped>
@ -66,7 +87,7 @@ const checkValue = ref(0)
.logo {
width: 60px;
height: 60px;
background-color: #409EFF;
background-color: rgb(194,44,44);
color: #fff;
font-size: 26px;
font-weight: 800;
@ -89,4 +110,11 @@ h5 {
.describe{
margin:5px 30px 5px 0;
}
.describe.address {
flex-basis: 100%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;/* Make the address take the full width */
}
</style>