BUG修改

This commit is contained in:
a0049873 2022-07-01 20:13:39 +08:00
parent 0cf0c4b4b8
commit b7939e4636
2 changed files with 39 additions and 20 deletions

View File

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

View File

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