2022-06-08 14:51:11 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<!-- 项目首页 -->
|
|
|
|
|
|
<div class="fullHeight">
|
2023-06-07 18:25:22 +08:00
|
|
|
|
<vhead :titleName="projectName" :showR="true"></vhead>
|
2024-01-24 18:40:54 +08:00
|
|
|
|
<!-- <div @click="test">123</div> -->
|
2022-06-08 14:51:11 +08:00
|
|
|
|
<div class="pageContainer">
|
2023-07-27 09:01:56 +08:00
|
|
|
|
<div class="pageDataContainer">
|
2023-09-15 14:51:27 +08:00
|
|
|
|
<vue-scroll style="height:900px">
|
2024-01-24 18:40:54 +08:00
|
|
|
|
<div class="projectIndexBox" ref="artList" @scroll="scrollGet($event)">
|
2022-06-08 14:51:11 +08:00
|
|
|
|
<!-- <div class="module_title">{{$t('message.homeLayout.existingProducts')}}</div> -->
|
|
|
|
|
|
<div class="projectIndex" id="projectIndex">
|
2024-01-24 18:40:54 +08:00
|
|
|
|
<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">
|
2022-06-08 14:51:11 +08:00
|
|
|
|
{{ item.labelName }}
|
|
|
|
|
|
</div>
|
2024-01-24 18:40:54 +08:00
|
|
|
|
<div class="module canclick" :class="{ hovers: item.operation }" @click="itemClick(item, index)" ref="refName">
|
|
|
|
|
|
<img v-if="iconType == 1" :src="require('../../assets/images/menu/' + item.moduleIcon + '.png')" class="icon" />
|
2023-06-26 16:24:12 +08:00
|
|
|
|
<img
|
|
|
|
|
|
v-if="iconType == 2 && item.bigModuleIcon"
|
2024-01-24 18:40:54 +08:00
|
|
|
|
:src="require('../../assets/images/menu/' + item.bigModuleIcon + '.png')"
|
2023-06-26 16:24:12 +08:00
|
|
|
|
style="margin-bottom: 10px"
|
|
|
|
|
|
class="icon"
|
|
|
|
|
|
/>
|
2022-06-08 14:51:11 +08:00
|
|
|
|
<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 v-if="showNotBuyMoudle">
|
|
|
|
|
|
<div class="module_title">
|
2023-06-26 16:24:12 +08:00
|
|
|
|
{{ $t('message.homeLayout.ununlockedProducts') }}
|
2022-06-08 14:51:11 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
<div class="projectIndex">
|
2023-06-26 16:24:12 +08:00
|
|
|
|
<div
|
|
|
|
|
|
class="module"
|
|
|
|
|
|
:class="{ hovers: item.operation }"
|
|
|
|
|
|
v-for="(item, index) in list"
|
|
|
|
|
|
:key="index"
|
|
|
|
|
|
@click="itemClick(item, index)"
|
|
|
|
|
|
v-if="!item.operation"
|
|
|
|
|
|
>
|
2024-01-24 18:40:54 +08:00
|
|
|
|
<img v-if="iconType == 1" :src="require('../../assets/images/menu/' + item.moduleIcon2 + '.png')" class="icon" />
|
2023-06-26 16:24:12 +08:00
|
|
|
|
<img
|
|
|
|
|
|
v-if="iconType == 2 && item.bigModuleIcon"
|
2024-01-24 18:40:54 +08:00
|
|
|
|
:src="require('../../assets/images/menu/' + item.bigModuleIcon + '.png')"
|
2023-06-26 16:24:12 +08:00
|
|
|
|
style="margin-bottom: 10px; opacity: 0.2"
|
|
|
|
|
|
class="icon"
|
|
|
|
|
|
/>
|
2022-06-08 14:51:11 +08:00
|
|
|
|
<div class="title_wrap grey">
|
|
|
|
|
|
<div class="head1">{{ item.moduleName }}</div>
|
|
|
|
|
|
<div class="subhead">{{ item.moduleDesc }}</div>
|
|
|
|
|
|
<!-- {{$t('message.projectIndex.moudleName1')}} -->
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</vue-scroll>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
<script>
|
2023-07-27 09:01:56 +08:00
|
|
|
|
import { getProjectInfoBySn } from '@/assets/js/api/overview'
|
|
|
|
|
|
import vhead from '@/components/header'
|
2022-06-28 13:46:23 +08:00
|
|
|
|
import axios from 'axios'
|
2023-07-27 09:01:56 +08:00
|
|
|
|
import { getProjectDetail } from '@/assets/js/api/baseInfo.js'
|
|
|
|
|
|
import { getProjectModuleList, getAllModuleApi } from '@/assets/js/api/jxjadmin.js'
|
|
|
|
|
|
import { getSafeyHatSessionApi } from '@/assets/js/api/demo'
|
|
|
|
|
|
import { getDockingUrlApi } from '@/assets/js/api/configManage'
|
2022-06-08 14:51:11 +08:00
|
|
|
|
export default {
|
2023-07-27 09:01:56 +08:00
|
|
|
|
name: 'projectIndex',
|
2022-06-08 14:51:11 +08:00
|
|
|
|
components: { vhead },
|
|
|
|
|
|
data() {
|
|
|
|
|
|
return {
|
2023-07-27 09:01:56 +08:00
|
|
|
|
firstIn: 0,
|
2023-06-26 16:24:12 +08:00
|
|
|
|
selfScrollTop: 0,
|
2023-07-27 09:01:56 +08:00
|
|
|
|
projectSn: '',
|
|
|
|
|
|
baseURL: '',
|
|
|
|
|
|
projectNumber: null,
|
|
|
|
|
|
projectName: '',
|
2022-06-08 14:51:11 +08:00
|
|
|
|
list: [],
|
|
|
|
|
|
showNotBuyMoudle: showNotBuyMoudle,
|
2023-07-27 09:01:56 +08:00
|
|
|
|
brIndex: '',
|
2023-07-27 18:28:05 +08:00
|
|
|
|
iconType: '1',
|
|
|
|
|
|
allList: [],
|
2024-02-19 09:06:53 +08:00
|
|
|
|
COMPANY: COMPANY,
|
2023-07-27 09:01:56 +08:00
|
|
|
|
}
|
2022-06-08 14:51:11 +08:00
|
|
|
|
},
|
2023-07-27 18:28:05 +08:00
|
|
|
|
watch: {
|
|
|
|
|
|
userInfo(newValue) {
|
|
|
|
|
|
// console.log('新值',newValue);
|
|
|
|
|
|
this.allList = newValue.menuAuthority.moduleList
|
2023-08-31 18:16:18 +08:00
|
|
|
|
this.getAllModule(this.allList)
|
2024-01-24 18:40:54 +08:00
|
|
|
|
}
|
2023-09-15 14:51:27 +08:00
|
|
|
|
|
2023-07-27 18:28:05 +08:00
|
|
|
|
// realAllList(newValue) {
|
|
|
|
|
|
// this.list = newValue
|
|
|
|
|
|
// }
|
|
|
|
|
|
},
|
|
|
|
|
|
computed: {
|
|
|
|
|
|
userInfo() {
|
2024-01-24 18:40:54 +08:00
|
|
|
|
return this.$store.state.userInfo
|
2023-07-27 18:28:05 +08:00
|
|
|
|
},
|
|
|
|
|
|
realAllList() {
|
|
|
|
|
|
return this.list
|
2023-08-31 18:16:18 +08:00
|
|
|
|
},
|
|
|
|
|
|
data() {
|
2024-01-24 18:40:54 +08:00
|
|
|
|
return this.$store.state.menuList
|
|
|
|
|
|
}
|
2023-07-27 18:28:05 +08:00
|
|
|
|
},
|
|
|
|
|
|
async created() {
|
2024-02-19 09:06:53 +08:00
|
|
|
|
this.headShow = true;
|
2024-01-24 18:40:54 +08:00
|
|
|
|
this.isFirstLogin = !sessionStorage.getItem('isFirstLogin')
|
2022-11-08 10:59:30 +08:00
|
|
|
|
this.projectSn = this.$store.state.projectSn
|
2022-11-07 18:47:58 +08:00
|
|
|
|
this.baseURL = this.$http.defaults.baseURL
|
2023-06-07 18:25:22 +08:00
|
|
|
|
if (localStorage.getItem('systemInfo')) {
|
2023-07-27 09:01:56 +08:00
|
|
|
|
this.iconType = JSON.parse(localStorage.getItem('systemInfo')).iconType
|
|
|
|
|
|
? JSON.parse(localStorage.getItem('systemInfo')).iconType
|
|
|
|
|
|
: '1'
|
2022-06-08 14:51:11 +08:00
|
|
|
|
}
|
2023-08-31 18:16:18 +08:00
|
|
|
|
console.log(this.iconType, 'iconType,iconTypeiconTypeiconTypeiconTypeiconType')
|
2023-07-27 18:28:05 +08:00
|
|
|
|
this.allList = this.$store.state.userInfo.menuAuthority.moduleList
|
|
|
|
|
|
await this.getAllModule(this.allList)
|
2023-07-27 09:01:56 +08:00
|
|
|
|
await this.getDataDateils()
|
|
|
|
|
|
await this.getProjectNumber()
|
|
|
|
|
|
},
|
2023-07-27 18:28:05 +08:00
|
|
|
|
async mounted() {
|
|
|
|
|
|
// if(this.firstIn == 0) {
|
|
|
|
|
|
// this.firstIn ++
|
|
|
|
|
|
// this.$router.go(0)
|
|
|
|
|
|
// }
|
|
|
|
|
|
// this.$forceUpdate()
|
|
|
|
|
|
},
|
2023-07-27 09:01:56 +08:00
|
|
|
|
activated() {
|
|
|
|
|
|
this.$refs.artList.scrollTop = this.selfScrollTop
|
2022-06-08 14:51:11 +08:00
|
|
|
|
},
|
|
|
|
|
|
methods: {
|
2024-01-24 18:40:54 +08:00
|
|
|
|
test() {
|
|
|
|
|
|
let item = this.list.find(item => item.moduleName === '劳务管理系统')
|
|
|
|
|
|
let arr = item.menuList
|
|
|
|
|
|
console.log(arr, '测试数据')
|
|
|
|
|
|
let arr2 = []
|
|
|
|
|
|
arr.forEach(element => {
|
|
|
|
|
|
if (element.menuEquipment == 0) {
|
|
|
|
|
|
arr2.push(element)
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
this.$store.commit('setMenuList', arr2)
|
|
|
|
|
|
this.$store.commit('setIsShowBackIndex', true)
|
|
|
|
|
|
this.$store.commit('setMoudle', item)
|
|
|
|
|
|
if (arr2[0].target == '_blank') {
|
|
|
|
|
|
let routeUrl = ''
|
|
|
|
|
|
if (arr2[0].path.indexOf('http') != -1) {
|
|
|
|
|
|
routeUrl = arr2[0].path
|
|
|
|
|
|
} else {
|
|
|
|
|
|
let url = this.$router.resolve({
|
|
|
|
|
|
path: arr2[0].path
|
|
|
|
|
|
})
|
|
|
|
|
|
routeUrl = url.href
|
|
|
|
|
|
}
|
|
|
|
|
|
window.open(routeUrl, '_blank')
|
|
|
|
|
|
} else {
|
|
|
|
|
|
if (arr2[0].path == '' || arr2[0].path.indexOf('/') == -1) {
|
|
|
|
|
|
this.$router.push(arr2[0].menuList[0].path)
|
|
|
|
|
|
} else {
|
|
|
|
|
|
this.$router.push(arr2[0].path)
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
window._paq.push(['trackEvent', '点击', item.moduleName, '进入' + item.moduleName])
|
|
|
|
|
|
},
|
2023-07-27 09:01:56 +08:00
|
|
|
|
scrollGet(e) {
|
|
|
|
|
|
this.selfScrollTop = this.$refs.artList.scrollTop
|
|
|
|
|
|
},
|
|
|
|
|
|
|
2023-06-07 18:25:22 +08:00
|
|
|
|
getSafeyHatSession() {
|
|
|
|
|
|
let data = {}
|
|
|
|
|
|
data.projectSn = this.projectSn
|
|
|
|
|
|
getSafeyHatSessionApi(data).then(res => {
|
|
|
|
|
|
console.log('安全帽跳转', res)
|
|
|
|
|
|
// {
|
|
|
|
|
|
// "success":true,
|
|
|
|
|
|
// "message":"操作成功!",
|
|
|
|
|
|
// "code":200,
|
|
|
|
|
|
// "result":{
|
|
|
|
|
|
// "msg_code":"GetSucc",
|
|
|
|
|
|
// "session_id":"d3a3c4d17c46e29dab9c9178d5b380c5",
|
|
|
|
|
|
// "userName":"rdys_test",
|
|
|
|
|
|
// "status":true,
|
|
|
|
|
|
// "token":"d3a3c4d17c46e29dab9c9178d5b380c5"
|
|
|
|
|
|
// },
|
|
|
|
|
|
// "timestamp":1634904162951
|
|
|
|
|
|
// }
|
|
|
|
|
|
// 此处注释是因为免登陆 传projectId到后端
|
|
|
|
|
|
if (res.code == 200) {
|
|
|
|
|
|
this.url = 'https://caps.runde.pro/login#token=' + res.result.token + '&user_name=' + res.result.userName + '&target=home'
|
2023-07-27 09:01:56 +08:00
|
|
|
|
// let url = 'https://caps.runde.pro/login#token='+ res.result.token + '&user_name=' + res.result.userName + '&target=home'
|
2023-06-07 18:25:22 +08:00
|
|
|
|
window.open(this.url)
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
getProjectNumber() {
|
|
|
|
|
|
let data = {
|
2023-07-27 09:01:56 +08:00
|
|
|
|
projectSn: this.projectSn
|
|
|
|
|
|
}
|
|
|
|
|
|
getProjectInfoBySn(data).then(res => {
|
2023-06-07 18:25:22 +08:00
|
|
|
|
console.log('------------', res.result.projectNumber)
|
|
|
|
|
|
this.projectNumber = res.result.projectNumber
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
// 全景成像测距
|
|
|
|
|
|
getPanoramicRanging() {
|
|
|
|
|
|
axios({
|
2023-07-27 09:01:56 +08:00
|
|
|
|
method: 'GET',
|
2023-06-07 18:25:22 +08:00
|
|
|
|
// url:'http://182.90.224.237:8070/xmgl/docking/url',
|
|
|
|
|
|
// url:'http://182.90.224.237:7000/xmgl/docking/url',
|
|
|
|
|
|
url: `${this.$http.defaults.baseURL}${'xmgl/docking/url'}`,
|
|
|
|
|
|
params: {
|
2023-07-27 09:01:56 +08:00
|
|
|
|
projectNumber: this.projectNumber
|
2023-06-07 18:25:22 +08:00
|
|
|
|
}
|
2023-07-27 09:01:56 +08:00
|
|
|
|
}).then(res => {
|
2023-06-07 18:25:22 +08:00
|
|
|
|
console.log('全景成像测距', res)
|
2023-07-27 09:01:56 +08:00
|
|
|
|
let toUrl = res.data.find(item => {
|
2023-06-07 18:25:22 +08:00
|
|
|
|
if (this.projectNumber == item.jinqianmaosn) {
|
|
|
|
|
|
return item.url
|
2022-07-15 09:47:14 +08:00
|
|
|
|
}
|
2023-06-07 18:25:22 +08:00
|
|
|
|
})
|
|
|
|
|
|
window.open(toUrl.url)
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
2023-06-26 16:24:12 +08:00
|
|
|
|
itemClick(item, index) {
|
2023-06-07 18:25:22 +08:00
|
|
|
|
console.log('item:::::::::', index)
|
2023-09-15 14:51:27 +08:00
|
|
|
|
console.log('点击的模块信息', item)
|
2023-06-26 16:24:12 +08:00
|
|
|
|
|
2022-06-08 14:51:11 +08:00
|
|
|
|
// console.log(item,this.$store.state.userInfo.account)
|
2023-07-27 09:01:56 +08:00
|
|
|
|
if (item.moduleName == '智能安全帽系统') {
|
2022-06-28 13:46:23 +08:00
|
|
|
|
this.getSafeyHatSession()
|
2024-01-24 18:40:54 +08:00
|
|
|
|
this.$message.success(this.$t('message.projectIndex.tips3')) //即将跳转新页面
|
2023-08-04 18:31:22 +08:00
|
|
|
|
|
2023-06-07 18:25:22 +08:00
|
|
|
|
// 次数更改因为原来跳转的是星璇 无法显示 所以更改跳转到 润德 龙光同一个页面
|
|
|
|
|
|
// let NodeRSA = require("node-rsa");
|
|
|
|
|
|
// //请求参数
|
|
|
|
|
|
// let params = JSON.stringify({
|
|
|
|
|
|
// account: this.$store.state.userInfo.account,
|
|
|
|
|
|
// page_flag: 3,
|
|
|
|
|
|
// });
|
|
|
|
|
|
// //公钥
|
|
|
|
|
|
// const pubKey = `
|
|
|
|
|
|
// -----BEGIN PUBLIC KEY-----
|
|
|
|
|
|
// MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDcmP0ug4NTHwW2oeHxheZjmYPDxVGFP770eECdLwRtaH0pPWvsXG6MSO/kCzgjEVEo1K1bvRxkkasQRu02fhI+gsZa8wvVeo3s4zJDA48Oj99JAXsx56/WN1RlNh+tsXcH9oQWy3gbX5cDkheuVZj8gsV7Ez59Ucj4e78zNJrUDwIDAQAB
|
|
|
|
|
|
// -----END PUBLIC KEY-----`;
|
|
|
|
|
|
|
2023-07-27 09:01:56 +08:00
|
|
|
|
// let publicKey = new NodeRSA(pubKey);
|
|
|
|
|
|
// let async_key = publicKey.encrypt(params, 'base64')
|
2023-08-31 18:16:18 +08:00
|
|
|
|
setTimeout(() => {
|
2024-01-24 18:40:54 +08:00
|
|
|
|
window.open('https://caps.runde.pro')
|
2023-08-31 18:16:18 +08:00
|
|
|
|
}, 1000)
|
2023-06-07 18:25:22 +08:00
|
|
|
|
// window.open("http://58.210.96.206:91/async_danzhou.html?async_key="+async_key)
|
2023-08-31 18:16:18 +08:00
|
|
|
|
// window.location.href = "http://58.210.96.206:91/async_danzhou.html?async_key="+async_key;
|
2022-06-28 13:46:23 +08:00
|
|
|
|
}
|
2023-07-27 09:01:56 +08:00
|
|
|
|
if (item.moduleName == '全景成像测距') {
|
2023-06-07 18:25:22 +08:00
|
|
|
|
this.getPanoramicRanging()
|
2022-06-08 14:51:11 +08:00
|
|
|
|
}
|
2023-07-27 09:01:56 +08:00
|
|
|
|
if (item.moduleName == '智能穿戴管理系统') {
|
2023-06-07 18:25:22 +08:00
|
|
|
|
this.getSafeyHatSession()
|
2022-06-08 14:51:11 +08:00
|
|
|
|
}
|
2023-07-27 09:01:56 +08:00
|
|
|
|
if (item.moduleName == '智能穿戴管理系统') {
|
|
|
|
|
|
return
|
2022-06-08 14:51:11 +08:00
|
|
|
|
}
|
2023-07-27 09:01:56 +08:00
|
|
|
|
if (item.moduleName == '智能安全帽系统') {
|
|
|
|
|
|
this.getSafeyHatSession()
|
2022-06-08 14:51:11 +08:00
|
|
|
|
}
|
2024-01-24 18:40:54 +08:00
|
|
|
|
|
2022-06-08 14:51:11 +08:00
|
|
|
|
if (!item.operation) {
|
2023-07-27 09:01:56 +08:00
|
|
|
|
this.$message.error(this.$t('message.projectIndex.tips1'))
|
|
|
|
|
|
return
|
2022-06-08 14:51:11 +08:00
|
|
|
|
}
|
2023-10-13 17:51:24 +08:00
|
|
|
|
// if (this.COMPANY == 'jlw') {
|
|
|
|
|
|
// if (item.moduleName == 'AR指挥中心') {
|
|
|
|
|
|
// window.open('https://cloud.kivicube.com/plane-scenes');
|
|
|
|
|
|
// }
|
|
|
|
|
|
// }
|
2022-07-15 09:47:14 +08:00
|
|
|
|
if (item.menuList && item.menuList.length > 0 && item.moduleName != '全景成像测距') {
|
2023-07-27 09:01:56 +08:00
|
|
|
|
let arr = item.menuList,
|
|
|
|
|
|
arr2 = []
|
|
|
|
|
|
arr.forEach(element => {
|
2022-06-08 14:51:11 +08:00
|
|
|
|
if (element.menuEquipment == 0) {
|
2023-07-27 09:01:56 +08:00
|
|
|
|
arr2.push(element)
|
2022-06-08 14:51:11 +08:00
|
|
|
|
}
|
2023-07-27 09:01:56 +08:00
|
|
|
|
})
|
|
|
|
|
|
this.$store.commit('setMenuList', arr2)
|
|
|
|
|
|
this.$store.commit('setIsShowBackIndex', true)
|
|
|
|
|
|
this.$store.commit('setMoudle', item)
|
|
|
|
|
|
if (arr2[0].target == '_blank') {
|
2023-06-07 18:25:22 +08:00
|
|
|
|
let routeUrl = ''
|
|
|
|
|
|
if (arr2[0].path.indexOf('http') != -1) {
|
|
|
|
|
|
routeUrl = arr2[0].path
|
|
|
|
|
|
} else {
|
2022-06-08 14:51:11 +08:00
|
|
|
|
let url = this.$router.resolve({
|
2023-07-27 09:01:56 +08:00
|
|
|
|
path: arr2[0].path
|
|
|
|
|
|
})
|
2023-06-07 18:25:22 +08:00
|
|
|
|
routeUrl = url.href
|
2022-06-08 14:51:11 +08:00
|
|
|
|
}
|
2023-07-27 09:01:56 +08:00
|
|
|
|
window.open(routeUrl, '_blank')
|
2022-06-08 14:51:11 +08:00
|
|
|
|
} else {
|
2023-06-07 18:25:22 +08:00
|
|
|
|
if (arr2[0].path == '' || arr2[0].path.indexOf('/') == -1) {
|
2023-07-27 09:01:56 +08:00
|
|
|
|
this.$router.push(arr2[0].menuList[0].path)
|
2023-06-07 18:25:22 +08:00
|
|
|
|
} else {
|
2023-07-27 09:01:56 +08:00
|
|
|
|
this.$router.push(arr2[0].path)
|
2022-06-08 14:51:11 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2024-01-24 18:40:54 +08:00
|
|
|
|
} else if (item.moduleName == '全景成像测距' || item.moduleName == '智能安全帽系统' || item.moduleName == 'AR指挥中心') {
|
2023-08-04 18:31:22 +08:00
|
|
|
|
// this.$message.success(this.$t('message.projectIndex.tips3'))//即将跳转新页面
|
2023-07-27 09:01:56 +08:00
|
|
|
|
} else {
|
|
|
|
|
|
this.$message.error(this.$t('message.projectIndex.tips2'))
|
2022-06-08 14:51:11 +08:00
|
|
|
|
}
|
2023-06-07 18:25:22 +08:00
|
|
|
|
window._paq.push(['trackEvent', '点击', item.moduleName, '进入' + item.moduleName])
|
2022-06-08 14:51:11 +08:00
|
|
|
|
},
|
|
|
|
|
|
//获取详情
|
|
|
|
|
|
getDataDateils() {
|
|
|
|
|
|
let data = {
|
2023-07-27 09:01:56 +08:00
|
|
|
|
projectSn: this.projectSn
|
|
|
|
|
|
}
|
|
|
|
|
|
getProjectDetail(data).then(res => {
|
2022-06-08 14:51:11 +08:00
|
|
|
|
// console.log(res);
|
|
|
|
|
|
if (res.code == 200) {
|
2023-07-27 09:01:56 +08:00
|
|
|
|
this.projectName = res.result.projectName
|
|
|
|
|
|
document.title = this.projectName
|
|
|
|
|
|
this.$store.commit('setProDetail', res.result)
|
2022-06-08 14:51:11 +08:00
|
|
|
|
}
|
2023-07-27 09:01:56 +08:00
|
|
|
|
})
|
2022-06-08 14:51:11 +08:00
|
|
|
|
},
|
|
|
|
|
|
//为了展示未解锁产品,所以需要查询所有模块
|
|
|
|
|
|
getAllModule(half) {
|
2023-07-27 09:01:56 +08:00
|
|
|
|
getAllModuleApi({ moduleType: 2 }).then(res => {
|
2022-06-08 14:51:11 +08:00
|
|
|
|
if (res.success) {
|
2023-07-27 09:01:56 +08:00
|
|
|
|
let all = res.result
|
2023-07-27 18:28:05 +08:00
|
|
|
|
// console.log('allallallallall', all)
|
|
|
|
|
|
// console.log('halfhalfhalfhalf',half)
|
2022-06-08 14:51:11 +08:00
|
|
|
|
all.forEach((element, index) => {
|
2023-07-27 09:01:56 +08:00
|
|
|
|
all[index].operation = false
|
|
|
|
|
|
half.forEach(element2 => {
|
2022-06-08 14:51:11 +08:00
|
|
|
|
if (element2.moduleId == element.moduleId) {
|
2023-07-27 09:01:56 +08:00
|
|
|
|
all[index].operation = true
|
|
|
|
|
|
all[index].menuList = element2.menuList
|
2022-06-08 14:51:11 +08:00
|
|
|
|
}
|
2023-07-27 09:01:56 +08:00
|
|
|
|
})
|
|
|
|
|
|
})
|
|
|
|
|
|
this.list = all
|
2023-08-31 18:16:18 +08:00
|
|
|
|
this.$forceUpdate()
|
2024-01-24 18:40:54 +08:00
|
|
|
|
console.log(this.list, '权限数据')
|
|
|
|
|
|
if (window.location.href.indexOf('labor') != -1) {
|
|
|
|
|
|
console.log('大屏跳转进来携带参数跳转进来了吗----', window.location.href.indexOf('labor'))
|
|
|
|
|
|
this.test()
|
|
|
|
|
|
}
|
2022-06-08 14:51:11 +08:00
|
|
|
|
this.$nextTick(() => {
|
2023-07-27 09:01:56 +08:00
|
|
|
|
let projectIndex = document.getElementById('projectIndex')
|
|
|
|
|
|
let array = document.getElementsByClassName('module_title')
|
2022-06-08 14:51:11 +08:00
|
|
|
|
console.log(array)
|
|
|
|
|
|
for (let index = 0; index < array.length; index++) {
|
2023-07-27 09:01:56 +08:00
|
|
|
|
let newElement = document.createElement('div')
|
2023-06-07 18:25:22 +08:00
|
|
|
|
newElement.style = 'width: 100%; height: 1px'
|
2023-07-27 09:01:56 +08:00
|
|
|
|
projectIndex.insertBefore(newElement, array[index].parentNode)
|
2022-06-08 14:51:11 +08:00
|
|
|
|
}
|
2023-07-27 09:01:56 +08:00
|
|
|
|
})
|
2022-06-08 14:51:11 +08:00
|
|
|
|
}
|
2023-07-27 09:01:56 +08:00
|
|
|
|
})
|
2022-06-08 14:51:11 +08:00
|
|
|
|
},
|
|
|
|
|
|
insertAfter(newElement, targetElement) {
|
|
|
|
|
|
// newElement是要追加的元素 targetElement 是指定元素的位置
|
2023-07-27 09:01:56 +08:00
|
|
|
|
let parent = targetElement.parentNode // 找到指定元素的父节点
|
2022-06-08 14:51:11 +08:00
|
|
|
|
if (parent.lastChild == targetElement) {
|
|
|
|
|
|
// 判断指定元素的是否是节点中的最后一个位置 如果是的话就直接使用appendChild方法
|
2023-07-27 09:01:56 +08:00
|
|
|
|
parent.appendChild(newElement, targetElement)
|
2022-06-08 14:51:11 +08:00
|
|
|
|
} else {
|
2023-07-27 09:01:56 +08:00
|
|
|
|
parent.insertBefore(newElement, targetElement.nextSibling)
|
2022-06-08 14:51:11 +08:00
|
|
|
|
}
|
2023-07-27 09:01:56 +08:00
|
|
|
|
}
|
2022-06-08 14:51:11 +08:00
|
|
|
|
//获取项目解锁的模块
|
|
|
|
|
|
// getProjectModule(projectSn) {
|
|
|
|
|
|
// getProjectModuleList({ projectSn: this.$store.state.projectSn }).then(
|
|
|
|
|
|
// (result) => {
|
|
|
|
|
|
// if (result.success) {
|
2023-07-27 09:01:56 +08:00
|
|
|
|
// let half = result.result;
|
2022-06-08 14:51:11 +08:00
|
|
|
|
// this.getAllModule(half);
|
|
|
|
|
|
// }
|
|
|
|
|
|
// }
|
|
|
|
|
|
// );
|
|
|
|
|
|
// },
|
2023-07-27 09:01:56 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2022-06-08 14:51:11 +08:00
|
|
|
|
</script>
|
|
|
|
|
|
<style lang="less" scoped>
|
|
|
|
|
|
.pageContainer {
|
|
|
|
|
|
height: calc(100% - 61px);
|
|
|
|
|
|
background: rgba(247, 249, 255, 0.9);
|
|
|
|
|
|
font-family: '思源黑体';
|
|
|
|
|
|
}
|
2023-06-07 18:25:22 +08:00
|
|
|
|
|
2022-06-08 14:51:11 +08:00
|
|
|
|
.projectIndexBox {
|
|
|
|
|
|
max-width: 1360px;
|
|
|
|
|
|
margin: auto;
|
|
|
|
|
|
width: 100%;
|
2023-06-26 16:24:12 +08:00
|
|
|
|
overflow-y: scroll;
|
|
|
|
|
|
height: calc(100% - 61px);
|
2022-06-08 14:51:11 +08:00
|
|
|
|
}
|
2023-06-07 18:25:22 +08:00
|
|
|
|
|
2022-06-08 14:51:11 +08:00
|
|
|
|
// @media screen and (max-width: 1630px) {
|
|
|
|
|
|
// .projectIndex .module {
|
|
|
|
|
|
// margin-right: 26px !important;
|
|
|
|
|
|
// }
|
|
|
|
|
|
// }
|
|
|
|
|
|
.projectIndex {
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: flex-end;
|
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
|
margin-bottom: 8px;
|
2023-06-07 18:25:22 +08:00
|
|
|
|
|
2022-06-08 14:51:11 +08:00
|
|
|
|
.module:nth-child(4n) {
|
|
|
|
|
|
margin-right: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2023-06-07 18:25:22 +08:00
|
|
|
|
|
2022-06-08 14:51:11 +08:00
|
|
|
|
.module_title {
|
|
|
|
|
|
margin-left: -10px;
|
|
|
|
|
|
border-left: 2px solid #4a8bff;
|
|
|
|
|
|
padding-left: 8px;
|
|
|
|
|
|
margin-bottom: 20px;
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
// width: 1360px;
|
|
|
|
|
|
}
|
2023-06-07 18:25:22 +08:00
|
|
|
|
|
2022-06-08 14:51:11 +08:00
|
|
|
|
.module {
|
|
|
|
|
|
width: 310px;
|
|
|
|
|
|
|
|
|
|
|
|
// height: 124px;
|
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
// border-radius: 3px;
|
|
|
|
|
|
// box-shadow: 0px 2px 9px 0px rgba(0, 0, 0, 0.07);
|
|
|
|
|
|
// display: flex;
|
|
|
|
|
|
// align-items: center;
|
|
|
|
|
|
margin-bottom: 24px;
|
|
|
|
|
|
padding: 30px 10px 32px;
|
|
|
|
|
|
font-size: 17px;
|
|
|
|
|
|
margin-right: 30px;
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
|
|
|
|
|
|
border: 1px solid rgba(18, 41, 75, 0.1);
|
|
|
|
|
|
height: 174px;
|
2023-06-07 18:25:22 +08:00
|
|
|
|
|
2022-06-08 14:51:11 +08:00
|
|
|
|
&.canclick:hover {
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
// border-color: rgba(74, 139, 255, 0.9);
|
|
|
|
|
|
background-color: rgba(196, 208, 255, 0.17);
|
|
|
|
|
|
// box-shadow: 0px 5px 9px 3px rgba(74, 139, 255, 0.2);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.head1 {
|
|
|
|
|
|
// opacity: 0.8;
|
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
|
}
|
2023-06-07 18:25:22 +08:00
|
|
|
|
|
2022-06-08 14:51:11 +08:00
|
|
|
|
.icon {
|
|
|
|
|
|
width: 56px;
|
|
|
|
|
|
height: 56px;
|
|
|
|
|
|
// width: 45px;
|
|
|
|
|
|
// height: 45px;
|
|
|
|
|
|
// margin-right: 20px;
|
|
|
|
|
|
display: block;
|
|
|
|
|
|
margin: 0 auto 0px;
|
|
|
|
|
|
}
|
2023-06-07 18:25:22 +08:00
|
|
|
|
|
2022-06-08 14:51:11 +08:00
|
|
|
|
.subhead {
|
|
|
|
|
|
opacity: 0.8;
|
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
margin-top: 15px;
|
|
|
|
|
|
}
|
2023-06-07 18:25:22 +08:00
|
|
|
|
|
2022-06-08 14:51:11 +08:00
|
|
|
|
.grey * {
|
|
|
|
|
|
opacity: 0.3;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2023-06-07 18:25:22 +08:00
|
|
|
|
|
2022-06-08 14:51:11 +08:00
|
|
|
|
.hovers {
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
}
|
2023-06-07 18:25:22 +08:00
|
|
|
|
|
2022-06-08 14:51:11 +08:00
|
|
|
|
.moduleBox {
|
|
|
|
|
|
// vertical-align: baseline;
|
|
|
|
|
|
// float: left;\
|
|
|
|
|
|
// display: inline-block;
|
|
|
|
|
|
}
|
2023-06-26 16:24:12 +08:00
|
|
|
|
::-webkit-scrollbar {
|
2023-07-27 09:01:56 +08:00
|
|
|
|
width: 0 !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
::-webkit-scrollbar {
|
|
|
|
|
|
width: 0 !important;
|
|
|
|
|
|
height: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
</style>
|