业务组件和开发组件 上架开发

This commit is contained in:
a0049873 2022-06-20 16:46:33 +08:00
parent 9ca37f388c
commit f41eee2997
4 changed files with 92 additions and 99 deletions

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-06-20 09:35:51 * @Date: 2022-06-20 09:35:51
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-06-20 10:03:03 * @LastEditTime: 2022-06-20 16:44:36
* @Description: 业务组件 * @Description: 业务组件
--> -->
<template> <template>
@ -27,13 +27,20 @@
:refData="refData" :refData="refData"
:dataFrom="dataFrom" :dataFrom="dataFrom"
:videoList="videoList" :videoList="videoList"
:externalField="['算法名称', '算法描述', '共享条件', '共享类型']" :externalField="[
'组件名称',
'组件描述',
'共享条件',
'共享类型',
'部门联系人',
'部门联系人电话',
]"
></put-on-the-shelf> ></put-on-the-shelf>
<put-on-the-shelf <put-on-the-shelf
v-else-if="showView === '算法优势'" v-else-if="showView === '功能介绍'"
:refData="refData" :refData="refData"
:dataFrom="dataFrom" :dataFrom="dataFrom"
:configure="sfys" :configure="gnjs"
></put-on-the-shelf> ></put-on-the-shelf>
<put-on-the-shelf <put-on-the-shelf
v-else-if="showView === '应用场景'" v-else-if="showView === '应用场景'"
@ -46,38 +53,10 @@
:refData="refData" :refData="refData"
:dataFrom="dataFrom" :dataFrom="dataFrom"
:fileList="fileList" :fileList="fileList"
:fileList2="fileList2"
:imgList="imgList" :imgList="imgList"
:externalField="['接口服务', '接口请求方式']"
:configure="bs" :configure="bs"
></put-on-the-shelf> ></put-on-the-shelf>
<!-- <algorithm-essential-information
v-if="showView === '基本信息' && refData.name"
:refData="refData"
:dataFrom="dataFrom"
:videoList="videoList"
></algorithm-essential-information>
<algorithm-advantage
v-else-if="showView === '算法优势'"
:refData="refData"
:dataFrom="dataFrom"
></algorithm-advantage>
<algorithm-scenarios
v-else-if="showView === '应用场景'"
:refData="refData"
:dataFrom="dataFrom"
></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> -->
</div> </div>
<div class="btn" :class="showView === '基本信息' ? 'first' : ''"> <div class="btn" :class="showView === '基本信息' ? 'first' : ''">
<button v-show="showView !== '基本信息'" @click="back()">上一步</button> <button v-show="showView !== '基本信息'" @click="back()">上一步</button>
@ -90,11 +69,7 @@
</div> </div>
</template> </template>
<script setup> <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 PutOnTheShelf from '@/views/capacityOnTheShelf/components/PutOnTheShelf.vue' import PutOnTheShelf from '@/views/capacityOnTheShelf/components/PutOnTheShelf.vue'
// import AlgorithmDeploymentUse from '@/views/capacityOnTheShelf/components/AlgorithmDeploymentUse.vue'
import { ref, onBeforeUnmount } from 'vue' import { ref, onBeforeUnmount } from 'vue'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import { getCategoryTree } from '@/api/personalCenter' import { getCategoryTree } from '@/api/personalCenter'
@ -104,22 +79,28 @@
import mybus from '@/myplugins/mybus' import mybus from '@/myplugins/mybus'
const router = useRouter() const router = useRouter()
const showView = ref('基本信息') const showView = ref('基本信息')
const sfys = ref([ const gnjs = ref([
{ {
name: '算法优势', name: '功能介绍',
list: [ list: [
{ {
name: '算法优势名称', name: '功能名称',
field: 'name', field: 'name',
type: 'input', type: 'input',
note1: '', note1: '',
}, },
{ {
name: '算法优势描述', name: '功能描述',
field: 'desc', field: 'desc',
type: 'textArea', type: 'textArea',
note1: '', note1: '',
}, },
{
name: '功能图片',
field: 'img',
type: 'image',
note1: '',
},
], ],
}, },
]) ])
@ -195,6 +176,7 @@
const navList = ref([]) const navList = ref([])
const navList2 = ref([]) const navList2 = ref([])
const fileList = ref({}) const fileList = ref({})
const fileList2 = ref({})
const imgList = ref({}) const imgList = ref({})
const videoList = ref({}) const videoList = ref({})
const data = ref({}) const data = ref({})
@ -204,7 +186,7 @@
infoList: [ infoList: [
{ {
attrType: '组件类型', attrType: '组件类型',
attrValue: '智能算法', attrValue: '开发组件',
delFlag: 0, delFlag: 0,
}, },
], ],
@ -295,7 +277,7 @@
// console.clear() // console.clear()
res.data.data = res.data.data res.data.data = res.data.data
.filter((item) => item.name === '组件服务一')[0] .filter((item) => item.name === '组件服务一')[0]
.children.filter((item) => item.name === '智能算法')[0] .children.filter((item) => item.name === '业务组件')[0]
navList.value = [] navList.value = []
navList2.value = [] navList2.value = []
res.data.data.children.forEach((val) => { res.data.data.children.forEach((val) => {
@ -327,6 +309,9 @@
mybus.on('chageFileList', (obj) => { mybus.on('chageFileList', (obj) => {
fileList.value = obj fileList.value = obj
}) })
mybus.on('chageFileList2', (obj) => {
fileList2.value = obj
})
mybus.on('chageImgList', (obj) => { mybus.on('chageImgList', (obj) => {
imgList.value = obj imgList.value = obj
}) })
@ -348,11 +333,11 @@
case '共享类型': case '共享类型':
dataFrom.value.shareType = obj.attrValue dataFrom.value.shareType = obj.attrValue
break break
case '服务接口': case '部门联系人':
dataFrom.value.apiUrl = obj.attrValue dataFrom.value.deptContacts = obj.attrValue
break break
case '接口请求方式': case '部门联系人电话':
dataFrom.value.apiMethodType = obj.attrValue dataFrom.value.deptPhone = obj.attrValue
break break
} }
// console.log('dataFrom.value', dataFrom.value) // console.log('dataFrom.value', dataFrom.value)
@ -360,6 +345,7 @@
onBeforeUnmount(() => { onBeforeUnmount(() => {
mybus.off('chageDataFrom') mybus.off('chageDataFrom')
mybus.off('chageFileList') mybus.off('chageFileList')
mybus.off('chageFileList2')
mybus.off('chageImgList') mybus.off('chageImgList')
mybus.off('chageDataFromDwon') mybus.off('chageDataFromDwon')
}) })

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-06-20 09:35:17 * @Date: 2022-06-20 09:35:17
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-06-20 10:26:49 * @LastEditTime: 2022-06-20 16:43:41
* @Description: 开发组件 * @Description: 开发组件
--> -->
<template> <template>
@ -27,13 +27,20 @@
:refData="refData" :refData="refData"
:dataFrom="dataFrom" :dataFrom="dataFrom"
:videoList="videoList" :videoList="videoList"
:externalField="['算法名称', '算法描述', '共享条件', '共享类型']" :externalField="[
'组件名称',
'组件描述',
'共享条件',
'共享类型',
'部门联系人',
'部门联系人电话',
]"
></put-on-the-shelf> ></put-on-the-shelf>
<put-on-the-shelf <put-on-the-shelf
v-else-if="showView === '算法优势'" v-else-if="showView === '功能介绍'"
:refData="refData" :refData="refData"
:dataFrom="dataFrom" :dataFrom="dataFrom"
:configure="sfys" :configure="gnjs"
></put-on-the-shelf> ></put-on-the-shelf>
<put-on-the-shelf <put-on-the-shelf
v-else-if="showView === '应用场景'" v-else-if="showView === '应用场景'"
@ -46,38 +53,10 @@
:refData="refData" :refData="refData"
:dataFrom="dataFrom" :dataFrom="dataFrom"
:fileList="fileList" :fileList="fileList"
:fileList2="fileList2"
:imgList="imgList" :imgList="imgList"
:externalField="['接口服务', '接口请求方式']"
:configure="bs" :configure="bs"
></put-on-the-shelf> ></put-on-the-shelf>
<!-- <algorithm-essential-information
v-if="showView === '基本信息' && refData.name"
:refData="refData"
:dataFrom="dataFrom"
:videoList="videoList"
></algorithm-essential-information>
<algorithm-advantage
v-else-if="showView === '算法优势'"
:refData="refData"
:dataFrom="dataFrom"
></algorithm-advantage>
<algorithm-scenarios
v-else-if="showView === '应用场景'"
:refData="refData"
:dataFrom="dataFrom"
></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> -->
</div> </div>
<div class="btn" :class="showView === '基本信息' ? 'first' : ''"> <div class="btn" :class="showView === '基本信息' ? 'first' : ''">
<button v-show="showView !== '基本信息'" @click="back()">上一步</button> <button v-show="showView !== '基本信息'" @click="back()">上一步</button>
@ -90,11 +69,7 @@
</div> </div>
</template> </template>
<script setup> <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 PutOnTheShelf from '@/views/capacityOnTheShelf/components/PutOnTheShelf.vue' import PutOnTheShelf from '@/views/capacityOnTheShelf/components/PutOnTheShelf.vue'
// import AlgorithmDeploymentUse from '@/views/capacityOnTheShelf/components/AlgorithmDeploymentUse.vue'
import { ref, onBeforeUnmount } from 'vue' import { ref, onBeforeUnmount } from 'vue'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import { getCategoryTree } from '@/api/personalCenter' import { getCategoryTree } from '@/api/personalCenter'
@ -104,22 +79,28 @@
import mybus from '@/myplugins/mybus' import mybus from '@/myplugins/mybus'
const router = useRouter() const router = useRouter()
const showView = ref('基本信息') const showView = ref('基本信息')
const sfys = ref([ const gnjs = ref([
{ {
name: '算法优势', name: '功能介绍',
list: [ list: [
{ {
name: '算法优势名称', name: '功能名称',
field: 'name', field: 'name',
type: 'input', type: 'input',
note1: '', note1: '',
}, },
{ {
name: '算法优势描述', name: '功能描述',
field: 'desc', field: 'desc',
type: 'textArea', type: 'textArea',
note1: '', note1: '',
}, },
{
name: '功能图片',
field: 'img',
type: 'image',
note1: '',
},
], ],
}, },
]) ])
@ -195,6 +176,7 @@
const navList = ref([]) const navList = ref([])
const navList2 = ref([]) const navList2 = ref([])
const fileList = ref({}) const fileList = ref({})
const fileList2 = ref({})
const imgList = ref({}) const imgList = ref({})
const videoList = ref({}) const videoList = ref({})
const data = ref({}) const data = ref({})
@ -204,7 +186,7 @@
infoList: [ infoList: [
{ {
attrType: '组件类型', attrType: '组件类型',
attrValue: '智能算法', attrValue: '开发组件',
delFlag: 0, delFlag: 0,
}, },
], ],
@ -295,7 +277,7 @@
// console.clear() // console.clear()
res.data.data = res.data.data res.data.data = res.data.data
.filter((item) => item.name === '组件服务一')[0] .filter((item) => item.name === '组件服务一')[0]
.children.filter((item) => item.name === '智能算法')[0] .children.filter((item) => item.name === '开发组件')[0]
navList.value = [] navList.value = []
navList2.value = [] navList2.value = []
res.data.data.children.forEach((val) => { res.data.data.children.forEach((val) => {
@ -327,6 +309,9 @@
mybus.on('chageFileList', (obj) => { mybus.on('chageFileList', (obj) => {
fileList.value = obj fileList.value = obj
}) })
mybus.on('chageFileList2', (obj) => {
fileList2.value = obj
})
mybus.on('chageImgList', (obj) => { mybus.on('chageImgList', (obj) => {
imgList.value = obj imgList.value = obj
}) })
@ -348,11 +333,11 @@
case '共享类型': case '共享类型':
dataFrom.value.shareType = obj.attrValue dataFrom.value.shareType = obj.attrValue
break break
case '服务接口': case '部门联系人':
dataFrom.value.apiUrl = obj.attrValue dataFrom.value.deptContacts = obj.attrValue
break break
case '接口请求方式': case '部门联系人电话':
dataFrom.value.apiMethodType = obj.attrValue dataFrom.value.deptPhone = obj.attrValue
break break
} }
// console.log('dataFrom.value', dataFrom.value) // console.log('dataFrom.value', dataFrom.value)
@ -360,6 +345,7 @@
onBeforeUnmount(() => { onBeforeUnmount(() => {
mybus.off('chageDataFrom') mybus.off('chageDataFrom')
mybus.off('chageFileList') mybus.off('chageFileList')
mybus.off('chageFileList2')
mybus.off('chageImgList') mybus.off('chageImgList')
mybus.off('chageDataFromDwon') mybus.off('chageDataFromDwon')
}) })

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-06-17 14:11:08 * @Date: 2022-06-17 14:11:08
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-06-17 19:17:49 * @LastEditTime: 2022-06-20 16:40:33
* @Description: 上架 * @Description: 上架
--> -->
<template> <template>
@ -126,7 +126,7 @@
tip="支持图片类型大小不超过100M" tip="支持图片类型大小不超过100M"
></upload> ></upload>
<upload <upload
v-else-if="item.type == 'file'" v-else-if="item.type == 'file' && item.name !== '使用手册'"
type="文件" type="文件"
btnName="上传附件" btnName="上传附件"
:maxCount="1" :maxCount="1"
@ -134,6 +134,16 @@
:list="props.fileList" :list="props.fileList"
tip="支持文件类型大小不超过100M" tip="支持文件类型大小不超过100M"
></upload> ></upload>
<upload
v-else-if="item.name == '使用手册'"
type="文件"
btnName="上传附件"
:maxCount="1"
:data="item"
:busType="2"
:list="props.fileList2"
tip="支持文件类型大小不超过100M"
></upload>
<upload <upload
v-else-if="item.type == 'video'" v-else-if="item.type == 'video'"
type="视频" type="视频"
@ -196,6 +206,7 @@
dataFrom: { type: Array, default: null }, dataFrom: { type: Array, default: null },
// //
fileList: { type: Array, default: null }, fileList: { type: Array, default: null },
fileList2: { type: Array, default: null },
// //
imgList: { type: Array, default: null }, imgList: { type: Array, default: null },
// //
@ -389,7 +400,10 @@
attrValue: val.note1, attrValue: val.note1,
delFlag: 0, delFlag: 0,
}) })
} else if (props.externalField.indexOf(val.name) > -1) { } else if (
props.externalField &&
props.externalField.indexOf(val.name) > -1
) {
mybus.emit('chageDataFromDwon', { mybus.emit('chageDataFromDwon', {
attrType: val.name, attrType: val.name,
attrValue: val.note1, attrValue: val.note1,

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-06-09 15:41:19 * @Date: 2022-06-09 15:41:19
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-06-17 18:09:59 * @LastEditTime: 2022-06-20 16:38:35
* @Description: 上传组件 * @Description: 上传组件
--> -->
<template> <template>
@ -46,6 +46,7 @@
data: { type: Array, default: null }, data: { type: Array, default: null },
list: { type: Array, default: null }, list: { type: Array, default: null },
emitFlag: { type: String, default: '' }, emitFlag: { type: String, default: '' },
busType: { type: Number, default: 0 },
}) })
console.log('window.SITE_CONFIG.apiURL', window.SITE_CONFIG.apiURL) console.log('window.SITE_CONFIG.apiURL', window.SITE_CONFIG.apiURL)
const apiURL = window.SITE_CONFIG.apiURL const apiURL = window.SITE_CONFIG.apiURL
@ -107,7 +108,13 @@
mybus.emit('chageImgList', fileList.value) mybus.emit('chageImgList', fileList.value)
} }
} else if (props.type === '文件') { } else if (props.type === '文件') {
mybus.emit('chageFileList', fileList.value) console.log('busType', props.busType)
if (props.busType == 2) {
console.log('busType', props.busType)
mybus.emit('chageFileList2', fileList.value)
} else {
mybus.emit('chageFileList', fileList.value)
}
} else if (props.type === '视频') { } else if (props.type === '视频') {
mybus.emit('chageVideoList', fileList.value) mybus.emit('chageVideoList', fileList.value)
} }