update 国内标准、车型项目库列表按钮权限,查询组件按钮权限

This commit is contained in:
赵霄
2023-09-11 18:22:57 +08:00
parent ddaa858fc1
commit bdf84b06c1
5 changed files with 91 additions and 35 deletions
@@ -21,13 +21,17 @@
</a-tooltip>
<template v-if="record.key === mouseInNodeKey">
<!-- 新增-->
<a-button icon="plus" class="tree-operate-node-btn" @click.stop="handleAddTreeNode(record)"></a-button>
<a-button icon="plus"
class="tree-operate-node-btn"
@click.stop="handleAddTreeNode(record)"
v-has="'domesticStandard:tree:add'"></a-button>
<!-- 编辑-->
<a-button class="tree-operate-node-btn" @click.stop="handleEditTreeNode(record)">
<a-button class="tree-operate-node-btn" @click.stop="handleEditTreeNode(record)" v-has="'domesticStandard:tree:edit'">
<i class="iconfont icon-bianji" />
</a-button>
<!-- 删除,根节点不能删除-->
<a-button class="tree-operate-node-btn"
v-has="'domesticStandard:tree:delete'"
v-if="record.nodeType !== StandardSystemTreeNodeType.ROOT_NODE.value"
@click.stop="handleDelTreeNode(record)">
<i class="iconfont icon-shanchu_" />
@@ -43,19 +47,21 @@
<search ref="searchRef"
:url="url"
:get-query-condition-func="getQueryConditionFunc"
search-has="domesticStandard:search"
@search="searchQuery"
@reset="searchReset" />
</div>
<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="'domesticStandard:add'">{{ $t('newlyAdded') }}</a-button>
<!-- 导入-->
<a-upload name="file"
:showUploadList="false"
:multiple="false"
:headers="tokenHeader"
:action="importExcelUrl"
v-has="'domesticStandard:import'"
@change="handleImportExcel">
<a-button type="primary" icon="download" ghost>{{ $t('import') }}</a-button>
</a-upload>
@@ -63,6 +69,7 @@
<a-button icon="upload"
type="primary"
ghost
v-has="'domesticStandard:export'"
@click="handleExportXls($t('standardRegulationLibrary.domesticStandard.exportFileName'))">
{{ $t('export') }}
</a-button>
@@ -70,19 +77,26 @@
<a-button icon="upload"
type="primary"
ghost
v-has="'domesticStandard:exportFile'"
@click="handleFileExport($t('standardRegulationLibrary.domesticStandard.exportFileName'))">
{{ $t('exportWithFile') }}
</a-button>
<!-- 模板下载-->
<a-button type="primary" icon="download" ghost @click="downTemplate($t('standardRegulationLibrary.domesticStandard.templateName'))">
<a-button type="primary"
icon="download"
ghost
v-has="'domesticStandard:downTemplate'"
@click="downTemplate($t('standardRegulationLibrary.domesticStandard.templateName'))">
{{ $t('templateDownload') }}
</a-button>
<!-- 批量删除-->
<a-button type="primary" icon="delete" ghost @click="batchDel">{{ $t('batchDelete') }}</a-button>
<a-button type="primary" icon="delete" ghost @click="batchDel" v-has="'domesticStandard:batchDel'">{{ $t('batchDelete') }}</a-button>
<!-- 配置标准-->
<a-button type="primary" icon="setting" ghost @click="handleConfigStandard">{{ $t('standardRegulationLibrary.configStandard') }}</a-button>
<a-button type="primary" icon="setting" ghost @click="handleConfigStandard" v-has="'domesticStandard:configStandard'">
{{ $t('standardRegulationLibrary.configStandard') }}
</a-button>
<!-- 移出标准-->
<a-button type="primary" icon="minus-circle" ghost @click="handleRemoveStandard">
<a-button type="primary" icon="minus-circle" ghost @click="handleRemoveStandard" v-has="'domesticStandard:removeStandard'">
{{ $t('standardRegulationLibrary.removeStandard') }}
</a-button>
</div>
@@ -118,7 +132,7 @@
<template v-slot:operation="{text, record}">
<!-- 收藏-->
<a @click="operationClick(operationList[0],record)">
<a @click="operationClick(operationList[0],record)" v-has="operationList[0].has">
<i class="iconfont icon-star1" v-show="record.collectionFlag === yesValue" />
<i class="iconfont icon-star" v-show="!record.collectionFlag || record.collectionFlag === noValue" />
</a>
@@ -127,7 +141,7 @@
<a-icon type="more" class="operate-icon-btn operate-icon-more" />
<a-menu slot="overlay">
<a-menu-item v-for="(operation, index) in operationList.slice(operateMaxNum)" :key="index">
<a @click="operationClick(operation,record)">
<a @click="operationClick(operation,record)" v-has="operation.has">
<div class="operate-btn">
<!-- 编辑图标-->
<i class="iconfont icon-bianji operate-btn-icon" v-if="operation.text === $t('edit')" />
@@ -215,22 +229,25 @@ export default {
{
text: this.$t('standardRegulationLibrary.domesticStandard.cancelCollection'),
clickEvent: 'handleCollection',
has: ''
has: 'domesticStandard:collection'
},
// 编辑
{
text: this.$t('edit'),
clickEvent: 'handleEdit',
has: ''
has: 'domesticStandard:edit'
},
// 分享
{
text: this.$t('share'),
clickEvent: 'handleShare',
has: ''
has: 'domesticStandard:share'
},
// 删除
{
text: this.$t('delete'),
clickEvent: 'handleDelete',
has: ''
has: 'domesticStandard:delete'
}
],
getTableHeaderFunc: getDomesticStandardTableHeader,
@@ -243,7 +260,6 @@ export default {
exportZipUrl: '', // 带文件导出
importExcelUrl: '' // 导入
},
dataSource: [{ id: 1, collectionFlag: '1', standard_name: '标准001', standard_number: 'BZ001' }],
yesValue: YesOrNoEnum.YES.value,
noValue: YesOrNoEnum.NO.value,
nowShareId: null, // 当前正在分享的数据的id