档案移交记录

This commit is contained in:
cwchen 2025-09-22 13:45:55 +08:00
parent 4da78f314f
commit 4111b9a30b
9 changed files with 503 additions and 566 deletions

View File

@ -206,7 +206,24 @@ export const dynamicRoutes = [
meta: { title: '审核详情', activeMenu: '/archivesManagement/filesTransfer/audit', noCache: true }
}
]
},
{
path: '/archivesManagement/filesTransfer/record/record-detail-data',
component: Layout,
hidden: true,
permissions: ['transfer:apply:query'],
children: [
{
path: 'index',
component: () => import('@/views/filesTransfer/record/components/data-detail'),
name: 'RecordDetail',
meta: { title: '详情', activeMenu: '/archivesManagement/filesTransfer/record', noCache: true }
}
]
}
]
// 防止连续点击多次路由报错

View File

@ -1,453 +0,0 @@
<template>
<div class="detail-container">
<!-- 返回按钮 -->
<div>
<el-button type="danger" plain icon="el-icon-close" size="mini" @click="handleClose">返回</el-button>
</div>
<!-- 审核状态区域 -->
<div class="status-section">
<div class="status-icon">
<i :class="statusIconClass"></i>
</div>
<div class="status-text">{{ statusText }}</div>
</div>
<!-- 移交内容区域 -->
<div class="content-section">
<div class="section-title">
<div class="title-bar"></div>
<span>移交内容</span>
</div>
<div class="content-info">
<span class="project-name">{{ projectName }}</span>
<span class="receiving-org">接收组织: {{ receivingOrg }}</span>
</div>
</div>
<!-- 文件详情表格 -->
<div class="table-section">
<el-table :data="fileList" border style="width: 100%" class="detail-table">
<el-table-column prop="index" label="序号" width="80" align="center" sortable>
<template slot-scope="scope">
{{ scope.$index + 1 }}
</template>
</el-table-column>
<el-table-column prop="proName" label="项目名称" min-width="150">
<template slot-scope="scope">
{{ scope.row.proName || '--'}}
</template>
</el-table-column>
<el-table-column prop="singleProName" label="单项工程名称" min-width="150">
<template slot-scope="scope">
{{ scope.row.singleProName || '--' }}
</template>
</el-table-column>
<el-table-column prop="createUserName" label="申请人" min-width="100">
<template slot-scope="scope">
{{ scope.row.createUserName || '--' }}
</template>
</el-table-column>
<el-table-column prop="createTime" label="申请时间" min-width="120">
<template slot-scope="scope">
{{ scope.row.createTime || '--' }}
</template>
</el-table-column>
<el-table-column prop="archiveName" label="档案名称" min-width="300">
<template slot-scope="scope">
<div class="archive-name-cell">{{ scope.row.archiveName }}</div>
</template>
</el-table-column>
</el-table>
</div>
<!-- 移交审批区域 -->
<div v-if="showApprovalActions && viewStatus !== 'detail'" class="approval-section">
<div class="section-title">
<div class="title-bar"></div>
<span>移交审批</span>
</div>
<div class="approval-form">
<div class="form-item">
<label class="form-label">审批意见:</label>
<el-input v-model="approvalComment" type="textarea" :rows="4" placeholder="请输入审批意见"
class="comment-textarea" clearable show-word-limit maxlength="255">
</el-input>
</div>
<div class="approval-actions">
<el-button type="primary" @click="handleApprove" v-hasPermi="['transfer:apply:audit']">同意</el-button>
<el-button type="danger" @click="handleReject" v-hasPermi="['transfer:apply:audit']">驳回</el-button>
</div>
</div>
</div>
<div v-if="showApprovalActions2" class="approval-section">
<div class="section-title">
<div class="title-bar"></div>
<span>审批意见</span>
</div>
<div class="approval-form">
<div class="audit-info">
<div class="audit-row">
<span class="audit-label">审核人</span>
<span class="audit-value">{{ auditUserName || '--' }}</span>
</div>
<div class="audit-row">
<span class="audit-label">审核日期</span>
<span class="audit-value">{{ auditDate || '--' }}</span>
</div>
<div class="audit-row">
<span class="audit-label">审核意见</span>
<span class="audit-value">{{ auditOpinion || '--' }}</span>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import { decryptWithSM4 } from '@/utils/sm'
import {
getTransferApplyFilesByApplyIdApi,
getTransferApplyApi
} from '@/api/filesTransfer/apply'
export default {
name: 'DetailData',
data() {
return {
id: decryptWithSM4(this.$route.query.id),
viewStatus: decryptWithSM4(this.$route.query.viewStatus),
status: decryptWithSM4(this.$route.query.auditStatus), // approving, approved, rejected
projectName: '',
receivingOrg: '',
approvalComment: '', //
fileList: [],
//
auditUserName: '',
auditDate: '',
auditOpinion: ''
}
},
computed: {
statusIconClass() {
const iconMap = {
'approving': 'el-icon-time',
'approved': 'el-icon-check',
'rejected': 'el-icon-close'
}
return iconMap[this.status] || 'el-icon-time'
},
statusText() {
const textMap = {
'approving': '审批中',
'approved': '已通过',
'rejected': '已驳回'
}
return textMap[this.status] || '审批中'
},
showApprovalActions() {
return this.status === 'approving'
},
showApprovalActions2() {
return this.status === 'approved' || this.status === 'rejected'
}
},
mounted() {
//
document.body.style.overflow = 'hidden';
},
beforeDestroy() {
//
document.body.style.overflow = 'auto';
},
created(){
this.initData();
},
methods: {
handleClose() {
const obj = { path: "/archivesManagement/filesTransfer/apply" }
this.$tab.closeOpenPage(obj)
},
async initData() {
this.fileList = [];
const res = await getTransferApplyFilesByApplyIdApi({ id: this.id });
console.log(res);
const res2 = await getTransferApplyApi({ id: this.id });
this.projectName = res2?.data?.proName || '/';
this.receivingOrg = res2?.data?.deptName || '/';
//
this.auditUserName = res2?.data?.auditUserName || '--';
this.auditDate = res2?.data?.transfertTime || '--';
this.auditOpinion = res2?.data?.auditOpinion || '--';
if (Array.isArray(res.data) && res.data.length > 0) {
res.data.map(item => {
const newFile = {
proName: item.proName,
singleProName: item.singleProName,
createUserName: item.createUserName,
createTime: item.createTime,
archiveName: item?.parParentName + '/' + item?.parentName + '/' + item?.fileName,
}
this.fileList.push(newFile);
})
}
},
handleApprove() {
if (!this.approvalComment.trim()) {
this.$message.warning('请填写审批意见')
return
}
this.$confirm('确认同意此申请?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'success'
}).then(() => {
this.status = 'approved'
this.$message.success('审批通过')
// API
console.log('审批意见:', this.approvalComment)
}).catch(() => {
//
})
},
handleReject() {
if (!this.approvalComment.trim()) {
this.$message.warning('请填写审批意见')
return
}
this.$confirm('确认驳回此申请?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.status = 'rejected'
this.$message.success('已驳回申请')
// API
console.log('驳回原因:', this.approvalComment)
}).catch(() => {
//
})
}
}
}
</script>
<style lang="scss" scoped>
.detail-container {
padding: 20px;
background: #fff;
height: calc(100vh - 120px); /* 减去头部导航栏的高度 */
overflow-y: auto;
box-sizing: border-box;
/* 自定义滚动条样式 */
&::-webkit-scrollbar {
width: 6px;
background: #f5f5f5;
}
&::-webkit-scrollbar-track {
background: #f5f5f5;
border-radius: 3px;
}
&::-webkit-scrollbar-thumb {
background: #c0c4cc;
border-radius: 3px;
transition: background 0.3s;
}
&::-webkit-scrollbar-thumb:hover {
background: #909399;
}
}
.status-section {
text-align: center;
margin-bottom: 40px;
.status-icon {
margin-bottom: 15px;
i {
font-size: 80px;
color: #409eff;
}
}
.status-text {
font-size: 24px;
font-weight: bold;
color: #333;
}
}
.content-section {
margin-bottom: 30px;
.section-title {
display: flex;
align-items: center;
margin-bottom: 15px;
.title-bar {
width: 4px;
height: 20px;
background: #409eff;
margin-right: 10px;
}
span {
font-size: 18px;
font-weight: bold;
color: #333;
}
}
.content-info {
display: flex;
align-items: center;
gap: 30px;
.project-name {
font-size: 16px;
color: #333;
}
.receiving-org {
font-size: 14px;
color: #666;
}
}
}
.table-section {
margin-bottom: 30px;
.detail-table {
.archive-name-cell {
white-space: normal;
word-break: break-word;
line-height: 1.4;
}
}
}
.approval-section {
margin-top: 30px;
.section-title {
display: flex;
align-items: center;
margin-bottom: 20px;
.title-bar {
width: 4px;
height: 20px;
background: #409eff;
margin-right: 10px;
}
span {
font-size: 18px;
font-weight: bold;
color: #333;
}
}
.approval-form {
.audit-info {
padding: 4px 0 0 6px;
}
.audit-row {
margin-bottom: 10px;
font-size: 14px;
color: #333;
}
.audit-label {
display: inline-block;
min-width: 80px;
color: #666;
}
.audit-value {
color: #333;
}
.form-item {
margin-bottom: 20px;
.form-label {
display: block;
margin-bottom: 8px;
font-size: 14px;
font-weight: 500;
color: #333;
}
.comment-textarea {
width: 100%;
::v-deep .el-textarea__inner {
border: 1px solid #dcdfe6;
border-radius: 4px;
padding: 10px;
font-size: 14px;
line-height: 1.5;
resize: vertical;
min-height: 100px;
&:focus {
border-color: #409eff;
outline: none;
}
}
}
}
.approval-actions {
text-align: center;
padding: 20px 0;
.el-button {
margin: 0 10px;
padding: 10px 30px;
font-size: 14px;
}
}
}
}
//
.status-section {
.status-icon i {
&.el-icon-time {
color: #409eff; // -
}
&.el-icon-check {
color: #67c23a; // - 绿
}
&.el-icon-close {
color: #f56c6c; // -
}
}
.status-text {
&.approving {
color: #409eff;
}
&.approved {
color: #67c23a;
}
&.rejected {
color: #f56c6c;
}
}
}
</style>

View File

@ -104,8 +104,6 @@ export default {
name: 'DetailData',
query: {
id: encryptWithSM4(row.id ?? '0'),
viewStatus: encryptWithSM4('detail'),
auditStatus: encryptWithSM4(this.getStatusText2(row.auditStatus)),
}
})
},
@ -115,7 +113,7 @@ export default {
},
/** 删除操作 */
handleDelete(row) {
this.$modal.confirm(`是否确认删除数据类型名称为"${row.dataTypeName}"的数据项?`).then(() => {
this.$modal.confirm(`是否确认删除数据项?`).then(() => {
//
this.$modal.loading("正在删除,请稍候...");
delTransferApplyApi({ id: row.id }).then(res => {

View File

@ -316,14 +316,7 @@ export default {
this.checkTreeData.push(newFile);
})
}
/* // 模拟添加文件数据到表格
const newFile = {
id: nodeId,
category: '分类' + (this.checkTreeData.length + 1),
archiveVolume: '案卷' + (this.checkTreeData.length + 1),
fileName: '文件' + (this.checkTreeData.length + 1) + '.pdf'
};
this.checkTreeData.push(newFile); */
//
this.$nextTick(() => {
this.$refs.ruleForm.validateField('checkTreeData');

View File

@ -28,7 +28,7 @@
<!-- 文件详情表格 -->
<div class="table-section">
<el-table :data="fileList" border style="width: 100%" class="detail-table">
<el-table-column prop="index" label="序号" width="80" align="center" sortable>
<el-table-column prop="index" label="序号" width="80" align="center">
<template slot-scope="scope">
{{ scope.$index + 1 }}
</template>

View File

@ -0,0 +1,229 @@
<template>
<div class="detail-container">
<!-- 返回按钮 -->
<div class="back-btn">
<el-button type="danger" plain icon="el-icon-close" size="mini" @click="handleClose">返回</el-button>
</div>
<!-- 移交内容区域 -->
<div class="content-section">
<div class="section-title">
<div class="title-bar"></div>
<span>移交内容</span>
</div>
<div class="content-info">
<span class="project-name">{{ projectName }}</span>
<span class="receiving-org">接收组织: {{ receivingOrg }}</span>
</div>
</div>
<!-- 文件详情表格 -->
<div class="table-section">
<el-table :data="fileList" border style="width: 100%" class="detail-table">
<el-table-column prop="index" label="序号" width="80" align="center">
<template slot-scope="scope">
{{ scope.$index + 1 }}
</template>
</el-table-column>
<el-table-column prop="proName" label="项目名称" min-width="150">
<template slot-scope="scope">
{{ scope.row.proName || '--'}}
</template>
</el-table-column>
<el-table-column prop="singleProName" label="单项工程名称" min-width="150">
<template slot-scope="scope">
{{ scope.row.singleProName || '--' }}
</template>
</el-table-column>
<el-table-column prop="createUserName" label="申请人" min-width="100">
<template slot-scope="scope">
{{ scope.row.createUserName || '--' }}
</template>
</el-table-column>
<el-table-column prop="createTime" label="申请时间" min-width="120">
<template slot-scope="scope">
{{ scope.row.createTime || '--' }}
</template>
</el-table-column>
<el-table-column prop="archiveName" label="档案名称" min-width="300">
<template slot-scope="scope">
<div class="archive-name-cell">{{ scope.row.archiveName }}</div>
</template>
</el-table-column>
</el-table>
</div>
</div>
</template>
<script>
import { decryptWithSM4 } from '@/utils/sm'
import {
getTransferApplyFilesByApplyIdApi,
getTransferApplyApi
} from '@/api/filesTransfer/apply'
export default {
name: 'RecordDetail',
data() {
return {
id: decryptWithSM4(this.$route.query.id),
projectName: '',
receivingOrg: '',
fileList: [],
//
}
},
mounted() {
//
document.body.style.overflow = 'hidden';
},
beforeDestroy() {
//
document.body.style.overflow = 'auto';
},
created(){
this.initData();
},
methods: {
handleClose() {
const obj = { path: "/archivesManagement/filesTransfer/record" }
this.$tab.closeOpenPage(obj)
},
async initData() {
this.fileList = [];
const res = await getTransferApplyFilesByApplyIdApi({ id: this.id });
console.log(res);
const res2 = await getTransferApplyApi({ id: this.id });
this.projectName = res2?.data?.proName || '/';
this.receivingOrg = res2?.data?.deptName || '/';
if (Array.isArray(res.data) && res.data.length > 0) {
res.data.map(item => {
const newFile = {
proName: item.proName,
singleProName: item.singleProName,
createUserName: item.createUserName,
createTime: item.createTime,
archiveName: item?.parParentName + '/' + item?.parentName + '/' + item?.fileName,
}
this.fileList.push(newFile);
})
}
},
}
}
</script>
<style lang="scss" scoped>
.detail-container {
padding: 20px;
background: #fff;
height: calc(100vh - 120px); /* 减去头部导航栏的高度 */
overflow-y: auto;
box-sizing: border-box;
/* 自定义滚动条样式 */
&::-webkit-scrollbar {
width: 6px;
background: #f5f5f5;
}
&::-webkit-scrollbar-track {
background: #f5f5f5;
border-radius: 3px;
}
&::-webkit-scrollbar-thumb {
background: #c0c4cc;
border-radius: 3px;
transition: background 0.3s;
}
&::-webkit-scrollbar-thumb:hover {
background: #909399;
}
}
.status-section {
text-align: center;
margin-bottom: 40px;
.status-icon {
margin-bottom: 15px;
i {
font-size: 80px;
color: #409eff;
}
}
.status-text {
font-size: 24px;
font-weight: bold;
color: #333;
}
}
.content-section {
margin-bottom: 30px;
.section-title {
display: flex;
align-items: center;
margin-bottom: 15px;
.title-bar {
width: 4px;
height: 20px;
background: #409eff;
margin-right: 10px;
}
span {
font-size: 18px;
font-weight: bold;
color: #333;
}
}
.content-info {
display: flex;
align-items: center;
gap: 30px;
.project-name {
font-size: 16px;
color: #333;
}
.receiving-org {
font-size: 14px;
color: #666;
}
}
}
.table-section {
margin-bottom: 30px;
.detail-table {
.archive-name-cell {
white-space: normal;
word-break: break-word;
line-height: 1.4;
}
}
}
.back-btn{
height: 50px;
}
</style>

View File

@ -0,0 +1,152 @@
<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-form :model="form" :rules="rules" ref="ruleForm" label-width="110px">
<el-form-item label="文件名称" prop="fileName">
<el-input class="form-item" v-model="form.fileName" clearable show-word-limit placeholder="请输入文件名称"
maxlength="32"></el-input>
</el-form-item>
</el-form>
</div>
<span slot="footer" class="dialog-footer">
<el-button class="clear-btn" @click="handleClose" :disabled="disabled">取消</el-button>
<el-button type="primary" class="search-btn" :disabled="disabled"
@click="submitForm('ruleForm')">确认</el-button>
</span>
</el-dialog>
</template>
<script>
import _ from 'lodash'
import {
updateDataClassAPI,
} from '@/api/data-collect/data-class-manage'
export default {
name: "Maintenance",
props: ["width", "dataForm", "title", "disabled", "rowData"],
data() {
return {
lDialog: this.width > 500 ? "w700" : "w500",
dialogVisible: true,
isDisabled: true,
form: {
id: null,
fileName: null,
},
loading: null,
rules: {
fileName: [
{ required: true, message: '请输入文件名称', trigger: 'blur' }
],
},
};
},
created() {
this.initFormData();
},
methods: {
/** 初始化表单数据 */
initFormData() {
if (this.rowData) {
//
this.form = {
id: this.rowData.id,
fileName: this.rowData.fileName || null,
};
}
},
/*关闭弹窗 */
handleClose() {
this.dialogVisible = false;
this.$emit("closeDialog");
setTimeout(() => {
this.dialogVisible = true;
});
},
/**确认弹窗 */
sureBtnClick() {
this.dialogVisible = false;
this.$emit("closeDialog");
setTimeout(() => {
this.dialogVisible = true;
});
},
/**重置表单*/
reset() {
this.form = {
id: null,
fileName: null,
};
this.resetForm("ruleForm");
},
handleReuslt(res) {
this.$modal.msgSuccess(res.msg);
this.reset();
this.$emit('handleQuery');
this.handleClose();
},
/**验证 */
submitForm(formName) {
this.$refs[formName].validate(valid => {
if (valid) {
//
this.loading = this.$loading({
lock: true,
text: "数据提交中,请稍候...",
background: 'rgba(0,0,0,0.5)',
target: this.$el.querySelector('.el-dialog') || document.body
})
let params = _.cloneDeep(this.form);
updateDataClassAPI(params).then(res => {
this.loading.close();
if (res.code === 200) {
this.handleReuslt(res);
} else {
this.$modal.msgError(res.msg);
}
}).catch(error => {
this.loading.close();
// this.$modal.msgError('');
});
}
});
}
}
};
</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

@ -3,13 +3,28 @@
<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-column label="操作" width="100" align="center">
<template slot-scope="scope">
<el-button v-if="jumpType === 'list'" hasPermi="['transfer:record:maintenance']" plain
type="primary" size="mini" @click="handleMaintenance(scope.row)">维护</el-button>
<el-button v-if="jumpType === 'progress'" hasPermi="['transfer:record:transfer']" plain
type="primary" size="mini" @click="transfer(scope.row)">移交</el-button>
</template>
</el-table-column>
</el-table>
</div>
<span slot="footer" class="dialog-footer">
<el-button class="clear-btn" @click="handleClose" :disabled="disabled">取消</el-button>
<el-button type="primary" class="search-btn" :disabled="disabled"
@click="submitForm('ruleForm')">确认</el-button>
</span>
<Maintenance v-if="isflag" :rowData="maintenanceRow" :title="maintenanceTitle" @closeDialog="closeDialog"
:dataForm="maintenanceRow" :width="600" />
</el-dialog>
</template>
<script>
@ -18,29 +33,25 @@ import {
addDataClassAPI,
updateDataClassAPI,
} from '@/api/data-collect/data-class-manage'
import Maintenance from './maintenance.vue';
export default {
name: "RecordList",
props: ["width", "dataForm", "title", "disabled", "isAdd", "rowData"],
props: ["width", "dataForm", "title", "disabled", "jumpType", "rowData"],
dicts: ['data_class_type'],
components: {
Maintenance
},
data() {
return {
lDialog: this.width > 500 ? "w700" : "w500",
dialogVisible: true,
isDisabled: true,
form: {
pid: null,
dataTypeName: '',
remark: '',
},
loading: null,
rules: {
pid: [
{ required: true, message: '请选择数据分类类型', trigger: 'change' }
],
dataTypeName: [
{ required: true, message: '数据类型名称不能为空', trigger: 'blur' }
],
},
tableData: [],
tableColumns: [],
maintenanceTitle: "",
isflag: false,
maintenanceRow: {},
};
},
created() {
@ -49,23 +60,45 @@ export default {
methods: {
/** 初始化表单数据 */
initFormData() {
if (this.isAdd === 'edit' && this.rowData) {
//
this.form = {
id: this.rowData.id,
pid: this.rowData.pid || null,
dataTypeName: this.rowData.dataTypeName || '',
remark: this.rowData.remark || '',
};
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.form = {
pid: null,
dataTypeName: '',
remark: '',
};
//
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;
@ -74,70 +107,38 @@ export default {
this.dialogVisible = true;
});
},
/**确认弹窗 */
sureBtnClick() {
this.dialogVisible = false;
this.$emit("closeDialog");
setTimeout(() => {
this.dialogVisible = true;
});
/*维护*/
handleMaintenance(row) {
this.maintenanceTitle = "维护";
this.maintenanceRow = row;
this.isflag = true;
},
/**重置表单*/
reset() {
this.form = {
id: null,
pid: null,
dataTypeName: '',
remark: '',
};
this.resetForm("ruleForm");
},
handleReuslt(res) {
this.$modal.msgSuccess(res.msg);
this.reset();
this.$emit('handleQuery');
this.handleClose();
},
/**验证 */
submitForm(formName) {
this.$refs[formName].validate(valid => {
if (valid) {
//
this.loading = this.$loading({
lock: true,
text: "数据提交中,请稍候...",
background: 'rgba(0,0,0,0.5)',
target: this.$el.querySelector('.el-dialog') || document.body
})
let params = _.cloneDeep(this.form);
if (this.isAdd === 'add') {
addDataClassAPI(params).then(res => {
this.loading.close();
if (res.code === 200) {
this.handleReuslt(res);
} else {
this.$modal.msgError(res.msg);
}
}).catch(error => {
this.loading.close();
// this.$modal.msgError('');
});
/*移交*/
transfer(row) {
this.$modal.confirm(`是否确认移交文件名称为"${row.fileName}"的数据项?`).then(() => {
//
this.$modal.loading("正在移交,请稍候...");
delTransferApplyApi({ id: row.id }).then(res => {
this.$modal.closeLoading();
if (res.code === 200) {
this.$modal.msgSuccess(res.msg);
this.reloadData();
} else {
updateDataClassAPI(params).then(res => {
this.loading.close();
if (res.code === 200) {
this.handleReuslt(res);
} else {
this.$modal.msgError(res.msg);
}
}).catch(error => {
this.loading.close();
// this.$modal.msgError('');
});
this.$modal.msgError(res.msg);
}
}
}).catch(error => {
this.$modal.closeLoading();
this.$modal.msgError("删除失败,请重试");
console.error('删除失败:', error);
});
}).catch(() => {
//
});
},
/* 刷新数据 */
reloadData() {
}
}
};

View File

@ -24,7 +24,7 @@
</template>
</TableModel>
<!-- 新增/编辑 -->
<RecordList v-if="isflag" :isAdd="isAdd" :rowData="row" @handleQuery="handleQuery" :title="title"
<RecordList v-if="isflag" :jumpType="jumpType" :rowData="row" @handleQuery="handleQuery" :title="title"
@closeDialog="closeDialog" @showColose="showColose" :dataForm="row" :disabled="loading" :width="600" />
</div>
</template>
@ -54,9 +54,9 @@ export default {
getTransferApplyListApi,
title: "",
isflag: false,
isAdd: '',
row: {},
loading: false,
jumpType:''
}
},
@ -81,7 +81,7 @@ export default {
//
handleDetail(row) {
this.$router.push({
name: 'DetailData',
name: 'RecordDetail',
query: {
id: encryptWithSM4(row.id ?? '0'),
viewStatus: encryptWithSM4('detail'),
@ -95,15 +95,15 @@ export default {
},
/* 查看移交清单 */
handleTList(row){
this.title = "修改";
this.isAdd = 'edit';
this.title = "移交清单";
this.row = row;
this.jumpType = 'list';
this.isflag = true;
},
/* 查看移交进度 */
handleTProgress(row){
this.title = "修改";
this.isAdd = 'edit';
this.title = "移交进度";
this.jumpType = 'progress';
this.row = row;
this.isflag = true;
},