Merge remote-tracking branch 'origin/fourthStage-UAT2024-09-20' into fourthStage
This commit is contained in:
@@ -17,6 +17,8 @@
|
||||
</a-button>
|
||||
<!--编辑-->
|
||||
<a-button type="primary" ghost icon="edit" @click="handleEdit" v-has="'standardActivity:edit'">{{ $t('edit') }}</a-button>
|
||||
<!--删除-->
|
||||
<a-button type="primary" ghost icon="delete" @click="handleDelete" v-has="'standardActivity:delete'">{{ $t('delete') }}</a-button>
|
||||
<!--查看-->
|
||||
<a-button type="primary" ghost icon="eye" @click="handleDetail" v-has="'standardActivity:view'">{{ $t('view') }}</a-button>
|
||||
<!--会议统计列表-->
|
||||
@@ -80,7 +82,7 @@
|
||||
<script>
|
||||
import MindMap from '../../../components/MindMap.vue'
|
||||
import InternalDetailPage from '../../../components/InternalDetailPage'
|
||||
import { queryTreeList } from '../../../api/businessSupport'
|
||||
import { deleteNode, queryTreeList } from '../../../api/businessSupport'
|
||||
import StandardizationActivityDrawer from './modules/StandardizationActivityDrawer'
|
||||
import StatisticalListDrawer from './modules/StatisticalListDrawer'
|
||||
|
||||
@@ -235,6 +237,32 @@ export default {
|
||||
}
|
||||
this.$refs.modalForm.edit(this.selectedNodeId)
|
||||
},
|
||||
// 删除节点
|
||||
handleDelete () {
|
||||
console.log('--------this.selectedNode', this.selectedNode)
|
||||
if (this.selectedNode.level === 0) {
|
||||
this.$message.warning(this.$t('businessSupport.standardizationActivity.rootNodeNoDelete'))
|
||||
return
|
||||
}
|
||||
if (this.selectedNode.children && this.selectedNode.children.length > 0) {
|
||||
this.$message.warning(this.$t('businessSupport.standardizationActivity.onlyDeleteLeaf'))
|
||||
return
|
||||
}
|
||||
this.$confirm({
|
||||
title: this.$t('confirmDeletion'),
|
||||
content: this.$t('areYouSure'),
|
||||
onOk: () => {
|
||||
deleteNode({ id: this.selectedNodeId }).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
this.loadData()
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
handleDetail () {
|
||||
// 需要先选中一个节点
|
||||
if (!this.selectedNodeId) {
|
||||
|
||||
Reference in New Issue
Block a user