后台能力资源上架审批

This commit is contained in:
851673013@qq.com 2022-07-14 10:33:30 +08:00
parent 2532a6cc79
commit 5299e797e6
1 changed files with 138 additions and 20 deletions

View File

@ -64,33 +64,67 @@
></el-input>
</el-form-item>
</div>
<div
v-else-if="
itemson.name === '算法优势' ||
itemson.name === '应用场景' ||
itemson.name === '功能介绍'
"
>
<div v-else-if="itemson.name === '算法优势'">
<div
v-for="itemDataForm in dataForm.infoList"
:key="itemDataForm.attrType"
>
<div
v-if="
itemDataForm.attrType === '算法优势' ||
itemDataForm.attrType === '应用场景' ||
itemDataForm.attrType === '功能介绍'
"
v-if="itemDataForm.attrType === '算法优势'"
class="textAndImg"
>
<div
v-for="itemDataFormValue in itemDataForm.attrValue"
:key="itemDataFormValue.name + 'value'"
class="textAndImgSon"
style="border: 1px solid #3c9bcd;margin"
>
<div>{{ itemDataFormValue.name }}</div>
<div>{{ itemDataFormValue.desc }}</div>
<div>{{ itemDataFormValue.img }}</div>
</div>
</div>
</div>
</div>
<div v-else-if="itemson.name === '应用场景'">
<div
v-for="itemDataForm in dataForm.infoList"
:key="itemDataForm.attrType"
>
<div
v-if="itemDataForm.attrType === '应用场景'"
class="textAndImg"
>
<div
v-for="itemDataFormValue in itemDataForm.attrValue"
:key="itemDataFormValue.name + 'value'"
class="textAndImgSon"
style="border: 1px solid #3c9bcd;margin"
>
<div>{{ itemDataFormValue.name }}</div>
<div>{{ itemDataFormValue.desc }}</div>
<div @click="videoAndImg(itemDataFormValue.img)">浏览</div>
</div>
</div>
</div>
</div>
<div v-else-if="itemson.name === '功能介绍'">
<div
v-for="itemDataForm in dataForm.infoList"
:key="itemDataForm.attrType"
>
<div
v-if="itemDataForm.attrType === '功能介绍'"
class="textAndImg"
>
<div
v-for="itemDataFormValue in itemDataForm.attrValue"
:key="itemDataFormValue.name + 'value'"
class="textAndImgSon"
style="border: 1px solid #3c9bcd;margin"
>
<div>{{ itemDataFormValue.name }}</div>
<div>{{ itemDataFormValue.desc }}</div>
<div @click="videoAndImg(itemDataFormValue.img)">浏览</div>
</div>
</div>
</div>
@ -179,6 +213,15 @@ export default {
this.dataView.children[indexView].children[
indexViewSon
].children[indexSon].note1 = this.dataForm.shareType
} else if (
itemSon.name === '关联组件信息' &&
item.attrType === '关联组件信息'
) {
this.queryPartAppByKeyIdFunction(
indexView,
indexViewSon,
indexSon
)
} else if (itemSon.name === item.attrType) {
if (itemSon.type !== ' multipleAdditions') {
this.dataView.children[indexView].children[
@ -252,18 +295,24 @@ export default {
this.dataView.children[indexView].children[0].children[
indexSon
].note1 = this.dataForm.apiMethodType
} else if (
itemSon.name === '来源应用' &&
item.attrType === '来源应用'
) {
this.queryPartAppByKeyIdFunction(
indexView,
indexViewSon,
indexSon
)
} else if (itemSon.name === item.attrType) {
if (itemSon.type !== ' multipleAdditions') {
this.dataView.children[indexView].children[
indexViewSon
].children[indexSon].note1 = item.attrValue
} else if (itemSon.type === ' multipleAdditions') {
if (itemSon.name) {
} else {
this.dataView.children[indexView].children[
indexViewSon
].children[indexSon].note1 = JSON.parse(item.attrValue)
}
this.dataView.children[indexView].children[
indexViewSon
].children[indexSon].note1 = JSON.parse(item.attrValue)
}
}
})
@ -304,6 +353,44 @@ export default {
console.log(res.data.name, 'res')
this.unit = res.data.name
})
},
queryPartAppByKeyIdFunction (index, indexSon, indexSonSon) {
if (this.dataForm.type === '组件服务') {
this.$http
.get(
'/dataResourceRel/queryApp4PartByKeyId' +
'?keyId=' +
this.dataForm.id
)
.then(({ data: res }) => {
this.dataView.children[index].children[indexSon].children[
indexSonSon
].note1 = ''
res.data.map((item) => {
this.dataView.children[index].children[indexSon].children[
indexSonSon
].note1 += item.name + ';'
})
})
} else {
this.$http
.get(
'/dataResourceRel/queryPart4AppByKeyId?keyId=' +
this.dataForm.id +
'&type=' +
'组件服务'
)
.then(({ data: res }) => {
this.dataView.children[index].children[indexSon].children[
indexSonSon
].note1 = ''
res.data.map((item) => {
this.dataView.children[index].children[indexSon].children[
indexSonSon
].note1 += item.name + ';'
})
})
}
}
},
created () {},
@ -338,8 +425,12 @@ export default {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 10px;
& > div:first-child {
margin-bottom: 10px;
font-weight: bold;
line-height: 14px;
}
}
}
.videoAndImgCss {
@ -353,6 +444,33 @@ export default {
}
.textAndImg {
display: flex;
padding-left: 30px;
.textAndImgSon {
width: 212px;
height: 182px;
margin-right: 30px;
display: flex;
flex-direction: column;
align-items: center;
padding: 10px;
position: relative;
& > div:first-child {
margin-bottom: 10px;
font-weight: bold;
}
& > div:nth-child(3) {
margin-top: 10px;
position: absolute;
bottom: 30px;
cursor: pointer;
font-size: 12px;
border: 1px solid #3c9bcd;
line-height: 12px;
padding: 5px;
margin-top: 10px;
background: rgba(60, 155, 205, 0.1);
}
}
}
.dataContent {
display: grid;