[add] 企标临时权限记录

This commit is contained in:
lideqin
2023-12-12 18:31:16 +08:00
parent fa8ba4260f
commit f216fbf30d
5 changed files with 250 additions and 3 deletions
+3
View File
@@ -32,6 +32,8 @@ const shareStandard = (params) => postAction('/personal/lawsStandardSharing/ente
const isCanLookDetail = (params) => getAction('/laws/standard/enterprise/detailPermission', params)
// 企标级别映射列表获取
const getStandardGradeClassification = (params) => getAction('/sys/lawsGrade/list', params)
// 解除授权
const cancelAuthor = (params) => getAction('', params)
// 企标详情-获取更新记录
const detailGetUpdateRecord = (params) => getAction('/laws/standard/enterprise/getUpdateRecordList', params)
@@ -79,6 +81,7 @@ export {
shareStandard,
isCanLookDetail,
getStandardGradeClassification,
cancelAuthor,
detailGetUpdateRecord,
detailSubmitQuestion,
@@ -29,7 +29,11 @@ module.exports = {
disabledBatchDel: '选中数据中存在没有操作权限的数据,请重新选择',
pleaseSelectUserOrDepart: '授权部门和授权人员至少需要选择一个',
youNot: '您没有',
dataPremissReCheck: '数据权限,请重新选择'
dataPremissReCheck: '数据权限,请重新选择',
authorizationExpirationDate: '授权到期日期',
cancelAuthor: '解除授权',
authorizationDate: '授权日期',
authorizationStandard: '授权企标'
},
// 评审会记录
reviewMeeting: {
@@ -6,6 +6,7 @@ module.exports = {
shiftOutStandard: '移出标准',
initChange: '发起更改',
temporaryPermissionSet: '临时权限设置',
temporaryPermissionRecord: '临时权限记录',
collection: '收藏',
cancelCollection: '取消收藏',
exportExcelFile: '企业标准表',
@@ -29,7 +30,11 @@ module.exports = {
disabledBatchDel: '选中数据中存在没有操作权限的数据,请重新选择',
pleaseSelectUserOrDepart: '授权部门和授权人员至少需要选择一个',
youNot: '您没有',
dataPremissReCheck: '数据权限,请重新选择'
dataPremissReCheck: '数据权限,请重新选择',
authorizationExpirationDate: '授权到期日期',
cancelAuthor: '解除授权',
authorizationDate: '授权日期',
authorizationStandard: '授权企标'
},
// 评审会记录
reviewMeeting: {
@@ -82,6 +82,8 @@
<a-button icon="setting" type="primary" ghost @click="handleInitChange" v-has="'enterpriseStandard:initChange'">{{ $t('enterpriseStandardLibrary.standard.initChange') }}</a-button>
<!-- 临时权限设置 -->
<a-button icon="setting" type="primary" ghost @click="handleTemporaryPermissSet" v-has="'enterpriseStandard:temporaryPermissSet'">{{ $t('enterpriseStandardLibrary.standard.temporaryPermissionSet') }}</a-button>
<!-- 临时权限记录 -->
<a-button icon="setting" type="primary" ghost @click="handleTemporaryPermissionRecord" v-has="'enterpriseStandard:temporaryPermissSet'">{{ $t('enterpriseStandardLibrary.standard.temporaryPermissionRecord') }}</a-button>
</div>
<div>
<j-table
@@ -193,6 +195,8 @@
<tree-node-modal ref="treeNodeModal" @ok="treeNodeModalOk"></tree-node-modal>
<!-- 分享需要选人 -->
<user-select-modal ref="userSelectModal" type="checkbox" @change="userSelectChange"></user-select-modal>
<!-- 临时权限记录 -->
<temporary-permission-record ref="temporaryPermissionRecord" @ok="modalFormOk"></temporary-permission-record>
</a-card>
</template>
@@ -222,10 +226,11 @@ import UserSelectModal from '../../../components/selection/UserSelectModal'
// 配置标准弹框
import AllocationStandardDrawer from './modules/AllocationStandardDrawer'
import { postDownFile, downloadFile, postAction } from '@/api/manage'
import TemporaryPermissionRecord from './modules/TemporaryPermissionRecord'
export default {
name: 'EnterpriseStandardList',
components: { AllocationStandardDrawer, UserSelectModal, TreeNodeModal, TemporaryPermissionSet, EnterpriseStandardModal, JTable, Search },
components: { TemporaryPermissionRecord, AllocationStandardDrawer, UserSelectModal, TreeNodeModal, TemporaryPermissionSet, EnterpriseStandardModal, JTable, Search },
mixins: [ConfigurableTableMixin],
data () {
return {
@@ -589,6 +594,10 @@ export default {
}
this.$refs.temporaryPermissionSet.open(this.selectedRowKeys.join(','))
},
// 临时权限记录
handleTemporaryPermissionRecord () {
this.$refs.temporaryPermissionRecord.open()
},
// 操作栏的点击
operationClick (operation, record) {
if (operation.clickEvent === 'handleDelete') {
@@ -0,0 +1,226 @@
<template>
<j-modal
:title="title"
:maskClosable="true"
:width="1000"
:closable="true"
switchFullscreen
:footer="false"
@cancel="handleCancel"
:visible="visible">
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :sm="8">
<!-- 企标编号 -->
<a-form-item :label="$t('enterpriseStandardLibrary.reviewMeeting.enterpriseStandardNum')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-input
:placeholder="$t('pleaseEnter') + $t('enterpriseStandardLibrary.reviewMeeting.enterpriseStandardNum')"
v-model="queryParam.standardNumber">
</j-input>
</a-form-item>
</a-col>
<!-- 授权到期日期 -->
<a-col :sm="8">
<a-form-item :label="$t('enterpriseStandardLibrary.standard.authorizationExpirationDate')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-range-picker v-model="queryParam.authorizationExpirationDate"
format="YYYY-MM-DD" value-format="YYYY-MM-DD"
@change="onChange('authorizationExpirationDate')"></a-range-picker>
</a-form-item>
</a-col>
<a-col :sm="8">
<!-- 授权部门 -->
<a-form-item :label="$t('enterpriseStandardLibrary.standard.authorizationDepart')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-tree-select
tree-node-filter-prop="title"
v-model="queryParam.authorizationDepart"
:maxTagCount="1"
allowClear
:getPopupContainer="triggerNode=> triggerNode.parentNode"
class="box-input"
style="width: 100%"
:tree-data="categoryTreeList"
:placeholder="$t('pleaseSelect') + $t('enterpriseStandardLibrary.standard.authorizationDepart')"
treeCheckable
treeCheckStrictly
show-search
:filterTreeNode="filterTreeOption"
/>
</a-form-item>
</a-col>
<a-col :sm="8">
<!-- 授权人员 -->
<a-form-item :label="$t('enterpriseStandardLibrary.standard.authorizationUser')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-input
:placeholder="$t('pleaseEnter') + $t('enterpriseStandardLibrary.standard.authorizationUser')"
v-model="queryParam.authorizationUser">
</j-input>
</a-form-item>
</a-col>
<div style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
<a-button class="box-button" type="primary" icon="search" @click="searchQuery">{{ $t('query') }}</a-button>
<a-button class="box-button" icon="reload" style="margin-left: 8px" @click="searchReset">{{ $t('reset') }}</a-button>
</div>
</a-row>
</a-form>
</div>
<j-table
ref="table"
rowKey="id"
:can-drag="true"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:scroll="{x: '100%'}"
@change="handleTableChange">
<template v-slot:action="{text, record}">
<!-- 解除授权 -->
<a class="table-del" @click="handleCancelAuthor(record)">{{$t('enterpriseStandardLibrary.standard.cancelAuthor')}}</a>
</template>
</j-table>
</j-modal>
</template>
<script>
import { JeroListMixin } from '@/mixins/JeroListMixin'
import { cancelAuthor } from '@/api/enterpriseStandardLibraryApi'
import { queryDepartTreeList } from '@/api/api'
import JTable from '@/components/jero/JTable'
export default {
name: 'TemporaryPermissionRecord',
mixins: [JeroListMixin],
components: { JTable },
data () {
return {
title: this.$t('enterpriseStandardLibrary.standard.temporaryPermissionRecord'),
visible: false,
labelCol: {
span: 4
},
wrapperCol: {
span: 14
},
disableMixinCreated: true,
categoryTreeList: [], // 组织机构下拉框数据
columns: [
{
title: this.$t('serialNumber'),
dataIndex: '',
key: 'rowIndex',
align: 'center',
width: 80,
customRender: function (t, r, index) {
return parseInt(index) + 1
}
},
{ // 授权日期
title: this.$t('enterpriseStandardLibrary.standard.authorizationDate'),
align: 'center',
width: 180,
dataIndex: 'authorizationDate',
scopedSlots: { customRender: 'text' }
},
{ // 授权到期日期
title: this.$t('enterpriseStandardLibrary.standard.maturityDate'),
align: 'center',
width: 180,
dataIndex: 'maturityDate',
scopedSlots: { customRender: 'text' }
},
{ // 授权部门
title: this.$t('enterpriseStandardLibrary.standard.authorizationDepart'),
align: 'center',
width: 180,
dataIndex: 'authorizationDepart',
scopedSlots: { customRender: 'text' }
},
{ // 授权人员
title: this.$t('enterpriseStandardLibrary.standard.authorizationUser'),
align: 'center',
width: 180,
dataIndex: 'authorizationUser',
scopedSlots: { customRender: 'text' }
},
{ // 授权企标
title: this.$t('enterpriseStandardLibrary.standard.authorizationStandard'),
align: 'center',
width: 180,
dataIndex: 'authorizationStandard',
scopedSlots: { customRender: 'text' }
},
{
title: this.$t('operation'),
scopedSlots: { customRender: 'action' },
align: 'center',
fixed: 'right',
width: 100
}
],
url: {
list: ''
}
}
},
mounted () {
this.getSysCategoryTree()
},
methods: {
open () {
this.visible = true
this.loadData()
},
// 获取组织机构树
getSysCategoryTree () {
queryDepartTreeList().then((res) => {
if (res.success) {
this.categoryTreeList = res.result
} else {
this.categoryTreeList = []
}
})
},
filterTreeOption (input, option) {
const text = option.componentOptions.propsData.title || option.componentOptions.propsData.label
return text.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange (item) {
if (this.queryParam[item] && this.queryParam[item].length > 0) {
const startDate = item + '_start'
const endDate = item + '_end'
this.queryParam[startDate] = this.queryParam[item][0]
this.queryParam[endDate] = this.queryParam[item][1]
} else {
this.queryParam[item] = []
}
},
// 解除授权
handleCancelAuthor (record) {
const params = {}
params.id = record.id
cancelAuthor(params).then(res => {
if (res.success) {
this.$message.success(res.message)
} else {
this.$message.warning(res.message)
}
})
},
handleCancel () {
this.close()
},
close () {
this.visible = false
}
}
}
</script>
<style scoped>
</style>