Compare commits

...

2 Commits

Author SHA1 Message Date
851673013@qq.com c61611e01e Merge branch 'hi-ucs-dev' of http://15.2.21.221:3000/wuhongjian/hi-ucs into hi-ucs-dev
# Conflicts:
#	back/src/views/modules/myAgent/demo/ResourcesAndServices.vue
2022-07-13 19:07:12 +08:00
851673013@qq.com dc9d5323e6 后台审批 2022-07-13 19:03:21 +08:00
1 changed files with 166 additions and 65 deletions

View File

@ -4,16 +4,97 @@
<div v-for="(item, index) in dataView.children" :key="item">
<div class="dataTitle">{{ item.name }}</div>
<div v-for="itemson in item.children" :key="itemson.name">
<div class="dataTitleSon">{{ itemson.name }}</div>
<div class="dataContent">
<div class="dataTitleSon">
{{ itemson.name }}
</div>
<div
class="dataContent"
v-if="
itemson.name !== '算法优势' &&
itemson.name !== '应用场景' &&
itemson.name !== '功能介绍'
"
>
<el-form-item
v-for="itemsonson in itemson.children"
:key="itemsonson.name"
:label="itemsonson.name"
:label="
itemsonson.type != ' multipleAdditions' ? itemsonson.name : ''
"
>
<el-input v-model="itemsonson.note1"></el-input>
<div
class="videoAndImgCss"
v-if="
itemsonson.type === 'video' || itemsonson.type === 'image'
"
@click="videoAndImg(itemsonson.note1)"
>
浏览
</div>
<div
v-else-if="itemsonson.type === ' multipleAdditions'"
class="multipleAdditionsClass"
>
<div
v-for="multipleAdditionsItem in itemsonson.note1"
:key="multipleAdditionsItem"
>
<div>
{{
multipleAdditionsItem.question ||
multipleAdditionsItem.type ||
multipleAdditionsItem.name
}}
</div>
<div>
{{
multipleAdditionsItem.answer ||
multipleAdditionsItem.price ||
multipleAdditionsItem.img
}}
</div>
<div>{{ multipleAdditionsItem.desc }}</div>
<!-- <div>{{ multipleAdditionsItem }}</div> -->
</div>
</div>
<el-input
v-else
v-model="itemsonson.note1"
disabled="disabled"
></el-input>
</el-form-item>
</div>
<div
v-else-if="
itemson.name === '算法优势' ||
itemson.name === '应用场景' ||
itemson.name === '功能介绍'
"
>
<div
v-for="itemDataForm in dataForm.infoList"
:key="itemDataForm.attrType"
>
<div
v-if="
itemDataForm.attrType === '算法优势' ||
itemDataForm.attrType === '应用场景' ||
itemDataForm.attrType === '功能介绍'
"
class="textAndImg"
>
<div
v-for="itemDataFormValue in itemDataForm.attrValue"
:key="itemDataFormValue.name + 'value'"
style="border: 1px solid #3c9bcd;margin"
>
<div>{{ itemDataFormValue.name }}</div>
<div>{{ itemDataFormValue.desc }}</div>
<div>{{ itemDataFormValue.img }}</div>
</div>
</div>
</div>
</div>
</div>
</div>
</el-form>
@ -91,21 +172,32 @@ export default {
indexSon
].note1 = this.unit
} else if (itemSon.name.indexOf('共享条件') != -1) {
this.dataView.children[indexView].children[indexViewSon].children[
indexSon
].note1 = this.dataForm.shareCondition
this.dataView.children[indexView].children[
indexViewSon
].children[indexSon].note1 = this.dataForm.shareCondition
} else if (itemSon.name.indexOf('共享类型') != -1) {
this.dataView.children[indexView].children[indexViewSon].children[
indexSon
].note1 = this.dataForm.shareType
this.dataView.children[indexView].children[
indexViewSon
].children[indexSon].note1 = this.dataForm.shareType
} else if (itemSon.name === item.attrType) {
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(
@ -161,55 +253,27 @@ export default {
indexSon
].note1 = this.dataForm.apiMethodType
} 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)
}
}
}
})
})
// .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',
@ -222,9 +286,21 @@ export default {
},
computed: {},
methods: {
videoAndImg (link) {
if (link) {
window.open(link)
} else {
this.$message({
message: '未上传',
type: 'warning'
})
}
},
deptName () {
console.log(this.dataForm.deptId)
this.$http.get(`/sys/dept/${this.dataForm.deptId}`).then(({ data: res }) => {
this.$http
.get(`/sys/dept/${this.dataForm.deptId}`)
.then(({ data: res }) => {
console.log(res.data.name, 'res')
this.unit = res.data.name
})
@ -249,14 +325,39 @@ export default {
color: #333333;
font-size: 22px;
margin-bottom: 20px;
background: url("~@/assets/img/sj-jx.png") no-repeat;
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;