Merge branch 'hi-ucs-dev' of http://15.2.21.221:3000/wuhongjian/hi-ucs into hi-ucs-dev

This commit is contained in:
gaoyuanwei 2022-07-01 20:14:38 +08:00
commit d13fe453ce
2 changed files with 39 additions and 20 deletions

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-20 16:40:33 * @LastEditTime: 2022-07-01 20:11:33
* @Description: 上架 * @Description: 上架
--> -->
<template> <template>
@ -109,12 +109,18 @@
v-model:value="item.note1" v-model:value="item.note1"
:options="item.options" :options="item.options"
/> />
<p v-else-if="item.type == 'text'"> <a-input
{{ abilityToType }} v-if="item.type == 'text'"
</p> v-model:value="item.note1"
<p v-else-if="item.type == 'text2'"> :placeholder="'请输入' + item.name"
{{ componentTypeValue }} :disabled="true"
</p> />
<a-input
v-if="item.type == 'text2'"
v-model:value="item.note1"
:placeholder="'请输入' + item.name"
:disabled="true"
/>
<a-textarea <a-textarea
v-else-if="item.type == 'textArea'" v-else-if="item.type == 'textArea'"
v-model:value="item.note1" v-model:value="item.note1"
@ -271,19 +277,28 @@
// ] // ]
// }] // }]
}) })
console.log('props==========>', props) // console.log('props==========>', props)
const data = ref({ const data = ref({
list: [], list: [],
}) })
const showKey = ref(0) const showKey = ref(0)
props.refData.children.map((item) => { props.refData.children.map((item) => {
if (item.name == '基本信息') {
item.children.map((val) => {
if (val.name == '能力类型') {
val.note1 = abilityToType
}
if (val.name == '组件类型') {
val.note1 = componentTypeValue
}
})
}
if ( if (
props.configure && props.configure &&
props.configure.filter((val) => val.name === item.name).length > 0 props.configure.filter((val) => val.name === item.name).length > 0
) { ) {
item.isConfigure = true item.isConfigure = true
data.value[item.name] = [] data.value[item.name] = []
console.log('item==========>', item, data.value)
} else { } else {
item.isConfigure = false item.isConfigure = false
} }
@ -326,7 +341,7 @@
}) })
}) })
if (props.dataFrom) { if (props.dataFrom) {
console.log(props.dataFrom, data.value.list) // console.log(props.dataFrom, data.value.list)
props.dataFrom.infoList.forEach((item) => { props.dataFrom.infoList.forEach((item) => {
if ( if (
props.configure && props.configure &&
@ -340,7 +355,7 @@
// ; // ;
child.note2 = item.attrValue.split(';') child.note2 = item.attrValue.split(';')
showKey.value++ showKey.value++
console.log('应用领域', item, item.attrValue.split(';'), child) // console.log('', item, item.attrValue.split(';'), child)
} }
}) })
}) })
@ -352,7 +367,7 @@
let list = props.configure.filter((item) => item.name === title)[0].list let list = props.configure.filter((item) => item.name === title)[0].list
let flag = true let flag = true
list.forEach((item) => { list.forEach((item) => {
console.log(item) // console.log(item)
if (item.type !== 'number' && !item.note1.length > 0) { if (item.type !== 'number' && !item.note1.length > 0) {
flag = false flag = false
} else if (item.type === 'number' && !item.note1 > 0) { } else if (item.type === 'number' && !item.note1 > 0) {
@ -365,7 +380,7 @@
obj[item.field] = item.note1 obj[item.field] = item.note1
}) })
data.value[title].push(obj) data.value[title].push(obj)
console.log(data.value[title]) // console.log(data.value[title])
mybus.emit('chageDataFrom', { mybus.emit('chageDataFrom', {
attrType: title, attrType: title,
attrValue: JSON.stringify(data.value[title]), attrValue: JSON.stringify(data.value[title]),
@ -388,7 +403,7 @@
}) })
} }
const ApplicationArea = (item, itemson) => { const ApplicationArea = (item, itemson) => {
console.log(item, itemson) // console.log(item, itemson)
if (item.note2.indexOf(itemson.dictLabel) === -1) { if (item.note2.indexOf(itemson.dictLabel) === -1) {
item.note2.push(itemson.dictLabel) item.note2.push(itemson.dictLabel)
} else { } else {
@ -402,9 +417,9 @@
} }
const sourceClick = () => {} const sourceClick = () => {}
watch(data.value.list, (newProps, oldProps) => { watch(data.value.list, (newProps, oldProps) => {
console.log(newProps, oldProps) // console.log(newProps, oldProps)
newProps.forEach((val) => { newProps.forEach((val) => {
console.log('数据发生改变==========>', val) // console.log('==========>', val)
if ( if (
props.configure && props.configure &&
props.configure.filter((item) => item.name === val.name).length > 0 props.configure.filter((item) => item.name === val.name).length > 0

View File

@ -39,16 +39,20 @@
? 'yyzy' ? 'yyzy'
: item.type == '数据资源' : item.type == '数据资源'
? 'sjzy' ? 'sjzy'
: item.infoList.filter((val) => val.attrType == '组件类型')[0] : item.infoList &&
item.infoList.filter((val) => val.attrType == '组件类型')[0]
.attrValue == '智能算法' .attrValue == '智能算法'
? 'znsf' ? 'znsf'
: item.infoList.filter((val) => val.attrType == '组件类型')[0] : item.infoList &&
item.infoList.filter((val) => val.attrType == '组件类型')[0]
.attrValue == '图层服务' .attrValue == '图层服务'
? 'tcfw' ? 'tcfw'
: item.infoList.filter((val) => val.attrType == '组件类型')[0] : item.infoList &&
item.infoList.filter((val) => val.attrType == '组件类型')[0]
.attrValue == '开发组件' .attrValue == '开发组件'
? 'kfzj' ? 'kfzj'
: item.infoList.filter((val) => val.attrType == '组件类型')[0] : item.infoList &&
item.infoList.filter((val) => val.attrType == '组件类型')[0]
.attrValue == '业务组件' .attrValue == '业务组件'
? 'ywzj' ? 'ywzj'
: '' : ''