Merge branch 'hi-ucs-dev' of http://15.2.21.221:3000/wuhongjian/hi-ucs into hi-ucs-dev

This commit is contained in:
gaoyuanwei 2022-07-07 20:03:24 +08:00
commit 3b7f8b745a
7 changed files with 62 additions and 65 deletions

View File

@ -28,10 +28,10 @@
<!-- 站点配置 --> <!-- 站点配置 -->
<script> <script>
window.SITE_CONFIG = {}; window.SITE_CONFIG = {};
// window.SITE_CONFIG['backUrl'] = 'http://15.72.183.90:8001'; window.SITE_CONFIG['backUrl'] = 'http://15.72.183.90:8001';
// window.SITE_CONFIG['previewUrl'] = 'http://15.72.183.90:7008/'; window.SITE_CONFIG['previewUrl'] = 'http://15.72.183.90:7008/';
// window.SITE_CONFIG['frontUrl'] = 'http://15.72.183.90:7008/document/#/devModelFile/'; window.SITE_CONFIG['frontUrl'] = 'http://15.72.183.90:7008/document/#/devModelFile/';
// window.SITE_CONFIG['apiURL'] = 'http://15.72.183.90:8000/renren-admin'; window.SITE_CONFIG['apiURL'] = 'http://15.72.183.90:8000/renren-admin';
window.SITE_CONFIG['POI_URL'] = 'http://15.72.178.129:8090/iserver/services/addressmatch-qingdaoPOI181015/restjsr/v1/address'; window.SITE_CONFIG['POI_URL'] = 'http://15.72.178.129:8090/iserver/services/addressmatch-qingdaoPOI181015/restjsr/v1/address';
// 包头 // 包头
// window.SITE_CONFIG['backUrl'] = 'http://10.110.205.1:8001'; // window.SITE_CONFIG['backUrl'] = 'http://10.110.205.1:8001';
@ -45,10 +45,10 @@
// window.SITE_CONFIG['frontUrl'] = 'http://10.134.135.9:9796/document/#/devModelFile/'; // window.SITE_CONFIG['frontUrl'] = 'http://10.134.135.9:9796/document/#/devModelFile/';
// window.SITE_CONFIG['apiURL'] = 'http://10.134.135.9:8888/renren-admin'; // window.SITE_CONFIG['apiURL'] = 'http://10.134.135.9:8888/renren-admin';
// 开发 // 开发
window.SITE_CONFIG['backUrl'] = 'http://15.2.21.238:9797'; // window.SITE_CONFIG['backUrl'] = 'http://15.2.21.238:9797';
window.SITE_CONFIG['previewUrl'] = 'http://15.2.21.238:9796/'; // window.SITE_CONFIG['previewUrl'] = 'http://15.2.21.238:9796/';
window.SITE_CONFIG['frontUrl'] = 'http://15.2.21.238:9796/document/#/devModelFile/'; // window.SITE_CONFIG['frontUrl'] = 'http://15.2.21.238:9796/document/#/devModelFile/';
window.SITE_CONFIG['apiURL'] = 'http://15.2.21.238:8888/renren-admin'; // window.SITE_CONFIG['apiURL'] = 'http://15.2.21.238:8888/renren-admin';
// window.SITE_CONFIG['POI_URL'] = 'http://15.72.178.129:8090/iserver/services/addressmatch-qingdaoPOI181015/restjsr/v1/address'; // window.SITE_CONFIG['POI_URL'] = 'http://15.72.178.129:8090/iserver/services/addressmatch-qingdaoPOI181015/restjsr/v1/address';
// 穿透版本 // 穿透版本
// window.SITE_CONFIG['backUrl'] = 'http://124.222.94.39:9797'; // window.SITE_CONFIG['backUrl'] = 'http://124.222.94.39:9797';

View File

@ -1,13 +1,22 @@
/* /*
* @Author: hisense.wuhongjian * @Author: hisense.wuhongjian
* @Date: 2020-07-07 16:03:23 * @Date: 2020-07-07 16:03:23
<<<<<<< HEAD
* @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-07-07 17:30:10
=======
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-07 17:41:25 * @LastEditTime: 2022-07-07 17:41:25
>>>>>>> 420a31531fdd60d9a8007e3328d071690c7688f1
* @Description: 数据资源参数配置 * @Description: 数据资源参数配置
*/ */
const newLocation = 'qingdao' const newLocation = 'qingdao'
// const newLocation = 'baotou' // const newLocation = 'baotou'
<<<<<<< HEAD
// const newLocation = 'xihaian'
=======
// const newLocation = 'xihaian' // const newLocation = 'xihaian'
>>>>>>> 420a31531fdd60d9a8007e3328d071690c7688f1
// //
const whoShow = {} const whoShow = {}

