应用资源详情页-应用详情判断是否是青岛

This commit is contained in:
851673013@qq.com 2022-07-18 15:19:15 +08:00
parent 8f8a1ed3ad
commit 6b9de7f3b7
3 changed files with 62 additions and 48 deletions

View File

@ -6,7 +6,7 @@
* @Description: 应用详情 * @Description: 应用详情
--> -->
<template> <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> <detals-title title="应用详情" type="PROBATION"></detals-title>
<div class="main"> <div class="main">
<div class="main-left"> <div class="main-left">
@ -35,14 +35,16 @@
import { ref, defineProps, watch } from 'vue' import { ref, defineProps, watch } from 'vue'
import { message } from 'ant-design-vue' import { message } from 'ant-design-vue'
let flag = ref(true) let flag = ref(true)
const whoShow1 = ref(whoShow)
console.log('whoShow1', whoShow1.value.itShowQingDao)
const props = defineProps({ const props = defineProps({
dataList: { type: Object, default: null }, dataList: { type: Object, default: null },
}) })
const dataFrom = ref({ const dataFrom = ref({
linkName: '访问地址', linkName: '访问地址',
link: 'http://localhost:8080/#/detailsfdddffffffffffffffdfgdfgdfdgdfgdfg', link: '',
numberName: '试用账号', numberName: '试用账号',
number: 'zhangfeihu', number: '',
passwordName: '试用密码', passwordName: '试用密码',
password: '**************************', password: '**************************',
password2: '', password2: '',
@ -52,15 +54,17 @@
if (obj !== '已申请') { if (obj !== '已申请') {
flag.value = false flag.value = false
} else { } else {
dataFrom.value.link = props.dataList.link
props.dataList.infoList.map((item) => { props.dataList.infoList.map((item) => {
if (item.attrType == '访问地址') { if (item.attrType == '试用用户名') {
dataFrom.value.link = item.attrValue
} else if (item.attrType == '试用用户名') {
dataFrom.value.number = item.attrValue dataFrom.value.number = item.attrValue
} else if (item.attrType == '试用密码') { } else if (item.attrType == '试用密码') {
dataFrom.value.password2 = item.attrValue dataFrom.value.password2 = item.attrValue
} }
}) })
if (dataFrom.value.password2 === '') {
dataFrom.value.password = ''
}
} }
} }
const clickLink = (link) => { const clickLink = (link) => {
@ -68,6 +72,7 @@
} }
// //
const copyFunction = (data, name) => { const copyFunction = (data, name) => {
if (data !== '') {
let url = data let url = data
let oInput = document.createElement('input') let oInput = document.createElement('input')
oInput.value = url oInput.value = url
@ -77,6 +82,9 @@
document.execCommand('Copy') // document.execCommand('Copy') //
oInput.remove() // oInput.remove() //
message.success(name + '成功') message.success(name + '成功')
} else {
message.error('复制为空')
}
} }
message.config({ message.config({
top: '100px', // top: '100px', //
@ -96,15 +104,17 @@
if (obj !== '已申请') { if (obj !== '已申请') {
flag.value = false flag.value = false
} else { } else {
dataFrom.value.link = props.dataList.link
props.dataList.infoList.map((item) => { props.dataList.infoList.map((item) => {
if (item.attrType == '访问地址') { if (item.attrType == '试用用户名') {
dataFrom.value.link = item.attrValue
} else if (item.attrType == '试用用户名') {
dataFrom.value.number = item.attrValue dataFrom.value.number = item.attrValue
} else if (item.attrType == '试用密码') { } else if (item.attrType == '试用密码') {
dataFrom.value.password2 = item.attrValue 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({ const props = defineProps({
dataList: { type: Object, default: null }, dataList: { type: Object, default: null },
}) })
if (props.dataList.infoList) { 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) => { props.dataList.infoList.map((item) => {
if ( if (
item.attrType === '部署区域' || item.attrType === '部署区域' ||
@ -75,14 +83,13 @@
attrValue: '是', attrValue: '是',
} }
dataFrom.value.content[1].childrenContent.push(isAndNo) 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) { if (dataFrom.value.content[1].childrenContent.length <= 0) {
let data = [ let data = [
@ -100,18 +107,25 @@
}) })
} }
} }
// //访 //访
// const addressFunction = (name, itemValue) => { const addressFunction = (name, itemValue) => {
// if (name == '访') { if (name == '访问地址') {
// window.open(itemValue) window.open(itemValue)
// } }
// } }
watch( watch(
() => props.dataList, () => props.dataList,
(val) => { (val) => {
if (val) { if (val) {
dataFrom.value.content[0].childrenContent = [] dataFrom.value.content[0].childrenContent = []
dataFrom.value.content[1].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) => { props.dataList.infoList.map((item) => {
if ( if (
item.attrType === '部署区域' || item.attrType === '部署区域' ||
@ -127,13 +141,6 @@
} }
dataFrom.value.content[1].childrenContent.push(isAndNo) 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) { if (dataFrom.value.content[1].childrenContent.length <= 0) {
debugger debugger

View File

@ -58,6 +58,7 @@
key: 'common-problem', key: 'common-problem',
}, },
]) ])
const whoShow1 = ref(whoShow)
const props = defineProps({ const props = defineProps({
selectNow: { type: String, default: '' }, selectNow: { type: String, default: '' },
dataList: { type: Object, default: null }, dataList: { type: Object, default: null },
@ -100,13 +101,11 @@
list.value.push(item.attrType) list.value.push(item.attrType)
} else if (item.attrType === '应用展示视频') { } else if (item.attrType === '应用展示视频') {
list.value.push('应用展示') 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.unshift('关联组件')
list.value.push('部署与安全') list.value.push('部署与安全')
list.value.push('归属部门与服务商') list.value.push('归属部门与服务商')
@ -146,13 +145,11 @@
list.value.push(item.attrType) list.value.push(item.attrType)
} else if (item.attrType === '应用展示视频') { } else if (item.attrType === '应用展示视频') {
list.value.push('应用展示') 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.unshift('关联组件')
list.value.push('部署与安全') list.value.push('部署与安全')
list.value.push('归属部门与服务商') list.value.push('归属部门与服务商')