Ver Fonte

初版修改内部人才中心

fengxu há 2 anos atrás
pai
commit
e5b21ac921
3 ficheiros alterados com 99 adições e 131 exclusões
  1. 6 6
      cokingCoal/hr.html
  2. 83 119
      cokingCoal/js/humanResources.js
  3. 10 6
      cokingCoal/js/newIndex.js

+ 6 - 6
cokingCoal/hr.html

@@ -232,15 +232,15 @@
                                 <div class="main_item_left_item" ref="c4"></div>
                                 <div class="main_item_left_item" ref="c5"></div>
                             </div> -->
-                            <div class="main_item_right flex_column">
-                                <div class="right_item">
+                            <div class="main_item_right flex_column" ref="echartsErrorBox">
+                                <div class="right_item" v-for="(item,index) in leftErrorList" :key="index">
                                     <div class="right_item_tit">
                                         <div class="icon_tit"></div>
-                                        <div class="tit_text">{{ leftErrorList[0] }}</div>
+                                        <div class="tit_text">{{ item }}</div>
                                     </div>
-                                    <div class="echarts_dom_else" ref="rightOne"></div>
+                                    <div class="echarts_dom_else" ></div>
                                 </div>
-                                <div class="right_item">
+                                <!-- <div class="right_item">
                                     <div class="right_item_tit">
                                         <div class="icon_tit"></div>
                                         <div class="tit_text">{{ leftErrorList[1] }}</div>
@@ -267,7 +267,7 @@
                                         <div class="tit_text">{{ leftErrorList[4] }}</div>
                                     </div>
                                     <div class="echarts_dom_else" ref="rightFive"></div>
-                                </div>
+                                </div> -->
                             </div>
                         </div>
                     </div>

+ 83 - 119
cokingCoal/js/humanResources.js

