diff --git a/src/api/filesTransfer/apply.js b/src/api/filesTransfer/apply.js index 2db8d79..8bc5ccf 100644 --- a/src/api/filesTransfer/apply.js +++ b/src/api/filesTransfer/apply.js @@ -34,4 +34,13 @@ export function delTransferApplyApi(data) { method: 'POST', data }) +} + +// 已移交确认工程下拉选 +export async function getProSelectApi(data) { + return await request({ + url: '/smartArchives/transferApply/getProSelect', + method: 'GET', + data + }) } \ No newline at end of file diff --git a/src/api/select.js b/src/api/select.js index f39605b..e8f6ee3 100644 --- a/src/api/select.js +++ b/src/api/select.js @@ -7,4 +7,13 @@ export async function getClassifyMarkSelApi(params) { method: 'get', params, }) +} + +// 部门下拉树 +export async function getDeptSelectApi(params) { + return await request({ + url: '/smartArchives/transferApply/getDeptSelect', + method: 'get', + params, + }) } \ No newline at end of file diff --git a/src/views/filesTransfer/apply/config.js b/src/views/filesTransfer/apply/config.js index c94936e..bab5cee 100644 --- a/src/views/filesTransfer/apply/config.js +++ b/src/views/filesTransfer/apply/config.js @@ -27,11 +27,7 @@ export const formLabel = [ export const columnsList = [ { t_props: 'proName', t_label: '项目名称' }, { t_props: 'singleProName', t_label: '单项工程名称' }, - { t_props: 'proTypeName', t_label: '工程类型' }, - { t_props: 'voltageLevelName', t_label: '电压等级' }, - { t_props: 'planStartDate', t_label: '计划开工日期' }, - { t_props: 'planEndDate', t_label: '计划竣工日期' }, - { t_props: 'planTcDate', t_label: '计划投产日期' }, - { t_props: 'proStatusName', t_label: '工程状态' }, - { t_slot: 'contentsName', t_label: '匹配档案目录类型' }, + { t_props: 'applyUser', t_label: '申请人' }, + { t_props: 'applyTime', t_label: '申请时间' }, + { t_slot: 'auditStatus', t_label: '审批状态' }, ] \ No newline at end of file diff --git a/src/views/filesTransfer/apply/index.vue b/src/views/filesTransfer/apply/index.vue index 33004ca..fb3e6ef 100644 --- a/src/views/filesTransfer/apply/index.vue +++ b/src/views/filesTransfer/apply/index.vue @@ -1,25 +1,33 @@ - - - - {{ data.contentsName ? data.contentsName : '未配置' }} + + + + 新增 + + + + + {{ getStatusText(data.fileStatus) }} + - - 配置档案类型 + + 修改 + + + 删除 - - + @@ -28,23 +36,24 @@ import TableModel from '@/components/TableModel' import { columnsList, formLabel } from './config' import { - getProListAPI -} from '@/api/archivesManagement/project' -// import FileSetForm from './prop/fileSetForm' + delTransferApplyApi, + getTransferApplyListApi, +} from '@/api/filesTransfer/apply.js' +import ApplyForm from './prop/applyForm' export default { - name: 'ProManager', - dicts:['pro_type','voltage_level'], + name: 'Apply', + dicts: ['pro_type', 'voltage_level'], components: { TableModel, - // FileSetForm + ApplyForm }, data() { return { formLabel, columnsList, - getProListAPI, + getTransferApplyListApi, title: "", isflag: false, isAdd: '', @@ -65,23 +74,78 @@ export default { }, methods: { + /** 新增按钮操作 */ + handleAdd() { + this.title = "新增"; + this.isAdd = 'add'; + this.isflag = true; + }, closeDialog() { this.isflag = false; }, showColose() { this.isflag = false; }, - /** 配置档案类型 */ + /** 修改操作 */ handleUpdate(row) { - this.title = "配置档案类型"; + this.title = "修改"; this.isAdd = 'edit'; this.row = row; this.isflag = true; }, /* 搜索操作 */ handleQuery() { - this.$refs.proTableRef.getTableList() + this.$refs.applyTableRef.getTableList() }, + /** 删除操作 */ + 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' + } + } }, } diff --git a/src/views/filesTransfer/apply/prop/applyForm.vue b/src/views/filesTransfer/apply/prop/applyForm.vue new file mode 100644 index 0000000..6c61317 --- /dev/null +++ b/src/views/filesTransfer/apply/prop/applyForm.vue @@ -0,0 +1,208 @@ + + + + + + + + + + + + 选择 + + + + + + + + 取消 + 确认 + + + + + \ No newline at end of file