Browse Source

增加任务中心已办功能;配合e办公联调待办功能跳转

wangcahngsheng 10 months atrás
parent
commit
b7f5180e7a

+ 7 - 5
src/components/taskCenter/taskApplicationFrom.vue

@@ -67,7 +67,7 @@
                 </el-row>
                 <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
                     <el-tab-pane label="员工月度考核系数" name="first">
-                        <div class="detaTableBtns">
+                        <div class="detaTableBtns" v-if="tabName === 'first'">
                             <div class="tableBtn add" @click="addTableDetail">
                                 <img :src="addIcon" alt="">
                                 <span>新增</span>
@@ -137,7 +137,7 @@
                         </el-pagination>
                     </el-tab-pane>
                     <el-tab-pane label="本月主要工作完成情况" name="second">
-                        <div class="detaTableBtns">
+                        <div class="detaTableBtns"  v-if="tabName === 'first'">
                             <div class="tableBtn add" @click="addSecondWork">
                                 <img :src="addIcon" alt="">
                                 <span>新增</span>
@@ -188,13 +188,13 @@
                         </el-pagination>
                     </el-tab-pane>
                 </el-tabs>
-                <div>
+                <div v-if="tabName === 'first'">
                     <p class="starttitleSty">审批意见:</p>
                     <el-input v-model="descMsg" :rows="3" type="textarea" placeholder="请输入审批意见"></el-input>
                 </div>
             </div>
             <template #footer>
-                <span class="dialog-footer">
+                <span class="dialog-footer" v-if="tabName === 'first'">
                     <el-button v-if="changeLeader" @click="engProssionFn">同 意</el-button>
                     <el-button type="primary" @click="examineAndApproveSV('agree')">修改确认</el-button>
                     <el-button @click="examineAndApprove('reject')">拒 绝</el-button>
@@ -307,6 +307,7 @@
                 changeLeader: false,
                 ispersonDept: window.sessionStorage.getItem('ispersonDept'),
                 changeSituationSelect: [],
