瀏覽代碼

新增首页;

SunZehao 2 年之前
父節點
當前提交
abbf92e4ae
共有 10 個文件被更改,包括 455 次插入79 次删除
  1. 4 8
      src/api/api.js
  2. 二進制
      src/assets/getwayImg/bot.png
  3. 二進制
      src/assets/getwayImg/cen.png
  4. 二進制
      src/assets/getwayImg/cup1.png
  5. 二進制
      src/assets/getwayImg/cup2.png
  6. 二進制
      src/assets/getwayImg/cup3.png
  7. 二進制
      src/assets/getwayImg/top.png
  8. 435 30
      src/components/gatewayPage.vue
  9. 11 36
      src/views/Login.vue
  10. 5 5
      src/views/homePage.vue

+ 4 - 8
src/api/api.js

@@ -23,15 +23,11 @@ export function apiGetModel(url, params) {
 //----------------------------------------登录页接口------------------------------------------------
 
 // 登录接口
-export function login(username,password,account) {
+export function loginApi(username,password) {
     // MD5 32 位
-    return request({
-      url: '/api/ims-idas/oauth/tokenWrapper?tenantId=000000&username='+username+'&password='+md5(password)+'&grant_type=password&scope=all&type='+account,
-      method: 'post',
-      headers: {
-        'Authorization': 'Basic c2FiZXI6NWMwMmMzZDViNzYxNTNkZGM5ZTczYzc5YzMzNzYzODAxNmE5ZDM2Ng==',
-        'Tenant-Id': '000000'
-      }
+    return httpRequest({
+      url: `user/bladeAuth?username=${username}&password=${md5(password)}`,
+      method: 'post'
     })
   }
 

二進制
src/assets/getwayImg/bot.png


二進制
src/assets/getwayImg/cen.png


二進制
src/assets/getwayImg/cup1.png


二進制
src/assets/getwayImg/cup2.png


二進制
src/assets/getwayImg/cup3.png


二進制
src/assets/getwayImg/top.png


+ 435 - 30
src/components/gatewayPage.vue

@@ -21,10 +21,32 @@
                 <div class="gateway_bot_left">
                     <div class="bot_leftTit">
                         <p>年度考评排行榜</p>
-
+                        <el-select v-model="value" class="m-2" placeholder="请选择分类" size="large">
+                            <el-option
+                            v-for="item in options"
+                            :key="item.value"
+                            :label="item.label"
+                            :value="item.value"
+                            />
+                        </el-select>
                     </div>
                     <div class="bot_leftMain">
-
+                        <div style="display: flex;margin-bottom:25px" v-for="(item, index) in cupMsgArr" :key="index">
+                            <div class="mainImg">
+                                <img :src="item.img" alt="" v-if="item.img">
+                                <span v-else>{{index+1}}</span>
+                            </div>
+                            <div class="mainMsg">
+                                <div class="msgProgress">
+                                    <el-progress :percentage="item.progress" :stroke-width="10" />
+                                </div>
+                                <div class="msgProgressT">
+                                    <span>{{item.name}}</span>
+                                    <span>{{item.level}}级</span>
+                                    <span>{{item.points}}分</span>
+                                </div>
+                            </div>
+                        </div>
                     </div>
                 </div>
             </el-col>
@@ -32,24 +54,91 @@
                 <div class="gateway_bot_center">
                     <div class="bot_Tit">
                         <p>考评排行榜</p>
-
+                        <div style="display:flex">
+                            <el-select v-model="value" class="m-2" placeholder="选择季度" size="large">
+                                <el-option
+                                v-for="item in options"
+                                :key="item.value"
+                                :label="item.label"
+                                :value="item.value"
+                                />
+                            </el-select>
+                            <el-select v-model="value" class="m-2" placeholder="选择月份" size="large">
+                                <el-option
+                                v-for="item in options"
+                                :key="item.value"
+                                :label="item.label"
+                                :value="item.value"
+                                />
+                            </el-select>
+                        </div>
                     </div>
-                    <el-table :data="tableData" style="width: 100%">
-                        <el-table-column type="index" label="序号" width="50" />
-                        <el-table-column prop="name" label="公告标题" width="300" />
-                        <el-table-column prop="address" label="发布部门" />
-                        <el-table-column prop="address" label="发布日期" />
+                    <el-table :data="tableData" stripe  style="width: 100%">
+                        <el-table-column type="index" label="排名" width="50" align="center" />
+                        <el-table-column prop="name" label="单位名称" />
+                        <el-table-column prop="points" label="得分"  width="50" />
+                        <el-table-column prop="address" label="加分事项" width="80" align="center">
+                            <template #default="scope">
+                                <img :src="cenImg" v-if="scope.row.jiaA === 0">
+                                <img :src="topImg" v-else-if="scope.row.jiaA === 1">
+                                <img :src="botImg" v-else>
+                            </template>
+                        </el-table-column>
+                        <el-table-column prop="address" label="扣分事项"  width="80" align="center">
+                            <template #default="scope">
+                                <img :src="cenImg" v-if="scope.row.jiaB === 0">
+                                <img :src="topImg" v-else-if="scope.row.jiaB === 1">
+                                <img :src="botImg" v-else>
+                            </template>
+                        </el-table-column>
+                        <el-table-column prop="address" label="管理加分项" width="90" align="center">
+                            <template #default="scope">
+                                <img :src="cenImg" v-if="scope.row.guanA === 0">
+                                <img :src="topImg" v-else-if="scope.row.guanA === 1">
+                                <img :src="botImg" v-else>
+                            </template>
+                        </el-table-column>
+                        <el-table-column prop="address" label="管理扣分项" width="90"  align="center">
+                            <template #default="scope">
+                                <img :src="cenImg" v-if="scope.row.guanB === 0">
+                                <img :src="topImg" v-else-if="scope.row.guanB === 1">
+                                <img :src="botImg" v-else>
+                            </template>
+                        </el-table-column>
+                        <el-table-column prop="address" label="高于基准分" width="90" align="center">
+                            <template #default="scope">
+                                <img :src="cenImg" v-if="scope.row.gaoA === 0">
+                                <img :src="topImg" v-else-if="scope.row.gaoA === 1">
+                                <img :src="botImg" v-else>
+                            </template>
+                        </el-table-column>
+                        <el-table-column prop="address" label="低于基准分" width="90" align="center">
+                            <template #default="scope">
+                                <img :src="cenImg" v-if="scope.row.gaoB === 0">
+                                <img :src="topImg" v-else-if="scope.row.gaoB === 1">
+                                <img :src="botImg" v-else>
+                            </template>
+                        </el-table-column>
                     </el-table>
                 </div>
             </el-col>
             <el-col :span="6">
                 <div class="gateway_bot_right">
-                    <div class="bot_leftTit">
+                    <div class="bot_rightTit">
                         <p>通告栏</p>
 
                     </div>
-                    <div class="bot_leftMain">
-
+                    <div class="bot_rightMain">
+                        <div class="bot_rightMain_msg" v-for="it in 10" :key="it">
+                            <div class="rightDiv"></div>
+                            <div class="rightTitMsg">
+                                <p>关于2022年度各单位年度考评得分</p>
+                                <div style="margin-top: 5px">
+                                    <span style="margin-right: 10px">2023-01-15</span>
+                                    <span>组织人事部</span>
+                                </div>
+                            </div>
+                        </div>
                     </div>
                 </div>
             </el-col>
@@ -62,11 +151,25 @@ import huodian from '../assets/getwayImg/huodianIcon.png'
 import shuidian from '../assets/getwayImg/shuidianIcon.png'
 import xinnengyuan from '../assets/getwayImg/xinnengyuanIcon.png'
 import meidian from '../assets/getwayImg/meidianIcon.png'
+
+import cup1 from '../assets/getwayImg/cup1.png'
+import cup2 from '../assets/getwayImg/cup2.png'
+import cup3 from '../assets/getwayImg/cup3.png'
+
+import topImg from '../assets/getwayImg/top.png'
+import botImg from '../assets/getwayImg/bot.png'
+import cenImg from '../assets/getwayImg/cen.png'
+
 export default {
     data() {
         return {
             huodianArr: [],
-            titleMsgArr: []
+            titleMsgArr: [],
+            cupMsgArr: [],
+            tableData: [],
+            topImg: topImg,
+            botImg: botImg,
+            cenImg: cenImg,
         }
     },
     created() {
@@ -114,8 +217,182 @@ export default {
                 Name: 'D级单位'
             }
         ]
+        this.cupMsgArr = [
+            {
+                progress: '100',
+                level: 'A',
+                points: '134',
+                name: '大港电厂(广安津能)'
+            },
+            {
+                progress: '100',
+                level: 'A',
+                points: '134',
+                name: '怀安热电'
+            },
+            {
+                progress: '90',
+                level: 'A',
+                points: '124',
+                name: '滨海电力'
+            },
+            {
+                progress: '88',
+                level: 'A',
+                points: '120',
+                name: '秦皇岛公司'
+            },
+            {
+                progress: '80',
+                level: 'A',
+                points: '111',
+                name: '胜利电厂'
+            },
+            {
+                progress: '76',
+                level: 'A',
+                points: '110',
+                name: '宣威分公司'
+            },
+            {
+                progress: '70',
+                level: 'A',
+                points: '106',
+                name: '大同公司(大二厂)'
+            },
+            {
+                progress: '65',
+                level: 'A',
+                points: '102',
+                name: '廊坊热电'
+            },
+            {
+                progress: '60',
+                level: 'A',
+                points: '96',
+                name: '滨海电力(天津洁能)'
+            },
+            {
+                progress: '55',
+                level: 'A',
+                points: '92',
+                name: '胜利电厂'
+            },
+        ]
+        this.tableData = [
+            {
+                name: '中国国电电力上海庙公司',
+                points: '134',
+                jiaA: 1,
+                jiaB: 2,
+                guanA: 1,
+                guanB: 0,
+                gaoA: 1,
+                gaoB: 0    
+            },
+            {
+                name: '中国国电电力上海庙公司',
+                points: '134',
+                jiaA: 1,
+                jiaB: 2,
+                guanA: 1,
+                guanB: 0,
+                gaoA: 1,
+                gaoB: 0    
+            },
+            {
+                name: '中国国电电力上海庙公司',
+                points: '134',
+                jiaA: 1,
+                jiaB: 2,
+                guanA: 1,
+                guanB: 0,
+                gaoA: 1,
+                gaoB: 0    
+            },
+            {
+                name: '中国国电电力上海庙公司',
+                points: '134',
+                jiaA: 1,
+                jiaB: 2,
+                guanA: 1,
+                guanB: 0,
+                gaoA: 1,
+                gaoB: 0    
+            },
+            {
+                name: '中国国电电力上海庙公司',
+                points: '134',
+                jiaA: 1,
+                jiaB: 2,
+                guanA: 1,
+                guanB: 0,
+                gaoA: 1,
+                gaoB: 0    
+            },
+            {
+                name: '中国国电电力上海庙公司',
+                points: '134',
+                jiaA: 1,
+                jiaB: 2,
+                guanA: 1,
+                guanB: 0,
+                gaoA: 1,
+                gaoB: 0    
+            },
+            {
+                name: '中国国电电力上海庙公司',
+                points: '134',
+                jiaA: 1,
+                jiaB: 2,
+                guanA: 1,
+                guanB: 0,
+                gaoA: 1,
+                gaoB: 0    
+            },
+            {
+                name: '中国国电电力上海庙公司',
+                points: '134',
+                jiaA: 1,
+                jiaB: 2,
+                guanA: 1,
+                guanB: 0,
+                gaoA: 1,
+                gaoB: 0    
+            },
+            {
+                name: '中国国电电力上海庙公司',
+                points: '134',
+                jiaA: 1,
+                jiaB: 2,
+                guanA: 1,
+                guanB: 0,
+                gaoA: 1,
+                gaoB: 0    
+            },
+            {
+                name: '中国国电电力上海庙公司',
+                points: '134',
+                jiaA: 1,
+                jiaB: 2,
+                guanA: 1,
+                guanB: 0,
+                gaoA: 1,
+                gaoB: 0    
+            },
+        ]
+        this.cupMsgArr.forEach((item, index) =>{
+            if (index === 0) {
+                item.img = cup1
+            } else if (index === 1) {
+                item.img = cup2
+            } else if (index === 2) {
+                item.img = cup3
+            }
+        })
     },
     mounted() {
+
     },
     methods: {
     }
@@ -178,32 +455,160 @@ export default {
         padding: 24px 0 16px 26px;
         .gateway_bot_left{
             background: #fff;
-            width: 92%;
-            p{
-                font-size: 18px;
-                font-family: Microsoft YaHei;
-                font-weight: bold;
-                color: #3B7AD1;
+            margin-right: 30px;
+            border-radius: 10px;
+            padding-left: 25px;
+            padding-bottom: 15px;
+            border: 1px solid #E1E3EA;
+            .bot_leftTit{
+                padding: 21px 0 30px 0;
+                display: flex;
+                justify-content: space-between;
+                p{
+                    font-size: 18px;
+                    font-family: Microsoft YaHei;
+                    font-weight: bold;
+                    color: #3B7AD1;
+                }
+                .el-select{
+                    width: 130px;
+                    margin-right: 30px;
+                }
+            }
+            .bot_leftMain{
+                .mainImg{
+                    position: relative;
+                    top: -3px;
+                    span{
+                        text-align: center;
+                        line-height: 32px;
+                        font-size: 16px;
+                        color: #333333;
+                        font-weight: 400;
+                        font-family: Microsoft YaHei;
+                        display: inline-block;
+                        width: 32px;
+                        height: 32px;
+                        background: #EDEFF5;
+                        border-radius: 50%;
+                    }
+                }
+                .mainMsg{
+                    margin-left: 10px;
+                    width: 100%;
+                    .msgProgress{
+                        .el-progress{
+                            width: 90%;
+                            .el-progress__text{
+                                display: none;
+                            }
+                        }
+                    }
+                    .msgProgressT{
+                        margin-top: 5px;
+                        span{
+                            font-size: 14px;
+                            font-family: Microsoft YaHei;
+                        }
+                        span:nth-child(1){
+                            display: inline-block;
+                            width: 65%;
+                            font-weight: 400;
+                            color: #999999;
+                        }
+                        span:nth-child(2){
+                            font-weight: 600;
+                            margin-right: 15px;
+                            color: #333;
+                        }
+                        span:nth-child(3){
+                            font-weight: 600;
+                            color: #333;
+                        }
+                    }
+                }
             }
         }
         .gateway_bot_center{
             background: #fff;
-            margin-right: 33px;
-            p{
-                font-size: 18px;
-                font-family: Microsoft YaHei;
-                font-weight: bold;
-                color: #3B7AD1;
+            margin-right: 30px;
+            border-radius: 10px;
+            padding: 0 25px;
+            padding-bottom: 28px;
+            border: 1px solid #E1E3EA;
+            .bot_Tit{
+                padding: 21px 0 10px 0;
+                display: flex;
+                justify-content: space-between;
+                p{
+                    font-size: 18px;
+                    font-family: Microsoft YaHei;
+                    font-weight: bold;
+                    color: #3B7AD1;
+                }
+                .el-select{
+                    width: 130px;
+                    margin-right: 10px;
+                }
+            }
+            .el-table{
+                .el-table__body-wrapper{
+                    height: 57vh !important;
+                }
             }
         }
         .gateway_bot_right{
             background: #fff;
-            width: 92%;
-            p{
-                font-size: 18px;
-                font-family: Microsoft YaHei;
-                font-weight: bold;
-                color: #3B7AD1;
+            margin-right: 30px;
+            border-radius: 10px;
+            padding-bottom: 25px;
+            border: 1px solid #D6DBEA;
+            .bot_rightTit{
+                padding: 21px 25px 10px 25px;
+                background: #E3EFFF;
+                border-radius: 10px 10px 0px 0px;
+                p{
+                    font-size: 18px;
+                    font-family: Microsoft YaHei;
+                    font-weight: bold;
+                    color: #3B7AD1;
+                }
+            }
+            .bot_rightMain{
+                height: 63vh !important;
+                overflow-y: auto;
+                .bot_rightMain_msg{
+                    display: flex;
+                    padding: 25px 0 25px 27px;
+                    border-bottom: 1px solid #D6DBEA;
+                    .rightDiv{
+                        width: 4px;
+                        height: 40px;
+                        background: #4883D4;
+                        border-radius: 2px;
+                        position: relative;
+                        top: 2px;
+                    }
+                    .rightTitMsg{
+                        margin-left: 15px;
+                        p{
+                            width: 300px;
+                            overflow: hidden;
+                            text-overflow: ellipsis;
+                            white-space: nowrap;
+                            font-size: 16px;
+                            font-family: Microsoft YaHei;
+                            font-weight: bold;
+                            color: #333333;
+                        }
+                        span{
+                            font-size: 14px;
+                            font-family: Microsoft YaHei;
+                            font-weight: 400;
+                            color: #8991B0;
+                        }
+                    }
+                }
             }
         }
     }

+ 11 - 36
src/views/Login.vue

@@ -17,7 +17,7 @@
             <div class="remeber">
                     <el-checkbox v-model="ememberMe" disabled>记住密码</el-checkbox>
             </div>
-            <div class="loginBtn" @click="getLogin">
+            <div class="loginBtn" @click="handleLogin">
                 <span class="loginSpan">登录</span>
             </div>
         </div>
@@ -47,51 +47,26 @@ export default {
     },
     methods:{
         handleLogin() {
-            if (this.loginText === this.$utils.strChangeCase(this.inputYanzhengma, 5)) {
-                if (this.inputUser && this.inputMima) {
-                    this.loading = true
-                    this.toLogin(this.inputUser, this.inputMima)
-                } else {
-                    ElMessage.error('请输入账号或密码');
-                }
+            if (this.inputUser !== '' && this.inputMima !== '') {
+                this.getLogin(this.inputUser, this.inputMima)
             } else {
-                this.inputYanzhengma = ''
-                this.loading = false
-                ElMessage.error('验证码验证失败,请重新输入');
-                this.getCode()
+                ElMessage.error('请输入账号或密码');
             }
         },
         //登录接口
-        getLogin() {
-            let params={
-                username: this.inputUser,
-                password: this.inputMima
-            }
-            setToken('userMsg', params)
-            this.$router.push({ path: "/home"})
-            // loginApi(params).then(datas=>{
-            //     if (datas && datas.code === 0) {
-            //         this.loading = false
-            //         setToken('token', datas.token)
-            //         let userObj = {
-            //             role: '',
-            //             userId: datas.id
-            //         }
-            //         if (datas.role === '0' || datas.role === '1') {
-            //             userObj.role = 'administrators'
-            //             window.sessionStorage.setItem('userMessage', JSON.stringify(userObj))
-            //         } else {
-            //             userObj.role = 'ordinaryUser'
-            //             window.sessionStorage.setItem('userMessage', JSON.stringify(userObj))
-            //         }
-            //         this.$router.push({ path: "/index"})
+        getLogin(userName, password) {
+            // setToken('userMsg', params)
+            // loginApi(userName, password).then(datas=>{
+            //     if (datas) {
+            //         setToken('token', datas.access_token)
+            //         this.$router.push({ path: "/home"})
             //     } else {
             //         ElMessage.error(datas.msg);
             //     }
             // }).catch(e =>{
             //     this.loading = false
-            //     // window.location.reload();
             // })
+            this.$router.push({ path: "/home"})
         }
     }
 }

+ 5 - 5
src/views/homePage.vue

@@ -194,8 +194,8 @@ export default {
                 ]
             }
         ]
-        if (window.localStorage.getItem('routeTags')) {
-            this.routeTags = JSON.parse(window.localStorage.getItem('routeTags'))
+        if (window.sessionStorage.getItem('routeTags')) {
+            this.routeTags = JSON.parse(window.sessionStorage.getItem('routeTags'))
             if (this.$route?.path === '/') {
                 this.$router.push({ path: this.routeTags[0].index})
             }
@@ -207,7 +207,7 @@ export default {
                 }
             ]
             this.$router.push({ path: this.routeTags[0].index})
-            window.localStorage.setItem('routeTags', JSON.stringify(this.routeTags))
+            window.sessionStorage.setItem('routeTags', JSON.stringify(this.routeTags))
         }
         
     },
@@ -286,13 +286,13 @@ export default {
                         }
                     }
                 })
-                window.localStorage.setItem('routeTags', JSON.stringify(this.routeTags))
+                window.sessionStorage.setItem('routeTags', JSON.stringify(this.routeTags))
             }
         },
         handleClose(tag) {
             if (this.routeTags.length > 1) {
                 this.routeTags.splice(this.routeTags.indexOf(tag), 1)
-                window.localStorage.setItem('routeTags', JSON.stringify(this.routeTags))
+                window.sessionStorage.setItem('routeTags', JSON.stringify(this.routeTags))
             }
         },
         handleShowPage(tag) {