2 کامیت‌ها f9bbefbc77 ... becfa66be7

نویسنده SHA1 پیام تاریخ
  fengxu becfa66be7 修改样式 1 سال پیش
  fengxu 5bfa9cb62e 调整排序 1 سال پیش
4فایلهای تغییر یافته به همراه87 افزوده شده و 36 حذف شده
  1. 7 5
      cokingCoal/hr.html
  2. 77 28
      cokingCoal/js/humanResources.js
  3. 1 1
      cokingCoal/js/newIndex.js
  4. 2 2
      cokingCoal/styles/humanResources.css

+ 7 - 5
cokingCoal/hr.html

@@ -118,7 +118,7 @@
                         <!-- <div class="main_item_title">笔试安排</div> -->
                         <div class="main_item_main" style="height: 100%;">
                             <dv-scroll-board v-if="showExamination" :config="configInterviewElse"
-                                @scroll-change="scrollChangeListW" style="width: 100%; height: 100%" />
+                                @scroll-change="scrollChangeListElse" style="width: 100%; height: 100%" />
                         </div>
                     </div>
                     <!-- <div class="title" style="width: 70%;height: 100px;margin-left: -30%;margin-top: 30px;">面试安排</div> -->
@@ -126,7 +126,7 @@
                         <!-- <div class="main_item_title">面试安排</div> -->
                         <div class="main_item_main" style="height: 100%;">
                             <dv-scroll-board v-if="showInterview" :config="configInterview"
-                                @scroll-change="scrollChangeListIn" style="width: 100%; height: 100%" />
+                                @scroll-change="scrollChangeListW" style="width: 100%; height: 100%" />
                         </div>
                         <!-- <div class="changeTime" @click="handleMonth()">
                                 <img class="humanResources_times" src="./images/humanResources/time.png" alt="">
@@ -139,8 +139,8 @@
             <div class="page_main_center">
                 <img class="page_main_center_image" src="./images/humanResources/tree.png" alt="">
                 <div class="center_top flex_sp">
-                    <div class="center_top_item flex" v-for="(item, index) in mainList" :key="index">
-                        <div class="center_top_image" @click="handleClickIcon(item,index)">
+                    <div class="center_top_item flex" v-for="(item, index) in mainList" :key="index"  @click="handleClickIcon(item,index)">
+                        <div class="center_top_image">
                             <img :src="item.icon" alt="">
                         </div>
                         <div class="center_top_info flex_column">
@@ -325,6 +325,7 @@
                             <!-- </vue-seamless-scroll> -->
                         </div>
                         <div class="main_item_btm flex_sp" v-if="isShowList">
+                        <!-- <div class="main_item_btm flex_sp" v-if="isShowList"> -->
                             <div class="btm_item">
                                 <dv-scroll-board :config="employmentList1" @scroll-change="scrollChangeList"
                                     style="width: 100%; height: 100%" />
@@ -366,7 +367,8 @@
 
                             <!-- </vue-seamless-scroll> -->
                         </div>
-                        <div class="main_item_btm w100" v-if="isShowList" style="width: 100%;height: calc(83%);">
+                        <div class="main_item_btm w100"  style="width: 100%;height: calc(83%);">
+                        <!-- <div class="main_item_btm w100" v-if="isShowList" style="width: 100%;height: calc(83%);"> -->
                             <div class="btm_item w100" style="width: 100%;">
                                 <dv-scroll-board :config="employmentList3" @scroll-change="scrollChangeList"
                                     style="width: 100%; height: 100%" />

+ 77 - 28
cokingCoal/js/humanResources.js

