Compare commits

...

2 Commits

Author SHA1 Message Date
851673013@qq.com 351518f849 Merge branch 'hi-ucs-dev' of http://15.2.21.221:3000/wuhongjian/hi-ucs into hi-ucs-dev
# Conflicts:
#	back/src/views/modules/myAgent/demo/ability-resource-shelf.vue
2022-07-18 11:00:07 +08:00
851673013@qq.com 4a52c2cf78 审批和前台应用详情 2022-07-18 10:47:49 +08:00
7 changed files with 477 additions and 265 deletions

View File

@ -1,22 +0,0 @@
<template>
<div class="wrapper"></div>
</template>
<script>
export default {
components: {},
props: {},
data () {
return {}
},
watch: {},
computed: {},
methods: {},
created () {},
mounted () {}
}
</script>
<style lang="scss" scoped>
.wrapper {
}
</style>

View File

@ -168,20 +168,6 @@ export default {
this.dataView = val.filter( this.dataView = val.filter(
(item) => item.name === this.dataForm.type + '一' (item) => item.name === this.dataForm.type + '一'
)[0] )[0]
console.log(this.dataView)
console.log(this.dataForm)
//
// this.dataView.children[0].children[0].children[4].note1 =
// this.dataForm.description
//
// this.dataView.children[0].children[0].children[0].note1 =
// this.dataForm.name
//
this.dataView.children[2].children[1].children[0].note1 =
this.dataForm.shareCondition
//
this.dataView.children[2].children[1].children[1].note1 =
this.dataForm.shareType
this.dataForm.infoList.map((item, index) => { this.dataForm.infoList.map((item, index) => {
this.dataView.children.map((itemView, indexView) => { this.dataView.children.map((itemView, indexView) => {
// console.log('itemView', itemView) // console.log('itemView', itemView)
@ -236,6 +222,7 @@ export default {
}) })
}) })
}) })
if (item.attrType === '功能介绍') { if (item.attrType === '功能介绍') {
this.dataForm.infoList[index].attrValue = JSON.parse( this.dataForm.infoList[index].attrValue = JSON.parse(
item.attrValue item.attrValue
@ -318,7 +305,11 @@ export default {
}) })
}) })
}) })
if (item.attrType === '算法优势' || item.attrType === '应用场景') { if (
item.attrType === '算法优势' ||
item.attrType === '应用场景' ||
item.attrType === '功能介绍'
) {
this.dataForm.infoList[index].attrValue = JSON.parse( this.dataForm.infoList[index].attrValue = JSON.parse(
item.attrValue item.attrValue
) )

View File

@ -7,9 +7,6 @@
@keyup.enter.native="dataFormSubmitHandle()" @keyup.enter.native="dataFormSubmitHandle()"
:label-width="$i18n.locale === 'en-US' ? '120px' : 'auto'" :label-width="$i18n.locale === 'en-US' ? '120px' : 'auto'"
> >
<div v-if="shifoushizujian">
<Applicationresources></Applicationresources>
</div>
<div v-if="flagShow"> <div v-if="flagShow">
<ResourcesAndServices <ResourcesAndServices
:dataForm="dataForm" :dataForm="dataForm"
@ -39,21 +36,31 @@
<div class="agreeOr"> <div class="agreeOr">
<h3>审批</h3> <h3>审批</h3>
<div> <div>
<el-radio-group v-model="agreeOrList" style="width:230px;"> <el-radio-group v-model="agreeOrList" style="width: 230px">
<el-radio-button label="同意" class="blueAll">同意</el-radio-button> <el-radio-button label="同意" class="blueAll">同意</el-radio-button>
<el-radio-button label="退回" class="redAll">退回</el-radio-button> <el-radio-button label="退回" class="redAll">退回</el-radio-button>
</el-radio-group> </el-radio-group>
<el-input v-if="agreeOrList ==='同意' " v-model="inputAgree" placeholder="请输入同意意见"></el-input> <el-input
<el-input v-if="agreeOrList ==='退回'" v-model="inputNo" placeholder="请输入退回意见"></el-input> v-if="agreeOrList === '同意'"
<el-button class="inputBule" @click.native="agreeOrNot($store.state.contentTabsActiveName)">提交</el-button> v-model="inputAgree"
placeholder="请输入同意意见"
></el-input>
<el-input
v-if="agreeOrList === '退回'"
v-model="inputNo"
placeholder="请输入退回意见"
></el-input>
<el-button
class="inputBule"
@click.native="agreeOrNot($store.state.contentTabsActiveName)"
>提交</el-button
>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import processModule from '@/mixins/process-module'
import Applicationresources from './Application-resources.vue'
import ResourcesAndServices from './ResourcesAndServices.vue' import ResourcesAndServices from './ResourcesAndServices.vue'
import debounce from 'lodash/debounce' import debounce from 'lodash/debounce'
import qs from 'qs' import qs from 'qs'
@ -62,7 +69,6 @@ export default {
// //
// mixins: [processModule], // mixins: [processModule],
components: { components: {
Applicationresources,
ResourcesAndServices ResourcesAndServices
}, },
props: { props: {
@ -146,7 +152,8 @@ export default {
// } // }
}) })
}, },
agreeOrNot: debounce(function (data) { agreeOrNot: debounce(
function (data) {
console.log(data) console.log(data)
if (this.agreeOrList === '同意') { if (this.agreeOrList === '同意') {
console.log('this.dataForm.taskId', this.taskId) console.log('this.dataForm.taskId', this.taskId)
@ -155,7 +162,9 @@ export default {
comment: this.inputAgree comment: this.inputAgree
}) })
console.log(params) console.log(params)
this.$http.post('/act/task/complete?' + params).then(({ data: res }) => { this.$http
.post('/act/task/complete?' + params)
.then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
this.$message.error(res.msg) this.$message.error(res.msg)
if (this.callbacks.taskHandleErrorCallback) { if (this.callbacks.taskHandleErrorCallback) {
@ -174,14 +183,17 @@ export default {
} }
} }
}) })
}).catch(() => {}) })
.catch(() => {})
} else if (this.agreeOrList === '退回') { } else if (this.agreeOrList === '退回') {
console.log('this.dataForm.taskId', this.taskId) console.log('this.dataForm.taskId', this.taskId)
const params = qs.stringify({ const params = qs.stringify({
taskId: this.taskId, taskId: this.taskId,
comment: this.inputNo comment: this.inputNo
}) })
this.$http.post('/act/task/backToFirst?', params).then(({ data: res }) => { this.$http
.post('/act/task/backToFirst?', params)
.then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
this.$message.error(res.msg) this.$message.error(res.msg)
if (this.callbacks.taskHandleErrorCallback) { if (this.callbacks.taskHandleErrorCallback) {
@ -203,7 +215,10 @@ export default {
}) })
} }
this.tabRemoveHandle(data) this.tabRemoveHandle(data)
}, 1000, { leading: true, trailing: false }), },
1000,
{ leading: true, trailing: false }
),
tabRemoveHandle (tabName) { tabRemoveHandle (tabName) {
console.log(tabName, 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa') console.log(tabName, 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
if (tabName === 'home') { if (tabName === 'home') {
@ -231,7 +246,6 @@ export default {
} }
} }
} }
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">

