Просмотр исходного кода

流程联调;增加任务中心页面

SunZehao 2 лет назад
Родитель
Сommit
2c5c65db88

+ 28 - 2
src/api/api.js

@@ -21,7 +21,6 @@ export function apiGetModel(url, params) {
 }
 
 //----------------------------------------登录页接口------------------------------------------------
-
 // 登录接口
 export function loginApi(username,password) {
     // MD5 32 位
@@ -29,7 +28,21 @@ export function loginApi(username,password) {
       url: `user/bladeAuth?username=${username}&password=${md5(password)}`,
       method: 'post'
     })
-  }
+}
+// 根据token获取code
+export function apiGetCodeByToken(params) {
+    return httpRequest({
+        url: `user/getCodeByToken?token=${params}`,
+        method: 'get'
+    })
+}
+// 退出接口
+export function apiPostremoveByToken(params) {
+    return httpRequest({
+        url: `user/removeByToken?token=${params}`,
+        method: 'post'
+    })
+}
 
 //----------------------------------------考评业务------------------------------------------------
 //部门目标责任表
@@ -44,6 +57,13 @@ export function apiGetdeptresponsibilityList(params) {
 export function apiGetdeptresponsibilitySave(params) {
     return httpRequest.post('dept-responsibility/save', params)
 }
+
+//------考评启动(流程)
+export function apiGetdoAction(params) {
+    return httpRequest.post('workflow/doAction', params)
+}
+
+
 //------考评启动-生成
 export function apiGetdeptresponsibilitygenerate(params) {
     return httpRequest({
@@ -136,6 +156,12 @@ export function apiPostOrgevaluationDelete(params) {
     })
 }
 
+//----------------------------------------任务中心------------------------------------------------
+export function apiPostTodoTaskList(params) {
+    return httpRequest.post('workflow/todoTaskList', params)
+}
+
+
 //----------------------------------------考评体系配置------------------------------------------------
 //----考评指标管理
 //----"指标-查询"

+ 3 - 3
src/api/auth.js

@@ -2,14 +2,14 @@ import Cookies from 'js-cookie'
 
 const TokenKey = 'Admin-Token'
 
-export function getToken() {
+export function getToken(TokenKey) {
   return Cookies.get(TokenKey)
 }
 
-export function setToken(token) {
+export function setToken(TokenKey, token) {
   return Cookies.set(TokenKey, token)
 }
 
-export function removeToken() {
+export function removeToken(TokenKey) {
   return Cookies.remove(TokenKey)
 }

+ 3 - 4
src/api/permission.js

@@ -12,12 +12,11 @@ router.beforeEach((to, from, next) => {
     // if (to.query.markKey === "YXSSO") {
     //     return next()
     // } else {
-        // let token = getToken()
-        let userMsg = getToken('userMsg')
+        let token = getToken('token')
         if(to.path==='/login'){
             return next()
         }else{
-            if(!userMsg){
+            if(!token){
                 ElMessage.error('登录已失效,请重新登录');
                 store.commit('clearAxiosArr')
                 return next('/login')
@@ -30,5 +29,5 @@ router.beforeEach((to, from, next) => {
             }
         }
     // }
-    return next()
+    // return next()
 })

BIN
src/assets/getwayImg/closeBtn.png


BIN
src/assets/menuImg/task.png


+ 6 - 1
src/components/assessment/evaluationStartFrom.vue

@@ -351,7 +351,12 @@ export default {
             }
             .el-dialog__footer{
                 .dialog-footer{
-                    text-align: center;
+                    display: flex;
+                    justify-content: center;
+                    .el-button{
+                        width: 180px !important;
+                        height: 40px !important;
+                    }
                 }
             }
         }

+ 26 - 6
src/components/assessment/evaluationStartPage.vue

@@ -126,7 +126,8 @@
 <script>
 import startFromList from './evaluationStartFrom.vue'
 import btns from '../elbuttonS.vue'
-import {apiGetdeptresponsibilityList, apiGetdeptresponsibilitySave,
+import { getToken } from '../../api/auth'
+import {apiGetdeptresponsibilityList, apiGetdeptresponsibilitySave,apiGetdoAction,
 apiGetdeptresponsibilitygenerate, apiGetdatadictionaryList, apiPostresponsiDelete} from '../../api/api'
 export default {
     components: {
@@ -295,11 +296,29 @@ export default {
                             type: 'error'
                         });
                     } else {
-                        that.$message({
-                            message: '考评规则已启动',
-                            type: 'success'
-                        });
-                        
+                        let par = {
+                            defKey: "kpmbqd",
+                            businessKey: row.id,
+                            action: "start",
+                            opinion: "考评目标启动",
+                            iamCode: getToken('code')
+                        }
+                        apiGetdoAction(par).then(datas =>{
+                            if (datas && datas.data) {
+                                if (datas.data.isok) {
+                                    that.$message({
+                                        message: '考评规则已启动',
+                                        type: 'success'
+                                    });
+                                    that.getevaluStartList()
+                                } else {
+                                    that.$message({
+                                        message: datas.data.msg,
+                                        type: 'error'
+                                    });
+                                }
+                            }
+                        })
                     }
                 }
             })
@@ -463,5 +482,6 @@ export default {
             }
         }
     }
+    
 }
 </style>

+ 6 - 1
src/components/assessment/evaluationYearFrom.vue

@@ -351,7 +351,12 @@ export default {
             }
             .el-dialog__footer{
                 .dialog-footer{
-                    text-align: center;
+                    display: flex;
+                    justify-content: center;
+                    .el-button{
+                        width: 180px !important;
+                        height: 40px !important;
+                    }
                 }
             }
         }

+ 6 - 1
src/components/assessment/monthQuarterFrom.vue

@@ -351,7 +351,12 @@ export default {
             }
             .el-dialog__footer{
                 .dialog-footer{
-                    text-align: center;
+                    display: flex;
+                    justify-content: center;
+                    .el-button{
+                        width: 180px !important;
+                        height: 40px !important;
+                    }
                 }
             }
         }

