yuanyiming пре 1 година
родитељ
комит
6976e34afb

+ 10 - 0
src/api/eva.js

@@ -121,6 +121,16 @@ export function selectManyClassStudent(params) {
   })
 }
 
+// 获取筛选项(新)
+export function selectSTEType(params) {
+  return request({
+    url: '/selectSTEType',
+    method: 'get',
+    params,
+    hideloading: false
+  })
+}
+
 // 获取学期选项
 // export function selectTermRecord(params) {
 //   return request({

+ 2 - 2
src/views/eva/components/classList.vue

@@ -49,10 +49,10 @@ export default {
   methods: {
     // 班级折叠与展开
     spread(e) {
-      console.log(e)
+      // console.log(e)
       if (this.ico) {
         selectClassStudent({ cid: e }).then(res => {
-          console.log('res', res)
+          // console.log('res', res)
           this.stuList = res[0]
         })
       }

+ 4 - 4
src/views/eva/components/selects.vue

@@ -61,16 +61,16 @@ export default {
     },
     // 判断学生是否被选中
     choose(e) {
-      console.log(this.listContent)
-      console.log('判断学生是否被选中', e)
+      // console.log(this.listContent)
+      // console.log('判断学生是否被选中', e)
       if (this.choosePer.includes(e.id)) return
       this.choosePer.push(e.id)
       // console.log(this.choosePer)
     },
     // 删除学生
     delStu(e) {
-      console.log('删除学生', e)
-      console.log(this.choosePer)
+      // console.log('删除学生', e)
+      // console.log(this.choosePer)
       const iii = this.choosePer.indexOf(e)
       this.choosePer.splice(iii, 1)
       //   console.log()

+ 49 - 11
src/views/eva/studentDetail.vue

@@ -129,7 +129,9 @@
 <script>
 import { selectStudentDetail } from '@/api/eva'
 import { selectClassStudent } from '@/api/eva'
-import { selectVeiDoo } from '@/api/eva'
+// import { selectVeiDoo } from '@/api/eva'
+import { selectSTEType } from '@/api/eva'
+
 import { selectRecord } from '@/api/eva'
 import { selectTerm } from '@/api/eva'
 
@@ -196,7 +198,7 @@ export default {
 
       selectStudentDetail(data).then(res => {
         this.studentInfo = res[0][0]
-        console.log('获取学生信息', this.studentInfo)
+        // console.log('获取学生信息', this.studentInfo)
       })
 
       // 获取所有学生记录总条数
@@ -212,7 +214,7 @@ export default {
       }
       // console.log('data4', data4)
       selectRecord(data4).then(res => {
-        console.log('获取所有学生记录', res[0])
+        // console.log('获取所有学生记录', res[0])
         this.conList = res[0]
       })
     },
@@ -220,10 +222,46 @@ export default {
     // 获取筛选框
     selectVei() {
       const data3 = {
+        org: this.$store.state.user.userinfo.org,
         oid: this.$store.state.user.userinfo.organizeid
       }
-      selectVeiDoo(data3).then(res => {
-        this.filtrate = res[0]
+      // console.log('获取筛选项22222222', data3)
+      selectSTEType(data3).then(res => {
+        // this.filtrate = res[0]
+        var ftype = res[0] //公共父级分类
+        var stype = res[1] //公共子级分类
+        var sctype = res[2] //该学校子级分类
+        var fctype = res[3] //该学校父级分类
+        var fotype = res[4] //组织父级分类
+        var sotype = res[5] //组织子级分类
+        var allfType = []
+        var allsType = []
+        if (fotype.length == 0 && sotype.length == 0) {
+          if (fctype.length == 0 && sctype.length == 0) {
+            for (var i = 0; i < ftype.length; i++) {
+              allfType.push(ftype[i])
+            }
+            for (var i = 0; i < stype.length; i++) {
+              allsType.push(stype[[i]])
+            }
+          } else {
+            for (var i = 0; i < fctype.length; i++) {
+              allfType.push(fctype[i])
+            }
+            for (var i = 0; i < sctype.length; i++) {
+              allsType.push(sctype[[i]])
+            }
+          }
+        } else {
+          for (var i = 0; i < fotype.length; i++) {
+            allfType.push(fotype[i])
+          }
+          for (var i = 0; i < sotype.length; i++) {
+            allsType.push(sctysotypepe[[i]])
+          }
+        }
+        this.filtrate = allsType
+        // console.log('allsType', allsType)
       })
     },
 
@@ -237,7 +275,7 @@ export default {
         res[0].forEach(e => {
           this.stuList.push(e.id)
         })
-        console.log('获取班学生列表', this.stuList)
+        // console.log('获取班学生列表', this.stuList)
         // 查询学生在数组中的位置
         this.num = this.stuList.indexOf(this.stuId)
       })
@@ -303,7 +341,7 @@ export default {
 
         selectStudentDetail({ uid: this.stuId }).then(res => {
           this.studentInfo = res[0][0]
-          console.log(this.studentInfo)
+          // console.log(this.studentInfo)
         })
       }
       this.selectCordS()
@@ -356,7 +394,7 @@ export default {
       }
       // console.log(data4)
       selectRecord(data4).then(res => {
-        console.log('获取所有学生记录', res)
+        // console.log('获取所有学生记录', res)
         this.TermRecord = res[0]
       })
     },
@@ -384,9 +422,9 @@ export default {
         trm: this.termData[0],
         txt: ''
       }
-      console.log(' 获取所有学生记录aaaaaaaaaaaaaaaaaaaaaaa', data4)
+      // console.log(' 获取所有学生记录aaaaaaaaaaaaaaaaaaaaaaa', data4)
       selectRecord(data4).then(res => {
-        console.log('获取所有学生记录', res)
+        // console.log('获取所有学生记录', res)
         this.TermRecord = res[0]
       })
     },
@@ -455,7 +493,7 @@ export default {
   created() {
     this.stuId = localStorage.getItem('userId')
     this.classId = localStorage.getItem('classId')
-    console.log(this.classId)
+    // console.log(this.classId)
     this.selTerm()
     // 获取筛选框
     this.selectVei()

+ 63 - 24
src/views/eva/studentEvaluate.vue

@@ -125,7 +125,7 @@
     </div>
 
     <pop v-show="isShowMask">
-      <template v-slot:tit>确定</template>
+      <template v-slot:tit>提示</template>
       <template v-slot:con>确定{{ shareShow ? '修改' : '发布' }}吗</template>
       <template v-slot:btn1>
         <div class="btn" style="color: rgba(136,136,136,1);" @click="isShowMask = false">取消</div>
@@ -153,12 +153,13 @@ import pop from './components/pop.vue'
 
 import { insertRecord } from '@/api/eva'
 // import { selectClassStudent } from '@/api/eva'
-import { selectVeiDoo } from '@/api/eva'
+// import { selectVeiDoo } from '@/api/eva'
 import { selectRecordDetail } from '@/api/eva'
 import { updateRecordData } from '@/api/eva'
 import { selectTerm } from '@/api/eva'
 import { selectStudentDetail } from '@/api/eva'
 import { selectManyClassStudent } from '@/api/eva'
+import { selectSTEType } from '@/api/eva'
 
 import '@/utils/aws-sdk-2.235.1.min.js'
 
@@ -226,38 +227,33 @@ export default {
 
       selectStudentDetail(stuData).then(res => {
         this.studentInfo = res[0][0]
-        console.log('获取学生信息', this.studentInfo)
+        // console.log('获取学生信息', this.studentInfo)
 
         // 获取班学生列表
         const data2 = {
           cid: this.studentInfo.classid,
           uid: localStorage.getItem('userId')
         }
-        console.log('获取班学生列表', data2)
+        // console.log('获取班学生列表', data2)
         selectManyClassStudent(data2).then(res => {
-          // res[0].forEach(e => {
-          //   if (e.id === this.$route.query.uid) {
-          //     this.stuName = e
-          //   } else {
-          //     this.studentList.push(e)
-          //   }
-          // })
           this.studentList = res[0]
-
-          console.log('this.studentList', this.studentList)
         })
       })
       // 获取纬度筛选框
-      selectVeiDoo().then(res => {
-        this.weiList = res[0]
-        console.log('this.weiList', this.weiList)
-      })
+
+      this.getWei()
+      // selectVeiDoo().then(res => {
+      //   this.weiList = res[0]
+      //   // console.log('this.weiList', this.weiList)
+      // })
+
+      // console.log('获取筛选项22222222', data3)
 
       // 获取学期筛选框
       selectTerm().then(res => {
-        console.log('获取学期筛选框', res)
+        // console.log('获取学期筛选框', res)
         res[0].forEach(e => {
-          console.log(e)
+          // console.log(e)
           if (e.defaultC === 1) {
             this.termData.push(e.id)
           }
@@ -280,6 +276,49 @@ export default {
       //   console.log('this.studentList', this.studentList)
       // })
     },
+    getWei() {
+      const data3 = {
+        org: this.$store.state.user.userinfo.org,
+        oid: this.$store.state.user.userinfo.organizeid
+      }
+      selectSTEType(data3).then(res => {
+        // this.filtrate = res[0]
+        var ftype = res[0] // 公共父级分类
+        var stype = res[1] // 公共子级分类
+        var sctype = res[2] // 该学校子级分类
+        var fctype = res[3] // 该学校父级分类
+        var fotype = res[4] // 组织父级分类
+        var sotype = res[5] // 组织子级分类
+        var allfType = []
+        var allsType = []
+        if (fotype.length == 0 && sotype.length == 0) {
+          if (fctype.length == 0 && sctype.length == 0) {
+            for (var i = 0; i < ftype.length; i++) {
+              allfType.push(ftype[i])
+            }
+            for (var i = 0; i < stype.length; i++) {
+              allsType.push(stype[[i]])
+            }
+          } else {
+            for (var i = 0; i < fctype.length; i++) {
+              allfType.push(fctype[i])
+            }
+            for (var i = 0; i < sctype.length; i++) {
+              allsType.push(sctype[[i]])
+            }
+          }
+        } else {
+          for (var i = 0; i < fotype.length; i++) {
+            allfType.push(fotype[i])
+          }
+          for (var i = 0; i < sotype.length; i++) {
+            allsType.push(sctysotypepe[[i]])
+          }
+        }
+        // console.log('分类分类分类', res)
+        this.weiList = allsType
+      })
+    },
     // 调用子元素selects中的方法隐藏选项列表
     col() {
       this.$refs.StuSel.fuClick()
@@ -344,7 +383,7 @@ export default {
       // return console.log(data)
 
       insertRecord(data).then(res => {
-        console.log(res)
+        // console.log(res)
         if (res === 1) {
           this.$toast({
             message: '发布成功',
@@ -381,7 +420,7 @@ export default {
       ]
       // return console.log(data);
       updateRecordData(data).then(res => {
-        console.log(res)
+        // console.log(res)
         if (res === 1) {
           this.$toast({
             message: '修改成功',
@@ -487,7 +526,7 @@ export default {
       }
     },
     visitTime(val) {
-      console.log('val', val)
+      // console.log('val', val)
       if (val === '') {
         this.tim = true
       } else {
@@ -499,9 +538,9 @@ export default {
   created() {
     // 是否显示分享和继续记录按钮。添加按钮进来不显示
     this.shareShow = this.$route.query.shareShow * 1
-    console.log(this.shareShow)
+    // console.log(this.shareShow)
     if (this.$route.query.shareShow * 1 === 1) {
-      console.log('aaaaaaaaaaaaaaaaaaaaa')
+      // console.log('aaaaaaaaaaaaaaaaaaaaa')
       this.getRecord()
     }
     this.getData()