Compare commits

..

2 Commits

Author SHA1 Message Date
851673013@qq.com 07d387b5a2 Merge branch 'hi-ucs-dev' of http://15.2.21.221:3000/wuhongjian/hi-ucs into hi-ucs-dev 2022-07-18 15:20:02 +08:00
851673013@qq.com 6b9de7f3b7 应用资源详情页-应用详情判断是否是青岛 2022-07-18 15:19:15 +08:00
3 changed files with 62 additions and 48 deletions

View File

@ -6,7 +6,7 @@
* @Description: 应用详情
-->
<template>
<div class="algorithm-on-trial" v-if="flag">
<div class="algorithm-on-trial" v-if="flag && whoShow1.itShowQingDao">
<detals-title title="应用详情" type="PROBATION"></detals-title>
<div class="main">
<div class="main-left">
@ -35,14 +35,16 @@
import { ref, defineProps, watch } from 'vue'
import { message } from 'ant-design-vue'
let flag = ref(true)
const whoShow1 = ref(whoShow)
console.log('whoShow1', whoShow1.value.itShowQingDao)
const props = defineProps({
dataList: { type: Object, default: null },
})
const dataFrom = ref({
linkName: '访问地址',
link: 'http://localhost:8080/#/detailsfdddffffffffffffffdfgdfgdfdgdfgdfg',
link: '',
numberName: '试用账号',
number: 'zhangfeihu',
number: '',
passwordName: '试用密码',
password: '**************************',
password2: '',
@ -52,15 +54,17 @@
if (obj !== '已申请') {
flag.value = false
} else {
dataFrom.value.link = props.dataList.link
props.dataList.infoList.map((item) => {
if (item.attrType == '访问地址') {
dataFrom.value.link = item.attrValue
} else if (item.attrType == '试用用户名') {
if (item.attrType == '试用用户名') {
dataFrom.value.number = item.attrValue
} else if (item.attrType == '试用密码') {
dataFrom.value.password2 = item.attrValue
}
})
if (dataFrom.value.password2 === '') {
dataFrom.value.password = ''
}
}
}
const clickLink = (link) => {
@ -68,6 +72,7 @@
}
//
const copyFunction = (data, name) => {
if (data !== '') {
let url = data
let oInput = document.createElement('input')
oInput.value = url
@ -77,6 +82,9 @@
document.execCommand('Copy') //
oInput.remove() //
message.success(name + '成功')
} else {
message.error('复制为空')
}
}
message.config({
top: '100px', //
@ -96,15 +104,17 @@
if (obj !== '已申请') {
flag.value = false
} else {
dataFrom.value.link = props.dataList.link
props.dataList.infoList.map((item) => {
if (item.attrType == '访问地址') {
dataFrom.value.link = item.attrValue
} else if (item.attrType == '试用用户名') {
if (item.attrType == '试用用户名') {
dataFrom.value.number = item.attrValue
} else if (item.attrType == '试用密码') {
dataFrom.value.password2 = item.attrValue
}
})
if (dataFrom.value.password2 === '') {
dataFrom.value.password = ''
}
}
}
}

View File

@ -56,11 +56,19 @@
},
],
})
const whoShow1 = ref(whoShow)
//
const props = defineProps({
dataList: { type: Object, default: null },
})
if (props.dataList.infoList) {
if (!whoShow1.value.itShowQingDao) {
let obj = {
attrType: '访问地址',
attrValue: props.dataList.link || '------',
}
dataFrom.value.content[0].childrenContent.push(obj)
}
props.dataList.infoList.map((item) => {
if (
item.attrType === '部署区域' ||
@ -75,14 +83,13 @@
attrValue: '是',
}
dataFrom.value.content[1].childrenContent.push(isAndNo)
} else if (item.attrType === '访问地址') {
let obj = {
attrType: '访问地址',
attrValue: item.attrValue || '------',
}
dataFrom.value.content[0].childrenContent.push(obj)
}
// } else if (item.attrType === '访') {
// let obj = {
// attrType: '访',
// attrValue: item.attrValue || '------',
// }
// dataFrom.value.content[0].childrenContent.push(obj)
// }
})
if (dataFrom.value.content[1].childrenContent.length <= 0) {
let data = [
@ -100,18 +107,25 @@
})
}
}
// //访
// const addressFunction = (name, itemValue) => {
// if (name == '访') {
// window.open(itemValue)
// }
// }
//访
const addressFunction = (name, itemValue) => {
if (name == '访问地址') {
window.open(itemValue)
}
}
watch(
() => props.dataList,
(val) => {
if (val) {
dataFrom.value.content[0].childrenContent = []
dataFrom.value.content[1].childrenContent = []
if (!whoShow1.value.itShowQingDao) {
let obj = {
attrType: '访问地址',
attrValue: props.dataList.link || '------',
}
dataFrom.value.content[0].childrenContent.push(obj)
}
props.dataList.infoList.map((item) => {
if (
item.attrType === '部署区域' ||
@ -127,13 +141,6 @@
}
dataFrom.value.content[1].childrenContent.push(isAndNo)
}
// } else if (item.attrType === '访') {
// let obj = {
// attrType: '访',
// attrValue: item.attrValue || '------',
// }
// dataFrom.value.content[0].childrenContent.push(obj)
// }
})
if (dataFrom.value.content[1].childrenContent.length <= 0) {
debugger

View File

@ -58,6 +58,7 @@
key: 'common-problem',
},
])
const whoShow1 = ref(whoShow)
const props = defineProps({
selectNow: { type: String, default: '' },
dataList: { type: Object, default: null },
@ -100,13 +101,11 @@
list.value.push(item.attrType)
} else if (item.attrType === '应用展示视频') {
list.value.push('应用展示')
} else if (
item.attrType === '访问地址' &&
props.dataList.applyState === '已申请'
) {
list.value.push('应用详情')
}
})
if (props.dataList.link && whoShow1.value.itShowQingDao) {
list.value.push('应用详情')
}
list.value.unshift('关联组件')
list.value.push('部署与安全')
list.value.push('归属部门与服务商')
@ -146,13 +145,11 @@
list.value.push(item.attrType)
} else if (item.attrType === '应用展示视频') {
list.value.push('应用展示')
} else if (
item.attrType === '访问地址' &&
props.dataList.applyState === '已申请'
) {
list.value.push('应用详情')
}
})
if (props.dataList.link && whoShow1.value.itShowQingDao) {
list.value.push('应用详情')
}
list.value.unshift('关联组件')
list.value.push('部署与安全')
list.value.push('归属部门与服务商')