Переглянути джерело

对接接口(人员流动、薪酬相关)

fengxu 2 роки тому
батько
коміт
f3660100e8

BIN
JMshujudaping23-08-16.zip → JMshujudaping23-08-17.zip


+ 0 - 1
cokingCoal/humanResources.html

@@ -12,7 +12,6 @@
     <script src="./libs/vue@2.7.10.js"></script>
     <script src="./libs/datav.min.js"></script>
     <script src="./libs/echarts.min.js"></script>
-    <!-- <script src="https://cdn.bootcdn.net/ajax/libs/echarts/5.4.2/echarts.common.js"></script> -->
     <script src="./libs/element-ui@2.15.9.js"></script>
     <script src="./libs/axios.min.js"></script>
     <script src="./js/request.js"></script>

+ 4 - 4
cokingCoal/index.html

@@ -92,7 +92,7 @@
                                 </div>
                             </div>
                             <div class="left_main_btm">
-                                <dv-scroll-board :config="configOrg" style="width: 100%; height: 100%" />
+                                <dv-scroll-board v-if="orgChange" :config="configOrg" style="width: 100%; height: 100%" />
                             </div>
                         </div>
                     </dv-border-box-12>
@@ -564,7 +564,7 @@
                                     </div>
                                     <div class="w_100">
 
-                                        <dv-scroll-board :config="config2"
+                                        <dv-scroll-board :config="config2" v-if="SalaryCalProgDetail"
                                             style="width: 100%; height: 95%;margin-top: 1%;" />
                                     </div>
                                     <div class="title_box">预警</div>
@@ -848,10 +848,10 @@
             </div>
         </div>
         <div class="mark_box" v-if="isShowMark" @click="handleMark()">
-            <div class="mark_centter flex_column" v-show="salaryFlag">
+            <div class="mark_centter flex_column" v-if="salaryFlag">
                 <div class="mark_title">薪酬预警</div>
                 <div class="mark_main">
-                    <dv-scroll-board :config="configMark" style="width: 100%; height: 100%" />
+                    <dv-scroll-board v-if="salaryFlag" :config="configMark" style="width: 100%; height: 100%" />
                 </div>
             </div>
             <div class="mark_pdf" v-show="pdfFlag">

+ 2 - 2
cokingCoal/js/humanResources.js

@@ -245,13 +245,13 @@ let app = new Vue({
                     name: "双选场次",
                     value: 30,
                     unit: "场",
-                    icon: "../images/humanResources/times.png"
+                    icon: "./images/humanResources/times.png"
                 },
                 {
                     name: "参与人数",
                     value: 3000,
                     unit: "人",
-                    icon: "../images/humanResources/user.png"
+                    icon: "./images/humanResources/user.png"
                 }
             ],
             employmentList1: {

+ 224 - 29
cokingCoal/js/newIndex.js

@@ -422,7 +422,8 @@ let app = new Vue({
           color: "#39F656"
         }
       },],
