档案目录管理
This commit is contained in:
parent
e4768977e5
commit
6588115a52
|
|
@ -141,6 +141,7 @@ export default {
|
||||||
this.$refs.ruleForm.clearValidate(['contentName', 'sort']);
|
this.$refs.ruleForm.clearValidate(['contentName', 'sort']);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
this.form.level = selectedNode.level;
|
||||||
this.getMaxSort(selectedNode.id);
|
this.getMaxSort(selectedNode.id);
|
||||||
},
|
},
|
||||||
/** 查找父节点层级 */
|
/** 查找父节点层级 */
|
||||||
|
|
@ -186,7 +187,9 @@ export default {
|
||||||
this.findParentLevel(this.treeDataList, this.form.parentId);
|
this.findParentLevel(this.treeDataList, this.form.parentId);
|
||||||
}
|
}
|
||||||
|
|
||||||
await this.getMaxSort(value);
|
if(value){
|
||||||
|
await this.getMaxSort(value);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
// 树数据过滤 - 支持无限层级转换,去除层级为3的数据
|
// 树数据过滤 - 支持无限层级转换,去除层级为3的数据
|
||||||
convertToVueTree(data) {
|
convertToVueTree(data) {
|
||||||
|
|
@ -270,6 +273,7 @@ export default {
|
||||||
target: this.$el.querySelector('.el-dialog') || document.body
|
target: this.$el.querySelector('.el-dialog') || document.body
|
||||||
})
|
})
|
||||||
let params = _.cloneDeep(this.form);
|
let params = _.cloneDeep(this.form);
|
||||||
|
|
||||||
if (this.isAdd === 'add') {
|
if (this.isAdd === 'add') {
|
||||||
addArchiveLeftApi(params).then(res => {
|
addArchiveLeftApi(params).then(res => {
|
||||||
this.loading.close();
|
this.loading.close();
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getArchivalCatalogueTreeApi } from '@/api/archivesManagement/index.js'
|
import { getArchivalCatalogueTreeApi,delArchiveApi } from '@/api/archivesManagement/index.js'
|
||||||
import AddTreeData from './addTreeData.vue'
|
import AddTreeData from './addTreeData.vue'
|
||||||
export default {
|
export default {
|
||||||
name: 'LeftTree',
|
name: 'LeftTree',
|
||||||
|
|
@ -67,6 +67,7 @@ export default {
|
||||||
isAdd: '',
|
isAdd: '',
|
||||||
row: {},
|
row: {},
|
||||||
selectedNodeId: null, // 保存当前选中的节点ID
|
selectedNodeId: null, // 保存当前选中的节点ID
|
||||||
|
delArchiveApi
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
@ -120,6 +121,29 @@ export default {
|
||||||
this.row = data;
|
this.row = data;
|
||||||
this.isflag = true;
|
this.isflag = true;
|
||||||
},
|
},
|
||||||
|
/* 删除树节点 */
|
||||||
|
delTree(row, data){
|
||||||
|
this.$modal.confirm(`是否确认删除节点名称为"${row.label}"的数据项?`).then(() => {
|
||||||
|
// 显示加载遮罩
|
||||||
|
this.$modal.loading("正在删除,请稍候...");
|
||||||
|
delArchiveApi({ id: data.id }).then(res => {
|
||||||
|
this.$modal.closeLoading();
|
||||||
|
if (res.code === 200) {
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
this.handleQuery();
|
||||||
|
} else {
|
||||||
|
this.$modal.msgError(res.msg);
|
||||||
|
}
|
||||||
|
}).catch(error => {
|
||||||
|
this.$modal.closeLoading();
|
||||||
|
this.$modal.msgError("删除失败,请重试");
|
||||||
|
console.error('删除失败:', error);
|
||||||
|
});
|
||||||
|
}).catch(() => {
|
||||||
|
// 用户取消删除,不需要处理
|
||||||
|
});
|
||||||
|
|
||||||
|
},
|
||||||
// 节点点击事件
|
// 节点点击事件
|
||||||
onHandleNodeClick(data) {
|
onHandleNodeClick(data) {
|
||||||
// 保存选中的节点ID
|
// 保存选中的节点ID
|
||||||
|
|
|
||||||
|
|
@ -98,7 +98,7 @@ export default {
|
||||||
this.title = "修改";
|
this.title = "修改";
|
||||||
this.isAdd = 'edit';
|
this.isAdd = 'edit';
|
||||||
this.row = row;
|
this.row = row;
|
||||||
this.row.belongName = this.selectedNode.label + '/' + this.selectedNode.parentName
|
this.row.belongName = this.selectedNode.parentName + '/' + this.selectedNode.label
|
||||||
this.row.detailStatus = false;
|
this.row.detailStatus = false;
|
||||||
this.isflag = true;
|
this.isflag = true;
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue