ソースを参照

修改人才标准

11wqe1 6 日 前
コミット
932144b0ed
1 ファイル変更15 行追加47 行削除
  1. 15 47
      src/components/pages/liyuan/page/examineperson/index.vue

+ 15 - 47
src/components/pages/liyuan/page/examineperson/index.vue

@@ -5,7 +5,6 @@
       <div class="teaLis">
         <div
           class="teal Tbor"
-          @click="cutPage(2)"
         >
           拔尖人才评估
         </div>
@@ -234,22 +233,13 @@ export default {
   },
   watch: {
     timeB(){
-      this.getPageBase();
+      this.getPageBase2(2);
     }
   },
   computed: {},
-  // activated() {
-  //   // 当组件被激活时调用
-  //   this.getPageBase();
-  //   this.getPageBase2(1)
-  //   this.getPageBase2(2)
-  // },
-  mounted() {
-    // this.getPageBase();
-    // this.getPageBase2(1)
+  activated() {
+    // 当组件被激活时调用
     this.getPageBase2(2)
-
-    // console.log(JSON.stringify(this.TeaTabJson));
   },
   methods: {
     // 禁用滚轮事件
@@ -381,10 +371,7 @@ export default {
           console.log(error);
         });
     },
-    // 切换专任,班主任
-    cutPage(e) {
-      this.pType = e;
-    },
+
     // 获取页面数据
     getData() {
       this.tabLoad = true;
@@ -434,32 +421,7 @@ export default {
           console.log(error);
         });
     },
-    // 获取页面基础ui信息
-    getPageBase() {
-      let params = {
-        typ: this.pType,
-        org: this.org,
-        oid: this.oid,
-        time:this.pType==1?this.timeA:this.timeB
-      };
-      this.ajax
-        .get(this.$store.state.api + "selectTestExamineBase2", params)
-        .then(res => {
-          // console.log("resresresres", res.data[0]);
-          // this.allData = res.data[0][0];
-          let testExamineBaseList = res.data[0];
-          console.log("res.data[0][0]", res.data[0][0]);
-          this.brief = res.data[0][0].brief;
-          this.testExamineBaseList = testExamineBaseList;
-          console.log("selectTestExamineBase", res.data[0][0]);
-          this.PageBaseData = JSON.parse(res.data[0][0].json);
-          // 先获取基础模板,然后再获取用户又没有填写过,填写过就开始循环赋值给基础模板,最后提交基础模板
-          this.getData();
-        })
-        .catch(error => {
-          console.log(error);
-        });
-    },
+
     // 获取页面基础ui信息
     getPageBase2(type) {
       let params = {
@@ -472,11 +434,17 @@ export default {
         .get(this.$store.state.api + "selectTestExamineBase2", params)
         .then(res => {
             this.bArray = res.data[0];
+            this.testExamineBaseList = res.data[0];
+            this.brief = res.data[0][0].brief;
+            this.PageBaseData = JSON.parse(res.data[0][0].json);
+
             this.timeListB = this.bArray.map(i=>{return {value:i.time,label:i.timeLabel}})
             if(this.timeListB.length>0)this.timeB = this.timeListB[0].value;
-            if(!this.bArray.length){
-              this.pType = 1
-            }
+            // if(!this.bArray.length){
+            //   this.pType = 1
+            // }
+            // 先获取基础模板,然后再获取用户又没有填写过,填写过就开始循环赋值给基础模板,最后提交基础模板
+            this.getData();
         })
         .catch(error => {
           console.log(error);
@@ -533,7 +501,7 @@ export default {
     },
     // 关闭弹框
     handleClose(done) {
-      this.getPageBase();
+      this.getPageBase2(2);
       done();
     },
     //保存按钮