能力上架整合

This commit is contained in:
a0049873 2022-06-20 11:43:46 +08:00
parent 98a17a8dd3
commit 17721d0c42
6 changed files with 278 additions and 33 deletions

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua
* @Date: 2022-06-13 10:22:27
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-06-14 11:06:06
* @LastEditTime: 2022-06-20 09:59:01
* @Description: 算法上架
-->
<template>
@ -22,7 +22,35 @@
</div>
</div>
<div class="vue-box">
<algorithm-essential-information
<put-on-the-shelf
v-if="showView === '基本信息' && refData.name"
:refData="refData"
:dataFrom="dataFrom"
:videoList="videoList"
:externalField="['算法名称', '算法描述', '共享条件', '共享类型']"
></put-on-the-shelf>
<put-on-the-shelf
v-else-if="showView === '算法优势'"
:refData="refData"
:dataFrom="dataFrom"
:configure="sfys"
></put-on-the-shelf>
<put-on-the-shelf
v-else-if="showView === '应用场景'"
:refData="refData"
:dataFrom="dataFrom"
:configure="yycj"
></put-on-the-shelf>
<put-on-the-shelf
v-else-if="showView === '部署与使用'"
:refData="refData"
:dataFrom="dataFrom"
:fileList="fileList"
:imgList="imgList"
:externalField="['接口服务', '接口请求方式']"
:configure="bs"
></put-on-the-shelf>
<!-- <algorithm-essential-information
v-if="showView === '基本信息' && refData.name"
:refData="refData"
:dataFrom="dataFrom"
@ -37,14 +65,19 @@
v-else-if="showView === '应用场景'"
:refData="refData"
:dataFrom="dataFrom"
></algorithm-scenarios>
<algorithm-deployment-use
></algorithm-scenarios> -->
<!-- <algorithm-scenarios
v-else-if="showView === '应用场景'"
:refData="refData"
:dataFrom="dataFrom"
></algorithm-scenarios> -->
<!-- <algorithm-deployment-use
v-else-if="showView === '部署与使用'"
:refData="refData"
:dataFrom="dataFrom"
:fileList="fileList"
:imgList="imgList"
></algorithm-deployment-use>
></algorithm-deployment-use> -->
</div>
<div class="btn" :class="showView === '基本信息' ? 'first' : ''">
<button v-show="showView !== '基本信息'" @click="back()">上一步</button>
@ -57,10 +90,11 @@
</div>
</template>
<script setup>
import AlgorithmEssentialInformation from '@/views/capacityOnTheShelf/components/AlgorithmEssentialInformation.vue'
import AlgorithmAdvantage from '@/views/capacityOnTheShelf/components/AlgorithmAdvantage.vue'
import AlgorithmScenarios from '@/views/capacityOnTheShelf/components/AlgorithmScenarios.vue'
import AlgorithmDeploymentUse from '@/views/capacityOnTheShelf/components/AlgorithmDeploymentUse.vue'
// import AlgorithmEssentialInformation from '@/views/capacityOnTheShelf/components/AlgorithmEssentialInformation.vue'
// import AlgorithmAdvantage from '@/views/capacityOnTheShelf/components/AlgorithmAdvantage.vue'
// import AlgorithmScenarios from '@/views/capacityOnTheShelf/components/AlgorithmScenarios.vue'
import PutOnTheShelf from '@/views/capacityOnTheShelf/components/PutOnTheShelf.vue'
// import AlgorithmDeploymentUse from '@/views/capacityOnTheShelf/components/AlgorithmDeploymentUse.vue'
import { ref, onBeforeUnmount } from 'vue'
import { useRouter } from 'vue-router'
import { getCategoryTree } from '@/api/personalCenter'
@ -70,6 +104,94 @@
import mybus from '@/myplugins/mybus'
const router = useRouter()
const showView = ref('基本信息')
const sfys = ref([
{
name: '算法优势',
list: [
{
name: '算法优势名称',
field: 'name',
type: 'input',
note1: '',
},
{
name: '算法优势描述',
field: 'desc',
type: 'textArea',
note1: '',
},
],
},
])
const yycj = ref([
{
name: '应用场景',
list: [
{
name: '应用场景名称',
field: 'name',
type: 'input',
note1: '',
},
{
name: '应用场景描述',
field: 'desc',
type: 'textArea',
note1: '',
},
{
name: '应用场景图片',
field: 'img',
type: 'image',
note1: '',
},
],
},
])
const bs = ref([
{
name: '计费标准信息',
list: [
{
name: '计费方式',
field: 'type',
type: 'radio',
options: ['一次性买断', '按调用次数', '按并发路数', '按年计费'],
note1: '',
},
{
name: '计费标准',
field: 'price',
type: 'number',
company: '元',
note1: '',
},
{
name: '计费标准描述',
field: 'desc',
type: 'textArea',
note1: '',
},
],
},
{
name: '常见问题',
list: [
{
name: '问题',
field: 'question',
type: 'textArea',
note1: '',
},
{
name: '答复',
field: 'answer',
type: 'textArea',
note1: '',
},
],
},
])
const navList = ref([])
const navList2 = ref([])
const fileList = ref({})
@ -79,7 +201,13 @@
const refData = ref({})
const submitFlag = ref(true)
const dataFrom = ref({
infoList: [],
infoList: [
{
attrType: '组件类型',
attrValue: '智能算法',
delFlag: 0,
},
],
delFlag: 0,
type: '组件服务',
deptId: '',
@ -187,7 +315,6 @@
}
init()
mybus.on('chageDataFrom', (obj) => {
console.log(obj, dataFrom.value.infoList)
dataFrom.value.infoList = dataFrom.value.infoList.filter(
(item) => item.attrType !== obj.attrType
)
@ -195,6 +322,7 @@
obj.attrValue = ''
}
dataFrom.value.infoList.push(obj)
console.log('数据变更=================》', obj, dataFrom.value.infoList)
})
mybus.on('chageFileList', (obj) => {
fileList.value = obj
@ -208,10 +336,10 @@
//datafrom
mybus.on('chageDataFromDwon', (obj) => {
switch (obj.attrType) {
case '名称':
case '算法名称':
dataFrom.value.name = obj.attrValue
break
case '描述':
case '算法描述':
dataFrom.value.description = obj.attrValue
break
case '共享条件':

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua
* @Date: 2022-06-13 10:22:27
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-06-15 17:55:02
* @LastEditTime: 2022-06-17 19:31:27
* @Description: 应用上架
-->
<template>
@ -22,7 +22,34 @@
</div>
</div>
<div class="vue-box">
<application-essential-information
<put-on-the-shelf
v-if="showView === '基本信息' && refData.name"
:refData="refData"
:dataFrom="dataFrom"
:videoList="videoList"
:imgList="imgList"
:externalField="['应用名称', '应用描述']"
></put-on-the-shelf>
<put-on-the-shelf
v-else-if="showView === '功能介绍'"
:refData="refData"
:dataFrom="dataFrom"
:configure="gnjs"
></put-on-the-shelf>
<put-on-the-shelf
v-else-if="showView === '关联组件'"
:refData="refData"
:dataFrom="dataFrom"
:configure="glzj"
></put-on-the-shelf>
<put-on-the-shelf
v-else-if="showView === '部署与应用'"
:refData="refData"
:dataFrom="dataFrom"
:externalField="['共享条件', '共享类型']"
:configure="bs"
></put-on-the-shelf>
<!-- <application-essential-information
v-if="showView === '基本信息' && refData.name"
:refData="refData"
:dataFrom="dataFrom"
@ -45,7 +72,7 @@
:dataFrom="dataFrom"
:fileList="fileList"
:imgList="imgList"
></application-deployment-use>
></application-deployment-use> -->
</div>
<div class="btn" :class="showView === '基本信息' ? 'first' : ''">
<button v-show="showView !== '基本信息'" @click="back()">上一步</button>
@ -58,10 +85,11 @@
</div>
</template>
<script setup>
import ApplicationEssentialInformation from '@/views/capacityOnTheShelf/components/ApplicationEssentialInformation.vue'
import ApplicationFunctionIntroduction from '@/views/capacityOnTheShelf/components/ApplicationFunctionIntroduction.vue'
import ApplicationAssociatedComponents from '@/views/capacityOnTheShelf/components/ApplicationAssociatedComponents.vue'
import ApplicationDeploymentUse from '@/views/capacityOnTheShelf/components/ApplicationDeploymentUse.vue'
// import ApplicationEssentialInformation from '@/views/capacityOnTheShelf/components/ApplicationEssentialInformation.vue'
// import ApplicationFunctionIntroduction from '@/views/capacityOnTheShelf/components/ApplicationFunctionIntroduction.vue'
// import ApplicationAssociatedComponents from '@/views/capacityOnTheShelf/components/ApplicationAssociatedComponents.vue'
// import ApplicationDeploymentUse from '@/views/capacityOnTheShelf/components/ApplicationDeploymentUse.vue'
import PutOnTheShelf from '@/views/capacityOnTheShelf/components/PutOnTheShelf.vue'
import { ref, onBeforeUnmount } from 'vue'
import { useRouter } from 'vue-router'
import { getCategoryTree } from '@/api/personalCenter'
@ -85,6 +113,75 @@
type: '应用资源',
deptId: '',
})
const gnjs = ref([
{
name: '功能介绍',
list: [
{
name: '功能名称',
field: 'name',
type: 'input',
note1: '',
},
{
name: '功能描述',
field: 'desc',
type: 'textArea',
note1: '',
},
{
name: '功能图片',
field: 'img',
type: 'image',
note1: '',
},
],
},
])
const glzj = ref([
{
name: '关联组件',
list: [
{
name: '关联组件名称',
field: 'name',
type: 'input',
note1: '',
},
{
name: '关联组件描述',
field: 'desc',
type: 'textArea',
note1: '',
},
{
name: '关联组件地址',
field: 'url',
type: 'input',
note1: '',
},
],
},
])
const bs = ref([
{
name: '常见问题',
list: [
{
name: '问题',
field: 'question',
type: 'textArea',
note1: '',
},
{
name: '答复',
field: 'answer',
type: 'textArea',
note1: '',
},
],
},
])
getUser().then((res) => {
dataFrom.value.deptId = res.data.data.deptId
})
@ -209,10 +306,10 @@
//datafrom
mybus.on('chageDataFromDwon', (obj) => {
switch (obj.attrType) {
case '名称':
case '应用名称':
dataFrom.value.name = obj.attrValue
break
case '描述':
case '应用描述':
dataFrom.value.description = obj.attrValue
break
case '共享条件':

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua
* @Date: 2022-06-09 15:41:19
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-06-17 11:15:33
* @LastEditTime: 2022-06-17 18:09:59
* @Description: 上传组件
-->
<template>
@ -50,7 +50,7 @@
console.log('window.SITE_CONFIG.apiURL', window.SITE_CONFIG.apiURL)
const apiURL = window.SITE_CONFIG.apiURL
const fileList = ref([])
if (props.list.length > 0) {
if (props.list && props.list.length > 0) {
fileList.value = JSON.parse(JSON.stringify(props.list))
}
const beforeUpload = (file) => {

View File

@ -170,14 +170,18 @@
if (!componentTypeValue.value || componentTypeValue.value == '') {
message.error('请选择组件类型!')
return
} else if (componentTypeValue.value !== '智能算法') {
message.error('功能开发中!')
return
} else {
} else if (
componentTypeValue.value === '智能算法' ||
componentTypeValue.value === '开发组件' ||
componentTypeValue.value === '业务组件'
) {
snum.value = {
abilityToType: abilityToTypeFunctionData.value,
componentTypeValue: componentTypeValue.value,
}
} else {
message.error('功能开发中!')
return
}
} else {
snum.value = {

View File

@ -284,14 +284,18 @@
if (!componentTypeValue.value || componentTypeValue.value == '') {
message.error('请选择组件类型!')
return
} else if (componentTypeValue.value !== '智能算法') {
message.error('功能开发中!')
return
} else {
} else if (
componentTypeValue.value === '智能算法' ||
componentTypeValue.value === '开发组件' ||
componentTypeValue.value === '业务组件'
) {
snum.value = {
abilityToType: abilityToTypeFunctionData.value,
componentTypeValue: componentTypeValue.value,
}
} else {
message.error('功能开发中!')
return
}
} else {
snum.value = {

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua
* @Date: 2022-06-01 17:49:38
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-06-14 11:30:30
* @LastEditTime: 2022-06-20 10:09:12
* @Description: 能力上架
-->
<template>
@ -10,12 +10,20 @@
<home-header></home-header>
<algorithm v-if="type === 'algorithm'"></algorithm>
<application v-else-if="type === 'application'"></application>
<development-components
v-else-if="type === 'development-components'"
></development-components>
<business-component
v-else-if="type === 'business-component'"
></business-component>
</div>
</template>
<script setup>
import HomeHeader from '@/views/home/components/header'
import Algorithm from '@/views/capacityOnTheShelf/Algorithm'
import Application from '@/views/capacityOnTheShelf/Application'
import DevelopmentComponents from '@/views/capacityOnTheShelf/DevelopmentComponents'
import BusinessComponent from '@/views/capacityOnTheShelf/BusinessComponent'
import { useRouter } from 'vue-router'
import { ref } from 'vue'
const router = useRouter()
@ -28,6 +36,10 @@
router.currentRoute.value.query.componentTypeValue
if (componentTypeValue === '智能算法') {
type.value = 'algorithm'
} else if (componentTypeValue === '开发组件') {
type.value = 'development-components'
} else if (componentTypeValue === '业务组件') {
type.value = 'business-component'
}
}
window.sessionStorage.setItem('preview', JSON.stringify({}))