档案管理
This commit is contained in:
parent
5f7e2ad5dd
commit
a2e9d6ab20
|
|
@ -20,10 +20,19 @@ export function getFileManageTreeApi(params) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 新增档案目录
|
// 获取档案目录树(新增/编辑)
|
||||||
export function addArchiveLeftApi(data) {
|
export function getFileManageTreeByAddOrUpdateApi(params) {
|
||||||
return request({
|
return request({
|
||||||
url: '/smartArchives/fileManage/addLeft',
|
url: '/smartArchives/fileManage/getFileManageTreeByAddOrUpdate',
|
||||||
|
method: 'get',
|
||||||
|
params:params,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增档案目录
|
||||||
|
export function addFileManageLeftApi(data) {
|
||||||
|
return request({
|
||||||
|
url: '/smartArchives/fileManage/addFileManageLeft',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data:data
|
data:data
|
||||||
})
|
})
|
||||||
|
|
@ -39,9 +48,9 @@ export function addArchiveRightApi(data) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 修改档案目录
|
// 修改档案目录
|
||||||
export function editArchiveLeftApi(data) {
|
export function updateFileManageLeftApi(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/smartArchives/fileManage/editLeft',
|
url: '/smartArchives/fileManage/updateFileManageLeft',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data:data,
|
data:data,
|
||||||
})
|
})
|
||||||
|
|
@ -86,7 +95,7 @@ export function getFileManageApi(params) {
|
||||||
// 查询序号
|
// 查询序号
|
||||||
export function geMaxSortApi(params) {
|
export function geMaxSortApi(params) {
|
||||||
return request({
|
return request({
|
||||||
url: '/smartArchives/fileManage/geMaxSort',
|
url: '/smartArchives/fileManage/getMaxSort',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params
|
params
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -108,7 +108,7 @@ export default {
|
||||||
this.title = "详情";
|
this.title = "详情";
|
||||||
this.isAdd = 'detail';
|
this.isAdd = 'detail';
|
||||||
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 = true;
|
this.row.detailStatus = true;
|
||||||
this.isflag = true;
|
this.isflag = true;
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@
|
||||||
import _ from 'lodash'
|
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 { getArchivalCatalogueTreeApi, addFileManageApi, updateFileManageApi,geMaxSortApi } from '@/api/archivesManagement/index.js'
|
import { getFileManageTreeByAddOrUpdateApi, addFileManageLeftApi, updateFileManageLeftApi,geMaxSortApi } from '@/api/archivesManagement/fileManager/fileManager.js'
|
||||||
export default {
|
export default {
|
||||||
name: "FileAddTreeData",
|
name: "FileAddTreeData",
|
||||||
props: ["width", "dataForm", "title", "disabled", "isAdd", "rowData"],
|
props: ["width", "dataForm", "title", "disabled", "isAdd", "rowData"],
|
||||||
|
|
@ -225,7 +225,7 @@ export default {
|
||||||
},
|
},
|
||||||
// 获取左侧树列表
|
// 获取左侧树列表
|
||||||
async getLeftTreeList(value) {
|
async getLeftTreeList(value) {
|
||||||
const res = await getArchivalCatalogueTreeApi({id:value})
|
const res = await getFileManageTreeByAddOrUpdateApi({id:value})
|
||||||
const transformedData = this.convertToVueTree(res.data)
|
const transformedData = this.convertToVueTree(res.data)
|
||||||
this.treeDataList = transformedData;
|
this.treeDataList = transformedData;
|
||||||
},
|
},
|
||||||
|
|
@ -275,7 +275,7 @@ export default {
|
||||||
let params = _.cloneDeep(this.form);
|
let params = _.cloneDeep(this.form);
|
||||||
|
|
||||||
if (this.isAdd === 'add') {
|
if (this.isAdd === 'add') {
|
||||||
addFileManageApi(params).then(res => {
|
addFileManageLeftApi(params).then(res => {
|
||||||
this.loading.close();
|
this.loading.close();
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
this.handleReuslt(res);
|
this.handleReuslt(res);
|
||||||
|
|
@ -287,7 +287,7 @@ export default {
|
||||||
// this.$modal.msgError('提交失败,请重试');
|
// this.$modal.msgError('提交失败,请重试');
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
updateFileManageApi(params).then(res => {
|
updateFileManageLeftApi(params).then(res => {
|
||||||
this.loading.close();
|
this.loading.close();
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
this.handleReuslt(res);
|
this.handleReuslt(res);
|
||||||
|
|
|
||||||
|
|
@ -6,13 +6,20 @@ export const formLabel = [
|
||||||
f_model: 'contentName',
|
f_model: 'contentName',
|
||||||
f_max: 32,
|
f_max: 32,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
isShow: false, // 是否展示label
|
||||||
|
f_type: 'date',
|
||||||
|
f_label: '上传时间',
|
||||||
|
f_model: 'uploadTime',
|
||||||
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
export const columnsList = [
|
export const columnsList = [
|
||||||
{ t_props: 'contentName', t_label: '文件名称',t_width:220 },
|
{ t_props: 'contentName', t_label: '档案名称',t_width:200 },
|
||||||
{ t_props: 'term', t_label: '案卷期限' },
|
{ t_props: 'fileName', t_label: '档案文件' },
|
||||||
{ t_props: 'markCode', t_label: '档案标识代码' },
|
{ t_props: 'markCode', t_label: '上传人' },
|
||||||
{ t_props: 'unitName', t_label: '归档责任单位' },
|
{ t_props: 'unitName', t_label: '保管期限' },
|
||||||
{ t_props: 'major', t_label: '所属专业' },
|
{ t_slot: 'dataSource', t_label: '来源' },
|
||||||
{ t_props: 'classifyMark', t_label: '文件分类标记' }
|
{ t_props: 'unitName', t_label: '责任单位' },
|
||||||
|
{ t_props: 'classifyMark', t_label: '上传时间' }
|
||||||
]
|
]
|
||||||
|
|
@ -5,22 +5,22 @@
|
||||||
<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="btn">
|
<template slot="btn">
|
||||||
<el-button plain size="mini" type="primary" icon="el-icon-plus" v-hasPermi="['archive:catalogue: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">
|
||||||
新增
|
新增
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template slot="handle" slot-scope="{ data }">
|
<template slot="handle" slot-scope="{ data }">
|
||||||
<el-button plain size="mini" type="success" icon="el-icon-warning-outline" v-hasPermi="['archive:catalogue:query']"
|
<el-button plain size="mini" type="success" icon="el-icon-warning-outline" v-hasPermi="['file:manage:query']"
|
||||||
@click="handleDetail(data)">
|
@click="handleDetail(data)">
|
||||||
详情
|
详情
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button plain size="mini" type="primary" icon="el-icon-edit" v-hasPermi="['archive:catalogue:edit']"
|
<el-button plain size="mini" type="primary" icon="el-icon-edit" v-hasPermi="['file:manage:update']"
|
||||||
@click="handleUpdate(data)">
|
@click="handleUpdate(data)">
|
||||||
修改
|
修改
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button plain size="mini" type="danger" icon="el-icon-delete" v-hasPermi="['archive:catalogue:del']"
|
<el-button plain size="mini" type="danger" icon="el-icon-delete" v-hasPermi="['file:manage:del']"
|
||||||
@click="handleDelete(data)">
|
@click="handleDelete(data)">
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
@ -37,7 +37,7 @@
|
||||||
import TableModel from '@/components/TableModel'
|
import TableModel from '@/components/TableModel'
|
||||||
import { columnsList, formLabel } from './config'
|
import { columnsList, formLabel } from './config'
|
||||||
import {
|
import {
|
||||||
delArchiveApi,
|
delFileManageApi,
|
||||||
getFileManageApi,
|
getFileManageApi,
|
||||||
} from '@/api/archivesManagement/fileManager/fileManager.js'
|
} from '@/api/archivesManagement/fileManager/fileManager.js'
|
||||||
import AddTableData from './addTableData'
|
import AddTableData from './addTableData'
|
||||||
|
|
@ -121,7 +121,7 @@ export default {
|
||||||
this.$modal.confirm(`是否确认删除文件名称为"${row.contentName}"的数据项?`).then(() => {
|
this.$modal.confirm(`是否确认删除文件名称为"${row.contentName}"的数据项?`).then(() => {
|
||||||
// 显示加载遮罩
|
// 显示加载遮罩
|
||||||
this.$modal.loading("正在删除,请稍候...");
|
this.$modal.loading("正在删除,请稍候...");
|
||||||
delArchiveApi({ id: row.id }).then(res => {
|
delFileManageApi({ id: row.id }).then(res => {
|
||||||
this.$modal.closeLoading();
|
this.$modal.closeLoading();
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
this.$modal.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
|
@ -144,7 +144,7 @@ export default {
|
||||||
selectedNode: {
|
selectedNode: {
|
||||||
handler(newVal) {
|
handler(newVal) {
|
||||||
console.log(newVal);
|
console.log(newVal);
|
||||||
this.addBtnIsShow = !(newVal && Number(newVal.level) === 3)
|
this.addBtnIsShow = !(newVal && Number(newVal.level) === 4)
|
||||||
// 更新并下发默认请求参数(例如 parentId)
|
// 更新并下发默认请求参数(例如 parentId)
|
||||||
const parentId = newVal && newVal.id ? newVal.id : 0
|
const parentId = newVal && newVal.id ? newVal.id : 0
|
||||||
this.defaultParams = { parentId }
|
this.defaultParams = { parentId }
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue