修复bug

This commit is contained in:
jiayu 2024-10-26 09:14:35 +08:00
parent f11176a000
commit 6190d8d64e
4 changed files with 59 additions and 39 deletions

View File

@ -91,15 +91,10 @@
<div class="wrapper" ref="wrapper"> <div class="wrapper" ref="wrapper">
<div class="cont" ref="cont"> <div class="cont" ref="cont">
<div <div
v-for="(item, index) in $store.state.menuList" v-for="(item, index) in filterMenuList"
:key="index" :key="index"
@click="clickItem(item)" @click="clickItem(item)"
class="menuInnerBox" class="menuInnerBox"
v-if="
company != 'xingxuan' &&
item.target != '_blank' &&
(item.menuName != 'LED大屏显示器' || company != 'nanchang')
"
> >
<el-menu-item <el-menu-item
class="firstLevelMenu" class="firstLevelMenu"
@ -199,6 +194,16 @@ export default {
console.log(this.$store.state.menuList,'7778888') console.log(this.$store.state.menuList,'7778888')
console.log(this.moduleData,'7778888') console.log(this.moduleData,'7778888')
}, },
computed: {
filterMenuList() {
return this.$store.state.menuList.filter(item => {
return this.company != 'xingxuan' &&
item.target != '_blank' &&
!item.menuEquipment &&
(item.menuName != 'LED大屏显示器' || this.company != 'nanchang');
});
}
},
mounted() { mounted() {
console.log("mounted", this.$route); console.log("mounted", this.$route);
this.$nextTick(() => { this.$nextTick(() => {

View File

@ -6,33 +6,39 @@
<div class="pageDataContainer"> <div class="pageDataContainer">
<vue-scroll> <vue-scroll>
<div class="projectIndexBox"> <div class="projectIndexBox">
<div class="module_title">{{$t('message.homeLayout.existingProducts')}}</div> <!-- <div class="module_title">{{$t('message.homeLayout.existingProducts')}}</div> -->
<div class="projectIndex"> <div class="projectIndex">
<div <template v-for="(item, index) in filterList">
class="module canclick" <div style="width: 100%;height: 1px;" v-if="index == 0 || item.operationFlag || (index > 0 && filterList[index - 1].labelName != item.labelName)"></div>
:class="{hovers:item.operation}" <div class="moduleBox" v-if="item.operation">
v-for="(item,index) in list" <div class="module_title" v-if="index == 0 || item.operationFlag || (index > 0 && filterList[index - 1].labelName != item.labelName)">
:key="index" {{ item.labelName }}
@click="itemClick(item)" </div>
v-if="item.operation&&item.moduleType==2&&item.moduleEquipment==1" <div
> class="module canclick"
<img v-if="iconType == 1" :src="require('../../assets/images/menu/'+item.moduleIcon+'.png')" class="icon" /> :class="{hovers:item.operation}"
<img :key="index"
v-if="iconType == 2 && item.bigModuleIcon" @click="itemClick(item)"
:src=" >
require('../../assets/images/menu/' + <img v-if="iconType == 1" :src="require('../../assets/images/menu/'+item.moduleIcon+'.png')" class="icon" />
item.bigModuleIcon + <img
'.png') v-if="iconType == 2 && item.bigModuleIcon"
" :src="
style="margin-bottom: 10px" require('../../assets/images/menu/' +
class="icon" item.bigModuleIcon +
/> '.png')
<div class="title_wrap"> "
<div class="head1">{{item.moduleName}}</div> style="margin-bottom: 10px"
<div class="subhead">{{item.moduleDesc}}</div> class="icon"
<!-- {{$t('message.projectIndex.moudleName1')}} --> />
<div class="title_wrap">
<div class="head1">{{item.moduleName}}</div>
<div class="subhead">{{item.moduleDesc}}</div>
<!-- {{$t('message.projectIndex.moudleName1')}} -->
</div>
</div>
</div> </div>
</div> </template>
</div> </div>
<div class="module_title" v-if="showNotBuyMoudle">{{$t('message.homeLayout.ununlockedProducts')}}</div> <div class="module_title" v-if="showNotBuyMoudle">{{$t('message.homeLayout.ununlockedProducts')}}</div>
<div class="projectIndex"> <div class="projectIndex">
@ -314,6 +320,13 @@ export default {
iconType: '1' iconType: '1'
}; };
}, },
computed: {
filterList: function () {
return this.list.filter((item) => {
return item.operation && item.moduleType==2 && item.moduleEquipment==1
});
},
},
mounted(){ mounted(){
if(localStorage.getItem('systemInfo')){ if(localStorage.getItem('systemInfo')){
this.iconType = JSON.parse(localStorage.getItem('systemInfo')).iconType ? JSON.parse(localStorage.getItem('systemInfo')).iconType:'1' this.iconType = JSON.parse(localStorage.getItem('systemInfo')).iconType ? JSON.parse(localStorage.getItem('systemInfo')).iconType:'1'
@ -460,10 +473,8 @@ var arr = this.$store.state.userInfo.menuAuthority.moduleList
width: 100%; width: 100%;
display: flex; display: flex;
align-items: center; align-items: flex-end;
// justify-content: space-around;
box-sizing: border-box; box-sizing: border-box;
// padding: 0 100px;
flex-wrap: wrap; flex-wrap: wrap;
margin-bottom: 8px; margin-bottom: 8px;
.module:nth-child(4n) { .module:nth-child(4n) {
@ -471,14 +482,16 @@ var arr = this.$store.state.userInfo.menuAuthority.moduleList
} }
} }
.module_title { .module_title {
margin-left: -10px; // margin-left: -10px;
margin-left: 0;
border-left: 2px solid #4a8bff; border-left: 2px solid #4a8bff;
padding-left: 8px; padding-left: 8px;
margin-bottom: 20px; margin-bottom: 20px;
font-size: 14px; font-size: 14px;
font-family: PingFang SC;
} }
.module { .module {
width: 320px; width: 310px;
// height: 124px; // height: 124px;
box-sizing: border-box; box-sizing: border-box;
// border-radius: 3px; // border-radius: 3px;

View File

@ -218,7 +218,7 @@ export default {
if (row.type == 11) { if (row.type == 11) {
// //
path = "/project/quality/inspectionLedger"; path = "/project/quality/inspectionLedger";
const res = await getQualityNoticeStatusApi({ id: payLoadParams.data.id }); const res = await getQualityNoticeStatusApi({ id: payLoadParams?.data?.id });
if (!res.result || res.result.status == 6) { if (!res.result || res.result.status == 6) {
this.$message({ this.$message({
type: "error", type: "error",
@ -229,7 +229,7 @@ export default {
} else if (row.type == 10) { } else if (row.type == 10) {
// //
path = "/project/safeSame/inspectionLedger"; path = "/project/safeSame/inspectionLedger";
const res = await getNoticeStatusApi({ id: payLoadParams.data.id }); const res = await getNoticeStatusApi({ id: payLoadParams?.data?.id });
if (!res.result || res.result.status == 6) { if (!res.result || res.result.status == 6) {
this.$message({ this.$message({
type: "error", type: "error",

View File

@ -465,11 +465,13 @@ export default {
} }
.module_title { .module_title {
margin-left: -10px; // margin-left: -10px;
margin-left: 0px;
border-left: 2px solid #4a8bff; border-left: 2px solid #4a8bff;
padding-left: 8px; padding-left: 8px;
margin-bottom: 20px; margin-bottom: 20px;
font-size: 14px; font-size: 14px;
font-family: PingFang SC;
// width: 1360px; // width: 1360px;
} }