Selaa lähdekoodia

修改样式布局及数据显示

fengxu 1 vuosi sitten
vanhempi
commit
cfae224858

+ 5 - 5
cokingCoal/hr.html

@@ -76,11 +76,11 @@
                             <p class="item_title">{{ rollTitle }}</p>
 
                             <vue-seamless-scroll :data="listData" class="warp" >
-                                <div class="item" v-if="rollFlag" style="margin-bottom: 250px;">
-                                    <div class="item_con" v-for="(item,index) in recruitInfoList[recruitInfoIndex]">
-                                        <span class="note_title" v-if="item.title != ''">{{ item.title }}</span>
+                                <div class="item" v-if="rollFlag" style="margin-bottom: 950px;">
+                                    <div class="item_con"  v-for="(item,index) in recruitInfoList[recruitInfoIndex]">
+                                        <span class="note_title"  v-if="item.title != ''">{{ item.title }}</span>
                                         <!-- <span>{{ handleBR(item.content) }}</span> -->
-                                        <span class="note_info" v-for="(i,z) in item.infos">
+                                        <span class="note_info"  v-for="(i,z) in item.infos">
                                             {{ i }}
                                         </span>
                                     </div>
@@ -331,7 +331,7 @@
                                     style="width: 100%; height: 100%" />
                             </div>
                             <div class="btm_item">
-                                <dv-scroll-board :config="employmentList2" @scroll-change="scrollChangeList"
+                                <dv-scroll-board :config="employmentList2" 
                                     style="width: 100%; height: 100%" />
                             </div>
                         </div>

+ 73 - 63
cokingCoal/js/humanResources.js

