[update] 企标临时权限记录联调

This commit is contained in:
lideqin
2023-12-12 19:34:20 +08:00
parent 459594ec9b
commit b354af64f6
4 changed files with 72 additions and 31 deletions
+1 -1
View File
@@ -33,7 +33,7 @@ const isCanLookDetail = (params) => getAction('/laws/standard/enterprise/detailP
// 企标级别映射列表获取
const getStandardGradeClassification = (params) => getAction('/sys/lawsGrade/list', params)
// 解除授权
const cancelAuthor = (params) => getAction('', params)
const cancelAuthor = (params) => getAction('/laws/standard/enterprise/revokeAuth', params)
// 企标详情-获取更新记录
const detailGetUpdateRecord = (params) => getAction('/laws/standard/enterprise/getUpdateRecordList', params)
@@ -6,6 +6,7 @@ module.exports = {
shiftOutStandard: 'Shift Out Standard',
initChange: 'Initiate Changes',
temporaryPermissionSet: 'Temporary Permission Setting',
temporaryPermissionRecord: '临时权限记录',
collection: 'Collect',
cancelCollection: 'Cancel Collection',
exportExcelFile: 'Enterprise Standard Table',
@@ -33,7 +34,8 @@ module.exports = {
authorizationExpirationDate: '授权到期日期',
cancelAuthor: '解除授权',
authorizationDate: '授权日期',
authorizationStandard: '授权企标'
authorizationStandard: '授权企标',
confirmCancelAuthor: '确认解除授权?'
},
// 评审会记录
reviewMeeting: {
@@ -34,7 +34,8 @@ module.exports = {
authorizationExpirationDate: '授权到期日期',
cancelAuthor: '解除授权',
authorizationDate: '授权日期',
authorizationStandard: '授权企标'
authorizationStandard: '授权企标',
confirmCancelAuthor: '确认解除授权?'
},
// 评审会记录
reviewMeeting: {
@@ -2,7 +2,7 @@
<j-modal
:title="title"
:maskClosable="true"
:width="1000"
:width="1200"
:closable="true"
switchFullscreen
:footer="false"
@@ -15,10 +15,10 @@
<a-col :sm="8">
<!-- 企标编号 -->
<a-form-item :label="$t('enterpriseStandardLibrary.reviewMeeting.enterpriseStandardNum')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-input
<a-input
:placeholder="$t('pleaseEnter') + $t('enterpriseStandardLibrary.reviewMeeting.enterpriseStandardNum')"
v-model="queryParam.standardNumber">
</j-input>
</a-input>
</a-form-item>
</a-col>
<!-- 授权到期日期 -->
@@ -26,7 +26,7 @@
<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>
@change="onChange"></a-range-picker>
</a-form-item>
</a-col>
<a-col :sm="8">
@@ -52,10 +52,10 @@
<a-col :sm="8">
<!-- 授权人员 -->
<a-form-item :label="$t('enterpriseStandardLibrary.standard.authorizationUser')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-input
<a-input
:placeholder="$t('pleaseEnter') + $t('enterpriseStandardLibrary.standard.authorizationUser')"
v-model="queryParam.authorizationUser">
</j-input>
v-model="queryParam.authUser">
</a-input>
</a-form-item>
</a-col>
<div style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
@@ -74,7 +74,7 @@
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:scroll="{x: '100%'}"
:scroll="{x: '100%', y: 'calc(100vh - 500px)'}"
@change="handleTableChange">
<template v-slot:action="{text, record}">
@@ -91,6 +91,7 @@ import { JeroListMixin } from '@/mixins/JeroListMixin'
import { cancelAuthor } from '@/api/enterpriseStandardLibraryApi'
import { queryDepartTreeList } from '@/api/api'
import JTable from '@/components/jero/JTable'
import { getAction } from '../../../../api/manage'
export default {
name: 'TemporaryPermissionRecord',
@@ -123,35 +124,35 @@ export default {
title: this.$t('enterpriseStandardLibrary.standard.authorizationDate'),
align: 'center',
width: 180,
dataIndex: 'authorizationDate',
dataIndex: 'createTime',
scopedSlots: { customRender: 'text' }
},
{ // 授权到期日期
title: this.$t('enterpriseStandardLibrary.standard.maturityDate'),
align: 'center',
width: 180,
dataIndex: 'maturityDate',
dataIndex: 'authExpireDate',
scopedSlots: { customRender: 'text' }
},
{ // 授权部门
title: this.$t('enterpriseStandardLibrary.standard.authorizationDepart'),
align: 'center',
width: 180,
dataIndex: 'authorizationDepart',
dataIndex: 'authDept_dictText',
scopedSlots: { customRender: 'text' }
},
{ // 授权人员
title: this.$t('enterpriseStandardLibrary.standard.authorizationUser'),
align: 'center',
width: 180,
dataIndex: 'authorizationUser',
dataIndex: 'authUser_dictText',
scopedSlots: { customRender: 'text' }
},
{ // 授权企标
title: this.$t('enterpriseStandardLibrary.standard.authorizationStandard'),
align: 'center',
width: 180,
dataIndex: 'authorizationStandard',
dataIndex: 'standardNumber',
scopedSlots: { customRender: 'text' }
},
{
@@ -163,7 +164,7 @@ export default {
}
],
url: {
list: ''
list: '/laws/standard/enterprise/tempAuthRecord'
}
}
},
@@ -185,29 +186,65 @@ export default {
}
})
},
loadData (arg) {
if (!this.url.list) {
this.$message.warning('请设置url.list属性!')
return
}
// 加载数据 若传入参数1则加载第一页的内容
if (arg === 1) {
this.ipagination.current = 1
}
const params = this.getQueryParams()// 查询条件
if (params.authorizationDepart && params.authorizationDepart.length > 0) {
params.authDept = params.authorizationDepart.map(item => item.value).join(',')
}
this.loading = true
getAction(this.url.list, params).then((res) => {
if (res.success) {
// update-begin---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
this.dataSource = res.result.records || res.result
if (res.result.total) {
this.ipagination.total = res.result.total
} else {
this.ipagination.total = 0
}
// update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.loading = false
})
},
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]
onChange () {
if (this.queryParam.authorizationExpirationDate && this.queryParam.authorizationExpirationDate.length > 0) {
this.queryParam.startAuthExpireDate = this.queryParam.authorizationExpirationDate[0]
this.queryParam.endAuthExpireDate = this.queryParam.authorizationExpirationDate[1]
} else {
this.queryParam[item] = []
this.queryParam.authorizationExpirationDate = []
}
},
// 解除授权
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)
this.$confirm({
title: this.$t('enterpriseStandardLibrary.standard.cancelAuthor'),
content: this.$t('enterpriseStandardLibrary.standard.confirmCancelAuthor'),
onOk: () => {
const params = {}
params.id = record.id
cancelAuthor(params).then(res => {
if (res.success) {
this.$message.success(res.message)
this.loadData()
} else {
this.$message.warning(res.message)
}
})
}
})
},
@@ -215,6 +252,7 @@ export default {
this.close()
},
close () {
this.queryParam = {}
this.visible = false
}
}