|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<div id="default-select">
|
|
|
- <el-row type="flex" align="middle" justify="start" class="user-menu" v-loading="loading">
|
|
|
+ <el-row type="flex" align="middle" justify="start" class="user-menu" v-if="user" v-loading="loading">
|
|
|
<el-col :span="15" v-loading="!topOptions">
|
|
|
当前默认:
|
|
|
<span>
|
|
@@ -120,10 +120,10 @@ export default {
|
|
|
['asc']
|
|
|
);
|
|
|
this.$set(this, `termList`, tlist);
|
|
|
- if (termid) this.initClass('init');
|
|
|
+ if (termid) this.initClass();
|
|
|
}
|
|
|
},
|
|
|
- async initClass(type) {
|
|
|
+ async initClass() {
|
|
|
const { termid, classid, planid } = this.topOptions;
|
|
|
let res;
|
|
|
// 检查身份
|
|
@@ -141,7 +141,6 @@ export default {
|
|
|
}
|
|
|
// 检查是否是初始化,如果是初始化(由上级来),需要检查classid是不是在这里,不在就清除掉
|
|
|
const r = this.classList.find(f => f._id === classid);
|
|
|
- console.log(r);
|
|
|
if (!r) this.toClear('classid');
|
|
|
if (this.needInit) {
|
|
|
this.checkToday();
|
|
@@ -160,8 +159,9 @@ export default {
|
|
|
}
|
|
|
sessionStorage.setItem('needInit', false);
|
|
|
},
|
|
|
- toClear(type) {
|
|
|
- this.topOptions.classid = undefined;
|
|
|
+ toClear() {
|
|
|
+ this.$set(this.topOptions, `classid`, undefined);
|
|
|
+
|
|
|
// this.$set(this, `topOptions`, _.omit(this.topOptions, type));
|
|
|
},
|
|
|
// setVuexOpt() {
|
|
@@ -177,6 +177,7 @@ export default {
|
|
|
topOptions: {
|
|
|
deep: true,
|
|
|
handler(val, oval) {
|
|
|
+ console.log(val, oval);
|
|
|
this.changeOpt(val);
|
|
|
},
|
|
|
},
|