BUG修改
This commit is contained in:
parent
3acee93e23
commit
e8b741077e
|
@ -510,45 +510,45 @@ export default {
|
|||
})
|
||||
})
|
||||
this.submitFrom.infoList = this.submitFrom.infoList.sort((a, b) => arr.indexOf(a.attrType) - arr.indexOf(b.attrType))
|
||||
// if (this.submitFrom.id) {
|
||||
// // 解决编辑无组件类型
|
||||
// this.submitFrom.infoList.map(val => {
|
||||
// if (val.attrType === '组件类型') {
|
||||
// val.attrValue = this.radio
|
||||
// }
|
||||
// })
|
||||
// console.log('编辑===============>', this.submitFrom)
|
||||
// console.log(this.submitFrom.infoList, '===============abc')
|
||||
// // 去重
|
||||
// const newArr = this.submitFrom.infoList.filter((element, index, self) => {
|
||||
// return self.findIndex(x => x.attrType === element.attrType) === index
|
||||
// })
|
||||
// this.submitFrom.infoList = newArr
|
||||
// console.log(this.submitFrom.infoList, '====================================wpwpwp')
|
||||
// this.$http
|
||||
// .put('/resource/update', this.submitFrom)
|
||||
// .then(({ data: res }) => {
|
||||
// if (res.code !== 0) {
|
||||
// this.$message.error('修改失败!')
|
||||
// } else {
|
||||
// this.$message.success('修改成功!')
|
||||
// this.clear()
|
||||
// }
|
||||
// })
|
||||
// .catch(() => {})
|
||||
// } else {
|
||||
// this.$http
|
||||
// .post('/resource/insert?source= b', this.submitFrom)
|
||||
// .then(({ data: res }) => {
|
||||
// if (res.code !== 0) {
|
||||
// this.$message.error('上架失败!')
|
||||
// } else {
|
||||
// this.$message.success('上架成功!')
|
||||
// this.clear()
|
||||
// }
|
||||
// })
|
||||
// .catch(() => {})
|
||||
// }
|
||||
if (this.submitFrom.id) {
|
||||
// 解决编辑无组件类型
|
||||
this.submitFrom.infoList.map(val => {
|
||||
if (val.attrType === '组件类型') {
|
||||
val.attrValue = this.radio
|
||||
}
|
||||
})
|
||||
console.log('编辑===============>', this.submitFrom)
|
||||
console.log(this.submitFrom.infoList, '===============abc')
|
||||
// 去重
|
||||
const newArr = this.submitFrom.infoList.filter((element, index, self) => {
|
||||
return self.findIndex(x => x.attrType === element.attrType) === index
|
||||
})
|
||||
this.submitFrom.infoList = newArr
|
||||
console.log(this.submitFrom.infoList, '====================================wpwpwp')
|
||||
this.$http
|
||||
.put('/resource/update', this.submitFrom)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
this.$message.error('修改失败!')
|
||||
} else {
|
||||
this.$message.success('修改成功!')
|
||||
this.clear()
|
||||
}
|
||||
})
|
||||
.catch(() => {})
|
||||
} else {
|
||||
this.$http
|
||||
.post('/resource/insert?source= b', this.submitFrom)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
this.$message.error('上架失败!')
|
||||
} else {
|
||||
this.$message.success('上架成功!')
|
||||
this.clear()
|
||||
}
|
||||
})
|
||||
.catch(() => {})
|
||||
}
|
||||
},
|
||||
// 新修改
|
||||
UpdateData (item) {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* @Author: hisense.liangjunhua
|
||||
* @Date: 2022-06-13 10:22:27
|
||||
* @LastEditors: hisense.liangjunhua
|
||||
* @LastEditTime: 2022-07-15 11:50:22
|
||||
* @LastEditTime: 2022-07-15 16:13:40
|
||||
* @Description: 算法上架
|
||||
-->
|
||||
<template>
|
||||
|
@ -31,12 +31,14 @@
|
|||
></put-on-the-shelf>
|
||||
<put-on-the-shelf
|
||||
v-else-if="showView === '算法优势'"
|
||||
ref="sfys"
|
||||
:refData="refData"
|
||||
:dataFrom="dataFrom"
|
||||
:configure="sfys"
|
||||
></put-on-the-shelf>
|
||||
<put-on-the-shelf
|
||||
v-else-if="showView === '应用场景'"
|
||||
ref="yycj"
|
||||
:refData="refData"
|
||||
:dataFrom="dataFrom"
|
||||
:configure="yycj"
|
||||
|
@ -80,6 +82,7 @@
|
|||
></algorithm-deployment-use> -->
|
||||
</div>
|
||||
<div class="btn" :class="showView === '基本信息' ? 'first' : ''">
|
||||
<button @click="close()">取消</button>
|
||||
<button v-show="showView !== '基本信息'" @click="back()">上一步</button>
|
||||
<button v-show="showView === '部署与使用'" @click="preview()">
|
||||
预览
|
||||
|
@ -216,6 +219,9 @@
|
|||
getUser().then((res) => {
|
||||
dataFrom.value.deptId = res.data.data.deptId
|
||||
})
|
||||
const close = () => {
|
||||
window.close()
|
||||
}
|
||||
const back = () => {
|
||||
navList.value.forEach((val, index) => {
|
||||
if (val.key === showView.value && index > 0) {
|
||||
|
@ -446,8 +452,8 @@
|
|||
}
|
||||
.btn {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 10px 400px 0;
|
||||
justify-content: space-around;
|
||||
padding: 10px 350px 0;
|
||||
button {
|
||||
cursor: pointer;
|
||||
width: 80px;
|
||||
|
@ -467,7 +473,7 @@
|
|||
}
|
||||
}
|
||||
.first {
|
||||
justify-content: center;
|
||||
justify-content: space-around;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* @Author: hisense.liangjunhua
|
||||
* @Date: 2022-06-17 14:11:08
|
||||
* @LastEditors: hisense.liangjunhua
|
||||
* @LastEditTime: 2022-07-15 11:51:18
|
||||
* @LastEditTime: 2022-07-15 14:57:15
|
||||
* @Description: 上架
|
||||
-->
|
||||
<template>
|
||||
|
@ -111,7 +111,7 @@
|
|||
></upload>
|
||||
</div>
|
||||
<div class="submit">
|
||||
<a-button type="primary" @click="add(title.name)">提交</a-button>
|
||||
<a-button type="primary" @click="add(title.name)">添加</a-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
Loading…
Reference in New Issue