[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
|
||||
|
||||
@@ -194,7 +194,7 @@ export default {
|
||||
})
|
||||
this.visible = false
|
||||
} else {
|
||||
this.$message.warning(this.$t('selectLeastOne'))
|
||||
this.$message.warning(this.$t('pleaseSelectOneStandard'))
|
||||
}
|
||||
},
|
||||
/**
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
<a-spin :spinning="confirmLoading" style="width: 100%;height:100%">
|
||||
<add-form ref="addForm"
|
||||
flag="3"
|
||||
:defaultValue="{year_number: new Date().getFullYear() + ''}"
|
||||
:disabledFieldList="['standard_number', 'replaced_standard_num', 'referenced_standard']"
|
||||
:defaultValue="{year_number: new Date().getFullYear() + '', trial_period: '24'}"
|
||||
:disabledFieldList="['standard_number', 'replaced_by_standard_number', 'referenced_standard']"
|
||||
:hiddenFieldList="hiddenFieldList"
|
||||
:get-form-func="getFormFunc"
|
||||
:get-document-info-func="getDocumentInfoFunc"
|
||||
@@ -98,11 +98,21 @@ export default {
|
||||
dataIndex: 'requirement',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 整改部门
|
||||
title: this.$t('enterpriseStandardLibrary.standard.rectificationDepartment'),
|
||||
align: 'center',
|
||||
width: 200,
|
||||
dataIndex: 'rectificationDepartment',
|
||||
customRender: (value, row, index) => {
|
||||
return <j-select-depart v-model={this.dataSource[index].rectificationDepartment}
|
||||
backDepart={true} />
|
||||
}
|
||||
},
|
||||
{
|
||||
title: this.$t('operation'),
|
||||
scopedSlots: { customRender: 'action' },
|
||||
align: 'center',
|
||||
width: 200
|
||||
width: 150
|
||||
}
|
||||
],
|
||||
dataSource: [],
|
||||
|
||||
Reference in New Issue
Block a user