瀏覽代碼

Merge branch 'cmy/develop-bi' into develop

chenmy 2 年之前
父節點
當前提交
3c37c96c09
共有 1 個文件被更改,包括 7 次插入5 次删除
  1. 7 5
      TEAMModelBI/ClientApp/src/view/areamanage/statistics.vue

+ 7 - 5
TEAMModelBI/ClientApp/src/view/areamanage/statistics.vue

@@ -375,6 +375,7 @@ export default {
       areaList: true,
     })
     let notClassifydata=ref([])
+    let notClassifyoriginal=ref({})
     let schooltableData = ref([])
     //某个学区顾问列表
     let CounselorList = ref([])
@@ -1601,7 +1602,7 @@ export default {
     function notclassify(){
       proxy.$api.getAreaSchoolList({}).then((res)=>{
         console.log(res,'未归区的学校')
-        res.state === 200 ? notClassifydata.value=res.areaSchool:''
+        res.state === 200 ? (notClassifydata.value=res.areaSchool,notClassifyoriginal.value=res.areaSchool):''
       }).catch((error)=>{
         ElMessage.error('API异常,获取未归区学校列表失败')
       })
@@ -1855,12 +1856,12 @@ export default {
       timer.value = setTimeout(fn, wait)
     }
     function personnelSearch () {
-      let arr = schooltableData.value
+      let arr = showPattern.value==='all'? notClassifydata.value:schooltableData.value
       let newArr = arr.filter((item) => {
         // return (item.name && item.name.includes(filterText.value)) || (item.mobile && item.mobile.includes(filterText.value)) || (item.mobile && item.mobile.tmdId.includes(filterText.value))
         return item.name.includes(areaSearchValue.value) || item.id.includes(areaSearchValue.value)
       })
-      schooltableData.value = newArr
+      showPattern.value==='all'?  notClassifydata.value=newArr:schooltableData.value = newArr
     }
     getAll()
     // getoption()
@@ -1871,7 +1872,7 @@ export default {
       if (newdata.trim().length !== 0) {
         debounce(personnelSearch, 500)
       } else {
-        schooltableData.value = originalSchool.value
+        showPattern.value==='all'? notClassifydata.value=notClassifyoriginal.value:schooltableData.value = originalSchool.value
       }
     })
     return {
@@ -1908,7 +1909,8 @@ export default {
       originalSchool,
       unit,
       notclassify,
-      notClassifydata
+      notClassifydata,
+      notClassifyoriginal
     }
   },
 }