|
@@ -210,7 +210,14 @@ export default {
|
|
|
this.classifyTree[0].children = res.data || [];
|
|
|
},
|
|
|
async resetDataList() {
|
|
|
- await this.getOriginList();
|
|
|
+ if (!this.useClassify && !this.useDifficult && !this.useProperty) {
|
|
|
+ this.originList = [];
|
|
|
+ this.dataList = [];
|
|
|
+ this.tableData = [];
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ const res = await this.getOriginList().catch(() => {});
|
|
|
+ if (!res) return;
|
|
|
|
|
|
if (this.useProperty) {
|
|
|
this.parsePropertyInfo();
|
|
@@ -220,7 +227,7 @@ export default {
|
|
|
async getOriginList() {
|
|
|
if (this.useClassify && !this.selectedFolderIds.length) {
|
|
|
this.$message.error("请选择选择文件夹!");
|
|
|
- return;
|
|
|
+ return Promise.reject();
|
|
|
}
|
|
|
let data = {
|
|
|
...this.filterData,
|
|
@@ -232,6 +239,7 @@ export default {
|
|
|
|
|
|
const res = await questionGroupStructListApi(data);
|
|
|
this.originList = res.data || [];
|
|
|
+ return true;
|
|
|
},
|
|
|
parsePropertyInfo() {
|
|
|
if (!this.useProperty) {
|