update 文档拆分-编辑-导出

This commit is contained in:
赵霄
2023-10-23 15:18:28 +08:00
parent 1381576d5e
commit 07f4f9def6
3 changed files with 18 additions and 24 deletions
@@ -596,6 +596,10 @@ export default {
font-weight: 400;
color: #040B29;
margin-top: 10px;
/deep/ table {
width: 100%;
}
}
.detail-content-bottom {
@@ -187,7 +187,7 @@ export default {
clickEvent: 'subscribe',
has: 'documentComparison:publishWithdraw',
show: (record) => {
return (record.createBy === this.userInfo.id || this.administrators) && (!record.releaseState || record.releaseState === 'draft')
return (record.createBy === this.userInfo.username || this.administrators) && (!record.releaseState || record.releaseState === 'draft')
}
},
// 撤回
@@ -196,7 +196,8 @@ export default {
clickEvent: 'subscribe',
has: 'documentComparison:publishWithdraw',
show: (record) => {
return (record.createBy === this.userInfo.id || this.administrators) && !(!record.releaseState || record.releaseState === 'draft')
console.log(this.administrators)
return (record.createBy === this.userInfo.username || this.administrators) && !(!record.releaseState || record.releaseState === 'draft')
}
},
// 编辑
@@ -205,8 +206,7 @@ export default {
clickEvent: 'edit',
has: 'documentComparison:edit',
show: (record) => {
// return (record.createBy === this.userInfo.id || this.administrators) && record.releaseState === 'draft'
return true
return (record.createBy === this.userInfo.username || this.administrators) && (!record.releaseState || record.releaseState === 'draft')
}
},
// 删除
@@ -215,7 +215,7 @@ export default {
clickEvent: 'handleDelete',
has: 'documentComparison:delete',
show: (record) => {
return (record.createBy === this.userInfo.username || this.administrators) && record.releaseState === 'draft'
return (record.createBy === this.userInfo.username || this.administrators) && (!record.releaseState || record.releaseState === 'draft')
}
}
]
@@ -224,15 +224,8 @@ export default {
computed: {
...mapGetters(['userInfo']),
administrators () {
let flag = false
if (this.userInfo.userRoleList && this.userInfo.userRoleList.length > 0) {
this.userInfo.userRoleList.forEach(res => {
if (res.roleCode === 'admin') {
flag = true
}
})
}
return flag
const userRoleList = this.userInfo.roleCode.split(',')
return userRoleList.some(tt => tt === 'admin')
}
},
created () {
@@ -89,7 +89,7 @@
type="primary"
ghost
v-has="'split:sarFileSplitItems:export'"
@click="handleExportXls($t('standardRegulationLibrary.domesticStandard.exportFileName'), '.zip')">
@click="handleExportXls">
{{ $t('export') }}
</a-button>
<!--批量删除-->
@@ -567,19 +567,16 @@ export default {
},
/**
* 导出
* @param fileName
* @param fileSuffix
*/
handleExportXls (fileName, fileSuffix = '.xls') {
if (!fileName || typeof fileName !== 'string') {
fileName = '导出文件'
}
const param = this.getQueryParams()
handleExportXls () {
const fileName = this.$route.query.infoNumber + ' ' + this.$route.query.standardName
const fileSuffix = '.zip'
const param = {}
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
param.idList = this.selectedRowKeys.join(',')
}
param.parameter = this.getQueryParams()
param.exportName = fileName + fileSuffix
param.parameter = this.infoId
// 加一个大的提示
const modalLoading = this.$info({
title: this.$t('tips'),
@@ -613,7 +610,7 @@ export default {
// 销毁这个提示
modalLoading.destroy()
})
},
}
}
}
</script>