档案移交接收管理

This commit is contained in:
cwchen 2025-09-24 14:15:52 +08:00
parent 55306cfe41
commit f702edd915
5 changed files with 365 additions and 7 deletions

View File

@ -0,0 +1,139 @@
<template>
<!-- 小型弹窗用于完成删除保存等操作 -->
<el-dialog class="l-dialog" :class="lDialog" :title="title" :visible.sync="dialogVisible" :showClose="true"
:closeOnClickModal="false" @close="handleClose" :append-to-body="true">
<div>
<el-table :data="tableData" style="width: 100%" border header-align="center">
<el-table-column prop="index" label="序号" width="80" align="center">
<template slot-scope="scope">
{{ scope.$index + 1 }}
</template>
</el-table-column>
<el-table-column v-for="item in tableColumns" :key="item.prop" :prop="item.prop" :label="item.label"
center align="center"></el-table-column>
</el-table>
</div>
</el-dialog>
</template>
<script>
import _ from 'lodash'
import {
addDataClassAPI,
updateDataClassAPI,
} from '@/api/data-collect/data-class-manage'
export default {
name: "AcceptRecordList",
props: ["width", "dataForm", "title", "disabled", "jumpType", "rowData"],
dicts: ['data_class_type'],
data() {
return {
lDialog: this.width > 500 ? "w700" : "w500",
dialogVisible: true,
isDisabled: true,
loading: null,
tableData: [],
tableColumns: [],
maintenanceTitle: "",
isflag: false,
maintenanceRow: {},
};
},
created() {
this.initFormData();
},
methods: {
/** 初始化表单数据 */
initFormData() {
this.tableColumns = [];
if (this.jumpType === 'list') {
//
this.tableColumns = [
{ prop: 'proName', label: '所属分类' },
{ prop: 'singleProName', label: '所属案卷' },
{ prop: 'fileName', label: '文件名称' },
];
this.tableData = [{
id: 1,
proName: '所属分类',
singleProName: '所属案卷',
fileName: '文件名称',
}];
} else {
//
this.tableColumns = [
{ prop: 'proName', label: '所属分类' },
{ prop: 'singleProName', label: '所属案卷' },
{ prop: 'createTime', label: '文件名称' },
{ prop: 'createTime', label: '进度' },
];
this.tableData = [{
id: 1,
proName: '所属分类',
singleProName: '所属案卷',
fileName: '文件名称',
createUserName: '操作',
progress: '进度',
}];
}
},
closeDialog() {
this.isflag = false;
},
showColose() {
this.isflag = false;
},
/*关闭弹窗 */
handleClose() {
this.dialogVisible = false;
this.$emit("closeDialog");
setTimeout(() => {
this.dialogVisible = true;
});
},
/* 刷新数据 */
reloadData() {
}
}
};
</script>
<style lang="scss" scoped>
.w700 ::v-deep .el-dialog {
width: 700px;
}
.w500 ::v-deep .el-dialog {
width: 500px;
}
.w500 ::v-deep .el-dialog__header,
.w700 ::v-deep .el-dialog__header {
// background: #eeeeee;
.el-dialog__title {
font-size: 16px;
}
}
.yxq .el-range-separator {
margin-right: 7px !important;
}
.el-date-editor--daterange.el-input__inner {
width: 260px;
}
.form-item {
width: 100%;
}
.select-style {
display: flex;
justify-content: space-between;
}
</style>

View File

@ -0,0 +1,35 @@
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: 'singleProName', t_label: '移交时间' },
{ t_props: 'createUserName', t_label: '接收单位' },
{ t_slot: 't_list', t_label: '移交清单' },
{ t_slot: 't_progress', t_label: '移交进度' },
]

View File

