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) {