提交 e1cb03ec authored 作者: chenweiping's avatar chenweiping

05-03

上级 30456ddd
.calendar_content{
color:#c0c4cc;
cursor: default;
}
\ No newline at end of file
...@@ -148,7 +148,7 @@ ...@@ -148,7 +148,7 @@
2.6 slot 语法这样写:v-slot:dateCell="{data}" 2.6 slot 语法这样写:v-slot:dateCell="{data}"
--> -->
<div style="width:100%;height: 100%;" @click="dateOnClick(data)"> <div :class="new Date(data.day).getTime()>=compareDate.getTime()?'':'calendar_content'" style="width:100%;height: 100%;" @click="dateOnClick(data)">
<div v-for="item in scheduleList" :key="item.date"> <div v-for="item in scheduleList" :key="item.date">
<div v-if="data.day == item.date && item.isDelete!=1"> <div v-if="data.day == item.date && item.isDelete!=1">
可约 可约
...@@ -322,6 +322,7 @@ ...@@ -322,6 +322,7 @@
import Editor from "@/components/Editor"; import Editor from "@/components/Editor";
import { getToken } from "@/utils/auth"; import { getToken } from "@/utils/auth";
import dayjs from 'dayjs'; import dayjs from 'dayjs';
import { } from "@/assets/styles/calendar.scss";
export default { export default {
components: { Editor }, components: { Editor },
...@@ -407,6 +408,7 @@ ...@@ -407,6 +408,7 @@
serviceTitle:'', serviceTitle:'',
serviceForm:{ }, serviceForm:{ },
serviceList:[], serviceList:[],
compareDate:'',
form: { form: {
isEnable: 1 isEnable: 1
}, },
...@@ -524,6 +526,9 @@ ...@@ -524,6 +526,9 @@
this.itemLabelOptions = response.data; this.itemLabelOptions = response.data;
}); });
this.getValueServiceList(); this.getValueServiceList();
let date = new Date();
let compareDate = date.getFullYear() + '-' + Number(date.getMonth() + 1) + '-' + date.getDate() + ' 08:00:00';
this.compareDate = new Date(compareDate);
}, },
/* 页面初始化执行方法:此方法可写同步方法,有先后加载顺序的逻辑建议用同步方法 */ /* 页面初始化执行方法:此方法可写同步方法,有先后加载顺序的逻辑建议用同步方法 */
mounted() { mounted() {
...@@ -625,6 +630,9 @@ ...@@ -625,6 +630,9 @@
}, },
dateOnClick(e){ dateOnClick(e){
console.log(JSON.stringify(e)); console.log(JSON.stringify(e));
if(new Date(e.day).getTime()<this.compareDate.getTime()){
return;
}
let isExist=false; let isExist=false;
this.scheduleList.forEach(function(item,i){ this.scheduleList.forEach(function(item,i){
if(item.date==e.day){ if(item.date==e.day){
...@@ -697,8 +705,8 @@ ...@@ -697,8 +705,8 @@
this.serviceOpen = false; this.serviceOpen = false;
}, },
back() { back() {
this.$router.go(-1) this.$store.dispatch("tagsView/delView",this.$route);
// this.$router.push("/job/job") this.$router.go(-1);
}, },
submitItemForm() { submitItemForm() {
this.repeatItemSubmit=true this.repeatItemSubmit=true
...@@ -829,7 +837,8 @@ ...@@ -829,7 +837,8 @@
} }
if(response.code==200){ if(response.code==200){
this.msgSuccess("修改成功"); this.msgSuccess("修改成功");
this.getPackage(); this.$store.dispatch("tagsView/delView",this.$route);
this.$router.go(-1);
} }
}).catch(err => { }).catch(err => {
if(type){ if(type){
...@@ -843,6 +852,8 @@ ...@@ -843,6 +852,8 @@
} }
if(response.code==200){ if(response.code==200){
this.msgSuccess("新增成功"); this.msgSuccess("新增成功");
this.$store.dispatch("tagsView/delView",this.$route);
this.$router.go(-1);
} }
}).catch(err => { }).catch(err => {
if(type){ if(type){
......
...@@ -426,10 +426,12 @@ export default { ...@@ -426,10 +426,12 @@ export default {
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
this.$store.dispatch("tagsView/delView",this.$route);
this.$router.push("/getPackageAdd"); this.$router.push("/getPackageAdd");
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
this.$store.dispatch("tagsView/delView",this.$route);
this.$router.push("/getPackageEdit/"+ row.packageId); this.$router.push("/getPackageEdit/"+ row.packageId);
}, },
submitServiceForm() { submitServiceForm() {
......
...@@ -439,6 +439,7 @@ ...@@ -439,6 +439,7 @@
} }
}, },
back() { back() {
this.$store.dispatch("tagsView/delView",this.$route);
this.$router.go(-1) this.$router.go(-1)
}, },
submitOrganForm() { submitOrganForm() {
...@@ -537,6 +538,8 @@ ...@@ -537,6 +538,8 @@
this.msgSuccess("新增成功"); this.msgSuccess("新增成功");
}); });
} }
this.$store.dispatch("tagsView/delView",this.$route);
this.$router.go(-1);
} }
}); });
}, },
......
...@@ -323,10 +323,12 @@ export default { ...@@ -323,10 +323,12 @@ export default {
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
this.$store.dispatch("tagsView/delView",this.$route);
this.$router.push("/getServiceAdd"); this.$router.push("/getServiceAdd");
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
this.$store.dispatch("tagsView/delView",this.$route);
this.$router.push("/getServiceEdit/"+ row.id); this.$router.push("/getServiceEdit/"+ row.id);
}, },
/** 提交按钮 */ /** 提交按钮 */
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论