Browse Source

调整正式环境及测试

fengxu 1 year ago
parent
commit
d9f679b3f2
3 changed files with 247 additions and 167 deletions
  1. 4 4
      cokingCoal/hr.html
  2. 210 128
      cokingCoal/js/humanResources.js
  3. 33 35
      cokingCoal/js/newIndex.js

+ 4 - 4
cokingCoal/hr.html

@@ -76,11 +76,11 @@
                             <p class="item_title">{{ rollTitle }}</p>
                             <!-- <vue-seamless-scroll v-if="rollFlag" :data="listData" class="warp" :classOption="classOption"> -->
                             <div class="item">
-                                <!-- <div class="item_con" v-for="(item,index) in recruitInfoList[recruitInfoIndex]">
+                                <div class="item_con" v-for="(item,index) in recruitInfoList[recruitInfoIndex]">
                                     <span>{{ item.title }}</span>
                                     <span>{{ item.content }}</span>
-                                </div> -->
-                                <p class="item_con">
+                                </div>
+                                <!-- <p class="item_con">
                                     <span>一、双选原则</span>
                                     <span>公开报名、集中面试,公平竞争、择优录用。</span>
                                 </p>
@@ -115,7 +115,7 @@
                                     <span>八、有关说明</span>
                                     <span>(一)每位应聘者只可投报一个单位,请勿重复或多次报名。<br>
                                         (二)应聘者须如实提供有关信息和材料,凡因本人填写信息错误而导致的一切后果自行承担;如有弄虚作假行为,一经查实即取消应聘资格。</span>
-                                </p>
+                                </p> -->
                             </div>
                             <!-- </vue-seamless-scroll> -->
                         </div>

+ 210 - 128
cokingCoal/js/humanResources.js

