[update] 企标库,添加权限

This commit is contained in:
lideqin
2023-09-13 16:55:20 +08:00
parent b27e38e087
commit 1c46cfbae4
9 changed files with 126 additions and 157 deletions
@@ -66,7 +66,7 @@
{{ toggleSearchStatus ? $t('putAway') : $t('open') }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
</a>
<a-button type="primary" @click="searchQuery" icon="search" style="margin-left: 8px">{{ $t('query') }}</a-button>
<a-button type="primary" @click="searchQuery" icon="search" style="margin-left: 8px" v-has="'enterpriseStandardLibrary:check:search'">{{ $t('query') }}</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">{{ $t('reset') }}</a-button>
</div>
@@ -77,15 +77,18 @@
<!-- 操作区域 -->
<div class="table-operator">
<!-- 导出-->
<a-button icon="upload" type="primary" ghost @click="handleExportXls($t('enterpriseStandardLibrary.check.exportFileName'))">
<a-button icon="upload" type="primary" ghost v-has="'enterpriseStandardLibrary:check:export'"
@click="handleExportXls($t('enterpriseStandardLibrary.check.exportFileName'))">
{{ $t('export') }}
</a-button>
<!-- 导出延期数据-->
<a-button icon="upload" type="primary" ghost @click="handleExportPostponeData($t('enterpriseStandardLibrary.check.exportPostponeDataName'))">
<a-button icon="upload" type="primary" ghost v-has="'enterpriseStandardLibrary:check:exportPostponeData'"
@click="handleExportPostponeData($t('enterpriseStandardLibrary.check.exportPostponeDataName'))">
{{ $t('enterpriseStandardLibrary.check.exportPostponeData') }}
</a-button>
<!-- 导出整改计划-->
<a-button icon="upload" type="primary" ghost @click="handleExportRectificationPlan($t('enterpriseStandardLibrary.check.exportRectificationPlanName'))">
<a-button icon="upload" type="primary" ghost v-has="'enterpriseStandardLibrary:check:exportRectificationPlan'"
@click="handleExportRectificationPlan($t('enterpriseStandardLibrary.check.exportRectificationPlanName'))">
{{ $t('enterpriseStandardLibrary.check.exportRectificationPlan') }}
</a-button>
</div>
@@ -122,9 +125,25 @@
<!-- 操作栏 -->
<div slot="action" slot-scope="{text, record}" class="action-span-cell">
<a @click="handleDeferredCheck(record)" class="table-ope-btn">{{ $t('enterpriseStandardLibrary.check.deferredCheck') }}</a>
<a @click="handleCheckReport(record)" class="table-ope-btn">{{ $t('enterpriseStandardLibrary.check.checkReport') }}</a>
<a @click="handleRectificationPlan(record)" class="table-ope-btn">{{ $t('enterpriseStandardLibrary.check.rectificationPlan') }}</a>
<template v-if="record.delayFlag && isHasPermission(operationList[0].has)">
<a @click="operationClick(operationList[0],record)">{{ operationList[0].text }}</a>
<a-divider type="vertical" />
<a-dropdown placement="bottomCenter">
<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)">
<div class="operate-btn">
{{ operation.text }}
</div>
</a>
</a-menu-item>
</a-menu>
</a-dropdown>
</template>
<template v-else>
<a v-for="(operation, index) in operationList.splice(1)" :key="index" @click="operationClick(operation,record)">{{ operation.text }}</a>
</template>
</div>
</j-table>
@@ -143,6 +162,7 @@ import '@assets/less/common.less'
import { queryDepartTreeList } from '@/api/api'
import { JeroListMixin } from '@/mixins/JeroListMixin'
import { downFile } from '@/api/manage'
import { isHasPermission } from '@/utils/hasPermission'
import JTable from '@/components/jero/JTable'
// 延期稽查弹框
import DeferredCheckModal from './modules/DeferredCheckModal'
@@ -157,6 +177,12 @@ export default {
data () {
return {
categoryTreeList: [], // 组织机构查询的组织机构树数据
labelCol: {
span: 4
},
wrapperCol: {
span: 14
},
columns: [
{
title: this.$t('serialNumber'),
@@ -186,7 +212,7 @@ export default {
title: this.$t('enterpriseStandardLibrary.check.planCheckTarget'),
align: 'center',
width: 180,
dataIndex: 'planCheckTarget',
dataIndex: 'planInspectObject',
scopedSlots: { customRender: 'text' }
},
{
@@ -263,13 +289,31 @@ export default {
list: '/enterprise/inspect/page',
exportPostponeDataUrl: '', // 导出延期数据
exportRectificationPlanUrl: '' // 导出整改计划
}
},
operationList: [
{
text: this.$t('enterpriseStandardLibrary.check.deferredCheck'),
clickEvent: 'handleDeferredCheck',
has: 'enterpriseStandardLibrary.check.deferredCheck'
},
{
text: this.$t('enterpriseStandardLibrary.check.checkReport'),
clickEvent: 'handleCheckReport',
has: 'enterpriseStandardLibrary.check.checkReport'
},
{
text: this.$t('enterpriseStandardLibrary.check.rectificationPlan'),
clickEvent: 'handleRectificationPlan',
has: 'enterpriseStandardLibrary.check.rectificationPlan'
}
]
}
},
mounted () {
this.getSysCategoryTree()
},
methods: {
isHasPermission,
// 获取组织机构树
getSysCategoryTree () {
queryDepartTreeList().then((res) => {