+                tabName: ''
             }
         },
         created() {
@@ -329,7 +330,7 @@
             ]
         },
         methods: {
-            init(row, id, allData) {
+            init(row, id, allData, tabVal) {
                 this.dialogVisible = true
                 this.userMes = JSON.parse(window.sessionStorage.getItem('user'))
                 this.activeName = 'first'
@@ -340,6 +341,7 @@
                 this.getprocessInformation(row)
                 this.keyId = id
                 this.rowMsg = row
+                this.tabName = tabVal
             },
             //查询审批人领导给提示
             getprocessInformation(row) {

+ 7 - 5
src/components/taskCenter/taskCenterDeptBusinessFrom.vue

@@ -50,7 +50,7 @@
                         <el-input v-model="compNameSa" placeholder="请输入部门名称" @keyup.enter="getDetails(importId)">
                         </el-input>
                     </div>
-                    <div class="detaTableBtns">
+                    <div class="detaTableBtns" v-if="tabName === 'first'">
                         <div class="tableBtn save" @click="saveDetail">
                             <img :src="saveIcon" alt="">
                             <span>保存</span>
@@ -117,14 +117,14 @@
                         </el-pagination>
                     </el-tab-pane>
                 </el-tabs>
-                <div>
+                <div v-if="tabName === 'first'">
                     <p class="starttitleSty">审批意见:</p>
                     <el-input v-model="descMsg" :disabled="ispersonDept !== 'true'" :rows="3" type="textarea"
                         placeholder="请输入审批意见"></el-input>
                 </div>
             </div>
             <template #footer>
-                <span class="dialog-footer">
+                <span class="dialog-footer"  v-if="tabName === 'first'">
                     <el-button type="primary" @click="examineAndApprove('agree')">同 意</el-button>
                     <el-button @click="examineAndApprove('reject')">拒 绝</el-button>
                 </span>
@@ -199,7 +199,8 @@
                 userMes: {},
                 importId: '',
                 ispersonDept: window.sessionStorage.getItem('ispersonDept'),
-                compNameSa: ''
+                compNameSa: '',
+                tabName: ''
             }
         },
         created() {
@@ -219,13 +220,14 @@
             ]
         },
         methods: {
-            init(row, id, datas) {
+            init(row, id, datas, tabVal) {
                 this.dialogVisible = true
                 this.instanceChild = datas
                 this.activeName = 'first'
                 this.importId = id
                 this.getDetails(id)
                 this.rowMsg = row
+                this.tabName = tabVal
 
             },
             handleClick() {

+ 7 - 5
src/components/taskCenter/taskCenterDeptStartFrom.vue

@@ -50,7 +50,7 @@
                         <el-input v-model="compNameSa" placeholder="请输入部门名称" @keyup.enter="getDetails(importId)">
                         </el-input>
                     </div>
-                    <div class="detaTableBtns">
+                    <div class="detaTableBtns" v-if="tabName === 'first'">
                         <div class="tableBtn add" @click="addTableDetail">
                             <img :src="addIcon" alt="">
                             <span>新增</span>
@@ -144,13 +144,13 @@
                         </el-pagination>
                     </el-tab-pane>
                 </el-tabs>
-                <div>
+                <div v-if="tabName === 'first'">
                     <p class="starttitleSty">审批意见:</p>
                     <el-input v-model="descMsg" :rows="3" type="textarea" placeholder="请输入审批意见"></el-input>
                 </div>
             </div>
             <template #footer>
-                <span class="dialog-footer">
+                <span class="dialog-footer"  v-if="tabName === 'first'">
                     <el-button type="primary" @click="examineAndApprove('agree')">同 意</el-button>
                     <el-button @click="examineAndApprove('reject')">拒 绝</el-button>
                 </span>
@@ -228,7 +228,8 @@
                 importId: '',
                 userMes: {},
                 ispersonDept: window.sessionStorage.getItem('ispersonDept'),
-                compNameSa: ''
+                compNameSa: '',
+                tabName: ''
             }
         },
         created() {
@@ -247,7 +248,7 @@
             ]
         },
         methods: {
-            init(row, id, datas) {
+            init(row, id, datas, tabVal) {
                 this.dialogVisible = true
                 this.instanceChild = datas
                 this.activeName = 'first'
@@ -256,6 +257,7 @@
                 this.getDetails(id)
                 this.getDepartmentFromTreeData(datas)
                 this.rowMsg = row
+                this.tabName = tabVal
             },
             // 查询部门
             getDepartmentFromTreeData(datas) {

+ 8 - 6
src/components/taskCenter/taskCenterEvlNewFrom.vue

@@ -72,15 +72,15 @@
                                         <img :src="saveIcon" alt="">
                                         <span>保存</span>
                                     </div> -->
-                                    <div class="tableBtn save" @click="saveDetail">
+                                    <div class="tableBtn save" @click="saveDetail" v-if="tabName === 'first'">
                                         <img :src="saveIcon" alt="">
                                         <span>保存</span>
                                     </div>
-                                    <div class="tableBtn import" @click="handleImport">
+                                    <div class="tableBtn import" @click="handleImport" v-if="tabName === 'first'">
                                         <img :src="importIcon" alt="">
                                         <span>导入</span>
                                     </div>
-                                    <div class="tableBtn export" @click="handleExport">
+                                    <div class="tableBtn export" @click="handleExport" v-if="tabName === 'first'">
                                         <img :src="exportIcon" alt="">
                                         <span>导出</span>
                                     </div>
@@ -143,7 +143,7 @@
                         </div>
                     </div>
                 </div>
-                <div>
+                <div v-if="tabName === 'first'">
                     <p class="starttitleSty">审批意见:</p>
                     <el-input v-model="descMsg" :rows="3" type="textarea" placeholder="请输入审批意见"></el-input>
                 </div>
@@ -154,7 +154,7 @@
                 </span>
             </template> -->
             <template #footer>
-                <span class="dialog-footer">
+                <span class="dialog-footer" v-if="tabName === 'first'">
                     <el-button type="primary" @click="examineAndApprove('agree')">同 意</el-button>
                     <el-button @click="examineAndApprove('reject')">拒 绝</el-button>
                 </span>
@@ -273,6 +273,7 @@
                 organizationData: [],
                 detailMsg: {},
                 userMes: {},
+                tabName: ''
             }
         },
         created() {
@@ -291,7 +292,7 @@
             ]
         },
         methods: {
-            init(row, allData) {
+            init(row, allData, tabVal) {
                 this.dialogVisible = true
                 this.userMes = JSON.parse(window.sessionStorage.getItem('user'))
                 this.instanceChild = allData
@@ -300,6 +301,7 @@
                 this.getevalHeaderDetails(this.tastbizKey, this.taskDefKey)
                 this.getModelData(this.taskDefKey)
                 this.rowMsg = row
+                this.tabName = tabVal
             },
             sortMethods(a, b, it) {
                 if (a[it] < b[it]) {

+ 164 - 55
src/components/taskCenter/taskCenterPage.vue

@@ -1,47 +1,70 @@
 <template>
     <div class="taskCenter">
         <div class="taskCenterTableData">
-            <el-table :data="taskCenterData" style="width: 100%" @select="rowClick" @select-all="rowClick"
-                :class="taskCenterTableSty()">
-                <!-- <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-tabs v-model="taskTabs" @tab-click="handleTabs">
+                <el-tab-pane label="待办" name="first">
+                    <!-- @select="rowClick" @select-all="rowClick" -->
+                    <el-table :data="taskCenterData" style="width: 100%" :class="taskCenterTableSty()">
+                        <!-- <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-tab-pane>
+                <el-tab-pane label="已办" name="second">
+                    <el-table :data="taskCenterDataOver" style="width: 100%" :class="taskCenterTableSty()">
+                        <el-table-column label="序号" type="index" align="center" width="80" />
+                        <el-table-column label="创建人名称" prop="creator" />
+                        <el-table-column label="流程名称" prop="defName" />
+                        <el-table-column label="审批状态">
+                            <template #default="scope">
+                                <span>{{getapproveStatusZn(scope.row.approveStatus)}}</span>
+                            </template>
+                        </el-table-column>
+                        <el-table-column label="任务标题" prop="subject" width="400" />
+                        <el-table-column label="操作">
+                            <template #default="scope">
+                                <div style="display: flex">
+                                    <p class="indicitem" @click="taskProcess(scope.row)">查看详情</p>
+                                </div>
+                            </template>
+                        </el-table-column>
+                    </el-table>
+                </el-tab-pane>
+            </el-tabs>
             <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">
@@ -54,6 +77,7 @@
                 </div>
             </el-dialog>
         </div>
+        <!-- 待办 -->
         <task-evaluation-start ref="taskEvaluationStart"></task-evaluation-start>
         <task-evaluation-amendment-from ref="taskEvaluationAmendmentFrom"></task-evaluation-amendment-from>
         <task-center-evl ref="taskCenterEvl" @approveMsg="approveMsg"></task-center-evl>
@@ -68,9 +92,11 @@
 <script>
     import {
         apiPostTodoTaskList,
+        apiPostTodoTaskOverList,
         apiPosteProGetTaskInfo,
         apiPostgetInstanceAndChildren
     } from '../../api/api'
+    // 待办
     import taskUnitRatingFrom from './taskUnitRatingFrom.vue'
     import taskEvaluationStart from './taskEvaluationStart.vue'
     import taskEvaluationAmendmentFrom from './taskEvaluationAmendmentFrom.vue'
@@ -91,8 +117,10 @@
         data() {
             return {
                 taskCenterData: [],
+                taskCenterDataOver: [],
                 workflowVisible: false,
                 iframeURL: '',
+                taskTabs: 'first',
                 page: {
                     pagesize: 12,
                     currentPage: 1,
@@ -107,13 +135,19 @@
                 console.log('有iamCode===>>>', this.$route)
                 window.localStorage.setItem('token', this.$route.query.iamAccessToken)
                 window.localStorage.setItem('code', this.$route.query.iamCode)
-                this.iamTaskProcess(this.$route.query)
+                if (this.$route.query.isRemark === '0') {
+                    this.taskTabs = 'first'
+                    this.iamTaskProcess(this.$route.query)
+                } else {
+                    this.taskTabs = 'second'
+                    this.taskOverProcess(this.$route.query)
+                }
             } else {
                 this.getEvaluationData()
             }
         },
         methods: {
-            // 查询指标数据
+            // 查询指标数据 -- 待办
             getEvaluationData() {
                 let that = this
                 let params = {
@@ -130,6 +164,65 @@
                     }
                 })
             },
+            //已办数据
+            getEvaluationOverData() {
+                let that = this
+                let params = {
+                    order: "ASC", //排序
+                    sort: "",
+                    offset: that.page.currentPage,
+                    limit: that.page.pagesize, //每页显示
+                    iamCode: window.localStorage.getItem('code') //IAM平台code值(登录后获取凭证)
+                }
+                apiPostTodoTaskOverList(params).then(datas => {
+                    if (datas && datas.data) {
+                        that.taskCenterDataOver = datas.data.rows
+                        that.page.total = datas.data.total
+                    }
+                })
+            },
+            handleTabs(val) {
+                console.log(val)
+                this.page.currentPage = 1
+                this.page.total = 0
+                if (val.props.name === 'second') {
+                    this.getEvaluationOverData()
+                } else {
+                    this.getEvaluationData()
+                }
+            },
+            getapproveStatusZn(ststusEn) {
+                let obj = {
+                    start: '发起流程',
+                    awaiting_check: '待审批',
+                    agree: '同意',
+                    against: '反对',
+                    return: '驳回',
+                    abandon: '弃权',
+                    retrieve: '追回',
+                    signPass: '会签通过',
+                    signNotPass: '会签反对',
+                    recall: '撤回',
+                    recycle: '任务回收',
+                    carbonCopy: '抄送审阅',
+                    addDoAgree: '处理加办',
+                    addDo: '加办',
+                    manualEnd: '人工终止',
+                    cancelled: '任务取消',
+                    turn: '转办',
+                    skip: '跳过执行',
+                    signRecycle: '会签回收',
+                    recall_to_start: '撤回到发起人',
+                    revoke: '撤销',
+                    rejectToStart: '驳回到发起人',
+                    reject: '驳回',
+                    abandon: '弃权',
+                    oppose: '反对',
+                    end: '结束',
+                    create: '创建'
+                }
+                return obj[ststusEn]
+            },
             getflowPath(row) {
                 this.workflowVisible = true
                 let url = ''
@@ -141,6 +234,7 @@
                 this.iframeURL = url + '/agilebpm-ui/bpm/instance/instanceImageDialog.html?instanceId=' + row.instId +
                     '&defId=' + row.defId + '&taskId=' + row.taskId + '&iamCode=' + window.localStorage.getItem('code')
             },
+            //待办
             iamTaskProcess(query) {
                 let obj = {
                     instId: query.taskInfo,
@@ -163,7 +257,7 @@
             taskProcess(row) {
                 let that = this
                 let params = {
-                    id: row.instId,
+                    id: that.taskTabs === 'first' ? row.instId : row.id,
                     iamCode: window.localStorage.getItem('code')
                 }
                 apiPostgetInstanceAndChildren(params).then(datas => {
@@ -172,34 +266,49 @@
                         let keyId = datas.data.data.bpmInstance.bizKey
                         let taskDefKey = datas.data.data.bpmInstance.defKey
                         if (taskDefKey === 'bbbmyjzbjh') {
-                            that.$refs.taskCenterdeptEvl.init(row, keyId, allData)
+                            that.$refs.taskCenterdeptEvl.init(row, keyId, allData, that.taskTabs)
                         } else if (taskDefKey === 'bbbmyjzbkh') {
-                            that.$refs.taskCenterdeptbusinessEvl.init(row, keyId, allData)
+                            that.$refs.taskCenterdeptbusinessEvl.init(row, keyId, allData, that.taskTabs)
                         } else if (taskDefKey === 'jxjgkhsb') {
-                            that.$refs.taskApplicationFrom.init(row, keyId, allData)
+                            that.$refs.taskApplicationFrom.init(row, keyId, allData, that.taskTabs)
                         } else if (taskDefKey === 'yddwkplc' || taskDefKey === 'jddwkplc' || taskDefKey ===
                             'nddwkplc') {
-                            that.$refs.taskCenterEvl.init(row, allData)
+                            that.$refs.taskCenterEvl.init(row, allData, that.taskTabs)
                         } else if (taskDefKey === 'dwkpmbqd') {
-                            that.$refs.taskEvaluationStart.init(row, allData)
+                            that.$refs.taskEvaluationStart.init(row, allData, that.taskTabs)
                         } else if (taskDefKey === 'dwkpmbxd') {
-                            that.$refs.taskEvaluationAmendmentFrom.init(row, keyId, allData)
+                            that.$refs.taskEvaluationAmendmentFrom.init(row, keyId, allData, that.taskTabs)
                         } else if (taskDefKey === 'nddwpj') {
-                            that.$refs.taskUnitRating.init(row, keyId, allData)
+                            that.$refs.taskUnitRating.init(row, keyId, allData, that.taskTabs)
                         }
                     }
                 })
             },
+            //已办
+            taskOverProcess(query) {
+                let obj = {
+                    id: query.taskInfo
+                }
+                this.taskProcess(obj)
+            },
             rowClick(selection, row) {
                 this.changeDateSelect = selection
             },
             handleSizeChange(val) {
                 this.page.pagesize = val
-                this.getEvaluationData()
+                if (this.taskTabs === 'second') {
+                    this.getEvaluationOverData()
+                } else {
+                    this.getEvaluationData()
+                }
             },
             handleCurrentChange(val) {
                 this.page.currentPage = val
-                this.getEvaluationData()
+                if (this.taskTabs === 'second') {
+                    this.getEvaluationOverData()
+                } else {
+                    this.getEvaluationData()
+                }
             },
             approveMsg(val) {
                 if (val) {
@@ -224,13 +333,13 @@
 
             .taskCenter125Table {
                 .el-table__body-wrapper {
-                    height: 70vh !important;
+                    height: 60vh !important;
                 }
             }
 
             .taskCenter100Table {
                 .el-table__body-wrapper {
-                    height: 78vh !important;
+                    height: 68vh !important;
                 }
             }
 

+ 7 - 5
src/components/taskCenter/taskEvaluationAmendmentFrom.vue

@@ -48,7 +48,7 @@
                 <div class="monthQuarterYear">
                     <el-tabs v-model="activeName" class="tableMain" @tab-click="handleClick">
                         <el-tab-pane v-for="it in stageData" :key="it.id" :label="it.stageName" :name="it.stageCode">
-                            <div class="detailsHeader">
+                            <div class="detailsHeader" v-if="tabName === 'first'">
                                 <div class="headerRight">
                                     <div class="seachFor">
                                         <el-input v-model="compNameSa" placeholder="请输入单位名称"
@@ -194,13 +194,13 @@
                         </div>
                     </div>
                 </div>
-                <div>
+                <div v-if="tabName === 'first'">
                     <p class="starttitleSty">审批意见:</p>
                     <el-input v-model="descMsg" :rows="3" type="textarea" placeholder="请输入审批意见"></el-input>
                 </div>
             </div>
             <template #footer>
-                <span class="dialog-footer">
+                <span class="dialog-footer" v-if="tabName === 'first'">
                     <el-button type="primary" @click="examineAndApprove('agree')">同 意</el-button>
                     <el-button @click="examineAndApprove('reject')">拒 绝</el-button>
                 </span>
@@ -276,7 +276,8 @@
                 addstageId: '',
                 instanceChild: {},
                 rowkeyId: '',
-                userMes: {}
+                userMes: {},
+                tabName: ''
             }
         },
         created() {
@@ -295,7 +296,7 @@
             ]
         },
         methods: {
-            init(row, keyId, allData) {
+            init(row, keyId, allData, tabVal) {
                 this.dialogVisible = true
                 this.userMes = JSON.parse(window.sessionStorage.getItem('user'))
                 this.getevalHeaderDetails(keyId)
@@ -303,6 +304,7 @@
                 this.rowMsg = row
                 this.rowkeyId = keyId
                 this.instanceChild = allData
+                this.tabName = tabVal
             },
             //获取头部详情
             getevalHeaderDetails(id) {

+ 9 - 7
src/components/taskCenter/taskEvaluationStart.vue

@@ -65,15 +65,15 @@
                                         <img :src="saveIcon" alt="">
                                         <span>保存</span>
                                     </div> -->
-                                    <div class="tableBtn save" @click="saveDetail">
+                                    <div class="tableBtn save" @click="saveDetail" v-if="tabName === 'first'">
                                         <img :src="saveIcon" alt="">
                                         <span>保存</span>
                                     </div>
-                                    <div class="tableBtn import" @click="handleImport">
+                                    <div class="tableBtn import" @click="handleImport" v-if="tabName === 'first'">
                                         <img :src="importIcon" alt="">
                                         <span>导入</span>
                                     </div>
-                                    <div class="tableBtn export" @click="handleExport">
+                                    <div class="tableBtn export" @click="handleExport" v-if="tabName === 'first'">
                                         <img :src="exportIcon" alt="">
                                         <span>导出</span>
                                     </div>
@@ -205,7 +205,7 @@
                         </div>
                     </div>
                 </div>
-                <div>
+                <div v-if="tabName === 'first'">
                     <p class="starttitleSty">审批意见:</p>
                     <el-input v-model="descMsg" :rows="3" type="textarea" placeholder="请输入审批意见"></el-input>
                 </div>
@@ -216,7 +216,7 @@
                 </span>
             </template> -->
             <template #footer>
-                <span class="dialog-footer">
+                <span class="dialog-footer" v-if="tabName === 'first'">
                     <el-button type="primary" @click="examineAndApprove('agree')">同 意</el-button>
                     <el-button @click="examineAndApprove('reject')">拒 绝</el-button>
                 </span>
@@ -289,7 +289,8 @@
                 instanceChild: {},
                 tastbizKey: '',
                 taskDefKey: '',
-                descMsg: ''
+                descMsg: '',
+                tabName: ''
             }
         },
         created() {
@@ -308,7 +309,7 @@
             ]
         },
         methods: {
-            init(row, allData) {
+            init(row, allData, tabVal) {
                 this.dialogVisible = true
                 this.instanceChild = allData
                 this.tastbizKey = allData.bizKey
@@ -316,6 +317,7 @@
                 this.getevalHeaderDetails(this.tastbizKey, this.taskDefKey)
                 this.getModelData(this.taskDefKey)
                 this.rowMsg = row
+                this.tabName = tabVal
             },
             sortMethods(a, b, it) {
                 if (a[it] < b[it]) {

+ 10 - 8
src/components/taskCenter/taskUnitRatingFrom.vue

@@ -53,23 +53,23 @@
                                 </el-option>
                             </el-select>
                         </div>
-                        <div class="tableBtn add" @click="handleAdd">
+                        <div class="tableBtn add" @click="handleAdd" v-if="tabName === 'first'">
                             <img :src="addIcon" alt="">
                             <span>新增</span>
                         </div>
-                        <div class="tableBtn save" @click="handleEdit">
+                        <div class="tableBtn save" @click="handleEdit" v-if="tabName === 'first'">
                             <img :src="saveIcon" alt="">
                             <span>保存</span>
                         </div>
-                        <div class="tableBtn delete" @click="handleDelete">
+                        <div class="tableBtn delete" @click="handleDelete" v-if="tabName === 'first'">
                             <img :src="deleteIcon" alt="">
                             <span>删除</span>
                         </div>
-                        <div class="tableBtn import" @click="handleImport">
+                        <div class="tableBtn import" @click="handleImport" v-if="tabName === 'first'">
                             <img :src="importIcon" alt="">
                             <span>导入</span>
                         </div>
-                        <div class="tableBtn export" @click="handleExport">
+                        <div class="tableBtn export" @click="handleExport" v-if="tabName === 'first'">
                             <img :src="exportIcon" alt="">
                             <span>导出</span>
                         </div>
@@ -171,7 +171,7 @@
                 </div>
             </div>
             <template #footer>
-                <span class="dialog-footer">
+                <span class="dialog-footer" v-if="tabName === 'first'">
                     <el-button type="primary" @click="examineAndApprove('agree')">同 意</el-button>
                     <el-button @click="examineAndApprove('reject')">拒 绝</el-button>
                 </span>
@@ -273,7 +273,8 @@
                 innerWidth: window.innerWidth,
                 rowObj: {},
                 instanceChild: {},
-                rowkeyId: ''
+                rowkeyId: '',
+                tabName: ''
             }
         },
         created() {
@@ -292,11 +293,12 @@
             ]
         },
         methods: {
-            init(row, keyId, allData) {
+            init(row, keyId, allData, tabVal) {
                 this.ratingdialogVisible = true
                 this.rowObj = row
                 this.rowkeyId = keyId
                 this.instanceChild = allData
+                this.tabName = tabVal
                 this.getevaluRatingDiaList(row, keyId)
                 this.getUnitRatingHeader(keyId)
                 this.getOrganizetionData()