fengxu před 1 rokem
rodič
revize
612e6dde3a
2 změnil soubory, kde provedl 36 přidání a 10 odebrání
  1. 30 6
      cokingCoal/js/humanResources.js
  2. 6 4
      cokingCoal/js/newIndex.js

+ 30 - 6
cokingCoal/js/humanResources.js

@@ -406,11 +406,14 @@ let app = new Vue({
 
             listChange: null,
 
+            mianshiTime: null,
+            bishiTime: null,
         }
     },
     beforeCreate() {
         // 跳转地址
         let AddUrl = location.protocol + "//" + location.host + "/ierp"
+        return
         if (!window.location.search) {
             // alert("链接已失效,请重新打开")
             window.location.href = AddUrl
@@ -933,7 +936,7 @@ let app = new Vue({
         },
         scrollChange(index) {
             this.itemClass = "item_content_6",
-            this.rollFlag = false;
+                this.rollFlag = false;
             let listIndex = index
             if (listIndex >= this.config1.data.length) {
                 listIndex = index - 11
@@ -2411,7 +2414,7 @@ let app = new Vue({
                             arr.shift()
                         }
                         arr.forEach(i => {
-                            let infos = i.split("\n")
+                            let infos = i.split("\r")
                             let obj = {
                                 title: infos[0],
                                 content: infos[1]
@@ -2422,12 +2425,10 @@ let app = new Vue({
                     that.config1.data = list
                     that.recruitInfoList.push(...a)
                     that.isShowInfoList = true
-
                     that.itemClass = "item_content_99"
                     if (that.config1.data.length <= that.config1.rowNum) {
                         that.listChange = setInterval(() => {
                             // that.configDataIndex
-                            console.log(that.configDataIndex >= that.config1.data.length);
                             if (that.configDataIndex >= that.config1.data.length) {
                                 that.configDataIndex = 1
                                 that.itemClass = "item_content_99"
@@ -2457,6 +2458,7 @@ let app = new Vue({
                         }, 5000);
                     }
                     that.funChangeList(0)
+                    // console.log(that.recruitInfoList);
 
                 } else {
                     that.config1.data = list
@@ -2648,7 +2650,6 @@ let app = new Vue({
             fetchPostMethods("/ierp/kapi/v2/mdnb/mdnb_control/FailReason", data).then(res => {
                 if (res) {
                     if (res.data.length != 0) {
-                        console.log(res.data);
                         let dataList = []
                         let total = 0
                         res.data.forEach((item, index) => {
@@ -2761,11 +2762,14 @@ let app = new Vue({
                         setTimeout(() => {
                             that.showExamination = true
                         }, 10)
+
                     } else if (type == 2) {
                         that.configInterview.data = that.getNo(res.mianshiList)
                         setTimeout(() => {
                             that.showInterview = true
                         }, 10)
+
+
                     } else {
                         that.configWritten.data = that.getNo(res.bishiList)
                         that.configInterview.data = that.getNo(res.mianshiList)
@@ -2773,6 +2777,20 @@ let app = new Vue({
                             that.showInterview = true
                             that.showExamination = true
                         }, 10)
+                        if (that.configWritten.data.length <= that.configWritten.rowNum) {
+                            that.bishiTime && clearInterval(that.bishiTime)
+                            that.bishiTime = setInterval(() => {
+                                console.log("笔试面试数据更新");
+                                that.getNoticePerson(1)
+                            }, (10000 * 6 * 5))
+                        }
+                        if (that.configInterview.data.length <= that.configInterview.rowNum) {
+                            that.mianshiTime && clearInterval(that.mianshiTime)
+                            that.mianshiTime = setInterval(() => {
+                                console.log("笔试面试数据更新");
+                                that.getNoticePerson(2)
+                            }, (10000 * 6 * 5))
+                        }
                     }
 
                 }
@@ -2855,7 +2873,7 @@ let app = new Vue({
             that.noticIndex = 0
             that.noticList = []
             fetchPostMethods("/ierp/kapi/v2/mdnb/mdnb_control/getNotice", data).then(res => {
-                if (res) {
+                if (res && res.length != 0) {
                     res.forEach((item, index) => {
                         let obj = {
                             noticeDataList: item.noticeDataList,
@@ -2863,6 +2881,7 @@ let app = new Vue({
                         }
                         that.noticList.push(obj)
                     })
+                    // if (that.noticList[that.noticIndex]) {
                     that.noticList[that.noticIndex].noticeUserList.forEach((item, index) => {
                         if (index % 2 == 0) {
                             that.employmentList1.data.push(item)
@@ -2871,6 +2890,8 @@ let app = new Vue({
                         }
                     })
                     that.employmentList3.data.push(...that.noticList[that.noticIndex].noticeUserList)
+
+                    // }
                     if (res.length != 1) {
                         that.noticIndex += 1
 
@@ -2882,6 +2903,7 @@ let app = new Vue({
 
 
                                 that.isShowList = false
+                                // if(that.noticList[that.noticIndex]){
                                 that.noticList[that.noticIndex].noticeUserList.forEach((item, index) => {
                                     if (index % 2 == 0) {
                                         that.employmentList1.data.push(item)
@@ -2890,6 +2912,8 @@ let app = new Vue({
                                     }
                                 })
                                 that.employmentList3.data.push(...that.noticList[that.noticIndex].noticeUserList)
+                                // }
+
                                 that.noticIndex += 1
 
                                 if (that.noticIndex > that.noticList.length - 1) {

+ 6 - 4
cokingCoal/js/newIndex.js

@@ -513,6 +513,7 @@ let app = new Vue({
         // 跳转地址
         setTimeout(() => {
             let AddUrl = location.protocol + "//" + location.host + "/ierp"
+            return
             if (!window.location.search) {
                 // alert("链接已失效,请重新打开")
                 window.location.href = AddUrl
@@ -570,8 +571,8 @@ let app = new Vue({
         },
     },
     mounted() {
-        let data 
-        if(new Date().getMonth() <= 9){
+        let data
+        if (new Date().getMonth() <= 9) {
             data = "0" + new Date().getMonth()
         } else {
             data = new Date().getMonth()
@@ -6742,7 +6743,7 @@ let app = new Vue({
             fetchPostMethods("/ierp/kapi/v2/mdnb/mdnb_control/getCalSalary", data).then(res => {
                 if (res) {
                     // leftEndList = res.data
-                    if(res.lastyear.x.length != 0){
+                    if (res.lastyear.x.length != 0) {
                         x = res.lastyear.x
                     } else {
                         x = res.thisyear.x
@@ -6763,9 +6764,10 @@ let app = new Vue({
 
                     }
 
+                } else {
+                    that.initBarEchartsElse(leftEnd, leftEndList, ["累计月平均工资", "同期累计月平均工资"])
                 }
 
-                that.initBarEchartsElse(leftEnd, leftEndList, ["累计月平均工资", "同期累计月平均工资"])
             })
         },
         getCalSalary1() {