Procházet zdrojové kódy

本部部门业绩考评增加导出报表功能(服务联调);部署本部部门业绩指标计划,本部部门业绩指标考核,本部部门绩效考核评级页面,测试修改问题;任务中心新增部门计划详情与部门指标考核详情页面并增加审批流程;

SunZehao před 1 rokem
rodič
revize
c728579683

+ 26 - 2
src/api/api.js

@@ -155,11 +155,19 @@ export function apiGetevaluationdeptplanSave(params) {
 }
 //----"部门考评目标启动-保存or修改"----新增后修改状态
 export function apideptModifyState(params) {
-    return httpRequest.post('evaluation-dept-plan/targetStart', params)
+    return httpRequest({
+        url: 'evaluation-dept-plan/targetStart',
+        method: 'post',
+        params: params
+    })
 }
 //----"部门考评指标考核-保存or修改"----新增后修改状态
 export function apideptModifyassessmentState(params) {
-    return httpRequest.post('evaluation-dept-assessment/targetStart', params)
+    return httpRequest({
+        url: 'evaluation-dept-assessment/targetStart',
+        method: 'post',
+        params: params
+    })
 }
 
 //------考评启动(流程)
@@ -199,6 +207,22 @@ export function apiGetevaluationdeptplanDetail(params) {
         method: 'get'
     })
 }
+//------部门考评启动-任务详情头部信息
+export function apiGetevaluationdeptplanDetailHeader(params) {
+    return httpRequest({
+        url: `evaluation-dept-plan/detailsHead/${params}`,
+        method: 'get'
+    })
+}
+//------部门考评考核-任务详情头部信息
+export function apiGetevaluationdeptassessmentDetailHeader(params) {
+    return httpRequest({
+        url: `evaluation-dept-assessment/detailsHead/${params}`,
+        method: 'get'
+    })
+}
+
+
 //------单位考评启动-详情-修改
 export function apiGetindicatorsaveBatchDto(params) {
     return httpRequest.post('responsibility-indicator-info/saveBatchDto', params)

+ 0 - 45
src/components/assessment/evaluationDeptBusinessFrom.vue

@@ -276,51 +276,6 @@ export default {
                 }
             })
         },
-        examineAndApprove(type) {
-            let that = this
-            let actionCS = ''
-            if (type === 'agree') {
-                if (that.rowMsg.taskType === 'SIGN') {
-                    actionCS = 'signAgree'
-                } else if (that.rowMsg.taskType === 'NORMAL') {
-                    actionCS = 'agree'
-                }
-            } else {
-                if (that.rowMsg.taskType === 'SIGN') {
-                    actionCS = 'signReject'
-                } else if (that.rowMsg.taskType === 'NORMAL') {
-                    actionCS = 'reject'
-                }
-            }
-            let params = {
-                taskId: that.rowMsg.id, //任务ID
-                nodeId: that.rowMsg.nodeId, //节点ID
-                action: actionCS, //固定值
-                instanceId: that.rowMsg.instId, //流程实例ID
-                opinion: that.descMsg, //审批意见
-                iamCode: window.localStorage.getItem('code'), //认证后code值
-                taskName: that.rowMsg.name,
-                defKey: that.instanceChild.defKey,
-                bizKey: that.instanceChild.bizKey
-            }
-            apiPostIsdoAction(params).then(datas =>{
-                if (datas && datas.data) {
-                    if (datas.data.isOk) {
-                        that.$message({
-                            message: datas.data.data,
-                            type: 'success'
-                        })
-                        that.dialogVisible = false
-                        that.$emit('approveMsg', datas.data.isOk)
-                    } else {
-                        that.$message({
-                            message: datas.data.msg,
-                            type: 'error'
-                        })
-                    }
-                }
-            })
-        },
         handleImport() {
             this.$refs.importPage.upload.title = "本部部门业绩指标计划信息导入"
             this.$refs.importPage.upload.open = true

+ 2 - 6
src/components/assessment/evaluationDeptBusinessPage.vue

@@ -36,17 +36,13 @@
                             </div>
                         </template>
                     </el-table-column>
-                    <el-table-column label="流程状态" prop="stage" width="200">
-                        <template #default="scope">
-                            <p class="indicitem" @click="seeStates(scope.row)">{{scope.row.stage}}</p>
-                        </template>
-                    </el-table-column>
+                    <el-table-column label="流程状态" prop="stage" width="200" />
                     <el-table-column label="操作" width="160">
                         <template #default="scope">
                             <div style="display:flex">
                                 <p class="indicitem" v-if="scope.row.stage === '流程未启动'" @click="agetdeptresponsibility(scope.row)">启动</p>
                                 <p class="indicitem" v-else @click="getDetail(scope.row)">详情</p>
-                                <p class="indicitem" @click="getGenerateReport(scope.row)">生成报表</p>
+                                <p class="indicitem" v-if="scope.row.stage === '流程已结束'" @click="getGenerateReport(scope.row)">生成报表</p>
                             </div>
                         </template>
                     </el-table-column>

+ 4 - 4
src/components/assessment/evaluationDeptRatingPage.vue

@@ -384,7 +384,7 @@ export default {
                     orgName = item.keyName
                 }
             })
-            // let userMes = JSON.parse(window.sessionStorage.getItem('user'))
+            let userMes = JSON.parse(window.sessionStorage.getItem('user'))
             let params = {
                 deptId: that.ruleForm.department,
                 deptName: orgName,
@@ -412,9 +412,9 @@ export default {
                 sepContent: that.ruleForm.sepContent,
                 octContent: that.ruleForm.octContent,
                 novContent: that.ruleForm.novContent,
-                deceContent: that.ruleForm.deceContent
-                // createBy: userMes.id,
-                // createName: userMes.name
+                deceContent: that.ruleForm.deceContent,
+                createBy: userMes.id,
+                createName: userMes.name
             }
             if (that.isSave) {
                 params.id = that.evalradio.id

+ 0 - 45
src/components/assessment/evaluationDeptStartFrom.vue

@@ -322,51 +322,6 @@ export default {
                 }
             })
         },