@@ -207,6 +207,7 @@ let app = new Vue({
                 headerBGC: "#69c1ff2d",
                 oddRowBGC: "rgba(105, 193, 255, 0)",
                 evenRowBGC: "#69c1ff21",
+                hoverPause: false,
             },
             configInterviewElse: {
                 waitTime: 2000,
@@ -222,6 +223,7 @@ let app = new Vue({
             },
             configWritten: {
                 waitTime: 2000,
+                hoverPause: false,
                 header: ["序号", "姓名", "地点", "双选单位", "时间"],
                 headerHeight: 55,
                 columnWidth: [90, 120, 170, 200],
@@ -404,12 +406,13 @@ let app = new Vue({
             mianshiTime: null,
             bishiTime: null,
             noteListIndex: 0,
+
+            mianBiTime: null,
         }
     },
     beforeCreate() {
         // 跳转地址
         let AddUrl = location.protocol + "//" + location.host + "/ierp"
-        return
         if (!window.location.search) {
             // alert("链接已失效,请重新打开")
             window.location.href = AddUrl
@@ -422,18 +425,29 @@ 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);
+        // console.log(newDate);
+        // console.log(parseInt(dataList[1]));
+        // console.log(parseInt(dataList[1]) + 30000 >= newDate);
+        // return
+
+        var diff = Math.abs(newDate - parseInt(dataList[1])); // 获取两个时间戳的差值(以毫秒为单位)
+
+        var diffInSeconds = Math.floor(diff / 1000); // 将差值转换为秒数
+
+        let effective = diffInSeconds <= 30; // 判断差值是否在30秒以内
+
+        console.log(diff);
+        console.log(diffInSeconds);
+        console.log(effective);
+
         if (!authorityType) {
-            if (newDate - parseInt(dataList[1]) < 30000) {
+            if (!effective) {
+                console.log("链接已失效,请重新打开");
+                window.location.href = AddUrl
+            } else {
+                console.log("链接未失效")
                 window.sessionStorage.setItem("authorityType", true)
-                return
             }
-            // alert("链接已失效,请重新打开")
-            console.log("链接已失效,请重新打开");
-            window.location.href = AddUrl
-
         }
     },
     beforeDestroy() {
@@ -583,6 +597,8 @@ let app = new Vue({
         handleClickIcon(item, index) {
             let that = this;
             if (index == 1) {
+                that.mianBiTime && clearInterval(that.mianBiTime)
+
                 if (that.showBigList) {
                     that.configInterview.rowNum = 20
                     that.configWritten.rowNum = 20
@@ -600,6 +616,13 @@ let app = new Vue({
                     if (that.roseEcharts) {
                         that.roseEcharts.dispose()
                     }
+
+                    if (that.configInterviewElse.data.length <= that.configInterviewElse.rowNum) {
+                        that.mianBiTime = setInterval(() => {
+                            that.getNoticePerson()
+                        }, 1000 * 60 * 5)
+                    }
+
                     setTimeout(() => {
                         that.showBigList = false
                     }, 10)
@@ -786,7 +809,7 @@ let app = new Vue({
                 },
                 grid,
                 legend: {
-                    data: ["双选人数", "报名人数", "录用人数"],
+                    data: ["需求人数", "报名人数", "录用人数"],
                     align: 'left',
                     itemGap: 50,
                     right: 500,
@@ -849,7 +872,7 @@ let app = new Vue({
                 },
                 series: [{
                     type: 'bar',
-                    name: "双选人数",
+                    name: "需求人数",
                     barWidth: 26,
                     itemStyle: {
                         color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
@@ -2731,9 +2754,9 @@ let app = new Vue({
                     if (res.data.length != 0) {
                         let dataList = []
                         let total = 0
-                        dataList.forEach(item => {
-                            total = total + item.value
-                        })
+                        // dataList.forEach(item => {
+                        //     total = total + item.value
+                        // })
                         that.rightData.push(...dataList)
                         res.data.forEach((item, index) => {
                             item.forEach(i => {
@@ -2744,6 +2767,7 @@ let app = new Vue({
                                 if (i.key == "不通过数量") {
                                     obj.value = i.value
                                     dataList[index] = obj
+                                    total = total + i.value
                                 }
                             })
                         })
@@ -2760,7 +2784,7 @@ let app = new Vue({
                                 let title = "lineRight" + (index + 1)
                                 that.initLineRight(child.children[1], { value: dataList[index].value, total }, title)
                             }
-                        },)
+                        }, 10)
 
                     }
 
@@ -2835,40 +2859,56 @@ let app = new Vue({
                         }
                     }
                     let arr = []
+                    let len = false
                     if (res.bishiList.length != 0) {
-                        arr.push(...res.bishiList)
+                        arr.push(...that.getNo(res.bishiList))
+                        if (arr.length % 2 == 0) {
+                            arr.push([])
+                            len = true
+                        }
                         res.bishiList = []
                         res.bishiList = arr.filter((_, index) => index % 2 === 0);
                         res.mianshiList = arr.filter((_, index) => index % 2 !== 0);
                         that.configInterviewElse.data = [...arr]
+                        if (len) {
+                            that.configInterviewElse.data.pop()
+                        }
                     } else if (res.mianshiList.length != 0) {
-                        arr.push(...res.mianshiList)
+                        arr.push(...that.getNo(res.mianshiList))
+                        if (arr.length % 2 != 0) {
+                            arr.push([])
+                            len = true
+                        }
                         res.mianshiList = []
                         res.bishiList = arr.filter((_, index) => index % 2 === 0);
                         res.mianshiList = arr.filter((_, index) => index % 2 !== 0);
                         that.configInterviewElse.data = [...arr]
+                        if (len) {
+                            that.configInterviewElse.data.pop()
+                        }
                     }
 
+
                     if (type == 1) {
-                        // that.configWritten.data = res.bishiList
-                        that.configWritten.data = that.getNo(res.bishiList)
+                        that.configWritten.data = res.bishiList
+                        // that.configWritten.data = that.getNo(res.bishiList)
                         setTimeout(() => {
                             that.showExamination = true
                         }, 10)
 
                     } else if (type == 2) {
-                        // that.configInterview.data = res.mianshiList
-                        that.configInterview.data = that.getNo(res.mianshiList)
+                        that.configInterview.data = res.mianshiList
+                        // that.configInterview.data = that.getNo(res.mianshiList)
                         setTimeout(() => {
                             that.showInterview = true
                         }, 10)
 
 
                     } else {
-                        // that.configWritten.data = res.bishiList
-                        that.configWritten.data = that.getNo(res.bishiList)
-                        // that.configInterview.data = res.mianshiList
-                        that.configInterview.data = that.getNo(res.mianshiList)
+                        that.configWritten.data = res.bishiList
+                        // that.configWritten.data = that.getNo(res.bishiList)
+                        that.configInterview.data = res.mianshiList
+                        // that.configInterview.data = that.getNo(res.mianshiList)
                         setTimeout(() => {
                             that.showInterview = true
                             that.showExamination = true
@@ -3170,7 +3210,7 @@ let app = new Vue({
         },
         scrollChangeListW(index) {
             let that = this;
-            if (index + 10 == that.configWritten.data.length) {
+            if (index + that.configInterview.rowNum == that.configInterview.data.length) {
                 console.log("笔试更新");
                 setTimeout(() => {
                     that.getNoticePerson(1)
@@ -3179,13 +3219,22 @@ let app = new Vue({
         },
         scrollChangeListIn(index) {
             let that = this;
-            if (index + 10 == that.configInterview.data.length) {
+            if (index + that.configInterview.rowNum == that.configInterview.data.length) {
                 console.log("面试更新");
                 setTimeout(() => {
                     that.getNoticePerson(2)
                 }, 1700)
             }
         },
+        scrollChangeListElse(index) {
+            let that = this;
+            if (index + that.configInterviewElse.rowNum == that.configInterviewElse.data.length) {
+                console.log("面试更新");
+                setTimeout(() => {
+                    that.getNoticePerson()
+                }, 1700)
+            }
+        },
 
     },
 

+ 1 - 1
cokingCoal/js/newIndex.js

@@ -513,7 +513,7 @@ let app = new Vue({
         // 跳转地址
         setTimeout(() => {
             let AddUrl = location.protocol + "//" + location.host + "/ierp"
-            // return
+            return
             if (!window.location.search) {
                 // alert("链接已失效,请重新打开")
                 window.location.href = AddUrl

+ 2 - 2
cokingCoal/styles/humanResources.css

@@ -904,7 +904,7 @@ li {
 }
 
 .right_item_tit {
-    width: 40%;
+    width: 25%;
     height: 100%;
     display: flex;
     justify-content: flex-start;
@@ -926,7 +926,7 @@ li {
 }
 
 .echarts_dom_else {
-    width: 60%;
+    width: 75%;
     height: 100%;
 }