Browse Source

Merge branch 'develop' into develop-rc

HiITEdenX 2 years ago
parent
commit
0decc0778b

+ 11 - 10
TEAMModelBI/ClientApp/src/view/areaServe/areamanage.vue

@@ -442,7 +442,7 @@
         </template>
       </el-dialog>
       <!--询问加入管理员方式-->
-      <el-dialog v-model="stageShow.state" :width="stageShow.width" :show-close="false"  :close-on-press-escape="false" :close-on-click-modal="false">
+      <el-dialog v-model="stageShow.state" :width="stageShow.width" :show-close="false"  :close-on-press-escape="false" :close-on-click-modal="false" before-close="stageShow.state=false">
         <div class="stagebox" v-if="stageShow.definedShow===false" v-loading="adminSchoold.allLoading" element-loading-text="正在设置相应内容...">
           <div class="stagebox-title">加入学区管理员</div>
           <div class="stagebox-text">请问加入学区管理员方式:</div>
@@ -450,7 +450,7 @@
             <div><el-button size="small" @click="addAreaadmin()">仅加入学区管理员</el-button></div>
             <div><el-button size="small" @click="batchAddadmin('all')">加入学区及成为所有学校管理员</el-button></div>
             <div><el-button size="small" @click="defined()">加入学区及自定义学校管理员</el-button></div>
-            <div><el-button size="small" @click="stageShow.state=false">取消</el-button></div>
+            <div><el-button size="small" @click="stageShow.state=false,stageShow.definedShow=false">取消</el-button></div>
           </div>
         </div>
         <div class="stagebox-defined" v-else-if="stageShow.definedShow ===true" v-loading="adminSchoold.customLoading" element-loading-text="正在设置相应内容...">
