移交申请详情
This commit is contained in:
parent
086b2da5c3
commit
b943040b03
|
|
@ -162,6 +162,7 @@ export const dynamicRoutes = [
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
/* 档案管理详情数据 */
|
||||||
{
|
{
|
||||||
path: '/archivesManagement/fileManager/file-data',
|
path: '/archivesManagement/fileManager/file-data',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
|
|
@ -175,6 +176,21 @@ export const dynamicRoutes = [
|
||||||
meta: { title: '档案管理数据', activeMenu: '/archivesManagement/fileManager', noCache: true }
|
meta: { title: '档案管理数据', activeMenu: '/archivesManagement/fileManager', noCache: true }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
/* 档案移交申请详情 */
|
||||||
|
{
|
||||||
|
path: '/filesTransfer/apply/detail-data',
|
||||||
|
component: Layout,
|
||||||
|
hidden: true,
|
||||||
|
permissions: ['transfer:apply:query'],
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: 'index',
|
||||||
|
component: () => import('@/views/filesTransfer/apply/detail-data'),
|
||||||
|
name: 'DetailData',
|
||||||
|
meta: { title: '档案移交申请详情', activeMenu: '/filesTransfer/apply', noCache: true }
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
</div>
|
</div>
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button class="clear-btn" @click="handleClose">取消</el-button>
|
<el-button class="clear-btn" @click="handleClose">取消</el-button>
|
||||||
<el-button type="primary" class="search-btn" @click="submitForm('ruleForm')">确认</el-button>
|
<el-button type="primary" class="search-btn" @click="handleSave">确认</el-button>
|
||||||
</span>
|
</span>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
|
@ -166,11 +166,11 @@ export default {
|
||||||
this.dialogVisible = true;
|
this.dialogVisible = true;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleReuslt(res) {
|
// 保存数据
|
||||||
this.$modal.msgSuccess(res.msg);
|
handleSave(){
|
||||||
this.$emit('handleQuery');
|
this.$emit('getTreeData', this.selectedNodeId);
|
||||||
this.handleClose();
|
this.handleClose();
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import { decryptWithSM4 } from '@/utils/sm'
|
||||||
|
export default {
|
||||||
|
name: 'DetailData',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
id: decryptWithSM4(this.$route.query.id),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
@ -8,6 +8,10 @@
|
||||||
@click="handleAdd">
|
@click="handleAdd">
|
||||||
新增
|
新增
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<el-button plain size="mini" type="success" icon="el-icon-warning-outline" v-hasPermi="['transfer:apply:query']"
|
||||||
|
@click="handleDetail()">
|
||||||
|
详情
|
||||||
|
</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.fileStatus)">
|
||||||
|
|
@ -24,6 +28,10 @@
|
||||||
@click="handleDelete(data)">
|
@click="handleDelete(data)">
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<el-button plain size="mini" type="success" icon="el-icon-warning-outline" v-hasPermi="['transfer:apply:query']"
|
||||||
|
@click="handleDetail(data)">
|
||||||
|
详情
|
||||||
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</TableModel>
|
</TableModel>
|
||||||
<!-- 新增/编辑 -->
|
<!-- 新增/编辑 -->
|
||||||
|
|
@ -40,6 +48,7 @@ import {
|
||||||
getTransferApplyListApi,
|
getTransferApplyListApi,
|
||||||
} from '@/api/filesTransfer/apply.js'
|
} from '@/api/filesTransfer/apply.js'
|
||||||
import ApplyForm from './prop/applyForm'
|
import ApplyForm from './prop/applyForm'
|
||||||
|
import { encryptWithSM4 } from '@/utils/sm'
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
@ -93,6 +102,15 @@ export default {
|
||||||
this.row = row;
|
this.row = row;
|
||||||
this.isflag = true;
|
this.isflag = true;
|
||||||
},
|
},
|
||||||
|
// 详情
|
||||||
|
handleDetail(row) {
|
||||||
|
this.$router.push({
|
||||||
|
name: 'DetailData',
|
||||||
|
query: {
|
||||||
|
id: encryptWithSM4('1'),
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
/* 搜索操作 */
|
/* 搜索操作 */
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
this.$refs.applyTableRef.getTableList()
|
this.$refs.applyTableRef.getTableList()
|
||||||
|
|
|
||||||
|
|
@ -10,8 +10,46 @@
|
||||||
:value="item.id"></el-option>
|
:value="item.id"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="选择移交档案">
|
<el-form-item label="选择移交档案" prop="checkTreeData">
|
||||||
<el-button plain type="primary" size="mini" icon="el-icon-plus" @click="handleAddFile">选择</el-button>
|
<div>
|
||||||
|
<el-button plain type="primary" size="mini" icon="el-icon-plus" @click="handleAddFile">选择</el-button>
|
||||||
|
<!-- 选中文件表格 -->
|
||||||
|
<div v-if="checkTreeData && checkTreeData.length > 0" style="margin-top: 10px;">
|
||||||
|
<el-table :data="checkTreeData" border size="mini" style="width: 100%">
|
||||||
|
<el-table-column prop="index" label="序号" width="60" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.$index + 1 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="category" label="所属分类" min-width="200">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.category || '' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="archiveVolume" label="所属案卷" min-width="100">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.archiveVolume || '' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="fileName" label="文件名称" min-width="100">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.fileName || '' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" width="80" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
size="mini"
|
||||||
|
style="color: #f56c6c;"
|
||||||
|
@click="removeFile(scope.$index)">
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="接收组织" prop="deptId">
|
<el-form-item label="接收组织" prop="deptId">
|
||||||
<treeselect
|
<treeselect
|
||||||
|
|
@ -33,7 +71,7 @@
|
||||||
@click="submitForm('ruleForm')">确认</el-button>
|
@click="submitForm('ruleForm')">确认</el-button>
|
||||||
</span>
|
</span>
|
||||||
<FileTree v-if="isflag" :isAdd="isAdd" :rowData="fileTreeRow" :title="fileTreeTitle"
|
<FileTree v-if="isflag" :isAdd="isAdd" :rowData="fileTreeRow" :title="fileTreeTitle"
|
||||||
@closeDialog="closeDialog" :dataForm="fileTreeRow" :width="800" />
|
@closeDialog="closeDialog" @getTreeData="getTreeData" :dataForm="fileTreeRow" :width="600" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
|
@ -60,15 +98,27 @@ export default {
|
||||||
form: {
|
form: {
|
||||||
proId: undefined,
|
proId: undefined,
|
||||||
deptId: undefined,
|
deptId: undefined,
|
||||||
remark: '',
|
|
||||||
},
|
},
|
||||||
treeDataList: [],
|
treeDataList: [],
|
||||||
proList: [],
|
proList: [],
|
||||||
|
checkTreeData: [],
|
||||||
loading: null,
|
loading: null,
|
||||||
rules: {
|
rules: {
|
||||||
proId: [
|
proId: [
|
||||||
{ required: true, message: '请选择项目', trigger: 'change' }
|
{ required: true, message: '请选择项目', trigger: 'change' }
|
||||||
],
|
],
|
||||||
|
checkTreeData: [
|
||||||
|
{
|
||||||
|
validator: (rule, value, callback) => {
|
||||||
|
if (!this.checkTreeData || this.checkTreeData.length === 0) {
|
||||||
|
callback(new Error('请选择移交档案'));
|
||||||
|
} else {
|
||||||
|
callback();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
trigger: 'change'
|
||||||
|
}
|
||||||
|
],
|
||||||
deptId: [
|
deptId: [
|
||||||
{ required: true, message: '请选择接收组织', trigger: 'change' }
|
{ required: true, message: '请选择接收组织', trigger: 'change' }
|
||||||
],
|
],
|
||||||
|
|
@ -85,8 +135,6 @@ export default {
|
||||||
/** 初始化表单数据 */
|
/** 初始化表单数据 */
|
||||||
async initFormData() {
|
async initFormData() {
|
||||||
await getDeptSelectApi().then(res => {
|
await getDeptSelectApi().then(res => {
|
||||||
console.log(res);
|
|
||||||
|
|
||||||
this.treeDataList = this.convertToVueTree(res.data);
|
this.treeDataList = this.convertToVueTree(res.data);
|
||||||
});
|
});
|
||||||
await getProSelectApi().then(res => {
|
await getProSelectApi().then(res => {
|
||||||
|
|
@ -95,7 +143,7 @@ export default {
|
||||||
if (this.isAdd === 'edit' && this.rowData) {
|
if (this.isAdd === 'edit' && this.rowData) {
|
||||||
// 编辑模式:填充表单数据
|
// 编辑模式:填充表单数据
|
||||||
this.form = {
|
this.form = {
|
||||||
id: this.rowData.id,
|
id: this.rowData.id || null,
|
||||||
proId: this.rowData.proId || undefined,
|
proId: this.rowData.proId || undefined,
|
||||||
deptId: this.rowData.deptId || undefined,
|
deptId: this.rowData.deptId || undefined,
|
||||||
};
|
};
|
||||||
|
|
@ -143,9 +191,8 @@ export default {
|
||||||
reset() {
|
reset() {
|
||||||
this.form = {
|
this.form = {
|
||||||
id: null,
|
id: null,
|
||||||
pid: null,
|
proId: undefined,
|
||||||
dataTypeName: '',
|
deptId: undefined
|
||||||
remark: '',
|
|
||||||
};
|
};
|
||||||
this.resetForm("ruleForm");
|
this.resetForm("ruleForm");
|
||||||
},
|
},
|
||||||
|
|
@ -167,6 +214,7 @@ export default {
|
||||||
target: this.$el.querySelector('.el-dialog') || document.body
|
target: this.$el.querySelector('.el-dialog') || document.body
|
||||||
})
|
})
|
||||||
let params = _.cloneDeep(this.form);
|
let params = _.cloneDeep(this.form);
|
||||||
|
params.checkTreeData = this.checkTreeData;
|
||||||
if (this.isAdd === 'add') {
|
if (this.isAdd === 'add') {
|
||||||
saveTransferApplyApi(params).then(res => {
|
saveTransferApplyApi(params).then(res => {
|
||||||
this.loading.close();
|
this.loading.close();
|
||||||
|
|
@ -180,7 +228,6 @@ export default {
|
||||||
// this.$modal.msgError('提交失败,请重试');
|
// this.$modal.msgError('提交失败,请重试');
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
editTransferApplyApi(params).then(res => {
|
editTransferApplyApi(params).then(res => {
|
||||||
this.loading.close();
|
this.loading.close();
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
|
|
@ -209,7 +256,6 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.children && Array.isArray(item.children) && item.children.length > 0) {
|
if (item.children && Array.isArray(item.children) && item.children.length > 0) {
|
||||||
// 仅保留到第3层。第3层不再挂 children,成为叶子,结合 disable-branch-nodes 实现只能选第3层
|
|
||||||
if (level < 3) {
|
if (level < 3) {
|
||||||
const children = this.convertToVueTree(item.children, level + 1)
|
const children = this.convertToVueTree(item.children, level + 1)
|
||||||
if (children.length > 0) node.children = children
|
if (children.length > 0) node.children = children
|
||||||
|
|
@ -219,12 +265,35 @@ export default {
|
||||||
return node
|
return node
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 获取选中的节点
|
||||||
|
getTreeData(nodeId){
|
||||||
|
// 模拟添加文件数据到表格
|
||||||
|
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');
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 删除文件
|
||||||
|
removeFile(index) {
|
||||||
|
this.checkTreeData.splice(index, 1);
|
||||||
|
// 触发表单验证
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.ruleForm.validateField('checkTreeData');
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.w700 .el-dialog {
|
.w700 .el-dialog {
|
||||||
width: 700px;
|
width: 1100px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.w500 .el-dialog {
|
.w500 .el-dialog {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue