Merge branch 'hi-ucs-dev' of http://192.168.124.50:80/wuhongjian/hi-ucs into hi-ucs-dev

This commit is contained in:
gongjiale 2022-10-12 16:01:10 +08:00
commit e0ca9166e4
9 changed files with 946 additions and 1009 deletions

View File

@ -2,16 +2,16 @@
* @Author: hisense.wuhongjian
* @Date: 2022-08-25 14:37:49
* @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-08-27 14:25:39
* @LastEditTime: 2022-10-12 13:40:14
* @Description: 告诉大家这是什么
*/
var _global = {}
var CONFIGITEM = {
version: 'qingdao', // 青岛
// version: 'qingdao', // 青岛
// version: 'xihaian', // 西海岸
// version: 'test', // 测试
// version: 'frp', // 内网穿透
// version: 'dev', // 开发
version: 'dev', // 开发
vNum: 'v0.8.7.2',
configData: {
// 青岛市大数据局
@ -24,7 +24,8 @@ var CONFIGITEM = {
xihaian: {
previewUrl: 'http://10.134.135.9:9796/',
// apiURL: 'http://10.134.135.9:8888/renren-admin',
apiURL: 'http://10.16.5.35:8888/renren-admin', // 李志成
// apiURL: 'http://10.16.5.35:8888/renren-admin', // 李志成-研发
apiURL: 'http://192.168.124.254:8888/renren-admin', // 李志成-远雄
websocketURL: 'ws://10.134.135.9:8888/renren-admin/websocket'
},
// 测试

View File

@ -1,15 +1,15 @@
/*
* @Author: hisense.wuhongjian
* @Date: 2020-07-07 16:03:23
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-09-19 09:36:49
* @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-10-11 10:46:03
* @Description: 系统静态参数配置
*/
var _global = {}
var CONFIGITEM = {
// version: 'qingdao', //
version: 'xihaian', // 西
// version: 'dev', //
//version: 'xihaian', // 西
version: 'dev', //
// version: 'zhanTingDev', // dev (2022-09-13:)
//version: 'test', //
//version: 'frp', // 穿

View File

@ -126,16 +126,16 @@ const actions = {
* @returns
*/
async getUserInfo({ commit }) {
const { data } = await getUserInfo()
if (!data) {
const res = await getUserInfo()
if (!res || !res.data) {
message.error(`验证失败,请重新登录...`)
return false
}
// debugger
commit('setUsername', data.data.username)
commit('setRealname', data.data.realName)
commit('setRole', data.data.roleIdList.length)
commit('setUserId', data.data.id)
commit('setUsername', res.data.data.username)
commit('setRealname', res.data.data.realName)
commit('setRole', res.data.data.roleIdList.length)
commit('setUserId', res.data.data.id)
// TODO
// let { username, avatar, roles, ability } = data
// if (username && roles && Array.isArray(roles)) {
@ -168,6 +168,7 @@ const actions = {
* @param {*} { commit, dispatch }
*/
async resetAll({ dispatch }) {
debugger
await dispatch('setAccessToken', '')
await dispatch('acl/setFull', false, {
root: true,

View File

@ -11,14 +11,8 @@ import store from '@/store'
import qs from 'qs'
import router from '@/router'
// import { isArray } from '@/utils/validate'
import {
message
} from 'ant-design-vue'
import {
getAccessToken,
setAccessToken
} from '@/utils/accessToken'
import { message } from 'ant-design-vue'
import { getAccessToken, setAccessToken } from '@/utils/accessToken'
let loadingInstance
@ -36,9 +30,11 @@ const handleCode = (code, msg, res) => {
store.dispatch('user/resetAll').catch(() => {})
break
case 403:
router.push({
path: '/401'
}).catch(() => { })
router
.push({
path: '/401',
})
.catch(() => {})
break
case 500:
message.error(msg || '接口异常')
@ -103,17 +99,14 @@ instance.interceptors.response.use(
console.log('接口返回headers', response.headers)
console.log('接口返回REDIRECT', response.headers.redirect)
response['Access-Control-Expose-Headers'] = 'redirect'
const {
code,
message
} = response.data
const { code, message } = response.data
if (response.headers.token) {
setAccessToken(response.headers.token)
}
if (response.headers.redirect) {
const _old_href = window.location.href.split('#')[0];
const _new_href = response.headers.redirect.split('#')[0];
const _old_href = window.location.href.split('#')[0]
const _new_href = response.headers.redirect.split('#')[0]
window.location.replace(response.headers.redirect)
// url
if (_old_href === _new_href) {
@ -168,14 +161,14 @@ instance.interceptors.response.use(
console.log('接口error', error)
if (loadingInstance) loadingInstance.close()
const {
response,
message
} = error
const { response, message } = error
if (error.response) {
console.log('接口返回', response)
console.log('接口返回headers', response.headers)
console.log('接口返回REDIRECT', response.headers.redirect)
const { status, data } = response
handleCode(status, data.msg || message, response.headers.redirect)
if (response.headers.token) {
setAccessToken(response.headers.token)
}
@ -183,17 +176,10 @@ instance.interceptors.response.use(
window.location.replace(response.headers.redirect)
return Promise.resolve()
}
const {
status,
data
} = response
handleCode(status, data.msg || message, response.headers.redirect)
return Promise.reject(error)
} else {
let {
message
} = error
let { message } = error
if (message === 'Network Error') {
message = '后端接口连接异常'
}

View File

@ -1,8 +1,8 @@
/*
* @Author: hisense.wuhongjian
* @Date: 2022-04-01 17:23:11
* @LastEditors: Light
* @LastEditTime: 2022-10-10 16:43:58
* @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-10-11 13:59:18
* @Description: 告诉大家这是什么
*/
/**
@ -26,7 +26,7 @@ router.beforeEach(async (to, from, next) => {
// if (SSOTOKEN) {
// setAccessToken(SSOTOKEN)
// }
console.log('验证白名单', routesWhiteList)
const token = getAccessToken()
console.log('token', token)
let hasToken = token
@ -45,6 +45,7 @@ router.beforeEach(async (to, from, next) => {
router.addRoute(item)
})
if (routesWhiteList.indexOf(to.path) !== -1) {
debugger
next()
} else {
//

View File

@ -1085,7 +1085,7 @@ export default defineComponent({
// -
const getQingDao = (res) => {
; ((res.data && res.data.data && res.data.data.data) || []).forEach(
((res.data && res.data.data && res.data.data.data) || []).forEach(
(val) => {
val.id = val.guid // id
val.name = val.zyname //
@ -1101,7 +1101,7 @@ export default defineComponent({
}
// -西
const getXiHaiAn = (res) => {
; ((res.data && res.data.data && res.data.data.list) || []).forEach(
((res.data && res.data.data && res.data.data.list) || []).forEach(
(val) => {
val.id = val.serviceId // id
val.name = val.serviceName //

View File

@ -1,8 +1,11 @@
<template>
<div class="home-header" :class="[
<div
class="home-header"
:class="[
select !== 'home' || scrollTop > 500 ? 'white' : '',
props.showView === 'algorithm-details' ? '' : '',
]">
]"
>
<div class="name" @click="goToHome">
<div class="name-bg" v-if="!itShowXiHaiAn"></div>
<div class="name-bg-xihaian" v-else></div>
@ -11,26 +14,52 @@
<p>(United Capacity System)</p>
</div>
</div>
<div v-for="item in navList" :key="item.key" @click="jumpPage(item)" class="nav"
:class="item.key == select ? 'select' : ''">
<div
v-for="item in navList"
:key="item.key"
@click="jumpPage(item)"
class="nav"
:class="item.key == select ? 'select' : ''"
>
{{ item.name }}
</div>
<!-- 购物车 -->
<a-badge :count="sgcNum">
<svg t="1650455446850" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"
p-id="2069" width="0.4rem" height="0.4rem" @click="goToSgc">
<svg
t="1650455446850"
class="icon"
viewBox="0 0 1024 1024"
version="1.1"
xmlns="http://www.w3.org/2000/svg"
p-id="2069"
width="0.4rem"
height="0.4rem"
@click="goToSgc"
>
<path
d="M384 832v85.333333h-85.333333v-85.333333h85.333333z m405.333333 0v85.333333h-85.333333v-85.333333h85.333333zM240.32 185.002667l24.149333 140.928h633.173334L835.285333 746.666667h-563.626666l-85.333334-497.685334H94.485333v-64h145.834667z m583.104 204.928H275.434667L325.632 682.666667h454.464l43.328-292.736z"
:fill="props.showView === 'algorithm-details' ? '#1296db' : '#1296db'" p-id="2070"></path>
:fill="props.showView === 'algorithm-details' ? '#1296db' : '#1296db'"
p-id="2070"
></path>
</svg>
</a-badge>
<a-badge :count="mynoticeNum" style="margin-left: 0.2rem">
<!-- 消息提醒 -->
<svg t="1654051054113" class="icon2" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"
p-id="2187" width="0.35rem" height="0.35rem">
<svg
t="1654051054113"
class="icon2"
viewBox="0 0 1024 1024"
version="1.1"
xmlns="http://www.w3.org/2000/svg"
p-id="2187"
width="0.35rem"
height="0.35rem"
>
<path
d="M544 161.536a330.666667 330.666667 0 0 1 298.666667 329.130667h-0.341334c0.213333 1.493333 0.341333 2.986667 0.341334 4.565333v219.434667h39.68a32 32 0 0 1 0 64h-212.053334a160 160 0 0 1-316.586666 0H141.909333a32 32 0 1 1 0-64h39.424v-219.434667c0-1.578667 0.128-3.072 0.341334-4.565333H181.333333a330.666667 330.666667 0 0 1 298.666667-329.130667V128a32 32 0 1 1 64 0v33.536z m-298.666667 553.130667h533.333334v-219.434667c0-1.578667 0.128-3.072 0.341333-4.565333h-0.341333a266.666667 266.666667 0 1 0-533.333334 0h-0.341333c0.213333 1.493333 0.341333 2.986667 0.341333 4.565333v219.434667z m359.765334 64H418.901333a96 96 0 0 0 186.197334 0z"
:fill="props.showView === 'algorithm-details' ? '#1296db' : '#1296db'" p-id="2188"></path>
:fill="props.showView === 'algorithm-details' ? '#1296db' : '#1296db'"
p-id="2188"
></path>
</svg>
<!-- <a-avatar shape="square" size="large" /> -->
</a-badge>
@ -59,7 +88,10 @@
<template #title>
<span>{{ user.realName }}</span>
</template>
<span class="name" @click="jumpPage({ name: '个人中心', key: 'personalCenter' })">
<span
class="name"
@click="jumpPage({ name: '个人中心', key: 'personalCenter' })"
>
{{ user.realName }}
</span>
</a-tooltip>
@ -82,12 +114,17 @@
fill="#bfbfbf"
></path>
</svg> -->
<i @click="jumpPage({ name: '后台管理', key: 'houtaiguanli' })" class="iconTo"></i>
<i
@click="jumpPage({ name: '后台管理', key: 'houtaiguanli' })"
class="iconTo"
v-show="backFlag"
></i>
</div>
</div>
</template>
<script setup>
import { ref, onMounted, onBeforeUnmount, defineProps } from 'vue'
import { getUserInfo } from '@/api/user'
import { recordRoute } from '@/config'
import { useRoute, useRouter } from 'vue-router'
import { mynotice } from '@/api/home'
@ -101,7 +138,6 @@ import { message } from 'ant-design-vue'
const store = useStore()
const router = useRouter()
const route = useRoute()
const itShowXiHaiAn = ref(whoShow.itShowXiHaiAn)
//
@ -113,6 +149,12 @@ const select = ref(router.currentRoute.value.name)
const mynoticeFlag = ref(false)
const mynoticeData = ref([])
const navList = ref(navListManagement.navList)
const backFlag = ref(true)
getUserInfo().then((res) => {
if (res.data.data.roleIdList.length == 0) {
backFlag.value = false
}
})
console.log('navList------------>', navList)
const props = defineProps({
@ -144,7 +186,10 @@ const jumpPage = (item) => {
// 西
if (itShowXiHaiAn.value) {
let _arr = ['共享门户', '能力云图', '能力统计', '需求中心', '赋能案例']
if (_arr.includes(item.name) && !xhaHasPermissionUser.list.includes(user.value.username)) {
if (
_arr.includes(item.name) &&
!xhaHasPermissionUser.list.includes(user.value.username)
) {
return message.warn('暂无权限')
}
}
@ -165,7 +210,7 @@ const jumpPage = (item) => {
router.push({
path: '/DetailsPageconetent',
query: {
select: DETAIL_PAGE_CONTENT_DEFAULT_TAB
select: DETAIL_PAGE_CONTENT_DEFAULT_TAB,
},
})
break
@ -349,7 +394,8 @@ onBeforeUnmount(() => {
.name-bg-xihaian {
height: 0.6rem;
width: 0.6rem;
background: url('~@/assets/newHome/newHome-title-bg-xihaian.png') no-repeat;
background: url('~@/assets/newHome/newHome-title-bg-xihaian.png')
no-repeat;
background-size: 100%;
margin-right: 0.15rem;
}
@ -468,9 +514,11 @@ onBeforeUnmount(() => {
.blue {
position: absolute;
background: linear-gradient(to right,
background: linear-gradient(
to right,
rgba(15, 90, 253, 0.8),
rgba(36, 25, 248, 0.8));
rgba(36, 25, 248, 0.8)
);
.name {
color: #fff;
@ -521,7 +569,6 @@ onBeforeUnmount(() => {
}
:deep(.ant-list-item-meta-title) {
// display: flex;
// justify-content: space-around;
// align-items: center;

View File

@ -330,7 +330,6 @@
<a-input v-model:value="formState.name" style="width: 72%" />
</a-form-item>
</a-col>
<!-- v-bind="validateInfos.phone" -->
<a-col :span="8">
<a-form-item
name="phone"
@ -416,7 +415,6 @@
<span>{{ pagination.total || 0 }}</span>
</p>
<!-- <i class="boundary"></i> -->
<p>
已选
<span>{{ selectedRowKeys.length }}</span>
@ -425,7 +423,6 @@
</div>
<!-- 右侧 -->
<div class="contentRight">
<!-- 搜索@search="onSearch" -->
<div class="searchInput" v-if="isXiHaiAn">
<a-input-search
v-model:value="mapSearchParam.cameraName"
@ -490,10 +487,10 @@
@change="handleTableChange"
:row-selection="{
selectedRowKeys: selectedRowKeys,
// onChange: onSelectChange,
onSelect: onSelectChange,
onSelectAll: onSelectAll,
}"
:loading="loadingCamera"
>
<template #bodyCell="{ column, record }">
<template v-if="isXiHaiAn && column.dataIndex === 'status'">
@ -512,18 +509,6 @@
>
预览
</a>
<!-- <a
v-else
@click="
openPicture(
record.channelCode ||
record.channelId ||
record.channelCode.channelId
)
"
>
预览
</a> -->
</template>
</template>
</a-table>
@ -566,19 +551,19 @@
>
<template #footer></template>
<div style="width: 100%; display: flex; justify-content: center">
<div style="width: 100%; height: 100%; position: relative">
<div style="width: 100%; height: 100%; position: relative" v-show="isXiHaiAn">
<!-- 西海岸--预览视频--遮罩 todo-->
<div class="video-cover" @click="videoShowMsg" v-show="isXiHaiAn"></div>
<div class="waterMark waterMark-left-top" v-show="isXiHaiAn">
<div class="video-cover" @click="videoShowMsg"></div>
<div class="waterMark waterMark-left-top">
{{ userInfo.usernameShow }}
</div>
<div class="waterMark waterMark-right-top" v-show="isXiHaiAn">
<div class="waterMark waterMark-right-top">
{{ userInfo.realNameShow }}
</div>
<div class="waterMark waterMark-left-bottom" v-show="isXiHaiAn">
<div class="waterMark waterMark-left-bottom">
{{ userInfo.usernameShow }}
</div>
<div class="waterMark waterMark-right-bottom" v-show="isXiHaiAn">
<div class="waterMark waterMark-right-bottom">
{{ userInfo.realNameShow }}
</div>
<vue3VideoPlay v-bind="options" />
@ -843,13 +828,6 @@
},
],
matter: [{ min: 1, max: 500, required: true, message: '可输入500字内容' }],
// phone: [
// {
// required: true,
// pattern: /^1[3|4|5|7|8|9][0-9]\d{8}$/,
// message: '',
// },
// ],
dept: [
{
required: true,
@ -948,7 +926,6 @@
dataSource.value = param.dataSource
pagination.value.total = param.total
// getCamera()
})
//
mybus.off('pointMarkerClick')
@ -1004,10 +981,6 @@
{
arr: [
{
// description:
// '便',
// resourceId: 'dbsb',
// type: '',
description: data.description,
resourceId: data.id,
resourceName: data.wrjName,
@ -1444,14 +1417,6 @@
pagination.value.total = 0
selectType.value = '感知资源'
} else if (name == '城市云脑会客厅') {
// room.value = false
// wrjFlag.value = true
// showMap.value = false
// roomYuyue.value = true
// roomResult.value = false
// tabList.value[1] = []
// emits('add', 6)
// searchData()
}
clickList.value[indexFather].content.splice(
clickList.value[indexFather].content.indexOf(name),
@ -1491,12 +1456,10 @@
mapSearchParam.value.labelCodes.push(item.labelCode)
})
}
// todo
mapSearchParam.value.gpsX = ''
mapSearchParam.value.gpsY = ''
mapSearchParam.value.radius = ''
mapSearchParam.value.type = ''
console.log('mapSearchParam----->查询条件', mapSearchParam.value)
mapSearchParam.value.labelCodes = mapSearchParam.value.labelCodes + ''
emits('add', 1)
getCamera()
@ -1717,7 +1680,6 @@
videoList.value.push(ob)
})
}
console.log('验证数据的准确性', videoList)
batchVisible.value = true
} else {
message.error('请选择需要预览的数据')
@ -1750,7 +1712,6 @@
videoList.value.push(ob)
})
}
console.log('验证数据的准确性', videoList)
batchPicVisible.value = true
} else {
message.error('请选择需要预览的数据')
@ -1778,8 +1739,6 @@
}
const videoClean = () => {
//
// selectedList.value = []
// selectedRowKeys.value = []
videoList.value = []
current.value = 1
}
@ -1787,11 +1746,8 @@
const changePage = (page) => {}
//
const dept = reactive({})
// eslint-disable-next-line no-undef
if (infrastructure) {
// eslint-disable-next-line no-undef
dept.deptId = infrastructure.deptId || ''
// eslint-disable-next-line no-undef
dept.deptName = infrastructure.deptName || ''
}
@ -1809,7 +1765,6 @@
}
const apply = async () => {
console.log('一键申请', selectedList.value)
if (selectedRowKeys.value.length != 0) {
//
let maxNumRes = await judegNumber()
@ -1831,6 +1786,7 @@
deptName: dept.deptName,
},
]
console.log('一键申请', arr)
localStorage.setItem('applyList', JSON.stringify(arr))
router.push({
path: '/apply',
@ -1851,30 +1807,27 @@
break
}
}
// //
// const addShopCar = () => {
// console.log('')
// }
const wrjFlag = ref(false)
// 西-loading
const loadingCamera = ref(false)
const getCamera = (flag, str) => {
console.log(
'mapSearchParam.value.cameraName------------>',
mapSearchParam.value.cameraName
)
loadingCamera.value = true;
if (flag) {
mapSearchParam.value.cameraName = str
console.log('赋值===============》', str, mapSearchParam.value)
}
console.log('初始化调用')
console.log('不选左侧树的时候不调用接口', mapSearchParam.value)
if (!whoShow1.value.itShowXiHaiAn) {
getCameraByParentId(mapSearchParam.value).then((res) => {
console.log('RRRRRRRRRR', res.data.data)
console.log('res--查询摄像头---------->', res);
loadingCamera.value = false;
dataSource.value = res.data.data
pagination.value.total = res.data.count
}).catch(err => {
loadingCamera.value = false;
message.error(err)
})
} else {
console.log('mapSearchParam------------>', mapSearchParam)
let params = {
regionId:
mapSearchParam.value.parentId || '70be8c5b664f4bcf869d82f2e8335051',
@ -1911,9 +1864,13 @@
}
}
getCameraByCondition(params).then((res) => {
console.log('res--查询摄像头---------->', res);
loadingCamera.value = false;
dataSource.value = res.data.data
pagination.value.total = res.data.count
console.log('根据parent查询摄像头', res.data.data)
}).catch(err => {
loadingCamera.value = false;
message.error(err)
})
}
}
@ -1931,9 +1888,7 @@
note1: [v],
})
})
console.log('_arr------------>', _arr);
sgcInsert(_arr).then((res) => {
console.log('res------申购车------>', res);
if(res.data.code !== 0) {
return message.error(res.data.msg)
}
@ -2001,7 +1956,6 @@
align: 'center',
},
])
// const allClick = ref([])
const onSelectChange = (
record,
selected,
@ -2009,7 +1963,6 @@
nativeEvent,
type
) => {
console.log('hahhahah', record, selected, selectedRows, nativeEvent)
record = JSON.parse(JSON.stringify(record))
if (selected) {
if (selectedRowKeys.value.length == 1000) {
@ -2041,9 +1994,6 @@
if (selectedRowKeys.value.length > 1000) {
message.warning('最多只能添加1000个摄像头')
changeRows.map((val) => {
// selectedList.value = selectedList.value.filter(
// (item) => item.idtCameraChannel !== val.idtCameraChannel
// )
selectedList.value.forEach((ele, index) => {
if (ele.channelCode == record.channelCode) {
selectedList.value.splice(index, 1)

View File

@ -8,65 +8,40 @@
<div class="bottom">
<div class="item">
<div class="zj">组件服务</div>
<div
class="name"
v-for="(item, index) in zjList.slice(0, 5)"
:key="item.name"
:class="index == 4 ? 'name-last' : ''"
@click="selectOne1(item.name)"
>
<div class="name" v-for="(item, index) in zjList.slice(0, 5)" :key="item.name"
:class="index == 4 ? 'name-last' : ''" @click="selectOne1(item.name)">
{{ item.name + '-' + item.num + '项' }}
</div>
<div class="btn" @click="jumpPage('组件服务')">查看更多</div>
</div>
<div class="item">
<div class="yy">应用资源</div>
<div
class="name"
v-for="(item, index) in yyList.slice(0, 5)"
:key="item.name"
:class="index == 4 ? 'name-last' : ''"
@click="selectOne11(item.name)"
>
<div class="name" v-for="(item, index) in yyList.slice(0, 5)" :key="item.name"
:class="index == 4 ? 'name-last' : ''" @click="selectOne11(item.name)">
{{ item.name + '-' + item.num + '项' }}
</div>
<div class="btn" @click="jumpPage('应用资源')">查看更多</div>
</div>
<div class="item">
<div class="jc">基础设施</div>
<div
class="name"
v-for="(item, index) in jcList.slice(0, 5)"
:key="item.name"
:class="index == 2 ? 'name-last' : ''"
@click="selectOne2(item.name)"
>
<div class="name" v-for="(item, index) in jcList.slice(0, 5)" :key="item.name"
:class="index == 2 ? 'name-last' : ''" @click="selectOne2(item.name)">
{{ item.name + '-' + item.num + '项' }}
</div>
<div class="btn" @click="jumpPage('基础设施')">查看更多</div>
</div>
<div class="item">
<div class="sj">数据资源</div>
<div
class="name"
v-for="(item, index) in sjList"
:key="item.id"
:class="index == 4 ? 'name-last' : ''"
@click="selectOne3(item.name)"
>
<div class="name" v-for="(item, index) in sjList" :key="item.id" :class="index == 4 ? 'name-last' : ''"
@click="selectOne3(item.name)">
{{ index + 1 }}-{{ item.name }}
</div>
<div class="btn" @click="jumpPage('数据资源')">查看更多</div>
</div>
<div class="item">
<div class="zs">知识库</div>
<div
class="name"
v-for="(item, index) in zsList"
:key="item.id"
:class="index == 4 ? 'name-last' : ''"
@click="openHref(item)"
>
<div class="name" v-for="(item, index) in zsList" :key="item.id" :class="index == 4 ? 'name-last' : ''"
@click="openHref(item)">
{{ index + 1 }}-{{ item.name }}
</div>
<div class="btn" @click="jumpPage('知识库')">查看更多</div>
@ -162,7 +137,7 @@
if (type == '基础设施') {
jcList.value = []
selectInfrastructureList().then((res) => {
console.log('基础设施==========>', res.data.data)
console.log('基础设施------res------>', res);
for (const key in res.data.data) {
if (whoShow1.value.itShowXiHaiAn) {
if (key === '视频资源') {
@ -208,41 +183,27 @@
else if (type == '组件服务') {
zjList.value = []
selectCollectComponentList().then((res) => {
console.log('组件服务----res-------->', res);
for (const key in res.data.data) {
if (whoShow1.value.itShowXiHaiAn) {
if (key === '视频资源') {
console.log('key------------>', key);
zjList.value.push({
name: key,
num: res.data.data[key],
})
}
} else {
zjList.value.push({
name: key,
num: res.data.data[key],
})
}
}
console.log('zjList------------>', zjList);
})
}
else if (type == '应用资源') {
yyList.value = []
selectCollectResourceList().then((res) => {
console.log('应用资源---res--------->', res);
for (const key in res.data.data) {
if (whoShow1.value.itShowXiHaiAn) {
if (key === '视频资源') {
yyList.value.push({
name: key,
num: res.data.data[key],
})
}
} else {
yyList.value.push({
name: key,
num: res.data.data[key],
})
}
}
})
}
else {
@ -308,19 +269,9 @@
})
}
window.open(item.link)
// window.open(
// window.SITE_CONFIG.previewUrl +
// 'hisense_office/onlinePreview?url=' +
// btoa(encodeURI(item.fileHref))
// )
}
const assignmentMethod = (type, res) => {
object[type] = res.data.data.total
// interfaceSuccess.value++
// console.log('object======>', object, interfaceSuccess.value, type)
// if (interfaceSuccess.value >= 4) {
// mybus.emit('chagneNum', object)
// }
}
getAppResources('组件服务', zjList)
getAppResources('应用资源', yyList)