@@ -394,35 +394,45 @@ let app = new Vue({
 
             configDataIndex: 1,
 
-            itemClass: "item_content_6_false"
+            itemClass: "item_content_6_false",
+            dataFlag: true,
+
+            lineRight1: null,
+            lineRight2: null,
+            lineRight3: null,
+            lineRight4: null,
+            lineRight5: null,
+
+            listChange: null,
+
+
 
         }
     },
     beforeCreate() {
         // 跳转地址
-        let AddUrl = window.location.href = location.protocol + "//" + location.host + "/ierp"
-
-        if(!window.location.search){
-            alert("链接已失效,请重新打开")
+        let AddUrl = location.protocol + "//" + location.host + "/ierp"
+        if (!window.location.search) {
+            // alert("链接已失效,请重新打开")
             window.location.href = AddUrl
         }
         let arr = window.location.search.split("&")
         let dataList = []
-        arr.forEach(item=>{
+        arr.forEach(item => {
             dataList.push(item.split("=")[1])
         })
         window.user = dataList[0]
         let newDate = new Date().getTime()
         let authorityType = window.sessionStorage.getItem("authorityType") || false
-        if(!authorityType){
-            if(newDate - dataList[1] > 30000){
-                alert("链接已失效,请重新打开")
+        if (!authorityType) {
+            if (newDate - dataList[1] > 30000) {
+                // alert("链接已失效,请重新打开")
                 window.location.href = AddUrl
             }
             window.sessionStorage.setItem("authorityType", true)
         }
     },
-    beforeDestroy(){
+    beforeDestroy() {
         window.sessionStorage.removeItem("authorityType")
     },
     created() {
@@ -593,7 +603,7 @@ let app = new Vue({
     methods: {
         handleClickIcon(item, index) {
             let that = this;
-            if (index == 0) {
+            if (index == 1) {
                 if (that.showBigList) {
                     that.configInterview.rowNum = 10
                     that.configWritten.rowNum = 10
@@ -650,7 +660,6 @@ let app = new Vue({
 
                 setTimeout(() => {
                     if (that.showBigList) {
-
                         let total = 0
                         that.rightData.forEach(item => {
                             total = total + item.value
@@ -662,6 +671,50 @@ let app = new Vue({
                     }
                 }, 15)
 
+            } else {
+                // that.showBigList =  true
+                that.dataFlag = !that.dataFlag
+                that.leftTime && clearInterval(that.leftTime)
+                that.leftTime = setInterval(() => {
+                    that.leftList.forEach((item, index) => {
+                        item.flag = !item.flag
+                        if (item.flag) {
+                            if (index == 0) {
+                                that.leftFlag = true
+                            } else {
+                                that.leftFlag = false
+                                setTimeout(() => {
+                                    let leftChange = that.$refs.leftChange
+                                    that.initThreeBig(leftChange)
+                                })
+                            }
+                        }
+                    })
+                }, 15000)
+                that.rightTime && clearInterval(that.rightTime)
+                that.rightTime = setInterval(() => {
+                    that.rightList.forEach((item, index) => {
+                        item.flag = !item.flag
+                        if (item.flag) {
+                            that.rightIndex = index
+                        }
+                    })
+                }, 5000)
+                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()
             }
         },
         // 监听键盘
@@ -719,6 +772,9 @@ let app = new Vue({
         },
 
         initDownholeEcharts(el, data) {
+            if (this.downhole) {
+                this.downhole.dispose()
+            }
             this.downhole = echarts.init(el);
             let series = []
             let grid = {
@@ -951,9 +1007,20 @@ let app = new Vue({
 
             chat.setOption(option)
         },
-        initLineRight(el, data) {
+        initLineRight(el, data, type) {
             let that = this;
-            let myChart = echarts.init(el);
+            // if(myChart){
+            //     myChart.dispose()
+            // }
+            let myChart
+            if (type) {
+                if (that[type]) {
+                    that[type].dispose()
+                }
+                that[type] = echarts.init(el);
+            } else {
+                myChart = echarts.init(el);
+            }
             let nameList = ["a"];
             let valueList = [data.value];
             let total = data.total; // 数据总数
@@ -981,6 +1048,7 @@ let app = new Vue({
             });
             var totalList = [];
             var totalBorderList = [];
+
             nameList.map((item, index) => {
                 totalList.push({
                     value: total,
@@ -1171,10 +1239,18 @@ let app = new Vue({
             //   loopSeries: true,
             // });
             //注册
-            myChart.setOption(option);
+            if (type) {
+                that[type].setOption(option);
+            } else {
+                myChart.setOption(option);
+            }
+
         },
         initVitaEcharts(el, data) {
             let that = this;
+            if (this.vitaEcharts) {
+                this.vitaEcharts.dispose()
+            }
             this.vitaEcharts = echarts.init(el)
             let dataList = [...that.vitaData.y]
             let max = dataList.sort(function (a, b) {
@@ -2289,7 +2365,7 @@ let app = new Vue({
         getPlayers() {
             let that = this;
             let data = {
-                flag: true
+                flag: that.dataFlag
             };
             fetchPostMethods("/ierp/kapi/v2/mdnb/mdnb_control/Players", data).then(res => {
                 if (res) {
@@ -2300,59 +2376,75 @@ let app = new Vue({
         getPostDetail() {
             let that = this;
             let data = {
-                flag: true
+                flag: that.dataFlag
             };
+            that.isShowInfoList = false
+            that.recruitInfoIndex = 0
+            that.recruitInfoList = []
+            that.rollTitle = ""
+            that.listChange && clearInterval(that.listChange)
             fetchPostMethods("/ierp/kapi/v2/mdnb/mdnb_control/PostDetail", data).then(res => {
                 let list = []
                 let a = []
-                res.data.forEach((item, index) => {
-                    list.push([item[0], item[1], item[2], item[3], item[4]])
-                    a[index] = []
-                    item[5].split("&").forEach(i => {
-                        let infos = i.split("\r\n")
-                        let obj = {
-                            title: infos[0],
-                            content: infos[1]
-                        }
-                        a[index].push(obj)
+                if (res.data.length != 0) {
+                    res.data.forEach((item, index) => {
+                        list.push([item[0], item[1], item[2], item[3], item[4]])
+                        a[index] = []
+                        item[5].split("&").forEach(i => {
+                            let infos = i.split("\r\n")
+                            let obj = {
+                                title: infos[0],
+                                content: infos[1]
+                            }
+                            a[index].push(obj)
+                        })
                     })
-                })
-                that.config1.data = list
-                that.recruitInfoList.push(...a)
-                that.isShowInfoList = true
-
-                that.itemClass = "item_content_99"
-                if (that.config1.data.length <= that.config1.rowNum) {
-                    setInterval(() => {
-
-                        // that.configDataIndex
-                        if (that.configDataIndex >= that.config1.data.length) {
-                            that.configDataIndex = 1
-                            that.itemClass = "item_content_99"
-                            that.funChangeList(0)
-                            return
-                        }
-                        that.itemClass = "item_content_" + (that.configDataIndex + 5)
-                        that.funChangeList(that.configDataIndex)
-                        // console.log(that.itemClass);
-                        that.configDataIndex += 1
-                    }, that.config1.waitTime)
-                } else {
-                    setTimeout(() => {
-                        // that.classChange = true
-                        that.itemClass = "item_content_6"
-                        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"
+                    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
+                            if (that.configDataIndex >= that.config1.data.length) {
+                                that.configDataIndex = 1
+                                that.itemClass = "item_content_99"
+                                that.funChangeList(0)
+                                return
                             }
+                            that.itemClass = "item_content_" + (that.configDataIndex + 5)
+                            that.funChangeList(that.configDataIndex)
+                            // console.log(that.itemClass);
+                            that.configDataIndex += 1
+                            that.recruitInfoIndex = that.configDataIndex
+                        }, that.config1.waitTime)
+                    } else {
+                        setTimeout(() => {
+                            // that.classChange = true
+                            that.itemClass = "item_content_6"
+                            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"
+                                }
 
-                        }, 0)
-                    }, 5000);
+                            }, 0)
+                        }, 5000);
+                    }
+                    that.funChangeList(0)
+
+                } else {
+                    that.config1.data = list
+                    that.listChange && clearInterval(that.listChange)
                 }
+                setTimeout(() => {
+                    that.isShowInfoList = true
+                })
             })
 
 
@@ -2369,7 +2461,7 @@ let app = new Vue({
         getHalfYearDelivcv() {
             let that = this;
             let data = {
-                flag: true
+                flag: that.dataFlag
             };
             fetchPostMethods("/ierp/kapi/v2/mdnb/mdnb_control/HalfYearDelivcv", data).then(res => {
                 if (res) {
@@ -2400,7 +2492,7 @@ let app = new Vue({
         getHotDelivcv() {
             let that = this;
             let data = {
-                flag: true
+                flag: that.dataFlag
             };
             fetchPostMethods("/ierp/kapi/v2/mdnb/mdnb_control/HotDelivcv", data).then(res => {
                 if (res) {
@@ -2415,7 +2507,7 @@ let app = new Vue({
 
             let that = this;
             let data = {
-                flag: true
+                flag: that.dataFlag
             }
             fetchPostMethods("/ierp/kapi/v2/mdnb/mdnb_control/Delivcv", data).then(res => {
                 let imageList = []
@@ -2453,7 +2545,7 @@ let app = new Vue({
         getDelivcvAndApply() {
             let that = this;
             let data = {
-                flag: true,
+                flag: that.dataFlag,
                 data1: that.timeList1[0],
                 data2: that.timeList1[1]
             };
@@ -2502,8 +2594,9 @@ let app = new Vue({
         getRecruitType() {
             let that = this;
             let data = {
-                flag: true
+                flag: that.dataFlag
             }
+            that.recruitTypeList = []
             fetchPostMethods("/ierp/kapi/v2/mdnb/mdnb_control/RecruitType", data).then(res => {
                 if (res) {
                     res.data.forEach(item => {
@@ -2516,61 +2609,62 @@ let app = new Vue({
         getFailReason() {
             let that = this;
             let data = {
-                flag: true
+                flag: that.dataFlag
             };
-            let rightOne = this.$refs.rightOne
-            let rightTwo = this.$refs.rightTwo
-            let rightThree = this.$refs.rightThree
-            let rightFour = this.$refs.rightFour
-            let rightFive = this.$refs.rightFive
+            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) {
-                    let dataList = []
-                    let total = 0
-                    res.data.forEach((item, index) => {
-                        // that.leftErrorList[index] = item[]
-                        item.forEach(i => {
-                            let obj = {}
-                            if (i.key == "不通过原因") {
-                                that.leftErrorList[index] = i.value
-                            }
-                            if (i.key == "不通过数量") {
-                                obj.value = i.value
-                                dataList[index] = obj
-                            }
+                    if (res.data.length != 0) {
+                        console.log(res.data);
+                        let dataList = []
+                        let total = 0
+                        res.data.forEach((item, index) => {
+                            item.forEach(i => {
+                                let obj = {}
+                                if (i.key == "不通过原因") {
+                                    that.leftErrorList[index] = i.value
+                                }
+                                if (i.key == "不通过数量") {
+                                    obj.value = i.value
+                                    dataList[index] = obj
+                                }
+                            })
                         })
-                    })
-                    dataList.forEach(item => {
-                        total = total + item.value
-                    })
-                    that.rightData.push(...dataList)
-                    that.initLineRight(rightOne, { value: dataList[0].value, total })
-                    that.initLineRight(rightTwo, { value: dataList[1].value, total })
-                    that.initLineRight(rightThree, { value: dataList[2].value, total })
-                    that.initLineRight(rightFour, { value: dataList[3].value, total })
-                    that.initLineRight(rightFive, { value: dataList[4].value, total })
-
-
-                    // that.initLineRight(rightOne, { value: 25, total: 67 })
-                    // that.initLineRight(rightTwo, { value: 22, total: 67 })
-                    // that.initLineRight(rightThree, { value: 10, total: 67 })
-                    // that.initLineRight(rightFour, { value: 8, total: 67 })
-                    // that.initLineRight(rightFive, { value: 2, total: 67 })
+                        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")
+                    } else {
+                        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")
+                    }
 
                 }
             }).catch(err => {
-                that.initLineRight(rightOne, { value: 25, total: 67 })
-                that.initLineRight(rightTwo, { value: 22, total: 67 })
-                that.initLineRight(rightThree, { value: 10, total: 67 })
-                that.initLineRight(rightFour, { value: 8, total: 67 })
-                that.initLineRight(rightFive, { value: 2, total: 67 })
+                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() {
             let that = this;
             let data = {
-                flag: true
+                flag: that.dataFlag
             };
             fetchPostMethods("/ierp/kapi/v2/mdnb/mdnb_control/QualAudits", data).then(res => {
                 if (res) {
@@ -2587,19 +2681,7 @@ let app = new Vue({
                     })
                 }
             })
-            // rightList: [{
-            //     name: "当前数",
-            //     flag: true,
-            //     num1: 100,
-            //     num2: 60,
-            //     num3: 60,
-            // }, {
-            //     name: "累计数",
-            //     flag: false,
-            //     num1: 500,
-            //     num2: 400,
-            //     num3: 80,
-            // }],
+
         },
         getNo(arr) {
             if (Array.isArray(arr)) {
@@ -2625,7 +2707,7 @@ let app = new Vue({
             }
             let year = new Date().getFullYear()
             let data = {
-                flag: true,
+                flag: that.dataFlag,
                 year,
                 month: 0
             }
@@ -2634,7 +2716,7 @@ let app = new Vue({
                     for (let key in res) {
                         if (Array.isArray(res[key])) {
                             res[key].forEach(item => {
-                                item.splice(item.length - 2, 1);
+                                // item.splice(item.length - 2, 1);
                                 item[item.length - 1] = item[item.length - 1].replaceAll("年", "-")
                                 item[item.length - 1] = item[item.length - 1].replaceAll("月", "-")
                                 item[item.length - 1] = item[item.length - 1].replaceAll("日", " ")
@@ -2731,7 +2813,7 @@ let app = new Vue({
         getNotice() {
             let that = this;
             let data = {
-                flag: true
+                flag: that.dataFlag
             };
             this.isShowList = false
 
@@ -2740,7 +2822,7 @@ let app = new Vue({
             that.employmentList3.data = []
 
             that.noticIndex = 0
-
+            that.noticList = []
             fetchPostMethods("/ierp/kapi/v2/mdnb/mdnb_control/getNotice", data).then(res => {
                 if (res) {
                     res.forEach((item, index) => {
@@ -2800,7 +2882,7 @@ let app = new Vue({
         getDoubleChoice() {
             let that = this;
             let data = {
-                flag: true
+                flag: that.dataFlag
             }
             fetchPostMethods("/ierp/kapi/v2/mdnb/mdnb_control/DoubleChoice", data).then(res => {
                 if (res) {
@@ -2811,7 +2893,7 @@ let app = new Vue({
         getPositionAll() {
             let that = this;
             let data = {
-                flag: true,
+                flag: that.dataFlag,
                 start: that.timeList2[0],
                 end: that.timeList2[1],
             }
@@ -2902,7 +2984,7 @@ let app = new Vue({
         getTotalRate() {
             let that = this;
             let data = {
-                flag: true
+                flag: that.dataFlag
             };
             fetchPostMethods("/ierp/kapi/v2/mdnb/mdnb_control/TotalRate", data).then(res => {
                 if (res) {

+ 33 - 35
cokingCoal/js/newIndex.js

@@ -508,11 +508,9 @@ let app = new Vue({
     },
     beforeCreate() {
         // 跳转地址
-        let AddUrl = window.location.href = location.protocol + "//" + location.host + "/ierp"
-
-
+        let AddUrl  = location.protocol + "//" + location.host + "/ierp"
         if(!window.location.search){
-            alert("链接已失效,请重新打开")
+            // alert("链接已失效,请重新打开")
             window.location.href = AddUrl
         }
         let arr = window.location.search.split("&")
@@ -525,7 +523,7 @@ let app = new Vue({
         let authorityType = window.sessionStorage.getItem("authorityType") || false
         if(!authorityType){
             if(newDate - dataList[1] > 30000){
-                alert("链接已失效,请重新打开")
+                // alert("链接已失效,请重新打开")
                 window.location.href = AddUrl
             }
             window.sessionStorage.setItem("authorityType", true)
@@ -5917,41 +5915,41 @@ let app = new Vue({
             let userList = [];
             fetchPostMethods("/ierp/kapi/v2/mdnb/mdnb_control/Collegestudy", data).then(res => {
                 if (res) {
-                    // res.data.forEach(item => {
-                    //     if (item.key == "产学研合作高校数量") {
-                    //         that.schoolList2[0].value = item.value
-                    //     }
+                    res.data.forEach(item => {
+                        if (item.key == "产学研合作高校数量") {
+                            that.schoolList2[0].value = item.value
+                        }
 
-                    //     if (item.key == "产学研成果数量") {
-                    //         that.schoolList2[1].value = item.value
-                    //     }
+                        if (item.key == "产学研成果数量") {
+                            that.schoolList2[1].value = item.value
+                        }
 
-                    //     if (item.key == "项目名称") {
-                    //         proList = item.value
-                    //     }
+                        if (item.key == "项目名称") {
+                            proList = item.value
+                        }
 
-                    //     if (item.key == "合作高校") {
-                    //         schList = item.value
-                    //     }
+                        if (item.key == "合作高校") {
+                            schList = item.value
+                        }
 
-                    //     if (item.key == "合作类型") {
-                    //         typeList = item.value
-                    //     }
+                        if (item.key == "合作类型") {
+                            typeList = item.value
+                        }
 
-                    //     if (item.key == "主要成效") {
-                    //         userList = item.value
-                    //     }
-                    //     that.fList = []
-                    //     proList.forEach((i, k) => {
-                    //         let obj = {
-                    //             project: i,
-                    //             school: schList[k],
-                    //             type: typeList[k],
-                    //             merits: userList[k],
-                    //         }
-                    //         that.fList.push(obj)
-                    //     })
-                    // })
+                        if (item.key == "主要成效") {
+                            userList = item.value
+                        }
+                        that.fList = []
+                        proList.forEach((i, k) => {
+                            let obj = {
+                                project: i,
+                                school: schList[k],
+                                type: typeList[k],
+                                merits: userList[k],
+                            }
+                            that.fList.push(obj)
+                        })
+                    })
                 }
             })
         },