-
+      orgChange: true,
+      SalaryCalProgDetail: true,
     }
   },
   beforeCreate() {
@@ -433,12 +434,7 @@ let app = new Vue({
     this.$nextTick(() => {
       this.sx = spArr(salaryList.x, 6)
       this.sy = spArr(salaryList.y, 6)
-      this.fx = spArr(mobilizeList.x, 6)
-      this.fy1 = spArr(mobilizeList.y1, 6)
-      this.fy2 = spArr(mobilizeList.y2, 6)
-      this.fy3 = spArr(mobilizeList.y3, 6)
-      this.fy4 = spArr(mobilizeList.y4, 6)
-      this.fy5 = spArr(mobilizeList.y5, 6)
+
       this.nx1 = spArr(this.echartTwoList.x, 5)
       this.ny1 = spArr(this.echartTwoList.y, 5)
       this.nx2 = spArr(this.echartTwoList2.x, 5)
@@ -451,8 +447,7 @@ let app = new Vue({
       this.levelListY = spArr(levelList.y, 5)
       // let organization = this.$refs.organization
       // this.initOrganization(organization, "", this.organizationList)
-      let mobilize = this.$refs.mobilize
-      this.initEchartStack(mobilize, { x: this.fx[0], y1: this.fy1[0], y2: this.fy2[0], y3: this.fy3[0], y4: this.fy4[0], y5: this.fy5[0] })
+
 
       let sequence = this.$refs.sequence
       this.initBarEcharts(sequence, { x: ["管理序列", "技术序列", "操作序列"], y1: [34242, 18547, 134012], y2: [28993, 19411, 126807] }, ["当前数"])
@@ -472,8 +467,7 @@ let app = new Vue({
       this.initBarEchartsElse(leftEnd, leftEndList, ["累计平均工资", "同期累计平均工资"])
       let echarts90 = this.$refs.echarts90
       this.initLineElseEchartsR(echarts90, { x: this.sx[0], y: this.sy[0] })
-      let student = this.$refs.student
-      this.initEchartsBar(student, schoolList, "#07ecd9")
+
 
       let efficiency = this.$refs.efficiency
       // this.initBarChartsElse(efficiency, efficiencyList, "吨/工", { name: "行业线", value: 8.2 })
@@ -491,7 +485,7 @@ let app = new Vue({
 
       // this.timeNs()
       // this.timePractice()
-      this.timeSy()
+      
       this.timeTwo()
       // this.timeNt()
       // this.studentTime()
@@ -530,9 +524,9 @@ let app = new Vue({
         }
         skillList[this.skillIndex].flag = true
       }, 2000)
-      setTimeout(()=>{
+      setTimeout(() => {
 
-      },9000)
+      }, 9000)
     })
     let that = this;
     localEnvAppToken().then(res => {
@@ -545,11 +539,28 @@ let app = new Vue({
         this.getOrganizationChange()
         this.getIndustrydistribution()
         this.getHumanResources()
-        // this.getlaborproductivity()
+        this.getSalaryCalProg()
+        this.getCollegeinternAndEnterpriseship()
+        this.getTurnOver()
       })
-    }).catch(err=>{
+    }).catch(err => {
       let industry = that.$refs.industry
-        that.initOrganizationElse(industry, "", that.industry, "")
+      that.initOrganizationElse(industry, "", that.industry, "")
+
+      let student = this.$refs.student
+      this.initEchartsBar(student, schoolList, "#07ecd9")
+
+      this.fx = spArr(mobilizeList.x, 6)
+      this.fy1 = spArr(mobilizeList.y1, 6)
+      this.fy2 = spArr(mobilizeList.y2, 6)
+      this.fy3 = spArr(mobilizeList.y3, 6)
+      this.fy4 = spArr(mobilizeList.y4, 6)
+      this.fy5 = spArr(mobilizeList.y5, 6)
+
+      let mobilize = this.$refs.mobilize
+      this.initEchartStack(mobilize, { x: this.fx[0], y1: this.fy1[0], y2: this.fy2[0], y3: this.fy3[0], y4: this.fy4[0], y5: this.fy5[0] })
+      this.timeSy()
+
     })
 
 
@@ -4318,11 +4329,8 @@ let app = new Vue({
       });
     },
     handleWarning() {
-      this.isShowMark = true
-      this.salaryFlag = true
-      this.pdfFlag = false
-      this.mobilizeFlag = false
-      this.echartsMark = false
+      this.getSalaryCalProgDetail()
+
     },
     handleMark() {
       this.isShowMark = false
@@ -4357,9 +4365,6 @@ let app = new Vue({
       this.warningFlag = true
       this.mobilizeFlag = false
       this.echartsMark = false
-
-      // this.config2 = 
-
     },
     handleORG() {
       this.isShowMark = true
@@ -4505,8 +4510,13 @@ let app = new Vue({
     getOrganizationChange() {
       let data = {}
       let that = this
+      this.orgChange = false
       fetchPostMethods("/ierp/kapi/v2/mdnb/mdnb_control/OrganizationChange", data).then(res => {
         console.log(res, "OrganizationChange");
+        if (res) {
+          that.configOrg.data = res.data
+          that.orgChange = true
+        }
       })
     },
     getIndustrydistribution() {
@@ -4533,8 +4543,7 @@ let app = new Vue({
       let that = this;
       let data = {};
       fetchPostMethods("/ierp/kapi/v2/mdnb/mdnb_control/HumanResources", data).then(res => {
-        return
-        if (res.data) {
+        if (res) {
           that.HumanResourcesList.forEach(i => {
             res.data.forEach(item => {
               if (i.key == item.key) {
@@ -4579,7 +4588,6 @@ let app = new Vue({
       let that = this;
       let data = {};
       fetchPostMethods("/ierp/kapi/v2/mdnb/mdnb_control/MineEfficiency", data).then(res => {
-        console.log(res);
         let obj = {}
         if (res != null) {
           res.data.forEach(item => {
@@ -4609,7 +4617,194 @@ let app = new Vue({
       let that = this;
       let data = {}
       fetchPostMethods("/ierp/kapi/v2/mdnb/mdnb_control/EmpProductivity", data).then(res => {
-        that.initBarChartsElse(that.$refs.whole, wholeList, "吨/人", { name: "标杆矿井线", value: 1800 })
+        let obj = {}
+        if (res != null) {
+          res.data.forEach(item => {
+            if (item.key == "标杆矿井线") {
+              obj = {
+                name: item.key,
+                value: item.value
+              }
+            }
+            if (item.key == "组织名称") {
+              wholeList.x = item.value
+            }
+            if (item.key == "目标值") {
+              wholeList.y2 = item.value
+            }
+            if (item.key == "实际值") {
+              wholeList.y1 = item.value
+            }
+          })
+          that.initBarChartsElse(that.$refs.whole, wholeList, "吨/人", obj)
+        } else {
+          that.initBarChartsElse(that.$refs.whole, wholeList, "吨/人", { name: "标杆矿井线", value: 1800 })
+        }
+      })
+    },
+    getSalaryCalProg() {
+      let that = this;
+      let data = {};
+      this.SalaryCalProgDetail = false
+      fetchPostMethods("/ierp/kapi/v2/mdnb/mdnb_control/SalaryCalProg", data).then(res => {
+        console.log(res);
+        if (res) {
+          that.config2.data = res.data
+        }
+        this.SalaryCalProgDetail = true
+      })
+    },
+    getSalaryCalProgDetail() {
+      let that = this;
+      let data = {};
+      this.isShowMark = false
+      this.salaryFlag = false
+      fetchPostMethods("/ierp/kapi/v2/mdnb/mdnb_control/SalaryCalProgDetail", data).then(res => {
+        if (res) {
+          that.configWarning.data = res.data
+        }
+      })
+      this.isShowMark = true
+      this.salaryFlag = true
+      this.pdfFlag = false
+      this.mobilizeFlag = false
+      this.echartsMark = false
+    },
+    getCollegeinternAndEnterpriseship() {
+      let that = this;
+      let data = {};
+      let student = this.$refs.student
+      fetchPostMethods("/ierp/kapi/v2/mdnb/mdnb_control/CollegeinternAndEnterpriseship", data).then(res => {
+        if (res) {
+          res.data.forEach(item => {
+            if (item.key == "高校总数") {
+              that.schoolList1[0].value - item.value
+            }
+
+            if (item.key == "实训总人数") {
+              that.schoolList1[1].value - item.value
+            }
+
+            if (item.key == "高校名称") {
+              schoolList.x = item.value
+            }
+
+            if (item.key == "高校实训人数") {
+              schoolList.y = item.value
+            }
+
+            if (item.key == "企业名称") {
+              rightList.x = item.value
+            }
+
+            if (item.key == "企业实训人数") {
+              rightList.y = item.value
+            }
+
+          })
+        }
+        this.initEchartsBar(student, schoolList, "#07ecd9")
+      })
+    },
+    getCollegestudy() {
+      let that = this;
+      let data = {};
+      let proList = [];
+      let schList = [];
+      let typeList = [];
+      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
+            }
+
+            if (item.key == "产学研成果数量") {
+              that.schoolList2[1].value = item.value
+            }
+
+            if (item.key == "项目名称") {
+              proList = item.value
+            }
+
+            if (item.key == "合作高校") {
+              schList = item.value
+            }
+
+            if (item.key == "合作类型") {
+              typeList = item.value
+            }
+
+            if (item.key == "主要成效") {
+              userList = item.value
+            }
+
+            // {
+            //   project: "高瓦斯矿井110工法回采工作面瓦斯与自然发火共治关键技术示范研究",
+            //   school: "太原理工大学",
+            //   type: "山西省重点研发项目",
+            //   merits: "解决了瓦斯超限问题"
+            // },
+            that.fList = []
+            proList.forEach((i, k) => {
+              let obj = {
+                project: i,
+                school: schList[k],
+                type: typeList[k],
+                merits: userList[k],
+              }
+              that.fList.push(obj)
+            })
+          })
+        }
+      })
+    },
+
+    getTurnOver() {
+      let that = this;
+      let data = {};
+      fetchPostMethods("/ierp/kapi/v2/mdnb/mdnb_control/TurnOver", data).then(res => {
+        if (res) {
+          // mobilizeList
+          res.data.forEach(item => {
+            if (item.key == "组织名称") {
+              mobilizeList.x = item.value
+            }
+
+            if (item.key == "内部调动") {
+              mobilizeList.y2 = item.value
+            }
+
+            if (item.key == "入职") {
+              mobilizeList.y1 = item.value
+            }
+
+            if (item.key == "离职") {
+              mobilizeList.y5 = item.value
+            }
+
+            if (item.key == "跨二级调入") {
+              mobilizeList.y4 = item.value
+            }
+
+            if (item.key == "跨二级调出") {
+              mobilizeList.y5 = item.value
+            }
+
+            that.fx = spArr(mobilizeList.x, 6)
+            that.fy1 = spArr(mobilizeList.y1, 6)
+            that.fy2 = spArr(mobilizeList.y2, 6)
+            that.fy3 = spArr(mobilizeList.y3, 6)
+            that.fy4 = spArr(mobilizeList.y4, 6)
+            that.fy5 = spArr(mobilizeList.y5, 6)
+
+          })
+        }
+
+        let mobilize = that.$refs.mobilize
+        that.initEchartStack(mobilize, { x: that.fx[0], y1: that.fy1[0], y2: that.fy2[0], y3: that.fy3[0], y4: that.fy4[0], y5: that.fy5[0] })
+        that.timeSy()
       })
     },
   },