Browse Source

流程服务联调;新增任务中心详情,审批服务联调;菜单服务联调;

SunZehao 2 years ago
parent
commit
002baa68bf

+ 37 - 0
src/api/api.js

@@ -20,6 +20,21 @@ export function apiGetModel(url, params) {
     })
 }
 
+//获取菜单数据
+export function apiGetMenuData() {
+    return httpRequest({
+        url: 'menu/menuList?parentId=10105',
+        method: 'post'
+    })
+}
+//获取权限数据
+export function apiGetPrivilegesOfCurrentUserAll() {
+    return httpRequest({
+        url: 'menu/getPrivilegesOfCurrentUserAll',
+        method: 'post'
+    })
+}
+
 //----------------------------------------登录页接口------------------------------------------------
 // 登录接口
 export function loginApi(username,password) {
@@ -157,9 +172,31 @@ export function apiPostOrgevaluationDelete(params) {
 }
 
 //----------------------------------------任务中心------------------------------------------------
+//---------列表
 export function apiPostTodoTaskList(params) {
     return httpRequest.post('workflow/todoTaskList', params)
 }
+//----------同意/拒绝审批
+export function apiPostIsdoAction(params) {
+    return httpRequest.post('workflow/isOkAction', params)
+}
+//----------根据流程ID获取业务ID
+export function apiPostgetInstanceAndChildren(params) {
+    return httpRequest({
+        url: 'workflow/getInstanceAndChildren',
+        method: 'post',
+        params: params
+    })
+}
+//----------任务处理-详情
+export function apiGettaskDetail(params) {
+    return httpRequest({
+        url: 'dept-responsibility/getByidAndInfo',
+        method: 'get',
+        params: params
+    })
+}
+
 
 
 //----------------------------------------考评体系配置------------------------------------------------

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

@@ -286,7 +286,7 @@ export default {
         agetdeptresponsibility(row) {
             let that = this
             let par = {
-                defKey: "kpmbqd",
+                defKey: "dwkpmbqd",
                 businessKey: row.id,
                 action: "start",
                 opinion: "考评目标启动",
@@ -294,7 +294,7 @@ export default {
             }
             apiGetdoAction(par).then(datas =>{
                 if (datas && datas.data) {
-                    if (datas.data.isok) {
+                    if (datas.data.isOk) {
                         let params = {
                             responsibilityIds: row.id
                         }

+ 29 - 11
src/components/assessment/evaluationYearPage.vue

@@ -267,22 +267,40 @@ export default {
         },
         agetdeptresponsibility(row) {
             let that = this
-            let params = {
-                evaluationIds: row.id
+            let par = {
+                defKey: "dwkpmbxd",
+                businessKey: row.id,
+                action: "start",
+                opinion: "年度单位考评",
+                iamCode: getToken('code')
             }
-            apiGetgenerateUnitYearEvaluation(params).then(datas =>{
+            apiGetdoAction(par).then(datas =>{
                 if (datas && datas.data) {
-                    if (!datas.success) {
-                        that.$message({
-                            message: datas.message,
-                            type: 'error'
-                        });
+                    if (datas.data.isOk) {
+                        let params = {
+                            evaluationIds: row.id
+                        }
+                        apiGetgenerateUnitYearEvaluation(params).then(datas =>{
+                            if (datas && datas.data) {
+                                if (!datas.success) {
+                                    that.$message({
+                                        message: datas.message,
+                                        type: 'error'
+                                    });
+                                } else {
+                                    that.$message({
+                                        message: '年度考评目标已启动',
+                                        type: 'success'
+                                    });
+                                    that.getevaluStartList()
+                                }
+                            }
+                        })
                     } else {
                         that.$message({
-                            message: '考评规则已启动',
-                            type: 'success'
+                            message: datas.data.msg,
+                            type: 'error'
                         });
-                        
                     }
                 }
             })

+ 31 - 12
src/components/assessment/monthQuarterPage.vue

@@ -126,7 +126,8 @@
 <script>
 import startFromList from './monthQuarterFrom.vue'
 import btns from '../elbuttonS.vue'
-import {apiGetOrgEvaluationList, apiPostOrgEvaSave,apiPostOrgevaluationDelete,
+import { getToken } from '../../api/auth'
+import {apiGetOrgEvaluationList, apiPostOrgEvaSave,apiPostOrgevaluationDelete,apiGetdoAction,
 apiGetgenerateUnitMonthEvaluation, apiGetdatadictionaryList} from '../../api/api'
 export default {
     components: {
@@ -272,22 +273,40 @@ export default {
         },
         agetdeptresponsibility(row) {
             let that = this
-            let params = {
-                evaluationIds: row.id
+            let par = {
+                defKey: "yddwkplc",
+                businessKey: row.id,
+                action: "start",
+                opinion: "月度单位考评",
+                iamCode: getToken('code')
             }
-            apiGetgenerateUnitMonthEvaluation(params).then(datas =>{
+            apiGetdoAction(par).then(datas =>{
                 if (datas && datas.data) {
-                    if (!datas.success) {
-                        that.$message({
-                            message: datas.message,
-                            type: 'error'
-                        });
+                    if (datas.data.isOk) {
+                        let params = {
+                            evaluationIds: row.id
+                        }
+                        apiGetgenerateUnitMonthEvaluation(params).then(datas =>{
+                            if (datas && datas.data) {
+                                if (!datas.success) {
+                                    that.$message({
+                                        message: datas.message,
+                                        type: 'error'
+                                    });
+                                } else {
+                                    that.$message({
+                                        message: '月度单位考评已启动',
+                                        type: 'success'
+                                    });
+                                    that.getevaluStartList()
+                                }
+                            }
+                        })
                     } else {
                         that.$message({
-                            message: '考评规则已启动',
-                            type: 'success'
+                            message: datas.data.msg,
+                            type: 'error'
                         });
-                        
                     }
                 }
             })

+ 2 - 2
src/components/gatewayPage.vue

@@ -126,7 +126,6 @@
                 <div class="gateway_bot_right">
                     <div class="bot_rightTit">
                         <p>通告栏</p>
-
                     </div>
                     <div class="bot_rightMain">
                         <div class="bot_rightMain_msg" v-for="it in 10" :key="it">
@@ -458,7 +457,7 @@ export default {
             margin-right: 30px;
             border-radius: 10px;
             padding-left: 25px;
-            padding-bottom: 15px;
+            padding-bottom: 10px;
             border: 1px solid #E1E3EA;
             .bot_leftTit{
                 padding: 21px 0 30px 0;
@@ -476,6 +475,7 @@ export default {
                 }
             }
             .bot_leftMain{
+                height: 62vh !important;
                 .mainImg{
                     position: relative;
                     top: -3px;

+ 65 - 22
src/components/taskCenter/taskCenterEvlFrom.vue

@@ -99,12 +99,15 @@
                         </el-table>
                     </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="dialogVisible = false">同 意</el-button>
-                    <el-button @click="dialogVisible = false">拒 绝</el-button>
+                    <el-button type="primary" @click="examineAndApprove('agree')">同 意</el-button>
+                    <el-button @click="examineAndApprove('reject')">拒 绝</el-button>
                 </span>
             </template>
         </el-dialog>
@@ -112,11 +115,12 @@
 </template>
 
 <script>
-import {apiGetdeptresponDetail,apiGetindicatorsaveBatchDto} from '../../api/api'
+import {apiGettaskDetail,apiGetindicatorsaveBatchDto, apiPostIsdoAction, apiPostgetInstanceAndChildren} from '../../api/api'
 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 { getToken } from '../../api/auth'
 export default {
     data() {
         return {
@@ -139,7 +143,8 @@ export default {
             saveIcon: saveIcon,
             editIcon: editIcon,
             deleteIcon: deleteIcon,
-            rowMsg: {}
+            rowMsg: {},
+            descMsg: ''
         }
     },
     created() {
@@ -148,17 +153,7 @@ export default {
         init(row) {
             this.dialogVisible = true
             this.activeName = 'first'
-            this.receiptMsg = {
-                code: row.responsibilityCode,
-                des: row.des,
-                stage: row.stage,
-                creator: row.createBy,
-                createDate: row.createTime,
-                type: row.organizationType,
-                year: row.year,
-                recStage: '有效'
-            }
-            this.getDetails(row.id)
+            this.getTaskId(row)
             this.rowMsg = row
         },
         handleClick() {
@@ -167,16 +162,41 @@ export default {
         rowClick(selection, row) {
             this.changeDateSelect = selection
         },
+        // 根据流程ID获取业务ID
+        getTaskId(row) {
+            let that = this
+            let params = {
+                id: row.instId,
+                iamCode: getToken('code')
+            }
+            apiPostgetInstanceAndChildren(params).then(datas =>{
+                if (datas && datas.data) {
+                    let keyId = datas.data.data.bpmInstance.bizKey
+                    that.getDetails(keyId)
+                }
+            })
+        },
         //获取详情
         getDetails(id) {
             let that = this
             let params = {
-                deptResponsibilityIds: id
+                id: id
             }
-            apiGetdeptresponDetail(params).then(datas =>{
+            apiGettaskDetail(params).then(datas =>{
                 if (datas && datas.data) {
-                    that.quantifiedList = datas.data.quantifiedList
-                    that.nonQuantifiedList = datas.data.nonQuantifiedList
+                    let item = datas.data
+                    that.receiptMsg = {
+                        code: item.responsibilityCode,
+                        des: item.des,
+                        stage: item.stage,
+                        creator: item.createBy,
+                        createDate: item.createTime,
+                        type: item.organizationType,
+                        year: item.year,
+                        recStage: '有效'
+                    }
+                    that.quantifiedList = item.map.quantifiedList
+                    that.nonQuantifiedList = item.map.nonQuantifiedList
                 }
             })
         },
@@ -211,7 +231,30 @@ export default {
                     that.getDetails(that.rowMsg.id)
                 }
             })
-        }
+        },
+        examineAndApprove(type) {
+            let that = this
+            let params = {
+                taskId: that.rowMsg.taskId, //任务ID
+                nodeId: that.rowMsg.nodeId, //节点ID
+                action: type, //固定值
+                instanceId: that.rowMsg.instId, //流程实例ID
+                opinion: that.descMsg, //审批意见
+                iamCode: getToken('code') //认证后code值
+            }
+            apiPostIsdoAction(params).then(datas =>{
+                if (datas && datas.data) {
+                    that.$message({
+                        message: datas.data.data,
+                        type: 'success'
+                    })
+                    if (datas.data.isOk) {
+                        that.dialogVisible = false
+                        that.$emit('approveMsg', datas.data.isOk)
+                    }
+                }
+            })
+        },
     }
 }
 </script>
@@ -334,7 +377,7 @@ export default {
                         
                         .el-table{
                             .el-table__body-wrapper{
-                                height: 40vh;
+                                height: 30vh;
                             }
                             .el-table__row{
                                 .cell{

+ 12 - 6
src/components/taskCenter/taskCenterPage.vue

@@ -50,13 +50,13 @@
                 :total="page.total">
             </el-pagination>
         </div>        
-        <el-dialog title="流程详情" v-model="workflowVisible" width="60vw" :close-on-click-modal="false">
+        <el-dialog title="流程详情" v-model="workflowVisible" width="70vw" :close-on-click-modal="false">
             <div class="flowSty">
-                <iframe id="iframeContain" width="100%" height="100%" frameborder="0" class="iframe" name="iframeContain" seamless scrolling="yes" :src="iframeURL">            
+                <iframe id="iframeContain" width="100%" height="100%" frameborder="0" class="iframe" name="iframeContain" seamless scrolling="no" :src="iframeURL">            
                 </iframe>
             </div>
         </el-dialog>
-        <task-center-evl ref="taskCenterEvl"></task-center-evl>
+        <task-center-evl ref="taskCenterEvl" @approveMsg="approveMsg"></task-center-evl>
     </div>
 </template>
 
@@ -113,11 +113,16 @@ export default {
         },
         handleSizeChange(val){
             this.page.pagesize = val
-            this.getEvaluationData()
+            this.getEvaluationData('seach')
         },
         handleCurrentChange(val){
             this.page.currentPage =val
-            this.getEvaluationData()
+            this.getEvaluationData('seach')
+        },
+        approveMsg(val) {
+            if (val) {
+                this.getEvaluationData()
+            }
         }
     }
 }
@@ -156,10 +161,11 @@ export default {
     }
     .el-overlay{
         .el-dialog{
+            margin-top: 8vh !important;
             .el-dialog__body{
                 .flowSty{
                     width: 100%;
-                    height: 500px;
+                    height: 70vh;
                 }
             }
         }

+ 11 - 2
src/views/Login.vue

@@ -31,11 +31,12 @@
 <script>
 import { setToken } from '@/api/auth'
 import { ElMessage } from "element-plus";
-import { loginApi, apiGetCodeByToken } from '../api/api'
+import { loginApi, apiGetCodeByToken, apiGetMenuData, apiGetPrivilegesOfCurrentUserAll } from '../api/api'
 export default {
     data() {
         return {
             inputUser:'testdbkp',
+            // inputUser:'testrsadmin',
             inputMima:'Gddl!#%135',
             codeUrl:'',
             ememberMe:false,
@@ -67,7 +68,6 @@ export default {
             }).catch(e =>{
                 that.loading = false
             })
-            // this.$router.push({ path: "/home"})
         },
         // 根据token获取code
         getTokenCode(val) {
@@ -75,6 +75,15 @@ export default {
             apiGetCodeByToken(val).then(datas =>{
                 if (datas && datas.data) {
                     setToken('code', datas.data)
+                    that.getApprverData()
+                }
+            })
+        },
+        getApprverData() {
+            let that = this
+            apiGetPrivilegesOfCurrentUserAll().then(datas =>{
+                if (datas && datas.data) {
+                    setToken('purview', JSON.stringify(datas.data.data))
                     that.$router.push({ path: "/home"})
                 }
             })

+ 53 - 141
src/views/homePage.vue

@@ -32,7 +32,7 @@
                             <span>{{ tag.name }}</span>
                         </el-tag>
                     </div>
-                    <div style="width: 5%;padding-top:20px">
+                    <div style="width: 5%;padding-top:20px;cursor:pointer">
                         <!-- <el-icon @click="closeSys" :size="20" color="#F65177"><SwitchButton /></el-icon> -->
                         <img :src="closeBtn" @click="closeSys" >
                     </div>
@@ -56,7 +56,7 @@ import quanxianImg from '../assets/menuImg/quanxian.png'
 import closeBtn from '../assets/getwayImg/closeBtn.png'
 
 import { getToken, removeToken } from '../api/auth'
-import {apiPostremoveByToken} from '../api/api'
+import {apiPostremoveByToken, apiGetMenuData} from '../api/api'
 export default {
     components: {MenuTree},
     data() {
@@ -73,144 +73,7 @@ export default {
         }
     },
     created(){
-        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: '工作流程配置',
-                    }
-                ]
-            }
-        ]
+        this.getMenuData()
         if (window.sessionStorage.getItem('routeTags')) {
             this.routeTags = JSON.parse(window.sessionStorage.getItem('routeTags'))
             if (this.$route?.path === '/') {
@@ -226,9 +89,9 @@ export default {
             this.$router.push({ path: this.routeTags[0].index})
             window.sessionStorage.setItem('routeTags', JSON.stringify(this.routeTags))
         }
-        
     },
     mounted() {
+        
     },
     computed:{
         mainHeight() {
@@ -253,6 +116,52 @@ export default {
         }
     },
     methods:{
+        // 获取菜单数据
+        getMenuData() {
+            let that = this
+            apiGetMenuData().then(datas =>{
+                if (datas && datas.data) {
+                    let arr = []
+                    for(let i =0; i<datas.data.length; i++) {
+                        let item = datas.data[i]
+                        let obj = {
+                            index: item.href,
+                            name: item.name
+                        }
+                        if (item.name === '考评首页') {
+                            obj.img = homeImg
+                        } else if(item.name === '任务中心') {
+                            obj.img = taskImg
+                        } else if(item.name === '考评业务') {
+                            obj.img = yewuImg
+                            obj.children = that.changeMenuData(item.children)
+                        } else if(item.name === '考评体系配置') {
+                            obj.img = tixiImg
+                            obj.children = that.changeMenuData(item.children)
+                        } else if(item.name === '考评知识库') {
+                            obj.img = zhishikuImg
+                            obj.children = that.changeMenuData(item.children)
+                        } else if(item.name === '基础信息配置') {
+                            obj.img = quanxianImg
+                            obj.children = that.changeMenuData(item.children)
+                        }
+                        arr.push(obj)
+                    }
+                    that.forecastDatas = arr
+                }
+            })
+        },
+        changeMenuData(data) {
+            let childArr = []
+            data.forEach(item =>{
+                let obj = {
+                    index: item.href,
+                    name: item.name
+                }
+                childArr.push(obj)
+            })
+            return childArr
+        },
         getBac(val) {
             let strWea = ''
             debugger
@@ -273,6 +182,9 @@ export default {
             apiPostremoveByToken(getToken()).then(datas =>{
                 if (datas.code === 200) {
                     removeToken('token')
+                    removeToken('code')
+                    removeToken('purview')
+                    window.sessionStorage.removeItem('routeTags')
                     this.$router.push({ path: "/login"})
                 }
             })