BUG修改 应用资源 模糊判断错误

This commit is contained in:
a0049873 2022-12-02 15:09:07 +08:00
parent 1c53bba435
commit beb0455e3d
1 changed files with 197 additions and 169 deletions

View File

@ -1,8 +1,8 @@
<!-- <!--
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-06-09 09:29:29 * @Date: 2022-06-09 09:29:29
* @LastEditors: hisense.wuhongjian * @LastEditors: Light
* @LastEditTime: 2022-08-27 15:43:57 * @LastEditTime: 2022-12-02 15:08:26
* @Description: 应用详情 * @Description: 应用详情
--> -->
<template> <template>
@ -16,8 +16,14 @@
<!-- <p style="cursor: pointer; filter: blur(4px)"> <!-- <p style="cursor: pointer; filter: blur(4px)">
{{ dataFrom.link }} {{ dataFrom.link }}
</p> --> </p> -->
<p style="cursor: pointer;" <p
:class="{ 'blur-word': approveStatus == '通过' && whoShow1.itShowXiHaiAn ? false : true}"> style="cursor: pointer"
:class="{
'blur-word': !(approveStatus == '通过' && whoShow1.itShowXiHaiAn
? false
: true),
}"
>
{{ dataFrom.link }} {{ dataFrom.link }}
</p> </p>
</a-tooltip> </a-tooltip>
@ -27,10 +33,20 @@
<a-tooltip> <a-tooltip>
<template #title>请申请后查看</template> <template #title>请申请后查看</template>
<!-- <p style="filter: blur(4px)">{{ dataFrom.number }}</p> --> <!-- <p style="filter: blur(4px)">{{ dataFrom.number }}</p> -->
<p :class="{ 'blur-word': approveStatus == '通过' && whoShow1.itShowXiHaiAn ? false : true}">{{ dataFrom.number <p
}}</p> :class="{
'blur-word': !(approveStatus == '通过' && whoShow1.itShowXiHaiAn
? false
: true),
}"
>
{{ dataFrom.number }}
</p>
</a-tooltip> </a-tooltip>
<div @click="copyFunction(dataFrom.number, '复制账号')" v-if="dataFrom.number != '' && flag"> <div
@click="copyFunction(dataFrom.number, '复制账号')"
v-if="dataFrom.number != '' && flag"
>
复制账号 复制账号
</div> </div>
<!-- <div v-else id="zanwu">暂无</div> --> <!-- <div v-else id="zanwu">暂无</div> -->
@ -40,9 +56,21 @@
<a-tooltip> <a-tooltip>
<template #title>请申请后查看</template> <template #title>请申请后查看</template>
<p style="filter: blur(4px)">{{ dataFrom.password }}</p> <p style="filter: blur(4px)">{{ dataFrom.password }}</p>
<p style="filter: blur(4px)" :class="{ 'blur-word': approveStatus == '通过' && whoShow1.itShowXiHaiAn ? false : true}">{{ dataFrom.password }}</p> <p
style="filter: blur(4px)"
:class="{
'blur-word': !(approveStatus == '通过' && whoShow1.itShowXiHaiAn
? false
: true),
}"
>
{{ dataFrom.password }}
</p>
</a-tooltip> </a-tooltip>
<div @click="copyFunction(dataFrom.password2, '复制密码')" v-if="dataFrom.password2 != '' && flag"> <div
@click="copyFunction(dataFrom.password2, '复制密码')"
v-if="dataFrom.password2 != '' && flag"
>
复制密码 复制密码
</div> </div>
<!-- <div v-else id="zanwu">暂无</div> --> <!-- <div v-else id="zanwu">暂无</div> -->
@ -51,185 +79,185 @@
</div> </div>
</template> </template>
<script setup> <script setup>
import DetalsTitle from '@/views/detailsAll/components/DetalsTitle.vue' import DetalsTitle from '@/views/detailsAll/components/DetalsTitle.vue'
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) const whoShow1 = ref(whoShow)
console.log('whoShow1', whoShow1.value.itShowQingDao) 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({
linkName: '访问地址',
link: '',
numberName: '试用账号',
number: '',
passwordName: '试用密码',
password: '**************************',
password2: '',
})
console.log('props.dataList------------>', props.dataList);
const approveStatus = ref('')
if (props.dataList.infoList) {
let obj = props.dataList.approveStatus;
approveStatus.value = props.dataList.approveStatus
if (obj !== '通过' && whoShow1.value.itShowQingDao) {
flag.value = false
}
dataFrom.value.link = props.dataList.link
props.dataList.infoList.map((item) => {
if (item.attrType == '试用用户名' || item.attrType == '试用账号') {
dataFrom.value.number = item.attrValue
} else if (item.attrType == '试用密码') {
dataFrom.value.password2 = item.attrValue
}
}) })
if (dataFrom.value.password2 === '') { const dataFrom = ref({
dataFrom.value.password = '' linkName: '访问地址',
} link: '',
// } numberName: '试用账号',
} number: '',
const clickLink = (link) => { passwordName: '试用密码',
window.open(link) password: '**************************',
} password2: '',
// })
const copyFunction = (data, name) => { console.log('props.dataList------------>', props.dataList)
if (data !== '') { const approveStatus = ref('')
let url = data
let oInput = document.createElement('input') if (props.dataList.infoList) {
oInput.value = url let obj = props.dataList.approveStatus
document.body.appendChild(oInput) approveStatus.value = props.dataList.approveStatus
oInput.select() // ; if (obj !== '通过' && whoShow1.value.itShowQingDao) {
console.log(oInput.value) flag.value = false
document.execCommand('Copy') // }
oInput.remove() // dataFrom.value.link = props.dataList.link
message.success(name + '成功') props.dataList.infoList.map((item) => {
} else { if (item.attrType == '试用用户名' || item.attrType == '试用账号') {
message.error('复制为空') dataFrom.value.number = item.attrValue
} } else if (item.attrType == '试用密码') {
} dataFrom.value.password2 = item.attrValue
message.config({
top: '100px', //
})
// const success = () => {
// message.success({
// // content: 'This is a prompt message with custom className and style',
// className: 'custom-class',
// style: {},
// })
// }
watch(
() => props.dataList,
(val) => {
if (val) {
let obj = props.dataList.approveStatus
approveStatus.value = props.dataList.approveStatus
if (obj !== '通过' && whoShow1.value.itShowQingDao) {
flag.value = false
}
dataFrom.value.link = props.dataList.link
props.dataList.infoList.map((item) => {
if (item.attrType == '试用用户名' || item.attrType == '试用账号') {
dataFrom.value.number = item.attrValue
} else if (item.attrType == '试用密码') {
dataFrom.value.password2 = item.attrValue
}
})
if (dataFrom.value.password2 === '') {
dataFrom.value.password = ''
} }
})
if (dataFrom.value.password2 === '') {
dataFrom.value.password = ''
}
// }
}
const clickLink = (link) => {
window.open(link)
}
//
const copyFunction = (data, name) => {
if (data !== '') {
let url = data
let oInput = document.createElement('input')
oInput.value = url
document.body.appendChild(oInput)
oInput.select() // ;
console.log(oInput.value)
document.execCommand('Copy') //
oInput.remove() //
message.success(name + '成功')
} else {
message.error('复制为空')
} }
} }
) message.config({
top: '100px', //
})
// const success = () => {
// message.success({
// // content: 'This is a prompt message with custom className and style',
// className: 'custom-class',
// style: {},
// })
// }
watch(
() => props.dataList,
(val) => {
if (val) {
let obj = props.dataList.approveStatus
approveStatus.value = props.dataList.approveStatus
if (obj !== '通过' && whoShow1.value.itShowQingDao) {
flag.value = false
}
dataFrom.value.link = props.dataList.link
props.dataList.infoList.map((item) => {
if (item.attrType == '试用用户名' || item.attrType == '试用账号') {
dataFrom.value.number = item.attrValue
} else if (item.attrType == '试用密码') {
dataFrom.value.password2 = item.attrValue
}
})
if (dataFrom.value.password2 === '') {
dataFrom.value.password = ''
}
}
}
)
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.algorithm-on-trial { .algorithm-on-trial {
padding: 0.8rem 0px 0.8rem; padding: 0.8rem 0px 0.8rem;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center;
.main {
margin-top: 0.3rem;
width: 13rem;
height: 2.5rem;
background: url('~@/assets/detailsAll/kfzj_sybg.png') no-repeat;
display: grid;
grid-template-columns: 33.33% 33.33% 33.33%;
align-items: center; align-items: center;
.main-left { .main {
border-right: 0.01rem #ffffff solid; margin-top: 0.3rem;
padding-left: 0.7rem; width: 13rem;
padding-right: 1rem; height: 2.5rem;
background: url('~@/assets/detailsAll/kfzj_sybg.png') no-repeat;
display: grid;
grid-template-columns: 33.33% 33.33% 33.33%;
align-items: center;
&>p { .main-left {
overflow: hidden; border-right: 0.01rem #ffffff solid;
text-overflow: ellipsis; padding-left: 0.7rem;
display: -webkit-box; padding-right: 1rem;
-webkit-line-clamp: 2;
word-break: break-all; & > p {
-webkit-box-orient: vertical; overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
word-break: break-all;
-webkit-box-orient: vertical;
}
}
.main-center {
padding-left: 1rem;
padding-right: 1rem;
}
.main-right {
padding-right: 0.7rem;
}
& > div > p:first-child {
font-size: 0.26rem;
color: #ffffff;
font-weight: bold;
}
& > div > p:nth-child(2) {
font-size: 0.22rem;
color: #ffffff;
line-height: 0.34rem;
}
& > div:first-child > p:last-child {
text-decoration: underline;
word-wrap: break-word;
word-break: normal;
}
& > div > div:last-child {
height: 0.34rem;
width: 1.1rem;
border: 0.01rem solid #ffffff;
border-radius: 0.06rem;
font-size: 0.18rem;
color: #ffffff;
cursor: pointer;
text-align: center;
line-height: 0.34rem;
} }
} }
.main-center { #zanwu {
padding-left: 1rem;
padding-right: 1rem;
}
.main-right {
padding-right: 0.7rem;
}
&>div>p:first-child {
font-size: 0.26rem;
color: #ffffff;
font-weight: bold;
}
&>div>p:nth-child(2) {
font-size: 0.22rem;
color: #ffffff;
line-height: 0.34rem;
}
&>div:first-child>p:last-child {
text-decoration: underline;
word-wrap: break-word;
word-break: normal;
}
&>div>div:last-child {
height: 0.34rem; height: 0.34rem;
width: 1.1rem; width: 1.1rem;
border: 0.01rem solid #ffffff; font-size: 0.24rem;
border-radius: 0.06rem;
font-size: 0.18rem;
color: #ffffff; color: #ffffff;
cursor: pointer; border: 0;
text-align: center;
line-height: 0.34rem;
} }
} }
#zanwu { .blur-word {
height: 0.34rem; filter: blur(4px);
width: 1.1rem;
font-size: 0.24rem;
color: #ffffff;
border: 0;
} }
}
.blur-word {
filter: blur(4px);
}
</style> </style>
<style> <style>
.custom-class { .custom-class {
/* top: 100px; */ /* top: 100px; */
} }
</style> </style>