fix: BUG修改

This commit is contained in:
kun 2024-06-05 15:16:25 +08:00
parent fecca362c4
commit 13c0c5b1d5
12 changed files with 262 additions and 72 deletions

View File

@ -82,9 +82,9 @@ if (process.env.NODE_ENV == "development") {
// axios.defaults.baseURL ='http://huli.zjzhiliao.com/jxjgdapi/' //金林湾测试线上 // axios.defaults.baseURL ='http://huli.zjzhiliao.com/jxjgdapi/' //金林湾测试线上
// axios.defaults.baseURL ='http://101.43.164.214:45001/' //上海张江 // axios.defaults.baseURL ='http://101.43.164.214:45001/' //上海张江
// axios.defaults.baseURL ='http://101.43.164.214:45011/' //上海优益(上海建工) // axios.defaults.baseURL ='http://101.43.164.214:45011/' //上海优益(上海建工)
// axios.defaults.baseURL = 'http://192.168.34.221:28888/' //郭圣雄本地 axios.defaults.baseURL = 'http://192.168.34.221:28888/' //郭圣雄本地
// axios.defaults.baseURL = 'http://192.168.34.221:28889/' //郭圣雄本地 // axios.defaults.baseURL = 'http://192.168.34.221:28889/' //郭圣雄本地
axios.defaults.baseURL = "http://192.168.34.221:9111/"; //郭圣雄本地 // axios.defaults.baseURL = "http://192.168.34.221:9111/"; //郭圣雄本地
// axios.defaults.baseURL = 'http://192.168.34.155:19111/' //彭洁本地 // axios.defaults.baseURL = 'http://192.168.34.155:19111/' //彭洁本地
// axios.defaults.baseURL = 'http://182.90.224.237:51234' //郭圣雄远程 // axios.defaults.baseURL = 'http://182.90.224.237:51234' //郭圣雄远程
// axios.defaults.baseURL = 'http://jxj.zhgdyun.com:61212/' //彭洁远程 // axios.defaults.baseURL = 'http://jxj.zhgdyun.com:61212/' //彭洁远程

View File

@ -13,6 +13,16 @@
<span>个人中心</span> <span>个人中心</span>
<div class="row-line"></div> <div class="row-line"></div>
<div class="classify-item"> <div class="classify-item">
<div
@click="jumpRouter(item.modulePath)"
:class="isActive(item.modulePath) ? 'active-item' : ''"
v-for="(item,index) in moduleList"
:key="index"
>
{{item.moduleName}}
</div>
</div>
<!-- <div class="classify-item">
<div <div
@click="jumpRouter('/workSpace')" @click="jumpRouter('/workSpace')"
:class="isActive('/workSpace') ? 'active-item' : ''" :class="isActive('/workSpace') ? 'active-item' : ''"
@ -31,7 +41,7 @@
> >
消息中心 消息中心
</div> </div>
</div> </div> -->
</div> </div>
</div> </div>
<!-- 点击内容 --> <!-- 点击内容 -->
@ -45,15 +55,35 @@
</div> </div>
</template> </template>
<script> <script>
import {
getNewUserAllModulePageApi,
} from "@/assets/js/api/jxjadmin.js";
export default { export default {
data() { data() {
return { return {
visible: false, visible: false,
moduleList: []
}; };
}, },
created() {}, created() {
this.getModuleList();},
mounted() {}, mounted() {},
methods: { methods: {
// ()
getModuleList() {
getNewUserAllModulePageApi({
projectSn: this.$store.state.projectSn,
moduleType: 7,
userId: this.$store.state.userInfo.userId,
}).then((res) => {
if(res.result && res.result.moduleList){
this.moduleList = res.result.moduleList;
console.log(this.moduleList,123321)
} else {
this.moduleList = [];
}
});
},
isActive(val) { isActive(val) {
return this.$route.path.indexOf(val) != -1 ? true : false; return this.$route.path.indexOf(val) != -1 ? true : false;
}, },

View File

@ -55,7 +55,7 @@
<div class="title_near flex" v-if="![1,2].includes($store.state.userInfo.accountType)"> <div class="title_near flex" v-if="![1,2].includes($store.state.userInfo.accountType)">
<userChange></userChange> <userChange></userChange>
</div> </div>
<div class="title_near-tow flex" v-if="![11,1,2].includes($store.state.userInfo.accountType)"> <div class="title_near-tow flex" v-if="![11,1,2].includes($store.state.userInfo.accountType) && workSpaceShow">
<div class="divider-line"></div> <div class="divider-line"></div>
<centerChange></centerChange> <centerChange></centerChange>
</div> </div>
@ -226,7 +226,8 @@ export default {
timer: null, timer: null,
jumpToken: "", jumpToken: "",
showQrCode: false, showQrCode: false,
educationId: "" educationId: "",
workSpaceShow: false
}; };
}, },
components: { components: {
@ -267,6 +268,9 @@ export default {
} }
this.loginData = JSON.parse(localStorage.getItem("systemInfo")); this.loginData = JSON.parse(localStorage.getItem("systemInfo"));
// console.log('',this.loginData)\ // console.log('',this.loginData)\
if(this.$store.state.projectSn){
this.getModuleList();
}
}, },
mounted() { mounted() {
if (localStorage.getItem("systemInfo")) { if (localStorage.getItem("systemInfo")) {
@ -311,6 +315,22 @@ export default {
}, },
}, },
methods: { methods: {
// ()
getModuleList() {
getNewUserAllModulePageApi({
projectSn: this.$store.state.projectSn,
moduleType: 7,
userId: this.$store.state.userInfo.userId,
}).then((res) => {
let all = res.result.moduleList;
if (all.length == 0) {
this.workSpaceShow = false;
return;
} else {
this.workSpaceShow = true;
}
});
},
getEduIdFn(){ getEduIdFn(){
let data = { let data = {
projectSn: this.$store.state.projectSn, projectSn: this.$store.state.projectSn,

View File

@ -46,7 +46,7 @@
:style="{ height: groupListData.length > 4 ? '300px' : 'auto' }" :style="{ height: groupListData.length > 4 ? '300px' : 'auto' }"
v-if="isUserList" v-if="isUserList"
> >
<vue-scroll style="height: 100%;" v-if="groupListData.length > 0"> <vue-scroll style="height: 100%" v-if="groupListData.length > 0">
<div <div
class="content-list-item" class="content-list-item"
v-for="(item, index) in groupListData" v-for="(item, index) in groupListData"
@ -68,44 +68,47 @@
</div> --> </div> -->
</div> </div>
<div class="tree-group" v-else> <div class="tree-group" v-else>
<div class="select-list" :style="{ height: selectedGroupData.length > 4 ? '300px' : 'auto' }"> <div
<vue-scroll style="height: 100%;"> class="select-list"
<el-input :style="{ height: selectedGroupData.length > 4 ? '300px' : 'auto' }"
placeholder="输入关键字进行查找" >
v-model="filterText" <vue-scroll style="height: 100%">
style="width: 98%;" <el-input
suffix-icon="el-icon-search" placeholder="输入关键字进行查找"
size="medium" v-model="filterText"
> style="width: 98%"
</el-input> suffix-icon="el-icon-search"
<el-tree size="medium"
:data="selectedGroupData" >
:default-expanded-keys="expandKey" </el-input>
:default-expand-all="false" <el-tree
node-key="sn" :data="selectedGroupData"
ref="tree" :default-expanded-keys="expandKey"
:props="selectTreeProps" :default-expand-all="false"
:filter-node-method="filterNode" node-key="sn"
:highlight-current="true" ref="tree"
:check-on-click-node="false" :props="selectTreeProps"
style="margin:10px 5px;" :filter-node-method="filterNode"
> :highlight-current="true"
<span class="custom-tree-node" slot-scope="{ node, data }"> :check-on-click-node="false"
<span style="margin: 10px 5px"
style=" >
width: 100%; <span class="custom-tree-node" slot-scope="{ node, data }">
overflow: hidden; <span
text-overflow: ellipsis; style="
white-space: nowrap; width: 100%;
display: inline-block; overflow: hidden;
" text-overflow: ellipsis;
@click="treeClick(data)" white-space: nowrap;
:class="data.projectSn ? 'projectStyle' : 'companyStyle'" display: inline-block;
:title="node.label" "
>{{ node.label }}</span @click="treeClick(data)"
> :class="data.projectSn ? 'projectStyle' : 'companyStyle'"
</span> :title="node.label"
</el-tree> >{{ node.label }}</span
>
</span>
</el-tree>
</vue-scroll> </vue-scroll>
</div> </div>
</div> </div>
@ -132,6 +135,7 @@
<script> <script>
import { getGroupListApi } from "@/assets/js/api/loginSign.js"; import { getGroupListApi } from "@/assets/js/api/loginSign.js";
import { getComapnyStatisticsSupplierListApi } from "@/assets/js/api/company/project"; import { getComapnyStatisticsSupplierListApi } from "@/assets/js/api/company/project";
import { getNewUserAllModulePageApi } from "@/assets/js/api/jxjadmin.js";
export default { export default {
data() { data() {
return { return {
@ -148,7 +152,8 @@ export default {
expandKey: [], expandKey: [],
selectFirst: 0, selectFirst: 0,
isShowGroup: false, isShowGroup: false,
selectGroupFirst: 0 selectGroupFirst: 0,
workSpaceShow: false,
}; };
}, },
created() { created() {
@ -162,9 +167,26 @@ export default {
this.expandKey = [this.selectedProjectSn]; this.expandKey = [this.selectedProjectSn];
} }
this.loadData(); this.loadData();
this.getModuleList();
}, },
mounted() {}, mounted() {},
methods: { methods: {
// ()
getModuleList() {
getNewUserAllModulePageApi({
projectSn: this.$store.state.projectSn,
moduleType: 7,
userId: this.$store.state.userInfo.userId,
}).then((res) => {
let all = res.result.moduleList;
if (all.length == 0) {
this.workSpaceShow = false;
return;
} else {
this.workSpaceShow = true;
}
});
},
// //
loadData() { loadData() {
let that = this; let that = this;
@ -177,13 +199,13 @@ export default {
sn: sn, sn: sn,
projectType: projectType, projectType: projectType,
}).then((res) => { }).then((res) => {
console.log(res,666555444) console.log(res, 666555444);
if(res.result && res.result.companyList){ if (res.result && res.result.companyList) {
if(res.result.companyList.length > 1){ if (res.result.companyList.length > 1) {
that.isShowGroup = true; that.isShowGroup = true;
} else { } else {
if(res.result.companyList.length == 1){ if (res.result.companyList.length == 1) {
that.selectShowGroup(res.result.companyList[0]) that.selectShowGroup(res.result.companyList[0]);
} else { } else {
that.isShowGroup = false; that.isShowGroup = false;
} }
@ -262,11 +284,14 @@ export default {
this.selectedGroupData = [item]; this.selectedGroupData = [item];
this.$store.commit("setSelectedGroupSn", item.companySn); // Sn this.$store.commit("setSelectedGroupSn", item.companySn); // Sn
this.filterTreeData(this.selectedGroupData); this.filterTreeData(this.selectedGroupData);
if (this.workSpaceShow) {
if (this.$route.path.indexOf("supplier") == -1) { if (this.$route.path.indexOf("supplier") == -1) {
this.$router.push("/workSpace"); this.$router.push("/workSpace");
} else {
this.$router.push("/supplierIndex");
}
} else { } else {
this.$router.push("/supplierIndex"); this.$router.push("/projectIndex");
} }
console.log(this.selectedGroupData); console.log(this.selectedGroupData);
} else { } else {
@ -300,7 +325,10 @@ export default {
this.filterTreeData(this.selectedGroupData); this.filterTreeData(this.selectedGroupData);
this.$nextTick(() => { this.$nextTick(() => {
// //
if(this.$route.path.indexOf("/supplierIndex") != -1 && !this.$store.state.projectSn){ if (
this.$route.path.indexOf("/supplierIndex") != -1 &&
!this.$store.state.projectSn
) {
this.selectProject(this.selectedGroupData[0]); this.selectProject(this.selectedGroupData[0]);
} else { } else {
this.setTreeActive(); this.setTreeActive();
@ -332,10 +360,14 @@ export default {
// popover // popover
this.visible = false; this.visible = false;
} }
if (this.$route.path.indexOf("supplier") == -1) { if (this.workSpaceShow) {
this.$router.push("/workSpace"); if (this.$route.path.indexOf("supplier") == -1) {
this.$router.push("/workSpace");
} else {
this.$router.push("/supplierIndex");
}
} else { } else {
this.$router.push("/supplierIndex"); this.$router.push("/projectIndex");
} }
}, },
filterNode(value, data) { filterNode(value, data) {

View File

@ -15,7 +15,7 @@
<!-- <div class="title_near flex" v-if="![1,2].includes($store.state.userInfo.accountType)"> <!-- <div class="title_near flex" v-if="![1,2].includes($store.state.userInfo.accountType)">
<userChange></userChange> <userChange></userChange>
</div> --> </div> -->
<div class="title_near-tow flex" v-if="![11,1,2].includes($store.state.userInfo.accountType)"> <div class="title_near-tow flex" v-if="![11,1,2].includes($store.state.userInfo.accountType) && workSpaceShow">
<div class="divider-line"></div> <div class="divider-line"></div>
<centerChange></centerChange> <centerChange></centerChange>
</div> </div>
@ -74,6 +74,9 @@
import account from "@/components/account.vue"; import account from "@/components/account.vue";
import userChange from "@/components/userChange.vue"; import userChange from "@/components/userChange.vue";
import centerChange from "@/components/centerChange.vue"; import centerChange from "@/components/centerChange.vue";
import {
getNewUserAllModulePageApi,
} from "@/assets/js/api/jxjadmin.js";
export default { export default {
data() { data() {
return { return {
@ -101,7 +104,8 @@ export default {
"loginLogo": "", "loginLogo": "",
"platformLogo": "", "platformLogo": "",
"platformName": "智慧工地云平台" "platformName": "智慧工地云平台"
} },
workSpaceShow: false
}; };
}, },
components:{ components:{
@ -112,6 +116,9 @@ export default {
created() { created() {
this.company = COMPANY; this.company = COMPANY;
console.log(COMPANY) console.log(COMPANY)
if(this.$store.state.projectSn){
this.getModuleList();
}
}, },
mounted(){ mounted(){
this.getAllModule() this.getAllModule()
@ -123,6 +130,22 @@ export default {
}, },
methods: { methods: {
// ()
getModuleList() {
getNewUserAllModulePageApi({
projectSn: this.$store.state.projectSn,
moduleType: 7,
userId: this.$store.state.userInfo.userId,
}).then((res) => {
let all = res.result.moduleList;
if (all.length == 0) {
this.workSpaceShow = false;
return;
} else {
this.workSpaceShow = true;
}
});
},
hasSubMenu(list) { hasSubMenu(list) {
// //
let onoff = false; let onoff = false;

View File

@ -137,7 +137,7 @@
</el-button> </el-button>
</el-form-item> </el-form-item>
<!-- v-if="beaconForm.supplierType!=5" --> <!-- v-if="beaconForm.supplierType!=5" -->
<el-form-item :label="$t('message.laborDev.appID')" v-if="beaconForm.supplierType!=5" prop="appId" :rules='[ <el-form-item :label="$t('message.laborDev.appID')" v-if="![5,7,9].includes(beaconForm.supplierType)" prop="appId" :rules='[
{ {
required: true, required: true,
message: this.$t("message.personnelPosition.required"), message: this.$t("message.personnelPosition.required"),
@ -149,7 +149,7 @@
:placeholder="$t('message.personnelPosition.please_enter')" :placeholder="$t('message.personnelPosition.please_enter')"
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item v-if="beaconForm.supplierType!=4&&beaconForm.supplierType!=6&&beaconForm.supplierType!=5" :label="$t('message.laborDev.projectAppKey')" prop="appKey" :rules='[ <el-form-item v-if="![4,5,6,7,9].includes(beaconForm.supplierType)" :label="$t('message.laborDev.projectAppKey')" prop="appKey" :rules='[
{ {
required: true, required: true,
message: this.$t("message.personnelPosition.required"), message: this.$t("message.personnelPosition.required"),
@ -161,7 +161,7 @@
:placeholder="$t('message.personnelPosition.please_enter')" :placeholder="$t('message.personnelPosition.please_enter')"
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item v-if="beaconForm.supplierType!=6&&beaconForm.supplierType!=5" :label="$t('message.laborDev.projectAppSecret')" prop="appSecret" :rules='[ <el-form-item v-if="![5,6,7,9].includes(beaconForm.supplierType)" :label="$t('message.laborDev.projectAppSecret')" prop="appSecret" :rules='[
{ {
required: true, required: true,
message: this.$t("message.personnelPosition.required"), message: this.$t("message.personnelPosition.required"),

View File

@ -15,7 +15,7 @@
<!-- <div class="title_near flex" v-if="![1,2].includes($store.state.userInfo.accountType)"> <!-- <div class="title_near flex" v-if="![1,2].includes($store.state.userInfo.accountType)">
<userChange></userChange> <userChange></userChange>
</div> --> </div> -->
<div class="title_near-tow flex" v-if="![11,1,2].includes($store.state.userInfo.accountType)"> <div class="title_near-tow flex" v-if="![11,1,2].includes($store.state.userInfo.accountType) && workSpaceShow">
<div class="divider-line"></div> <div class="divider-line"></div>
<centerChange></centerChange> <centerChange></centerChange>
</div> </div>
@ -83,6 +83,9 @@
import account from "@/components/account.vue"; import account from "@/components/account.vue";
import userChange from "@/components/userChange.vue"; import userChange from "@/components/userChange.vue";
import centerChange from "@/components/centerChange.vue"; import centerChange from "@/components/centerChange.vue";
import {
getNewUserAllModulePageApi,
} from "@/assets/js/api/jxjadmin.js";
export default { export default {
data() { data() {
return { return {
@ -98,7 +101,8 @@ export default {
"loginLogo": "", "loginLogo": "",
"platformLogo": "", "platformLogo": "",
"platformName": "智慧工地云平台" "platformName": "智慧工地云平台"
} },
workSpaceShow: false
}; };
}, },
components:{ components:{
@ -109,6 +113,9 @@ export default {
created() { created() {
this.company = COMPANY; this.company = COMPANY;
console.log(COMPANY) console.log(COMPANY)
if(this.$store.state.projectSn){
this.getModuleList();
}
}, },
mounted(){ mounted(){
// this.getAllModule() // this.getAllModule()
@ -120,6 +127,22 @@ export default {
}, },
methods: { methods: {
// ()
getModuleList() {
getNewUserAllModulePageApi({
projectSn: this.$store.state.projectSn,
moduleType: 7,
userId: this.$store.state.userInfo.userId,
}).then((res) => {
let all = res.result.moduleList;
if (all.length == 0) {
this.workSpaceShow = false;
return;
} else {
this.workSpaceShow = true;
}
});
},
backTo(){ backTo(){
this.$router.back(); this.$router.back();
}, },

View File

@ -1061,7 +1061,7 @@
</div> </div>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<div class="grid-content"> <div class="grid-content" v-if="isIscDevice">
<span class="label">车辆下发状态</span> <span class="label">车辆下发状态</span>
<span class="value"> <span class="value">
<span <span

View File

@ -57,6 +57,7 @@
>{{ $t("message.deviceManage.query") }}</el-button >{{ $t("message.deviceManage.query") }}</el-button
> >
<el-button <el-button
v-if="isIscDevice"
v-permission="{ v-permission="{
key: 'clgl_synchronizeVchicleTrafficData', key: 'clgl_synchronizeVchicleTrafficData',
menuPath: '/project/carManage/realTimeData', menuPath: '/project/carManage/realTimeData',
@ -253,6 +254,9 @@ import {
getCarPassRecordListByPageApi, getCarPassRecordListByPageApi,
pullCarDataApi pullCarDataApi
} from "@/assets/js/api/carManage"; } from "@/assets/js/api/carManage";
import {
projectCarConfigInfoList
} from "@/assets/js/api/laborPerson";
export default { export default {
name: "historyData", name: "historyData",
data() { data() {
@ -288,14 +292,27 @@ export default {
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
total: 0, total: 0,
isIscDevice: false
}; };
}, },
created() { created() {
this.projectSn = this.$store.state.projectSn; this.projectSn = this.$store.state.projectSn;
this.selectNowDate() this.selectNowDate()
this.onSubmit(); this.onSubmit();
this.getConfig();
}, },
methods: { methods: {
getConfig() {
projectCarConfigInfoList({
projectSn: this.$store.state.projectSn,
}).then((result) => {
if (result.success) {
if (result.result && result.result.length) {
this.isIscDevice = result.result[0].supplierType == 9 ? true: false;
}
}
});
},
// //
confirmPullData(){ confirmPullData(){
if(!this.timeRange || this.timeRange.length == 0){ if(!this.timeRange || this.timeRange.length == 0){

View File

@ -15,7 +15,7 @@
<!-- <div class="title_near flex" v-if="![1,2].includes($store.state.userInfo.accountType)"> <!-- <div class="title_near flex" v-if="![1,2].includes($store.state.userInfo.accountType)">
<userChange></userChange> <userChange></userChange>
</div> --> </div> -->
<div class="title_near-tow flex" v-if="![11,1,2].includes($store.state.userInfo.accountType)"> <div class="title_near-tow flex" v-if="![11,1,2].includes($store.state.userInfo.accountType) && workSpaceShow">
<div class="divider-line"></div> <div class="divider-line"></div>
<centerChange></centerChange> <centerChange></centerChange>
</div> </div>
@ -107,6 +107,9 @@ import userChange from "@/components/userChange.vue";
import centerChange from "@/components/centerChange.vue"; import centerChange from "@/components/centerChange.vue";
import { getGroupListByCompanyApi, jumpLargeUserInfoApi } from "@/assets/js/api/loginSign.js"; import { getGroupListByCompanyApi, jumpLargeUserInfoApi } from "@/assets/js/api/loginSign.js";
import { getProjectDetail } from "@/assets/js/api/baseInfo.js"; import { getProjectDetail } from "@/assets/js/api/baseInfo.js";
import {
getNewUserAllModulePageApi,
} from "@/assets/js/api/jxjadmin.js";
export default { export default {
data() { data() {
return { return {
@ -124,7 +127,7 @@ export default {
"platformLogo": "", "platformLogo": "",
"platformName": "智慧工地云平台" "platformName": "智慧工地云平台"
}, },
projectSn: "" workSpaceShow: false
}; };
}, },
components:{ components:{
@ -140,6 +143,9 @@ export default {
this.getGroupTreeData(); this.getGroupTreeData();
this.company = COMPANY; this.company = COMPANY;
console.log(COMPANY) console.log(COMPANY)
if(this.$store.state.projectSn){
this.getModuleList();
}
}, },
mounted(){ mounted(){
// this.getAllModule() // this.getAllModule()
@ -151,6 +157,22 @@ export default {
}, },
methods: { methods: {
// ()
getModuleList() {
getNewUserAllModulePageApi({
projectSn: this.$store.state.projectSn,
moduleType: 7,
userId: this.$store.state.userInfo.userId,
}).then((res) => {
let all = res.result.moduleList;
if (all.length == 0) {
this.workSpaceShow = false;
return;
} else {
this.workSpaceShow = true;
}
});
},
// //
getDataDateils() { getDataDateils() {
let data = { let data = {

View File

@ -15,7 +15,7 @@
<!-- <div class="title_near flex" v-if="![1,2].includes($store.state.userInfo.accountType)"> <!-- <div class="title_near flex" v-if="![1,2].includes($store.state.userInfo.accountType)">
<userChange></userChange> <userChange></userChange>
</div> --> </div> -->
<div class="title_near-tow flex" v-if="![11,1,2].includes($store.state.userInfo.accountType)"> <div class="title_near-tow flex" v-if="![11,1,2].includes($store.state.userInfo.accountType) && workSpaceShow">
<div class="divider-line"></div> <div class="divider-line"></div>
<centerChange></centerChange> <centerChange></centerChange>
</div> </div>
@ -83,6 +83,9 @@
import account from "@/components/account.vue"; import account from "@/components/account.vue";
import userChange from "@/components/userChange.vue"; import userChange from "@/components/userChange.vue";
import centerChange from "@/components/centerChange.vue"; import centerChange from "@/components/centerChange.vue";
import {
getNewUserAllModulePageApi,
} from "@/assets/js/api/jxjadmin.js";
export default { export default {
data() { data() {
return { return {
@ -96,7 +99,8 @@ export default {
"loginLogo": "", "loginLogo": "",
"platformLogo": "", "platformLogo": "",
"platformName": "智慧工地云平台" "platformName": "智慧工地云平台"
} },
workSpaceShow: false
}; };
}, },
components:{ components:{
@ -107,6 +111,9 @@ export default {
created() { created() {
this.company = COMPANY; this.company = COMPANY;
console.log(COMPANY) console.log(COMPANY)
if(this.$store.state.projectSn){
this.getModuleList();
}
}, },
mounted(){ mounted(){
// this.getAllModule() // this.getAllModule()
@ -115,9 +122,24 @@ export default {
} }
document.title='企业后台' document.title='企业后台'
console.log('mounted',this.$route.path) console.log('mounted',this.$route.path)
}, },
methods: { methods: {
// ()
getModuleList() {
getNewUserAllModulePageApi({
projectSn: this.$store.state.projectSn,
moduleType: 7,
userId: this.$store.state.userInfo.userId,
}).then((res) => {
let all = res.result.moduleList;
if (all.length == 0) {
this.workSpaceShow = false;
return;
} else {
this.workSpaceShow = true;
}
});
},
backTo(){ backTo(){
this.$router.back(); this.$router.back();
}, },

View File

@ -183,6 +183,7 @@ export default {
let all = res.result.moduleList; let all = res.result.moduleList;
if (all.length == 0) { if (all.length == 0) {
this.workSpaceShow = false; this.workSpaceShow = false;
this.$router.push("/projectIndex")
return; return;
} else { } else {
this.workSpaceShow = false; this.workSpaceShow = false;