Commit fe873681 authored by jiaxu.yan's avatar jiaxu.yan

feat:首页更新按照权限分配菜单。右侧表格更新

parent 9d3dbae2
...@@ -10,7 +10,6 @@ VUE_APP_BASE_API = '/dev-api' ...@@ -10,7 +10,6 @@ VUE_APP_BASE_API = '/dev-api'
# 路由懒加载 # 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true VUE_CLI_BABEL_TRANSPILE_MODULES = true
# 图片服务器地址 # 图片服务器地址
VUE_APP_IMAGE_API ='http://106.3.99.64:22013' VUE_APP_IMAGE_API ='https://10.12.48.78'
VUE_APP_CLIENT_API = 'https://10.12.48.78/vvmpapi' VUE_APP_CLIENT_API = 'https://10.12.48.78/vvmpapi'
...@@ -6,8 +6,8 @@ ENV = 'production' ...@@ -6,8 +6,8 @@ ENV = 'production'
# 中汽研安全检测平台管理系统/生产环境 # 中汽研安全检测平台管理系统/生产环境
VUE_APP_BASE_API = 'http://106.3.99.64:22018' # VUE_APP_BASE_API = 'http://106.3.99.64:22018'
VUE_APP_BASE_API = 'http://10.12.48.78:22033'
# 图片服务器地址 # 图片服务器地址
VUE_APP_IMAGE_API ='https://10.12.48.78' VUE_APP_IMAGE_API ='https://10.12.48.78'
......
...@@ -203,8 +203,44 @@ ...@@ -203,8 +203,44 @@
flex-wrap: wrap; flex-wrap: wrap;
margin-right: 3%; margin-right: 3%;
align-items: center; align-items: center;
justify-content: center;
.bottom-item {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
}
}
}
}
.bottom-card {
width: 8rem;
padding: 0 10px;
cursor: pointer;
&:hover {
animation: jump 2s linear infinite;
@keyframes jump {
0%,
100% {
transform: translateY(20px);
}
50% {
transform: translateY(-20px);
}
} }
} }
&-img {
width: 40px;
height: 40px;
}
&-title {
font-size: 14px;
font-family: Microsoft YaHei;
font-weight: 400;
text-align: center;
color: #ffffff;
line-height: 16px;
}
} }
.card-box { .card-box {
height: 34%; height: 34%;
...@@ -224,24 +260,24 @@ ...@@ -224,24 +260,24 @@
} }
&-title { &-title {
position: absolute; position: absolute;
font-size: 18px; font-size: 20px;
font-family: Microsoft YaHei, Microsoft YaHei-700; font-family: Microsoft YaHei, Microsoft YaHei-700;
font-weight: 700; font-weight: 700;
color: #ffffff; color: #ffffff;
line-height: 20px; line-height: 20px;
letter-spacing: 0.24px; letter-spacing: 0.24px;
left: 50px; left: 65px;
top: 0; top: 0;
} }
&-title2 { &-title2 {
position: absolute; position: absolute;
font-size: 18px; font-size: 20px;
font-family: Microsoft YaHei, Microsoft YaHei-700; font-family: Microsoft YaHei, Microsoft YaHei-700;
font-weight: 700; font-weight: 700;
color: #ffffff; color: #ffffff;
line-height: 20px; line-height: 20px;
letter-spacing: 0.24px; letter-spacing: 0.24px;
right: 50px; right: 65px;
top: 0; top: 0;
} }
&-body { &-body {
...@@ -276,6 +312,7 @@ ...@@ -276,6 +312,7 @@
align-items: center; align-items: center;
justify-content: flex-start; justify-content: flex-start;
height: 8rem; height: 8rem;
&-img { &-img {
width: 100px; width: 100px;
height: 100px; height: 100px;
...@@ -301,28 +338,3 @@ ...@@ -301,28 +338,3 @@
} }
} }
} }
.bottom-card {
width: 14%;
margin: 0 1%;
padding: 0 10px;
cursor: pointer;
&:hover {
animation: jump 2s linear infinite;
@keyframes jump {
0%, 100% { transform: translateY(20px); }
50% { transform: translateY(-20px); }
}
}
&-img {
width: 40px;
height: 40px;
}
&-title {
font-size: 14px;
font-family: Microsoft YaHei;
font-weight: 400;
text-align: center;
color: #ffffff;
line-height: 16px;
}
}
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
<td>发布第一版,v20240901</td> <td>发布第一版,v20240901</td>
</tr> </tr>
</table> </table>
<div class="desc">检验标准:汽车整车信息安全技术要求</div> <!-- <div class="desc">检验标准:汽车整车信息安全技术要求</div> -->
</div> </div>
</template> </template>
<script> <script>
......
<template>
<div>
<table class="chart-table">
<tr>
<th>名称</th>
<th>更新时间</th>
<th>检验类型</th>
<th>内容详情</th>
</tr>
<tr>
<td>01</td>
<td>2024.09.01</td>
<td><el-tag type="warning" effect="plain">体系审查</el-tag></td>
<td>发布第一版,V20240901</td>
</tr>
<tr>
<td>02</td>
<td>2024.09.01</td>
<td><el-tag type="success" effect="plain">车型检验</el-tag></td>
<td>发布第一版,V20240901</td>
</tr>
<tr>
<td>03</td>
<td>2024.09.01</td>
<td><el-tag type="warning" effect="plain">体系审查</el-tag></td>
<td>发布第一版,v20240901</td>
</tr>
</table>
<!-- <div class="desc">检验标准:汽车整车信息安全技术要求</div> -->
</div>
</template>
<script>
export default {
name: 'card',
props: {
title: String
}
}
</script>
<style lang="scss" scoped>
.chart-table {
width: 100%;
border-collapse: collapse;
}
th {
background: #2c89f2;
color: #fff;
}
td {
font-size: 14px;
font-family: Microsoft YaHei, Microsoft YaHei-400;
font-weight: 400;
text-align: LEFT;
color: #b4dbfc;
background: rgba(44, 137, 242, 0.15);
}
th,
td {
padding: 10px;
text-align: center;
border-top: rgba(255, 255, 255, 0.3);
border-bottom: rgba(255, 255, 255, 0.3);
}
::v-deep {
.el-tag--plain {
background: transparent;
width: 100px;
height: 30px;
line-height: 30px;
font-size: 14px;
}
}
.desc {
font-size: 12px;
font-family: Microsoft YaHei, Microsoft YaHei-400;
font-weight: 400;
text-align: center;
color: #ffffff;
line-height: 24px;
margin-top: 10px;
}
</style>
...@@ -54,13 +54,13 @@ ...@@ -54,13 +54,13 @@
</div> </div>
</div> </div>
<div class="home-page-other"> <div class="home-page-other">
<cardRight title="变更检验内容-重点"> <cardRight title="信息安全变更的检验内容">
<table-chart></table-chart> <table-chart></table-chart>
</cardRight> </cardRight>
<cardRight title="检验内容变更方式占比"> <cardRight title="软件升级变更的检验内容">
<pieChart></pieChart> <table-chart-2></table-chart-2>
</cardRight> </cardRight>
<cardRight title="知识库"> <cardRight title="汽车安全场景知识库">
<div style="height: 24vh"> <div style="height: 24vh">
<planChart2></planChart2> <planChart2></planChart2>
</div> </div>
...@@ -72,13 +72,15 @@ ...@@ -72,13 +72,15 @@
<div <div
v-for="(item, key) in bottom" v-for="(item, key) in bottom"
:key="key" :key="key"
class="bottom-card" class="bottom-item"
@click="$router.push(item.link)" @click="$router.push(item.link)"
> >
<div class="bottom-card">
<el-image :src="item.img" class="bottomd-card-img" /> <el-image :src="item.img" class="bottomd-card-img" />
<div class="bottom-card-title"> <div class="bottom-card-title">
{{ item.title }} {{ item.title }}
</div> </div>
</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -91,6 +93,8 @@ import planChart from '../components/homeComponents/planChart.vue' ...@@ -91,6 +93,8 @@ import planChart from '../components/homeComponents/planChart.vue'
import planChart2 from '../components/homeComponents/planChart2.vue' import planChart2 from '../components/homeComponents/planChart2.vue'
import pieChart from '../components/homeComponents/pieChart.vue' import pieChart from '../components/homeComponents/pieChart.vue'
import table from '../components/homeComponents/table.vue' import table from '../components/homeComponents/table.vue'
import table2 from '../components/homeComponents/table2.vue'
import { mapGetters } from 'vuex'
export default { export default {
name: 'HomePage', name: 'HomePage',
components: { components: {
...@@ -99,7 +103,8 @@ export default { ...@@ -99,7 +103,8 @@ export default {
cardRight, cardRight,
pieChart, pieChart,
planChart2, planChart2,
'table-chart': table 'table-chart': table,
'table-chart-2': table2
}, },
data() { data() {
return { return {
...@@ -153,30 +158,10 @@ export default { ...@@ -153,30 +158,10 @@ export default {
link: '/setting/standard', link: '/setting/standard',
img: require('@/assets/images/home/bottom1.png') img: require('@/assets/images/home/bottom1.png')
}, },
{
title: '检测要点',
link: '/setting/standardPoint',
img: require('@/assets/images/home/bottom2.png')
},
{ {
title: '实施细则', title: '实施细则',
link: '/setting/standardTerms', link: '/setting/standardTerms',
img: require('@/assets/images/home/bottom3.png') img: require('@/assets/images/home/bottom3.png')
},
{
title: '测试用例',
link: '/setting/standardTerms',
img: require('@/assets/images/home/bottom4.png')
},
{
title: '检测方案',
link: '/plan/customized',
img: require('@/assets/images/home/bottom5.png')
},
{
title: '内容评审',
link: '/review/review/createReview',
img: require('@/assets/images/home/bottom6.png')
} }
], ],
center: [ center: [
...@@ -208,8 +193,67 @@ export default { ...@@ -208,8 +193,67 @@ export default {
] ]
} }
}, },
cumputed: {
...mapGetters(['roles'])
},
created() {}, created() {},
mounted() {}, mounted() {
let role = this.$store.state.user.roles[0]
this.bottom.push()
switch (role) {
case 'testing-institution':
this.bottom = this.bottom.concat(
{
title: '检测方案',
link: '/plan/customized',
img: require('@/assets/images/home/bottom5.png')
},
{
title: '内容评审',
link: '/review/review/createReview',
img: require('@/assets/images/home/bottom6.png')
}
)
break
case 'government-department':
this.bottom = this.bottom.concat({
title: '车企档案',
link: '/basic/archives?view=2',
img: require('@/assets/images/home/bottom5.png')
})
break
case 'standard_change_review':
this.bottom = this.bottom.concat(
{
title: '我的待审',
link: '/review/wait',
img: require('@/assets/images/home/bottom5.png')
},
{
title: '我的已审',
link: '/review/already',
img: require('@/assets/images/home/bottom6.png')
}
)
break
case 'admin':
this.bottom = this.bottom.concat(
{
title: '车企档案',
link: '/basic/archives?view=2',
img: require('@/assets/images/home/bottom5.png')
},
{
title: '权限管理',
link: '/system/role',
img: require('@/assets/images/home/bottom6.png')
}
)
break
default:
break
}
},
methods: {} methods: {}
} }
</script> </script>
...@@ -248,10 +248,10 @@ export default { ...@@ -248,10 +248,10 @@ export default {
let queryParams = { let queryParams = {
inspectionTtem:this.inspectionItem, inspectionTtem:this.inspectionItem,
inspectionStandardId: this.task.inspectionStandardId, inspectionStandardId: this.task.inspectionStandardId,
inspectionstandardName: this.task.inspectionStandardName, inspectionStandardName: this.task.inspectionStandardName,
inspectCarCompanyName: this.task.inspectCarCompanyName, inspectCarCompanyName: this.task.inspectCarCompanyName,
carModel: this.task.carModel, carModel: this.task.carModel,
testorganizationName: this.task.testOrganizationName, testOrganizationName: this.task.testOrganizationName,
createTime: this.task.createTime, createTime: this.task.createTime,
carExperimentRequest: { carExperimentRequest: {
regulationName: this.task.inspectionStandardName, regulationName: this.task.inspectionStandardName,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment