修改
This commit is contained in:
parent
e84f10322b
commit
7f9c0260c3
@ -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>
|
||||
|
||||
@ -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"
|
||||
@ -516,9 +516,9 @@ export default {
|
||||
nurseItemlist: [],
|
||||
// 泉医到家系统海报模块信息(包含咨询简介信息)表格数据
|
||||
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) => {
|
||||
obj.pictureUrlList.push(e.posterPictureUrl);
|
||||
});
|
||||
}
|
||||
console.log(this.deletNewImgs)
|
||||
if(obj.pictureUrlList.length>0){
|
||||
updatePicture({pictureUrlList:this.deletNewImgs}).then((res) => {
|
||||
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.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();
|
||||
|
||||
@ -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: "",
|
||||
@ -1072,7 +1072,7 @@ export default {
|
||||
idd: this.idd
|
||||
};
|
||||
this.form.nurseStationItemPrices.push(obj);
|
||||
}
|
||||
}
|
||||
this.open = true;
|
||||
this.title = "修改护理站护理项目";
|
||||
});
|
||||
@ -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();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user