瀏覽代碼

Merge branch 'develop' of http://163.228.141.122:3000/TEAMMODEL/TEAMModelOS into develop

Eden 2 月之前
父節點
當前提交
cd903497a4
共有 1 個文件被更改,包括 8 次插入6 次删除
  1. 8 6
      TEAMModelOS/ClientApp/src/components/coursemgt/StudentList.vue

+ 8 - 6
TEAMModelOS/ClientApp/src/components/coursemgt/StudentList.vue

@@ -289,17 +289,19 @@ export default {
                 if (data.results.length) {
                     this.excelFilter = data.results
                     excelResult = this._.cloneDeep(data.results)
-                    this.tableFilterData = stuData.filter(item => {
-                        let eIndex = excelResult.findIndex(results => results?.id && results?.id.toString() === item.id && results?.name === item.name)
-                        if(eIndex != -1) {
-                            excelResult.splice(eIndex, 1)
-                            return true
+                    this.tableFilterData = []
+                    this.notFoundlist = []
+                    excelResult.forEach(results => {
+                        let sData = stuData.find(item => results?.id && results?.id.toString() === item.id && results?.name === item.name)
+                        if(sData) {
+                            this.tableFilterData.push(sData)
+                        } else {
+                            this.notFoundlist.push(results)
                         }
                     })
                     this.pointNum = this.basicCount
                     this.tableShowData = this.tableFilterData.slice(0, this.basicCount)
                     
-                    this.notFoundlist = excelResult
                     this.$nextTick(() => {
                         this.$refs.stuSelection.selectAll(true);
                     });