BUG修改

This commit is contained in:
a0049873 2022-07-15 16:16:50 +08:00
parent 3acee93e23
commit e8b741077e
3 changed files with 51 additions and 45 deletions

View File

@ -510,45 +510,45 @@ export default {
}) })
}) })
this.submitFrom.infoList = this.submitFrom.infoList.sort((a, b) => arr.indexOf(a.attrType) - arr.indexOf(b.attrType)) this.submitFrom.infoList = this.submitFrom.infoList.sort((a, b) => arr.indexOf(a.attrType) - arr.indexOf(b.attrType))
// if (this.submitFrom.id) { if (this.submitFrom.id) {
// // //
// this.submitFrom.infoList.map(val => { this.submitFrom.infoList.map(val => {
// if (val.attrType === '') { if (val.attrType === '组件类型') {
// val.attrValue = this.radio val.attrValue = this.radio
// } }
// }) })
// console.log('===============>', this.submitFrom) console.log('编辑===============>', this.submitFrom)
// console.log(this.submitFrom.infoList, '===============abc') console.log(this.submitFrom.infoList, '===============abc')
// // //
// const newArr = this.submitFrom.infoList.filter((element, index, self) => { const newArr = this.submitFrom.infoList.filter((element, index, self) => {
// return self.findIndex(x => x.attrType === element.attrType) === index return self.findIndex(x => x.attrType === element.attrType) === index
// }) })
// this.submitFrom.infoList = newArr this.submitFrom.infoList = newArr
// console.log(this.submitFrom.infoList, '====================================wpwpwp') console.log(this.submitFrom.infoList, '====================================wpwpwp')
// this.$http this.$http
// .put('/resource/update', this.submitFrom) .put('/resource/update', this.submitFrom)
// .then(({ data: res }) => { .then(({ data: res }) => {
// if (res.code !== 0) { if (res.code !== 0) {
// this.$message.error('!') this.$message.error('修改失败!')
// } else { } else {
// this.$message.success('') this.$message.success('修改成功!')
// this.clear() this.clear()
// } }
// }) })
// .catch(() => {}) .catch(() => {})
// } else { } else {
// this.$http this.$http
// .post('/resource/insert?source= b', this.submitFrom) .post('/resource/insert?source= b', this.submitFrom)
// .then(({ data: res }) => { .then(({ data: res }) => {
// if (res.code !== 0) { if (res.code !== 0) {
// this.$message.error('!') this.$message.error('上架失败!')
// } else { } else {
// this.$message.success('') this.$message.success('上架成功!')
// this.clear() this.clear()
// } }
// }) })
// .catch(() => {}) .catch(() => {})
// } }
}, },
// //
UpdateData (item) { UpdateData (item) {

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-06-13 10:22:27 * @Date: 2022-06-13 10:22:27
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-15 11:50:22 * @LastEditTime: 2022-07-15 16:13:40
* @Description: 算法上架 * @Description: 算法上架
--> -->
<template> <template>
@ -31,12 +31,14 @@
></put-on-the-shelf> ></put-on-the-shelf>
<put-on-the-shelf <put-on-the-shelf
v-else-if="showView === '算法优势'" v-else-if="showView === '算法优势'"
ref="sfys"
:refData="refData" :refData="refData"
:dataFrom="dataFrom" :dataFrom="dataFrom"
:configure="sfys" :configure="sfys"
></put-on-the-shelf> ></put-on-the-shelf>
<put-on-the-shelf <put-on-the-shelf
v-else-if="showView === '应用场景'" v-else-if="showView === '应用场景'"
ref="yycj"
:refData="refData" :refData="refData"
:dataFrom="dataFrom" :dataFrom="dataFrom"
:configure="yycj" :configure="yycj"
@ -80,6 +82,7 @@
></algorithm-deployment-use> --> ></algorithm-deployment-use> -->
</div> </div>
<div class="btn" :class="showView === '基本信息' ? 'first' : ''"> <div class="btn" :class="showView === '基本信息' ? 'first' : ''">
<button @click="close()">取消</button>
<button v-show="showView !== '基本信息'" @click="back()">上一步</button> <button v-show="showView !== '基本信息'" @click="back()">上一步</button>
<button v-show="showView === '部署与使用'" @click="preview()"> <button v-show="showView === '部署与使用'" @click="preview()">
预览 预览
@ -216,6 +219,9 @@
getUser().then((res) => { getUser().then((res) => {
dataFrom.value.deptId = res.data.data.deptId dataFrom.value.deptId = res.data.data.deptId
}) })
const close = () => {
window.close()
}
const back = () => { const back = () => {
navList.value.forEach((val, index) => { navList.value.forEach((val, index) => {
if (val.key === showView.value && index > 0) { if (val.key === showView.value && index > 0) {
@ -446,8 +452,8 @@
} }
.btn { .btn {
display: flex; display: flex;
justify-content: space-between; justify-content: space-around;
padding: 10px 400px 0; padding: 10px 350px 0;
button { button {
cursor: pointer; cursor: pointer;
width: 80px; width: 80px;
@ -467,7 +473,7 @@
} }
} }
.first { .first {
justify-content: center; justify-content: space-around;
} }
} }
</style> </style>

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-06-17 14:11:08 * @Date: 2022-06-17 14:11:08
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-15 11:51:18 * @LastEditTime: 2022-07-15 14:57:15
* @Description: 上架 * @Description: 上架
--> -->
<template> <template>
@ -111,7 +111,7 @@
></upload> ></upload>
</div> </div>
<div class="submit"> <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>
</div> </div>
</template> </template>