dxd 3 лет назад
Родитель
Сommit
c321629c68

+ 2 - 0
src/views/menu4/menu4-1/index.vue

@@ -482,6 +482,8 @@ export default {
         name: "",
         year: 0,
       };
+      this.leftQuery.period = "高中";
+      this.leftQuery.subject = "语文";
       this.curID = 0;
       this.getItems();
       this.$refs.treeInner.setCurrentKey(null);

+ 2 - 0
src/views/menu4/menu4-2/index.vue

@@ -575,6 +575,8 @@ export default {
         year: 0,
         sid: null,
       };
+      this.leftQuery.period = "高中";
+      this.leftQuery.subject = "语文";
       this.curID = 0;
       this.getItems();
       this.$refs.treeInner.setCurrentKey(null);

+ 4 - 2
src/views/menu5/menu5-1/index.vue

@@ -614,6 +614,8 @@ export default {
         name: "",
         pno: "",
       };
+      this.leftQuery.period = "高中";
+      this.leftQuery.subject = "语文";
       this.curID = 0;
       this.getItems();
       this.$refs.treeInner.setCurrentKey(null);
@@ -745,8 +747,8 @@ export default {
               this.dialogForm.ctype = "work";
               this.dialogForm.ctgid = res.data.category_id;
               console.log(this.dialogForm);
-              this.dialogForm.imgs = this.dialogForm.imgs.map(
-                (item) => item.url?item.url:item
+              this.dialogForm.imgs = this.dialogForm.imgs.map((item) =>
+                item.url ? item.url : item
               );
               console.log(this.dialogForm);
               paperApi.edit(this.dialogForm).then((res) => {

+ 18 - 0
src/views/menu5/menu5-2/index.vue

@@ -402,6 +402,22 @@ export default {
         }
       },
     },
+    "metaData.periodsR": {
+      deep: true,
+      handler: function (newV, oldV) {
+        if (newV && newV.length > 0) {
+          this.leftQuery.period = newV[0].name;
+        }
+      },
+    },
+    "metaData.subjectsR": {
+      deep: true,
+      handler: function (newV, oldV) {
+        if (newV && newV.length > 0) {
+          this.leftQuery.subject = newV[0].name;
+        }
+      },
+    },
     curTaskId: {
       deep: true,
       handler: function (newV, oldV) {
@@ -576,6 +592,8 @@ export default {
         status: "",
         created_at: "",
       };
+      this.leftQuery.period = "高中"
+      this.leftQuery.subject = "语文"
       this.curID = 0;
       this.getItems();
       this.$refs.treeInner.setCurrentKey(null);