This commit is contained in:
闫晓茹 2023-02-22 09:49:36 +08:00
parent afdb583d52
commit 18167226a3

View File

@ -516,6 +516,9 @@ export default {
nurseItemlist: [],
//
poserList: [],
//
deletNewImgs:[],
objitem:[],
nurseItemList: [],
//
isEditFlag: false,
@ -605,6 +608,7 @@ export default {
// label: "",
// },
],
imgsurl: { pictureUrlList: [] },
jumpTypes: [
{
value: "NEW_PEOPLE_WELFARE",
@ -621,6 +625,7 @@ export default {
],
//
stationid: "",
imgone:"",
nurseitemid: "",
homenumber: false,
videourl: "",
@ -629,6 +634,7 @@ export default {
videoUploadPercent: "",
//
isShowUploadVideo: false,
//
videoForm: {
showVideoPath: "" //
@ -806,7 +812,13 @@ 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;
@ -821,16 +833,22 @@ export default {
this.loading = false;
});
},
//
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 => {});
}
this.nurseItemnuser = null;
if (this.form.posterPictureUrlLists) {
this.form.posterPictureUrlLists.forEach((e) => {
obj.pictureUrlList.push(e.posterPictureUrl);
});
}
console.log(this.deletNewImgs)
if(obj.pictureUrlList.length>0){
updatePicture({pictureUrlList:this.deletNewImgs}).then((res) => {
this.open = false;
});
}
this.nurseItemquery.nurseStationId = null;
this.imgs = { pictureUrlList: [] };
this.open = false;
@ -910,11 +928,21 @@ export default {
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
this.$refs["form"].validate((valid) => {
if (valid) {
if (this.form.id != null) {
updatePoser(this.form).then(response => {
var obj = { pictureUrlList: [] };
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;
// });
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
@ -923,10 +951,7 @@ export default {
if (this.form.poserSort) {
this.form.poserSort = parseInt(this.form.poserSort);
}
addPoser(this.form).then(response => {
if (this.form.poserSort) {
this.form.poserSort = parseInt(this.form.poserSort);
}
addPoser(this.form).then((response) => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();