|
|
|
@ -25,7 +25,7 @@ |
|
|
|
<img src="../assets/img/jiantouchoose.png" |
|
|
|
style="width: 0.9vw;height:0.9vw;object-fit: contain;float: right;margin-top: 7%;"> |
|
|
|
<img src="../assets/img/muluchoose.png" |
|
|
|
style="width: 19vw;height: 6vw;position: absolute;bottom: -3vw;left: -3.5vw;"/> |
|
|
|
style="width: 19vw;height: 6vw;position: absolute;bottom: -3vw;left: -3.5vw;z-index: -1;"/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
@ -91,7 +91,8 @@ |
|
|
|
<div style="width: 22%;">{{ item.name }}</div> |
|
|
|
<div style="width: 60%;display: flex;flex-direction: row;"> |
|
|
|
<div v-for="item1 in item.imgList" :key="item1"> |
|
|
|
<img :src="item1.imgUrl" style="height: 5vw;object-fit: contain;justify-content: flex-start;margin-left: 1vw;border-radius: 1vw;"> |
|
|
|
<img :src="item1.imgUrl" |
|
|
|
style="height: 5vw;object-fit: contain;justify-content: flex-start;margin-left: 1vw;border-radius: 1vw;"> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div style="width: 10%;text-decoration: underline;font-style: italic;" @click="goXq(item.id)"> |
|
|
|
@ -204,9 +205,9 @@ export default { |
|
|
|
contentInfo: "", |
|
|
|
}, |
|
|
|
TxtValue: "", |
|
|
|
id:0, |
|
|
|
id: 0, |
|
|
|
fileList: [], // 已上传文件列表 |
|
|
|
|
|
|
|
isUpload:0, |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
@ -284,6 +285,18 @@ export default { |
|
|
|
this.form.name = res.data.data.name |
|
|
|
this.TxtValue = res.data.data.contentInfo; |
|
|
|
this.id = id; |
|
|
|
var imgs = res.data.data.imgList; |
|
|
|
console.log(imgs) |
|
|
|
|
|
|
|
for (let j = 0; j < imgs.length; j++) { |
|
|
|
var ii = { |
|
|
|
uuid:imgs[j].imgId, |
|
|
|
url:imgs[j].imgUrl |
|
|
|
} |
|
|
|
this.fileList.push(ii) |
|
|
|
} |
|
|
|
|
|
|
|
console.log(res); |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
@ -315,10 +328,12 @@ export default { |
|
|
|
}, |
|
|
|
// 上传成功后的回调 |
|
|
|
handleSuccess(response, file, fileList) { |
|
|
|
|
|
|
|
console.log('Upload success:', response); |
|
|
|
// 更新 fileList,确保新上传的文件被正确添加到列表中 |
|
|
|
console.log(fileList) |
|
|
|
this.fileList = fileList; |
|
|
|
this.isUpload = 1; |
|
|
|
}, |
|
|
|
// 上传失败后的回调 |
|
|
|
// eslint-disable-next-line no-unused-vars |
|
|
|
@ -326,23 +341,33 @@ export default { |
|
|
|
console.log('Upload error:', err); |
|
|
|
this.$message.error('上传失败,请重试!'); |
|
|
|
}, |
|
|
|
submitInfo(){ |
|
|
|
submitInfo() { |
|
|
|
console.log(this.fileList); |
|
|
|
var urlStr = ""; |
|
|
|
for(let f=0;f<this.fileList.length;f++){ |
|
|
|
if(f==0){ |
|
|
|
for (let f = 0; f < this.fileList.length; f++) { |
|
|
|
if (f == 0) { |
|
|
|
if(this.fileList[f].response!=null){ |
|
|
|
urlStr = this.fileList[f].response.data.url |
|
|
|
}else { |
|
|
|
urlStr = urlStr+","+this.fileList[f].response.data.url |
|
|
|
urlStr = this.fileList[f].url |
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
if(this.fileList[f].response!=null){ |
|
|
|
urlStr = urlStr + "," + this.fileList[f].response.data.url |
|
|
|
}else { |
|
|
|
urlStr = urlStr + "," + this.fileList[f].url |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
var data = { |
|
|
|
name:this.form.name, |
|
|
|
contentInfo:this.TxtValue, |
|
|
|
imgs:urlStr, |
|
|
|
id:this.id |
|
|
|
name: this.form.name, |
|
|
|
contentInfo: this.TxtValue, |
|
|
|
imgs: urlStr, |
|
|
|
id: this.id |
|
|
|
} |
|
|
|
editInfo(data).then((res)=>{ |
|
|
|
editInfo(data).then((res) => { |
|
|
|
console.log(res); |
|
|
|
this.openInfo = false; |
|
|
|
this.getContentList(); |
|
|
|
|