View File

@ -8,77 +8,116 @@
<template> <template>
<div class="application-details" :class="{ fixed2: scrollTop >= 600 }"> <div class="application-details" :class="{ fixed2: scrollTop >= 600 }">
<!-- 头部基本信息 --> <!-- 头部基本信息 -->
<application-top-details :dataList="dataList.data"></application-top-details> <application-top-details
:dataList="dataList.data"
></application-top-details>
<!-- 导航 --> <!-- 导航 -->
<application-navigation :dataList="dataList.data" :associatedComponents="associatedComponents" <application-navigation
:class="{ fixed: scrollTop >= 600 }" :selectNow="selectNow"></application-navigation> :dataList="dataList.data"
:associatedComponents="associatedComponents"
:class="{ fixed: scrollTop >= 600 }"
:selectNow="selectNow"
></application-navigation>
<!-- 关联能力 --> <!-- 关联能力 -->
<application-associated-ability v-if="!loading" :associatedComponents="associatedComponents" <application-associated-ability
id="application-associated-ability" class="scrollBox"></application-associated-ability> v-if="!loading"
:associatedComponents="associatedComponents"
id="application-associated-ability"
class="scrollBox"
></application-associated-ability>
<!-- 应用展示 视频 --> <!-- 应用展示 视频 -->
<application-presentation :dataList="dataList.data" id="application-presentation" class="scrollBox"> <application-presentation
</application-presentation> :dataList="dataList.data"
id="application-presentation"
class="scrollBox"
></application-presentation>
<!-- 关联组件 --> <!-- 关联组件 -->
<application-associated-components :dataList="dataList.data" id="application-associated-components" <application-associated-components
class="scrollBox" v-if="false"></application-associated-components> :dataList="dataList.data"
id="application-associated-components"
class="scrollBox"
v-if="false"
></application-associated-components>
<!-- 功能介绍--> <!-- 功能介绍-->
<application-function-intorduction :dataList="dataList.data" id="function-introduction" class="scrollBox"> <application-function-intorduction
</application-function-intorduction> :dataList="dataList.data"
id="function-introduction"
class="scrollBox"
></application-function-intorduction>
<!--应用详情-->
<application-ability-trial
:dataList="dataList.data"
id="application-ability-trial"
class="scrollBox"
></application-ability-trial>
<!-- 使用能力 --> <!-- 使用能力 -->
<application-ability-toise :dataList="dataList.data" id="ability-to-use" class="scrollBox"> <application-ability-toise
</application-ability-toise> :dataList="dataList.data"
id="ability-to-use"
class="scrollBox"
></application-ability-toise>
<!-- 部署与安全--> <!-- 部署与安全-->
<application-deployment-and-security :dataList="dataList.data" id="deployment-and-security" class="scrollBox"> <application-deployment-and-security
</application-deployment-and-security> :dataList="dataList.data"
id="deployment-and-security"
class="scrollBox"
></application-deployment-and-security>
<!-- 归属部门与服务商--> <!-- 归属部门与服务商-->
<application-owning-department-and-service-provider :dataList="dataList.data" id="department-and-service-provider" <application-owning-department-and-service-provider
class="scrollBox"></application-owning-department-and-service-provider> :dataList="dataList.data"
id="department-and-service-provider"
class="scrollBox"
></application-owning-department-and-service-provider>
<!-- 常见问题--> <!-- 常见问题-->
<application-common-problem :dataList="dataList.data" id="common-problem" class="scrollBox"> <application-common-problem
</application-common-problem> :dataList="dataList.data"
id="common-problem"
class="scrollBox"
></application-common-problem>
</div> </div>
</template> </template>
<script setup> <script setup>
import ApplicationAbilityToise from '@/views/detailsAll/components/Application/ApplicationAbilityToise.vue' import ApplicationAbilityToise from '@/views/detailsAll/components/Application/ApplicationAbilityToise.vue'
import ApplicationAssociatedComponents from '@/views/detailsAll/components/Application/ApplicationAssociatedComponents.vue' import ApplicationAssociatedComponents from '@/views/detailsAll/components/Application/ApplicationAssociatedComponents.vue'
import ApplicationAssociatedAbility from '@/views/detailsAll/components/Application/ApplicationAssociatedAbility.vue' import ApplicationAssociatedAbility from '@/views/detailsAll/components/Application/ApplicationAssociatedAbility.vue'
import ApplicationOwningDepartmentAndServiceProvider from '@/views/detailsAll/components/Application/ApplicationOwningDepartmentAndServiceProvider.vue' import ApplicationOwningDepartmentAndServiceProvider from '@/views/detailsAll/components/Application/ApplicationOwningDepartmentAndServiceProvider.vue'
import ApplicationFunctionIntorduction from '@/views/detailsAll/components/Application/ApplicationFunctionIntorduction.vue' import ApplicationFunctionIntorduction from '@/views/detailsAll/components/Application/ApplicationFunctionIntorduction.vue'
import ApplicationDeploymentAndSecurity from '@/views/detailsAll/components/Application/ApplicationDeploymentAndSecurity.vue' import ApplicationDeploymentAndSecurity from '@/views/detailsAll/components/Application/ApplicationDeploymentAndSecurity.vue'
import ApplicationTopDetails from '@/views/detailsAll/components/Application/ApplicationTopDetails.vue' import ApplicationTopDetails from '@/views/detailsAll/components/Application/ApplicationTopDetails.vue'
import ApplicationNavigation from '@/views/detailsAll/components/Application/ApplicationNavigation.vue' import ApplicationNavigation from '@/views/detailsAll/components/Application/ApplicationNavigation.vue'
import ApplicationPresentation from '@/views/detailsAll/components/Application/ApplicationPresentation.vue' import ApplicationPresentation from '@/views/detailsAll/components/Application/ApplicationPresentation.vue'
import ApplicationCommonProblem from '@/views/detailsAll/components/Application/ApplicationCommonProblem' // import ApplicationAbilityTrial from '@/views/detailsAll/components/Application/ApplicationAbilityTrial.vue'
import { ref, onMounted, onBeforeUnmount, reactive } from 'vue' import ApplicationCommonProblem from '@/views/detailsAll/components/Application/ApplicationCommonProblem' //
import { useRouter } from 'vue-router' import { ref, onMounted, onBeforeUnmount, reactive } from 'vue'
import { import { useRouter } from 'vue-router'
import {
updateVisits, updateVisits,
selectOne, selectOne,
queryPartAppByKeyId, queryPartAppByKeyId,
browsingInsert, browsingInsert,
} from '@/api/home' } from '@/api/home'
import mybus from '@/myplugins/mybus' import mybus from '@/myplugins/mybus'
const associatedComponents = ref([{ type: '组件服务', dataList: [] }]) const associatedComponents = ref([{ type: '组件服务', dataList: [] }])
let loading = ref(true) let loading = ref(true)
const router = useRouter() const router = useRouter()
const scrollTop = ref(0) const scrollTop = ref(0)
const domArr = ref([]) const domArr = ref([])
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
const obj = JSON.parse(window.sessionStorage.getItem('preview')) const obj = JSON.parse(window.sessionStorage.getItem('preview'))
document.documentElement.style.transition = 'all 0.3s ease' document.documentElement.style.transition = 'all 0.3s ease'
document.documentElement.scrollTop = 0 document.documentElement.scrollTop = 0
document.body.style.transition = 'all 0.3s ease' document.body.style.transition = 'all 0.3s ease'
document.body.scrollTop = 0 document.body.scrollTop = 0
mybus.on('flyToView', (id) => { mybus.on('flyToView', (id) => {
let top = document.querySelector('#' + id).offsetTop - 50 let top = document.querySelector('#' + id).offsetTop - 50
// console.log(top, document.querySelector('#' + id).offsetTop-50) // console.log(top, document.querySelector('#' + id).offsetTop-50)
document.documentElement.scrollTop = top document.documentElement.scrollTop = top
document.body.scrollTop = top document.body.scrollTop = top
}) })
onMounted(() => { onMounted(() => {
// console.clear() // console.clear()
window.addEventListener('scroll', () => { window.addEventListener('scroll', () => {
domArr.value = document.querySelectorAll('.scrollBox') domArr.value = document.querySelectorAll('.scrollBox')
@ -103,9 +142,9 @@ onMounted(() => {
} }
} }
}) })
}) })
const init = (id) => { const init = (id) => {
if (id) { if (id) {
selectOne(id).then((res) => { selectOne(id).then((res) => {
// console.clear() // console.clear()
@ -150,8 +189,8 @@ const init = (id) => {
dataList.data = obj dataList.data = obj
console.log('预览==============', obj) console.log('预览==============', obj)
} }
} }
const associatedComponentsFunction = () => { const associatedComponentsFunction = () => {
if ( if (
associatedComponents.value[0].dataList.length > 0 || associatedComponents.value[0].dataList.length > 0 ||
associatedComponents.value[1].dataList.length > 0 || associatedComponents.value[1].dataList.length > 0 ||
@ -159,21 +198,21 @@ const associatedComponentsFunction = () => {
) { ) {
return associatedComponents.value return associatedComponents.value
} }
} }
init(id) init(id)
onBeforeUnmount(() => { onBeforeUnmount(() => {
mybus.off('flyToView') mybus.off('flyToView')
}) })
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.fixed { .fixed {
position: fixed; position: fixed;
z-index: 2000; z-index: 2000;
top: 0; top: 0;
left: 0; left: 0;
} }
.fixed2>div:nth-of-type(3) { .fixed2 > div:nth-of-type(3) {
margin-top: 0.84rem; margin-top: 0.84rem;
} }
</style> </style>

View File

@ -0,0 +1,184 @@
<!--
* @Author: hisense.liangjunhua
* @Date: 2022-06-09 09:29:29
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-06-13 15:21:26
* @Description: 应用详情
-->
<template>
<div class="algorithm-on-trial" v-if="true">
<detals-title title="应用详情" type="PROBATION"></detals-title>
<div class="main">
<div class="main-left">
<p>{{ dataFrom.linkName }}</p>
<p style="cursor: pointer" @click="clickLink(dataFrom.link)">
{{ dataFrom.link }}
</p>
</div>
<div class="main-center">
<p>{{ dataFrom.numberName }}</p>
<p>{{ dataFrom.number }}</p>
<div @click="copyFunction(dataFrom.number, '复制账号')">复制账号</div>
</div>
<div class="main-right">
<p>{{ dataFrom.passwordName }}</p>
<p>{{ dataFrom.password }}</p>
<div @click="copyFunction(dataFrom.password2, '复制密码')">
复制密码
</div>
</div>
</div>
</div>
</template>
<script setup>
import DetalsTitle from '@/views/detailsAll/components/DetalsTitle.vue'
import { ref, defineProps, watch } from 'vue'
import { message } from 'ant-design-vue'
let flag = ref(true)
const props = defineProps({
dataList: { type: Object, default: null },
})
const dataFrom = ref({
linkName: '访问地址',
link: 'http://localhost:8080/#/detailsfdddffffffffffffffdfgdfgdfdgdfgdfg',
numberName: '试用账号',
number: 'zhangfeihu',
passwordName: '试用密码',
password: '**************************',
password2: '',
})
if (props.dataList.infoList) {
// let obj = props.dataList.infoList.filter(
// (item) => item.attrType === '' && item.attrValue === ''
// )[0]
// if (obj) {
// flag.value = false
// } else {
props.dataList.infoList.map((item) => {
if (item.attrType == '访问地址') {
debugger
dataFrom.value.link = item.attrValue
} else if (item.attrType == '试用用户名') {
dataFrom.value.number = item.attrValue
} else if (item.attrType == '试用密码') {
dataFrom.value.password2 = item.attrValue
}
})
// }
}
const clickLink = (link) => {
window.open(link)
}
//
const copyFunction = (data, name) => {
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 + '成功')
}
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 = val.infoList.filter(
// (item) => item.attrType === '' && item.attrValue === ''
// )[0]
// if (!obj) {
// flag.value = false
// } else {
props.dataList.infoList.map((item) => {
if (item.attrType == '访问地址') {
dataFrom.value.link = item.attrValue
} else if (item.attrType == '试用用户名') {
dataFrom.value.number = item.attrValue
} else if (item.attrType == '试用密码') {
dataFrom.value.password2 = item.attrValue
}
})
// }
}
}
)
</script>
<style lang="less" scoped>
.algorithm-on-trial {
padding: 0.8rem 0px 0.8rem;
display: flex;
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;
.main-left {
border-right: 0.01rem #ffffff solid;
padding-left: 0.7rem;
padding-right: 1rem;
& > p {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-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;
}
}
}
</style>
<style>
.custom-class {
/* top: 100px; */
}
</style>

View File

@ -75,13 +75,14 @@
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 = [
@ -99,12 +100,12 @@
}) })
} }
} }
//访 // //访
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) => {
@ -125,13 +126,14 @@
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) {
debugger debugger

View File

@ -41,6 +41,10 @@
name: '使用能力', name: '使用能力',
key: 'ability-to-use', key: 'ability-to-use',
}, },
{
name: '应用详情',
key: 'application-ability-trial',
},
{ {
name: '部署与安全', name: '部署与安全',
key: 'deployment-and-security', key: 'deployment-and-security',