Parcourir la source

调整权限,开放技能大师工作室事件

fengxu il y a 1 an
Parent
commit
de353faa46
4 fichiers modifiés avec 159 ajouts et 137 suppressions
  1. 4 4
      cokingCoal/index.html
  2. 101 97
      cokingCoal/js/humanResources.js
  3. 50 36
      cokingCoal/js/newIndex.js
  4. 4 0
      cokingCoal/styles/newIndex.css

+ 4 - 4
cokingCoal/index.html

@@ -402,16 +402,16 @@
                             <div class="main_info_item_img">
                             </div>
                             <div class="main_info_item_title" >
-                                <div>{{ loginInfo.num }} <span>{{ loginInfo.unit + " / 次" }}</span></div>
-                                <div>累计登陆</div>
+                                <div :class="userColor?'color-yellow':''">{{ loginInfo.num }} <span :class="userColor?'color-yellow':''">{{ loginInfo.unit + " / 次" }}</span></div>
+                                <div :class="userColor?'color-yellow':''">累计登陆</div>
                             </div>
                         </div>
                         <div class="main_info_item">
                             <div class="main_info_item_img">
                             </div>
                             <div class="main_info_item_title">
-                                <div>{{ mauInfo.mau }} <span>{{ mauInfo.unit + " / 次" }}</span></div>
-                                <div>月度活跃</div>
+                                <div :class="monthColor?'color-yellow':''">{{ mauInfo.mau }} <span :class="monthColor?'color-yellow':''">{{ mauInfo.unit + " / 次" }}</span></div>
+                                <div :class="monthColor?'color-yellow':''">月度活跃</div>
                             </div>
                         </div>
                     </div>

+ 101 - 97
cokingCoal/js/humanResources.js

