修改时间
This commit is contained in:
parent
d6e97d8472
commit
0428fdbb91
@ -623,6 +623,7 @@ export default {
|
||||
name: "ManuallyCreatingTasks",
|
||||
data() {
|
||||
return {
|
||||
errorShown: false,
|
||||
hms: '',
|
||||
time: '',
|
||||
datePickerVisible: true,
|
||||
@ -860,11 +861,10 @@ export default {
|
||||
}).then(() => {
|
||||
this.updata.routeNodeList = this.list;
|
||||
var newObj = JSON.parse(JSON.stringify(this.updata));
|
||||
|
||||
newObj.routeNodeList.every(e => {
|
||||
const invalidTimes = [];
|
||||
newObj.routeNodeList.forEach(e => {
|
||||
if (e.timedata) {
|
||||
e.nodePlanTime = e.timedata
|
||||
|
||||
}
|
||||
const dateParts = e.nodePlanTime.split(' ');
|
||||
if (dateParts[1] == "00:00:00") {
|
||||
@ -880,63 +880,56 @@ export default {
|
||||
const startTime = 8;
|
||||
const endTime = 20;
|
||||
const parts = e.nodePlanTime.split(' ');
|
||||
const time = parts[1].split(':').map(Number);
|
||||
console.log(time[0],endTime,'endTime')
|
||||
console.log(time[0],startTime,'startTime')
|
||||
console.log(time[0] < startTime || time[0] > endTime)
|
||||
const time = parts[1].split(':');
|
||||
if (time[0] < startTime || time[0] >= endTime) {
|
||||
// console.log('请修改时间点')
|
||||
this.$message.error("时间点在8:00到20:00之间,请修改时间点");
|
||||
return false
|
||||
|
||||
} else {
|
||||
signrouteadd(newObj).then((res) => {
|
||||
var message = ''
|
||||
if (this.$route.query.path == "/patient/signRecord") {
|
||||
message = '保存成功,即将返回签约患者列表'
|
||||
} else if (this.$route.query.path == "/patient/patientinfoimport") {
|
||||
message = '保存成功,即将返回患者导入列表'
|
||||
|
||||
} else if (this.$route.query.path == "/patient/ImportDetails") {
|
||||
message = '保存成功,即将返回导入明细列表'
|
||||
}
|
||||
else if (this.$route.query.path == "/task/Patientmanagement") {
|
||||
message = '保存成功,即将返回创建任务列表'
|
||||
}
|
||||
this.$notify({
|
||||
type: "success",
|
||||
title: "提示",
|
||||
message: message,
|
||||
duration: 3000,
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.$store
|
||||
.dispatch("tagsView/delView", this.$route)
|
||||
.then(({ visitedViews }) => {
|
||||
this.$router.push({
|
||||
path: this.$route.query.path
|
||||
});
|
||||
});
|
||||
}, 3000);
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
invalidTimes.push(e);
|
||||
}
|
||||
})
|
||||
console.log(invalidTimes, 'invalidTimes')
|
||||
if(invalidTimes.length>0){
|
||||
this.$message.error("时间点在8:00到20:00之间,请修改时间点");
|
||||
|
||||
}else{
|
||||
signrouteadd(newObj).then((res) => {
|
||||
var message = ''
|
||||
if (this.$route.query.path == "/patient/signRecord") {
|
||||
message = '保存成功,即将返回签约患者列表'
|
||||
} else if (this.$route.query.path == "/patient/patientinfoimport") {
|
||||
message = '保存成功,即将返回患者导入列表'
|
||||
|
||||
} else if (this.$route.query.path == "/patient/ImportDetails") {
|
||||
message = '保存成功,即将返回导入明细列表'
|
||||
}
|
||||
else if (this.$route.query.path == "/task/Patientmanagement") {
|
||||
message = '保存成功,即将返回创建任务列表'
|
||||
}
|
||||
this.$notify({
|
||||
type: "success",
|
||||
title: "提示",
|
||||
message: message,
|
||||
duration: 3000,
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.$store
|
||||
.dispatch("tagsView/delView", this.$route)
|
||||
.then(({ visitedViews }) => {
|
||||
this.$router.push({
|
||||
path: this.$route.query.path
|
||||
});
|
||||
});
|
||||
}, 3000);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
// var nulllength= newObj.routeNodeList.filter(item => item.routeNodeName=="" || item.routeNodeName==null || item.routeNodeName==undefined);
|
||||
// console.log(nulllength,'nulllength')
|
||||
// if(nulllength.length>0){
|
||||
// this.$message.error('节点名称不能为空!');
|
||||
// return
|
||||
// }
|
||||
|
||||
|
||||
console.log(newObj, 'this.newObj')
|
||||
console.log(this.updata, 'this.updata')
|
||||
// return
|
||||
|
||||
})
|
||||
},
|
||||
|
||||
Loading…
Reference in New Issue
Block a user