浏览代码

新增考评报告,详情,导出,服务联调;

SunZehao 2 年之前
父节点
当前提交
31184d7f5c

+ 26 - 0
src/api/api.js

@@ -51,6 +51,14 @@ export function apiGetCodeByToken(params) {
         method: 'get'
     })
 }
+// 获取用户信息
+export function apiGetUserMsg(params) {
+    return httpRequest({
+        url: `user/getSysUser?code=${params}`,
+        method: 'get'
+    })
+}
+
 // 退出接口
 export function apiPostremoveByToken(params) {
     return httpRequest({
@@ -171,6 +179,24 @@ export function apiPostOrgevaluationDelete(params) {
     })
 }
 
+//--------考评报告列表
+export function apiGetEvalReportList(params) {
+    return httpRequest({
+        url: 'evaluate-report/list',
+        method: 'get',
+        params: params
+    })
+}
+//--------考评报告列表
+export function apiGetEvalReportinfoList(params) {
+    return httpRequest({
+        url: 'evaluate-report-info/list',
+        method: 'get',
+        params: params
+    })
+}
+
+
 //----------------------------------------任务中心------------------------------------------------
 //---------列表
 export function apiPostTodoTaskList(params) {

二进制
src/assets/loginImage/logindefBak.png


+ 72 - 10
src/components/assessment/evaluationReportPage.vue

@@ -32,18 +32,19 @@
             <div class="PeriodBtn">
                 <btns
                 :showImport="false"
+                :showExport="false"
                 :showSave="false"
                 :showAdd="false"
                 :showDelete="false"
                 :disDelete="changeDateSelect.length === 0"
-                :disExport="true"
+                @handleExport="exportDataMsg"
                 ></btns>
             </div>
             <div class="evaluationReportTableData">
                 <el-table :data="evaluationReportData" style="width: 100%" @select="rowClick" @select-all="rowClick">
                     <el-table-column type="selection" label="操作" align="center"></el-table-column>
-                    <el-table-column label="业务编号" prop="responsibilityCode" width="300" />
-                    <el-table-column label="考评单位" prop="organizationName" width="330" />
+                    <el-table-column label="报告名称" prop="evaluateReportName" width="330" />
+                    <el-table-column label="业务属性" prop="binSectionName" />
                     <el-table-column label="业务类别">
                         <template #default="scope">
                             <span v-if="scope.row.checkCycle === 'YDKP'" style="font-size: 12px;">月度考评</span>
@@ -53,7 +54,6 @@
                     </el-table-column>
                     <el-table-column label="年度" prop="year" />
                     <el-table-column label="月度/季度" prop="month" />
-                    <el-table-column label="业务属性" prop="binsection" />
                     <el-table-column label="业务简述" prop="des" />
                     <el-table-column label="操作">
                         <template #default="scope">
@@ -71,15 +71,20 @@
                 </el-pagination>
             </div>
         </div>
+        <evaluation-report-table ref="reportTable"></evaluation-report-table>
     </div>
 </template>
 
 <script>
 import btns from '../elbuttonS.vue'
-import {apiGetdeptresponsibilityList, apiGetdatadictionaryList, apiGetbinsectionList} from '../../api/api'
+import ExcelJS from 'exceljs'
+import fileSave from 'file-saver'
+import evaluationReportTable from './evaluationReportTable.vue'
+import {apiGetEvalReportList, apiGetdatadictionaryList, apiGetbinsectionList} from '../../api/api'
 export default {
     components: {
-        btns
+        btns,
+        evaluationReportTable
     },
     data() {
         return {
@@ -107,14 +112,13 @@ export default {
             let that = this
             let params = {
                 pageNum: that.page.currentPage,
-                pageSize: that.page.pagesize,
-                chechCycle: 'NDKP'
+                pageSize: that.page.pagesize
             }
             if (type) {
                 params.responsibilityCode = that.rescode
                 params.des = that.resDes
             }
-            apiGetdeptresponsibilityList(params).then(datas =>{
+            apiGetEvalReportList(params).then(datas =>{
                 if (datas && datas.data) {
                     that.evaluationReportData = datas.data.records
                     that.page.total = datas.data.total
@@ -143,7 +147,7 @@ export default {
         },
         //明细
         getDetail(row) {
-            this.$refs.startFromDetail.init(row)
+            this.$refs.reportTable.init(row)
         },
         getSeachData() {
             this.page.currentPage = 1
@@ -166,6 +170,64 @@ export default {
         rowClick(selection, row) {
             this.changeDateSelect = selection
         },
+        exportDataMsg() {
+            let data = this.evaluationReportData  //接口返回数据
+            let col = [
+                { name: '报告名称'},
+                { name: '业务属性'},
+                { name: '考评周期'},
+                { name: '年'},
+                { name: '月'}
+            ]
+            let colEn = ['evaluateReportName', 'binSectionName', 'checkCycle', 'year', 'month']
+            let rowData = []
+            for(let i =0; i<data.length; i++) {
+                let item = data[i]
+                let arr = []
+                for(let j =0; j<colEn.length; j++) {
+                    let it = colEn[j]
+                    arr.push(item[it])
+                }
+                rowData.push(arr)
+            }
+            const workbook = new ExcelJS.Workbook()
+            const worksheet = workbook.addWorksheet('Sheet1')
+            //定义表格标题
+            const Targetrow = worksheet.getRow(1);
+            Targetrow.height = 30;
+            const Targetcell = worksheet.getCell(`A1`);
+            worksheet.mergeCells(`A1:E1`);
+            Targetcell.value = `测试表格`;
+            Targetcell.font = { name: "宋体", family: 4, size: 11, bold: true }; // 字体
+            Targetcell.alignment = { vertical: "middle", horizontal: "center" }; //对齐
+            
+            worksheet.columns = [
+                { header: '月份', key: 'name', width: 24 },
+                { header: '合计', key: 'statistic', width: 24 },
+                { header: '一月', key: 'january' },
+                { header: '二月', key: 'february' },
+                { header: '三月', key: 'march' },
+                { header: '四月', key: 'april' },
+                { header: '五月', key: 'may' },
+                { header: '六月', key: 'june' },
+                { header: '七月', key: 'july' },
+                { header: '八月', key: 'august' },
+                { header: '九月', key: 'september' },
+                { header: '十月', key: 'october' },
+                { header: '十一月', key: 'november' },
+                { header: '十二月', key: 'december' }
+            ]
+            worksheet.getRow(1).font = {
+                size: 12,
+                bold: true
+            }
+            worksheet.addRows(data)
+            workbook.xlsx.writeBuffer().then(buffer => {
+                //这里为type
+                const blob = new Blob([buffer], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8' })
+                fileSave(blob, `数据导出.xlsx`)
+            })
+        }
     }
 }
 </script>

+ 184 - 0
src/components/assessment/evaluationReportTable.vue

@@ -0,0 +1,184 @@
+<template>
+    <div class="reportTItem">
+        <el-dialog title="考评报告详情" v-model="editEvaluaVisible" width="90vw" :close-on-click-modal="false">
+            <div class="reportTAll">
+                <div class="reportTBtn">
+                    <div class="PeriodBtn">
+                        <el-row :gutter="10" style="padding-left: 10px;">
+                            <el-col :span="1.5">
+                                <el-button
+                                type="warning"
+                                icon="Download"
+                                size="mini"
+                                @click="handleExport"
+                                >导出</el-button>
+                            </el-col>
+                        </el-row>
+                    </div>
+                    <div class="reportTTableData">
+                        <el-table :data="reportTableData.body" ref="report-table" style="width: 100%">
+                            <el-table-column :label="rowevalradio.des" align="center">
+                                <el-table-column label="序号" type="index" width="50" align="center" />
+                                <el-table-column :label="item.nameZh" :prop="item.nameEh" v-for="item in reportTableData.title" :key="item" />
+                            </el-table-column>
+                        </el-table>
+                    </div>
+                </div>
+            </div>
+        </el-dialog>
+    </div>
+</template>
+
+<script>
+import ExcelJS from 'exceljs'
+import fileSave from 'file-saver'
+import {apiGetEvalReportinfoList} from '../../api/api'
+export default {
+    data() {
+        return {
+            editEvaluaVisible: false,
+            reportTableData: [],
+            rowevalradio: {},
+        }
+    },
+    methods: {
+        init(row) {
+            this.editEvaluaVisible = true
+            this.reportTableData = []
+            this.rowevalradio = row
+            this.getreportTableData(row)
+        },
+        // 查询规则详情数据
+        getreportTableData(row) {
+            let that = this
+            let params = {
+                evaluateReportId: row.id
+            }
+            apiGetEvalReportinfoList(params).then(datas =>{
+                if (datas && datas.data) {
+                    that.reportTableData = datas.data
+                }
+            })
+        },
+        handleExport() {
+            let dataHeader = this.reportTableData.title  //接口返回表格头
+            let dataMsg = this.reportTableData.body  //接口返回数据
+            let adb = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'G', 'K', 'L', 'M', 'N']
+            let col = [{name: '序号'}]
+            let colEn = []
+            dataHeader.forEach(item =>{
+                let objzh = {
+                    name: item.nameZh
+                }
+                col.push(objzh)
+                colEn.push(item.nameEh)
+            })
+            let rowData = []
+            for(let i =0; i<dataMsg.length; i++) {
+                let item = dataMsg[i]
+                let arr = []
+                for(let j =0; j<colEn.length; j++) {
+                    let it = colEn[j]
+                    arr[0] = i+1
+                    arr.push(item[it])
+                }
+                rowData.push(arr)
+            }
+            const workbook = new ExcelJS.Workbook()
+            const worksheet = workbook.addWorksheet('Sheet1')
+            worksheet.properties.defaultColWidth = 15; // 默认列宽
+            //定义表格标题
+            const Targetrow = worksheet.getRow(1);
+            Targetrow.height = 30;
+            const Targetcell = worksheet.getCell(`A1`);
+            worksheet.mergeCells(`A1:${adb[col.length-1]}1`);
+            Targetcell.value = this.rowevalradio.des;
+            Targetcell.font = { name: "微软雅黑", family: 4, size: 11, bold: false }; // 字体
+            Targetcell.alignment = { vertical: "middle", horizontal: "center" }; //对齐
+            worksheet.addTable({
+                name: 'MyTable',
+                ref: 'A2',
+                headerRow: true,
+                columns: col,
+                rows: rowData,
+            });
+            workbook.xlsx.writeBuffer().then(buffer => {
+                //这里为type
+                const blob = new Blob([buffer], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8' })
+                fileSave(blob, `数据导出.xlsx`)
+            })
+        }
+    }
+}
+</script>
+
+<style lang="less">
+.reportTItem{
+    .el-overlay{
+        .el-dialog{
+            margin-top: 5vh !important;
+            .el-dialog__body{
+                padding: 0 20px 30px 20px !important;
+                .reportTAll{
+                    .el-select, .el-input{
+                        width: 100%;
+                    }
+                    .reportTBtn{
+                        padding: 10px 20px 0 20px;
+                        .PeriodBtn{
+                            display: flex;
+                            justify-content: end;
+                            padding: 20px 0;
+                            .el-button{
+                                height: 30px;
+                                padding: 0 30px ;
+                                span{
+                                    margin:0;
+                                }
+                            }
+                            .is-disabled{
+                                opacity: 0.5;
+                            }
+                        }
+                    }
+                    .reportTTableData{
+                        .el-table{
+                            .el-table__body-wrapper{
+                                height: 60vh !important;
+                            }
+                            .el-input__inner{
+                                height: 30px !important;
+                            }
+                            .el-radio__label{
+                                display: none;
+                            }
+                        }
+                        .el-pagination{
+                            margin-top: 20px;
+                            text-align: end;
+                            position: relative;
+                        }
+                    }
+                    .onlyDialog{
+                        .el-overlay{
+                            .el-dialog{
+                                margin-top: 10vh !important;
+                            }
+                        }
+                    }
+                }
+            }
+            .el-dialog__footer{
+                .dialog-footer{
+                    display: flex;
+                    justify-content: center;
+                    .el-button{
+                        width: 180px !important;
+                        height: 40px !important;
+                    }
+                }
+            }
+        }
+    }
+}
+</style>

+ 2 - 2
src/components/assessment/evaluationStartFrom.vue

@@ -20,7 +20,7 @@
                             <span>{{receiptMsg.des}}</span>
                         </div>
                         <div class="danjuMsg_data">
-                            <span class="data_tit">业务类:</span>
+                            <span class="data_tit">业务类:</span>
                             <span>{{receiptMsg.type}}</span>
                         </div>
                     </el-col>
@@ -153,7 +153,7 @@ export default {
                 stage: row.stage,
                 creator: row.createBy,
                 createDate: row.createTime,
-                type: row.organizationType,
+                type: row.checkCycle === 'YDKP'?'月度考评':row.checkCycle === 'JDKP'?'季度考评':'年度考评',
                 year: row.year,
                 recStage: '有效'
             }

+ 2 - 2
src/components/assessment/evaluationYearFrom.vue

@@ -20,7 +20,7 @@
                             <span>{{receiptMsg.des}}</span>
                         </div>
                         <div class="danjuMsg_data">
-                            <span class="data_tit">业务类:</span>
+                            <span class="data_tit">业务类:</span>
                             <span>{{receiptMsg.type}}</span>
                         </div>
                     </el-col>
@@ -153,7 +153,7 @@ export default {
                 stage: row.stage,
                 creator: row.createBy,
                 createDate: row.createTime,
-                type: row.organizationType,
+                type: row.checkCycle === 'YDKP'?'月度考评':row.checkCycle === 'JDKP'?'季度考评':'年度考评',
                 year: row.year,
                 recStage: '有效'
             }

+ 2 - 2
src/components/assessment/monthQuarterFrom.vue

@@ -20,7 +20,7 @@
                             <span>{{receiptMsg.des}}</span>
                         </div>
                         <div class="danjuMsg_data">
-                            <span class="data_tit">业务类:</span>
+                            <span class="data_tit">业务类:</span>
                             <span>{{receiptMsg.type}}</span>
                         </div>
                     </el-col>
@@ -153,7 +153,7 @@ export default {
                 stage: row.stage,
                 creator: row.createBy,
                 createDate: row.createTime,
-                type: row.organizationType,
+                type: row.checkCycle === 'YDKP'?'月度考评':row.checkCycle === 'JDKP'?'季度考评':'年度考评',
                 year: row.year,
                 recStage: '有效'
             }

+ 1 - 1
src/components/evaluationSystem/evaluationIndexPage.vue

@@ -178,7 +178,7 @@
                                                     </div>
                                                 </div>
                                             </template>
-                                            <div style="padding:10px 20px">
+                                            <div style="padding:10px 20px;max-height: 50vh;overflow-y: auto;">
                                                 <div class="tableBtn add" @click="handleAddTableChild(item)" v-if="!isDetail">
                                                     <img :src="addIcon" alt="">
                                                     <span>新增</span>

+ 2 - 2
src/components/taskCenter/taskCenterEvlFrom.vue

@@ -20,7 +20,7 @@
                             <span>{{receiptMsg.des}}</span>
                         </div>
                         <div class="danjuMsg_data">
-                            <span class="data_tit">业务类:</span>
+                            <span class="data_tit">业务类:</span>
                             <span>{{receiptMsg.type}}</span>
                         </div>
                     </el-col>
@@ -191,7 +191,7 @@ export default {
                         stage: item.stage,
                         creator: item.createBy,
                         createDate: item.createTime,
-                        type: item.organizationType,
+                        type: item.checkCycle === 'YDKP'?'月度考评':item.checkCycle === 'JDKP'?'季度考评':'年度考评',
                         year: item.year,
                         recStage: '有效'
                     }

+ 19 - 5
src/views/Login.vue

@@ -31,13 +31,13 @@
 <script>
 import { setToken } from '@/api/auth'
 import { ElMessage } from "element-plus";
-import { loginApi, apiGetCodeByToken, apiGetMenuData, apiGetPrivilegesOfCurrentUserAll } from '../api/api'
+import { loginApi, apiGetCodeByToken, apiGetUserMsg, apiGetPrivilegesOfCurrentUserAll } from '../api/api'
 export default {
     data() {
         return {
-            inputUser:'testdbkp',
-            // inputUser:'testrsadmin',
-            inputMima:'Gddl!#%135',
+            inputUser:'',
+            // inputUser:'testrsadmin',Gddl!#%135
+            inputMima:'',
             codeUrl:'',
             ememberMe:false,
             loading:false,
@@ -75,6 +75,20 @@ export default {
             apiGetCodeByToken(val).then(datas =>{
                 if (datas && datas.data) {
                     setToken('code', datas.data)
+                    that.getUserMsg(datas.data)
+                }
+            })
+        },
+        getUserMsg(val) {
+            let that = this
+            apiGetUserMsg(val).then(datas =>{
+                if (datas && datas.data) {
+                    // setToken('user', JSON.stringify(datas.data))
+                    let obj = {
+                        name: datas.data.name,
+                        id: datas.data.id
+                    }
+                    window.sessionStorage.setItem('user', JSON.stringify(obj))
                     that.getApprverData()
                 }
             })
@@ -105,7 +119,7 @@ export default {
     position: relative;
     width: 100%;
     height:1080px;
-    background-image: url('../assets/loginImage/loginBak.png');
+    background-image: url('../assets/loginImage/logindefBak.png');
     background-position: 0 0;
     background-repeat: no-repeat;
     display: flex;

+ 140 - 1
src/views/homePage.vue

@@ -17,7 +17,7 @@
             </div>
             <div class="homeMain" :style="mainHeight">
                 <div class="homeMain_tag">
-                    <div style="width: 95%">
+                    <div style="width: 95%;overflow: hidden;">
                         <el-tag
                             v-for="tag in routeTags"
                             :key="tag.name"
@@ -74,6 +74,144 @@ export default {
     },
     created(){
         this.getMenuData()
+        // this.forecastDatas = [
+        //     {
+        //         index: '/home',
+        //         name: '考评首页',
+        //         img: homeImg
+        //     },
+        //     {
+        //         index: '/taskCenter',
+        //         name: '任务中心',
+        //         img: taskImg
+        //     },
+        //     {
+        //         index: '1',
+        //         name: '考评业务',
+        //         img: yewuImg,
+        //         children: [
+        //             {
+        //                 index: '/assessment/evaluationStart',
+        //                 name: '考评目标启动',
+        //             },
+        //             {
+        //                 index: '/assessment/monthQuarter',
+        //                 name: '月/季度目标考评'
+        //             },
+        //             {
+        //                 index: '/assessment/evaluationYear',
+        //                 name: '年度目标考评'
+        //             },
+        //             {
+        //                 index: '',
+        //                 name: '考评项对标'
+        //             },
+        //             {
+        //                 index: '',
+        //                 name: '考评项预警'
+        //             },
+        //             {
+        //                 index: '',
+        //                 name: '人员考评'
+        //             },
+        //             {
+        //                 index: '',
+        //                 name: '任期考评'
+        //             },
+        //             {
+        //                 index: '',
+        //                 name: '考评监督'
+        //             },
+        //             {
+        //                 index: '',
+        //                 name: '考评评级'
+        //             },
+        //             {
+        //                 index: '',
+        //                 name: '考评报告'
+        //             },
+        //             {
+        //                 index: '',
+        //                 name: '考评公告'
+        //             },
+        //             {
+        //                 index: '',
+        //                 name: '单位考核结果应用'
+        //             },
+        //             {
+        //                 index: '',
+        //                 name: '部门考核结果应用'
+        //             }
+        //         ]
+        //     },
+        //     {
+        //         index: '2',
+        //         name: '考评体系配置',
+        //         img: tixiImg,
+        //         children: [
+        //             {
+        //                 index: '/evaluationSystem/evaluationIndex',
+        //                 name: '考评指标管理',
+        //             },
+        //             {
+        //                 index: '/evaluationSystem/evaluationRules',
+        //                 name: '考评规则配置',
+        //             },
+        //             {
+        //                 index: '/evaluationSystem/company',
+        //                 name: '单位权重配置',
+        //             },
+        //             {
+        //                 index: '/evaluationSystem/department',
+        //                 name: '考评部门配置',
+        //             },
+        //             {
+        //                 index: '/evaluationSystem/personnel',
+        //                 name: '考评人员配置',
+        //             },
+        //             {
+        //                 index: '/evaluationSystem/achievementK',
+        //                 name: '业绩考核系数配置',
+        //             },
+        //             {
+        //                 index: '',
+        //                 name: '党建考核系数配置',
+        //             },
+        //         ]
+        //     },
+        //     {
+        //         index: '3',
+        //         name: '考评知识库',
+        //         img: zhishikuImg,
+        //         children: [
+        //             {
+        //                 index: '/knowledgePage/scoringRules',
+        //                 name: '考评得分规则',
+        //             },
+        //             {
+        //                 name: '考评评级规则',
+        //             },
+        //             {
+        //                 name: '考评预警规则',
+        //             }
+        //         ]
+        //     },
+        //     {
+        //         index: '4',
+        //         name: '基础信息配置',
+        //         img: quanxianImg,
+        //         children: [
+        //             {
+        //                 index: '',
+        //                 name: '人员权限配置',
+        //             },
+        //             {
+        //                 index: '',
+        //                 name: '工作流程配置',
+        //             }
+        //         ]
+        //     }
+        // ]
         if (window.sessionStorage.getItem('routeTags')) {
             this.routeTags = JSON.parse(window.sessionStorage.getItem('routeTags'))
             if (this.$route?.path === '/') {
@@ -185,6 +323,7 @@ export default {
                     removeToken('code')
                     removeToken('purview')
                     window.sessionStorage.removeItem('routeTags')
+                    window.sessionStorage.removeItem('user')
                     this.$router.push({ path: "/login"})
                 }
             })