图纸管理

This commit is contained in:
2025-08-16 00:28:12 +08:00
parent 8f9972343a
commit 12173054e9
4 changed files with 687 additions and 100 deletions

View File

@ -5,7 +5,7 @@ VITE_APP_TITLE = 煤科建管平台
VITE_APP_ENV = 'development' VITE_APP_ENV = 'development'
# 开发环境 # 开发环境
VITE_APP_BASE_API = 'http://192.168.110.163:8898' VITE_APP_BASE_API = 'http://192.168.110.180:8899'
# 无人机接口地址 # 无人机接口地址

View File

@ -1,5 +1,5 @@
<template> <template>
<el-table v-loading="loading" :data="drawingList"> <el-table v-loading="loading" :data="drawingList" height="74vh">
<el-table-column type="index" label="序号" width="80" align="center" /> <el-table-column type="index" label="序号" width="80" align="center" />
<el-table-column label="子项名称" align="center" prop="designSubitem" /> <el-table-column label="子项名称" align="center" prop="designSubitem" />
<el-table-column label="专业" align="center" prop="specialty"> <el-table-column label="专业" align="center" prop="specialty">

View File

@ -0,0 +1,321 @@
<template>
<div class="p-2 bg-gray-50" style="padding: 20px;">
<!-- <transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover">
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
<el-form-item label="文件名称" prop="fileName">
<el-input v-model="queryParams.fileName" placeholder="请输入文件名称" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item label="原文件名" prop="originalName">
<el-input v-model="queryParams.originalName" placeholder="请输入原文件名" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item label="是否最新" prop="newest">
<el-select v-model="queryParams.newest" placeholder="请选择" clearable>
<el-option label="是" :value="1" />
<el-option label="否" :value="0" />
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>
</div>
</transition> -->
<div class="drawing">
<div class="file-category">
<span style="color: #757575; display: inline-block; margin-bottom: 15px">卷册目录</span>
<div
v-for="(item, i) of volumeCatalogList"
:key="i"
:class="{ active: currentActive === i }"
@click="handleClick(item, i)"
class="category-item"
>
<el-icon :size="20" class="folder-icon">
<Folder />
</el-icon>
<span class="folder-name">
{{ item.volumeNumber }}
</span>
</div>
</div>
<div class="boxs">
<el-card shadow="never">
<template #header>
<el-row :gutter="10" class="mb8">
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
</template>
<DrawingTable
:drawingList="drawingList"
:loading="loading"
:drawing_file_type="drawing_file_type"
:wf_business_status="wf_business_status"
@selection-change="handleSelectionChange"
@view="handleView"
@update="handleUpdate"
@delete="handleDelete"
@view-info="handleViewInfo"
@cancel-process-apply="handleCancelProcessApply"
/>
<pagination
v-show="total > 0"
:total="total"
v-model:page="queryParams.pageNum"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/>
</el-card>
</div>
</div>
</div>
</template>
<script setup name="Drawing" lang="ts">
import { listDrawing, delDrawing } from '@/api/design/drawing';
import { DrawingVO } from '@/api/design/drawing/types';
import { useUserStoreHook } from '@/store/modules/user';
import { LeaveVO } from '@/api/workflow/leave/types';
import { cancelProcessApply } from '@/api/workflow/instance';
import DrawingTable from './DrawingTable.vue';
import { listVolumeCatalog } from '@/api/design/volumeCatalog';
// 获取用户 store
const userStore = useUserStoreHook();
// 从 store 中获取项目列表和当前选中的项目
const currentProject = computed(() => userStore.selectedProject);
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { drawing_file_type, wf_business_status } = toRefs<any>(proxy?.useDict('drawing_file_type', 'wf_business_status'));
console.log(drawing_file_type);
// 当前激活项的索引
const currentActive = ref(0);
const volumeCatalogList = ref([]);
const drawingList = ref<DrawingVO[]>([]);
const loading = ref(true);
const showSearch = ref(true);
const ids = ref<Array<string | number>>([]);
const single = ref(true);
const multiple = ref(true);
const total = ref(0);
const queryFormRef = ref<ElFormInstance>();
const activeName = ref('1');
const data = reactive({
queryParams: {
pageNum: 1,
pageSize: 10,
projectId: currentProject.value?.id,
fileName: undefined,
fileSuffix: undefined,
fileStatus: undefined,
originalName: undefined,
newest: undefined,
volumeCatalogId: undefined, //卷册目录id
params: {}
}
});
const { queryParams } = toRefs(data);
/** 查询图纸管理列表 */
const getList = async () => {
loading.value = true;
const res = await listDrawing(queryParams.value);
drawingList.value = res.rows;
total.value = res.total;
loading.value = false;
};
// 点击事件处理函数
const handleClick = (item, index) => {
console.log(item);
currentActive.value = index;
queryParams.value.volumeCatalogId = item.design;
getList();
};
/** 查询卷册目录列表 */
const getlistVolume = async () => {
const res = await listVolumeCatalog({ projectId: currentProject.value?.id });
volumeCatalogList.value = res.rows;
if (res.rows.length) {
queryParams.value.volumeCatalogId = res.rows[0].id;
getList();
}
};
/** 搜索按钮操作 */
const handleQuery = () => {
queryParams.value.pageNum = 1;
getList();
};
/** 重置按钮操作 */
const resetQuery = () => {
queryFormRef.value?.resetFields();
handleQuery();
};
/** 多选框选中数据 */
const handleSelectionChange = (selection: DrawingVO[]) => {
ids.value = selection.map((item) => item.id);
single.value = selection.length != 1;
multiple.value = !selection.length;
};
/** 修改按钮操作 */
const handleUpdate = async (row?: DrawingVO) => {
proxy.$tab.closePage(proxy.$route);
proxy.$router.push({
path: `/design-management/drawing/indexEdit`,
query: {
id: row.id,
type: 'update'
}
});
};
/** 删除按钮操作 */
const handleDelete = async (row?: DrawingVO) => {
const _ids = row?.id || ids.value;
await proxy?.$modal.confirm('是否确认删除图纸管理编号为"' + _ids + '"的数据项?').finally(() => (loading.value = false));
await delDrawing(_ids);
proxy?.$modal.msgSuccess('删除成功');
await getList();
};
const handleView = (row) => {
var url = row.file.url;
window.open(url, '_blank');
};
/** 查看按钮操作 */
const handleViewInfo = (row?: LeaveVO) => {
proxy.$tab.closePage(proxy.$route);
proxy.$router.push({
path: `/design-management/drawing/indexEdit`,
query: {
id: row.id,
type: 'view'
}
});
};
/** 撤销按钮操作 */
const handleCancelProcessApply = async (id: string) => {
await proxy?.$modal.confirm('是否确认撤销当前单据?');
loading.value = true;
const data = {
businessId: id,
message: '申请人撤销流程!'
};
await cancelProcessApply(data).finally(() => (loading.value = false));
await getList();
proxy?.$modal.msgSuccess('撤销成功');
};
onMounted(() => {
getlistVolume();
});
//监听项目id刷新数据
const listeningProject = watch(
() => currentProject.value?.id,
(nid, oid) => {
queryParams.value.projectId = nid;
getlistVolume();
}
);
onUnmounted(() => {
listeningProject();
});
</script>
<style lang="scss">
.drawing {
display: flex;
.el-tabs__header {
height: 90vh !important;
}
.file-category {
width: 200px;
display: flex;
flex-direction: column;
background-color: #f7f7f79e;
padding: 10px;
border-radius: 6px;
margin-right: 10px;
height: 84vh;
}
.file-category > div {
cursor: pointer;
padding: 8px 12px;
margin-bottom: 4px;
border-radius: 4px;
display: flex;
white-space: nowrap;
transition: all 0.2s ease;
> span {
margin-left: 6px;
}
}
.file-category {
width: 200px;
display: flex;
flex-direction: column;
background-color: #f7f7f79e;
padding: 10px;
border-radius: 8px;
margin-right: 10px;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
// 分类项样式优化
.category-item {
cursor: pointer;
padding: 10px 12px;
margin-bottom: 4px;
border-radius: 6px;
display: inline-flex;
align-items: center; /* 垂直居中对齐 */
white-space: nowrap;
transition: all 0.25s ease;
font-size: 14px;
color: #334155;
line-height: 1; /* 确保行高一致 */
&:hover {
background-color: #f1f5f9;
transform: translateX(2px);
}
}
// 图标样式
.folder-icon {
color: #94a3b8;
transition: color 0.25s ease;
}
// 文件夹名称样式
.folder-name {
margin-left: 8px; /* 增加图标与文字间距 */
overflow: hidden;
text-overflow: ellipsis;
max-width: calc(100% - 30px); /* 限制最大宽度,防止溢出 */
}
// 活跃状态样式
.category-item.active {
background-color: #eff6ff;
color: #2563eb;
font-weight: 500;
.folder-icon {
color: #2563eb;
}
}
.boxs {
width: calc(100% - 220px);
}
}
</style>

View File

@ -1,100 +1,230 @@
<template> <template>
<div class="p-2"> <div class="p-2 volumeCatalog">
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
<div v-show="showSearch" class="mb-[10px]">
<el-card shadow="hover">
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
<el-form-item label="文件名称" prop="fileName">
<el-input v-model="queryParams.fileName" placeholder="请输入文件名称" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item label="原文件名" prop="originalName">
<el-input v-model="queryParams.originalName" placeholder="请输入原文件名" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item label="是否最新" prop="newest">
<el-select v-model="queryParams.newest" placeholder="请选择" clearable>
<el-option label="是" :value="1" />
<el-option label="否" :value="0" />
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>
</div>
</transition>
<el-card shadow="never"> <el-card shadow="never">
<template #header> <template #header>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
<el-form-item label="卷册号" prop="volumeNumber">
<el-input v-model="queryParams.volumeNumber" placeholder="请输入卷册号" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item label="资料名称" prop="documentName">
<el-input v-model="queryParams.documentName" placeholder="请输入资料名称" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery" v-hasPermi="['design:volumeCatalog:query']">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery" v-hasPermi="['design:volumeCatalog:query']">重置</el-button>
</el-form-item>
</el-form>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
</template> </template>
<DrawingTable <el-table v-loading="loading" :data="volumeCatalogList">
:drawingList="drawingList" <el-table-column label="序号" type="index" width="60" align="center" />
:loading="loading" <el-table-column label="子项名称" align="center" prop="designSubitem" />
:drawing_file_type="drawing_file_type" <el-table-column label="专业" align="center" prop="specialtyName"> </el-table-column>
:wf_business_status="wf_business_status" <el-table-column label="设计人员" align="center" prop="principalName" />
@selection-change="handleSelectionChange" <el-table-column label="卷册号" align="center" prop="volumeNumber" />
@view="handleView" <el-table-column label="资料名称" align="center" prop="documentName" />
@update="handleUpdate" <el-table-column label="图纸文件" align="center" prop="remark" width="150">
@delete="handleDelete" <template #default="scope">
@view-info="handleViewInfo" <el-button link type="primary" icon="View" @click="handleView(scope.row)" v-hasPermi="['design:volumeFile:query']">查看文件</el-button>
@cancel-process-apply="handleCancelProcessApply" </template>
/> </el-table-column>
</el-table>
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" /> <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
</el-card> </el-card>
<!-- 查看文件列表 -->
<el-dialog draggable title="文件列表" v-model="viewVisible" width="800px">
<el-table :data="fileList" style="width: 100%" border>
<el-table-column prop="fileName" label="文件" align="center">
<template #default="scope">
<el-link
:key="scope.row.fileId"
:href="scope.row.fileUrl"
target="_blank"
:type="scope.row.status == '1' ? 'primary' : 'info'"
:underline="false"
>
{{ scope.row.fileName }}
</el-link>
</template>
</el-table-column>
<el-table-column prop="size" label="状态" width="120" align="center">
<template #default="scope">
<el-tag :type="scope.row.status == 1 ? 'success' : 'info'">{{ scope.row.status == 1 ? '使用中' : '已作废' }}</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" width="240" align="center">
<template #default="scope">
<el-button link type="primary" icon="view" @click="handleViewHis(scope.row)">查阅记录</el-button>
<el-button type="danger" link icon="Download" @click="handleDownload(scope.row)"> 下载 </el-button>
</template>
</el-table-column>
</el-table>
<template #footer>
<span>
<el-button type="primary" @click="viewVisible = false">关闭</el-button>
</span>
</template>
</el-dialog>
<el-dialog draggable title="文件列表" v-model="viewVisible1" width="500px">
<el-table :data="histroyList" style="width: 100%" border>
<el-table-column type="index" label="序号" align="center" width="80"> </el-table-column>
<el-table-column prop="userName" label="用户名称" align="center"> </el-table-column>
<el-table-column prop="createTime" label="查阅时间" align="center"> </el-table-column>
</el-table>
<template #footer>
<span>
<el-button type="primary" @click="viewVisible1 = false">关闭</el-button>
</span>
</template>
</el-dialog>
</div> </div>
</template> </template>
<script setup name="Drawing" lang="ts"> <script setup name="VolumeCatalog" lang="ts">
import { listDrawing, delDrawing } from '@/api/design/drawing'; import {
import { DrawingVO } from '@/api/design/drawing/types'; listVolumeCatalog,
getVolumeCatalog,
delVolumeCatalog,
addVolumeCatalog,
updateVolumeCatalog,
uploadVolumeFile,
getVolumeCatafileList,
lookViewerFile
} from '@/api/design/volumeCatalog';
import { VolumeCatalogVO } from '@/api/design/volumeCatalog/types';
import { useUserStoreHook } from '@/store/modules/user'; import { useUserStoreHook } from '@/store/modules/user';
import { LeaveVO } from '@/api/workflow/leave/types'; import { volumeFileViewer, volumeFileViewerList } from '@/api/design/drawing';
import { cancelProcessApply } from '@/api/workflow/instance'; const fileList = ref([]);
import DrawingTable from './DrawingTable.vue'; import { designUserList } from '@/api/design/appointment';
// 获取用户 store
const userStore = useUserStoreHook();
// 从 store 中获取项目列表和当前选中的项目
const currentProject = computed(() => userStore.selectedProject);
const { proxy } = getCurrentInstance() as ComponentInternalInstance; const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { drawing_file_type, wf_business_status } = toRefs<any>(proxy?.useDict('drawing_file_type', 'wf_business_status')); const { design_state, wf_business_status, des_user_major } = toRefs(proxy?.useDict('design_state', 'wf_business_status', 'des_user_major'));
console.log(drawing_file_type); import { drawingreviewReceiptsDetail, drawingreviewReceiptsList } from '@/api/design/drawingreview';
const volumeCatalogList = ref<VolumeCatalogVO[]>([]);
const drawingList = ref<DrawingVO[]>([]); const buttonLoading = ref(false);
const loading = ref(true); const loading = ref(true);
const showSearch = ref(true); const showSearch = ref(true);
const ids = ref<Array<string | number>>([]); const ids = ref<Array<string | number>>([]);
const single = ref(true); const single = ref(true);
const multiple = ref(true); const multiple = ref(true);
const total = ref(0); const total = ref(0);
const dialogHistory = ref(false);
// 获取用户 store
const userStore = useUserStoreHook();
// 从 store 中获取项目列表和当前选中的项目
const currentProject = computed(() => userStore.selectedProject);
const queryFormRef = ref<ElFormInstance>(); const queryFormRef = ref<ElFormInstance>();
const activeName = ref('1'); const volumeCatalogFormRef = ref<ElFormInstance>();
const dialog = reactive<DialogOption>({
visible: false,
title: ''
});
const uploadForm = reactive({
userIds: [],
volumeCatalogId: undefined,
fileId: undefined,
explainText: '',
fileList: [],
cancellationIds: [] // 用于存储已作废的文件ID
});
const examineForm = ref({
audit: '',
auditDate: '',
auditId: '',
designer: '',
executionOpinion: '',
executor: '',
executorDate: '',
executorId: '',
id: '1',
num: '',
professional: '',
projectId: '',
projectName: '',
proofreading: '',
proofreadingDate: '',
proofreadingId: '',
stage: '',
subprojectId: '',
subprojectName: '',
verificationContent: '',
verificationOpinion: '',
volume: ''
});
const userList = ref([]);
const userAppList = ref([]); //人事任命的用户
const initFormData: any = {
design: undefined,
projectId: currentProject.value?.id || '',
designSubitemId: undefined,
volumeNumber: undefined,
documentName: undefined,
designState: '2',
remark: undefined
};
const data = reactive({ const data = reactive({
form: { ...initFormData },
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
projectId: currentProject.value?.id, projectId: currentProject.value?.id,
fileName: undefined, designSubitemId: undefined,
fileSuffix: undefined, volumeNumber: undefined,
fileStatus: undefined, documentName: undefined,
originalName: undefined,
newest: undefined,
params: {} params: {}
},
rules: {
design: [{ required: true, message: '主键ID不能为空', trigger: 'blur' }],
projectId: [{ required: true, message: '项目ID不能为空', trigger: 'blur' }],
volumeNumber: [{ required: true, message: '卷册号不能为空', trigger: 'blur' }],
documentName: [{ required: true, message: '资料名称不能为空', trigger: 'blur' }]
} }
}); });
const { queryParams } = toRefs(data); const { queryParams, form, rules } = toRefs(data);
const histroyList = ref([]);
/** 查询图纸管理列表 */ /** 查询卷册目录列表 */
const getList = async () => { const getList = async () => {
loading.value = true; loading.value = true;
const res = await listDrawing(queryParams.value); try {
drawingList.value = res.rows; const res = await listVolumeCatalog(queryParams.value);
volumeCatalogList.value = res.rows;
total.value = res.total; total.value = res.total;
} finally {
loading.value = false; loading.value = false;
}
};
const getUserAppList = async () => {
const res = await designUserList({ projectId: currentProject.value?.id });
if (res.code === 200) {
console.log(res.rows);
res.rows.forEach((item: any) => {
if (item.userType == 2) {
//设计人员
userAppList.value.push(item);
}
});
}
};
const getDetails = async (id) => {
let res = await drawingreviewReceiptsDetail(id);
examineForm.value = res.data;
};
/** 取消按钮 */
const cancel = () => {
reset();
dialog.visible = false;
};
/** 表单重置 */
const reset = () => {
form.value = { ...initFormData };
volumeCatalogFormRef.value?.resetFields();
}; };
/** 搜索按钮操作 */ /** 搜索按钮操作 */
@ -110,71 +240,157 @@ const resetQuery = () => {
}; };
/** 多选框选中数据 */ /** 多选框选中数据 */
const handleSelectionChange = (selection: DrawingVO[]) => { const handleSelectionChange = (selection: VolumeCatalogVO[]) => {
ids.value = selection.map((item) => item.id); ids.value = selection.map((item) => item.design);
single.value = selection.length != 1; single.value = selection.length != 1;
multiple.value = !selection.length; multiple.value = !selection.length;
}; };
/** 修改按钮操作 */ /** 新增按钮操作 */
const handleUpdate = async (row?: DrawingVO) => { const handleAdd = () => {
proxy.$tab.closePage(proxy.$route); reset();
proxy.$router.push({ dialog.visible = true;
path: `/design-management/drawing/indexEdit`, dialog.title = '添加设计出图计划';
query: { };
id: row.id,
type: 'update' const handleView = (row?: any) => {
fileList.value = row.fileVoList;
viewVisible.value = true;
};
/** 上传文件按钮操作 */
const uploadVisible = ref(false);
const viewVisible = ref(false);
const viewVisible1 = ref(false);
const handleUpload = async (row?: any) => {
resetUploadForm();
uploadForm.volumeCatalogId = row.design;
userList.value = row.noViewerList;
const res = await getVolumeCatafileList(row.design);
uploadForm.fileList = res.data.filter((item) => item.status == '1') || [];
uploadVisible.value = true;
};
/** 重置上传表单 */
const resetUploadForm = () => {
uploadForm.userIds = [];
uploadForm.volumeCatalogId = undefined;
uploadForm.fileId = undefined;
uploadForm.explainText = '';
uploadForm.fileList = [];
uploadForm.cancellationIds = []; // 重置作废文件ID列表
};
/** 提交按钮 */
const submitForm = () => {
volumeCatalogFormRef.value?.validate(async (valid: boolean) => {
if (valid) {
buttonLoading.value = true;
if (form.value.design) {
await updateVolumeCatalog(form.value).finally(() => (buttonLoading.value = false));
} else {
await addVolumeCatalog(form.value).finally(() => (buttonLoading.value = false));
}
proxy?.$modal.msgSuccess('操作成功');
dialog.visible = false;
await getList();
} }
}); });
}; };
const handleDownload = (row: any) => {
getCheck(row);
proxy?.$download.oss(row.fileId);
};
// 调用查阅接口
const getCheck = async (row) => {
volumeFileViewer({ volumeFileId: row.fileId });
};
const handleViewHis = async (row) => {
viewVisible1.value = true;
let res = await volumeFileViewerList(row.fileId);
if (res.code == 200) {
histroyList.value = res.rows;
}
};
/** 上传文件提交 */
const onSubmit = async () => {
buttonLoading.value = true;
let obj = {
volumeCatalogId: uploadForm.volumeCatalogId,
fileIds: uploadForm.fileId.split(','),
explainText: ''
};
try {
await uploadVolumeFile(obj);
proxy?.$modal.msgSuccess('文件上传成功');
uploadVisible.value = false;
await getList();
} catch (error) {
console.error('上传文件失败:', error);
} finally {
buttonLoading.value = false;
}
};
/** 删除按钮操作 */ /** 删除按钮操作 */
const handleDelete = async (row?: DrawingVO) => { const handleDelete = async (row?: VolumeCatalogVO) => {
const _ids = row?.id || ids.value; const _ids = row?.design || ids.value;
await proxy?.$modal.confirm('是否确认删除图纸管理编号为"' + _ids + '"的数据项?').finally(() => (loading.value = false)); await proxy?.$modal.confirm('是否确认删除卷册目录编号为"' + _ids + '"的数据项?').finally(() => (loading.value = false));
await delDrawing(_ids); await delVolumeCatalog(_ids);
proxy?.$modal.msgSuccess('删除成功'); proxy?.$modal.msgSuccess('删除成功');
await getList(); await getList();
}; };
const handleView = (row) => { const handleUploadSuccess = async (flieList: any, res: any) => {
var url = row.file.url; proxy?.$modal.msgSuccess('文件上传成功');
window.open(url, '_blank'); getList();
}; };
/** 查看按钮操作 */ /** 审核按钮操作 */
const handleViewInfo = (row?: LeaveVO) => { const handleAudit = async (row) => {
proxy.$tab.closePage(proxy.$route); proxy.$tab.closePage(proxy.$route);
proxy.$router.push({ proxy.$router.push({
path: `/design-management/drawing/indexEdit`, path: `/design-management/drawingreview/indexEdit`,
query: { query: {
id: row.id, id: row.design,
type: 'update'
}
});
};
/** 查看按钮操作 */
const handleAuditView = async (row) => {
proxy.$tab.closePage(proxy.$route);
proxy.$router.push({
path: `/design-management/drawingreview/indexEdit`,
query: {
id: row.design,
type: 'view' type: 'view'
} }
}); });
}; };
/** 修改按钮操作 */
/** 撤销按钮操作 */ const handleUpdate = async (row?: VolumeCatalogVO) => {
const handleCancelProcessApply = async (id: string) => { reset();
await proxy?.$modal.confirm('是否确认撤销当前单据?'); const _id = row?.design || ids.value[0];
loading.value = true; const res = await getVolumeCatalog(_id);
const data = { Object.assign(form.value, res.data);
businessId: id, dialog.visible = true;
message: '申请人撤销流程!' dialog.title = '修改设计出图计划';
};
await cancelProcessApply(data).finally(() => (loading.value = false));
await getList();
proxy?.$modal.msgSuccess('撤销成功');
}; };
onMounted(() => { onMounted(() => {
getUserAppList();
getList(); getList();
}); });
//监听项目id刷新数据 //监听项目id刷新数据
const listeningProject = watch( const listeningProject = watch(
() => currentProject.value?.id, () => currentProject.value?.id,
(nid, oid) => { (nid, oid) => {
queryParams.value.projectId = nid; queryParams.value.projectId = nid;
form.value.projectId = nid;
getUserAppList();
getList(); getList();
} }
); );
@ -183,3 +399,53 @@ onUnmounted(() => {
listeningProject(); listeningProject();
}); });
</script> </script>
<style lang="scss">
.volumeCatalog_box {
/* .upload-demo {
width: 100% !important;
} */
table {
border-collapse: collapse; //合并为一个单一的边框
border-color: rgba(199, 199, 199, 1); //边框颜色按实际自定义即可
}
thead {
tr {
th {
background-color: rgba(247, 247, 247, 1); //设置表格标题背景色
height: 35px; //设置单元格最小高度
text-align: center;
letter-spacing: 5px;
padding: 15px;
}
td {
text-align: left;
height: 35px; //设置单元格最小高度
padding: 15px;
}
.th-bg {
background-color: rgba(247, 247, 247, 1);
}
}
}
tbody {
tr {
td {
text-align: left;
height: 40px; //设置单元格最小高度
padding: 15px;
}
th {
height: 35px; //设置单元格最小高度
text-align: center;
letter-spacing: 5px;
padding: 15px;
}
}
}
.table-content {
box-shadow: 0px 0px 10px #ddd;
padding: 20px;
position: relative;
}
}
</style>