update 文档拆分-编辑-导出
This commit is contained in:
@@ -596,6 +596,10 @@ export default {
|
|||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #040B29;
|
color: #040B29;
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
|
|
||||||
|
/deep/ table {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.detail-content-bottom {
|
.detail-content-bottom {
|
||||||
|
|||||||
@@ -187,7 +187,7 @@ export default {
|
|||||||
clickEvent: 'subscribe',
|
clickEvent: 'subscribe',
|
||||||
has: 'documentComparison:publishWithdraw',
|
has: 'documentComparison:publishWithdraw',
|
||||||
show: (record) => {
|
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',
|
clickEvent: 'subscribe',
|
||||||
has: 'documentComparison:publishWithdraw',
|
has: 'documentComparison:publishWithdraw',
|
||||||
show: (record) => {
|
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',
|
clickEvent: 'edit',
|
||||||
has: 'documentComparison:edit',
|
has: 'documentComparison:edit',
|
||||||
show: (record) => {
|
show: (record) => {
|
||||||
// return (record.createBy === this.userInfo.id || this.administrators) && record.releaseState === 'draft'
|
return (record.createBy === this.userInfo.username || this.administrators) && (!record.releaseState || record.releaseState === 'draft')
|
||||||
return true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 删除
|
// 删除
|
||||||
@@ -215,7 +215,7 @@ export default {
|
|||||||
clickEvent: 'handleDelete',
|
clickEvent: 'handleDelete',
|
||||||
has: 'documentComparison:delete',
|
has: 'documentComparison:delete',
|
||||||
show: (record) => {
|
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: {
|
computed: {
|
||||||
...mapGetters(['userInfo']),
|
...mapGetters(['userInfo']),
|
||||||
administrators () {
|
administrators () {
|
||||||
let flag = false
|
const userRoleList = this.userInfo.roleCode.split(',')
|
||||||
if (this.userInfo.userRoleList && this.userInfo.userRoleList.length > 0) {
|
return userRoleList.some(tt => tt === 'admin')
|
||||||
this.userInfo.userRoleList.forEach(res => {
|
|
||||||
if (res.roleCode === 'admin') {
|
|
||||||
flag = true
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
return flag
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
|
|||||||
@@ -89,7 +89,7 @@
|
|||||||
type="primary"
|
type="primary"
|
||||||
ghost
|
ghost
|
||||||
v-has="'split:sarFileSplitItems:export'"
|
v-has="'split:sarFileSplitItems:export'"
|
||||||
@click="handleExportXls($t('standardRegulationLibrary.domesticStandard.exportFileName'), '.zip')">
|
@click="handleExportXls">
|
||||||
{{ $t('export') }}
|
{{ $t('export') }}
|
||||||
</a-button>
|
</a-button>
|
||||||
<!--批量删除-->
|
<!--批量删除-->
|
||||||
@@ -567,19 +567,16 @@ export default {
|
|||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 导出
|
* 导出
|
||||||
* @param fileName
|
|
||||||
* @param fileSuffix
|
|
||||||
*/
|
*/
|
||||||
handleExportXls (fileName, fileSuffix = '.xls') {
|
handleExportXls () {
|
||||||
if (!fileName || typeof fileName !== 'string') {
|
const fileName = this.$route.query.infoNumber + ' ' + this.$route.query.standardName
|
||||||
fileName = '导出文件'
|
const fileSuffix = '.zip'
|
||||||
}
|
const param = {}
|
||||||
const param = this.getQueryParams()
|
|
||||||
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
||||||
param.idList = this.selectedRowKeys.join(',')
|
param.idList = this.selectedRowKeys.join(',')
|
||||||
}
|
}
|
||||||
|
param.parameter = this.getQueryParams()
|
||||||
param.exportName = fileName + fileSuffix
|
param.exportName = fileName + fileSuffix
|
||||||
param.parameter = this.infoId
|
|
||||||
// 加一个大的提示
|
// 加一个大的提示
|
||||||
const modalLoading = this.$info({
|
const modalLoading = this.$info({
|
||||||
title: this.$t('tips'),
|
title: this.$t('tips'),
|
||||||
@@ -613,7 +610,7 @@ export default {
|
|||||||
// 销毁这个提示
|
// 销毁这个提示
|
||||||
modalLoading.destroy()
|
modalLoading.destroy()
|
||||||
})
|
})
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user