档案多维度分类
This commit is contained in:
parent
12c5dfb3db
commit
dac6bc69a6
|
|
@ -1,36 +1,36 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 新增数据类型
|
||||
export function addDataClassAPI(data) {
|
||||
export function addKyFilesMultiClassifyAPI(data) {
|
||||
return request({
|
||||
url: '/smartArchives/data/classify/addKyDataClassify',
|
||||
url: '/smartArchives/files/multi/addKyFilesMultiClassify',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
})
|
||||
}
|
||||
|
||||
// 修改数据类型
|
||||
export function updateDataClassAPI(data) {
|
||||
export function updateKyFilesMultiClassifyAPI(data) {
|
||||
return request({
|
||||
url: '/smartArchives/data/classify/updateKyDataClassify',
|
||||
url: '/smartArchives/files/multi/updateKyFilesMultiClassify',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
})
|
||||
}
|
||||
|
||||
// 删除数据类型
|
||||
export function deleteDataClassAPI(data) {
|
||||
export function delKyFilesMultiClassifyAPI(data) {
|
||||
return request({
|
||||
url: '/smartArchives/data/classify/delKyDataClassify',
|
||||
url: '/smartArchives/files/multi/delKyFilesMultiClassify',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
})
|
||||
}
|
||||
|
||||
// 查询数据类型列表
|
||||
export function getListDataClassAPI(data) {
|
||||
export function getKyFilesMultiClassifyListAPI(data) {
|
||||
return request({
|
||||
url: '/smartArchives/data/classify/list',
|
||||
url: '/smartArchives/files/multi/getKyFilesMultiClassifyList',
|
||||
method: 'GET',
|
||||
params: data,
|
||||
})
|
||||
|
|
|
|||
|
|
@ -3,15 +3,15 @@ export const formLabel = [
|
|||
isShow: false, // 是否展示label
|
||||
f_type: 'ipt',
|
||||
f_label: '分类名称',
|
||||
f_model: 'dataTypeName',
|
||||
f_model: 'classifyName',
|
||||
f_max: 32,
|
||||
},
|
||||
]
|
||||
|
||||
export const columnsList = [
|
||||
{ t_props: 'dataTypeName', t_label: '分类名称' },
|
||||
{ t_props: 'updateUserName', t_label: '维度' },
|
||||
{ t_props: 'updateTime', t_label: '更新人' },
|
||||
{ t_props: 'remark', t_label: '更新时间' },
|
||||
{ t_props: 'remark', t_label: '分类描述' }
|
||||
{ t_props: 'classifyName', t_label: '分类名称' },
|
||||
{ t_props: 'dimension', t_label: '维度' },
|
||||
{ t_props: 'updateUserName', t_label: '更新人' },
|
||||
{ t_props: 'updateTime', t_label: '更新时间' },
|
||||
{ t_props: 'classifyDesc', t_label: '分类描述' }
|
||||
]
|
||||
|
|
@ -2,20 +2,20 @@
|
|||
<!-- 档案多维度管理 -->
|
||||
<div class="app-container">
|
||||
<TableModel :formLabel="formLabel" :showOperation="true" :showRightTools="true" ref="fileDimensionTableRef"
|
||||
:columnsList="columnsList" :request-api="getListDataClassAPI">
|
||||
:columnsList="columnsList" :request-api="getKyFilesMultiClassifyListAPI">
|
||||
<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">
|
||||
新增
|
||||
</el-button>
|
||||
</template>
|
||||
|
||||
<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)">
|
||||
修改
|
||||
</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)">
|
||||
删除
|
||||
</el-button>
|
||||
|
|
@ -32,7 +32,7 @@ import TableModel from '@/components/TableModel'
|
|||
import { columnsList, formLabel } from './config'
|
||||
import {
|
||||
deleteDataClassAPI,
|
||||
getListDataClassAPI,
|
||||
getKyFilesMultiClassifyListAPI,
|
||||
} from '@/api/archivesManagement/archClassification'
|
||||
import FileDimensionForm from './prop/fileDimensionForm'
|
||||
|
||||
|
|
@ -47,7 +47,7 @@ export default {
|
|||
return {
|
||||
formLabel,
|
||||
columnsList,
|
||||
getListDataClassAPI,
|
||||
getKyFilesMultiClassifyListAPI,
|
||||
title: "",
|
||||
isflag: false,
|
||||
isAdd: '',
|
||||
|
|
|
|||
|
|
@ -4,20 +4,20 @@
|
|||
:closeOnClickModal="false" @close="handleClose" :append-to-body="true">
|
||||
<div>
|
||||
<el-form :model="form" :rules="rules" ref="ruleForm" label-width="110px">
|
||||
<el-form-item label="分类名称" prop="dataTypeName">
|
||||
<el-input class="form-item" v-model="form.dataTypeName" clearable show-word-limit
|
||||
placeholder="请输入分类名称" maxlength="32"></el-input>
|
||||
<el-form-item label="分类名称" prop="classifyName">
|
||||
<el-input class="form-item" v-model="form.classifyName" clearable show-word-limit
|
||||
placeholder="请输入分类名称" maxlength="64"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="维度" prop="dataTypeName2">
|
||||
<el-select class="form-item" v-model="form.dataTypeName2" filterable clearable
|
||||
<el-form-item label="维度" prop="dimension">
|
||||
<el-select class="form-item" v-model="form.dimension" filterable clearable
|
||||
placeholder="请选择维度">
|
||||
<el-option v-for="item in dict.type.dimension" :key="item.value" :label="item.label"
|
||||
:value="item.label"></el-option>
|
||||
</el-select>
|
||||
</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"
|
||||
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>
|
||||
</div>
|
||||
|
|
@ -31,8 +31,8 @@
|
|||
<script>
|
||||
import _ from 'lodash'
|
||||
import {
|
||||
addDataClassAPI,
|
||||
updateDataClassAPI,
|
||||
addKyFilesMultiClassifyAPI,
|
||||
updateKyFilesMultiClassifyAPI,
|
||||
} from '@/api/archivesManagement/archClassification'
|
||||
export default {
|
||||
name: "FileDimensionForm",
|
||||
|
|
@ -44,16 +44,16 @@ export default {
|
|||
dialogVisible: true,
|
||||
isDisabled: true,
|
||||
form: {
|
||||
dataTypeName: '',
|
||||
dataTypeName2: '',
|
||||
remark: '',
|
||||
classifyName: '',
|
||||
dimension: '',
|
||||
classifyDesc: '',
|
||||
},
|
||||
loading: null,
|
||||
rules: {
|
||||
dataTypeName: [
|
||||
{ required: true, message: '数据类型名称不能为空', trigger: 'blur' }
|
||||
classifyName: [
|
||||
{ required: true, message: '分类名称不能为空', trigger: 'blur' }
|
||||
],
|
||||
dataTypeName2: [
|
||||
dimension: [
|
||||
{ required: true, message: '数据类型名称不能为空', trigger: 'blur' }
|
||||
],
|
||||
},
|
||||
|
|
@ -68,16 +68,17 @@ export default {
|
|||
if (this.isAdd === 'edit' && this.rowData) {
|
||||
// 编辑模式:填充表单数据
|
||||
this.form = {
|
||||
dataTypeName: this.rowData.dataTypeName || '',
|
||||
dataTypeName2: this.rowData.dataTypeName2 || '',
|
||||
remark: this.rowData.remark || '',
|
||||
id: this.rowData.id,
|
||||
classifyName: this.rowData.classifyName || '',
|
||||
dimension: this.rowData.dimension || '',
|
||||
classifyDesc: this.rowData.classifyDesc || '',
|
||||
};
|
||||
} else {
|
||||
// 新增模式:重置表单
|
||||
this.form = {
|
||||
dataTypeName: '',
|
||||
dataTypeName2: '',
|
||||
remark: '',
|
||||
classifyName: '',
|
||||
dimension: null,
|
||||
classifyDesc: '',
|
||||
};
|
||||
}
|
||||
},
|
||||
|
|
@ -100,9 +101,9 @@ export default {
|
|||
/**重置表单*/
|
||||
reset() {
|
||||
this.form = {
|
||||
dataTypeName: '',
|
||||
dataTypeName2: '',
|
||||
remark: '',
|
||||
classifyName: '',
|
||||
dimension: null,
|
||||
classifyDesc: '',
|
||||
};
|
||||
this.resetForm("ruleForm");
|
||||
},
|
||||
|
|
@ -124,14 +125,8 @@ export default {
|
|||
target: this.$el.querySelector('.el-dialog') || document.body
|
||||
})
|
||||
let params = _.cloneDeep(this.form);
|
||||
const data = {
|
||||
dataTypeName: params.dataTypeName,
|
||||
dataTypeName2: params.dataTypeName2,
|
||||
remark: params.remark,
|
||||
}
|
||||
|
||||
if (this.isAdd === 'add') {
|
||||
addDataClassAPI(data).then(res => {
|
||||
addKyFilesMultiClassifyAPI(params).then(res => {
|
||||
this.loading.close();
|
||||
if (res.code === 200) {
|
||||
this.handleReuslt(res);
|
||||
|
|
@ -143,13 +138,7 @@ export default {
|
|||
// this.$modal.msgError('提交失败,请重试');
|
||||
});
|
||||
} else {
|
||||
const data = {
|
||||
dataTypeName: params.dataTypeName,
|
||||
dataTypeName2: params.dataTypeName2,
|
||||
remark: params.remark,
|
||||
id: this.rowData.id,
|
||||
}
|
||||
updateDataClassAPI(data).then(res => {
|
||||
updateKyFilesMultiClassifyAPI(params).then(res => {
|
||||
this.loading.close();
|
||||
if (res.code === 200) {
|
||||
this.handleReuslt(res);
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ export const formLabel = [
|
|||
]
|
||||
|
||||
export const columnsList = [
|
||||
{ t_props: 'dataTypeName', t_label: '数据分类类型' },
|
||||
{ t_props: 'dataTypeName', t_label: '数据类型名称' },
|
||||
{ t_props: 'updateUserName', t_label: '更新人' },
|
||||
{ t_props: 'updateTime', t_label: '更新时间' },
|
||||
|
|
|
|||
|
|
@ -4,6 +4,13 @@
|
|||
:closeOnClickModal="false" @close="handleClose" :append-to-body="true">
|
||||
<div>
|
||||
<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-input class="form-item" v-model="form.dataTypeName" clearable show-word-limit
|
||||
placeholder="请输入数据类型名称" maxlength="32"></el-input>
|
||||
|
|
@ -30,17 +37,22 @@ import {
|
|||
export default {
|
||||
name: "DataClassForm",
|
||||
props: ["width", "dataForm", "title", "disabled", "isAdd", "rowData"],
|
||||
dicts: ['data_class_type'],
|
||||
data() {
|
||||
return {
|
||||
lDialog: this.width > 500 ? "w700" : "w500",
|
||||
dialogVisible: true,
|
||||
isDisabled: true,
|
||||
form: {
|
||||
dataClassType: null,
|
||||
dataTypeName: '',
|
||||
remark: '',
|
||||
},
|
||||
loading: null,
|
||||
rules: {
|
||||
dataClassType: [
|
||||
{ required: true, message: '请选择数据分类类型', trigger: 'change' }
|
||||
],
|
||||
dataTypeName: [
|
||||
{ required: true, message: '数据类型名称不能为空', trigger: 'blur' }
|
||||
],
|
||||
|
|
@ -56,12 +68,15 @@ export default {
|
|||
if (this.isAdd === 'edit' && this.rowData) {
|
||||
// 编辑模式:填充表单数据
|
||||
this.form = {
|
||||
id: this.rowData.id,
|
||||
dataClassType: this.rowData.dataClassType || '',
|
||||
dataTypeName: this.rowData.dataTypeName || '',
|
||||
remark: this.rowData.remark || '',
|
||||
};
|
||||
} else {
|
||||
// 新增模式:重置表单
|
||||
this.form = {
|
||||
dataClassType: null,
|
||||
dataTypeName: '',
|
||||
remark: '',
|
||||
};
|
||||
|
|
@ -86,6 +101,8 @@ export default {
|
|||
/**重置表单*/
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
dataClassType: null,
|
||||
dataTypeName: '',
|
||||
remark: '',
|
||||
};
|
||||
|
|
@ -109,13 +126,8 @@ export default {
|
|||
target: this.$el.querySelector('.el-dialog') || document.body
|
||||
})
|
||||
let params = _.cloneDeep(this.form);
|
||||
const data = {
|
||||
dataTypeName: params.dataTypeName,
|
||||
remark: params.remark,
|
||||
}
|
||||
|
||||
if (this.isAdd === 'add') {
|
||||
addDataClassAPI(data).then(res => {
|
||||
addDataClassAPI(params).then(res => {
|
||||
this.loading.close();
|
||||
if (res.code === 200) {
|
||||
this.handleReuslt(res);
|
||||
|
|
@ -127,12 +139,7 @@ export default {
|
|||
// this.$modal.msgError('提交失败,请重试');
|
||||
});
|
||||
} else {
|
||||
const data = {
|
||||
dataTypeName: params.dataTypeName,
|
||||
remark: params.remark,
|
||||
id: this.rowData.id,
|
||||
}
|
||||
updateDataClassAPI(data).then(res => {
|
||||
updateDataClassAPI(params).then(res => {
|
||||
this.loading.close();
|
||||
if (res.code === 200) {
|
||||
this.handleReuslt(res);
|
||||
|
|
|
|||
Loading…
Reference in New Issue