@@ -413,6 +413,8 @@ let app = new Vue({
     beforeCreate() {
         // 跳转地址
         let AddUrl = location.protocol + "//" + location.host + "/ierp"
+        // return
+
         if (!window.location.search) {
             // alert("链接已失效,请重新打开")
             window.location.href = AddUrl
@@ -439,7 +441,7 @@ let app = new Vue({
         console.log(diff);
         console.log(diffInSeconds);
         console.log(effective);
-
+        debugger
         if (!authorityType) {
             if (!effective) {
                 console.log("链接已失效,请重新打开");
@@ -1024,10 +1026,8 @@ let app = new Vue({
             chat.setOption(option)
         },
         initLineRight(el, data, type) {
+            console.log(data);
             let that = this;
-            // if(myChart){
-            //     myChart.dispose()
-            // }
             let myChart
             if (type) {
                 if (that[type]) {
@@ -1206,12 +1206,12 @@ let app = new Vue({
                                 }
                                 if (params.value >= 10) {
                                     if (((params.value / total) * 100).toFixed(0) < 10) {
-                                        text = `${("  " + params.value)}人  |  ${(((params.value) / total) * 100).toFixed(0)}%`;
+                                        text = `${("  " + params.value)}人  |  ${data.point}`;
                                     } else {
-                                        text = `${(params.value)}人  |  ${(((params.value) / total) * 100).toFixed(0)}%`;
+                                        text = `${(params.value)}人  |  ${data.point}`;
                                     }
                                 } else {
-                                    text = `${("  " + params.value)}人  |  ${(((params.value) / total) * 100).toFixed(0)}%`;
+                                    text = `${("  " + params.value)}人  |  ${data.point}`;
                                 }
                                 return text;
                             },
@@ -2757,13 +2757,16 @@ let app = new Vue({
                         // dataList.forEach(item => {
                         //     total = total + item.value
                         // })
-                        that.rightData.push(...dataList)
+                        // that.rightData.push(...dataList)
                         res.data.forEach((item, index) => {
+                            let obj = {}
                             item.forEach(i => {
-                                let obj = {}
                                 if (i.key == "不通过原因") {
                                     that.leftErrorList[index] = i.value
                                 }
+                                if (i.key == "百分比") {
+                                    obj.point = i.value
+                                }
                                 if (i.key == "不通过数量") {
                                     obj.value = i.value
                                     dataList[index] = obj
@@ -2771,18 +2774,12 @@ let app = new Vue({
                                 }
                             })
                         })
-                        // 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);
                                 let title = "lineRight" + (index + 1)
-                                that.initLineRight(child.children[1], { value: dataList[index].value, total }, title)
+                                that.initLineRight(child.children[1], { value: dataList[index].value, point: dataList[index].point, total }, title)
                             }
                         }, 10)
 
@@ -2933,32 +2930,38 @@ let app = new Vue({
         },
         scrollChangeList(index) {
             let that = this;
-            that.noticTime && clearInterval(that.noticTime)
-            setTimeout(() => {
-                if (index + 5 == that.employmentList1.data.length) {
-                    that.isListEnd = that.isListEnd + 1
-                    if (that.isListEnd == 2) {
-                        that.isListEnd = 0
-                        that.isShowList = false
+            if (that.noticList.length != 1) {
+                if (index + that.employmentList1.rowNum == that.employmentList1.data.length + 1) {
+                    if (that.noticIndex >= that.noticList.length - 1) {
+                        that.noticIndex = 0
+                    } else {
+                        that.noticIndex += 1
+                    }
+
+                    if (that.noticList[that.noticIndex]) {
+
                         that.employmentList1.data = []
                         that.employmentList2.data = []
-                        that.noticeIndex = that.noticeIndex + 1
-                        if (that.noticeIndex > that.noticeList.length - 1) {
-                            that.noticeIndex = 0
+                        that.employmentList3.data = []
+                        that.isShowList = false
+                        that.noticList[that.noticIndex].noticeUserList.forEach((item, index) => {
+                            if (index % 2 == 0) {
+                                that.employmentList1.data.push(item)
+                            } else {
+                                that.employmentList2.data.push(item)
+                            }
+                        })
+                        that.employmentList3.data.push(...that.noticList[that.noticIndex].noticeUserList)
+                        if (that.employmentList1.rowNum >= that.employmentList1.data.length) {
+                            setTimeout(() => {
+                                that.scrollChangeList(0)
+                            }, 10000)
                         }
-                        // that.getNoticePerson("李四是五")
                         setTimeout(() => {
                             that.isShowList = true
                         }, 10)
-
                     }
                 }
-            }, 1700)
-            if (index == 0) {
-                console.log("index == 0");
-            }
-            if (index == that.employmentList1.data.length - 1) {
-
             }
         },
         changeCardNo(str) {
@@ -2984,10 +2987,14 @@ let app = new Vue({
             if (Array.isArray(arr)) {
                 arr.forEach((item, index) => {
                     let a = []
+                    if (Array.isArray(item)) {
+                        list.push(a)
+                        return
+                    }
                     if (index <= 8) {
-                        a = ["0" + (index + 1), item.name, item.sex, that.changeCardNo(item.cardno), item.org1]
+                        a = ["0" + (index + 1), item.name, item.sex, item.cardno, item.org1]
                     } else {
-                        a = [(index + 1).toString(), item.name, item.sex, that.changeCardNo(item.cardno), item.org1]
+                        a = [(index + 1).toString(), item.name, item.sex, item.cardno, item.org1]
                     }
                     list.push(a)
                 })
@@ -3000,35 +3007,38 @@ let app = new Vue({
                 flag: that.dataFlag
             };
             this.isShowList = false
-
+            that.noticIndex = 0
             that.employmentList1.data = []
             that.employmentList2.data = []
             that.employmentList3.data = []
 
-            that.noticIndex = 0
             that.noticList = []
             fetchPostMethods("/ierp/kapi/v2/mdnb/mdnb_control/getNotice", data).then(res => {
                 if (res && res.length != 0) {
+
                     res.forEach((item, index) => {
+                        if (item.noticeUserList.length % 2 != 0) {
+                            item.noticeUserList.push([])
+                        }
                         let obj = {
                             noticeDataList: item.noticeDataList,
                             noticeUserList: that.changeNoticList(item.noticeUserList)
                         }
                         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)
-                        } else {
-                            that.employmentList2.data.push(item)
-                        }
-                    })
-                    that.employmentList3.data.push(...that.noticList[that.noticIndex].noticeUserList)
+                    if (that.noticList[that.noticIndex]) {
+                        that.noticList[that.noticIndex].noticeUserList.forEach((item, index) => {
+                            if (index % 2 == 0) {
+                                that.employmentList1.data.push(item)
+                            } else {
+                                that.employmentList2.data.push(item)
+                            }
+                        })
+                        that.employmentList3.data.push(...that.noticList[that.noticIndex].noticeUserList)
 
-                    // }
+                    }
                     if (res.length != 1) {
-                        that.noticIndex += 1
+                        // that.noticIndex += 1
 
                         if (that.employmentList2.data.length <= that.employmentList2.rowNum) {
                             that.noticTime = setInterval(() => {
@@ -3038,22 +3048,22 @@ 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)
-                                    } else {
-                                        that.employmentList2.data.push(item)
-                                    }
-                                })
-                                that.employmentList3.data.push(...that.noticList[that.noticIndex].noticeUserList)
-                                // }
+                                if (that.noticList[that.noticIndex]) {
+                                    that.noticList[that.noticIndex].noticeUserList.forEach((item, index) => {
+                                        if (index % 2 == 0) {
+                                            that.employmentList1.data.push(item)
+                                        } else {
+                                            that.employmentList2.data.push(item)
+                                        }
+                                    })
+                                    that.employmentList3.data.push(...that.noticList[that.noticIndex].noticeUserList)
+                                }
 
-                                that.noticIndex += 1
+                                // that.noticIndex += 1
 
-                                if (that.noticIndex > that.noticList.length - 1) {
-                                    that.noticIndex = 0
-                                }
+                                // if (that.noticIndex > that.noticList.length - 1) {
+                                //     that.noticIndex = 0
+                                // }
                                 setTimeout(() => {
                                     that.isShowList = true
                                 }, 10)

+ 22 - 7
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
@@ -530,15 +530,24 @@ let app = new Vue({
             console.log(newDate);
             console.log(parseInt(dataList[1]));
             console.log(newDate - parseInt(dataList[1]) < 30000);
+            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);
+            debugger
             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
-
             }
         })
 
@@ -3667,6 +3676,9 @@ let app = new Vue({
                             if (list.length > 4) {
                                 list[4] = ""
                             }
+                            if(list.length == 3){
+                                list[3] = ""
+                            }
                             return list[0] + list[1] + "\n" + list[2] + list[3];
                         }
                     },
@@ -3871,6 +3883,9 @@ let app = new Vue({
                             if (list.length > 4) {
                                 list[4] = ""
                             }
+                            if(list.length == 3){
+                                list[3] = ""
+                            }
                             return list[0] + list[1] + "\n" + list[2] + list[3];
                         }
                     },

+ 4 - 4
cokingCoal/styles/humanResources.css

@@ -671,7 +671,7 @@ li {
     flex-direction: column;
     justify-content: flex-start;
     align-items: flex-start;
-    letter-spacing: 9px;
+    /* letter-spacing: 9px; */
 }
 
 .item_con .note_title {
@@ -684,7 +684,7 @@ li {
 
 .item_con .note_info {
     margin-left: 20px;
-    line-height: 35px;
+    line-height: 40px;
     text-indent: 60px;
     margin: 5px 0;
     /* white-space: pre-wrap; */
@@ -693,11 +693,11 @@ li {
 
 
 .item_con_main {
-    line-height: 45px;
+    line-height: 40px;
     white-space: pre-wrap;
     font-size: 26px;
     font-family: Source Han Sans CN;
-    font-weight: bolder;
+    /* font-weight: bolder; */
     margin-top: 10px;
     color: #fff !important;
 }