-        examineAndApprove(type) {
-            let that = this
-            let actionCS = ''
-            if (type === 'agree') {
-                if (that.rowMsg.taskType === 'SIGN') {
-                    actionCS = 'signAgree'
-                } else if (that.rowMsg.taskType === 'NORMAL') {
-                    actionCS = 'agree'
-                }
-            } else {
-                if (that.rowMsg.taskType === 'SIGN') {
-                    actionCS = 'signReject'
-                } else if (that.rowMsg.taskType === 'NORMAL') {
-                    actionCS = 'reject'
-                }
-            }
-            let params = {
-                taskId: that.rowMsg.id, //任务ID
-                nodeId: that.rowMsg.nodeId, //节点ID
-                action: actionCS, //固定值
-                instanceId: that.rowMsg.instId, //流程实例ID
-                opinion: that.descMsg, //审批意见
-                iamCode: window.localStorage.getItem('code'), //认证后code值
-                taskName: that.rowMsg.name,
-                defKey: that.instanceChild.defKey,
-                bizKey: that.instanceChild.bizKey
-            }
-            apiPostIsdoAction(params).then(datas =>{
-                if (datas && datas.data) {
-                    if (datas.data.isOk) {
-                        that.$message({
-                            message: datas.data.data,
-                            type: 'success'
-                        })
-                        that.dialogVisible = false
-                        that.$emit('approveMsg', datas.data.isOk)
-                    } else {
-                        that.$message({
-                            message: datas.data.msg,
-                            type: 'error'
-                        })
-                    }
-                }
-            })
-        },
         handleImport() {
             this.$refs.importPage.upload.title = "本部部门业绩指标计划信息导入"
             this.$refs.importPage.upload.open = true

+ 548 - 0
src/components/taskCenter/taskCenterDeptBusinessFrom.vue

@@ -0,0 +1,548 @@
+<template>
+    <div class="deptstartFrom">
+        <el-dialog title="考评启动详情" v-model="dialogVisible" :fullscreen="true" :close-on-click-modal="false">
+            <div class="startDetail">
+                <p class="starttitleSty">单据信息:</p>
+                <el-row class="danjuMsg">
+                    <el-col :span="6">
+                        <div class="danjuMsg_data">
+                            <span class="data_tit">业务编号:</span>
+                            <span>{{receiptMsg.code}}</span>
+                        </div>
+                        <div class="danjuMsg_data">
+                            <span class="data_tit">创建日期:</span>
+                            <span>{{receiptMsg.createDate}}</span>
+                        </div>
+                    </el-col>
+                    <el-col :span="6">
+                        <div class="danjuMsg_data">
+                            <span class="data_tit">业务简述:</span>
+                            <span>{{receiptMsg.des}}</span>
+                        </div>
+                        <div class="danjuMsg_data">
+                            <span class="data_tit">考评周期:</span>
+                            <span>{{receiptMsg.type}}</span>
+                        </div>
+                    </el-col>
+                    <el-col :span="6">
+                        <div class="danjuMsg_data">
+                            <span class="data_tit">流程状态:</span>
+                            <span>{{receiptMsg.stage}}</span>
+                        </div>
+                        <div class="danjuMsg_data">
+                            <span class="data_tit">年度:</span>
+                            <span>{{receiptMsg.year}}</span>
+                        </div>
+                    </el-col>
+                    <el-col :span="6">
+                        <div class="danjuMsg_data">
+                            <span class="data_tit">创建人:</span>
+                            <span>{{receiptMsg.createName}}</span>
+                        </div>
+                        <div class="danjuMsg_data">
+                            <span class="data_tit">单据状态:</span>
+                            <span>{{receiptMsg.recStage}}</span>
+                        </div>
+                    </el-col>
+                </el-row>
+                <div class="btnASeach">
+                    <div class="detaTableBtns">
+                        <div class="tableBtn save" @click="saveDetail">
+                            <img :src="saveIcon" alt="">
+                            <span>保存</span>
+                        </div>
+                        <div class="tableBtn import" @click="handleImport">
+                            <img :src="importIcon" alt="">
+                            <span>导入</span>
+                        </div>
+                        <div class="tableBtn export" @click="handleExport">
+                            <img :src="exportIcon" alt="">
+                            <span>导出</span>
+                        </div>
+                    </div>
+                </div>
+                <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
+                    <el-tab-pane label="考评指标项内容" name="first">
+                        <el-table :data="quantifiedList.slice((pageLeft.currentPage-1)*pageLeft.pagesize, pageLeft.currentPage*pageLeft.pagesize)"
+                         style="width: 100%" @select="rowClick" @select-all="rowClick">
+                            <el-table-column label="序号" type="index" width="80" />
+                            <el-table-column label="部门名称" prop="deptName" width="260">
+                                <template #default="scope">
+                                    <el-select v-model="scope.row.deptName" placeholder="请选择所属部门" v-if="scope.row.showInput">
+                                        <el-option
+                                        v-for="item in departData"
+                                        :key="item.id"
+                                        :label="item.keyName"
+                                        :value="item.id">
+                                        </el-option>
+                                    </el-select>
+                                    <span v-else>{{scope.row.deptName}}</span>
+                                </template>
+                            </el-table-column>
+                            <el-table-column label="排序" width="100" prop="serialNumber" />
+                            <el-table-column label="指标名称" prop="targetName" />
+                            <el-table-column label="目标值" prop="targetValue" />
+                            <el-table-column label="基础分" width="150" prop="baseScore" />
+                            <el-table-column label="完成情况" width="300">
+                                <template #default="scope">
+                                    <el-input v-model="scope.row.completionStatus"
+                                     type="textarea" :rows="2" placeholder="请输入完成情况"></el-input>
+                                </template>
+                            </el-table-column>
+                            <el-table-column label="评价标准" prop="evaluationCriteria" />
+                            <el-table-column label="自评得分" width="150">
+                                <template #default="scope">
+                                    <el-input-number v-model="scope.row.evaluationScore" :precision="2" :step="0.1" :min="0" />
+                                </template>
+                            </el-table-column>
+                            <el-table-column label="审核状态" width="200" >
+                                <template #default="scope">
+                                    <el-select v-model="scope.row.auditStatus" placeholder="请选择审核状态">
+                                        <el-option
+                                        v-for="item in statusData"
+                                        :key="item.id"
+                                        :label="item.name"
+                                        :value="item.id">
+                                        </el-option>
+                                    </el-select>
+                                </template>
+                            </el-table-column>
+                        </el-table>
+                        <el-pagination
+                            @current-change="handleCurrentChangeLeft"
+                            :current-page="pageLeft.currentPage"
+                            :page-size="pageLeft.pagesize"
+                            layout="total, prev, pager, next, jumper"
+                            :total="pageLeft.total">
+                        </el-pagination>
+                    </el-tab-pane>
+                </el-tabs>
+                <div>
+                    <p class="starttitleSty">审批意见:</p>
+                    <el-input v-model="descMsg" :rows="3" type="textarea" placeholder="请输入审批意见"></el-input>
+                </div>
+            </div>
+            <template #footer>
+                <span class="dialog-footer">
+                    <el-button type="primary" @click="examineAndApprove('agree')">同 意</el-button>
+                    <el-button @click="examineAndApprove('reject')">拒 绝</el-button>
+                </span>
+            </template>
+        </el-dialog>
+        <import-dailog ref="importPage" @successImport="successImport" @importLoading="importLoading"></import-dailog>
+    </div>
+</template>
+
+<script>
+import importDailog from '../importPage/importDailog.vue'
+import {apiGetevaluationdeptplanDetail,apiGetevaluationdeptplanUpdate, apiPostIsdoAction, apiGetevaluationdeptassessmentDetailHeader} from '../../api/api'
+import ExcelJS from 'exceljs'
+import fileSave from 'file-saver'
+import addIcon from '../../assets/btnIcon/add.png'
+import saveIcon from '../../assets/btnIcon/save.png'
+import editIcon from '../../assets/btnIcon/edit.png'
+import deleteIcon from '../../assets/btnIcon/delete.png'
+import exportIcon from '../../assets/btnIcon/export.png'
+import importIcon from '../../assets/btnIcon/import.png'
+export default {
+    components: {
+        importDailog
+    },
+    data() {
+        return {
+            descMsg: '',
+            dialogVisible: false,
+            activeName: 'first',
+            quantifiedList: [],
+            changeDateSelect: [],
+            receiptMsg: {
+                code: '',
+                des: '',
+                stage: '',
+                createName: '',
+                createDate: '',
+                type: '',
+                year: '',
+                recStage: ''
+            },
+            addIcon: addIcon,
+            saveIcon: saveIcon,
+            editIcon: editIcon,
+            deleteIcon: deleteIcon,
+            exportIcon: exportIcon,
+            importIcon: importIcon,
+            rowMsg: {},
+            orgruleData: [],
+            indicItemoptions: [],
+            sectionNameArr: [],
+            deptNameArr: [],
+            statusData: [],
+            pageLeft:{
+                pagesize: 15,
+                currentPage: 1,
+                total: 0
+            },
+            pageRight:{
+                pagesize: 15,
+                currentPage: 1,
+                total: 0
+            },
+            departData: [],
+            instanceChild: {}
+        }
+    },
+    created() {
+        this.statusData = [
+            {
+                name: '已完成',
+                id: '1'
+            },
+            {
+                name: '待审核',
+                id: '0'
+            },
+            {
+                name: '未开始',
+                id: '-1'
+            }
+        ]
+    },
+    methods: {
+        init(row, id, datas) {
+            this.dialogVisible = true
+            this.instanceChild = datas
+            this.activeName = 'first'
+            this.getDetails(id)
+            this.rowMsg = row
+
+        },
+        handleClick() {
+            this.changeDateSelect = []
+        },
+        rowClick(selection, row) {
+            this.changeDateSelect = selection
+        },
+        handleCurrentChangeLeft(val) {
+            this.pageLeft.currentPage = val
+        },
+        handleCurrentChangeRight(val) {
+            this.pageRight.currentPage = val
+        },
+        //获取详情
+        getDetails(id) {
+            let that = this
+            that.quantifiedList = []
+            apiGetevaluationdeptassessmentDetailHeader(id).then(datas =>{
+                if (datas && datas.data) {
+                    this.receiptMsg = {
+                        code: row.responsibilityCode,
+                        des: row.des,
+                        stage: row.stage,
+                        createName: row.createName,
+                        createDate: row.createTime,
+                        type: row.checkCycle === 'YDKP'?'月度考评':row.checkCycle === 'JDKP'?'季度考评':'年度考评',
+                        year: row.appraisalYear,
+                        recStage: '有效'
+                    }
+                }
+            })
+            apiGetevaluationdeptplanDetail(id).then(datas =>{
+                if (datas && datas.data) {
+                    that.quantifiedList = datas.data
+                    that.pageLeft.total = datas.data.length
+                }
+            })
+        },
+        saveDetail() {
+            let that = this
+            let params = []
+            that.quantifiedList.forEach(item =>{
+                let obj = {
+                    id: item.id,
+                    targetName: item.targetName,
+                    targetValue: item.targetValue,
+                    baseScore: item.baseScore.toString(),
+                    evaluationCriteria: item.evaluationCriteria,
+                    auditStatus: item.auditStatus,
+                    serialNumber: item.serialNumber,
+                    completionStatus: item.completionStatus,
+                    evaluationScore: item.evaluationScore
+                }
+                params.push(obj)
+            })
+            apiGetevaluationdeptplanUpdate(params).then(datas =>{
+                if (datas) {
+                    if (datas.success) {
+                        that.$message({
+                            message: '保存成功',
+                            type: 'success'
+                        });
+                        that.getDetails(that.rowMsg.id)
+                    } else {
+                        that.$message({
+                            message: datas.data,
+                            type: 'error'
+                        })
+                    }
+                }
+            })
+        },
+        examineAndApprove(type) {
+            let that = this
+            let actionCS = ''
+            if (type === 'agree') {
+                if (that.rowMsg.taskType === 'SIGN') {
+                    actionCS = 'signAgree'
+                } else if (that.rowMsg.taskType === 'NORMAL') {
+                    actionCS = 'agree'
+                }
+            } else {
+                if (that.rowMsg.taskType === 'SIGN') {
+                    actionCS = 'signReject'
+                } else if (that.rowMsg.taskType === 'NORMAL') {
+                    actionCS = 'reject'
+                }
+            }
+            let params = {
+                taskId: that.rowMsg.id, //任务ID
+                nodeId: that.rowMsg.nodeId, //节点ID
+                action: actionCS, //固定值
+                instanceId: that.rowMsg.instId, //流程实例ID
+                opinion: that.descMsg, //审批意见
+                iamCode: window.localStorage.getItem('code'), //认证后code值
+                taskName: that.rowMsg.name,
+                defKey: that.instanceChild.defKey,
+                bizKey: that.instanceChild.bizKey
+            }
+            apiPostIsdoAction(params).then(datas =>{
+                if (datas && datas.data) {
+                    if (datas.data.isOk) {
+                        that.$message({
+                            message: datas.data.data,
+                            type: 'success'
+                        })
+                        that.dialogVisible = false
+                        that.$emit('approveMsg', datas.data.isOk)
+                    } else {
+                        that.$message({
+                            message: datas.data.msg,
+                            type: 'error'
+                        })
+                    }
+                }
+            })
+        },
+        handleImport() {
+            this.$refs.importPage.upload.title = "本部部门业绩指标计划信息导入"
+            this.$refs.importPage.upload.open = true
+            this.$refs.importPage.upload.url = '/evaluation-dept-plan/import'
+        },
+        successImport(val) {
+            this.getDetails(this.rowMsg.id)
+        },
+        handleExport() {
+            let data = this.quantifiedList  //接口返回数据
+            const workbook = new ExcelJS.Workbook()
+            const worksheet = workbook.addWorksheet('Sheet1')
+            //根据数据自己调整
+            let colums = []
+            colums = [
+                { header: 'ID', key: 'id', width: 26 },
+                { header: '业务ID', key: 'businessPlanId', width: 26 },
+                { header: '部门ID', key: 'deptId', width: 26 },
+                { header: '部门名称', key: 'deptName', width: 26 },
+                { header: '部门编码', key: 'deptCode', width: 26 },
+                { header: '排序', key: 'serialNumber', width: 26 },
+                { header: '指标名称', key: 'targetName', width: 18 },
+                { header: '目标值', key: 'targetValue', width: 18 },
+                { header: '基础分', key: 'baseScore', width: 18 },
+                { header: '完成情况', key: 'completionStatus', width: 18 },
+                { header: '评价标准', key: 'evaluationCriteria', width: 18 },
+                { header: '自评得分', key: 'evaluationScore', width: 18 }
+            ]
+            worksheet.columns = colums
+            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>
+
+<style lang="less">
+.deptstartFrom{
+    .el-overlay{
+        .el-dialog{
+            // margin-top: 7vh;
+            .el-dialog__body{
+                padding: 0 20px !important;
+                .startDetail{
+                    .starttitleSty{
+                        font-size: 18px;
+                        font-family: Microsoft YaHei;
+                        font-weight: bold;
+                        color: #3B7AD1;
+                        // line-height: 12px;
+                        margin: 20px 0 20px 10px;
+                    }
+                    .danjuMsg{
+                        border: 1px solid #D6DBEA;
+                        padding: 10px 20px;
+                        border-radius: 10px;
+                        margin-bottom: 20px;
+                        .danjuMsg_data{
+                            padding: 5px 0 10px 0;
+                            .data_tit{
+                                margin-right: 10px;
+                                font-weight: bold;
+                                font-size: 14px;
+                                font-family: Microsoft YaHei;
+                                color: #8991B0;
+                            }
+                            .data_tit_wd{
+                                display: inline-block;
+                                width: 90px;
+                            }
+                            .el-form-item--small{
+                                .el-input{
+                                    height: 25px;
+                                    width: 160px;
+                                }
+                                margin-bottom: 0;
+                                .el-input-number{
+                                    height: 25px;
+                                    .el-input-number__decrease, .el-input-number__increase{
+                                        right: -39px;
+                                    }
+                                }
+                            }
+                        }
+                    }
+                    .el-select, .el-input{
+                        width: 100%;
+                    }
+                    .btnASeach{
+                        display: flex;
+                        z-index: 11111;
+                        justify-content: end;
+                        position: relative;
+                        top: 32px;
+                        left: 50vw;
+                        width: 50%;
+                        .detaTableBtns{
+                            display: flex;
+                            width: 300px;
+                            margin-top: 5px;
+                            .tableBtn {
+                                display: flex;
+                                height: 20px;
+                                margin: 0 10px;
+                                img{
+                                    margin-right: 5px;
+                                    margin-top: 1px;
+                                }
+                                span{
+                                    font-size: 14px;
+                                    font-family: Microsoft YaHei;
+                                    font-weight: 400;
+                                }
+                            }
+                            .add{
+                                cursor: pointer;
+                                span{
+                                    color: #3B7AD1;
+                                }
+                            }
+                            .save{
+                                cursor: pointer;
+                                span{
+                                    color: #50C14E;
+                                }
+                            }
+                            .edit{
+                                span{
+                                    color: #F5A623;
+                                }
+                            }
+                            .delete{
+                                cursor: no-drop;
+                                span{
+                                    color: #F65177;
+                                }
+                            }
+                            .import{
+                                cursor: pointer;
+                                span{
+                                    color: #ce1e78;
+                                }
+                            }
+                            .export{
+                                cursor: pointer;
+                                span{
+                                    color: #2baa8a;
+                                }
+                            }
+                        }
+                    }
+                    .el-tabs{
+                        .el-tabs__header{
+                            .el-tabs__nav{
+                                .el-tabs__item{
+                                    font-size: 18px;
+                                    font-family: Microsoft YaHei;
+                                    font-weight: bold;
+                                    margin: 0 10px;                                    
+                                    color: #8991B0;
+                                }
+                                .is-active{
+                                    font-size: 18px;
+                                    font-family: Microsoft YaHei;
+                                    font-weight: bold;
+                                    color: #3B7AD1;
+                                    margin: 0 10px;
+                                }
+                            }
+                        }
+                        
+                        .el-table{
+                            margin-bottom: 10px;
+                            .el-table__body-wrapper{
+                                height: 38vh;
+                            }
+                            .el-table__row{
+                                .cell{
+                                    .el-input{
+                                        height: 24px;
+                                        .el-input__inner{
+                                            height: 24px;
+                                        }
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+            .el-dialog__footer{
+                .dialog-footer{
+                    display: flex;
+                    justify-content: center;
+                    .el-button{
+                        width: 180px !important;
+                        height: 40px !important;
+                    }
+                }
+            }
+        }
+    }
+    
+}
+</style>

+ 591 - 0
src/components/taskCenter/taskCenterDeptStartFrom.vue

@@ -0,0 +1,591 @@
+<template>
+    <div class="deptstartFrom">
+        <el-dialog title="考评启动详情" v-model="dialogVisible" :fullscreen="true" :close-on-click-modal="false">
+            <div class="startDetail">
+                <p class="starttitleSty">单据信息:</p>
+                <el-row class="danjuMsg">
+                    <el-col :span="6">
+                        <div class="danjuMsg_data">
+                            <span class="data_tit">业务编号:</span>
+                            <span>{{receiptMsg.code}}</span>
+                        </div>
+                        <div class="danjuMsg_data">
+                            <span class="data_tit">创建日期:</span>
+                            <span>{{receiptMsg.createDate}}</span>
+                        </div>
+                    </el-col>
+                    <el-col :span="6">
+                        <div class="danjuMsg_data">
+                            <span class="data_tit">业务简述:</span>
+                            <span>{{receiptMsg.des}}</span>
+                        </div>
+                        <div class="danjuMsg_data">
+                            <span class="data_tit">考评周期:</span>
+                            <span>{{receiptMsg.type}}</span>
+                        </div>
+                    </el-col>
+                    <el-col :span="6">
+                        <div class="danjuMsg_data">
+                            <span class="data_tit">流程状态:</span>
+                            <span>{{receiptMsg.stage}}</span>
+                        </div>
+                        <div class="danjuMsg_data">
+                            <span class="data_tit">年度:</span>
+                            <span>{{receiptMsg.year}}</span>
+                        </div>
+                    </el-col>
+                    <el-col :span="6">
+                        <div class="danjuMsg_data">
+                            <span class="data_tit">创建人:</span>
+                            <span>{{receiptMsg.createName}}</span>
+                        </div>
+                        <div class="danjuMsg_data">
+                            <span class="data_tit">单据状态:</span>
+                            <span>{{receiptMsg.recStage}}</span>
+                        </div>
+                    </el-col>
+                </el-row>
+                <div class="btnASeach">
+                    <div class="detaTableBtns">
+                        <div class="tableBtn add" @click="addTableDetail">
+                            <img :src="addIcon" alt="">
+                            <span>新增</span>
+                        </div>
+                        <div class="tableBtn save" @click="saveDetail">
+                            <img :src="saveIcon" alt="">
+                            <span>保存</span>
+                        </div>
+                        <div class="tableBtn import" @click="handleImport">
+                            <img :src="importIcon" alt="">
+                            <span>导入</span>
+                        </div>
+                        <div class="tableBtn export" @click="handleExport">
+                            <img :src="exportIcon" alt="">
+                            <span>导出</span>
+                        </div>
+                    </div>
+                </div>
+                <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
+                    <el-tab-pane label="考评指标项内容" name="first">
+                        <el-table :data="quantifiedList.slice((pageLeft.currentPage-1)*pageLeft.pagesize, pageLeft.currentPage*pageLeft.pagesize)"
+                         style="width: 100%" @select="rowClick" @select-all="rowClick">
+                            <el-table-column label="序号" type="index" width="80" />
+                            <el-table-column label="部门名称" prop="deptName" width="300">
+                                <template #default="scope">
+                                    <el-select v-model="scope.row.deptName" placeholder="请选择所属部门" v-if="scope.row.showInput">
+                                        <el-option
+                                        v-for="item in departData"
+                                        :key="item.id"
+                                        :label="item.keyName"
+                                        :value="item.id">
+                                        </el-option>
+                                    </el-select>
+                                    <span v-else>{{scope.row.deptName}}</span>
+                                </template>
+                            </el-table-column>
+                            <el-table-column label="排序" width="100" >
+                                <template #default="scope">
+                                    <el-input v-model="scope.row.serialNumber"
+                                     placeholder="请输入排序"></el-input>
+                                </template>
+                            </el-table-column>
+                            <el-table-column label="指标名称" >
+                                <template #default="scope">
+                                    <el-input v-model="scope.row.targetName"
+                                     placeholder="请输入指标名称"></el-input>
+                                </template>
+                            </el-table-column>
+                            <el-table-column label="目标值" width="500">
+                                <template #default="scope">
+                                    <el-input v-model="scope.row.targetValue"
+                                     type="textarea" :rows="2" placeholder="请输入目标值"></el-input>
+                                </template>
+                            </el-table-column>
+                            <el-table-column label="基础分" width="150">
+                                <template #default="scope">
+                                    <el-input-number v-model="scope.row.baseScore" :precision="2" :step="0.1" :min="0" />
+                                </template>
+                            </el-table-column>
+                            <el-table-column label="评价标准" >
+                                <template #default="scope">
+                                    <el-input v-model="scope.row.evaluationCriteria"
+                                     placeholder="请输入评价标准"></el-input>
+                                </template>
+                            </el-table-column>
+                            <el-table-column label="审核状态" width="200" >
+                                <template #default="scope">
+                                    <el-select v-model="scope.row.auditStatus" placeholder="请选择审核状态">
+                                        <el-option
+                                        v-for="item in statusData"
+                                        :key="item.id"
+                                        :label="item.name"
+                                        :value="item.id">
+                                        </el-option>
+                                    </el-select>
+                                </template>
+                            </el-table-column>
+                        </el-table>
+                        <el-pagination
+                            @current-change="handleCurrentChangeLeft"
+                            :current-page="pageLeft.currentPage"
+                            :page-size="pageLeft.pagesize"
+                            layout="total, prev, pager, next, jumper"
+                            :total="pageLeft.total">
+                        </el-pagination>
+                    </el-tab-pane>
+                </el-tabs>
+                <div>
+                    <p class="starttitleSty">审批意见:</p>
+                    <el-input v-model="descMsg" :rows="3" type="textarea" placeholder="请输入审批意见"></el-input>
+                </div>
+            </div>
+            <template #footer>
+                <span class="dialog-footer">
+                    <el-button type="primary" @click="examineAndApprove('agree')">同 意</el-button>
+                    <el-button @click="examineAndApprove('reject')">拒 绝</el-button>
+                </span>
+            </template>
+        </el-dialog>
+        <import-dailog ref="importPage" @successImport="successImport" @importLoading="importLoading"></import-dailog>
+    </div>
+</template>
+
+<script>
+import importDailog from '../importPage/importDailog.vue'
+import {apiGetevaluationdeptplanDetail,apiGetevaluationdeptplanUpdate, apiPostIsdoAction, apiGetevaluationdeptplanDetailHeader} from '../../api/api'
+import ExcelJS from 'exceljs'
+import fileSave from 'file-saver'
+import addIcon from '../../assets/btnIcon/add.png'
+import saveIcon from '../../assets/btnIcon/save.png'
+import editIcon from '../../assets/btnIcon/edit.png'
+import deleteIcon from '../../assets/btnIcon/delete.png'
+import exportIcon from '../../assets/btnIcon/export.png'
+import importIcon from '../../assets/btnIcon/import.png'
+export default {
+    components: {
+        importDailog
+    },
+    data() {
+        return {
+            dialogVisible: false,
+            activeName: 'first',
+            quantifiedList: [],
+            changeDateSelect: [],
+            receiptMsg: {
+                code: '',
+                des: '',
+                stage: '',
+                createName: '',
+                createDate: '',
+                type: '',
+                year: '',
+                recStage: ''
+            },
+            addIcon: addIcon,
+            saveIcon: saveIcon,
+            editIcon: editIcon,
+            deleteIcon: deleteIcon,
+            exportIcon: exportIcon,
+            importIcon: importIcon,
+            rowMsg: {},
+            orgruleData: [],
+            indicItemoptions: [],
+            sectionNameArr: [],
+            deptNameArr: [],
+            statusData: [],
+            pageLeft:{
+                pagesize: 15,
+                currentPage: 1,
+                total: 0
+            },
+            pageRight:{
+                pagesize: 15,
+                currentPage: 1,
+                total: 0
+            },
+            departData: [],
+            instanceChild: {}
+        }
+    },
+    created() {
+        this.statusData = [
+            {
+                name: '已完成',
+                id: '1'
+            },
+            {
+                name: '待审核',
+                id: '0'
+            },
+            {
+                name: '未开始',
+                id: '-1'
+            }
+        ]
+    },
+    methods: {
+        init(row, id, datas) {
+            this.dialogVisible = true
+            this.instanceChild = datas
+            this.activeName = 'first'
+            this.getDetails(id)
+            this.getshowDepartDataFn(row, deptData)
+            this.rowMsg = row
+
+        },
+        // 整合部门数据
+        getshowDepartDataFn(row, deptData) {
+            let deptIdArr = row.deptId.split(',')
+            deptIdArr.forEach(it =>{
+                deptData.forEach(itv =>{
+                    if (itv.id === it) {
+                        this.departData.push(itv)
+                    }
+                })
+            })
+        },
+        handleClick() {
+            this.changeDateSelect = []
+        },
+        rowClick(selection, row) {
+            this.changeDateSelect = selection
+        },
+        handleCurrentChangeLeft(val) {
+            this.pageLeft.currentPage = val
+        },
+        handleCurrentChangeRight(val) {
+            this.pageRight.currentPage = val
+        },
+        //获取详情
+        getDetails(id) {
+            let that = this
+            that.quantifiedList = []
+            apiGetevaluationdeptplanDetailHeader(id).then(datas =>{
+                if (datas && datas.data) {
+                    this.receiptMsg = {
+                        code: row.responsibilityCode,
+                        des: row.des,
+                        stage: row.stage,
+                        createName: row.createName,
+                        createDate: row.createTime,
+                        type: row.checkCycle === 'YDKP'?'月度考评':row.checkCycle === 'JDKP'?'季度考评':'年度考评',
+                        year: row.appraisalYear,
+                        recStage: '有效'
+                    }
+                }
+            })
+            apiGetevaluationdeptplanDetail(id).then(datas =>{
+                if (datas && datas.data) {
+                    that.quantifiedList = datas.data
+                    that.pageLeft.total = datas.data.length
+                }
+            })
+        },
+        addTableDetail() {
+            let obj = {
+                showInput: true,
+                businessPlanId: this.rowMsg.id,
+                serialNumber: '1',
+                deptName: '',
+                targetName: '',
+                targetValue: '',
+                baseScore: 0,
+                evaluationCriteria: '',
+                auditStatus: '-1'
+            }
+            this.quantifiedList.unshift(obj)
+        },
+        saveDetail() {
+            let that = this
+            let params = []
+            that.quantifiedList.forEach(item =>{
+                let obj = {
+                    targetName: item.targetName,
+                    targetValue: item.targetValue,
+                    baseScore: item.baseScore.toString(),
+                    evaluationCriteria: item.evaluationCriteria,
+                    auditStatus: item.auditStatus,
+                    serialNumber: item.serialNumber
+                }
+                if (item.showInput) {
+                    obj.deptId = item.deptName
+                    obj.businessPlanId = item.businessPlanId
+                } else {
+                    obj.id = item.id
+                }
+                params.push(obj)
+            })
+            apiGetevaluationdeptplanUpdate(params).then(datas =>{
+                if (datas) {
+                    if (datas.success) {
+                        that.$message({
+                            message: '保存成功',
+                            type: 'success'
+                        });
+                        that.getDetails(that.rowMsg.id)
+                    } else {
+                        that.$message({
+                            message: datas.data,
+                            type: 'error'
+                        })
+                    }
+                }
+            })
+        },
+        examineAndApprove(type) {
+            let that = this
+            let actionCS = ''
+            if (type === 'agree') {
+                if (that.rowMsg.taskType === 'SIGN') {
+                    actionCS = 'signAgree'
+                } else if (that.rowMsg.taskType === 'NORMAL') {
+                    actionCS = 'agree'
+                }
+            } else {
+                if (that.rowMsg.taskType === 'SIGN') {
+                    actionCS = 'signReject'
+                } else if (that.rowMsg.taskType === 'NORMAL') {
+                    actionCS = 'reject'
+                }
+            }
+            let params = {
+                taskId: that.rowMsg.id, //任务ID
+                nodeId: that.rowMsg.nodeId, //节点ID
+                action: actionCS, //固定值
+                instanceId: that.rowMsg.instId, //流程实例ID
+                opinion: that.descMsg, //审批意见
+                iamCode: window.localStorage.getItem('code'), //认证后code值
+                taskName: that.rowMsg.name,
+                defKey: that.instanceChild.defKey,
+                bizKey: that.instanceChild.bizKey
+            }
+            apiPostIsdoAction(params).then(datas =>{
+                if (datas && datas.data) {
+                    if (datas.data.isOk) {
+                        that.$message({
+                            message: datas.data.data,
+                            type: 'success'
+                        })
+                        that.dialogVisible = false
+                        that.$emit('approveMsg', datas.data.isOk)
+                    } else {
+                        that.$message({
+                            message: datas.data.msg,
+                            type: 'error'
+                        })
+                    }
+                }
+            })
+        },
+        handleImport() {
+            this.$refs.importPage.upload.title = "本部部门业绩指标计划信息导入"
+            this.$refs.importPage.upload.open = true
+            this.$refs.importPage.upload.url = '/evaluation-dept-plan/import'
+        },
+        successImport(val) {
+            this.getDetails(this.rowMsg.id)
+        },
+        handleExport() {
+            let data = this.quantifiedList  //接口返回数据
+            const workbook = new ExcelJS.Workbook()
+            const worksheet = workbook.addWorksheet('Sheet1')
+            //根据数据自己调整
+            let colums = []
+            colums = [
+                { header: 'ID', key: 'id', width: 26 },
+                { header: '业务ID', key: 'businessPlanId', width: 26 },
+                { header: '部门ID', key: 'deptId', width: 26 },
+                { header: '部门名称', key: 'deptName', width: 26 },
+                { header: '部门编码', key: 'deptCode', width: 26 },
+                { header: '排序', key: 'serialNumber', width: 26 },
+                { header: '指标名称', key: 'targetName', width: 18 },
+                { header: '目标值', key: 'targetValue', width: 18 },
+                { header: '基础分', key: 'baseScore', width: 18 },
+                { header: '评价标准', key: 'evaluationCriteria', width: 18 }
+            ]
+            worksheet.columns = colums
+            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>
+
+<style lang="less">
+.deptstartFrom{
+    .el-overlay{
+        .el-dialog{
+            // margin-top: 7vh;
+            .el-dialog__body{
+                padding: 0 20px !important;
+                .startDetail{
+                    .starttitleSty{
+                        font-size: 18px;
+                        font-family: Microsoft YaHei;
+                        font-weight: bold;
+                        color: #3B7AD1;
+                        // line-height: 12px;
+                        margin: 20px 0 20px 10px;
+                    }
+                    .danjuMsg{
+                        border: 1px solid #D6DBEA;
+                        padding: 10px 20px;
+                        border-radius: 10px;
+                        margin-bottom: 20px;
+                        .danjuMsg_data{
+                            padding: 5px 0 10px 0;
+                            .data_tit{
+                                margin-right: 10px;
+                                font-weight: bold;
+                                font-size: 14px;
+                                font-family: Microsoft YaHei;
+                                color: #8991B0;
+                            }
+                            .data_tit_wd{
+                                display: inline-block;
+                                width: 90px;
+                            }
+                            .el-form-item--small{
+                                .el-input{
+                                    height: 25px;
+                                    width: 160px;
+                                }
+                                margin-bottom: 0;
+                                .el-input-number{
+                                    height: 25px;
+                                    .el-input-number__decrease, .el-input-number__increase{
+                                        right: -39px;
+                                    }
+                                }
+                            }
+                        }
+                    }
+                    .el-select, .el-input{
+                        width: 100%;
+                    }
+                    .btnASeach{
+                        display: flex;
+                        z-index: 11111;
+                        justify-content: end;
+                        position: relative;
+                        top: 32px;
+                        left: 50vw;
+                        width: 50%;
+                        .detaTableBtns{
+                            display: flex;
+                            width: 300px;
+                            margin-top: 5px;
+                            .tableBtn {
+                                display: flex;
+                                height: 20px;
+                                margin: 0 10px;
+                                img{
+                                    margin-right: 5px;
+                                    margin-top: 1px;
+                                }
+                                span{
+                                    font-size: 14px;
+                                    font-family: Microsoft YaHei;
+                                    font-weight: 400;
+                                }
+                            }
+                            .add{
+                                cursor: pointer;
+                                span{
+                                    color: #3B7AD1;
+                                }
+                            }
+                            .save{
+                                cursor: pointer;
+                                span{
+                                    color: #50C14E;
+                                }
+                            }
+                            .edit{
+                                span{
+                                    color: #F5A623;
+                                }
+                            }
+                            .delete{
+                                cursor: no-drop;
+                                span{
+                                    color: #F65177;
+                                }
+                            }
+                            .import{
+                                cursor: pointer;
+                                span{
+                                    color: #ce1e78;
+                                }
+                            }
+                            .export{
+                                cursor: pointer;
+                                span{
+                                    color: #2baa8a;
+                                }
+                            }
+                        }
+                    }
+                    .el-tabs{
+                        .el-tabs__header{
+                            .el-tabs__nav{
+                                .el-tabs__item{
+                                    font-size: 18px;
+                                    font-family: Microsoft YaHei;
+                                    font-weight: bold;
+                                    margin: 0 10px;                                    
+                                    color: #8991B0;
+                                }
+                                .is-active{
+                                    font-size: 18px;
+                                    font-family: Microsoft YaHei;
+                                    font-weight: bold;
+                                    color: #3B7AD1;
+                                    margin: 0 10px;
+                                }
+                            }
+                        }
+                        
+                        .el-table{
+                            margin-bottom: 10px;
+                            .el-table__body-wrapper{
+                                height: 38vh;
+                            }
+                            .el-table__row{
+                                .cell{
+                                    .el-input{
+                                        height: 24px;
+                                        .el-input__inner{
+                                            height: 24px;
+                                        }
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+            .el-dialog__footer{
+                .dialog-footer{
+                    display: flex;
+                    justify-content: center;
+                    .el-button{
+                        width: 180px !important;
+                        height: 40px !important;
+                    }
+                }
+            }
+        }
+    }
+    
+}
+</style>

+ 27 - 4
src/components/taskCenter/taskCenterPage.vue

@@ -57,16 +57,21 @@
             </el-dialog>
         </div>        
         <task-center-evl ref="taskCenterEvl" @approveMsg="approveMsg"></task-center-evl>
+        <task-center-dept-evl ref="taskCenterdeptEvl" @approveMsg="approveMsg"></task-center-dept-evl>
+        <task-center-dept-business-evl ref="taskCenterdeptbusinessEvl" @approveMsg="approveMsg"></task-center-dept-business-evl>
     </div>
 </template>
 
 <script>
-import {apiPostTodoTaskList} from '../../api/api'
+import {apiPostTodoTaskList, apiPostgetInstanceAndChildren} from '../../api/api'
 import taskCenterEvl from './taskCenterEvlFrom.vue'
-import { getToken } from '../../api/auth'
+import taskCenterDeptEvl from './taskCenterDeptStartFrom.vue'
+import taskCenterDeptBusinessEvl from './taskCenterDeptBusinessFrom.vue'
 export default {
     components: {
-        taskCenterEvl
+        taskCenterEvl,
+        taskCenterDeptEvl,
+        taskCenterDeptBusinessEvl
     },
     data() {
         return {
@@ -106,7 +111,25 @@ export default {
             this.iframeURL = 'http://10.65.78.23:8080/agilebpm-ui/bpm/instance/instanceImageDialog.html?instanceId='+row.instId+'&defId='+row.defId+'&taskId='+row.taskId+'&iamCode='+window.localStorage.getItem('code')
         },
         taskProcess(row) {
-            this.$refs.taskCenterEvl.init(row)
+            let that = this
+            let params = {
+                id: row.instId,
+                iamCode: window.localStorage.getItem('code')
+            }
+            apiPostgetInstanceAndChildren(params).then(datas =>{
+                if (datas && datas.data) {
+                    let allData = datas.data.data.bpmInstance
+                    let keyId = datas.data.data.bpmInstance.bizKey
+                    let taskDefKey = datas.data.data.bpmInstance.defKey
+                    if (taskDefKey === 'bbbmyjzbjh') {
+                        that.$refs.taskCenterdeptEvl.init(row, keyId, allData)
+                    } else if(taskDefKey === 'bbbmyjzbkh'){
+                        that.$refs.taskCenterdeptbusinessEvl.init(row, keyId, allData)
+                    } else {
+                        that.$refs.taskCenterEvl.init(row)
+                    }
+                }
+            })
         },
         rowClick(selection, row) {
             this.changeDateSelect = selection