@@ -242,7 +242,7 @@ let app = new Vue({
                 icon: "./images/humanResources/times.png"
             },
             {
-                name: "参与人",
+                name: "参与人",
                 value: 0,
                 unit: "人",
                 icon: "./images/humanResources/user.png"
@@ -414,7 +414,6 @@ let app = new Vue({
         // 跳转地址
         let AddUrl = location.protocol + "//" + location.host + "/ierp"
         // return
-
         if (!window.location.search) {
             // alert("链接已失效,请重新打开")
             window.location.href = AddUrl
@@ -436,7 +435,7 @@ let app = new Vue({
 
         var diffInSeconds = Math.floor(diff / 1000); // 将差值转换为秒数
 
-        let effective = diffInSeconds <= 30; // 判断差值是否在30秒以内
+        let effective = diffInSeconds <= 300; // 判断差值是否在30秒以内
 
         console.log(diff);
         console.log(diffInSeconds);
@@ -459,14 +458,15 @@ let app = new Vue({
 
         let date = new Date()
         let year = date.getFullYear()
+        let year2 = date.getFullYear() - 1
         let month = date.getMonth() + 1
         if (month < 10) {
             month = "0" + month
-            this.timeList1 = [year + "-" + month, year + "-" + (month)]
-            this.timeList2 = [year + "-" + month, year + "-" + (month)]
+            this.timeList1 = [year2 + "-" + month, year + "-" + (month)]
+            this.timeList2 = [year2 + "-" + month, year + "-" + (month)]
         } else {
-            this.timeList1 = [year + "-" + (month), year + "-" + (month)]
-            this.timeList2 = [year + "-" + (month), year + "-" + (month)]
+            this.timeList1 = [year2 + "-" + (month), year + "-" + (month)]
+            this.timeList2 = [year2 + "-" + (month), year + "-" + (month)]
         }
         this.newList = listToChange(yearList, monthList)
         this.employmentList3.data = employmentList
@@ -1026,7 +1026,6 @@ let app = new Vue({
             chat.setOption(option)
         },
         initLineRight(el, data, type) {
-            console.log(data);
             let that = this;
             let myChart
             if (type) {
@@ -1326,9 +1325,7 @@ let app = new Vue({
                     type: "value",
                     gridIndex: 0,
                     min: 0,
-                    max: 100,
-                    interval: 25,
-                    // splitNumber: 4,
+                    splitNumber: 4,
                     splitLine: {
                         show: false,
                         lineStyle: {
@@ -2781,7 +2778,7 @@ let app = new Vue({
                                 let title = "lineRight" + (index + 1)
                                 that.initLineRight(child.children[1], { value: dataList[index].value, point: dataList[index].point, total }, title)
                             }
-                        }, 10)
+                        }, 100)
 
                     }
 
@@ -2931,7 +2928,7 @@ let app = new Vue({
         scrollChangeList(index) {
             let that = this;
             if (that.noticList.length != 1) {
-                if (index + that.employmentList1.rowNum == that.employmentList1.data.length + 1) {
+                if (index + that.employmentList1.rowNum == that.employmentList1.data.length + 1 || index == 0) {
                     if (that.noticIndex >= that.noticList.length - 1) {
                         that.noticIndex = 0
                     } else {
@@ -2962,6 +2959,7 @@ let app = new Vue({
                         }, 10)
                     }
                 }
+
             }
         },
         changeCardNo(str) {
@@ -3100,99 +3098,105 @@ let app = new Vue({
             // this.leftTime && clearInterval(this.leftTime)
 
             fetchPostMethods("/ierp/kapi/v2/mdnb/mdnb_control/PositionAll", data).then(res => {
-                that.leftFlag = false
-                that.config2.data = []
-                let lastList = []
-                let topList = []
-                let mainList = []
-                if (res) {
-                    if (res.date) {
-                        that.allTimeList[1] = that.getYearMonth(res.date.value)
-                    }
-                    res.data.forEach((item, index) => {
-                        if (index <= 8) {
-                            item.unshift("0" + (index + 1))
-                        } else {
-                            item.unshift((index + 1).toString())
+                if(res.data){
+                    res.data.sort((a, b) => b[1] - a[1]);
+                }
+                setTimeout(()=>{
+                    that.leftFlag = false
+                    that.config2.data = []
+                    let lastList = []
+                    let topList = []
+                    let mainList = []
+                    if (res) {
+                        if (res.date) {
+                            that.allTimeList[1] = that.getYearMonth(res.date.value)
                         }
-                    })
-                    if (res.data.length > 5) {
-                        for (let i = 0; i < 3; i++) {
-                            let color;
-                            if (i == 0) {
-                                color = "yellow"
-                            } else if (i == 1) {
-                                color = "red"
+                        res.data.forEach((item, index) => {
+                            if (index <= 8) {
+                                item.unshift("0" + (index + 1))
                             } else {
-                                color = "green"
-                            }
-                            topList.push(["<span class='" + color + "'>" + res.data[i][0] + "</span>", "<span class='" + color + "'>" + res.data[i][1] + "</span>", "<span class='" + color + "'>" + res.data[i][2] + "</span>"])
-                        }
-                        res.data.splice(0, 3)
-                        mainList.push(...spArr(res.data, 2))
-
-                        mainList.forEach(item => {
-                            item.unshift(...topList)
-                            if (item.length < 5) {
-                                item.push(["", "", ""])
+                                item.unshift((index + 1).toString())
                             }
-                            lastList.push(...item)
                         })
-
-                    } else if (res.data.length <= 5 && res.data.length >= 3) {
-                        for (let i = 0; i < 3; i++) {
-                            let color;
-                            if (i == 0) {
-                                color = "yellow"
-                            } else if (i == 1) {
-                                color = "red"
-                            } else {
-                                color = "green"
+                        if (res.data.length > 5) {
+                            for (let i = 0; i < 3; i++) {
+                                let color;
+                                if (i == 0) {
+                                    color = "yellow"
+                                } else if (i == 1) {
+                                    color = "red"
+                                } else {
+                                    color = "green"
+                                }
+                                topList.push(["<span class='" + color + "'>" + res.data[i][0] + "</span>", "<span class='" + color + "'>" + res.data[i][1] + "</span>", "<span class='" + color + "'>" + res.data[i][2] + "</span>"])
                             }
-                            topList.push(["<span class='" + color + "'>" + res.data[i][0] + "</span>", "<span class='" + color + "'>" + res.data[i][1] + "</span>", "<span class='" + color + "'>" + res.data[i][2] + "</span>"])
-                        }
-                        res.data.splice(0, 3)
-                        lastList.push(...topList, ...res.data)
-                    } else if (res.data.length < 3) {
-                        for (let i = 0; i < res.data.length; i++) {
-                            let color;
-                            if (i == 0) {
-                                color = "yellow"
-                            } else if (i == 1) {
-                                color = "red"
-                            } else {
-                                color = "green"
+                            res.data.splice(0, 3)
+                            mainList.push(...spArr(res.data, 2))
+    
+                            mainList.forEach(item => {
+                                item.unshift(...topList)
+                                if (item.length < 5) {
+                                    item.push(["", "", ""])
+                                }
+                                lastList.push(...item)
+                            })
+    
+                        } else if (res.data.length <= 5 && res.data.length >= 3) {
+                            for (let i = 0; i < 3; i++) {
+                                let color;
+                                if (i == 0) {
+                                    color = "yellow"
+                                } else if (i == 1) {
+                                    color = "red"
+                                } else {
+                                    color = "green"
+                                }
+                                topList.push(["<span class='" + color + "'>" + res.data[i][0] + "</span>", "<span class='" + color + "'>" + res.data[i][1] + "</span>", "<span class='" + color + "'>" + res.data[i][2] + "</span>"])
+                            }
+                            res.data.splice(0, 3)
+                            lastList.push(...topList, ...res.data)
+                        } else if (res.data.length < 3) {
+                            for (let i = 0; i < res.data.length; i++) {
+                                let color;
+                                if (i == 0) {
+                                    color = "yellow"
+                                } else if (i == 1) {
+                                    color = "red"
+                                } else {
+                                    color = "green"
+                                }
+                                lastList.push(["<span class='" + color + "'>" + res.data[i][0] + "</span>", "<span class='" + color + "'>" + res.data[i][1] + "</span>", "<span class='" + color + "'>" + res.data[i][2] + "</span>"])
                             }
-                            lastList.push(["<span class='" + color + "'>" + res.data[i][0] + "</span>", "<span class='" + color + "'>" + res.data[i][1] + "</span>", "<span class='" + color + "'>" + res.data[i][2] + "</span>"])
                         }
+    
+                        that.config2.data = lastList
+                        that.leftTime && clearInterval(that.leftTime)
+                        that.leftTime = setTimeout(() => {
+                            that.leftFlag = true
+                            that.leftTime = setInterval(() => {
+                                that.leftList.forEach((item, index) => {
+                                    item.flag = !item.flag
+                                    if (item.flag) {
+                                        if (index == 0) {
+                                            that.leftFlag = true
+                                            // that.timeList2 = [that.allTimeList[1][1], that.allTimeList[1][0]]
+                                            that.getPositionAll()
+                                        } else {
+                                            that.leftFlag = false
+                                            // that.timeList2 = [that.allTimeList[0][1], that.allTimeList[0][0]]
+                                            that.getRecruitType()
+                                            setTimeout(() => {
+                                                let leftChange = that.$refs.leftChange
+                                                that.initThreeBig(leftChange)
+                                            })
+                                        }
+                                    }
+                                })
+                            }, 15000)
+                        }, 10)
                     }
+                },0)
 
-                    that.config2.data = lastList
-                    that.leftTime && clearInterval(that.leftTime)
-                    that.leftTime = setTimeout(() => {
-                        that.leftFlag = true
-                        that.leftTime = setInterval(() => {
-                            that.leftList.forEach((item, index) => {
-                                item.flag = !item.flag
-                                if (item.flag) {
-                                    if (index == 0) {
-                                        that.leftFlag = true
-                                        // that.timeList2 = [that.allTimeList[1][1], that.allTimeList[1][0]]
-                                        that.getPositionAll()
-                                    } else {
-                                        that.leftFlag = false
-                                        // that.timeList2 = [that.allTimeList[0][1], that.allTimeList[0][0]]
-                                        that.getRecruitType()
-                                        setTimeout(() => {
-                                            let leftChange = that.$refs.leftChange
-                                            that.initThreeBig(leftChange)
-                                        })
-                                    }
-                                }
-                            })
-                        }, 15000)
-                    }, 10)
-                }
             })
         },
 

+ 50 - 36
cokingCoal/js/newIndex.js

@@ -505,7 +505,9 @@ let app = new Vue({
 
             setTypeFlag: null,
 
-            gtTotle: 90
+            gtTotle: 90,
+            userColor: false,
+            monthColor: false,
 
         }
     },
@@ -534,7 +536,7 @@ let app = new Vue({
 
             var diffInSeconds = Math.floor(diff / 1000); // 将差值转换为秒数
     
-            let effective = diffInSeconds <= 30; // 判断差值是否在30秒以内
+            let effective = diffInSeconds <= 300; // 判断差值是否在30秒以内
     
             console.log(diff);
             console.log(diffInSeconds);
@@ -683,7 +685,7 @@ let app = new Vue({
             this.getAccumulatedLogin()
             this.getMauInfo()
             console.log("数据更新每五分钟一次");
-        }, 60000 * 5)
+        }, 10000)
 
         if (this.isShowRequest) {
             this.requestFunction()
@@ -1333,9 +1335,9 @@ let app = new Vue({
                 nterval: 2000,
                 loopSeries: true,
             });
-            window.addEventListener("resize", function () {
-                chart.resize();
-            });
+            // window.addEventListener("resize", function () {
+            //     chart.resize();
+            // });
         },
         initOrganizationElse(el, title = "", data = { x: ["集团本部", "山焦财务", "山焦担保", "山焦股份", "山焦国华", "山焦机电", "山焦人力", "山焦民爆", "山焦事业", "山焦投资"], y: [0, 680, 562, 268, 717, 843, 987, 126, 723, 569] }, unit = "") {
             if (this.industryEcharts != null) {
@@ -3202,9 +3204,9 @@ let app = new Vue({
                 nterval: 2000,
                 loopSeries: true,
             });
-            window.addEventListener("resize", function () {
-                this.workEcharts.resize();
-            });
+            // window.addEventListener("resize", function () {
+            //     this.workEcharts.resize();
+            // });
         },
         initBarChartsElse(el, data, name, lineInfo) {
             this.efficiency = echarts.init(el);
@@ -3411,9 +3413,9 @@ let app = new Vue({
                 nterval: 2000,
                 loopSeries: true,
             });
-            window.addEventListener("resize", function () {
-                this.efficiency.resize();
-            });
+            // window.addEventListener("resize", function () {
+            //     this.efficiency.resize();
+            // });
         },
         initBarEcharts(el, data, nameList) {
             let chart = echarts.init(el);
@@ -3607,9 +3609,9 @@ let app = new Vue({
                 nterval: 2000,
                 loopSeries: true,
             });
-            window.addEventListener("resize", function () {
-                chart.resize();
-            });
+            // window.addEventListener("resize", function () {
+            //     chart.resize();
+            // });
         },
         initBarEchartsElse(el, data, nameList) {
             let chart = echarts.init(el);
@@ -3814,9 +3816,9 @@ let app = new Vue({
                 nterval: 2000,
                 loopSeries: true,
             });
-            window.addEventListener("resize", function () {
-                chart.resize();
-            });
+            // window.addEventListener("resize", function () {
+            //     chart.resize();
+            // });
         },
         initBarEchartsElseJM(el, data, nameList) {
             let chart = echarts.init(el);
@@ -4022,9 +4024,9 @@ let app = new Vue({
                 nterval: 2000,
                 loopSeries: true,
             });
-            window.addEventListener("resize", function () {
-                chart.resize();
-            });
+            // window.addEventListener("resize", function () {
+            //     chart.resize();
+            // });
         },
         initStereoscopic(el, data) {
             this.stereoscopic = echarts.init(el);
@@ -4280,9 +4282,9 @@ let app = new Vue({
                 nterval: 2000,
                 loopSeries: true,
             });
-            window.addEventListener("resize", function () {
-                chart.resize();
-            });
+            // window.addEventListener("resize", function () {
+            //     chart.resize();
+            // });
 
         },
         initProvinceChart(el, mapData = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) {
@@ -5357,9 +5359,9 @@ let app = new Vue({
                 nterval: 2000,
                 loopSeries: true,
             });
-            window.addEventListener("resize", function () {
-                this.mobilizeFL.resize();
-            });
+            // window.addEventListener("resize", function () {
+            //     this.mobilizeFL.resize();
+            // });
         },
         initDownholeEcharts(el, data, type) {
             this.downhole = echarts.init(el);
@@ -5613,10 +5615,9 @@ let app = new Vue({
             this.achievementIndex = 0
         },
         handleStudio(item, index) {
-            if (index != 0) {
-                return
-            }
-
+            // if (index != 0) {
+            //     return
+            // }
             let that = this;
             setTimeout(() => {
                 that.listFlag = true
@@ -5759,8 +5760,14 @@ let app = new Vue({
                 flag: that.dataFlag
             }
             fetchPostMethods("/ierp/kapi/v2/mdnb/mdnb_control/AccumulatedLogin", data).then(res => {
-                that.loginInfo.num = res.accumulatedLogin
-                that.loginInfo.unit = res.unit
+                if(that.loginInfo.num != res.accumulatedLogin){
+                    that.loginInfo.num = res.accumulatedLogin
+                    that.loginInfo.unit = res.unit
+                    that.userColor = true
+                    setTimeout(()=>{
+                        that.userColor = !that.userColor
+                    },2000)
+                }
             })
         },
         getMauInfo() {
@@ -5770,8 +5777,14 @@ let app = new Vue({
             }
             fetchPostMethods("/ierp/kapi/v2/mdnb/mdnb_control/MAU", data).then(res => {
                 if (res) {
-                    that.mauInfo.mau = res.mau
-                    that.mauInfo.unit = res.unit
+                    if(that.mauInfo.mau != res.mau){
+                        that.mauInfo.mau = res.mau
+                        that.mauInfo.unit = res.unit
+                        that.monthColor = true
+                        setTimeout(()=>{
+                            that.monthColor = !that.monthColor
+                        },2000)
+                    }
                 }
             })
         },
@@ -6269,7 +6282,8 @@ let app = new Vue({
                             that.optimize[1].value = item.value
                         }
                         if (item.key == "优化率") {
-                            that.optimizeValue = item.value * 100
+                            console.log((item.value * 100));
+                            that.optimizeValue = (item.value * 100).toFixed(2);
                         }
                     })
                 }

+ 4 - 0
cokingCoal/styles/newIndex.css

@@ -1231,6 +1231,10 @@ img {
     letter-spacing: 5px;
 }
 
+.color-yellow{
+    color: #EBB829 !important;
+}
+
 .btm_text_span_on {
     font-size: 26px;
     letter-spacing: 5px;