修改
This commit is contained in:
parent
fd4646062e
commit
4b0199f6da
@ -315,7 +315,7 @@
|
||||
</template></el-form-item
|
||||
>
|
||||
|
||||
<el-form-item label="海报图片" :required="true">
|
||||
<el-form-item label="海报图片" prop="posterPictureUrl">
|
||||
<el-table
|
||||
label-width="50px"
|
||||
style="margin-top: 20px"
|
||||
@ -678,6 +678,7 @@ export default {
|
||||
nurseItemName: "请选择所属护理项目",
|
||||
nurseItemId: "",
|
||||
},
|
||||
imgsurl: { pictureUrlList: [] },
|
||||
// 表单校验
|
||||
rules: {
|
||||
moduleType: [
|
||||
@ -725,6 +726,8 @@ export default {
|
||||
label: "护理机构简介模块",
|
||||
},
|
||||
],
|
||||
|
||||
objitem:[],
|
||||
jumpTypes: [
|
||||
{
|
||||
value: "NEW_PEOPLE_WELFARE",
|
||||
@ -741,6 +744,7 @@ export default {
|
||||
],
|
||||
//页面链接
|
||||
stationid: "",
|
||||
imgone:[],
|
||||
nurseitemid: "",
|
||||
homenumber: false,
|
||||
videourl: "",
|
||||
@ -753,6 +757,8 @@ export default {
|
||||
videoForm: {
|
||||
showVideoPath: "", //回显的变量
|
||||
},
|
||||
// 存储新上传的图片数组
|
||||
deletNewImgs:[],
|
||||
};
|
||||
},
|
||||
created() {
|
||||
@ -903,7 +909,14 @@ export default {
|
||||
},
|
||||
//图片传值过来接收
|
||||
imgUrl(imgUrl) {
|
||||
console.log(imgUrl);
|
||||
|
||||
console.log(JSON.parse(imgUrl),'url');
|
||||
let imgUrlData=JSON.parse(imgUrl)
|
||||
// 存贮新上传的图片数组
|
||||
this.deletNewImgs.push(imgUrlData.posterPictureUrl)
|
||||
console.log(this.deletNewImgs,'触发了上传时间')
|
||||
this.objitem.push(imgUrlData.posterPictureUrl)
|
||||
console.log(this.objitem)
|
||||
},
|
||||
imgUrl2(imgUrl) {
|
||||
this.videoForm.showVideoPath = baseurl + imgUrl;
|
||||
@ -920,13 +933,18 @@ export default {
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
console.log(this.objitem)
|
||||
var obj = { pictureUrlList: [] };
|
||||
if (obj.pictureUrlList.length > 0) {
|
||||
updatePicture(obj).then((res) => {});
|
||||
}
|
||||
if (this.imgs.pictureUrlList.length > 0) {
|
||||
updatePicture(this.imgs).then((res) => {});
|
||||
}
|
||||
if (this.form.posterPictureUrlLists) {
|
||||
this.form.posterPictureUrlLists.forEach((e) => {
|
||||
obj.pictureUrlList.push(e.posterPictureUrl);
|
||||
});
|
||||
}
|
||||
console.log(this.deletNewImgs,'---------------------------------')
|
||||
updatePicture({pictureUrlList:this.deletNewImgs}).then((res) => {
|
||||
this.open = false;
|
||||
});
|
||||
|
||||
this.nurseItemquery.nurseStationId = null;
|
||||
this.imgs = { pictureUrlList: [] };
|
||||
this.open = false;
|
||||
@ -1010,7 +1028,17 @@ export default {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updatePoser(this.form).then((response) => {
|
||||
// var obj = { pictureUrlList: [] };
|
||||
var obj = { pictureUrlList: [] };
|
||||
if (this.form.posterPictureUrlLists) {
|
||||
this.form.posterPictureUrlLists.forEach((e) => {
|
||||
obj.pictureUrlList.push(e.posterPictureUrl);
|
||||
});
|
||||
}
|
||||
updatePicture(obj).then((res) => {
|
||||
this.open = false;
|
||||
console.log('是否删除')
|
||||
});
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
@ -1019,7 +1047,6 @@ export default {
|
||||
if (this.form.poserSort) {
|
||||
this.form.poserSort = parseInt(this.form.poserSort);
|
||||
}
|
||||
|
||||
addPoser(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user