档案多维度分类

This commit is contained in:
cwchen 2025-09-12 11:03:02 +08:00
parent 12c5dfb3db
commit dac6bc69a6
6 changed files with 67 additions and 70 deletions

View File

@ -1,36 +1,36 @@
import request from '@/utils/request' import request from '@/utils/request'
// 新增数据类型 // 新增数据类型
export function addDataClassAPI(data) { export function addKyFilesMultiClassifyAPI(data) {
return request({ return request({
url: '/smartArchives/data/classify/addKyDataClassify', url: '/smartArchives/files/multi/addKyFilesMultiClassify',
method: 'POST', method: 'POST',
data: data, data: data,
}) })
} }
// 修改数据类型 // 修改数据类型
export function updateDataClassAPI(data) { export function updateKyFilesMultiClassifyAPI(data) {
return request({ return request({
url: '/smartArchives/data/classify/updateKyDataClassify', url: '/smartArchives/files/multi/updateKyFilesMultiClassify',
method: 'POST', method: 'POST',
data: data, data: data,
}) })
} }
// 删除数据类型 // 删除数据类型
export function deleteDataClassAPI(data) { export function delKyFilesMultiClassifyAPI(data) {
return request({ return request({
url: '/smartArchives/data/classify/delKyDataClassify', url: '/smartArchives/files/multi/delKyFilesMultiClassify',
method: 'POST', method: 'POST',
data: data, data: data,
}) })
} }
// 查询数据类型列表 // 查询数据类型列表
export function getListDataClassAPI(data) { export function getKyFilesMultiClassifyListAPI(data) {
return request({ return request({
url: '/smartArchives/data/classify/list', url: '/smartArchives/files/multi/getKyFilesMultiClassifyList',
method: 'GET', method: 'GET',
params: data, params: data,
}) })

View File

@ -3,15 +3,15 @@ export const formLabel = [
isShow: false, // 是否展示label isShow: false, // 是否展示label
f_type: 'ipt', f_type: 'ipt',
f_label: '分类名称', f_label: '分类名称',
f_model: 'dataTypeName', f_model: 'classifyName',
f_max: 32, f_max: 32,
}, },
] ]
export const columnsList = [ export const columnsList = [
{ t_props: 'dataTypeName', t_label: '分类名称' }, { t_props: 'classifyName', t_label: '分类名称' },
{ t_props: 'updateUserName', t_label: '维度' }, { t_props: 'dimension', t_label: '维度' },
{ t_props: 'updateTime', t_label: '更新人' }, { t_props: 'updateUserName', t_label: '更新人' },
{ t_props: 'remark', t_label: '更新时间' }, { t_props: 'updateTime', t_label: '更新时间' },
{ t_props: 'remark', t_label: '分类描述' } { t_props: 'classifyDesc', t_label: '分类描述' }
] ]

View File

