[update] 绑定零部件增加按钮权限

This commit is contained in:
lideqin
2024-04-19 17:57:37 +08:00
parent be1cb2a9cd
commit 89899bbd2e
@@ -53,7 +53,7 @@
{{ toggleSearchStatus ? $t('putAway') : $t('open') }} {{ toggleSearchStatus ? $t('putAway') : $t('open') }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'" /> <a-icon :type="toggleSearchStatus ? 'up' : 'down'" />
</a> </a>
<a-button type="primary" @click="searchQuery" icon="search">{{ $t('query') }}</a-button> <a-button type="primary" @click="searchQuery" icon="search" v-has="'sys:bindingPart:search'">{{ $t('query') }}</a-button>
<a-button type="primary" ghost @click="searchReset" icon="reload" style="margin-left: 8px">{{ $t('reset') }}</a-button> <a-button type="primary" ghost @click="searchReset" icon="reload" style="margin-left: 8px">{{ $t('reset') }}</a-button>
</div> </div>
@@ -63,9 +63,9 @@
<div class="table-operator"> <div class="table-operator">
<!-- 新增 --> <!-- 新增 -->
<a-button icon="plus" type="primary" @click="handleAdd">{{ $t('newlyAdded') }}</a-button> <a-button icon="plus" type="primary" @click="handleAdd" v-has="'sys:bindingPart:add'">{{ $t('newlyAdded') }}</a-button>
<!-- 批量删除 --> <!-- 批量删除 -->
<a-button icon="delete" type="primary" ghost @click="batchDel">{{ $t('batchDelete') }}</a-button> <a-button icon="delete" type="primary" ghost @click="batchDel" v-has="'sys:bindingPart:batchDel'">{{ $t('batchDelete') }}</a-button>
<!-- 使用绑定关系 --> <!-- 使用绑定关系 -->
<!--<a-button icon="setting" type="primary" ghost @click="useBindingRelationship">{{ $t('system.bindingParts.useBindingRelationship') }}</a-button>--> <!--<a-button icon="setting" type="primary" ghost @click="useBindingRelationship">{{ $t('system.bindingParts.useBindingRelationship') }}</a-button>-->
</div> </div>
@@ -103,9 +103,9 @@
</template> </template>
<template v-slot:action="{text, record}"> <template v-slot:action="{text, record}">
<a @click="handleEdit(record)">{{ $t('edit') }}</a> <a @click="handleEdit(record)" v-has="'sys:bindingPart:edit'">{{ $t('edit') }}</a>
<a-divider type="vertical" /> <a-divider type="vertical" v-if="isHasPermission('sys:bindingPart:edit') && isHasPermission('sys:bindingPart:delete')" />
<a @click="handleDelete(record.id)">{{ $t('delete') }}</a> <a @click="handleDelete(record.id)" v-has="'sys:bindingPart:delete'">{{ $t('delete') }}</a>
</template> </template>
</j-table> </j-table>
@@ -122,6 +122,7 @@ import { JeroListMixin } from '../../../mixins/JeroListMixin'
import JTable from '../../../components/jero/JTable' import JTable from '../../../components/jero/JTable'
import BingingPartsModal from './modules/BingingPartsModal' import BingingPartsModal from './modules/BingingPartsModal'
import ClauseModal from './modules/ClauseModal' import ClauseModal from './modules/ClauseModal'
import { isHasPermission } from '../../../utils/hasPermission'
// import { postAction } from '../../../api/manage' // import { postAction } from '../../../api/manage'
export default { export default {
@@ -197,6 +198,7 @@ export default {
} }
}, },
methods: { methods: {
isHasPermission,
// 使用绑定关系 // 使用绑定关系
useBindingRelationship () { useBindingRelationship () {
// if (this.selectedRowKeys.length <= 0) { // if (this.selectedRowKeys.length <= 0) {