[update] 修改UAT问题:标准化活动增加删除节点功能
This commit is contained in:
@@ -15,6 +15,8 @@ const queryTreeList = (params) => getAction('/laws/standardization/lawsStandardi
|
||||
const addNode = (params) => postAction('/laws/standardization/lawsStandardization/add', params)
|
||||
// 标准化活动-编辑
|
||||
const editNode = (params) => postAction('/laws/standardization/lawsStandardization/edit', params)
|
||||
// 标准化活动-删除
|
||||
const deleteNode = (params) => postAction('/laws/standardization/lawsStandardization/delete', params)
|
||||
// 标准化活动-通过id查询
|
||||
const queryById = (params) => getAction('/laws/standardization/lawsStandardization/queryById', params)
|
||||
// 标准化活动-通过id查询表格信息
|
||||
@@ -43,6 +45,7 @@ export {
|
||||
queryTreeList,
|
||||
addNode,
|
||||
editNode,
|
||||
deleteNode,
|
||||
queryById,
|
||||
queryTableDataById,
|
||||
queryStatisticalList,
|
||||
|
||||
@@ -31,7 +31,8 @@ module.exports = {
|
||||
addUpToFourLevels: '该节点无法添加子节点',
|
||||
pleaseUploadGroupInfo: '请上传集团参与情况资料',
|
||||
pleaseUploadPaymentInfo: '请上传支付信息资料',
|
||||
pleaseUploadMeeting: '请上传参会记录会议资料'
|
||||
pleaseUploadMeeting: '请上传参会记录会议资料',
|
||||
rootNodeNoDelete: '根节点不可以删除,请重新选择'
|
||||
},
|
||||
// 问答库
|
||||
questionAnswer: {
|
||||
|
||||
@@ -189,6 +189,7 @@ module.exports = {
|
||||
noFileAvailableForPreview: '暂无可预览的文件',
|
||||
enterpriseStandard: '企业标准',
|
||||
pleaseAtLeastSelectOneUser: '请至少选择一个用户',
|
||||
workNo: '工号',
|
||||
// 树右键
|
||||
treeRight: {
|
||||
addFolder: '新增文件夹',
|
||||
|
||||
@@ -17,6 +17,9 @@
|
||||
</a-button>
|
||||
<!--编辑-->
|
||||
<a-button type="primary" ghost icon="edit" @click="handleEdit" v-has="'standardActivity:edit'">{{ $t('edit') }}</a-button>
|
||||
<!--删除-->
|
||||
<!-- v-has="'standardActivity:delete'"-->
|
||||
<a-button type="primary" ghost icon="delete" @click="handleDelete">{{ $t('delete') }}</a-button>
|
||||
<!--查看-->
|
||||
<a-button type="primary" ghost icon="eye" @click="handleDetail" v-has="'standardActivity:view'">{{ $t('view') }}</a-button>
|
||||
<!--会议统计列表-->
|
||||
@@ -80,7 +83,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 +238,27 @@ export default {
|
||||
}
|
||||
this.$refs.modalForm.edit(this.selectedNodeId)
|
||||
},
|
||||
// 删除节点
|
||||
handleDelete () {
|
||||
if (this.selectedNode.level === 0) {
|
||||
this.$message.warning(this.$t('businessSupport.standardizationActivity.rootNodeNoDelete'))
|
||||
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