档案管理
This commit is contained in:
parent
6588115a52
commit
4567285ff0
|
|
@ -0,0 +1,29 @@
|
||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
|
||||||
|
// 查询项目数据列表
|
||||||
|
export function getProListAPI(data) {
|
||||||
|
return request({
|
||||||
|
url: '/smartArchives/project/getProjectList',
|
||||||
|
method: 'GET',
|
||||||
|
params: data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 配置档案类型
|
||||||
|
export function updateContentsNameAPI(data) {
|
||||||
|
return request({
|
||||||
|
url: '/smartArchives/project/updateContentsName',
|
||||||
|
method: 'POST',
|
||||||
|
data: data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 档案类型下拉选
|
||||||
|
export function getFileCatalogSelectAPI(data) {
|
||||||
|
return request({
|
||||||
|
url: '/smartArchives/project/getFileCatalogSelect',
|
||||||
|
method: 'GET',
|
||||||
|
params: data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
@ -9,6 +9,7 @@ export const formLabel = [
|
||||||
]
|
]
|
||||||
|
|
||||||
export const columnsList = [
|
export const columnsList = [
|
||||||
|
{ t_props: 'fileRelated', t_label: '档案相关类型' },
|
||||||
{ t_props: 'classifyName', t_label: '分类名称' },
|
{ t_props: 'classifyName', t_label: '分类名称' },
|
||||||
{ t_props: 'dimension', t_label: '维度' },
|
{ t_props: 'dimension', t_label: '维度' },
|
||||||
{ t_props: 'updateUserName', t_label: '更新人' },
|
{ t_props: 'updateUserName', t_label: '更新人' },
|
||||||
|
|
|
||||||
|
|
@ -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="fileRelated">
|
||||||
|
<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>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="分类名称" prop="classifyName">
|
<el-form-item label="分类名称" prop="classifyName">
|
||||||
<el-input class="form-item" v-model="form.classifyName" clearable show-word-limit
|
<el-input class="form-item" v-model="form.classifyName" clearable show-word-limit
|
||||||
placeholder="请输入分类名称" maxlength="64"></el-input>
|
placeholder="请输入分类名称" maxlength="64"></el-input>
|
||||||
|
|
@ -37,24 +44,28 @@ import {
|
||||||
export default {
|
export default {
|
||||||
name: "FileDimensionForm",
|
name: "FileDimensionForm",
|
||||||
props: ["width", "dataForm", "title", "disabled", "isAdd", "rowData"],
|
props: ["width", "dataForm", "title", "disabled", "isAdd", "rowData"],
|
||||||
dicts: ['dimension'],
|
dicts: ['dimension','file_related_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: {
|
||||||
classifyName: '',
|
fileRelated:null,
|
||||||
dimension: '',
|
classifyName: null,
|
||||||
classifyDesc: '',
|
dimension: null,
|
||||||
|
classifyDesc: null,
|
||||||
},
|
},
|
||||||
loading: null,
|
loading: null,
|
||||||
rules: {
|
rules: {
|
||||||
|
fileRelated: [
|
||||||
|
{ required: true, message: '请选择档案相关类型', trigger: 'change' }
|
||||||
|
],
|
||||||
classifyName: [
|
classifyName: [
|
||||||
{ required: true, message: '分类名称不能为空', trigger: 'blur' }
|
{ required: true, message: '分类名称不能为空', trigger: 'blur' }
|
||||||
],
|
],
|
||||||
dimension: [
|
dimension: [
|
||||||
{ required: true, message: '数据类型名称不能为空', trigger: 'blur' }
|
{ required: true, message: '请选择维度', trigger: 'change' }
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
@ -69,16 +80,18 @@ export default {
|
||||||
// 编辑模式:填充表单数据
|
// 编辑模式:填充表单数据
|
||||||
this.form = {
|
this.form = {
|
||||||
id: this.rowData.id,
|
id: this.rowData.id,
|
||||||
classifyName: this.rowData.classifyName || '',
|
classifyName: this.rowData.classifyName || null,
|
||||||
dimension: this.rowData.dimension || '',
|
dimension: this.rowData.dimension || null,
|
||||||
classifyDesc: this.rowData.classifyDesc || '',
|
classifyDesc: this.rowData.classifyDesc || null,
|
||||||
|
fileRelated: this.rowData.fileRelated || null,
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
// 新增模式:重置表单
|
// 新增模式:重置表单
|
||||||
this.form = {
|
this.form = {
|
||||||
classifyName: '',
|
classifyName: null,
|
||||||
dimension: null,
|
dimension: null,
|
||||||
classifyDesc: '',
|
classifyDesc: null,
|
||||||
|
fileRelated:null
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -101,9 +114,10 @@ export default {
|
||||||
/**重置表单*/
|
/**重置表单*/
|
||||||
reset() {
|
reset() {
|
||||||
this.form = {
|
this.form = {
|
||||||
classifyName: '',
|
classifyName: null,
|
||||||
dimension: null,
|
dimension: null,
|
||||||
classifyDesc: '',
|
classifyDesc: null,
|
||||||
|
fileRelated: null,
|
||||||
};
|
};
|
||||||
this.resetForm("ruleForm");
|
this.resetForm("ruleForm");
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,38 @@
|
||||||
|
export const formLabel = [
|
||||||
|
{
|
||||||
|
isShow: false, // 是否展示label
|
||||||
|
f_type: 'ipt',
|
||||||
|
f_label: '项目名称',
|
||||||
|
f_model: 'proName',
|
||||||
|
f_max: 32,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
isShow: false, // 是否展示label
|
||||||
|
f_type: 'sel',
|
||||||
|
f_label: '项目类型',
|
||||||
|
f_model: 'proType',
|
||||||
|
f_selList: [],
|
||||||
|
f_dict: 'pro_type',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
isShow: false, // 是否展示label
|
||||||
|
f_type: 'sel',
|
||||||
|
f_label: '电压等级',
|
||||||
|
f_model: 'voltageLevel',
|
||||||
|
f_selList: [],
|
||||||
|
f_dict: 'voltage_level',
|
||||||
|
},
|
||||||
|
]
|
||||||
|
|
||||||
|
export const columnsList = [
|
||||||
|
{ t_props: 'proName', t_label: '项目名称' },
|
||||||
|
{ t_props: 'singleProName', t_label: '单项工程名称' },
|
||||||
|
{ t_props: 'proTypeName', t_label: '工程类型' },
|
||||||
|
{ t_props: 'voltageLevelName', t_label: '电压等级' },
|
||||||
|
{ t_props: 'planStartDate', t_label: '计划开工日期' },
|
||||||
|
{ t_props: 'planEndDate', t_label: '计划竣工日期' },
|
||||||
|
{ t_props: 'planTcDate', t_label: '计划投产日期' },
|
||||||
|
{ t_props: 'proStatusName', t_label: '工程状态' },
|
||||||
|
{ t_props: 'fileUplaudNum', t_label: '当前档案上传数' },
|
||||||
|
{ t_slot: 'fileStatus', t_label: '档案状态' },
|
||||||
|
]
|
||||||
|
|
@ -0,0 +1,82 @@
|
||||||
|
<template>
|
||||||
|
<!-- 项目管理 -->
|
||||||
|
<div class="app-container">
|
||||||
|
<TableModel :formLabel="formLabel" :showOperation="true" :showRightTools="true" ref="proTableRef"
|
||||||
|
:columnsList="columnsList" :request-api="getProListAPI">
|
||||||
|
<template slot="fileStatus" slot-scope="{ data }">
|
||||||
|
<el-tag
|
||||||
|
size="mini"
|
||||||
|
:type="data.fileStatus === '1' ? 'success' : 'danger'"
|
||||||
|
>
|
||||||
|
{{ data.fileStatus === '0' ? '未归档移交' : '已归档移交' }}
|
||||||
|
</el-tag>
|
||||||
|
</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)">
|
||||||
|
档案管理
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</TableModel>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import TableModel from '@/components/TableModel'
|
||||||
|
import { columnsList, formLabel } from './config'
|
||||||
|
import {
|
||||||
|
getProListAPI
|
||||||
|
} from '@/api/archivesManagement/fileManager/fileManager.js'
|
||||||
|
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'ProManager',
|
||||||
|
dicts:['pro_type','voltage_level'],
|
||||||
|
components: {
|
||||||
|
TableModel,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
formLabel,
|
||||||
|
columnsList,
|
||||||
|
getProListAPI,
|
||||||
|
title: "",
|
||||||
|
isflag: false,
|
||||||
|
isAdd: '',
|
||||||
|
row: {},
|
||||||
|
loading: false,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
created() {
|
||||||
|
// 将字典数据填充到表单配置的下拉选项中
|
||||||
|
if (Array.isArray(this.formLabel)) {
|
||||||
|
this.formLabel.forEach((item) => {
|
||||||
|
if (item.f_dict && this.dict && this.dict.type && this.dict.type[item.f_dict]) {
|
||||||
|
this.$set(item, 'f_selList', this.dict.type[item.f_dict])
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
closeDialog() {
|
||||||
|
this.isflag = false;
|
||||||
|
},
|
||||||
|
showColose() {
|
||||||
|
this.isflag = false;
|
||||||
|
},
|
||||||
|
/** 配置档案类型 */
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.title = "配置档案类型";
|
||||||
|
this.isAdd = 'edit';
|
||||||
|
this.row = row;
|
||||||
|
this.isflag = true;
|
||||||
|
},
|
||||||
|
/* 搜索操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.$refs.proTableRef.getTableList()
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
Loading…
Reference in New Issue