|
@@ -475,8 +475,8 @@ export default {
|
|
|
resourceApi.getCategories(this.leftQuery).then((res) => {
|
|
|
if (res.mess == "success") {
|
|
|
this.treeData = res.data;
|
|
|
- this.getItems(this.treeData);
|
|
|
- this.getTask(this.treeData);
|
|
|
+ this.getItems();
|
|
|
+ this.getTask();
|
|
|
}
|
|
|
});
|
|
|
},
|
|
@@ -490,7 +490,6 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
getTask(data) {
|
|
|
- debugger;
|
|
|
this.curID = data ? data.id : "0";
|
|
|
this.curTree = data ? data : {};
|
|
|
let params = {
|
|
@@ -509,8 +508,8 @@ export default {
|
|
|
this.curID = data ? data.id : "0";
|
|
|
this.curTree = data ? data : {};
|
|
|
let params = {
|
|
|
- name: data ? data.name : "",
|
|
|
- ctgid: data.id,
|
|
|
+ name: this.listQuery.name,
|
|
|
+ ctgid: this.curID,
|
|
|
};
|
|
|
this.newForm.ctgid = params.ctgid;
|
|
|
paperApi.getPapers(params).then((res) => {
|
|
@@ -592,7 +591,7 @@ export default {
|
|
|
this.leftQuery.period = "高中";
|
|
|
this.leftQuery.subject = "语文";
|
|
|
this.curID = 0;
|
|
|
- this.getTask()
|
|
|
+ this.getTask();
|
|
|
this.$refs.treeInner.setCurrentKey(null);
|
|
|
},
|
|
|
back() {
|
|
@@ -601,6 +600,7 @@ export default {
|
|
|
},
|
|
|
addItems() {
|
|
|
this.status = 1;
|
|
|
+ this.newForm = {};
|
|
|
},
|
|
|
Schange(e) {
|
|
|
DictsApi.grades({ sid: e }).then((res) => {
|