Browse Source

取教师发展数据

11wqe1 7 months ago
parent
commit
4c7cc3f4af

+ 26 - 4
src/components/pages/test/examine/conpoments/targetPage.vue

@@ -43,7 +43,7 @@
                   style="display: flex;justify-content: space-around;padding: 0 10px;box-sizing: border-box;"
                 >
                   <!-- <div class="TabBtn" @click="lookPrize">查看</div> -->
-                  <div class="TabBtn" @click="lookScore">评分</div>
+                  <div class="TabBtn" @click="lookScore(k.id)">评分</div>
                 </div>
               </div>
             </div>
@@ -180,6 +180,7 @@ export default {
       diaScore: false, //查看分数弹框
       ifmUrl: "", //数据来源地址
       tabLoad: false, //表格加载状态
+      secondId: "", //查看评分二级id
       userid: this.$route.query.userid, //用户id
       oid: this.$route.query.oid, //学校id
       org: this.$route.query.org, //组织id
@@ -1209,6 +1210,24 @@ export default {
   },
 
   methods: {
+    getSecondData() {
+      let params = {
+        oid: this.oid,
+        org: this.org,
+        type: this.pType
+      };
+      // console.log(params);
+      this.ajax
+        .get(this.$store.state.api + "selectTestExamineSecondData", params)
+        .then(res => {
+          let data = res.data[0];
+
+          console.log("selectTestExamineSecondData", res.data[0]);
+        })
+        .catch(error => {
+          console.log(error);
+        });
+    },
     // 获取数据计算审核进度,自评平均分,考核平均分
     getData() {
       let params = {
@@ -1243,7 +1262,7 @@ export default {
           // console.log("selectTestExamineBase", res.data[0][0]);
           this.tableJsonCon = JSON.parse(res.data[0][0].json);
           this.handleData();
-          this.getData()
+          this.getData();
 
           this.tabLoad = false;
         })
@@ -1288,10 +1307,13 @@ export default {
     },
     // 关闭弹框
     handleClose(done) {
+      this.page = 1;
       done();
     },
-    // 查看分数
-    lookScore() {
+    // 查看评分
+    lookScore(val) {
+      this.getSecondData();
+      this.secondId = val;
       this.diaScore = true;
     }
   }

+ 49 - 26
src/components/pages/testPerson/examine/index.vue

@@ -77,10 +77,17 @@
                     <div
                       v-for="(item2, index) in k.testid.test"
                       :key="item2.courseId"
-                      @click="lookPrize(item2.courseId)"
                       class="orgData"
                     >
-                      {{ item2.title }}:{{ item2.num }}份
+                      <div @click="lookPrize(item2.courseId)">
+                        {{ item2.title }}:{{ item2.num }}份
+                      </div>
+                      <div
+                        style="color: black;"
+                        @click="goFillIn(item2.courseId)"
+                      >
+                        去填写
+                      </div>
                     </div>
                   </div>
                 </div>
@@ -135,10 +142,17 @@
                     <div
                       v-for="(item2, index) in k.testid.test"
                       :key="item2.courseId"
-                      @click="lookPrize(item2.courseId)"
                       class="orgData"
                     >
-                      {{ item2.title }}:{{ item2.num }}份
+                      <div @click="lookPrize(item2.courseId)">
+                        {{ item2.title }}:{{ item2.num }}份
+                      </div>
+                      <div
+                        style="color: black;"
+                        @click="goFillIn(item2.courseId)"
+                      >
+                        去填写
+                      </div>
                     </div>
                   </div>
                 </div>
@@ -191,6 +205,7 @@ export default {
       userid: this.$route.query.userid, //用户id
       oid: this.$route.query.oid, //学校id
       org: this.$route.query.org, //组织id
+      role: this.$route.query.role,
       ifmUrl: "", //数据来源地址
       diaIframe: false //数据来源弹框
     };
@@ -206,6 +221,14 @@ export default {
     // console.log(JSON.stringify(this.TeaTabJson));
   },
   methods: {
+    goFillIn(val) {
+      this.$router.push(
+        `/doTest?cid=${val}&userid=${this.userid}&oid=${this.oid}&org=${this.org}&type=3&role=${this.role}`
+      );
+      // this.ifmUrl = `https://beta.pbl.cocorobo.cn/pbl-teacher-table/dist/#/checkToTest?cid=${val}&oid=${this.oid}&org=${this.org}&type=2&role=0&peopleId=${this.userid}`;
+      // this.ifmUrl = `https://beta.pbl.cocorobo.cn/pbl-teacher-table/dist/#/test?userid=${this.userid}&oid=45facc0a-1211-11ec-80ad-005056b86db5&org=&role=0`;
+      // this.diaIframe = true;
+    },
     // 提交
     Submit() {
       if (this.allData.type == 2) {
@@ -286,7 +309,7 @@ export default {
           this.ajax
             .post(this.$store.state.api + "addTestExamineWorks", params)
             .then(res => {
-              console.log('addTestExamineWorks',res);
+              console.log("addTestExamineWorks", res);
               this.getData();
               // console.log();
               // console.log("resresresres", res.data[0]);
@@ -325,28 +348,28 @@ export default {
             let val = JSON.parse(res.data[0][0].json);
 
             this.PageBaseData.forEach(e => {
-              val.forEach(i=>{
-                if (e.id==i.id) {
-                  e.name=i.name
-                  e.children.forEach(a=>{
-                    i.children.forEach(b=>{
-                      if (a.id==b.id) {
-                        a.name=b.name
-                        a.score=b.score
-                        a.sco1=b.sco1
-                        a.sco2=b.sco2
-                        a.evaStandard=b.evaStandard
-                        a.evaMethod=b.evaMethod
-                        a.cogSum=b.cogSum
-                        a.selfSummary=b.selfSummary
-                        a.dep=b.dep
-                        a.type=b.type
-                        a.testid=b.testid
+              val.forEach(i => {
+                if (e.id == i.id) {
+                  e.name = i.name;
+                  e.children.forEach(a => {
+                    i.children.forEach(b => {
+                      if (a.id == b.id) {
+                        a.name = b.name;
+                        a.score = b.score;
+                        a.sco1 = b.sco1;
+                        a.sco2 = b.sco2;
+                        a.evaStandard = b.evaStandard;
+                        a.evaMethod = b.evaMethod;
+                        a.cogSum = b.cogSum;
+                        a.selfSummary = b.selfSummary;
+                        a.dep = b.dep;
+                        a.type = b.type;
+                        a.testid = b.testid;
                       }
-                    })
-                  })
+                    });
+                  });
                 }
-              })
+              });
             });
 
             this.handleData();
@@ -355,7 +378,7 @@ export default {
             this.allData.type = 1;
             this.allData.rjson = "";
             this.handleData();
-            this.tabLoad = false
+            this.tabLoad = false;
           }
           // this.$forceUpdate();
           //  else {