@ -2,20 +2,20 @@
<!-- 档案多维度管理 --> <!-- 档案多维度管理 -->
<div class="app-container"> <div class="app-container">
<TableModel :formLabel="formLabel" :showOperation="true" :showRightTools="true" ref="fileDimensionTableRef" <TableModel :formLabel="formLabel" :showOperation="true" :showRightTools="true" ref="fileDimensionTableRef"
:columnsList="columnsList" :request-api="getListDataClassAPI"> :columnsList="columnsList" :request-api="getKyFilesMultiClassifyListAPI">
<template slot="btn"> <template slot="btn">
<el-button plain size="mini" type="primary" icon="el-icon-plus" v-hasPermi="['data:classify:add']" <el-button plain size="mini" type="primary" icon="el-icon-plus" v-hasPermi="['files:multi:add']"
@click="handleAdd"> @click="handleAdd">
新增 新增
</el-button> </el-button>
</template> </template>
<template slot="handle" slot-scope="{ data }"> <template slot="handle" slot-scope="{ data }">
<el-button plain size="mini" type="primary" icon="el-icon-edit" v-hasPermi="['data:classify:update']" <el-button plain size="mini" type="primary" icon="el-icon-edit" v-hasPermi="['files:multi:update']"
@click="handleUpdate(data)"> @click="handleUpdate(data)">
修改 修改
</el-button> </el-button>
<el-button plain size="mini" type="danger" icon="el-icon-delete" v-hasPermi="['data:classify:del']" <el-button plain size="mini" type="danger" icon="el-icon-delete" v-hasPermi="['files:multi:del']"
@click="handleDelete(data)"> @click="handleDelete(data)">
删除 删除
</el-button> </el-button>
@ -32,7 +32,7 @@ import TableModel from '@/components/TableModel'
import { columnsList, formLabel } from './config' import { columnsList, formLabel } from './config'
import { import {
deleteDataClassAPI, deleteDataClassAPI,
getListDataClassAPI, getKyFilesMultiClassifyListAPI,
} from '@/api/archivesManagement/archClassification' } from '@/api/archivesManagement/archClassification'
import FileDimensionForm from './prop/fileDimensionForm' import FileDimensionForm from './prop/fileDimensionForm'
@ -47,7 +47,7 @@ export default {
return { return {
formLabel, formLabel,
columnsList, columnsList,
getListDataClassAPI, getKyFilesMultiClassifyListAPI,
title: "", title: "",
isflag: false, isflag: false,
isAdd: '', isAdd: '',

View File

@ -4,20 +4,20 @@
:closeOnClickModal="false" @close="handleClose" :append-to-body="true"> :closeOnClickModal="false" @close="handleClose" :append-to-body="true">
<div> <div>
<el-form :model="form" :rules="rules" ref="ruleForm" label-width="110px"> <el-form :model="form" :rules="rules" ref="ruleForm" label-width="110px">
<el-form-item label="分类名称" prop="dataTypeName"> <el-form-item label="分类名称" prop="classifyName">
<el-input class="form-item" v-model="form.dataTypeName" clearable show-word-limit <el-input class="form-item" v-model="form.classifyName" clearable show-word-limit
placeholder="请输入分类名称" maxlength="32"></el-input> placeholder="请输入分类名称" maxlength="64"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="维度" prop="dataTypeName2"> <el-form-item label="维度" prop="dimension">
<el-select class="form-item" v-model="form.dataTypeName2" filterable clearable <el-select class="form-item" v-model="form.dimension" filterable clearable
placeholder="请选择维度"> placeholder="请选择维度">
<el-option v-for="item in dict.type.dimension" :key="item.value" :label="item.label" <el-option v-for="item in dict.type.dimension" :key="item.value" :label="item.label"
:value="item.label"></el-option> :value="item.label"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="分类描述" prop="remark"> <el-form-item label="分类描述" prop="classifyDesc">
<el-input type="textarea" :autosize="{ minRows: 4, maxRows: 6 }" class="form-item" <el-input type="textarea" :autosize="{ minRows: 4, maxRows: 6 }" class="form-item"
v-model="form.remark" clearable show-word-limit placeholder="请输入分类描述" maxlength="255"></el-input> v-model="form.classifyDesc" clearable show-word-limit placeholder="请输入分类描述" maxlength="255"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
@ -31,8 +31,8 @@
<script> <script>
import _ from 'lodash' import _ from 'lodash'
import { import {
addDataClassAPI, addKyFilesMultiClassifyAPI,
updateDataClassAPI, updateKyFilesMultiClassifyAPI,
} from '@/api/archivesManagement/archClassification' } from '@/api/archivesManagement/archClassification'
export default { export default {
name: "FileDimensionForm", name: "FileDimensionForm",
@ -44,16 +44,16 @@ export default {
dialogVisible: true, dialogVisible: true,
isDisabled: true, isDisabled: true,
form: { form: {
dataTypeName: '', classifyName: '',
dataTypeName2: '', dimension: '',
remark: '', classifyDesc: '',
}, },
loading: null, loading: null,
rules: { rules: {
dataTypeName: [ classifyName: [
{ required: true, message: '数据类型名称不能为空', trigger: 'blur' } { required: true, message: '分类名称不能为空', trigger: 'blur' }
], ],
dataTypeName2: [ dimension: [
{ required: true, message: '数据类型名称不能为空', trigger: 'blur' } { required: true, message: '数据类型名称不能为空', trigger: 'blur' }
], ],
}, },
@ -68,16 +68,17 @@ export default {
if (this.isAdd === 'edit' && this.rowData) { if (this.isAdd === 'edit' && this.rowData) {
// //
this.form = { this.form = {
dataTypeName: this.rowData.dataTypeName || '', id: this.rowData.id,
dataTypeName2: this.rowData.dataTypeName2 || '', classifyName: this.rowData.classifyName || '',
remark: this.rowData.remark || '', dimension: this.rowData.dimension || '',
classifyDesc: this.rowData.classifyDesc || '',
}; };
} else { } else {
// //
this.form = { this.form = {
dataTypeName: '', classifyName: '',
dataTypeName2: '', dimension: null,
remark: '', classifyDesc: '',
}; };
} }
}, },
@ -100,9 +101,9 @@ export default {
/**重置表单*/ /**重置表单*/
reset() { reset() {
this.form = { this.form = {
dataTypeName: '', classifyName: '',
dataTypeName2: '', dimension: null,
remark: '', classifyDesc: '',
}; };
this.resetForm("ruleForm"); this.resetForm("ruleForm");
}, },
@ -124,14 +125,8 @@ 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);
const data = {
dataTypeName: params.dataTypeName,
dataTypeName2: params.dataTypeName2,
remark: params.remark,
}
if (this.isAdd === 'add') { if (this.isAdd === 'add') {
addDataClassAPI(data).then(res => { addKyFilesMultiClassifyAPI(params).then(res => {
this.loading.close(); this.loading.close();
if (res.code === 200) { if (res.code === 200) {
this.handleReuslt(res); this.handleReuslt(res);
@ -143,13 +138,7 @@ export default {
// this.$modal.msgError(''); // this.$modal.msgError('');
}); });
} else { } else {
const data = { updateKyFilesMultiClassifyAPI(params).then(res => {
dataTypeName: params.dataTypeName,
dataTypeName2: params.dataTypeName2,
remark: params.remark,
id: this.rowData.id,
}
updateDataClassAPI(data).then(res => {
this.loading.close(); this.loading.close();
if (res.code === 200) { if (res.code === 200) {
this.handleReuslt(res); this.handleReuslt(res);

View File

@ -9,6 +9,7 @@ export const formLabel = [
] ]
export const columnsList = [ export const columnsList = [
{ t_props: 'dataTypeName', t_label: '数据分类类型' },
{ t_props: 'dataTypeName', t_label: '数据类型名称' }, { t_props: 'dataTypeName', t_label: '数据类型名称' },
{ t_props: 'updateUserName', t_label: '更新人' }, { t_props: 'updateUserName', t_label: '更新人' },
{ t_props: 'updateTime', t_label: '更新时间' }, { t_props: 'updateTime', t_label: '更新时间' },

View File

@ -4,6 +4,13 @@
:closeOnClickModal="false" @close="handleClose" :append-to-body="true"> :closeOnClickModal="false" @close="handleClose" :append-to-body="true">
<div> <div>
<el-form :model="form" :rules="rules" ref="ruleForm" label-width="110px"> <el-form :model="form" :rules="rules" ref="ruleForm" label-width="110px">
<el-form-item label="数据分类类型" prop="dataClassType">
<el-select class="form-item" v-model="form.dataClassType" filterable clearable
placeholder="请选择数据分类类型">
<el-option v-for="item in dict.type.data_class_type" :key="item.value" :label="item.label"
:value="item.label"></el-option>
</el-select>
</el-form-item>
<el-form-item label="数据类型名称" prop="dataTypeName"> <el-form-item label="数据类型名称" prop="dataTypeName">
<el-input class="form-item" v-model="form.dataTypeName" clearable show-word-limit <el-input class="form-item" v-model="form.dataTypeName" clearable show-word-limit
placeholder="请输入数据类型名称" maxlength="32"></el-input> placeholder="请输入数据类型名称" maxlength="32"></el-input>
@ -30,17 +37,22 @@ import {
export default { export default {
name: "DataClassForm", name: "DataClassForm",
props: ["width", "dataForm", "title", "disabled", "isAdd", "rowData"], props: ["width", "dataForm", "title", "disabled", "isAdd", "rowData"],
dicts: ['data_class_type'],
data() { data() {
return { return {
lDialog: this.width > 500 ? "w700" : "w500", lDialog: this.width > 500 ? "w700" : "w500",
dialogVisible: true, dialogVisible: true,
isDisabled: true, isDisabled: true,
form: { form: {
dataClassType: null,
dataTypeName: '', dataTypeName: '',
remark: '', remark: '',
}, },
loading: null, loading: null,
rules: { rules: {
dataClassType: [
{ required: true, message: '请选择数据分类类型', trigger: 'change' }
],
dataTypeName: [ dataTypeName: [
{ required: true, message: '数据类型名称不能为空', trigger: 'blur' } { required: true, message: '数据类型名称不能为空', trigger: 'blur' }
], ],
@ -56,12 +68,15 @@ export default {
if (this.isAdd === 'edit' && this.rowData) { if (this.isAdd === 'edit' && this.rowData) {
// //
this.form = { this.form = {
id: this.rowData.id,
dataClassType: this.rowData.dataClassType || '',
dataTypeName: this.rowData.dataTypeName || '', dataTypeName: this.rowData.dataTypeName || '',
remark: this.rowData.remark || '', remark: this.rowData.remark || '',
}; };
} else { } else {
// //
this.form = { this.form = {
dataClassType: null,
dataTypeName: '', dataTypeName: '',
remark: '', remark: '',
}; };
@ -86,6 +101,8 @@ export default {
/**重置表单*/ /**重置表单*/
reset() { reset() {
this.form = { this.form = {
id: null,
dataClassType: null,
dataTypeName: '', dataTypeName: '',
remark: '', remark: '',
}; };
@ -109,13 +126,8 @@ 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);
const data = {
dataTypeName: params.dataTypeName,
remark: params.remark,
}
if (this.isAdd === 'add') { if (this.isAdd === 'add') {
addDataClassAPI(data).then(res => { addDataClassAPI(params).then(res => {
this.loading.close(); this.loading.close();
if (res.code === 200) { if (res.code === 200) {
this.handleReuslt(res); this.handleReuslt(res);
@ -127,12 +139,7 @@ export default {
// this.$modal.msgError(''); // this.$modal.msgError('');
}); });
} else { } else {
const data = { updateDataClassAPI(params).then(res => {
dataTypeName: params.dataTypeName,
remark: params.remark,
id: this.rowData.id,
}
updateDataClassAPI(data).then(res => {
this.loading.close(); this.loading.close();
if (res.code === 200) { if (res.code === 200) {
this.handleReuslt(res); this.handleReuslt(res);