bug修复

This commit is contained in:
wuhongjian 2022-06-30 19:04:35 +08:00
parent 5d1c2d51ee
commit 8fcdff051b
4 changed files with 51 additions and 24 deletions

View File

@ -2,7 +2,7 @@
* @Author: hisense.wuhongjian * @Author: hisense.wuhongjian
* @Date: 2022-03-29 16:45:25 * @Date: 2022-03-29 16:45:25
* @LastEditors: hisense.wuhongjian * @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-06-29 19:38:31 * @LastEditTime: 2022-06-30 15:30:25
* @Description: 告诉大家这是什么 * @Description: 告诉大家这是什么
--> -->
<!DOCTYPE html> <!DOCTYPE html>
@ -47,7 +47,7 @@
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.239:8888/renren-admin';
window.SITE_CONFIG['POI_URL'] = 'http://15.2.21.238:8090/iserver/services/addressmatch-qingdaoPOI181015/restjsr/v1/address'; window.SITE_CONFIG['POI_URL'] = 'http://15.2.21.238: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,8 +1,8 @@
<!-- <!--
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-06-08 11:32:22 * @Date: 2022-06-08 11:32:22
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-06-20 18:58:46 * @LastEditTime: 2022-06-30 17:06:56
* @Description: 算法详情页 * @Description: 算法详情页
--> -->
<template> <template>
@ -23,6 +23,7 @@
></algorithm-display> ></algorithm-display>
<!-- 关联能力 --> <!-- 关联能力 -->
<algorithm-associated-ability <algorithm-associated-ability
v-if="!loading"
:associatedComponents="associatedComponents" :associatedComponents="associatedComponents"
id="algorithm-associated-ability" id="algorithm-associated-ability"
class="scrollBox" class="scrollBox"
@ -93,6 +94,7 @@
const router = useRouter() const router = useRouter()
const scrollTop = ref(0) const scrollTop = ref(0)
const domArr = ref([]) const domArr = ref([])
const loading = ref(true)
const selectNow = ref('') const selectNow = ref('')
const dataList = reactive({ data: {} }) const dataList = reactive({ data: {} })
const id = router.currentRoute.value.query.id const id = router.currentRoute.value.query.id
@ -162,6 +164,7 @@
} }
queryPartAppByKeyId2(queryPartAppByKeyIdParams).then((res) => { queryPartAppByKeyId2(queryPartAppByKeyIdParams).then((res) => {
associatedComponents.value[index].dataList = res.data.data associatedComponents.value[index].dataList = res.data.data
loading.value = false
}) })
}) })
} else if (obj) { } else if (obj) {

View File

@ -1,6 +1,6 @@
<template> <template>
<div class="application-associated-ability" v-if="flag"> <div class="application-associated-ability" v-if="flag">
<detals-title title="关联能力" type="RELEVANCE"></detals-title> <detals-title title="关联应用" type="ASSOCIATED"></detals-title>
<div class="application-associated-ability-main"> <div class="application-associated-ability-main">
<div <div
class="associated-ability-card" class="associated-ability-card"
@ -34,14 +34,18 @@
const oldid = router.currentRoute.value.query.id const oldid = router.currentRoute.value.query.id
// //
const switchFunction = (id) => { const switchFunction = (id) => {
router.push({ // router.push({
path: '/details', // path: '/details',
query: { // query: {
id: id, // id: id,
}, // },
}) // })
window.open(window.SITE_CONFIG.previewUrl+ '#/details?id=' + id)
// alert(id)
} }
if (props.associatedComponents) { console.log('这个是空值', props.associatedComponents[0])
if (props.associatedComponents[0].dataList.length > 0) {
console.log('这个是空值', props.associatedComponents)
flag.value = true flag.value = true
dataFrom.value = props.associatedComponents dataFrom.value = props.associatedComponents
console.log('dataFrom.value', dataFrom.value) console.log('dataFrom.value', dataFrom.value)
@ -82,7 +86,7 @@
margin-top: 0.4rem; margin-top: 0.4rem;
width: 13.3rem; width: 13.3rem;
display: flex; display: flex;
justify-content: space-between; justify-content: space-around;
.associated-ability-card { .associated-ability-card {
width: 3.2rem; width: 3.2rem;
display: flex; display: flex;
@ -106,6 +110,7 @@
color: #999; color: #999;
margin-right: 0.15rem; margin-right: 0.15rem;
margin-top: 0.15rem; margin-top: 0.15rem;
text-align: center;
} }
} }
} }

View File

@ -1,8 +1,8 @@
<!-- <!--
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-06-08 14:54:01 * @Date: 2022-06-08 14:54:01
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-06-15 18:32:23 * @LastEditTime: 2022-06-30 17:09:40
* @Description: 算法详情页导航 * @Description: 算法详情页导航
--> -->
<template> <template>
@ -21,8 +21,14 @@
</div> </div>
</template> </template>
<script setup> <script setup>
import { ref, defineProps, watch } from 'vue' import { ref, defineProps, watch, getCurrentInstance } from 'vue'
import { useRouter } from 'vue-router'
import mybus from '@/myplugins/mybus' import mybus from '@/myplugins/mybus'
import { queryPartAppByKeyId2 } from '@/api/home'
//
const router = useRouter();
const keyId = router.currentRoute.value.query.id;
console.log('123', keyId)
const navList = ref([ const navList = ref([
{ {
name: '算法展示', name: '算法展示',
@ -32,10 +38,6 @@
name: '算法优势', name: '算法优势',
key: 'algorithm-advantage', key: 'algorithm-advantage',
}, },
{
name: '关联能力',
key: 'algorithm-associated-ability',
},
{ {
name: '应用场景', name: '应用场景',
key: 'application-scenarios', key: 'application-scenarios',
@ -61,12 +63,30 @@
key: 'common-problem', key: 'common-problem',
}, },
]) ])
const list = ref([])
// id
queryPartAppByKeyId2({keyId: keyId}).then(
res=>{
console.log('ressssssss', res)
if (res.data.data.length > 0) {
//
navList.value.unshift({
name: '关联应用',
key: 'algorithm-associated-ability',
show: true
})
// list.value.push('')
console.log('navList', navList)
}
})
const props = defineProps({ const props = defineProps({
selectNow: { type: String, default: '' }, selectNow: { type: String, default: '' },
dataList: { type: Object, default: null }, dataList: { type: Object, default: null },
}) }
)
const select = ref('algorithm-display') const select = ref('algorithm-display')
const list = ref([])
const selectNav = (key) => { const selectNav = (key) => {
select.value = key select.value = key
mybus.emit('flyToView', select.value) mybus.emit('flyToView', select.value)
@ -91,7 +111,6 @@
list.value.push('使用方式') list.value.push('使用方式')
} }
}) })
list.value.push('关联能力')
navList.value.forEach((item) => { navList.value.forEach((item) => {
console.log(item) console.log(item)
if (list.value.indexOf(item.name) > -1) { if (list.value.indexOf(item.name) > -1) {
@ -136,7 +155,7 @@
list.value.push('使用方式') list.value.push('使用方式')
} }
}) })
list.value.push('关联能力') list.value.push('关联应用')
navList.value.forEach((item) => { navList.value.forEach((item) => {
console.log(item) console.log(item)
if (list.value.indexOf(item.name) > -1) { if (list.value.indexOf(item.name) > -1) {