BUG修改

This commit is contained in:
a0049873 2022-07-15 11:07:08 +08:00
parent cf296916e1
commit 622f2f645b
3 changed files with 51 additions and 45 deletions

View File

@ -424,7 +424,7 @@ export default {
this.submitFrom.infoList.push(obj) this.submitFrom.infoList.push(obj)
}, },
submitData () { submitData () {
console.log('编辑11111111111===============>', this.putOnTheShelfList) console.log('提交11111111111===============>', this.putOnTheShelfList)
const arr = [] const arr = []
this.putOnTheShelfList.map(item => { this.putOnTheShelfList.map(item => {
item.children.map(child => { item.children.map(child => {
@ -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

@ -114,6 +114,9 @@ export default {
if (!this.data.note1) { if (!this.data.note1) {
this.$http.get('/sys/user/info').then(({ data: res }) => { this.$http.get('/sys/user/info').then(({ data: res }) => {
this.data.note1 = res.data.deptId this.data.note1 = res.data.deptId
this.$http.get('/sys/dept/' + res.data.deptId).then(res => {
console.log(res.data.data, '部门信息=============================')
})
}) })
} }
}) })

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-13 18:14:42 * @LastEditTime: 2022-07-15 11:06:55
* @Description: 上架 * @Description: 上架
--> -->
<template> <template>
@ -110,13 +110,13 @@
:options="item.options" :options="item.options"
/> />
<a-input <a-input
v-else-if="item.type == 'text'" v-else-if="item.type == 'AbilityType '"
v-model:value="item.note1" v-model:value="item.note1"
:placeholder="'请输入' + item.name" :placeholder="'请输入' + item.name"
:disabled="true" :disabled="true"
/> />
<a-input <a-input
v-else-if="item.type == 'text2'" v-else-if="item.type == 'ComponentType'"
v-model:value="item.note1" v-model:value="item.note1"
:placeholder="'请输入' + item.name" :placeholder="'请输入' + item.name"
:disabled="true" :disabled="true"
@ -179,11 +179,14 @@
:list="props.videoList" :list="props.videoList"
tip="支持视频类型大小不超过100M" tip="支持视频类型大小不超过100M"
></upload> ></upload>
<a-button v-else-if="item.type == 'dialog'" @click="sourceClick"> <a-button
v-else-if="item.type == 'AssociatedApplication'"
@click="sourceClick"
>
请选择来源应用 请选择来源应用
</a-button> </a-button>
<a-button <a-button
v-else-if="item.type == 'dialog2'" v-else-if="item.type == 'AssociatedComponents'"
@click="componentsClick" @click="componentsClick"
> >
请选择关联组件 请选择关联组件