|
@@ -205,7 +205,18 @@ export default {
|
|
|
//生命周期 - 创建完成(可以访问当前this实例)
|
|
|
created() {
|
|
|
if (this.searchForm.listTimer && this.searchForm.listTimer.length <= 0) {
|
|
|
- let now = new Date();
|
|
|
+ this.getNow()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //生命周期 - 挂载完成(可以访问DOM元素)
|
|
|
+ mounted() {
|
|
|
+ this.$store.dispatch("setBranchs");
|
|
|
+ // 获取分部
|
|
|
+ this.init();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ getNow(){
|
|
|
+ let now = new Date();
|
|
|
let startDate = new Date(
|
|
|
Date.UTC(now.getFullYear(), now.getMonth(), now.getDate())
|
|
|
)
|
|
@@ -219,17 +230,9 @@ export default {
|
|
|
this.searchForm.listTimer = [];
|
|
|
this.searchForm.listTimer.push(startDate);
|
|
|
this.searchForm.listTimer.push(endDate);
|
|
|
- }
|
|
|
- },
|
|
|
- //生命周期 - 挂载完成(可以访问DOM元素)
|
|
|
- mounted() {
|
|
|
- this.$store.dispatch("setBranchs");
|
|
|
- // 获取分部
|
|
|
- this.init();
|
|
|
- },
|
|
|
- methods: {
|
|
|
+ },
|
|
|
init() {
|
|
|
-
|
|
|
+
|
|
|
this.getList();
|
|
|
},
|
|
|
getList() {
|
|
@@ -268,6 +271,7 @@ export default {
|
|
|
teacherId: null,
|
|
|
organIdList: null,
|
|
|
};
|
|
|
+ this.getNow()
|
|
|
this.search();
|
|
|
},
|
|
|
lookDetail(row) {
|