From dc9d5323e6eb9693cdedf972c493179e0731501a Mon Sep 17 00:00:00 2001 From: "851673013@qq.com" <851673013@qq.com> Date: Wed, 13 Jul 2022 19:03:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8E=E5=8F=B0=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 | 210 +++++++++++++----- 1 file changed, 155 insertions(+), 55 deletions(-) diff --git a/back/src/views/modules/myAgent/demo/ResourcesAndServices.vue b/back/src/views/modules/myAgent/demo/ResourcesAndServices.vue index ce605fa9..4f62d1ad 100644 --- a/back/src/views/modules/myAgent/demo/ResourcesAndServices.vue +++ b/back/src/views/modules/myAgent/demo/ResourcesAndServices.vue @@ -4,16 +4,97 @@
{{ item.name }}
-
{{ itemson.name }}
-
+
+ {{ itemson.name }} +
+
- +
+ 浏览 +
+
+
+
+ {{ + multipleAdditionsItem.question || + multipleAdditionsItem.type || + multipleAdditionsItem.name + }} +
+
+ {{ + multipleAdditionsItem.answer || + multipleAdditionsItem.price || + multipleAdditionsItem.img + }} +
+
{{ multipleAdditionsItem.desc }}
+ +
+
+
+
+
+
+
+
{{ itemDataFormValue.name }}
+
{{ itemDataFormValue.desc }}
+
{{ itemDataFormValue.img }}
+
+
+
+
@@ -89,13 +170,24 @@ export default { indexSon ].note1 = this.dataForm.type } else if (itemSon.name === item.attrType) { - this.dataView.children[indexView].children[ - indexViewSon - ].children[indexSon].note1 = item.attrValue + if (itemSon.type !== ' multipleAdditions') { + this.dataView.children[indexView].children[ + indexViewSon + ].children[indexSon].note1 = item.attrValue + } else { + this.dataView.children[indexView].children[ + indexViewSon + ].children[indexSon].note1 = JSON.parse(item.attrValue) + } } }) }) }) + if (item.attrType === '功能介绍') { + this.dataForm.infoList[index].attrValue = JSON.parse( + item.attrValue + ) + } }) } else { const componentType = this.dataForm.infoList.filter( @@ -151,55 +243,27 @@ export default { indexSon ].note1 = this.dataForm.apiMethodType } else if (itemSon.name === item.attrType) { - this.dataView.children[indexView].children[ - indexViewSon - ].children[indexSon].note1 = item.attrValue + 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) + } + } } }) }) - // .children.map((itemSon, indexSon) => { - // // if (itemSon.name.indexOf('描述') != -1) { - // // debugger - // // this.dataView.children[indexView].children[0].children[ - // // itemSon.name.indexOf('描述') - // // ].note1 = this.dataForm.description - // // // } else if (itemSon.name.indexOf('名称')) { - // // // this.dataView.children[indexView].children[0].children[ - // // // indexSon - // // // ].note1 = this.dataForm.name - // // // } else if (itemSon.name.indexOf('共享条件')) { - // // // this.dataView.children[indexView].children[0].children[ - // // // indexSon - // // // ].note1 = this.dataForm.shareCondition - // // // } else if (itemSon.name.indexOf('共享方式')) { - // // // this.dataView.children[indexView].children[0].children[ - // // // indexSon - // // // ].note1 = this.dataForm.shareMode - // // // } else if (itemSon.name.indexOf('共享类型')) { - // // // this.dataView.children[indexView].children[0].children[ - // // // indexSon - // // // ].note1 = this.dataForm.shareType - // // // } else if (itemSon.name.indexOf('部门联系人')) { - // // // this.dataView.children[indexView].children[0].children[ - // // // indexSon - // // // ].note1 = this.dataForm.deptContacts - // // // } else if (itemSon.name.indexOf('属部门')) { - // // // this.dataView.children[indexView].children[0].children[ - // // // indexSon - // // // ].note1 = this.dataForm.deptId - // // // } else if (itemSon.name.indexOf('部门联系人电话')) { - // // // this.dataView.children[indexView].children[0].children[ - // // // indexSon - // // // ].note1 = this.dataForm.deptPhone - // // // } else { - // // // this.dataView.children[indexView].children[0].children[ - // // // indexSon - // // // ].note1 = item.attrValue - // // // } - // // } else if (itemSon.name === item.attrType) { - // // } - // }) }) + if (item.attrType === '算法优势' || item.attrType === '应用场景') { + this.dataForm.infoList[index].attrValue = JSON.parse( + item.attrValue + ) + } }) console.log( 'valvalvalvalvalvalvalvalvalvalval', @@ -211,7 +275,18 @@ export default { } }, computed: {}, - methods: {}, + methods: { + videoAndImg (link) { + if (link) { + window.open(link) + } else { + this.$message({ + message: '未上传', + type: 'warning' + }) + } + } + }, created () {}, mounted () {} } @@ -232,11 +307,36 @@ export default { background: url('~@/assets/img/sj-jx.png') no-repeat; background-position-x: 15px; } + .multipleAdditionsClass { + display: flex; + & > div { + margin-right: 30px; + border: 1px solid #3c9bcd; + width: 212px; + height: 182px; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + padding: 10px; + } + } + .videoAndImgCss { + cursor: pointer; + font-size: 12px; + border: 1px solid #3c9bcd; + line-height: 12px; + padding: 5px; + margin-top: 10px; + background: rgba(60, 155, 205, 0.1); + } + .textAndImg { + display: flex; + } .dataContent { display: grid; grid-template-columns: repeat(3, 33%); - } - ::v-deep .el-form { + padding-left: 30px; } ::v-deep .el-form-item__content { display: inline-block;