+ 10 - 0
src/components/evaluationSystem/ruleDetailPage.vue

@@ -395,6 +395,16 @@ export default {
                     }
                 }
             }
+            .el-dialog__footer{
+                .dialog-footer{
+                    display: flex;
+                    justify-content: center;
+                    .el-button{
+                        width: 180px !important;
+                        height: 40px !important;
+                    }
+                }
+            }
         }
     }
 }

+ 10 - 0
src/components/knowledgePage/scoringRulesDetailPage.vue

@@ -547,6 +547,16 @@ export default {
                     }
                 }
             }
+            .el-dialog__footer{
+                .dialog-footer{
+                    display: flex;
+                    justify-content: center;
+                    .el-button{
+                        width: 180px !important;
+                        height: 40px !important;
+                    }
+                }
+            }
         }
     }
 }

+ 367 - 0
src/components/taskCenter/taskCenterEvlFrom.vue

@@ -0,0 +1,367 @@
+<template>
+    <div class="startFrom">
+        <el-dialog title="考评启动详情" v-model="dialogVisible" width="80vw" :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.creator}}</span>
+                        </div>
+                        <div class="danjuMsg_data">
+                            <span class="data_tit">单据状态:</span>
+                            <span>{{receiptMsg.recStage}}</span>
+                        </div>
+                    </el-col>
+                </el-row>
+                <div class="detaTableBtns">
+                    <div class="tableBtn add">
+                        <img :src="addIcon" alt="">
+                        <span>新增</span>
+                    </div>
+                    <div class="tableBtn save" @click="saveDetail">
+                        <img :src="saveIcon" alt="">
+                        <span>保存</span>
+                    </div>
+                    <!-- <div class="tableBtn edit">
+                        <img :src="editIcon" alt="">
+                        <span>新增</span>
+                    </div> -->
+                    <div class="tableBtn delete">
+                        <img :src="deleteIcon" alt="">
+                        <span>删除</span>
+                    </div>
+                </div>
+                <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
+                    <el-tab-pane label="考评指标项内容" name="first">
+                        <el-table :data="quantifiedList" style="width: 100%" @select="rowClick" @select-all="rowClick">
+                            <el-table-column type="selection" label="操作" align="center"></el-table-column>
+                            <el-table-column type="index" label="序号" width="80" />
+                            <el-table-column label="业务类别" prop="stageName" />
+                            <el-table-column label="所属板块" prop="sectionName" />
+                            <el-table-column label="单位名称" prop="organizationName" width="300" />
+                            <el-table-column label="填报部门"  prop="deptName" width="260" />
+                            <el-table-column label="指标分类" prop="typeName" />
+                            <!-- <el-table-column label="指标项" prop="optionName" /> -->
+                            <el-table-column label="计划值">
+                                <template #default="scope">
+                                    <el-input-number v-model="scope.row.quantifiedValue" :precision="2" :step="0.1" :min="1" />
+                                </template>
+                            </el-table-column>
+                            <el-table-column label="单位" prop="unit" />
+                        </el-table>
+                    </el-tab-pane>
+                    <el-tab-pane label="考评评测性指标内容" name="second">
+                        <el-table :data="nonQuantifiedList" style="width: 100%">
+                            <el-table-column type="index" label="序号" width="80" />
+                            <el-table-column label="业务类别" prop="stageName" />
+                            <el-table-column label="所属板块" prop="sectionName" />
+                            <el-table-column label="单位名称" prop="organizationName" width="300" />
+                            <el-table-column label="填报部门" prop="deptName" width="260" />                                
+                            <el-table-column label="指标分类" prop="typeName" />
+                            <!-- <el-table-column label="指标项" prop="optionName" /> -->
+                            <el-table-column label="计划值">
+                                <template #default="scope">
+                                    <el-input v-model="scope.row.nonQuantifiedValue" />
+                                </template>
+                            </el-table-column>
+                        </el-table>
+                    </el-tab-pane>
+                </el-tabs>
+                
+            </div>
+            <template #footer>
+                <span class="dialog-footer">
+                    <el-button type="primary" @click="dialogVisible = false">同 意</el-button>
+                    <el-button @click="dialogVisible = false">拒 绝</el-button>
+                </span>
+            </template>
+        </el-dialog>
+    </div>
+</template>
+
+<script>
+import {apiGetdeptresponDetail,apiGetindicatorsaveBatchDto} 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'
+export default {
+    data() {
+        return {
+            dialogVisible: false,
+            activeName: 'first',
+            quantifiedList: [],
+            nonQuantifiedList: [],
+            changeDateSelect: [],
+            receiptMsg: {
+                code: '',
+                des: '',
+                stage: '',
+                creator: '',
+                createDate: '',
+                type: '',
+                year: '',
+                recStage: ''
+            },
+            addIcon: addIcon,
+            saveIcon: saveIcon,
+            editIcon: editIcon,
+            deleteIcon: deleteIcon,
+            rowMsg: {}
+        }
+    },
+    created() {
+    },
+    methods: {
+        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.rowMsg = row
+        },
+        handleClick() {
+            this.changeDateSelect = []
+        },
+        rowClick(selection, row) {
+            this.changeDateSelect = selection
+        },
+        //获取详情
+        getDetails(id) {
+            let that = this
+            let params = {
+                deptResponsibilityIds: id
+            }
+            apiGetdeptresponDetail(params).then(datas =>{
+                if (datas && datas.data) {
+                    that.quantifiedList = datas.data.quantifiedList
+                    that.nonQuantifiedList = datas.data.nonQuantifiedList
+                }
+            })
+        },
+        saveDetail() {
+            let that = this
+            let params = []
+            if (that.activeName === 'first') {
+                that.quantifiedList.forEach(item =>{
+                    let obj = {
+                        id: item.id,
+                        isQuantified: '是',
+                        quantifiedValue: item.quantifiedValue
+                    }
+                    params.push(obj)
+                })
+            } else {
+                that.nonQuantifiedList.forEach(item =>{
+                    let obj = {
+                        id: item.id,
+                        isQuantified: '否',
+                        nonQuantifiedValue: item.nonQuantifiedValue
+                    }
+                    params.push(obj)
+                })
+            }
+            apiGetindicatorsaveBatchDto(params).then(datas =>{
+                if (datas && datas.success) {
+                    that.$message({
+                        message: '保存成功',
+                        type: 'success'
+                    });
+                    that.getDetails(that.rowMsg.id)
+                }
+            })
+        }
+    }
+}
+</script>
+
+<style lang="less">
+.startFrom{
+    .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%;
+                    }
+                    .detaTableBtns{
+                        display: flex;
+                        width: 500px;
+                        position: relative;
+                        top: 32px;
+                        left: 66vw;
+                        z-index: 11111;
+                        .tableBtn {
+                            display: flex;
+                            margin-right: 30px;
+                            img{
+                                margin-right: 5px;
+                                margin-top: 1px;
+                            }
+                            span{
+                                font-size: 14px;
+                                font-family: Microsoft YaHei;
+                                font-weight: 400;
+                            }
+                        }
+                        .add{
+                            cursor: no-drop;
+                            span{
+                                color: #3B7AD1;
+                            }
+                        }
+                        .save{
+                            cursor: pointer;
+                            span{
+                                color: #50C14E;
+                            }
+                        }
+                        .edit{
+                            span{
+                                color: #F5A623;
+                            }
+                        }
+                        .delete{
+                            cursor: no-drop;
+                            span{
+                                color: #F65177;
+                            }
+                        }
+                    }
+                    .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{
+                            .el-table__body-wrapper{
+                                height: 40vh;
+                            }
+                            .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>

+ 168 - 0
src/components/taskCenter/taskCenterPage.vue

@@ -0,0 +1,168 @@
+<template>
+    <div class="taskCenter">
+        <div class="taskCenterTableData">
+            <el-table :data="taskCenterData" style="width: 100%" @select="rowClick" @select-all="rowClick">
+                <!-- <el-table-column type="selection" label="操作" align="center"></el-table-column> -->
+
+                <el-table-column label="序号" type="index" align="center" width="80" />
+                <el-table-column label="执行人名称" prop="assigneeNames" />
+                <el-table-column label="任务名称" prop="name" />
+                <el-table-column label="任务状态">
+                    <template #default="scope">
+                        <div v-if="scope.row.status === 'NORMAL'">普通</div>
+                        <div v-else-if="scope.row.status === 'SUSPEND'">挂起</div>
+                        <div v-else-if="scope.row.status === 'LOCK'">锁定</div>
+                        <div v-else-if="scope.row.status == 'BACK'">驳回</div>
+                        <div v-else-if="scope.row.status === 'DESIGNATE'">指派</div>
+                        <div v-else-if="scope.row.status === 'TURN'">转办</div>
+                        <div v-else-if="scope.row.status === 'ADDDOED'">加办结束</div>
+                        <div v-else-if="scope.row.status === 'AGENCY'">代理</div>
+                    </template>
+                </el-table-column>
+                <el-table-column label="任务标题" prop="subject" width="400" />
+                <el-table-column label="任务类型">
+                    <template #default="scope">
+                        <div v-if="scope.row.taskType === 'NORMAL'">普通</div>
+                        <div v-else-if="scope.row.taskType === 'SIGN'">会签</div>
+                        <div v-else-if="scope.row.taskType === 'SIGN_SOURCE'">会签_父</div>
+                        <div v-else-if="scope.row.taskType === 'TRANSFORMING'">事项</div>
+                        <div v-else-if="scope.row.taskType === 'TURN'">转办</div>
+                        <div v-else-if="scope.row.taskType === 'DELIVERTO'">转办</div>
+                        <div v-else-if="scope.row.taskType === 'AGENCY'">代理</div>
+                        <div v-else-if="scope.row.taskType === 'ADD_DO'">加办</div>
+                    </template>
+                </el-table-column>
+                <el-table-column label="操作">
+                    <template #default="scope">
+                        <div style="display: flex">
+                            <p class="indicitem" @click="getflowPath(scope.row)">流程详情</p>
+                            <p class="indicitem" @click="taskProcess(scope.row)">任务处理</p>
+                        </div>
+                    </template>
+                </el-table-column>
+            </el-table>
+            <el-pagination
+                @size-change="handleSizeChange"
+                @current-change="handleCurrentChange"
+                :current-page="page.currentPage"
+                :page-size="page.pagesize"
+                layout="total, prev, pager, next, jumper"
+                :total="page.total">
+            </el-pagination>
+        </div>        
+        <el-dialog title="流程详情" v-model="workflowVisible" width="60vw" :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>
+            </div>
+        </el-dialog>
+        <task-center-evl ref="taskCenterEvl"></task-center-evl>
+    </div>
+</template>
+
+<script>
+import {apiPostTodoTaskList} from '../../api/api'
+import taskCenterEvl from './taskCenterEvlFrom.vue'
+import { getToken } from '../../api/auth'
+export default {
+    components: {
+        taskCenterEvl
+    },
+    data() {
+        return {
+            taskCenterData: [],
+            workflowVisible: false,
+            iframeURL: '',
+            page:{
+                pagesize: 12,
+                currentPage: 1,
+                total: 0
+            }
+        }
+    },
+    created() {
+        this.getEvaluationData()
+    },
+    methods:{
+        // 查询指标数据
+        getEvaluationData() {
+            let that = this
+            let params = {
+                order: "ASC", //排序
+                sort: "",
+                offset: "",
+                limit: that.page.pagesize, //每页显示
+                iamCode: getToken('code') //IAM平台code值(登录后获取凭证)
+            }
+            apiPostTodoTaskList(params).then(datas =>{
+                if (datas && datas.data) {
+                    that.taskCenterData = datas.data.rows
+                    that.page.total = datas.data.total
+                }
+            })
+        },        
+        getflowPath(row) {
+            this.workflowVisible = true
+            this.iframeURL = 'http://10.65.78.23:8080/agilebpm-ui/bpm/instance/instanceImageDialog.html?instanceId='+row.instId+'&defId='+row.defId+'&taskId='+row.taskId+'&iamCode='+getToken('code')
+        },
+        taskProcess(row) {
+            this.$refs.taskCenterEvl.init(row)
+        },
+        rowClick(selection, row) {
+            this.changeDateSelect = selection
+        },
+        handleSizeChange(val){
+            this.page.pagesize = val
+            this.getEvaluationData()
+        },
+        handleCurrentChange(val){
+            this.page.currentPage =val
+            this.getEvaluationData()
+        }
+    }
+}
+</script>
+
+<style lang="less">
+.taskCenter{
+    .taskCenterTableData{
+        margin-top: 20px;
+        .el-table{
+            .el-table__body-wrapper{
+                height: 80vh !important;
+            }
+            .el-input__inner{
+                height: 30px !important;
+            }
+            .el-radio__label{
+                display: none;
+            }
+            
+            .indicitem{
+                color: #409EFF;
+                font-size: 12px;
+                margin-right: 20px;
+                cursor:pointer;
+                &:hover{
+                    text-decoration: underline;
+                }
+            }
+        }
+        .el-pagination{
+            margin-top: 20px;
+            text-align: end;
+            position: relative;
+        }
+    }
+    .el-overlay{
+        .el-dialog{
+            .el-dialog__body{
+                .flowSty{
+                    width: 100%;
+                    height: 500px;
+                }
+            }
+        }
+    }
+}
+</style>

+ 2 - 1
src/request/index.js

@@ -22,7 +22,8 @@ const service = axios.create({
 // 添加请求拦截器
 service.interceptors.request.use(
     function (config) {
-        config.headers.token = getToken()
+        config.headers['Blade-Auth'] = getToken('token')
+        config.headers.code = getToken('code')
         // 在发送请求设置cancel token
         config.cancelToken = new axios.CancelToken(cancel =>{
             store.commit('setAxiosArr', {cancelToken: cancel})

+ 11 - 11
src/router/index.js

@@ -33,17 +33,17 @@ const routes = [
                         '../components/gatewayPage.vue'
                     ),
             },
-            // {
-            //     path: '/benchmark',
-            //     name: 'benchmark',
-            //     meta: {
-            //         title: '对标业务',
-            //     },
-            //     component: () =>
-            //         import(
-            //             '../components/benchmarkingPage.vue'
-            //         ),
-            // },
+            {
+                path: '/taskCenter',
+                name: 'taskCenter',
+                meta: {
+                    title: '任务中心',
+                },
+                component: () =>
+                    import(
+                        '../components/taskCenter/taskCenterPage.vue'
+                    ),
+            },
             {
                 path: '/assessment',
                 name: 'assessment',

+ 5 - 5
src/utils/baseUrl.js

@@ -9,14 +9,14 @@ const baseUrl = {
 switch (process.env.NODE_ENV) { 
     case 'development': 
         baseUrl.ROOT = "/api"  //开发环境url
-        // baseUrl.URL = "http://192.168.2.6:8086"
-        baseUrl.URL = "http://123.60.219.66:28800"
-        // baseUrl.URL = "http://10.65.78.23:18800"
+        baseUrl.URL = "http://10.65.59.67:28800"
+        // baseUrl.URL = "http://123.60.219.66:28800"
+        // baseUrl.URL = "http://10.65.78.23:28800"
         break
  
     case 'production': 
-        baseUrl.ROOT = "http://123.60.219.66:28800/"
-        // baseUrl.ROOT = "http://10.65.78.23:28800/"
+        // baseUrl.ROOT = "http://123.60.219.66:28800/"
+        baseUrl.ROOT = "http://10.65.78.23:28800/"
         break 
 }
 

+ 25 - 14
src/views/Login.vue

@@ -31,12 +31,12 @@
 <script>
 import { setToken } from '@/api/auth'
 import { ElMessage } from "element-plus";
-import { loginApi } from '../api/api'
+import { loginApi, apiGetCodeByToken } from '../api/api'
 export default {
     data() {
         return {
-            inputUser:'',
-            inputMima:'',
+            inputUser:'testdbkp',
+            inputMima:'Gddl!#%135',
             codeUrl:'',
             ememberMe:false,
             loading:false,
@@ -56,17 +56,28 @@ export default {
         //登录接口
         getLogin(userName, password) {
             // setToken('userMsg', params)
-            // loginApi(userName, password).then(datas=>{
-            //     if (datas) {
-            //         setToken('token', datas.access_token)
-            //         this.$router.push({ path: "/home"})
-            //     } else {
-            //         ElMessage.error(datas.msg);
-            //     }
-            // }).catch(e =>{
-            //     this.loading = false
-            // })
-            this.$router.push({ path: "/home"})
+            let that = this
+            loginApi(userName, password).then(datas=>{
+                if (datas) {
+                    setToken('token', datas.data.access_token)
+                    that.getTokenCode(datas.data.access_token)
+                } else {
+                    ElMessage.error(datas.data.msg);
+                }
+            }).catch(e =>{
+                that.loading = false
+            })
+            // this.$router.push({ path: "/home"})
+        },
+        // 根据token获取code
+        getTokenCode(val) {
+            let that = this
+            apiGetCodeByToken(val).then(datas =>{
+                if (datas && datas.data) {
+                    setToken('code', datas.data)
+                    that.$router.push({ path: "/home"})
+                }
+            })
         }
     }
 }

+ 41 - 14
src/views/homePage.vue

@@ -17,19 +17,25 @@
             </div>
             <div class="homeMain" :style="mainHeight">
                 <div class="homeMain_tag">
-                    <el-tag
-                        v-for="tag in routeTags"
-                        :key="tag.name"
-                        closable
-                        size="large"
-                        class="tagArr"
-                        effect="dark"
-                        :type="tag.index === $route.path ? '': 'info'"
-                        @close="handleClose(tag)"
-                        @click="handleShowPage(tag)"
-                    >
-                        <span>{{ tag.name }}</span>
-                    </el-tag>
+                    <div style="width: 95%">
+                        <el-tag
+                            v-for="tag in routeTags"
+                            :key="tag.name"
+                            closable
+                            size="large"
+                            class="tagArr"
+                            effect="dark"
+                            :type="tag.index === $route.path ? '': 'info'"
+                            @close="handleClose(tag)"
+                            @click="handleShowPage(tag)"
+                        >
+                            <span>{{ tag.name }}</span>
+                        </el-tag>
+                    </div>
+                    <div style="width: 5%;padding-top:20px">
+                        <!-- <el-icon @click="closeSys" :size="20" color="#F65177"><SwitchButton /></el-icon> -->
+                        <img :src="closeBtn" @click="closeSys" >
+                    </div>
                 </div>
                 <div class="mainMessage" :style="$route.path === '/home' ? '': 'padding: 0 10px;'">
                     <router-view></router-view>
@@ -42,10 +48,15 @@
 <script>
 import MenuTree from '../components/menuTreeconfig.vue'
 import homeImg from '../assets/menuImg/home.png'
+import taskImg from '../assets/menuImg/task.png'
 import yewuImg from '../assets/menuImg/yewu.png'
 import tixiImg from '../assets/menuImg/tixi.png'
 import zhishikuImg from '../assets/menuImg/zhishiku.png'
 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'
 export default {
     components: {MenuTree},
     data() {
@@ -57,7 +68,8 @@ export default {
             defaultProps: {
                 children: 'children',
                 label: 'label',
-            }
+            },
+            closeBtn: closeBtn
         }
     },
     created(){
@@ -68,6 +80,11 @@ export default {
                 img: homeImg
             },
             {
+                index: '/taskCenter',
+                name: '任务中心',
+                img: taskImg
+            },
+            {
                 index: '1',
                 name: '考评业务',
                 img: yewuImg,
@@ -251,6 +268,15 @@ export default {
                 this.$router.push({ path: item.index})
             }
         },
+        closeSys() {
+            let that = this
+            apiPostremoveByToken(getToken()).then(datas =>{
+                if (datas.code === 200) {
+                    removeToken('token')
+                    this.$router.push({ path: "/login"})
+                }
+            })
+        },
         handleNodeClick(index, indexPath) {
             if (indexPath) {
                 this.forecastDatas.forEach(it =>{
@@ -393,6 +419,7 @@ export default {
             .homeMain_tag{
                 height:60px;
                 border-bottom: 1px solid #D6DBEA;
+                display: flex;
                 .tagArr{
                     height: 33px;
                     margin-left: 10px;