档案移交记录
This commit is contained in:
parent
319b9f2dd6
commit
103acd5584
|
|
@ -0,0 +1,82 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 档案移交申请列表
|
||||
export function getTransferApplyListApi(params) {
|
||||
return request({
|
||||
url: '/smartArchives/transferApply/getTransferApplyList',
|
||||
method: 'GET',
|
||||
params: params,
|
||||
})
|
||||
}
|
||||
|
||||
// 新增档案移交申请
|
||||
export function saveTransferApplyApi(data) {
|
||||
return request({
|
||||
url: '/smartArchives/transferApply/saveTransferApply',
|
||||
method: 'POST',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 编辑档案移交申请
|
||||
export function editTransferApplyApi(data) {
|
||||
return request({
|
||||
url: '/smartArchives/transferApply/editTransferApply',
|
||||
method: 'POST',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 档案移交申请详情
|
||||
export function getTransferApplyApi(params) {
|
||||
return request({
|
||||
url: '/smartArchives/transferApply/getTransferApply',
|
||||
method: 'GET',
|
||||
params: params
|
||||
})
|
||||
}
|
||||
|
||||
// 档案移交申请-列表详情
|
||||
export function getTransferApplyFilesByApplyIdApi(params) {
|
||||
return request({
|
||||
url: '/smartArchives/transferApply/getTransferApplyFilesByApplyId',
|
||||
method: 'GET',
|
||||
params: params
|
||||
})
|
||||
}
|
||||
|
||||
// 删除档案移交申请
|
||||
export function delTransferApplyApi(data) {
|
||||
return request({
|
||||
url: '/smartArchives/transferApply/delTransferApply',
|
||||
method: 'POST',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 已移交确认工程下拉选
|
||||
export async function getProSelectApi(data) {
|
||||
return await request({
|
||||
url: '/smartArchives/transferApply/getProSelect',
|
||||
method: 'GET',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 获取档案目录树
|
||||
export function getFileManageTreeApi(params) {
|
||||
return request({
|
||||
url: '/smartArchives/fileManage/getFileManageTree',
|
||||
method: 'get',
|
||||
params:params,
|
||||
})
|
||||
}
|
||||
|
||||
// 获取移交档案文件
|
||||
export function getTransferApplyFilesApi(params) {
|
||||
return request({
|
||||
url: '/smartArchives/transferApply/getTransferApplyFiles',
|
||||
method: 'get',
|
||||
params:params,
|
||||
})
|
||||
}
|
||||
|
|
@ -212,7 +212,7 @@ export default {
|
|||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
<style lang="scss" scoped>
|
||||
.w700 .el-dialog {
|
||||
width: 700px;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -306,7 +306,7 @@ export default {
|
|||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
<style lang="scss" scoped>
|
||||
.w700 .el-dialog {
|
||||
width: 700px;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -171,7 +171,7 @@ export default {
|
|||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
<style lang="scss" scoped>
|
||||
.w700 .el-dialog {
|
||||
width: 700px;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ export default {
|
|||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
<style lang="scss" scoped>
|
||||
.w700 .el-dialog {
|
||||
width: 700px;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -156,7 +156,7 @@ export default {
|
|||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
<style lang="scss" scoped>
|
||||
.w700 .el-dialog {
|
||||
width: 700px;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ export default {
|
|||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
<style lang="scss" scoped>
|
||||
.w700 .el-dialog {
|
||||
width: 700px;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -388,7 +388,7 @@ export default {
|
|||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
<style lang="scss" scoped>
|
||||
.w700 .el-dialog {
|
||||
width: 700px;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -308,7 +308,7 @@ export default {
|
|||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
<style lang="scss" scoped>
|
||||
.w700 .el-dialog {
|
||||
width: 700px;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ export default {
|
|||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
<style lang="scss" scoped>
|
||||
.w700 .el-dialog {
|
||||
width: 700px;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -158,7 +158,7 @@ export default {
|
|||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
<style lang="scss" scoped>
|
||||
.w700 .el-dialog {
|
||||
width: 700px;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
<template slot="handle" slot-scope="{ data }">
|
||||
<el-button plain size="mini" type="primary" icon="el-icon-edit" v-hasPermi="['transfer:apply:edit']"
|
||||
@click="handleUpdate(data)">
|
||||
@click="handleUpdate(data)" v-if="data.auditStatus === '2'">
|
||||
修改
|
||||
</el-button>
|
||||
<el-button plain size="mini" type="danger" icon="el-icon-delete" v-hasPermi="['transfer:apply:del']"
|
||||
|
|
|
|||
|
|
@ -0,0 +1,179 @@
|
|||
<template>
|
||||
<!-- 小型弹窗,用于完成,删除,保存等操作 -->
|
||||
<el-dialog class="l-dialog" :class="lDialog" :title="title" :visible.sync="dialogVisible" :showClose="true"
|
||||
:closeOnClickModal="false" @close="handleClose" :append-to-body="true">
|
||||
<div>
|
||||
|
||||
</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 {
|
||||
addDataClassAPI,
|
||||
updateDataClassAPI,
|
||||
} from '@/api/data-collect/data-class-manage'
|
||||
export default {
|
||||
name: "RecordList",
|
||||
props: ["width", "dataForm", "title", "disabled", "isAdd", "rowData"],
|
||||
dicts: ['data_class_type'],
|
||||
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' }
|
||||
],
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.initFormData();
|
||||
},
|
||||
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 || '',
|
||||
};
|
||||
} else {
|
||||
// 新增模式:重置表单
|
||||
this.form = {
|
||||
pid: null,
|
||||
dataTypeName: '',
|
||||
remark: '',
|
||||
};
|
||||
}
|
||||
},
|
||||
/*关闭弹窗 */
|
||||
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,
|
||||
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('提交失败,请重试');
|
||||
});
|
||||
} 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('提交失败,请重试');
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.w700 .el-dialog {
|
||||
width: 700px;
|
||||
}
|
||||
|
||||
.w500 .el-dialog {
|
||||
width: 500px;
|
||||
}
|
||||
|
||||
.w500 .el-dialog__header,
|
||||
.w700 .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>
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
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: '移交进度' },
|
||||
]
|
||||
|
|
@ -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" :isAdd="isAdd" :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: 'Record',
|
||||
dicts: ['pro_type', 'voltage_level'],
|
||||
components: {
|
||||
TableModel,
|
||||
RecordList
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
formLabel,
|
||||
columnsList,
|
||||
getTransferApplyListApi,
|
||||
title: "",
|
||||
isflag: false,
|
||||
isAdd: '',
|
||||
row: {},
|
||||
loading: false,
|
||||
}
|
||||
},
|
||||
|
||||
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: 'DetailData',
|
||||
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.isAdd = 'edit';
|
||||
this.row = row;
|
||||
this.isflag = true;
|
||||
},
|
||||
/* 查看移交进度 */
|
||||
handleTProgress(row){
|
||||
this.title = "修改";
|
||||
this.isAdd = 'edit';
|
||||
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>
|
||||
|
|
@ -303,7 +303,7 @@ export default {
|
|||
},
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
<style lang="scss" scoped>
|
||||
.w700 .el-dialog {
|
||||
width: 700px;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue