From 5299e797e651a6173b737611b0b8c1a7156b6978 Mon Sep 17 00:00:00 2001 From: "851673013@qq.com" <851673013@qq.com> Date: Thu, 14 Jul 2022 10:33:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8E=E5=8F=B0=E8=83=BD=E5=8A=9B=E8=B5=84?= =?UTF-8?q?=E6=BA=90=E4=B8=8A=E6=9E=B6=E5=AE=A1=E6=89=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../myAgent/demo/ResourcesAndServices.vue | 158 +++++++++++++++--- 1 file changed, 138 insertions(+), 20 deletions(-) diff --git a/back/src/views/modules/myAgent/demo/ResourcesAndServices.vue b/back/src/views/modules/myAgent/demo/ResourcesAndServices.vue index e0ee50c0..2b46e2d3 100644 --- a/back/src/views/modules/myAgent/demo/ResourcesAndServices.vue +++ b/back/src/views/modules/myAgent/demo/ResourcesAndServices.vue @@ -64,33 +64,67 @@ > -
+
{{ itemDataFormValue.name }}
{{ itemDataFormValue.desc }}
-
{{ itemDataFormValue.img }}
+
+
+
+
+
+
+
+
+
{{ itemDataFormValue.name }}
+
{{ itemDataFormValue.desc }}
+
浏览
+
+
+
+
+
+
+
+
+
{{ itemDataFormValue.name }}
+
{{ itemDataFormValue.desc }}
+
浏览
@@ -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;