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