@@ -371,7 +371,8 @@ let app = new Vue({
             imageFlag: false,
             pageFlag: true,
             hecharts: null,
-            leftErrorList: ["信息不完整", "信息有误", "任职条件不符", "出勤不足", "工作年限不符"],
+            leftErrorList: [],
+            // leftErrorList: ["信息不完整", "信息有误", "任职条件不符", "出勤不足", "工作年限不符"],
 
             isShowList: true,
             isListEnd: 0,
@@ -415,7 +416,7 @@ let app = new Vue({
     beforeCreate() {
         // 跳转地址
         let AddUrl = location.protocol + "//" + location.host + "/ierp"
-        // return
+        return
         if (!window.location.search) {
             // alert("链接已失效,请重新打开")
             window.location.href = AddUrl
@@ -428,12 +429,18 @@ let app = new Vue({
         window.user = dataList[0]
         let newDate = new Date().getTime()
         let authorityType = window.sessionStorage.getItem("authorityType") || false
+        console.log(newDate);
+        console.log(parseInt(dataList[1]));
+        console.log(newDate - parseInt(dataList[1]) < 30000);
         if (!authorityType) {
             if (newDate - parseInt(dataList[1]) < 30000) {
-                // alert("链接已失效,请重新打开")
-                window.location.href = AddUrl
+                window.sessionStorage.setItem("authorityType", true)
+                return
             }
-            window.sessionStorage.setItem("authorityType", true)
+            // alert("链接已失效,请重新打开")
+            console.log("链接已失效,请重新打开");
+            window.location.href = AddUrl
+
         }
     },
     beforeDestroy() {
@@ -489,33 +496,6 @@ let app = new Vue({
         let that = this;
         this.$nextTick(() => {
 
-
-
-
-
-            // let c1 = this.$refs.c1
-            // this.initRightCycle(c1, 40)
-            // let c2 = this.$refs.c2
-            // this.initRightCycle(c2, 25)
-            // let c3 = this.$refs.c3
-            // this.initRightCycle(c3, 20)
-            // let c4 = this.$refs.c4
-            // this.initRightCycle(c4, 10)
-            // let c5 = this.$refs.c5
-            // this.initRightCycle(c5, 5)
-
-
-
-            // setTimeout(() => {
-            //     let itemContent = document.getElementById("itemContent")
-            //     if (itemContent) {
-            //         let target = itemContent.getElementsByClassName("row-item")
-            //         let targetList = target.item(0)
-            //         targetList.style.background = "#302e2d50"
-            //         targetList.style.color = "#E1AF27"
-            //     }
-            // }, 10)
-
             setInterval(() => {
                 let that = this
                 that.treeList.forEach(item => {
@@ -531,15 +511,48 @@ let app = new Vue({
                 that.treeList[that.treeIndex].flag = true
 
             }, 5000)
-            // setInterval(()=>{
-            //     if(that.configIndex > that.config1.data.length - 1){
-            //         that.configIndex = 0
-            //         return
-            //     } else {
-            //         that.configIndex = that.configIndex + 1
-            //         return
-            //     }
-            // },5000)
+
+            localEnvAppToken().then(res => {
+                localStorage.setItem("app_token", res.app_token)
+                getLocalEnvAccessToken().then(res => {
+                    localStorage.setItem("access_token", res.access_token)
+                    that.getPlayers()
+                    that.getPostDetail()
+
+                    that.getHalfYearDelivcv()
+                    that.getHotDelivcv()
+                    that.arrToListArr()
+                    that.getDelivcvAndApply()
+                    that.getRecruitType()
+                    that.getFailReason()
+                    that.getQualAudits()
+                    that.getNoticePerson()
+                    that.getNotice()
+                    that.getDoubleChoice()
+                    that.getPositionAll()
+                    that.getTotalRate()
+
+                })
+            }).catch(err => {
+                this.isChangeList = true
+                this.isShowInfoList = true
+                let pageBtm = this.$refs.pageBtm
+                this.initDownholeEcharts(pageBtm, { x: admissionList.x, y1: admissionList.y1, y2: admissionList.y2, y3: admissionList.y3 })
+
+                let vita = this.$refs.vita
+                that.initVitaEcharts(vita)
+
+
+                setTimeout(() => {
+                    let itemContent = document.getElementById("itemContent")
+                    if (itemContent) {
+                        let target = itemContent.getElementsByClassName("row-item")
+                        let targetList = target.item(0)
+                        targetList.style.background = "#302e2d50"
+                        targetList.style.color = "#E1AF27"
+                    }
+                }, 10)
+            })
         })
         this.leftTime = setInterval(() => {
             that.leftList.forEach((item, index) => {
@@ -571,58 +584,7 @@ let app = new Vue({
         }, 5000)
 
 
-        localEnvAppToken().then(res => {
-            localStorage.setItem("app_token", res.app_token)
-            getLocalEnvAccessToken().then(res => {
-                localStorage.setItem("access_token", res.access_token)
-                that.getPlayers()
-                that.getPostDetail()
-
-                that.getHalfYearDelivcv()
-                that.getHotDelivcv()
-                that.arrToListArr()
-                that.getDelivcvAndApply()
-                that.getRecruitType()
-                that.getFailReason()
-                that.getQualAudits()
-                that.getNoticePerson()
-                that.getNotice()
-                that.getDoubleChoice()
-                that.getPositionAll()
-                that.getTotalRate()
-
-            })
-        }).catch(err => {
-            this.isChangeList = true
-            this.isShowInfoList = true
-            let pageBtm = this.$refs.pageBtm
-            this.initDownholeEcharts(pageBtm, { x: admissionList.x, y1: admissionList.y1, y2: admissionList.y2, y3: admissionList.y3 })
-
-            let rightOne = this.$refs.rightOne
-            this.initLineRight(rightOne, { value: 18, total: 44 })
-            let rightTwo = this.$refs.rightTwo
-            this.initLineRight(rightTwo, { value: 11, total: 44 })
-            let rightThree = this.$refs.rightThree
-            this.initLineRight(rightThree, { value: 9, total: 44 })
-            let rightFour = this.$refs.rightFour
-            this.initLineRight(rightFour, { value: 4, total: 44 })
-            let rightFive = this.$refs.rightFive
-            this.initLineRight(rightFive, { value: 2, total: 44 })
-
-            let vita = this.$refs.vita
-            that.initVitaEcharts(vita)
 
-
-            setTimeout(() => {
-                let itemContent = document.getElementById("itemContent")
-                if (itemContent) {
-                    let target = itemContent.getElementsByClassName("row-item")
-                    let targetList = target.item(0)
-                    targetList.style.background = "#302e2d50"
-                    targetList.style.color = "#E1AF27"
-                }
-            }, 10)
-        })
     },
     methods: {
         handleClickIcon(item, index) {
@@ -951,9 +913,9 @@ let app = new Vue({
         scrollChange(index) {
             let that = this;
             this.itemClass = "item_content_6",
-            this.rollFlag = false;
+                this.rollFlag = false;
 
-            if(that.noteListIndex >= this.config1.data.length - 1){
+            if (that.noteListIndex >= this.config1.data.length - 1) {
                 that.noteListIndex = 0
                 this.recruitInfoIndex = 0
             } else {
@@ -1050,6 +1012,7 @@ let app = new Vue({
             // if(myChart){
             //     myChart.dispose()
             // }
+            console.log(type);
             let myChart
             if (type) {
                 if (that[type]) {
@@ -2521,20 +2484,19 @@ let app = new Vue({
                     }
                 }
                 setTimeout(() => {
-                    this.recruitInfoList.forEach(item=>{
+                    this.recruitInfoList.forEach(item => {
                         // if(item.content){
                         //     console.log(item.content.split("\n"));
                         // }
-                        item.forEach(i=>{
+                        item.forEach(i => {
                             i.infos = i.content.split("\n").filter(Boolean)
                         })
                     })
-                    console.log(this.recruitInfoList);
                     that.isShowInfoList = true
                 })
             })
         },
-        handleBR(item){
+        handleBR(item) {
             return item
         },
         funChangeList(idnex) {
@@ -2709,7 +2671,9 @@ let app = new Vue({
                         }
                     })
                     let leftChange = that.$refs.leftChange
-                    that.initThreeBig(leftChange)
+                    if (leftChange) {
+                        that.initThreeBig(leftChange)
+                    }
 
                     that.leftTime && clearInterval(that.leftTime)
                     that.leftTime = setInterval(() => {
@@ -2769,17 +2733,16 @@ let app = new Vue({
             let data = {
                 flag: that.dataFlag
             };
-            let rightOne = that.$refs.rightOne
-            let rightTwo = that.$refs.rightTwo
-            let rightThree = that.$refs.rightThree
-            let rightFour = that.$refs.rightFour
-            let rightFive = that.$refs.rightFive
             // leftErrorList:["信息不完整","信息有误","任职条件不符","出勤不足","工作年限不符"]
             fetchPostMethods("/ierp/kapi/v2/mdnb/mdnb_control/FailReason", data).then(res => {
                 if (res) {
                     if (res.data.length != 0) {
                         let dataList = []
                         let total = 0
+                        dataList.forEach(item => {
+                            total = total + item.value
+                        })
+                        that.rightData.push(...dataList)
                         res.data.forEach((item, index) => {
                             item.forEach(i => {
                                 let obj = {}
@@ -2792,24 +2755,25 @@ let app = new Vue({
                                 }
                             })
                         })
-                        dataList.forEach(item => {
-                            total = total + item.value
-                        })
-                        that.rightData.push(...dataList)
-                        that.initLineRight(rightOne, { value: dataList[0].value, total }, "lineRight1")
-                        that.initLineRight(rightTwo, { value: dataList[1].value, total }, "lineRight2")
-                        that.initLineRight(rightThree, { value: dataList[2].value, total }, "lineRight3")
-                        that.initLineRight(rightFour, { value: dataList[3].value, total }, "lineRight4")
-                        that.initLineRight(rightFive, { value: dataList[4].value, total }, "lineRight5")
+                        // for (const child of echartsErrorBox.children) {
+                        //     console.log(child);
+                        //     // let title = "lineRight" + (i + 1)
+                        //     that.initLineRight(child.children[1], { value: dataList[i].value, total })
+                        //     // that.initLineRight(child.children[1], { value: dataList[i].value, total }, title)
+                        // }
+                        let echartsErrorBox = that.$refs.echartsErrorBox
+                        setTimeout(()=>{
+                            for (const child of echartsErrorBox.children) {
+                                const index = Array.prototype.indexOf.call(echartsErrorBox.children, child);
+                                console.log(index);
+                                let title = "lineRight" + (index + 1)
+                                that.initLineRight(child.children[1], { value: dataList[index].value, total }, title)
+                            }
+                        },)
+
                     }
 
                 }
-            }).catch(err => {
-                // that.initLineRight(rightOne, { value: 25, total: 67 }, "lineRight1")
-                // that.initLineRight(rightTwo, { value: 22, total: 67 }, "lineRight2")
-                // that.initLineRight(rightThree, { value: 10, total: 67 }, "lineRight3")
-                // that.initLineRight(rightFour, { value: 8, total: 67 }, "lineRight4")
-                // that.initLineRight(rightFive, { value: 2, total: 67 }, "lineRight5")
             })
         },
         getQualAudits() {

+ 10 - 6
cokingCoal/js/newIndex.js

@@ -527,14 +527,18 @@ let app = new Vue({
             window.user = dataList[0]
             let newDate = new Date().getTime()
             let authorityType = window.sessionStorage.getItem("authorityType") || false
-            console.log(authorityType);
+            console.log(newDate);
+            console.log(parseInt(dataList[1]));
+            console.log(newDate - parseInt(dataList[1]) < 30000);
             if (!authorityType) {
                 if (newDate - parseInt(dataList[1]) < 30000) {
-                    // alert("链接已失效,请重新打开")
-                    console.log(newDate - parseInt(dataList[1]) < 30000);
-                    window.location.href = AddUrl
+                    window.sessionStorage.setItem("authorityType", true)
+                    return
                 }
-                window.sessionStorage.setItem("authorityType", true)
+                // alert("链接已失效,请重新打开")
+                console.log("链接已失效,请重新打开");
+                window.location.href = AddUrl
+
             }
         })
 
@@ -6789,7 +6793,7 @@ let app = new Vue({
                         that.time4 && clearInterval(that.time4);
                         that.timeSy()
                     }
-                } 
+                }