[update] 修改bug79523,78568

This commit is contained in:
lideqin
2024-01-29 10:34:54 +08:00
parent 21b14ccd63
commit c88b781c72
@@ -43,7 +43,7 @@
</a-tooltip>
<div class="tree-operate-node-btn-box" :class="{'tree-operate-node-btn-box-hide': record.id !== mouseInNodeKey}">
<!-- 新增 -->
<a-button v-if="record.userId === currentUserId" icon="plus" class="tree-operate-node-btn" @click="handleWorkGroupAdd(record)"></a-button>
<a-button v-if="record.userId === currentUserId" v-has="'sys:innerWorkingGroup:tree:add'" icon="plus" class="tree-operate-node-btn" @click="handleWorkGroupAdd(record)"></a-button>
<!-- 编辑 -->
<a-button class="tree-operate-node-btn" @click="handleTreeEdit(record)" v-has="'sys:innerWorkingGroup:tree:edit'">
<i class="iconfont icon-bianji"></i>
@@ -68,11 +68,11 @@
</a-tooltip>
<div v-if="record.userId === currentUserId" class="tree-operate-node-btn-box" :class="{'tree-operate-node-btn-box-hide': record.id !== mouseInNodeKey}">
<!-- 编辑 -->
<a-button class="tree-operate-node-btn" @click="handleWorkGroupEdit(record)">
<a-button class="tree-operate-node-btn" @click="handleWorkGroupEdit(record)" v-has="'sys:innerWorkingGroup:tree:edit'">
<i class="iconfont icon-bianji"></i>
</a-button>
<!-- 删除 -->
<a-button class="tree-operate-node-btn" @click="handleWorkGroupDelete">
<a-button class="tree-operate-node-btn" @click="handleWorkGroupDelete" v-has="'sys:innerWorkingGroup:tree:delete'">
<i class="iconfont icon-shanchu_"></i>
</a-button>
</div>
@@ -125,17 +125,27 @@
<div class="table-operator">
<!-- 当前登录人是当前左侧树选中节点的管理人员才有新增导入删除权限 -->
<!-- 新增-->
<a-button v-if="currentNodeObj.userId === currentUserId && currentNodeObj.level === 3" icon="plus" type="primary" @click="handleAdd">{{ $t('newlyAdded') }}</a-button>
<a-button v-if="currentNodeObj.userId === currentUserId && currentNodeObj.level === 3 && isHasPermission('sys:innerWorkingGroup:operate')"
icon="plus" type="primary" @click="handleAdd">
{{ $t('newlyAdded') }}
</a-button>
<!-- 导入-->
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :data="importData" :action="importExcelUrl" @change="handleImportExcel">
<a-button v-if="currentNodeObj.userId === currentUserId && currentNodeObj.level === 3" type="primary" icon="import" ghost @click="handleImport">{{ $t('import') }}</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader"
:data="importData" :action="importExcelUrl" @change="handleImportExcel">
<a-button v-if="currentNodeObj.userId === currentUserId && currentNodeObj.level === 3 && isHasPermission('sys:innerWorkingGroup:operate')"
type="primary" icon="import" ghost @click="handleImport">
{{ $t('import') }}
</a-button>
</a-upload>
<!-- 导出-->
<a-button icon="export" type="primary" ghost @click="handleExportXls($t('system.internalWorkGroup.exportName'))" v-has="'sys:innerWorkingGroup:export'">
<a-button icon="export" type="primary" ghost @click="handleExportXls($t('system.internalWorkGroup.exportName'))"
v-has="'sys:innerWorkingGroup:export'">
{{ $t('export') }}
</a-button>
<!-- 模板下载-->
<a-button v-if="currentNodeObj.userId === currentUserId && currentNodeObj.level === 3" type="primary" icon="download" ghost @click="downTemplate($t('system.internalWorkGroup.templateName'), '.xls')">
<a-button v-if="currentNodeObj.userId === currentUserId && currentNodeObj.level === 3 && isHasPermission('sys:innerWorkingGroup:operate')"
type="primary" icon="download" ghost
@click="downTemplate($t('system.internalWorkGroup.templateName'), '.xls')">
{{ $t('templateDownload') }}
</a-button>
</div>
@@ -154,7 +164,7 @@
<template v-slot:action="{text, record}">
<!-- 当前登录人是当前左侧树选中节点的管理人员才有新增导入删除权限 -->
<a v-if="currentNodeObj.userId === currentUserId && currentNodeObj.level === 3" @click="handleDelete(record.id)">{{ $t('delete') }}</a>
<a v-if="currentNodeObj.userId === currentUserId && currentNodeObj.level === 3 && isHasPermission('sys:innerWorkingGroup:operate')" @click="handleDelete(record.id)">{{ $t('delete') }}</a>
</template>
</j-table>
@@ -180,6 +190,7 @@ import { getWorkGroupTreeList } from '@/api/api'
import TreeNodeWorkGroupModal from './modules/TreeNodeWorkGroupModal'
import Vue from 'vue'
import { USER_INFO } from '../../../store/mutation-types'
import { isHasPermission } from '@/utils/hasPermission'
export default {
name: 'WorkingGroupList',
@@ -255,6 +266,7 @@ export default {
this.currentUserId = Vue.ls.get(USER_INFO).id
},
methods: {
isHasPermission,
// 获取左侧树数据
initTreeData (params) {
this.treeLoading = true