View File

@ -113,31 +113,21 @@ const actions = {
* @param {*} { commit, dispatch, state } * @param {*} { commit, dispatch, state }
* @returns * @returns
*/ */
async getUserInfo({ commit }) { getUserInfo({ commit }) {
const { data } = await getUserInfo() return new Promise((resolve, reject)=>{
if (!data) { getUserInfo().then( (res) =>{
message.error(`验证失败,请重新登录...`) console.log('res', res)
return false const data = res.data
} if (!data) {
// debugger message.error(`验证失败,请重新登录...`)
commit('setUsername', data.data.username) reject()
commit('setRole', data.data.roleIdList.length) }
commit('setUserId', data.data.id) commit('setUsername', data.data.username)
// TODO commit('setRole', data.data.roleIdList.length)
// let { username, avatar, roles, ability } = data commit('setUserId', data.data.id)
// if (username && roles && Array.isArray(roles)) { resolve()
// dispatch('acl/setRole', roles, { })
// root: true, })
// })
// if (ability && ability.length > 0)
// dispatch('acl/setAbility', ability, {
// root: true,
// })
// commit('setUsername', username)
// commit('setAvatar', avatar)
// } else {
// message.error('')
// }
}, },
/** /**

View File

@ -114,10 +114,14 @@ instance.interceptors.response.use(
location.reload() location.reload()
}, 1000) }, 1000)
} }
debugger;
response['Access-Control-Expose-Headers'] = 'redirect' response['Access-Control-Expose-Headers'] = 'redirect'
const { code, message } = response.data const { code, message } = response.data
if (response.headers.token) { if (response.headers.token) {
setAccessToken(response.headers.token) setAccessToken(response.headers.token)
debugger
// setAccessToken(response.headers.token)
// store.dispatch('user/getUserInfo')
} else { } else {
if (response.headers.redirect) { if (response.headers.redirect) {
// window.location.href = response.headers.redirect // window.location.href = response.headers.redirect

View File

@ -1,8 +1,8 @@
/* /*
* @Author: hisense.wuhongjian * @Author: hisense.wuhongjian
* @Date: 2022-04-01 17:23:11 * @Date: 2022-04-01 17:23:11
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-06-29 09:54:19 * @LastEditTime: 2022-07-07 18:15:38
* @Description: 告诉大家这是什么 * @Description: 告诉大家这是什么
*/ */
/** /**
@ -20,6 +20,7 @@ import {
} from '@/config' } from '@/config'
import { setAccessToken, getAccessToken } from '@/utils/accessToken' import { setAccessToken, getAccessToken } from '@/utils/accessToken'
router.beforeEach(async (to, from, next) => { router.beforeEach(async (to, from, next) => {
//
// debugger // debugger
// const SSOTOKEN = to.query.SSOToken // const SSOTOKEN = to.query.SSOToken
// if (SSOTOKEN) { // if (SSOTOKEN) {
@ -29,11 +30,14 @@ router.beforeEach(async (to, from, next) => {
// console.log('token', token) // console.log('token', token)
let hasToken = token || store.getters['user/accessToken'] let hasToken = token || store.getters['user/accessToken']
// debugger // debugger
//
if (!loginInterception) hasToken = true if (!loginInterception) hasToken = true
// console.log('hasToken', hasToken) // console.log('hasToken', hasToken)
debugger
if (hasToken) { if (hasToken) {
setAccessToken(hasToken) setAccessToken(token)
await store.dispatch('user/getUserInfo') await store.dispatch('user/getUserInfo')
debugger
next() next()
} else { } else {
let accessRoutes = [] let accessRoutes = []
@ -44,11 +48,17 @@ router.beforeEach(async (to, from, next) => {
if (routesWhiteList.indexOf(to.path) !== -1) { if (routesWhiteList.indexOf(to.path) !== -1) {
next() next()
} else { } else {
await store.dispatch('user/getUserInfo') store.dispatch('user/getUserInfo').then((res)=>{
debugger
next()
})
// if (recordRoute) // if (recordRoute)
// next({ path: '/login', query: { redirect: to.path }, replace: true }) // next({ path: '/login', query: { redirect: to.path }, replace: true })
// else next({ path: '/login', replace: true }) // else next({ path: '/login', replace: true })
next() // debugger
// setTimeout(()=>{
// next()
// }, 500)
// window.open('http://www.baidu.com', '_self') // window.open('http://www.baidu.com', '_self')
} }
} }

View File

@ -5,13 +5,11 @@
<div class="infrastructrue-tab"> <div class="infrastructrue-tab">
<div v-for="(item, index) in tabList" :key="index" class="tabBox"> <div v-for="(item, index) in tabList" :key="index" class="tabBox">
<b class="leftType">{{ item.title }}</b> <b class="leftType">{{ item.title }}</b>
<a-button @click="nullClick" v-if="item.title == '视频标签'"> <button @click="nullClick" v-if="item.title == '视频标签'">清空</button>
清空
</a-button>
<span <span
v-for="itemContent in item.content" v-for="itemContent in item.content"
:key="itemContent" :key="itemContent"
@click="tabClick(index, itemContent, item)" @click="tabClick(index, itemContent)"
:class=" :class="
clickList[index].content.indexOf(itemContent.labelName) != -1 || clickList[index].content.indexOf(itemContent.labelName) != -1 ||
clickList[index].content.indexOf(itemContent) != -1 clickList[index].content.indexOf(itemContent) != -1
@ -117,8 +115,8 @@
</template> </template>
<script setup> <script setup>
import VideoSurveillance from '@/views/home/videoSurveillance' import VideoSurveillance from '@/views/home/videoSurveillance'
import { getCategoryTreePage } from '@/api/personalCenter' // import { getCategoryTreePage } from '@/api/personalCenter'
import { dataType } from 'element-plus/es/components/table-v2/src/common' // import { dataType } from 'element-plus/es/components/table-v2/src/common'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import { message } from 'ant-design-vue' import { message } from 'ant-design-vue'
import { ref, reactive, onMounted } from 'vue' import { ref, reactive, onMounted } from 'vue'
@ -245,7 +243,7 @@
clickList.value.push(params) clickList.value.push(params)
}) })
mybus.off('tranferToList') mybus.off('tranferToList')
mybus.on('tranferToList', (data) => { mybus.on('tranferToList', () => {
console.log('获取到的列表数据') console.log('获取到的列表数据')
}) })
} }
@ -255,7 +253,6 @@
let tableHeight = ref('600') let tableHeight = ref('600')
//tab //tab
const tabClick = (indexFather, name) => { const tabClick = (indexFather, name) => {
console.log(clickList.value, indexFather, name)
selectedRowKeys.value = [] selectedRowKeys.value = []
selectedList.value = [] selectedList.value = []
if (clickList.value[indexFather].content.indexOf(name) != -1) { if (clickList.value[indexFather].content.indexOf(name) != -1) {
@ -405,10 +402,10 @@
message.error('请选择需要申请的数据') message.error('请选择需要申请的数据')
} }
} }
// // //
const addShopCar = () => { // const addShopCar = () => {
console.log('添加至购物车') // console.log('')
} // }
const getCamera = () => { const getCamera = () => {
console.log('初始化调用') console.log('初始化调用')
getCameraByParentId(mapSearchParam.value).then((res) => { getCameraByParentId(mapSearchParam.value).then((res) => {
@ -455,7 +452,7 @@
key: 'channelId', key: 'channelId',
}, },
]) ])
const allClick = ref([]) // const allClick = ref([])
const onSelectChange = (record, selected, selectedRows, nativeEvent) => { const onSelectChange = (record, selected, selectedRows, nativeEvent) => {
console.log('hahhahah', record, selected, selectedRows, nativeEvent) console.log('hahhahah', record, selected, selectedRows, nativeEvent)
if (selected) { if (selected) {
@ -551,19 +548,6 @@
} }
.tabBox { .tabBox {
margin-bottom: 0.16rem; margin-bottom: 0.16rem;
:deep(.ant-btn:active) {
color: unset;
border-color: unset;
}
:deep(.ant-btn) {
margin-left: 10px;
border: 1px solid #666666;
color: #666666;
border-radius: 10px;
}
:deep(.ant-btn:hover) {
color: #40a9ff;
}
} }
.tabBox:last-of-type { .tabBox:last-of-type {
margin-bottom: 0; margin-bottom: 0;

View File

@ -162,7 +162,7 @@
} else { } else {
let type = paramsGetResources.type let type = paramsGetResources.type
if (type == '基础设施') { if (type == '基础设施') {
selectInfrastructureList().then((res) => { selectInfrastructureList().then((res) => {
console.log('基础设施==========>', res.data.data) console.log('基础设施==========>', res.data.data)
for (const key in res.data.data) { for (const key in res.data.data) {
jcList.value.push({ jcList.value.push({