@@ -582,6 +582,7 @@ export default {
     let adminIndex=ref(-1)
     let adminSchoold=ref({
       data:[],
+      original:[],
       loading:false,
       allLoading:false,
       customLoading:false,
@@ -636,7 +637,7 @@ export default {
       let data = { areaId: currentlySelect.value.id }
       proxy.$api.getForareaSchool(data).then((res) => {
         console.log(res, '现在区域拥有的学校')
-        res.state === 200 ? (tableDatas.value.push(...res.joinAreaSchools),stageShow.value.definedData.push(...res.joinAreaSchools),stageShow.value.original.push(...res.joinAreaSchools)) : ''
+        res.state === 200 ? (tableDatas.value.push(...res.joinAreaSchools),stageShow.value.definedData=res.joinAreaSchools,stageShow.value.original=res.joinAreaSchools) : ''
       })
     }
     //获取当前未加入区的所有学校
@@ -906,7 +907,7 @@ export default {
         .areaAddadmins(data)
         .then((res) => {
           console.log(res, '添加学区管理员返回')
-          res.state === 200 ? (ElMessage.success('操作成功'), stageShow.value.state=false,getAreasadmin()) : ''
+          res.state === 200 ? (ElMessage.success('操作成功'), stageShow.value.state=false,stageShow.value.definedShow=false,getAreasadmin()) : res.state === 201  && res.existsArea ?  ElMessage.warning('已是学区管理员,请勿重复添加'):''
         })
         .catch((error) => {
           ElMessage.error('添加学区管理员失败')
@@ -1013,12 +1014,12 @@ export default {
       timer.value = setTimeout(fn, wait)
     }
     function personnelSearch () {
-      let arr = stageShow.value.definedData
+      let arr =  stageShow.value.state ? stageShow.value.definedData:adminSchoold.value.data
       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(schoolSearch.value) || item.id.includes(schoolSearch.value)
       })
-      stageShow.value.definedData = newArr
+      stageShow.value.state ? stageShow.value.definedData = newArr:adminSchoold.value.data=newArr
     }
     //学区内某个管理员关联的学校
     function admintheSchool(id,index){
@@ -1029,7 +1030,7 @@ export default {
       let data={tmdId:id,areaId:currentlySelect.value.id}
       proxy.$api.adminRelevanceschool(data).then((res)=>{
         console.log(res,'管理返回')
-        res.state === 200 ? adminSchoold.value.data=res.mScInfos:''
+        res.state === 200 ? (adminSchoold.value.data=res.mScInfos,adminSchoold.value.original=res.mScInfos):''
       }).catch((error)=>{
         ElMessage.error('API异常,加载管理员管理学校列表失败')
       })
@@ -1044,11 +1045,11 @@ export default {
           (cutbtnTitle.value.icon = '#icon-chakan2'))
     })
     watch(schoolSearch, (newdata) => {
-      console.log('11111')
+      console.log(stageShow.value.state,'现在state的值')
       if (newdata.trim().length !== 0) {
         debounce(personnelSearch, 500)
       } else {
-        stageShow.value.definedData = stageShow.value.original
+        stageShow.value.state ? stageShow.value.definedData = stageShow.value.original : adminSchoold.value.data=adminSchoold.value.original
       }
     })
     return {
@@ -1940,6 +1941,6 @@ export default {
   display: block;
 }
 .stagebox-btns div button{
-  width:50%;
+  width:65%;
 }
 </style>

+ 72 - 15
TEAMModelBI/ClientApp/src/view/areamanage/statistics.vue

@@ -66,17 +66,47 @@
     <div class="areaList">
       <p class="commonbox-title arealists">区域列表</p>
       <div class="area-listinfo" v-loading="loadingTotal.areaList" element-loading-background="rgba(0, 0, 0, 0.3)">
-        <div class="area-item" v-for="(item,index) in areaLists" :key="item.id">
-          <div class="area-item-list">
-            <p class="area-item-name">{{item.name}}</p>
-            <p class="area-item-school"><span class="area-item-school-title">学区学校数:</span><span class="area-item-school-content">{{item.scCnt}}</span></p>
+        <el-tabs type="border-card">
+          <el-tab-pane label="学区">
+            <div class="area-data">
+              <div class="area-item" v-for="(item,index) in areaLists" :key="item.id">
+              <div class="area-item-list">
+              <p class="area-item-name">{{item.name}}</p>
+              <p class="area-item-school"><span class="area-item-school-title">学区学校数:</span><span class="area-item-school-content">{{item.scCnt}}</span></p>
             <!-- <p class="area-item-school"><span class="area-item-school-title">学区教师数:</span><span class="area-item-school-content">{{item.tchCnt}}</span></p>
             <p class="area-item-school"><span class="area-item-school-title">学区学生数:</span><span class="area-item-school-content">{{item.stuCnt}}</span></p> -->
-          </div>
-          <div class="item-detailsbtn" @click="getSchoolDistrict(item)">
-            <span>详情 ></span>
-          </div>
-        </div>
+              </div>
+              <div class="item-detailsbtn" @click="getSchoolDistrict(item)">
+              <span>详情 ></span>
+              </div>
+            </div>
+            </div>
+          </el-tab-pane>
+          <el-tab-pane label="未归区学校">
+            <div class="not-classify">
+              <el-table :data="notClassifydata" style="width:100%" height="300" empty-text="暂无数据">
+            <el-table-column label="校徽" align="center">
+              <template #default="scope">
+                <div class="school-badge">
+                  <el-image :src="scope.row.picture" fit="fill" />
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column prop="name" label="名称" align="center" />
+            <el-table-column prop="id" label="简码" align="center" />
+            <el-table-column prop="size" label="空间" align="center" />
+            <el-table-column align="center">
+              <template #header>
+                <el-input v-model="areaSearchValue" size="small" placeholder="搜索学校名称/简码" clearable />
+              </template>
+              <template #default="scope">
+                <el-button type="primary" size="small" @click="detailsclick(scope.row)">详情</el-button>
+              </template>
+            </el-table-column>
+          </el-table>
+            </div>
+          </el-tab-pane>
+        </el-tabs>
       </div>
     </div>
   </div>
@@ -344,6 +374,8 @@ export default {
       classLine: true,
       areaList: true,
     })
+    let notClassifydata=ref([])
+    let notClassifyoriginal=ref({})
     let schooltableData = ref([])
     //某个学区顾问列表
     let CounselorList = ref([])
@@ -1429,6 +1461,7 @@ export default {
             getClassData()
             getclassification()
             getAllList()
+            notclassify()
           }
         })
         .catch((res) => {
@@ -1565,6 +1598,15 @@ export default {
           ElMessage.error('全区课例活跃度获取异常')
         })
     }
+    //获取未归学区的学校列表
+    function notclassify(){
+      proxy.$api.getAreaSchoolList({}).then((res)=>{
+        console.log(res,'未归区的学校')
+        res.state === 200 ? (notClassifydata.value=res.areaSchool,notClassifyoriginal.value=res.areaSchool):''
+      }).catch((error)=>{
+        ElMessage.error('API异常,获取未归区学校列表失败')
+      })
+    }
     //获取某个学区的数据统计包含跳转
     function getSchoolDistrict (areaids) {
       console.log(areaids, 'ID!!!!!')
@@ -1814,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()
@@ -1830,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 {
@@ -1865,7 +1907,10 @@ export default {
       timer,
       personnelSearch,
       originalSchool,
-      unit
+      unit,
+      notclassify,
+      notClassifydata,
+      notClassifyoriginal
     }
   },
 }
@@ -2225,7 +2270,7 @@ export default {
 }
 .area-listinfo {
   width: 100%;
-  height: 300px;
+  height: 450px;
   background: #fff;
   padding: 1%;
   /* height: 40vh; */
@@ -2234,7 +2279,7 @@ export default {
   flex-wrap: wrap;
   flex-direction: row;
   justify-content: flex-start;
-  overflow: auto;
+  /* overflow: auto; */
 }
 .area-item {
   width: 18%;
@@ -2412,6 +2457,17 @@ export default {
   width: 100%;
   text-align: center;
 }
+.area-data{
+  width:100%;
+  height:25vh;
+  display: flex;
+  flex-wrap: wrap;
+  overflow: auto;
+}
+.not-classify{
+  width:100%;
+  height:25vh;
+}
 </style>
 
 <style>
@@ -2419,4 +2475,5 @@ export default {
 .statisticsbox .el-loading-spinner .circular {
   display: inline !important;
 }
+.area-listinfo .el-tabs{width:100%}
 </style>

+ 4 - 4
TEAMModelOS/ClientApp/public/lang/en-US.js

@@ -3546,7 +3546,7 @@ const LANG_EN_US = {
         classroomAttr: 'Classroom Attribute',
         classroomCode: 'Classroom ID',
         classroomName: 'Classroom Name',
-        headmaster: 'Class Teacher',
+        headmaster: 'Class Teacher/Homeroom Teacher',
         setPeriod: "Select classroom's school system",
         setGrade: "Set classroom's grade",
         setHiteachCode: 'HiTeach Serial Number',
@@ -4111,10 +4111,10 @@ const LANG_EN_US = {
         sit1: 'id: Required. Student ID (4-12 digits number)',
         sit2: "pw: Optional. Password (if not entered, the default is the same as the student's student ID)",
         sit3: 'name: Required. Student Name',
-        sit4: 'stuYear: Required. Student enrollment year (usually the year he/she entered the school); e.g. 2022',
+        sit4: 'stuYear: Required. Student enrollment year (usually the year he/she entered the school), e.g. 2022',
         sit5: "className: Required. Student's Class, e.g., 101",
-        sit6: "classYear: Required. Usually the same as the enrolled year but depends on the student’s grade level e.g. 2020",
-        sit7: 'classId: Required. Class ID, e.g., 20200101',
+        sit6: "classYear: Required. Usually the same as the enrolled year but depends on the student’s grade level, for example, classYear will not be the same as the enrollment year if the student is retained. E.g. 2020.",
+        sit7: 'classId: Required. Class ID, e.g. 20200101',
         sit8: 'Incorrect ID format',
         sit9: 'Incorrect seat number format',
         sit10: 'Incorrect class ID format',

+ 2 - 2
TEAMModelOS/ClientApp/public/lang/zh-TW.js

@@ -720,7 +720,7 @@ const LANG_ZH_TW = {
         generatOk: '生成成功',
         generateErr: '生成失敗',
         noStuTip: '未獲取到學生數據',
-        loadAll: '已加載完所有數據',
+        loadAll: '已載入所有數據',
         delete: '刪除',
         edit: '修改'
     },
@@ -2522,7 +2522,7 @@ const LANG_ZH_TW = {
             copyContent: '確認複製當前評量嗎?',
             copyContent1: '課中評量不能進行複製操作。',
             paperExam: '紙本測驗',
-            loadAll: '已載所有數據',
+            loadAll: '已載所有數據',
             crossSchool: '跨校評量,在當前學校無法查看發布對象'
         },