ソースを参照

首页中增加火电板块,水电板块,新能源和海外业务二级页面并且服务联调;根据后端需求修改考评规则管理功能

SunZehao 1 年間 前
コミット
afe46dc1a3

+ 22 - 1
src/components/evaluationSystem/ruleDetailPage.vue

@@ -82,6 +82,15 @@
                                             </el-option>
                                         </el-select>
                                     </el-form-item>
+                                    <el-form-item label="最低分" prop="minScore">
+                                        <el-input-number v-model="itemForm.minScore" :precision="2" :step="0.1" :min="1" />
+                                    </el-form-item>
+                                    <el-form-item label="最高分" prop="maxScore">
+                                        <el-input-number v-model="itemForm.maxScore" :precision="2" :step="0.1" :min="1" />
+                                    </el-form-item>
+                                    <el-form-item label="基准分" prop="standardScore">
+                                        <el-input-number v-model="itemForm.standardScore" :precision="2" :step="0.1" :min="1" />
+                                    </el-form-item>
                                     <el-form-item label="指标顺序" prop="orderNum">
                                         <el-input-number v-model="itemForm.orderNum" :min="1" />
                                     </el-form-item>
@@ -124,6 +133,9 @@ export default {
             evaluationIndexData:[],
             itemForm: {
                 indicator: '',
+                minScore: 1,
+                maxScore: 1,
+                standardScore: 1,
                 orderNum: 1,
                 desc: ''
             },
@@ -185,6 +197,9 @@ export default {
             this.$nextTick(() =>{
                 this.itemForm = {
                     indicator: '',
+                    minScore: 1,
+                    maxScore: 1,
+                    standardScore: 1,
                     orderNum: 1,
                     desc: ''
                 }
@@ -198,6 +213,9 @@ export default {
             this.evalradio = this.changeDateSelect[0]
             this.itemForm = {
                 indicator: this.evalradio.indicatorId,
+                minScore: this.evalradio.minScore,
+                maxScore: this.evalradio.maxScore,
+                standardScore: this.evalradio.standardScore,
                 orderNum: this.evalradio.orderNum,
                 desc: this.evalradio.des
             }
@@ -216,6 +234,9 @@ export default {
             let userMes = JSON.parse(window.sessionStorage.getItem('user'))
             let params = {
                 indicatorId: that.itemForm.indicator,
+                minScore: that.itemForm.minScore,
+                maxScore: that.itemForm.maxScore,
+                standardScore: that.itemForm.standardScore,
                 orderNum: that.itemForm.orderNum,
                 des: that.itemForm.desc,
                 createBy: userMes.id,
@@ -303,7 +324,7 @@ export default {
         .el-dialog{
             margin-top: 5vh !important;
             .el-dialog__body{
-                padding: 0 20px 30px 20px !important;
+                padding: 30px 20px 30px 20px !important;
                 .ruleItemAll{
                     .el-select, .el-input{
                         width: 100%;

+ 234 - 0
src/components/gateWay/gatewayNewYearFrom.vue

@@ -0,0 +1,234 @@
+<template>
+    <div class="annualLeagueTable">
+        <el-dialog v-model="dialogVisible" width="50vw" :close-on-click-modal="false">
+            <template #header>
+                <div class="yearHeader">
+                    <span style="font-size:14px;color:#fff">年度排行榜</span>
+                    <el-select v-model="optionName" placeholder="请选择板块" @change="changeOption">
+                        <el-option
+                            v-for="item in optionArr"
+                            :key="item.value"
+                            :label="item.label"
+                            :value="item.value">
+                        </el-option>
+                    </el-select>
+                </div>
+            </template>
+            <el-row class="yearFrom">
+                <el-col :span="12" style="border-right: 1px solid #E1E3EA;">
+                    <div class="yearFromHeader">
+                        <div class="headerNameTit">
+                            <div class="headerNameTit_left">
+                                <span>排名</span>
+                                <span style="margin-left: 20px">单位名称</span>
+                            </div>
+                            <div class="headerNameTit_right">
+                                <span>级别</span>
+                                <span style="margin-left: 20px">得分</span>
+                            </div>
+                        </div>
+                    </div>
+                    <div style="display: flex" v-for="(item, index) in evaluationYearDataLeft" :key="index">
+                        <div class="yearFromMsg">
+                            <div class="msgProgress">
+                                <span>{{item.rank}}</span>
+                                <span>{{item.company}}</span>
+                                <span>{{item.grade}}</span>
+                                <span>{{item.score}}</span>
+                            </div>
+                        </div>
+                    </div>
+                </el-col>
+                <el-col :span="12">
+                    <div class="yearFromHeader">
+                        <div class="headerNameTit">
+                            <div class="headerNameTit_left">
+                                <span>排名</span>
+                                <span style="margin-left: 20px">单位名称</span>
+                            </div>
+                            <div class="headerNameTit_right">
+                                <span>级别</span>
+                                <span style="margin-left: 20px">得分</span>
+                            </div>
+                        </div>
+                    </div>
+                    <div style="display: flex" v-for="(item, index) in evaluationYearDataRight" :key="index">
+                        <div class="yearFromMsg">
+                            <div class="msgProgress">
+                                <span>{{item.rank}}</span>
+                                <span>{{item.company}}</span>
+                                <span>{{item.grade}}</span>
+                                <span>{{item.score}}</span>
+                            </div>
+                        </div>
+                    </div>
+                </el-col>
+            </el-row>
+        </el-dialog>
+    </div>
+</template>
+
+<script>
+import {apiGetevaluationportallist} from '../../api/api'
+export default {
+    data() {
+        return {
+            dialogVisible: false,
+            evaluationYearDataLeft: [],
+            evaluationYearDataRight: [],
+            optionArr: [],
+            optionName: '',
+            yearData: '',
+            seasonData: ''
+        }
+    },
+    created() {
+        this.optionArr = [
+            {
+                label: '火电板块',
+                value: 'HD'
+            },
+            {
+                label: '水电板块',
+                value: 'SD'
+            },
+            {
+                label: '新能源',
+                value: 'XNYFG'
+            },
+            {
+                label: '海外业务',
+                value: 'GJYE'
+            }
+        ]
+    },
+    methods: {
+        init(name, year, season) {
+            this.dialogVisible = true
+            this.optionName = name
+            this.yearData = year
+            this.seasonData = season
+            this.evaluationYearDataLeft = []
+            this.evaluationYearDataRight = []
+            this.getYearData(name, year, season)
+        },
+        changeOption(val) {
+            this.evaluationYearDataLeft = []
+            this.evaluationYearDataRight = []
+            this.getYearData(val, this.yearData, this.seasonData)
+        },
+        getYearData(name, year, season) {
+            let that = this
+            let params = {
+                binSection: name,
+                year: year,
+                season: season === '第一季度' ? '1' : season === '第二季度' ? '2' : '3'
+            }
+            apiGetevaluationportallist(params).then(datas =>{
+                if (datas && datas.data && datas.data.year) {
+                    if (datas.data.year[name].length>0) {
+                        datas.data.year[name].forEach((item, index) =>{
+                            item.rank = index+1
+                        })
+                        if (datas.data.year[name].length>10) {
+                            that.evaluationYearDataLeft = datas.data.year[name].splice(0, 10)
+                            that.evaluationYearDataRight = datas.data.year[name]
+                            
+                        } else {
+                            that.evaluationYearDataLeft = datas.data.year[name]
+                        }
+                    }
+                }
+            })
+        }
+    }
+}
+</script>
+
+<style lang="less">
+.annualLeagueTable{
+    .el-overlay{
+        .el-dialog{
+            margin-top: 5vh !important;
+            .el-dialog__header{
+                .yearHeader{
+                    width: 97%;
+                    display: flex;
+                    justify-content: space-between;
+                    .el-select{
+                        width: 120px;
+                        .el-input__inner{
+                            height:28px;
+                        }
+                        .el-input__suffix{
+                            .el-select__caret{
+                                line-height:28px;
+                            }
+                        }
+                    }
+                }
+            }
+            .yearFrom{
+                padding: 0 20px;
+                .yearFromHeader{
+                    width: 100%;
+                    border-bottom: 1px solid #E1E3EA;
+                    .headerNameTit{
+                        display: flex;
+                        justify-content: space-between;
+                        padding: 8px 20px;
+                        font-size: 14px;
+                        color: #414141;
+                    }
+                    .headerTit{
+                        position: relative;
+                        top: 10px;
+                        left: 150px;
+                    }
+                }
+                .yearFromMsg{
+                    display: flex;
+                    width: 100%;
+                    height: 35px;
+                    background: #F6F7FA;
+                    margin: 5px 8px;
+                    padding: 2px 10px 0;
+                    border-radius: 5px;
+                    .msgProgress{
+                        margin-top: 5px;
+                        display: flex;
+                        width: 100%;
+                        span{
+                            font-size: 14px;
+                            font-family: Microsoft YaHei;
+                        }
+                        span:nth-child(1){
+                            display: inline-block;
+                            width: 10%;
+                            font-weight: 600;
+                            color: #666;
+                            margin-left: 10px;
+                        }
+                        span:nth-child(2){
+                            display: inline-block;
+                            width: 68%;
+                            font-weight: 400;
+                            color: #666;
+                            margin-right: 10px;
+                        }
+                        span:nth-child(3){
+                            font-weight: 600;
+                            margin-right: 30px;
+                            color: #F65177;
+                        }
+                        span:nth-child(4){
+                            font-weight: 600;
+                            color: #666;
+                        }
+                    }
+                }
+            }
+        }
+    }
+}
+</style>

+ 10 - 2
src/components/gatewaynNewPage.vue

@@ -79,7 +79,7 @@
                         </el-row>
                     </div>
                     <div class="mainThree">
-                        <div class="mainMore"></div>
+                        <div class="mainMore" @click="yearSeeMore(it.nameEn, 'year')"></div>
                         <div style="display: flex" v-for="(item, index) in it.tableDatas" :key="index">
                             <div class="mainThreeMsg">
                                 <img :src="item.img" alt="">
@@ -284,7 +284,7 @@
                 </div>
             </el-col>
         </el-row>
-        
+        <year-from ref="yearFrom"></year-from>
     </div>
 </template>
 
@@ -298,7 +298,10 @@ import botImg from '../assets/getwayImg/botNew.png'
 import cenImg from '../assets/getwayImg/cenNew.png'
 
 import {apiGetevaluationportallist} from '../api/api'
+
+import yearFrom from './gateWay/gatewayNewYearFrom.vue'
 export default {
+    components: {yearFrom},
     data() {
         return {
             cupDataYearArr: {
@@ -536,6 +539,11 @@ export default {
                 myChart.resize()
             })
         },
+        yearSeeMore(name, type) {
+            if (type === 'year') {
+                this.$refs.yearFrom.init(name, this.changeYear, this.seasonStr)
+            }
+        }
     }
 }
 </script>