fix: BUG修改

This commit is contained in:
kun 2024-03-30 11:51:22 +08:00
parent 63d3a896c4
commit f71c40e551
5 changed files with 125 additions and 23 deletions

View File

@ -125,7 +125,11 @@
@click="goto6()"
v-if="
$route.path.indexOf('/firm/projectManage') == -1 &&
$store.state.userInfo.accountType == 5
$store.state.userInfo.systemLogoConfig.isShowProjectFront == 1 &&
$store.state.userInfo.accountType == 5 &&
$store.state.userInfo.accountType == 6
"
:title="projectFront"
>

View File

@ -84,7 +84,7 @@
企业大屏
</p>
<!-- 横琴大屏使用龙光大屏样式 -->
<p v-show="$route.path.indexOf('firm/') != -1" class="header-btn" @click="toOverview4()">
<p v-show="$route.path.indexOf('firm/') != -1 && $store.state.userInfo.companyBigScreen == 0" class="header-btn" @click="toOverview4()">
<img src="@/assets/images/icon-bigData.png" alt srcset />
综合监管大屏
</p>

View File

@ -9,10 +9,11 @@
>
<div class="changeBox">
<div class="title-content">
<span>切换用户</span>
<i class="el-icon-close" style="cursor: pointer;" @click="visible = false;"></i>
<span>{{isUserList?'切换用户':'用户组织'}}</span>
<i class="el-icon-arrow-left" style="cursor: pointer;" @click="isUserList = true;"></i>
<i class="el-icon-arrow-right" style="cursor: pointer;" @click="isUserList = false;"></i>
</div>
<div class="content-list">
<div class="content-list" v-if="isUserList">
<div class="content-list-item">
<i class="el-icon-trophy-1"></i>
<span>中国建筑第八工程局第三建设有限公司</span>
@ -50,6 +51,29 @@
<i class="el-icon-arrow-right"></i>
</div>
</div>
<div class="tree-group" v-else>
<div class="select-list">
<el-input
placeholder="输入关键字进行查找"
v-model="filterText"
style="width: 98%;"
suffix-icon="el-icon-search"
size="medium"
>
</el-input>
<el-tree
:data="level1CompanyData"
:props="selectTreeProps"
node-key="id"
ref="tree"
:filter-node-method="filterNode"
:highlight-current="true"
:check-on-click-node="true"
@node-click="treeClick"
style="margin:10px 5px;"
></el-tree>
</div>
</div>
</div>
<!-- 点击内容 -->
<div slot="reference" class="click-content">
@ -61,18 +85,55 @@
</div>
</template>
<script>
import { getComapnyStatisticsListApi } from "@/assets/js/api/company/project";
export default {
data() {
return {
visible: false
visible: false,
isUserList: true,
filterText: "",
level1CompanyData: [],
selectTreeProps: {
children: "children",
label: "label",
},
}
},
created() {
this.loadData();
},
mounted() {
},
methods: {
}
//
treeClick(data) {
console.log(data);
},
filterNode(value, data) {
if (!value) return true;
return data.name.indexOf(value) !== -1;
},
loadData() {
let sn = this.$store.state.userInfo.sn;
let projectType = 1; //
if (this.$store.state.userInfo.addProjectType == 1) {
projectType = 0; //
}
getComapnyStatisticsListApi({
sn: sn,
projectType: projectType,
}).then((res) => {
this.level1CompanyData = res.result.companyList
? res.result.companyList
: res.result.projectList;
});
},
},
watch: {
filterText(val) {
this.$refs.tree.filter(val);
},
},
}
</script>
<style lang="less" scoped>
@ -119,6 +180,17 @@ export default {
margin-bottom: 10px;
}
}
.tree-group{
margin-top: 15px;
background-color: #fff;
.select-list {
&-item {
display: flex;
align-items: center;
justify-content: space-between;
}
}
}
}
.click-content{
cursor: pointer;

View File

@ -118,6 +118,29 @@
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="12">
<el-col :span="6">
<el-form-item label="项目前台" prop="projectFront">
<el-input
style="width: 150px"
v-model="form.projectFront"
></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="是否显示项目前台" prop="isShowProjectFront">
<el-switch
v-model="form.isShowProjectFront"
active-color="#13ce66"
inactive-color="#ff4949"
:active-value="1"
:inactive-value="0"
>
</el-switch>
{{ form.isShowProjectFront == 1 ? '是' : '否' }}
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="12">
<el-col :span="6">
<el-form-item label="是否开启劳务人员资质证书到期预警" prop="isOpenCertificateExpireWarn">
@ -276,6 +299,8 @@ export default {
projectBackground: '', //
equipmentChina: '', //
dataCenter: '', //
projectFront: '', //
isShowProjectFront: 0, //
isOpenCertificateExpireWarn: 0, //
certificateExpireWarnAheadDay: 0, //
},

View File

@ -12,16 +12,24 @@
>
<!-- <div class="module_title">{{$t('message.homeLayout.existingProducts')}}</div> -->
<div class="projectIndex" id="projectIndex">
<template
v-for="(item, index) in list">
<div
style="width: 100%;height: 1px;"
v-if="
index == 0 ||
(index > 0 && list[index - 1].labelName != item.labelName)
"
></div>
<div
class="moduleBox"
v-for="(item, index) in list"
:key="index"
v-if="item.operation"
>
<div
class="module_title"
v-if="
index == 0 || list[index - 1].labelName != item.labelName
index == 0 ||
(index > 0 && list[index - 1].labelName != item.labelName)
"
>
{{ item.labelName }}
@ -58,6 +66,7 @@
</div>
</div>
</div>
</template>
</div>
<div v-if="showNotBuyMoudle">
<div class="module_title">
@ -159,7 +168,7 @@ export default {
},
methods: {
scrollGet(e) {
console.log("滚动触发的事件", e.srcElement.scrollTop, e.target.scrollTop);
// console.log("", e.srcElement.scrollTop, e.target.scrollTop);
this.selfScrollTop = this.$refs.artList.scrollTop;
},
@ -328,7 +337,10 @@ export default {
},
//
getAllModule(half) {
getAllModuleApi({ moduleType: 2, styleType: this.$store.state.userInfo.styleType }).then((res) => {
getAllModuleApi({
moduleType: 2,
styleType: this.$store.state.userInfo.styleType,
}).then((res) => {
if (res.success) {
var all = res.result;
console.log("all", all);
@ -342,17 +354,6 @@ export default {
});
});
this.list = all;
this.$nextTick(() => {
var projectIndex = document.getElementById("projectIndex");
var array = document.getElementsByClassName("module_title");
console.log(array);
for (let index = 0; index < array.length; index++) {
var newElement = document.createElement("div");
newElement.style = "width: 100%; height: 1px";
projectIndex.insertBefore(newElement, array[index].parentNode);
}
});
}
});
},