From d6e97d847299f45e3d443a198529682e77ee9cd2 Mon Sep 17 00:00:00 2001 From: shidongli Date: Fri, 27 Dec 2024 12:54:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=97=B6=E9=97=B4=E8=8A=82?= =?UTF-8?q?=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/ManuallyCreatingTasks/index.vue | 89 ++++++++++++------- 1 file changed, 59 insertions(+), 30 deletions(-) diff --git a/src/views/system/ManuallyCreatingTasks/index.vue b/src/views/system/ManuallyCreatingTasks/index.vue index 1386796..b8a7606 100644 --- a/src/views/system/ManuallyCreatingTasks/index.vue +++ b/src/views/system/ManuallyCreatingTasks/index.vue @@ -223,7 +223,14 @@
@@ -616,6 +623,7 @@ export default { name: "ManuallyCreatingTasks", data() { return { + hms: '', time: '', datePickerVisible: true, show: 0, @@ -853,7 +861,7 @@ export default { this.updata.routeNodeList = this.list; var newObj = JSON.parse(JSON.stringify(this.updata)); - newObj.routeNodeList.forEach(e => { + newObj.routeNodeList.every(e => { if (e.timedata) { e.nodePlanTime = e.timedata @@ -869,6 +877,54 @@ export default { delete e.timedata; delete e.checked1; delete e.checked3; + 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) + 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); + }); + + + + + + } }) // var nulllength= newObj.routeNodeList.filter(item => item.routeNodeName=="" || item.routeNodeName==null || item.routeNodeName==undefined); // console.log(nulllength,'nulllength') @@ -877,38 +933,11 @@ export default { // return // } + console.log(newObj, 'this.newObj') console.log(this.updata, 'this.updata') // return - 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); - }); }) }, Typechange(e) {