|
|
@@ -27,7 +27,7 @@
|
|
|
:data="{
|
|
|
menuId: menuId,
|
|
|
type: 'img',
|
|
|
- villageId:villageId,
|
|
|
+ villageId: villageId,
|
|
|
}"
|
|
|
:file-list="imgUpList"
|
|
|
:headers="{ token }"
|
|
|
@@ -156,7 +156,9 @@ export default {
|
|
|
methods: {
|
|
|
// 点击保存
|
|
|
async save () {
|
|
|
- if (this.ruleForm.name.trim() === '') return this.$message.warning('文字信息不能为空')
|
|
|
+ if (this.ruleForm.name.trim() === '') {
|
|
|
+ return this.$message.warning('文字信息不能为空')
|
|
|
+ }
|
|
|
const obj = {
|
|
|
menuId: this.menuId,
|
|
|
villageId: this.villageId,
|
|
|
@@ -168,6 +170,7 @@ export default {
|
|
|
const res = await saveEntity(obj)
|
|
|
if (res.code === 0) {
|
|
|
this.$message.success('保存成功')
|
|
|
+ this.ruleForm.id = res.data.id
|
|
|
} else this.$message.warning(res.msg)
|
|
|
},
|
|
|
// ---------------照片墙
|
|
|
@@ -276,16 +279,16 @@ export default {
|
|
|
this.fileList = temp.videos || []
|
|
|
// 图片回显
|
|
|
if (temp.images) {
|
|
|
- temp.images.forEach(v => {
|
|
|
+ temp.images.forEach((v) => {
|
|
|
v.url = this.baseURL + v.filePath
|
|
|
})
|
|
|
}
|
|
|
this.imgUpList = temp.images || []
|
|
|
// id存储
|
|
|
- this.fileList.forEach(v => {
|
|
|
+ this.fileList.forEach((v) => {
|
|
|
this.videoIdArr.push(v.id)
|
|
|
})
|
|
|
- this.imgUpList.forEach(v => {
|
|
|
+ this.imgUpList.forEach((v) => {
|
|
|
this.imgIdArr.push(v.id)
|
|
|
})
|
|
|
}
|