后台审批

This commit is contained in:
851673013@qq.com 2022-07-13 19:03:21 +08:00
parent 21a5d058ef
commit dc9d5323e6
1 changed files with 155 additions and 55 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>
@ -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;