修改时间节点

This commit is contained in:
shidongli 2024-12-27 12:54:24 +08:00
parent a3c0886564
commit d6e97d8472

View File

@ -223,7 +223,14 @@
<div <div
style="background-color: #fff; border-radius: 10px; padding: 20px" style="background-color: #fff; border-radius: 10px; padding: 20px"
:style=" :style="
formInline.taskNodeType? formInline.taskNodeType != 'PHONE_OUTBOUND'? formInline.taskNodeType == 'TEXT_REMIND' ? 'height:260px': 'height:179px': 'height:80px': 'height:80px'" formInline.taskNodeType
? formInline.taskNodeType != 'PHONE_OUTBOUND'
? formInline.taskNodeType == 'TEXT_REMIND'
? 'height:260px'
: 'height:179px'
: 'height:80px'
: 'height:80px'
"
> >
<el-form :model="formInline" class="demo-form-inline"> <el-form :model="formInline" class="demo-form-inline">
<el-form-item label="任务节点类型"> <el-form-item label="任务节点类型">
@ -616,6 +623,7 @@ export default {
name: "ManuallyCreatingTasks", name: "ManuallyCreatingTasks",
data() { data() {
return { return {
hms: '',
time: '', time: '',
datePickerVisible: true, datePickerVisible: true,
show: 0, show: 0,
@ -853,7 +861,7 @@ export default {
this.updata.routeNodeList = this.list; this.updata.routeNodeList = this.list;
var newObj = JSON.parse(JSON.stringify(this.updata)); var newObj = JSON.parse(JSON.stringify(this.updata));
newObj.routeNodeList.forEach(e => { newObj.routeNodeList.every(e => {
if (e.timedata) { if (e.timedata) {
e.nodePlanTime = e.timedata e.nodePlanTime = e.timedata
@ -869,17 +877,19 @@ export default {
delete e.timedata; delete e.timedata;
delete e.checked1; delete e.checked1;
delete e.checked3; delete e.checked3;
}) const startTime = 8;
// var nulllength= newObj.routeNodeList.filter(item => item.routeNodeName=="" || item.routeNodeName==null || item.routeNodeName==undefined); const endTime = 20;
// console.log(nulllength,'nulllength') const parts = e.nodePlanTime.split(' ');
// if(nulllength.length>0){ const time = parts[1].split(':').map(Number);
// this.$message.error(''); console.log(time[0],endTime,'endTime')
// return console.log(time[0],startTime,'startTime')
// } console.log(time[0] < startTime || time[0] > endTime)
if (time[0] < startTime || time[0] >= endTime) {
// console.log('')
this.$message.error("时间点在8:00到20:00之间,请修改时间点");
return false
console.log(newObj, 'this.newObj') } else {
console.log(this.updata, 'this.updata')
// return
signrouteadd(newObj).then((res) => { signrouteadd(newObj).then((res) => {
var message = '' var message = ''
if (this.$route.query.path == "/patient/signRecord") { if (this.$route.query.path == "/patient/signRecord") {
@ -909,6 +919,25 @@ export default {
}); });
}, 3000); }, 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
}) })
}, },
Typechange(e) { Typechange(e) {