Browse Source

年度考核修改

SanHQin 1 week ago
parent
commit
a52631b772

+ 32 - 9
src/components/pages/test/examine/conpoments/targetPage.vue

@@ -294,7 +294,15 @@ export default {
       //2专任教师 1班主任
       //2专任教师 1班主任
       type: Number,
       type: Number,
       default: 0
       default: 0
-    }
+    },
+    timeA:{
+      type:String,
+      default:""
+    },
+    timeB:{
+      type:String,
+      default:""
+    },
   },
   },
   data() {
   data() {
     return {
     return {
@@ -1337,7 +1345,8 @@ export default {
       //   }
       //   }
       // ],
       // ],
       tableData: [], //弹框数据
       tableData: [], //弹框数据
-      TeachingOptions: []
+      TeachingOptions: [],
+      testExamineBaseList:[],
     };
     };
   },
   },
   computed: {},
   computed: {},
@@ -1345,7 +1354,15 @@ export default {
     pType(newVal, oldVal) {
     pType(newVal, oldVal) {
       this.allData = [];
       this.allData = [];
       this.getPageBase();
       this.getPageBase();
-    }
+    },
+    timeA(){
+      this.allData = [];
+      this.getPageBase();
+    },
+    timeB(){
+      this.allData = [];
+      this.getPageBase();
+    },
   },
   },
   mounted() {
   mounted() {
     this.getPageBase();
     this.getPageBase();
@@ -1394,12 +1411,16 @@ export default {
       let params = {
       let params = {
         typ: this.pType,
         typ: this.pType,
         org: this.org,
         org: this.org,
-        oid: this.oid
+        oid: this.oid,
+        time:this.pType=='1'?this.timeA:this.timeB
       };
       };
       // console.log(params);
       // console.log(params);
       this.ajax
       this.ajax
-        .get(this.$store.state.api + "selectTestExamineBase", params)
+        .get(this.$store.state.api + "selectTestExamineBase2", params)
         .then(res => {
         .then(res => {
+          console.log("xxxxxxxx",res.data)
+          let testExamineBaseList = res.data[0];
+          this.testExamineBaseList = testExamineBaseList;
           this.tableJsonCon = JSON.parse(res.data[0][0].json);
           this.tableJsonCon = JSON.parse(res.data[0][0].json);
 
 
           this.handleData();
           this.handleData();
@@ -1414,10 +1435,11 @@ export default {
       let params = {
       let params = {
         oid: this.oid,
         oid: this.oid,
         org: this.org,
         org: this.org,
-        type: this.pType
+        type: this.pType,
+        tid:this.testExamineBaseList[0].id
       };
       };
       this.ajax
       this.ajax
-        .get(this.$store.state.api + "selectTestExamineAllData", params)
+        .get(this.$store.state.api + "selectTestExamineAllData2", params)
         .then(res => {
         .then(res => {
           // pum是判断审核进度的计数器
           // pum是判断审核进度的计数器
           this.tableJsonCon.forEach(e => {
           this.tableJsonCon.forEach(e => {
@@ -1536,10 +1558,11 @@ export default {
       let params = {
       let params = {
         oid: this.oid,
         oid: this.oid,
         org: this.org,
         org: this.org,
-        type: this.pType
+        type: this.pType,
+        tid:this.testExamineBaseList[0].id
       };
       };
       this.ajax
       this.ajax
-        .get(this.$store.state.api + "selectTestExamineSecondData", params)
+        .get(this.$store.state.api + "selectTestExamineSecondData2", params)
         .then(res => {
         .then(res => {
           let data = res.data[0];
           let data = res.data[0];
           data.forEach(e => {
           data.forEach(e => {

+ 36 - 4
src/components/pages/test/examine/index.vue

@@ -26,6 +26,29 @@
           @change="selectTeaName"
           @change="selectTeaName"
           placeholder="请输入教师姓名"
           placeholder="请输入教师姓名"
         ></el-input>
         ></el-input>
+        <div style="margin: 0 20px;" v-if="timeListA.length>1 && pType == 1 && cutTable!=1">
+          <el-select v-model="timeA" placeholder="请选择">
+            <el-option
+              v-for="item in timeListA"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            >
+            </el-option>
+          </el-select>
+        </div>
+
+        <div style="margin: 0 20px;" v-if="timeListB.length>1 && pType == 2 && cutTable!=1">
+          <el-select v-model="timeB" placeholder="请选择">
+            <el-option
+              v-for="item in timeListB"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            >
+            </el-option>
+          </el-select>
+        </div>
         <div style="margin: 0 20px;">
         <div style="margin: 0 20px;">
           <el-select v-model="cutTable" placeholder="请选择">
           <el-select v-model="cutTable" placeholder="请选择">
             <el-option
             <el-option
@@ -51,7 +74,7 @@
       </div>
       </div>
     </div>
     </div>
     <div class="testCon">
     <div class="testCon">
-      <targetPage :pType="pType" v-if="cutTable == 0"></targetPage>
+      <targetPage :pType="pType" :timeA="timeA" :timeB="timeB" v-if="cutTable == 0"></targetPage>
       <personPage
       <personPage
         ref="child"
         ref="child"
         :pType="pType"
         :pType="pType"
@@ -75,6 +98,10 @@ export default {
     return {
     return {
       aArray: [],
       aArray: [],
       bArray: [],
       bArray: [],
+      timeListA:[],
+      timeListB:[],
+      timeA:"",
+      timeB:"",
       oid: this.$route.query.oid,
       oid: this.$route.query.oid,
       org: this.$route.query.org,
       org: this.$route.query.org,
       pType: 2,
       pType: 2,
@@ -101,17 +128,22 @@ export default {
       let params = {
       let params = {
         typ: type,
         typ: type,
         org: this.org,
         org: this.org,
-        oid: this.oid
+        oid: this.oid,
+        time:""
       };
       };
       this.ajax
       this.ajax
-        .get(this.$store.state.api + "selectTestExamineBase", params)
+        .get(this.$store.state.api + "selectTestExamineBase2", params)
         .then(res => {
         .then(res => {
           console.log('1111111111111111111111', res.data);
           console.log('1111111111111111111111', res.data);
-          
+
           if(type == 1){
           if(type == 1){
             this.aArray = res.data[0];
             this.aArray = res.data[0];
+            this.timeListA = this.aArray.map(i=>{return {value:i.time,label:i.timeLabel}})
+            if(this.timeListA.length>0)this.timeA = this.timeListA[0].value;
           }else {
           }else {
             this.bArray = res.data[0];
             this.bArray = res.data[0];
+            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){
             if(!this.bArray.length){
               this.pType = 1
               this.pType = 1
             }
             }

+ 59 - 13
src/components/pages/testPerson/examine/index.vue

@@ -28,6 +28,31 @@
           v-if="allData.type == 1"
           v-if="allData.type == 1"
           >保存</el-button
           >保存</el-button
         > -->
         > -->
+
+        <div style="margin: 0 20px;" v-if="timeListA.length>1 && pType == 1">
+          <el-select v-model="timeA" placeholder="请选择">
+            <el-option
+              v-for="item in timeListA"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            >
+            </el-option>
+          </el-select>
+        </div>
+
+        <div style="margin: 0 20px;" v-if="timeListB.length>1 && pType == 2">
+          <el-select v-model="timeB" placeholder="请选择">
+            <el-option
+              v-for="item in timeListB"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            >
+            </el-option>
+          </el-select>
+        </div>
+
         <el-button
         <el-button
           v-if="allData.type != 2"
           v-if="allData.type != 2"
           type="primary"
           type="primary"
@@ -210,11 +235,22 @@ export default {
       diaIframe: false, //数据来源弹框
       diaIframe: false, //数据来源弹框
       aArray: [],
       aArray: [],
       bArray: [],
       bArray: [],
+      timeListB:[],
+      timeListA:[],
+      timeA:"",
+      timeB:"",
+      testExamineBaseList:[],
     };
     };
   },
   },
   watch: {
   watch: {
     pType(newVal, oldVal) {
     pType(newVal, oldVal) {
       this.getPageBase();
       this.getPageBase();
+    },
+    timeA(){
+      this.getPageBase();
+    },
+    timeB(){
+      this.getPageBase();
     }
     }
   },
   },
   computed: {},
   computed: {},
@@ -294,7 +330,7 @@ export default {
       this.$confirm("提交后无法修改,是否确定提交?", "提示", {
       this.$confirm("提交后无法修改,是否确定提交?", "提示", {
         confirmButtonText: "确定",
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         cancelButtonText: "取消",
-        type: " info"
+        type: "info"
       })
       })
         .then(() => {
         .then(() => {
           let params = [
           let params = [
@@ -304,11 +340,12 @@ export default {
               org: this.org,
               org: this.org,
               type: this.pType,
               type: this.pType,
               json: JSON.stringify(this.PageBaseData),
               json: JSON.stringify(this.PageBaseData),
-              ttype: 2
+              ttype: 2,
+              tid:this.testExamineBaseList[0].id
             }
             }
           ];
           ];
           this.ajax
           this.ajax
-            .post(this.$store.state.api + "addTestExamineWorks", params)
+            .post(this.$store.state.api + "addTestExamineWorks2", params)
             .then(res => {
             .then(res => {
               this.getData();
               this.getData();
             })
             })
@@ -344,14 +381,15 @@ export default {
           org: this.org,
           org: this.org,
           type: this.pType,
           type: this.pType,
           json: JSON.stringify(PageBaseDataCopy),
           json: JSON.stringify(PageBaseDataCopy),
-          ttype: 1
+          ttype: 1,
+          tid:this.testExamineBaseList[0].id
         }
         }
       ];
       ];
       // return console.log(params);
       // return console.log(params);
       this.ajax
       this.ajax
-        .post(this.$store.state.api + "addTestExamineWorks", params)
+        .post(this.$store.state.api + "addTestExamineWorks2", params)
         .then(res => {
         .then(res => {
-          console.log("addTestExamineWorks", res);
+          console.log("addTestExamineWorks2", res);
           // this.getData();
           // this.getData();
           // this.handleData();
           // this.handleData();
         })
         })
@@ -368,10 +406,11 @@ export default {
       this.tabLoad = true;
       this.tabLoad = true;
       let params = {
       let params = {
         uid: this.userid,
         uid: this.userid,
-        type: this.pType
+        type: this.pType,
+        tid:this.testExamineBaseList[0].id
       };
       };
       this.ajax
       this.ajax
-        .get(this.$store.state.api + "getTestExamineByUserId", params)
+        .get(this.$store.state.api + "getTestExamineByUserId2", params)
         .then(res => {
         .then(res => {
           console.log("getTestExamineByUserId", res);
           console.log("getTestExamineByUserId", res);
 
 
@@ -420,14 +459,16 @@ export default {
       let params = {
       let params = {
         typ: this.pType,
         typ: this.pType,
         org: this.org,
         org: this.org,
-        oid: this.oid
+        oid: this.oid,
+        time:this.pType==1?this.timeA:this.timeB
       };
       };
       this.ajax
       this.ajax
-        .get(this.$store.state.api + "selectTestExamineBase", params)
+        .get(this.$store.state.api + "selectTestExamineBase2", params)
         .then(res => {
         .then(res => {
           // console.log("resresresres", res.data[0]);
           // console.log("resresresres", res.data[0]);
           // this.allData = res.data[0][0];
           // this.allData = res.data[0][0];
-
+          let testExamineBaseList = res.data[0];
+          this.testExamineBaseList = testExamineBaseList;
           console.log("selectTestExamineBase", res.data[0][0]);
           console.log("selectTestExamineBase", res.data[0][0]);
           this.PageBaseData = JSON.parse(res.data[0][0].json);
           this.PageBaseData = JSON.parse(res.data[0][0].json);
           // 先获取基础模板,然后再获取用户又没有填写过,填写过就开始循环赋值给基础模板,最后提交基础模板
           // 先获取基础模板,然后再获取用户又没有填写过,填写过就开始循环赋值给基础模板,最后提交基础模板
@@ -444,15 +485,20 @@ export default {
       let params = {
       let params = {
         typ: type,
         typ: type,
         org: this.org,
         org: this.org,
-        oid: this.oid
+        oid: this.oid,
+        time:type==1?this.timeA:this.timeB
       };
       };
       this.ajax
       this.ajax
-        .get(this.$store.state.api + "selectTestExamineBase", params)
+        .get(this.$store.state.api + "selectTestExamineBase2", params)
         .then(res => {
         .then(res => {
           if(type == 1){
           if(type == 1){
             this.aArray = res.data[0];
             this.aArray = res.data[0];
+            this.timeListA = this.aArray.map(i=>{return {value:i.time,label:i.timeLabel}})
+            if(this.timeListA.length>0)this.timeA = this.timeListA[0].value;
           }else {
           }else {
             this.bArray = res.data[0];
             this.bArray = res.data[0];
+            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){
             if(!this.bArray.length){
               this.pType = 1
               this.pType = 1
             }
             }