移交申请
This commit is contained in:
parent
38145927dd
commit
81bfd4d250
|
|
@ -27,6 +27,15 @@ export function editTransferApplyApi(data) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 档案移交申请详情
|
||||||
|
export function getTransferApplyApi(params) {
|
||||||
|
return request({
|
||||||
|
url: '/smartArchives/transferApply/getTransferApply',
|
||||||
|
method: 'GET',
|
||||||
|
params: params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 删除档案移交申请
|
// 删除档案移交申请
|
||||||
export function delTransferApplyApi(data) {
|
export function delTransferApplyApi(data) {
|
||||||
return request({
|
return request({
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ export const formLabel = [
|
||||||
{
|
{
|
||||||
isShow: false, // 是否展示label
|
isShow: false, // 是否展示label
|
||||||
f_type: 'ipt',
|
f_type: 'ipt',
|
||||||
f_label: '项目名称',
|
f_label: '单项工程名称',
|
||||||
f_model: 'proName',
|
f_model: 'proName',
|
||||||
f_max: 32,
|
f_max: 32,
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ export const formLabel = [
|
||||||
{
|
{
|
||||||
isShow: false, // 是否展示label
|
isShow: false, // 是否展示label
|
||||||
f_type: 'ipt',
|
f_type: 'ipt',
|
||||||
f_label: '项目名称',
|
f_label: '单项工程名称',
|
||||||
f_model: 'proName',
|
f_model: 'proName',
|
||||||
f_max: 32,
|
f_max: 32,
|
||||||
},
|
},
|
||||||
|
|
@ -27,7 +27,7 @@ export const formLabel = [
|
||||||
export const columnsList = [
|
export const columnsList = [
|
||||||
{ t_props: 'proName', t_label: '项目名称' },
|
{ t_props: 'proName', t_label: '项目名称' },
|
||||||
{ t_props: 'singleProName', t_label: '单项工程名称' },
|
{ t_props: 'singleProName', t_label: '单项工程名称' },
|
||||||
{ t_props: 'applyUser', t_label: '申请人' },
|
{ t_props: 'createUserName', t_label: '申请人' },
|
||||||
{ t_props: 'applyTime', t_label: '申请时间' },
|
{ t_props: 'createTime', t_label: '申请时间' },
|
||||||
{ t_slot: 'auditStatus', t_label: '审批状态' },
|
{ t_slot: 'auditStatus', t_label: '审批状态' },
|
||||||
]
|
]
|
||||||
|
|
@ -14,14 +14,14 @@
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
<template slot="auditStatus" slot-scope="{ data }">
|
<template slot="auditStatus" slot-scope="{ data }">
|
||||||
<el-tag size="mini" :type="getStatusType(data.fileStatus)">
|
<el-tag size="mini" :type="getStatusType(data.auditStatus)">
|
||||||
{{ getStatusText(data.fileStatus) }}
|
{{ getStatusText(data.auditStatus) }}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template slot="handle" slot-scope="{ data }">
|
<template slot="handle" slot-scope="{ data }">
|
||||||
<el-button plain size="mini" type="primary" icon="el-icon-edit" v-hasPermi="['transfer:apply:edit']"
|
<el-button plain size="mini" type="primary" icon="el-icon-edit" v-hasPermi="['transfer:apply:edit']"
|
||||||
@click="handleUpdate(data)" v-if="data.auditStatus === '2'">
|
@click="handleUpdate(data)">
|
||||||
修改
|
修改
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button plain size="mini" type="danger" icon="el-icon-delete" v-hasPermi="['transfer:apply:del']"
|
<el-button plain size="mini" type="danger" icon="el-icon-delete" v-hasPermi="['transfer:apply:del']"
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,8 @@
|
||||||
<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="proId">
|
<el-form-item label="项目" prop="proId">
|
||||||
<el-select class="form-item" v-model="form.proId" filterable clearable placeholder="请选择项目" @change="handleProChange">
|
<el-select class="form-item" v-model="form.proId" filterable clearable placeholder="请选择项目"
|
||||||
|
@change="handleProChange">
|
||||||
<el-option v-for="item in proList" :key="item.id" :label="item.name"
|
<el-option v-for="item in proList" :key="item.id" :label="item.name"
|
||||||
:value="item.id"></el-option>
|
:value="item.id"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
|
|
@ -70,7 +71,8 @@ import {
|
||||||
saveTransferApplyApi,
|
saveTransferApplyApi,
|
||||||
editTransferApplyApi,
|
editTransferApplyApi,
|
||||||
getProSelectApi,
|
getProSelectApi,
|
||||||
getTransferApplyFilesApi
|
getTransferApplyFilesApi,
|
||||||
|
getTransferApplyApi
|
||||||
} from '@/api/filesTransfer/apply'
|
} from '@/api/filesTransfer/apply'
|
||||||
import { getDeptSelectApi } from '@/api/select'
|
import { getDeptSelectApi } from '@/api/select'
|
||||||
import Treeselect from "@riophae/vue-treeselect";
|
import Treeselect from "@riophae/vue-treeselect";
|
||||||
|
|
@ -131,6 +133,22 @@ export default {
|
||||||
await getProSelectApi().then(res => {
|
await getProSelectApi().then(res => {
|
||||||
this.proList = res.data;
|
this.proList = res.data;
|
||||||
});
|
});
|
||||||
|
const res = await getTransferApplyApi({ id: this.rowData.id });
|
||||||
|
if (Array.isArray(res.data.transferFileDtos) && res.data.transferFileDtos.length > 0) {
|
||||||
|
res.data.transferFileDtos.map(item => {
|
||||||
|
const newFile = {
|
||||||
|
proFilesContentsId: item.id,
|
||||||
|
parParentName: item.parParentName,
|
||||||
|
parentName: item.parentName,
|
||||||
|
fileName: item.fileName,
|
||||||
|
proId: item.proId,
|
||||||
|
fileSourceId: item.fileId,
|
||||||
|
filePath: item.filePath
|
||||||
|
};
|
||||||
|
this.checkTreeData.push(newFile);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
if (this.isAdd === 'edit' && this.rowData) {
|
if (this.isAdd === 'edit' && this.rowData) {
|
||||||
// 编辑模式:填充表单数据
|
// 编辑模式:填充表单数据
|
||||||
this.form = {
|
this.form = {
|
||||||
|
|
@ -146,7 +164,7 @@ export default {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleProChange(value){
|
handleProChange(value) {
|
||||||
console.log(value);
|
console.log(value);
|
||||||
this.checkTreeData = [];
|
this.checkTreeData = [];
|
||||||
},
|
},
|
||||||
|
|
@ -217,7 +235,7 @@ export default {
|
||||||
params.deptName = obj?.label || '';
|
params.deptName = obj?.label || '';
|
||||||
params.transferFileDtos = this.checkTreeData;
|
params.transferFileDtos = this.checkTreeData;
|
||||||
console.log(params);
|
console.log(params);
|
||||||
|
|
||||||
if (this.isAdd === 'add') {
|
if (this.isAdd === 'add') {
|
||||||
saveTransferApplyApi(params).then(res => {
|
saveTransferApplyApi(params).then(res => {
|
||||||
this.loading.close();
|
this.loading.close();
|
||||||
|
|
@ -269,19 +287,19 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
findNodeById(nodes, id) {
|
findNodeById(nodes, id) {
|
||||||
for (const node of nodes) {
|
for (const node of nodes) {
|
||||||
if (node.id === id) return node;
|
if (node.id === id) return node;
|
||||||
if (node.children) {
|
if (node.children) {
|
||||||
const found = this.findNodeById(node.children, id);
|
const found = this.findNodeById(node.children, id);
|
||||||
if (found) return found;
|
if (found) return found;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
return null;
|
||||||
return null;
|
|
||||||
},
|
},
|
||||||
// 获取选中的节点
|
// 获取选中的节点
|
||||||
async getTreeData(nodeId) {
|
async getTreeData(nodeId) {
|
||||||
this.checkTreeData = [];
|
this.checkTreeData = [];
|
||||||
const res = await getTransferApplyFilesApi({ proId:this.form.proId,id:nodeId });
|
const res = await getTransferApplyFilesApi({ proId: this.form.proId, id: nodeId });
|
||||||
if (Array.isArray(res.data) && res.data.length > 0) {
|
if (Array.isArray(res.data) && res.data.length > 0) {
|
||||||
res.data.map(item => {
|
res.data.map(item => {
|
||||||
const newFile = {
|
const newFile = {
|
||||||
|
|
@ -290,8 +308,8 @@ export default {
|
||||||
parentName: item.parentName,
|
parentName: item.parentName,
|
||||||
fileName: item.fileName,
|
fileName: item.fileName,
|
||||||
proId: item.proId,
|
proId: item.proId,
|
||||||
fileSourceId:item.fileId,
|
fileSourceId: item.fileId,
|
||||||
filePath:item.filePath
|
filePath: item.filePath
|
||||||
};
|
};
|
||||||
this.checkTreeData.push(newFile);
|
this.checkTreeData.push(newFile);
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue