档案移交记录
This commit is contained in:
parent
155bc1e5c6
commit
bddee75917
|
|
@ -9,11 +9,29 @@ export function getTransferRecordListApi(params) {
|
|||
})
|
||||
}
|
||||
|
||||
// 新增档案移交申请
|
||||
export function saveTransferApplyApi(data) {
|
||||
// 移交清单
|
||||
export function getTransferRecordFilesApi(params) {
|
||||
return request({
|
||||
url: '/smartArchives/transferApply/saveTransferApply',
|
||||
method: 'POST',
|
||||
data
|
||||
url: '/smartArchives/transferRecord/getTransferRecordFiles',
|
||||
method: 'GET',
|
||||
params: params,
|
||||
})
|
||||
}
|
||||
|
||||
// 维护
|
||||
export function updateTransferRecordFileApi(data) {
|
||||
return request({
|
||||
url: '/smartArchives/transferRecord/updateTransferRecordFile',
|
||||
method: 'POST',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
// 移交
|
||||
export function updateTransferRecordFilesStatusApi(data) {
|
||||
return request({
|
||||
url: '/smartArchives/transferRecord/updateTransferRecordFilesStatus',
|
||||
method: 'POST',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -199,6 +199,8 @@ export default {
|
|||
},
|
||||
async initData() {
|
||||
this.fileList = [];
|
||||
console.error(this.id);
|
||||
|
||||
const res = await getTransferApplyFilesByApplyIdApi({ id: this.id });
|
||||
console.log(res);
|
||||
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@
|
|||
</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>
|
||||
<div class="archive-name-cell file-name-link" @click="viewFile(scope.row)">{{ scope.row.archiveName }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
|
@ -68,7 +68,7 @@
|
|||
|
||||
<el-table-column prop="archiveName" label="档案名称" min-width="300">
|
||||
<template slot-scope="scope">
|
||||
<div class="archive-name-cell">{{ scope.row.archiveName }}</div>
|
||||
<div class="archive-name-cell file-name-link" @click="viewFile(scope.row)">{{ scope.row.archiveName }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="createTime" label="接收状态" min-width="120">
|
||||
|
|
@ -106,6 +106,8 @@
|
|||
<el-button type="primary" class="search-btn" @click="confirmTransferStatus">确定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
<!-- 预览文件 -->
|
||||
<ViewFile v-if="isViewflag" :rowData="row" :title="title" @closeDialog="closeDialog" @showColose="showColose" :width="600" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
@ -115,8 +117,10 @@ import {
|
|||
getTransferApplyFilesByApplyIdApi,
|
||||
getTransferApplyApi
|
||||
} from '@/api/filesTransfer/apply'
|
||||
import ViewFile from '@/views/viewFile/viewFile.vue'
|
||||
export default {
|
||||
name: 'RecordDetail',
|
||||
components:{ViewFile},
|
||||
data() {
|
||||
return {
|
||||
id: decryptWithSM4(this.$route.query.id),
|
||||
|
|
@ -125,6 +129,9 @@ export default {
|
|||
receivingOrg: '',
|
||||
fileList: [],
|
||||
confirmDialogVisible: false,
|
||||
isViewflag: false,
|
||||
row: {},
|
||||
title: "",
|
||||
}
|
||||
},
|
||||
|
||||
|
|
@ -140,6 +147,20 @@ export default {
|
|||
this.initData();
|
||||
},
|
||||
methods: {
|
||||
// 预览文件
|
||||
viewFile(row) {
|
||||
console.error(row);
|
||||
|
||||
this.title = "预览";
|
||||
this.row = row;
|
||||
this.isViewflag = true;
|
||||
},
|
||||
closeDialog() {
|
||||
this.isViewflag = false;
|
||||
},
|
||||
showColose() {
|
||||
this.isflag = false;
|
||||
},
|
||||
handleClose() {
|
||||
let obj = null;
|
||||
if(this.viewStatus === 'record'){
|
||||
|
|
@ -343,4 +364,11 @@ export default {
|
|||
color: #909399;
|
||||
line-height: 1.4;
|
||||
}
|
||||
.file-name-link {
|
||||
color: #409EFF;
|
||||
cursor: pointer;
|
||||
}
|
||||
.file-name-link:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -20,8 +20,8 @@
|
|||
<script>
|
||||
import _ from 'lodash'
|
||||
import {
|
||||
updateDataClassAPI,
|
||||
} from '@/api/data-collect/data-class-manage'
|
||||
updateTransferRecordFileApi,
|
||||
} from '@/api/filesTransfer/record'
|
||||
export default {
|
||||
name: "Maintenance",
|
||||
props: ["width", "dataForm", "title", "disabled", "rowData"],
|
||||
|
|
@ -98,7 +98,7 @@ export default {
|
|||
target: this.$el.querySelector('.el-dialog') || document.body
|
||||
})
|
||||
let params = _.cloneDeep(this.form);
|
||||
updateDataClassAPI(params).then(res => {
|
||||
updateTransferRecordFileApi(params).then(res => {
|
||||
this.loading.close();
|
||||
if (res.code === 200) {
|
||||
this.handleReuslt(res);
|
||||
|
|
|
|||
|
|
@ -13,9 +13,9 @@
|
|||
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
|
||||
<el-button v-if="jumpType === 'list' && scope.row.transferStatus === '进行中'" hasPermi="['record:file:update']" plain
|
||||
type="primary" size="mini" @click="handleMaintenance(scope.row)">维护</el-button>
|
||||
<el-button v-if="jumpType === 'progress'" hasPermi="['transfer:record:transfer']" plain
|
||||
<el-button v-if="jumpType === 'progress' && scope.row.transferStatus === '进行中'" hasPermi="['record:file:transfer']" plain
|
||||
type="primary" size="mini" @click="transfer(scope.row)">移交</el-button>
|
||||
</template>
|
||||
|
||||
|
|
@ -24,15 +24,15 @@
|
|||
</div>
|
||||
|
||||
<Maintenance v-if="isflag" :rowData="maintenanceRow" :title="maintenanceTitle" @closeDialog="closeDialog"
|
||||
:dataForm="maintenanceRow" :width="600" />
|
||||
:dataForm="maintenanceRow" :width="600" @handleQuery="handleQuery" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
import _ from 'lodash'
|
||||
import {
|
||||
addDataClassAPI,
|
||||
updateDataClassAPI,
|
||||
} from '@/api/data-collect/data-class-manage'
|
||||
getTransferRecordFilesApi,
|
||||
updateTransferRecordFilesStatusApi
|
||||
} from '@/api/filesTransfer/record'
|
||||
import Maintenance from './maintenance.vue';
|
||||
export default {
|
||||
name: "RecordList",
|
||||
|
|
@ -52,6 +52,7 @@ export default {
|
|||
maintenanceTitle: "",
|
||||
isflag: false,
|
||||
maintenanceRow: {},
|
||||
getTransferRecordFilesApi
|
||||
};
|
||||
},
|
||||
created() {
|
||||
|
|
@ -59,39 +60,38 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
/** 初始化表单数据 */
|
||||
initFormData() {
|
||||
|
||||
this.tableColumns = [];
|
||||
async initFormData() {
|
||||
this.tableColumns = [];
|
||||
if (this.jumpType === 'list') {
|
||||
// 移交清单
|
||||
this.tableColumns = [
|
||||
{ prop: 'proName', label: '所属分类' },
|
||||
{ prop: 'singleProName', label: '所属案卷' },
|
||||
{ prop: 'parParentName', label: '所属分类' },
|
||||
{ prop: 'parentName', 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: '进度' },
|
||||
{ prop: 'parParentName', label: '所属分类' },
|
||||
{ prop: 'parentName', label: '所属案卷' },
|
||||
{ prop: 'fileName', label: '文件名称' },
|
||||
{ prop: 'transferStatus', label: '进度' },
|
||||
];
|
||||
this.tableData = [{
|
||||
id: 1,
|
||||
proName: '所属分类',
|
||||
singleProName: '所属案卷',
|
||||
fileName: '文件名称',
|
||||
createUserName: '操作',
|
||||
progress: '进度',
|
||||
}];
|
||||
}
|
||||
const transferApplyId = this.rowData.id;
|
||||
const res = await getTransferRecordFilesApi({ transferApplyId });
|
||||
console.log(res);
|
||||
|
||||
if (Array.isArray(res.data) && res.data.length > 0) {
|
||||
|
||||
res.data.map(item => {
|
||||
|
||||
const obj = {...item,transferStatus:(item.transferStatus ?? '0') === '0' ? '进行中' : '已完成'};
|
||||
this.tableData.push(obj);
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
closeDialog() {
|
||||
this.isflag = false;
|
||||
|
|
@ -119,11 +119,15 @@ export default {
|
|||
this.$modal.confirm(`是否确认移交文件名称为"${row.fileName}"的数据项?`).then(() => {
|
||||
// 显示加载遮罩
|
||||
this.$modal.loading("正在移交,请稍候...");
|
||||
delTransferApplyApi({ id: row.id }).then(res => {
|
||||
const transferApplyId = this.rowData.id;
|
||||
const id = row.id;
|
||||
const transferStatus = '1';
|
||||
updateTransferRecordFilesStatusApi({ transferApplyId,id,transferStatus }).then(res => {
|
||||
this.$modal.closeLoading();
|
||||
if (res.code === 200) {
|
||||
this.$modal.msgSuccess(res.msg);
|
||||
this.reloadData();
|
||||
this.handleQuery();
|
||||
this.$emit("handleQuery");
|
||||
} else {
|
||||
this.$modal.msgError(res.msg);
|
||||
}
|
||||
|
|
@ -136,8 +140,18 @@ export default {
|
|||
});
|
||||
},
|
||||
/* 刷新数据 */
|
||||
reloadData() {
|
||||
async handleQuery() {
|
||||
this.tableData = [];
|
||||
const transferApplyId = this.rowData.id;
|
||||
const res = await getTransferRecordFilesApi({ transferApplyId });
|
||||
|
||||
if (Array.isArray(res.data) && res.data.length > 0) {
|
||||
res.data.map(item => {
|
||||
|
||||
const obj = {...item,transferStatus:(item.transferStatus ?? '0') === '0' ? '进行中' : '已完成'};
|
||||
this.tableData.push(obj);
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ export const formLabel = [
|
|||
isShow: false, // 是否展示label
|
||||
f_type: 'date',
|
||||
f_label: '移交时间',
|
||||
f_model: 'transferDate',
|
||||
f_model: 'transfertTime',
|
||||
},
|
||||
|
||||
]
|
||||
|
|
@ -25,8 +25,8 @@ export const formLabel = [
|
|||
export const columnsList = [
|
||||
{ t_props: 'proName', t_label: '项目名称' },
|
||||
{ t_props: 'singleProName', t_label: '单项工程名称' },
|
||||
{ t_props: 'singleProName', t_label: '移交时间' },
|
||||
{ t_props: 'createUserName', t_label: '接收单位' },
|
||||
{ t_props: 'transferTime', t_label: '移交时间' },
|
||||
{ t_props: 'deptName', t_label: '接收单位' },
|
||||
{ t_slot: 't_list', t_label: '移交清单' },
|
||||
{ t_slot: 't_progress', t_label: '移交进度' },
|
||||
]
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<!-- 档案移交申请 -->
|
||||
<!-- 档案移交记录 -->
|
||||
<div class="app-container">
|
||||
<TableModel :formLabel="formLabel" :showOperation="true" :showRightTools="true" ref="recordTableRef"
|
||||
:columnsList="columnsList" :request-api="getTransferRecordListApi">
|
||||
|
|
@ -10,16 +10,11 @@
|
|||
/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<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>
|
||||
<span class="jump" @click="handleTProgress(data)">{{ getProgressStatusText(data.transferStatus) }}</span>
|
||||
</template>
|
||||
|
||||
<template slot="handle" slot-scope="{ data }">
|
||||
|
|
|
|||
Loading…
Reference in New Issue