This commit is contained in:
曹辉 2023-02-22 13:46:59 +08:00
parent e84f10322b
commit 7f9c0260c3
3 changed files with 37 additions and 64 deletions

View File

@ -508,8 +508,8 @@ export default {
},
/** 提交按钮 */
submitForm() {
console.log(this.form);
this.$refs["form"].validate((valid) => {
this.form.classifySort = Number(this.form.classifySort);
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateInfo(this.form).then((response) => {
@ -523,7 +523,6 @@ export default {
this.getList();
});
} else {
addInfo(this.form).then((response) => {
this.$modal.msgSuccess("新增成功");
this.open = false;
@ -539,7 +538,7 @@ export default {
console.log(row);
this.$modal
.confirm("是否确认删除?")
.then(function () {
.then(function() {
return delInfo(ids);
})
.then(() => {
@ -553,11 +552,11 @@ export default {
this.download(
"classify/info/export",
{
...this.queryParams,
...this.queryParams
},
`info_${new Date().getTime()}.xlsx`
);
},
},
}
}
};
</script>

View File

@ -199,7 +199,7 @@
</el-form-item>
<el-form-item label="海报显示顺序" prop="poserSort">
<el-input
v-model.number="form.poserSort"
v-model.Number="form.poserSort"
placeholder="请输入海报显示顺序"
oninput="value=value.replace(/[^\d]/g,'')"
maxlength="5"
@ -517,8 +517,8 @@ export default {
//
poserList: [],
//
deletNewImgs:[],
objitem:[],
deletNewImgs: [],
objitem: [],
nurseItemList: [],
//
isEditFlag: false,
@ -549,17 +549,15 @@ export default {
},
//
form: {
nurseStationId: null,
nurseTypeId: null,
nurseItemName: "",
nurseItemContent: "",
advanceAppointDuration: "",
itemPictureUrl: "",
sort: "",
nurseStationId: "",
poserSort: null,
nurseStationId: null,
nurseStationName: "请选择所属护理站",
nurseItemName: "请选择所属护理项目",
nurseItemId: ""
nurseItemId: null
},
//
rules: {
@ -625,7 +623,7 @@ export default {
],
//
stationid: "",
imgone:"",
imgone: "",
nurseitemid: "",
homenumber: false,
videourl: "",
@ -634,7 +632,6 @@ export default {
videoUploadPercent: "",
//
isShowUploadVideo: false,
//
videoForm: {
showVideoPath: "" //
@ -812,13 +809,10 @@ export default {
},
//
imgUrl(imgUrl) {
console.log(JSON.parse(imgUrl),'url');
let imgUrlData=JSON.parse(imgUrl)
let imgUrlData = JSON.parse(imgUrl);
//
this.deletNewImgs.push(imgUrlData.posterPictureUrl)
console.log(this.deletNewImgs,'触发了上传时间')
this.objitem.push(imgUrlData.posterPictureUrl)
console.log(this.objitem)
this.deletNewImgs.push(imgUrlData.posterPictureUrl);
this.objitem.push(imgUrlData.posterPictureUrl);
},
imgUrl2(imgUrl) {
this.videoForm.showVideoPath = baseurl + imgUrl;
@ -833,22 +827,21 @@ export default {
this.loading = false;
});
},
//
cancel() {
console.log(this.objitem)
var obj = { pictureUrlList: [] };
if (this.form.posterPictureUrlLists) {
this.form.posterPictureUrlLists.forEach((e) => {
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) => {
console.log(this.deletNewImgs);
if (obj.pictureUrlList.length > 0) {
updatePicture({ pictureUrlList: this.deletNewImgs }).then(res => {
this.open = false;
});
}
this.deletNewImgs=[],
this.deletNewImgs = [];
this.nurseItemquery.nurseStationId = null;
this.imgs = { pictureUrlList: [] };
this.open = false;
@ -875,6 +868,7 @@ export default {
nurseItemName: "请选择所属护理项目",
nurseItemId: null
};
this.deletNewImgs = [];
this.resetForm("form");
},
/** 搜索按钮操作 */
@ -885,7 +879,6 @@ export default {
resetQuery() {
this.nurseItemquery.pageNum = 1;
this.nurseItemquery.pageSize = 10;
// this.stationid = "";
this.nurseitemid = "";
this.queryParams.pageNum = 1;
this.queryParams.pageSize = 10;
@ -928,28 +921,17 @@ 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: [] };
// var obj = { pictureUrlList: [] };
// if (this.form.posterPictureUrlLists) {
// this.form.posterPictureUrlLists.forEach((e) => {
// obj.pictureUrlList.push(e.posterPictureUrl);
// });
// }
// updatePicture(obj).then((res) => {
// this.open = false;
// });
updatePoser(this.form).then(response => {
var obj = { pictureUrlList: [] };
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addPoser(this.form).then((response) => {
addPoser(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();

View File

@ -704,7 +704,7 @@ export default {
classifyName: "请选择护理项目分类",
nurseClassifyId: "",
appointmentLimitCount: null,
appointmentTimeInterval: "",
appointmentTimeInterval: ""
}
},
idd: 1,
@ -999,7 +999,7 @@ export default {
nurseStationName: "请选择所属护理站",
classifyName: "请选择护理项目分类",
nurseClassifyId: "",
appointmentLimitCount: null,
appointmentLimitCount: null
},
nurseStationItemConsumables: [
// {
@ -1064,7 +1064,7 @@ export default {
this.StationConsumablequeryParams.nurseStationId =
response.data.nurseStationItem.nurseStationId;
this.imgone = this.form.nurseStationItem.itemPictureUrl;
if (this.form.nurseStationItemPrices.length==0) {
if (this.form.nurseStationItemPrices.length == 0) {
var obj = {
serveDurationUnit: "",
price: "",
@ -1086,11 +1086,6 @@ export default {
this.form.nurseStationItem.nurseTypeId = this.form.nurseTypeId;
this.$refs["form"].validate(valid => {
if (valid) {
if( this.form.nurseStationItem.appointmentLimitCount=""){
this.form.nurseStationItem.appointmentLimitCount=null
}else{
this.form.nurseStationItem.appointmentLimitCount = parseInt(this.form.nurseStationItem.appointmentLimitCount)
}
if (this.form.nurseStationItem.id != null) {
this.form.nurseStationItemPrices.forEach(e => {
e.nurseStationItemId = this.form.nurseStationItem.id;
@ -1106,18 +1101,15 @@ export default {
this.form.nurseStationItemPrices.forEach(e => {
e.price = Number(e.price);
});
updateNurseItem(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
this.form.nurseStationItemPrices.forEach(e => {
e.price = Number(e.price);
});
addNurseItem(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.$forceUpdate();