@ -0,0 +1,189 @@
<template>
<!-- 档案移交申请 -->
<div class="app-container">
<TableModel :formLabel="formLabel" :showOperation="true" :showRightTools="true" ref="recordTableRef"
:columnsList="columnsList" :request-api="getTransferApplyListApi">
<template slot="auditStatus" slot-scope="{ data }">
<el-tag size="mini" :type="getStatusType(data.auditStatus)">
{{ getStatusText(data.auditStatus) }}
</el-tag>
</template>
<template slot="t_list" slot-scope="{ data }">
<span class="jump" @click="handleTList(data)">查看</span>
</template>
<template slot="t_progress" slot-scope="{ data }">
<span class="jump" @click="handleTProgress(data)">{{ getProgressStatusText(data.auditStatus) }}</span>
</template>
<template slot="handle" slot-scope="{ data }">
<el-button plain size="mini" type="success" icon="el-icon-warning-outline" v-hasPermi="['transfer:apply:query']"
@click="handleDetail(data)">
详情
</el-button>
</template>
</TableModel>
<!-- 新增/编辑 -->
<RecordList v-if="isflag" :jumpType="jumpType" :rowData="row" @handleQuery="handleQuery" :title="title"
@closeDialog="closeDialog" @showColose="showColose" :dataForm="row" :disabled="loading" :width="600" />
</div>
</template>
<script>
import TableModel from '@/components/TableModel'
import { columnsList, formLabel } from './config'
import {
delTransferApplyApi,
getTransferApplyListApi,
} from '@/api/filesTransfer/record.js'
import RecordList from './components/recordList'
import { encryptWithSM4 } from '@/utils/sm'
export default {
name: 'Accept',
dicts: ['pro_type', 'voltage_level'],
components: {
TableModel,
RecordList
},
data() {
return {
formLabel,
columnsList,
getTransferApplyListApi,
title: "",
isflag: false,
row: {},
loading: false,
jumpType:''
}
},
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;
},
//
handleDetail(row) {
this.$router.push({
name: 'RecordDetail',
query: {
id: encryptWithSM4(row.id ?? '0'),
viewStatus: encryptWithSM4('detail'),
auditStatus: encryptWithSM4(this.getStatusText2(row.auditStatus)),
}
})
},
/* 搜索操作 */
handleQuery() {
this.$refs.recordTableRef.getTableList()
},
/* 查看移交清单 */
handleTList(row){
this.title = "移交清单";
this.row = row;
this.jumpType = 'list';
this.isflag = true;
},
/* 查看移交进度 */
handleTProgress(row){
this.title = "移交进度";
this.jumpType = 'progress';
this.row = row;
this.isflag = true;
},
/** 删除操作 */
handleDelete(row) {
this.$modal.confirm(`是否确认删除数据类型名称为"${row.dataTypeName}"的数据项?`).then(() => {
//
this.$modal.loading("正在删除,请稍候...");
delTransferApplyApi({ id: row.id }).then(res => {
this.$modal.closeLoading();
if (res.code === 200) {
this.$modal.msgSuccess("删除成功");
this.handleQuery();
} else {
this.$modal.msgError(res.msg);
}
}).catch(error => {
this.$modal.closeLoading();
this.$modal.msgError("删除失败,请重试");
console.error('删除失败:', error);
});
}).catch(() => {
//
});
},
//
getStatusText(status) {
switch (status) {
case '0':
return '待审批'
case '1':
return '审批通过'
case '2':
return '审批驳回'
default:
return '未知状态'
}
},
//
getStatusType(status) {
switch (status) {
case '0':
return 'danger'
case '1':
return 'warning'
case '2':
return 'success'
default:
return 'info'
}
},
getStatusText2(status) {
switch (status) {
case '0':
return 'approving'
case '1':
return 'approved'
case '2':
return 'rejected'
default:
return 'approving'
}
},
getProgressStatusText(status) {
switch (status) {
case '0':
return '进行中'
case '1':
return '已完成'
default:
return '未知状态'
}
},
},
}
</script>
<style lang="scss" scoped>
.jump {
color: #409EFF;
cursor: pointer;
}
</style>

View File

@ -22,12 +22,7 @@ export const formLabel = [
f_selList: [],
f_dict: 'voltage_level',
},
{
isShow: false, // 是否展示label
f_type: 'date',
f_label: '移交时间',
f_model: 'voltageLevel',
},
]
export const columnsList = [

View File

@ -23,7 +23,7 @@
</el-button>
</template>
</TableModel>
<!-- 新增/编辑 -->
<!-- 移交清单移交进度 -->
<RecordList v-if="isflag" :jumpType="jumpType" :rowData="row" @handleQuery="handleQuery" :title="title"
@closeDialog="closeDialog" @showColose="showColose" :dataForm="row" :disabled="loading" :width="600" />
</div>