[update] 解决禅道上一部分企标bug
This commit is contained in:
@@ -180,7 +180,7 @@ import TreeNodeModal from './modules/TreeNodeModal'
|
||||
import UserSelectModal from '../../../components/selection/UserSelectModal'
|
||||
// 配置标准弹框
|
||||
import AllocationStandardDrawer from './modules/AllocationStandardDrawer'
|
||||
import { postDownFile, downloadFile } from '@/api/manage'
|
||||
import { postDownFile, downloadFile, postAction } from '@/api/manage'
|
||||
|
||||
export default {
|
||||
name: 'EnterpriseStandardList',
|
||||
@@ -418,11 +418,48 @@ export default {
|
||||
}
|
||||
downloadFile(this.url.downTemplateUrl, fileName + '.zip')
|
||||
},
|
||||
/**
|
||||
* 批量删除
|
||||
*/
|
||||
batchDel () {
|
||||
if (this.selectedRowKeys.length <= 0) {
|
||||
this.$message.warning(this.$t('selectARecord'))
|
||||
return
|
||||
}
|
||||
console.log(this.selectionRows)
|
||||
if (this.selectionRows.find(item => !item.detailFlag)) {
|
||||
// 有没有查看权限的数据
|
||||
this.$message.warning(this.$t('enterpriseStandardLibrary.standard.disabledBatchDel'))
|
||||
return
|
||||
}
|
||||
const ids = this.selectedRowKeys.join(',')
|
||||
this.$confirm({
|
||||
title: this.$t('confirmBatchDeletion'),
|
||||
content: this.$t('deleteAData'),
|
||||
onOk: () => {
|
||||
this.loading = true
|
||||
postAction(this.url.deleteBatch, { ids: ids }).then((res) => {
|
||||
if (res.success) {
|
||||
// 重新计算分页问题
|
||||
this.reCalculatePage(this.selectedRowKeys.length)
|
||||
this.$message.success(res.message)
|
||||
this.loadData()
|
||||
this.onClearSelected()
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 配置标准
|
||||
handleAllocationStandard () {
|
||||
console.log(this.currentTreeNode)
|
||||
// 没选择左侧树节点,需要提示“请先选择二级及以下体系”
|
||||
if (!this.currentTreeNode || this.currentTreeNode.length === 0 || this.currentTreeNode.includes('myCollect')) {
|
||||
if (!this.currentTreeNode || this.currentTreeNode.length === 0 ||
|
||||
this.currentTreeNode.includes('myCollect') || this.currentTreeNode.includes('adb15f66ce174f7295ab51fbc39c15b8')) {
|
||||
this.$message.warn(this.$t('enterpriseStandardLibrary.standard.pleaseSelectLeastOneNode'))
|
||||
return
|
||||
}
|
||||
@@ -431,7 +468,8 @@ export default {
|
||||
// 移出标准
|
||||
handleShiftOutStandard () {
|
||||
// 没选择左侧树节点,需要提示“请先选择左侧体系”
|
||||
if (!this.currentTreeNode || this.currentTreeNode.length === 0) {
|
||||
if (!this.currentTreeNode || this.currentTreeNode.length === 0 ||
|
||||
this.currentTreeNode.includes('myCollect') || this.currentTreeNode.includes('adb15f66ce174f7295ab51fbc39c15b8')) {
|
||||
this.$message.warn(this.$t('enterpriseStandardLibrary.standard.pleaseSelectLeastOneNode'))
|
||||
return
|
||||
}
|
||||
@@ -442,7 +480,7 @@ export default {
|
||||
}
|
||||
// 没有选择列表数据,需要提示“选中至少一条列表数据”
|
||||
if (!this.selectedRowKeys || this.selectedRowKeys.length === 0) {
|
||||
this.$message.warning(this.$t('selectLeastOne'))
|
||||
this.$message.warning(this.$t('selectAtLeastOne'))
|
||||
return
|
||||
}
|
||||
this.loading = true
|
||||
|
||||
Reference in New Issue
Block a user