档案目录修改
This commit is contained in:
parent
4567285ff0
commit
42f50af80c
|
|
@ -159,6 +159,7 @@ export default {
|
|||
/** 初始化表单数据 */
|
||||
async initFormData() {
|
||||
let value = 0;
|
||||
let treeId = null;
|
||||
if (this.isAdd === 'edit' && this.rowData) {
|
||||
// 编辑模式:填充表单数据
|
||||
this.form = {
|
||||
|
|
@ -169,7 +170,7 @@ export default {
|
|||
level:this.rowData.level
|
||||
};
|
||||
value = this.rowData.parentId;
|
||||
|
||||
treeId = this.rowData.id;
|
||||
} else {
|
||||
// 新增模式:重置表单
|
||||
this.form = {
|
||||
|
|
@ -180,7 +181,7 @@ export default {
|
|||
};
|
||||
value = this.rowData.id;
|
||||
}
|
||||
await this.getLeftTreeList();
|
||||
await this.getLeftTreeList(treeId);
|
||||
|
||||
// 如果是编辑模式,需要根据父节点ID找到对应的层级
|
||||
if (this.isAdd === 'edit' && this.form.parentId) {
|
||||
|
|
@ -224,8 +225,8 @@ export default {
|
|||
}).filter(node => node !== null); // 过滤掉null值
|
||||
},
|
||||
// 获取左侧树列表
|
||||
async getLeftTreeList() {
|
||||
const res = await getArchivalCatalogueTreeApi()
|
||||
async getLeftTreeList(value) {
|
||||
const res = await getArchivalCatalogueTreeApi({id:value})
|
||||
const transformedData = this.convertToVueTree(res.data)
|
||||
this.treeDataList = transformedData;
|
||||
},
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
<el-select class="form-item" v-model="form.fileRelated" filterable clearable
|
||||
placeholder="请选择档案相关类型">
|
||||
<el-option v-for="item in dict.type.file_related_type" :key="item.value" :label="item.label"
|
||||
:value="item.label"></el-option>
|
||||
:value="item.value"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="分类名称" prop="classifyName">
|
||||
|
|
@ -139,6 +139,7 @@ export default {
|
|||
target: this.$el.querySelector('.el-dialog') || document.body
|
||||
})
|
||||
let params = _.cloneDeep(this.form);
|
||||
|
||||
if (this.isAdd === 'add') {
|
||||
addKyFilesMultiClassifyAPI(params).then(res => {
|
||||
this.loading.close();
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
</template>
|
||||
<template slot="handle" slot-scope="{ data }">
|
||||
<el-button plain size="mini" type="primary" icon="el-icon-document" v-hasPermi="['data:classify:update']"
|
||||
@click="handleUpdate(data)">
|
||||
@click="openFileManager(data)">
|
||||
档案管理
|
||||
</el-button>
|
||||
</template>
|
||||
|
|
@ -77,6 +77,15 @@ export default {
|
|||
handleQuery() {
|
||||
this.$refs.proTableRef.getTableList()
|
||||
},
|
||||
/* 打开档案管理 */
|
||||
/* openFileManager(row) {
|
||||
this.$router.push({
|
||||
path: '/archivesManagement/fileManager/components/index',
|
||||
query: {
|
||||
id: row.id
|
||||
}
|
||||
})
|
||||
} */
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Reference in New Issue