档案管理

This commit is contained in:
cwchen 2025-09-17 10:02:31 +08:00
parent a2e9d6ab20
commit a7ec726fec
6 changed files with 22 additions and 10 deletions

View File

@ -53,7 +53,7 @@ import {
import {getClassifyMarkSelApi} from '@/api/select.js' import {getClassifyMarkSelApi} from '@/api/select.js'
export default { export default {
name: "FileAddTableData", name: "FileAddTableData",
props: ["width", "dataForm", "title", "disabled", "isAdd", "rowData"], props: ["width", "dataForm", "title", "disabled", "isAdd", "rowData","projectId"],
dicts: ['mark_code'], dicts: ['mark_code'],
data() { data() {
return { return {

View File

@ -34,10 +34,12 @@ import _ from 'lodash'
import Treeselect from "@riophae/vue-treeselect"; import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css"; import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import { getFileManageTreeByAddOrUpdateApi, addFileManageLeftApi, updateFileManageLeftApi,geMaxSortApi } from '@/api/archivesManagement/fileManager/fileManager.js' import { getFileManageTreeByAddOrUpdateApi, addFileManageLeftApi, updateFileManageLeftApi,geMaxSortApi } from '@/api/archivesManagement/fileManager/fileManager.js'
import { Alert } from 'element-ui';
export default { export default {
name: "FileAddTreeData", name: "FileAddTreeData",
props: ["width", "dataForm", "title", "disabled", "isAdd", "rowData"], props: ["width", "dataForm", "title", "disabled", "isAdd", "rowData"],
components: { Treeselect }, components: { Treeselect },
props: ["projectId"],
data() { data() {
return { return {
lDialog: this.width > 500 ? "w700" : "w500", lDialog: this.width > 500 ? "w700" : "w500",
@ -158,6 +160,7 @@ export default {
}, },
/** 初始化表单数据 */ /** 初始化表单数据 */
async initFormData() { async initFormData() {
let value = 0; let value = 0;
let treeId = this.isAdd === 'edit' && this.rowData ? this.rowData.id : null; let treeId = this.isAdd === 'edit' && this.rowData ? this.rowData.id : null;
await this.getLeftTreeList(treeId); await this.getLeftTreeList(treeId);
@ -168,7 +171,8 @@ export default {
parentId: this.rowData.parentId || 0, parentId: this.rowData.parentId || 0,
contentName: this.rowData.label || null, contentName: this.rowData.label || null,
sort: this.rowData.sort || 0, sort: this.rowData.sort || 0,
level:this.rowData.level level:this.rowData.level,
proId:this.projectId
}; };
value = this.rowData.parentId; value = this.rowData.parentId;
} else { } else {
@ -177,7 +181,8 @@ export default {
parentId: this.rowData.id, parentId: this.rowData.id,
contentName: null, contentName: null,
sort: 0, sort: 0,
level:this.rowData.level level:this.rowData.level,
proId:this.projectId
}; };
value = this.rowData.id; value = this.rowData.id;
} }
@ -225,7 +230,7 @@ export default {
}, },
// //
async getLeftTreeList(value) { async getLeftTreeList(value) {
const res = await getFileManageTreeByAddOrUpdateApi({id:value}) const res = await getFileManageTreeByAddOrUpdateApi({id:value,proId:this.projectId})
const transformedData = this.convertToVueTree(res.data) const transformedData = this.convertToVueTree(res.data)
this.treeDataList = transformedData; this.treeDataList = transformedData;
}, },

View File

@ -17,9 +17,9 @@ export const formLabel = [
export const columnsList = [ export const columnsList = [
{ t_props: 'contentName', t_label: '档案名称',t_width:200 }, { t_props: 'contentName', t_label: '档案名称',t_width:200 },
{ t_props: 'fileName', t_label: '档案文件' }, { t_props: 'fileName', t_label: '档案文件' },
{ t_props: 'markCode', t_label: '上传人' }, { t_props: 'createUserName', t_label: '上传人' },
{ t_props: 'unitName', t_label: '保管期限' }, { t_props: 'term', t_label: '保管期限' },
{ t_slot: 'dataSource', t_label: '来源' }, { t_slot: 'dataSource', t_label: '来源' },
{ t_props: 'unitName', t_label: '责任单位' }, { t_props: 'unitName', t_label: '责任单位' },
{ t_props: 'classifyMark', t_label: '上传时间' } { t_props: 'createTime', t_label: '上传时间' }
] ]

View File

@ -48,7 +48,7 @@
</el-card> </el-card>
<!-- 树的操作新增修改 --> <!-- 树的操作新增修改 -->
<AddTreeData v-if="isflag" :isAdd="isAdd" :rowData="row" :title="title" @closeDialog="closeDialog" <AddTreeData v-if="isflag" :isAdd="isAdd" :rowData="row" :title="title" @closeDialog="closeDialog"
@showColose="showColose" :dataForm="row" :width="600" /> @showColose="showColose" :dataForm="row" :width="600" :projectId="projectId" />
</div> </div>
</template> </template>

View File

@ -4,6 +4,9 @@
<el-card style="min-height: calc(100vh - 190px);"> <el-card style="min-height: calc(100vh - 190px);">
<TableModel :formLabel="formLabel" :showOperation="true" :showRightTools="true" ref="tableRef" <TableModel :formLabel="formLabel" :showOperation="true" :showRightTools="true" ref="tableRef"
:columnsList="columnsList" :request-api="getFileManageApi" :send-params="defaultParams"> :columnsList="columnsList" :request-api="getFileManageApi" :send-params="defaultParams">
<template slot="dataSource" slot-scope="{ data }">
<span>{{ data.dataSource === '1' ? '本系统上传' : '智慧现场' }}</span>
</template>
<template slot="btn"> <template slot="btn">
<el-button plain size="mini" type="primary" icon="el-icon-plus" v-hasPermi="['file:manage:add']" <el-button plain size="mini" type="primary" icon="el-icon-plus" v-hasPermi="['file:manage:add']"
@click="handleAdd" :disabled="addBtnIsShow"> @click="handleAdd" :disabled="addBtnIsShow">
@ -28,7 +31,7 @@
</TableModel> </TableModel>
<!-- 新增/编辑 --> <!-- 新增/编辑 -->
<AddTableData v-if="isflag" :isAdd="isAdd" :rowData="row" @handleQuery="handleQuery" :title="title" <AddTableData v-if="isflag" :isAdd="isAdd" :rowData="row" @handleQuery="handleQuery" :title="title"
@closeDialog="closeDialog" @showColose="showColose" :dataForm="row" :width="600" /> @closeDialog="closeDialog" @showColose="showColose" :dataForm="row" :width="600" :projectId="projectId" />
</el-card> </el-card>
</div> </div>
</template> </template>
@ -46,6 +49,10 @@ import AddTableData from './addTableData'
export default { export default {
name: 'FileRightTable', name: 'FileRightTable',
props:{ props:{
projectId:{
type:String,
default:''
},
selectedNode:{ selectedNode:{
type:Object, type:Object,
default:null default:null

View File

@ -15,7 +15,7 @@
<LeftTree @handleNodeClick="handleNodeClick" :projectId="projectId" /> <LeftTree @handleNodeClick="handleNodeClick" :projectId="projectId" />
</el-col> </el-col>
<el-col :span="15" class="pane-right"> <el-col :span="15" class="pane-right">
<RightTable :selectedNode = "selectedNode" /> <RightTable :selectedNode = "selectedNode" :projectId="projectId"/>
</el-col> </el-col>
</el-row> </el-row>
</div> </div>