diff --git a/back/src/views/modules/ability/bsabilityai.vue b/back/src/views/modules/ability/bsabilityai.vue index 661f116b..a0bb804e 100644 --- a/back/src/views/modules/ability/bsabilityai.vue +++ b/back/src/views/modules/ability/bsabilityai.vue @@ -154,9 +154,10 @@ :visible.sync="showPutOnTheShelfFlag2" :close-on-click-modal='false' :close-on-press-escape='false' + :destroy-on-close='true' :before-close='clear' width="50%"> - + 取 消 确 定 @@ -236,10 +237,6 @@ export default { this.fullScreen() }, methods: { - changeInfoList (obj) { - this.submitFrom.infoList = this.submitFrom.infoList.filter((item) => item.attrType !== obj.attrType) - this.submitFrom.infoList.push(obj) - }, reset () { this.$http .get( @@ -434,8 +431,73 @@ export default { this.putOnTheShelfList = this.insertList.children.filter(item => item.name === this.radio)[0].children console.log('radio', this.radio) }, + changeInfoList (obj) { + this.submitFrom.infoList = this.submitFrom.infoList.filter((item) => item.attrType !== obj.attrType) + this.submitFrom.infoList.push(obj) + }, submitData () { - console.log('表单数据=================>', this.submitFrom, this.putOnTheShelfList) + const arr = [] + this.putOnTheShelfList.map(item => { + item.children.map(child => { + if (child.children) { + if (child.name === '算法优势' || child.name === '应用场景' || child.name === '功能介绍') { + arr.push(child.name) + } + child.children.map(val => { + arr.push(val.name) + if (val.type === 'input' || val.type === 'textArea' || val.type === 'select' || val.type === 'checkBox' || val.type === 'radio') { + this.submitFrom.infoList = this.submitFrom.infoList.filter((item) => item.attrType !== val.name) + } + if (val.note1) { + switch (val.name) { + case '算法名称': + case '应用名称': + case '组件名称': + case '图层名称': + this.submitFrom.name = val.note1 + break + case '算法描述': + case '应用描述': + case '组件描述': + case '图层描述': + this.submitFrom.description = val.note1 + break + case '共享条件': + this.submitFrom.shareCondition = val.note1 + break + case '共享类型': + this.submitFrom.shareType = val.note1 + break + case '服务接口': + this.submitFrom.apiUrl = val.note1 + break + case '接口请求方式': + this.submitFrom.apiMethodType = val.note1 + break + case '访问地址': + this.submitFrom.link = val.note1 + break + case '部门联系人': + this.submitFrom.deptContacts = val.note1 + break + case '部门联系人电话': + this.submitFrom.deptPhone = val.note1 + break + default: + this.submitFrom.infoList.push({ + attrType: val.name, + attrValue: val.note1, + delFlag: 0 + }) + break + } + } + }) + } + }) + }) + this.submitFrom.infoList = this.submitFrom.infoList.sort((a, b) => arr.indexOf(a.attrType) - arr.indexOf(b.attrType)) + console.log('表单数据=================>', this.submitFrom, this.putOnTheShelfList, arr) } } } diff --git a/back/src/views/modules/putOnTheShelf/components/inputSelectCheckbox.vue b/back/src/views/modules/putOnTheShelf/components/inputSelectCheckbox.vue index 1c72aebe..9c8395e7 100644 --- a/back/src/views/modules/putOnTheShelf/components/inputSelectCheckbox.vue +++ b/back/src/views/modules/putOnTheShelf/components/inputSelectCheckbox.vue @@ -16,12 +16,12 @@ js: