设计完成

This commit is contained in:
2025-08-14 16:40:52 +08:00
parent 6a69798ec6
commit a305c5bc19
25 changed files with 459 additions and 1773 deletions

View File

@ -39,15 +39,16 @@
<template #default="scope">
<el-row :gutter="10" class="mb8">
<el-col :span="1.5" v-if="scope.row.status === 'draft' || scope.row.status === 'cancel' || scope.row.status === 'back'">
<el-button size="small" type="primary" icon="Edit" @click="handleUpdate(scope.row)">审核</el-button>
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)">审核</el-button>
</el-col>
<el-col :span="1.5" v-if="scope.row.status === 'finish'">
<el-button size="small" type="primary" icon="Download" @click="handleDownload(scope.row)">导出</el-button>
<el-button link type="primary" icon="Download" @click="handleDownload(scope.row)">导出</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" size="small" icon="View" v-if="scope.row.status != 'draft'" @click="handleViewInfo(scope.row)"
>查看流程</el-button
>
<el-button link type="warning" icon="View" v-if="scope.row.status != 'draft'" @click="handleViewInfo(scope.row)">查看流程</el-button>
</el-col>
<el-col :span="1.5">
<el-button link type="warning" icon="View" v-if="scope.row.status != 'draft'" @click="handleFile(scope.row)">查看文件</el-button>
</el-col>
</el-row>
</template>
@ -55,6 +56,43 @@
</el-table>
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
</el-card>
<el-dialog title="提取文件列表" v-model="viewVisible" width="500px">
<el-table :loading="loadingFlie" :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 label="是否变更" align="center" width="120">
<template #default="scope">
<el-tag :type="scope.row.type == 1 ? 'success' : 'info'">{{ scope.row.type == 1 ? '否' : '是' }}</el-tag>
</template>
</el-table-column>
<el-table-column 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="170" align="center">
<template #default="scope">
<el-button type="success" link icon="View" @click="handleViewFile(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>
</div>
</template>
@ -63,7 +101,7 @@ import { ref, reactive, computed, onMounted } from 'vue';
import { useUserStoreHook } from '@/store/modules/user';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { wf_business_status } = toRefs<any>(proxy?.useDict('wf_business_status'));
import { extractList } from '@/api/design/Professional';
import { extractList, getFileList } from '@/api/design/Professional';
// 获取用户 store
const userStore = useUserStoreHook();
@ -73,6 +111,9 @@ const currentProject = computed(() => userStore.selectedProject);
const professionalList = ref([]);
const showSearch = ref(true);
const loading = ref(false);
const loadingFlie = ref(false);
const viewVisible = ref(false); //文件列表展示
const fileList = ref([]);
const data = reactive({
queryParams: {
pageNum: 1,
@ -145,7 +186,19 @@ const handleDownload = (row) => {
`互提资料.zip`
);
};
const handleViewFile = (row) => {
window.open(row.docUrl, '_blank');
};
const handleFile = async (row) => {
// 查看文件
viewVisible.value = true;
loadingFlie.value = true;
let res = await getFileList(row.id);
if (res.code == 200) {
fileList.value = res.data;
}
loadingFlie.value = false;
};
// 页面挂载时初始化数据
onMounted(() => {
getList();

View File

@ -67,6 +67,7 @@
>
<div class="flex justify-between items-start mb-2">
<span class="text-sm font-medium text-gray-600">资料 {{ index + 1 }}</span>
<el-button
type="text"
size="small"
@ -85,7 +86,22 @@
:rules="[{ required: true, message: '请输入文件资料名称', trigger: 'blur' }]"
class="mb-4"
>
<el-input placeholder="请输入文件资料名称" v-model="item.catalogueName" autocomplete="off" />
<el-select
id="projectSelect"
v-model="item.volumeCatalogId"
placeholder="请选择资料"
clearable
filterable
@change="handleSelect($event, item)"
style="width: 150px; margin-right: 20px"
>
<el-option
v-for="project in volumeCatalogList"
:key="project.design"
:label="project.documentName"
:value="project.design"
/>
</el-select>
</el-form-item>
<el-form-item label="备注" :prop="`documents.${index}.remark`" class="mb-4">
<el-input placeholder="请输入备注" v-model="item.remark" autocomplete="off" />
@ -142,6 +158,7 @@ const { proxy } = getCurrentInstance() as ComponentInternalInstance;
import { useUserStoreHook } from '@/store/modules/user';
import { systemUserList } from '@/api/design/appointment';
import { extractBatch, extractDetail } from '@/api/design/Professional';
import { listVolumeCatalog } from '@/api/design/volumeCatalog';
// 获取用户 store
const userStore = useUserStoreHook();
// 从 store 中获取项目列表和当前选中的项目
@ -150,6 +167,8 @@ const { des_user_major } = toRefs<any>(proxy?.useDict('des_user_major'));
const buttonLoading = ref(false);
const loading = ref(true);
const disableAll = ref(false);
const volumeCatalogList = ref([]);
let volumeMap = new Map();
//路由参数
const routeParams = ref<Record<string, any>>({});
const flowCodeOptions = [
@ -206,13 +225,15 @@ const form = reactive({
documents: [
{
id: Date.now(),
catalogueName: '', // 文件目录名称
remark: '' // 备注
catalogueName: '', // 卷册目录名称
remark: '', // 备注
volumeCatalogId: '' //卷册目录ID
}
] as Array<{
id: number;
catalogueName: string;
remark: string;
volumeCatalogId: string;
}>
});
// 主表单验证规则
@ -238,7 +259,8 @@ const reset = () => {
{
id: Date.now(),
catalogueName: '',
remark: ''
remark: '',
volumeCatalogId: ''
}
];
leaveFormRef.value?.resetFields();
@ -248,7 +270,8 @@ const addDocumentItem = () => {
form.documents.push({
id: Date.now(),
catalogueName: '',
remark: ''
remark: '',
volumeCatalogId: ''
});
};
@ -262,7 +285,6 @@ const submitForm = (status1: string) => {
buttonLoading.value = true;
dialog.visible = false;
// 验证表单数据
// 验证表单数据(主要验证基本信息中的必填项)
mainFormRef.value.validate(async (valid) => {
if (valid) {
console.log('验证成功');
@ -397,7 +419,8 @@ const byProjectIdAll = async () => {
form.documents.push({
id: item.id || Date.now() + index, // 确保id唯一
catalogueName: item.catalogueName || '',
remark: item.remark || ''
remark: item.remark || '',
volumeCatalogId: item.volumeCatalogId
});
});
} else {
@ -406,7 +429,8 @@ const byProjectIdAll = async () => {
{
id: Date.now(),
catalogueName: '',
remark: ''
remark: '',
volumeCatalogId: ''
}
];
}
@ -414,11 +438,23 @@ const byProjectIdAll = async () => {
loading.value = false;
buttonLoading.value = false;
};
/** 查询卷册目录列表 */
const getList = async () => {
const res = await listVolumeCatalog({ projectId: currentProject.value?.id, auditStatus: 'finish' });
volumeCatalogList.value = res.rows;
volumeCatalogList.value.forEach((e) => {
volumeMap.set(e.design, e);
});
};
const handleSelect = (val, item) => {
item.catalogueName = volumeMap.get(val).documentName;
};
onMounted(() => {
nextTick(async () => {
routeParams.value = proxy.$route.query;
reset();
loading.value = false;
getList(); // 获取卷册目录
if (routeParams.value.type === 'update' || routeParams.value.type === 'view' || routeParams.value.type === 'approval') {
getDeptAllUser(userStore.deptId).then(() => {
byProjectIdAll();

View File

@ -150,11 +150,9 @@ import { ref, reactive, computed, onMounted, toRefs } from 'vue';
import { getCurrentInstance } from 'vue';
import type { ComponentInternalInstance } from 'vue';
import { useUserStoreHook } from '@/store/modules/user';
import { listUserByDeptId } from '@/api/system/user';
import { ElMessage, ElLoading } from 'element-plus';
import { Delete } from '@element-plus/icons-vue';
import { designUserAdd, designUserList, systemUserList } from '@/api/design/appointment';
import { disable } from 'ol/rotationconstraint';
// 获取当前实例
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
@ -194,7 +192,6 @@ const getDeptAllUser = async (deptId: any) => {
userList.value = res.rows;
} catch (error) {
ElMessage.error('获取用户列表失败');
} finally {
}
};
@ -374,10 +371,21 @@ const resetForm = () => {
ElMessage.info('表单已重置');
}
};
//监听项目id刷新数据
const listeningProject = watch(
() => currentProject.value?.id,
(nid, oid) => {
getDeptAllUser(userStore.deptId).then(() => {
designUser();
});
}
);
onUnmounted(() => {
listeningProject();
});
// 页面挂载时初始化数据
onMounted(() => {
console.log(userStore.deptId);
// 先获取用户列表,再加载表单数据
getDeptAllUser(userStore.deptId).then(() => {
designUser();

View File

@ -25,11 +25,16 @@
</el-table-column>
<el-table-column label="操作">
<template #default="scope">
<el-button type="primary" icon="Download" @click="onExport(scope.row.fileUrl)">下载</el-button>
<el-button type="success" icon="edit" v-show="scope.row.status == 'draft' || scope.row.status == 'waiting'" @click="onUpdate(scope.row)"
<el-button link type="primary" icon="Download" @click="onExport(scope.row.fileUrl)">下载</el-button>
<el-button
type="success"
link
icon="edit"
v-show="scope.row.status == 'draft' || scope.row.status == 'waiting'"
@click="onUpdate(scope.row)"
>审核</el-button
>
<el-button type="warning" v-show="scope.row.status != 'draft'" icon="View" @click="onView(scope.row)">查看流程</el-button>
<el-button link type="warning" v-show="scope.row.status != 'draft'" icon="View" @click="onView(scope.row)">查看流程</el-button>
</template>
</el-table-column>
</el-table>

View File

@ -44,10 +44,11 @@
</el-row>
</template>
<el-table v-loading="loading" :data="designChangeList">
<el-table-column label="序号" type="index" width="60" align="center" />
<el-table-column label="申请单编号" align="center" prop="formNo" width="150" />
<el-table-column label="工程名称" align="center" prop="projectName" width="150" />
<el-table-column label="提出单位" align="center" prop="submitUnit" width="150" />
<el-table-column label="专业" align="center" prop="specialty" width="120" />
<el-table-column label="专业" align="center" prop="specialtyName" width="120" />
<el-table-column label="提出日期" align="center" prop="submitDate" width="150">
<template #default="scope">
<span>{{ parseTime(scope.row.submitDate, '{y}-{m}-{d}') }}</span>
@ -81,11 +82,12 @@
<el-table-column label="操作" fixed="right" width="340">
<template #default="scope">
<el-button type="primary" link icon="Upload" @click="handleAddChange(scope.row)" v-if="!scope.row.fileId">上传</el-button>
<el-button type="success" link icon="View" @click="handleViewInfo(scope.row)">查看</el-button>
<el-button type="success" link icon="View" v-if="scope.row.status != 'draft'" @click="handleViewInfo(scope.row)">查看</el-button>
<el-button type="success" link icon="View" @click="handleViewDetail(scope.row)">通知单</el-button>
<!-- <el-tooltip content="查看文档" placement="top">
<el-button link type="primary" icon="Document" @click="handleView(scope.row)"></el-button>
</el-tooltip> -->
<el-button type="warning" link icon="View" v-if="scope.row.status != 'draft'" @click="handleViewHistory(scope.row)">查看单据</el-button>
</template>
</el-table-column>
</el-table>
@ -120,6 +122,9 @@
</span>
</template>
</el-dialog>
<el-dialog title="单据" v-model="viewDetailVisible" width="800px">
<histroy ref="histroyRef"></histroy>
</el-dialog>
</div>
</template>
@ -128,7 +133,7 @@ import { listDesignChange, delDesignChange } from '@/api/design/designChange';
import { DesignChangeVO } from '@/api/design/designChange/types';
import { useUserStoreHook } from '@/store/modules/user';
import wordDetial from '@/components/wordDetial/index';
import histroy from '../volumeCatalog/comm/histroy.vue';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { design_change_reason_type } = toRefs<any>(proxy?.useDict('design_change_reason_type'));
// 获取用户 store
@ -137,11 +142,9 @@ const userStore = useUserStoreHook();
const currentProject = computed(() => userStore.selectedProject);
const designChangeList = ref<DesignChangeVO[]>([]);
const wordDetialRef = ref<InstanceType<typeof wordDetial>>();
const histroyRef = ref<InstanceType<typeof histroy>>();
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 { wf_business_status } = toRefs<any>(proxy?.useDict('wf_business_status'));
const queryFormRef = ref<ElFormInstance>();
@ -151,6 +154,7 @@ const uploadUrl = computed(() => {
const viewVisible = ref(false);
const fileList = ref([]);
const ossid = ref(null);
const viewDetailVisible = ref(false);
const data = reactive({
queryParams: {
pageNum: 1,
@ -182,7 +186,6 @@ const getList = async () => {
/** 搜索按钮操作 */
const handleQuery = () => {
console.log(ossid.value);
queryParams.value.pageNum = 1;
getList();
};
@ -192,7 +195,7 @@ const resetQuery = () => {
queryFormRef.value?.resetFields();
handleQuery();
};
/** 新增按钮操作 */
/** 下发通知 */
const handleAdd = () => {
proxy.$tab.closePage(proxy.$route);
proxy.$router.push({
@ -202,7 +205,7 @@ const handleAdd = () => {
}
});
};
/** 新增按钮操作 */
/** 查看详情 */
const handleViewDetail = (row) => {
proxy.$tab.closePage(proxy.$route);
proxy.$router.push({
@ -213,7 +216,7 @@ const handleViewDetail = (row) => {
}
});
};
// 变更图纸
// 上传变更图纸
const handleAddChange = (row) => {
proxy.$tab.closePage(proxy.$route);
proxy.$router.push({
@ -224,7 +227,7 @@ const handleAddChange = (row) => {
}
});
};
/** 查看按钮操作 */
/** 查看流程操作 */
const handleViewInfo = (row) => {
proxy.$tab.closePage(proxy.$route);
proxy.$router.push({
@ -240,9 +243,12 @@ const handleDesignView = async (row?: DesignChangeVO) => {
fileList.value = row.ossVoList;
viewVisible.value = true;
};
const handleView = (row) => {
// 查看详情
wordDetialRef.value?.openDialog(row, design_change_reason_type.value);
const handleViewHistory = async (row) => {
// 查看历史流程记录
viewDetailVisible.value = true;
nextTick(() => {
histroyRef.value?.getList(row.id);
});
};
// 预览
const onOpen = (path: string) => {

View File

@ -2,9 +2,14 @@
<div class="p-4 bg-gray-50 designChangeForm">
<div class="max-w-4xl mx-auto">
<!-- 表单区域 -->
<div v-if="routeParams.type == 'view'" style="width: 100%; text-align: right; margin-bottom: 10px">
<el-button @click="goBack" size="large" class="px-4 py-2 border border-gray-300 rounded-md text-gray-700 hover:bg-gray-50 transition-colors"
>返回</el-button
>
</div>
<el-card class="rounded-lg shadow-sm bg-white border border-gray-100 transition-all hover:shadow-md overflow-hidden">
<div class="p-4 bg-gradient-to-r from-blue-50 to-indigo-50 border-b border-gray-100">
<h3 class="text-lg font-semibold text-gray-800">设计变更信息</h3>
<h3 class="text-lg font-semibold text-gray-800">下发变更通知信息</h3>
</div>
<div class="p-6">
<el-form ref="leaveFormRef" :disabled="routeParams.type === 'view'" :model="form" :rules="rules" label-width="100px" class="space-y-4">
@ -44,8 +49,8 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="专业" prop="specialty">
<el-input disabled v-model="form.specialty" placeholder="请输入专业" />
<el-form-item label="专业" prop="specialtyName">
<el-input disabled v-model="form.specialtyName" placeholder="请输入专业" />
</el-form-item>
</el-col>
<el-col :span="12">
@ -143,7 +148,11 @@
</el-form>
</div>
<div class="flex justify-center gap-4 mt-8">
<el-button @click="goBack" size="large" class="px-4 py-2 border border-gray-300 rounded-md text-gray-700 hover:bg-gray-50 transition-colors"
<el-button
v-if="routeParams.type != 'view'"
@click="goBack"
size="large"
class="px-4 py-2 border border-gray-300 rounded-md text-gray-700 hover:bg-gray-50 transition-colors"
>返回</el-button
>
<el-button
@ -191,6 +200,7 @@ const initFormData = {
projectName: undefined,
submitUnit: undefined,
specialty: undefined,
specialtyName: undefined,
submitDate: undefined,
volumeName: undefined,
volumeNo: undefined,
@ -279,6 +289,7 @@ const handleSelect = (val) => {
fileVoList.value = obj.fileVoList;
form.value.volumeName = obj.volumeName;
form.value.specialty = obj.specialty;
form.value.specialtyName = obj.specialtyName;
form.value.extendDetail.subName = obj.designSubitem;
};
/** 获取详情 */

View File

@ -23,7 +23,7 @@
<el-form ref="leaveFormRef" :disabled="routeParams.type === 'view'" :model="form" :rules="rules" label-width="100px" class="space-y-4">
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
<el-form-item label="图纸文件" prop="fileId" class="mb-2 md:col-span-2">
<file-upload :limit="10" :fileSize="100" v-model="form.fileId" class="w-full"></file-upload>
<file-upload :fileType="['pdf']" :fileSize="''" v-model="form.fileId" class="w-full"></file-upload>
</el-form-item>
</div>
</el-form>

View File

@ -81,7 +81,7 @@
<el-form-item label="校审时间" prop="proofreadingDate">
<el-date-picker
v-model="formData.proofreadingDate"
type="datetime"
type="date"
placeholder="选择校审时间"
format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
@ -100,7 +100,7 @@
</el-col> -->
<el-col :span="12">
<el-form-item label="审核时间" prop="auditDate">
<el-date-picker v-model="formData.auditDate" type="datetime" placeholder="选择审核时间" format="YYYY-MM-DD" value-format="YYYY-MM-DD" />
<el-date-picker v-model="formData.auditDate" type="date" placeholder="选择审核时间" format="YYYY-MM-DD" value-format="YYYY-MM-DD" />
</el-form-item>
</el-col>
<el-col :span="12">
@ -115,13 +115,7 @@
</el-col> -->
<el-col :span="12">
<el-form-item label="执行时间" prop="executorDate">
<el-date-picker
v-model="formData.executorDate"
type="datetime"
placeholder="选择执行时间"
format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
/>
<el-date-picker v-model="formData.executorDate" type="date" placeholder="选择执行时间" format="YYYY-MM-DD" value-format="YYYY-MM-DD" />
</el-form-item>
</el-col>
</el-row>

View File

@ -0,0 +1,253 @@
<template>
<div class="volume-catalog-container">
<div class="history-selector">
<span>选择历史退回记录</span>
<el-select v-model="hisId" placeholder="请选择" style="width: 240px" @change="handleShowInfo">
<el-option v-for="item in hisList" :key="item.id" :label="item.createTime" :value="item.id" />
</el-select>
</div>
<div class="volumeCatalog_box" style="margin-top: 20px">
<!-- <span style="color: #0d9df5">查看excel文件</span> -->
<div class="table-content" id="table-content" style="margin-top: 20px">
<el-row class="mb20" style="display: flex; justify-content: center">
<h2>设计验证表</h2>
</el-row>
<el-row class="mb10" style="display: flex; justify-content: space-between">
<div class="head-text">
<span>编号</span>
<span>{{ examineForm.num }}</span>
</div>
<div class="head-text"></div>
</el-row>
<table style="width: 100%" border="1" cellspacing="1">
<thead>
<tr>
<th colspan="2">工程名称</th>
<td class="th-bg" colspan="10">{{ examineForm.projectName }}</td>
</tr>
</thead>
<tbody>
<tr>
<th colspan="2">子项名称</th>
<td class="th-bg" colspan="6">{{ examineForm.subprojectName }}</td>
<th colspan="2">设计阶段</th>
<td class="th-bg" colspan="2">{{ examineForm.stage }}</td>
</tr>
</tbody>
<tbody>
<tr>
<th colspan="2">专业</th>
<td class="th-bg" colspan="2">{{ examineForm.professional }}</td>
<th colspan="2">卷册</th>
<td class="th-bg" colspan="2">{{ examineForm.volume }}</td>
<th colspan="2">设计人</th>
<td class="th-bg" colspan="2">{{ examineForm.designer }}</td>
</tr>
</tbody>
<tbody>
<tr>
<th colspan="2">验证内容</th>
<td class="th-bg" colspan="10">{{ examineForm.verificationContent }}</td>
</tr>
</tbody>
<tbody>
<tr>
<th colspan="6">验证意见</th>
<th class="th-bg" colspan="6">执行意见</th>
</tr>
</tbody>
<tbody>
<tr>
<td colspan="6">
<div style="height: 400px; padding: 8px; box-sizing: border-box">
{{ examineForm.verificationOpinion }}
</div>
</td>
<td class="th-bg" colspan="6">
<div style="height: 400px; padding: 8px; box-sizing: border-box">
{{ examineForm.executionOpinion }}
</div>
</td>
</tr>
</tbody>
<tbody>
<tr>
<td colspan="6">
<div style="display: flex; align-items: center; justify-content: space-between; padding: 8px">
<span>校审 {{ examineForm.proofreading }}</span>
<span>{{ dateFormat(examineForm.proofreadingDate) }}</span>
</div>
</td>
<td rowspan="2" colspan="6" class="th-bg">
<div style="padding: 8px">执行人 {{ examineForm.executor }}</div>
<div style="display: flex; align-items: center; justify-content: flex-end; padding: 8px">
{{ dateFormat(examineForm.executorDate) }}
</div>
</td>
</tr>
<tr>
<td class="th-bg" colspan="6">
<div style="display: flex; align-items: center; justify-content: space-between; padding: 8px">
<span>审核 {{ examineForm.audit }}</span>
<span>{{ dateFormat(examineForm.auditDate) }}</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</template>
<script setup name="VolumeCatalog" lang="ts">
import { ref, reactive, onMounted } from 'vue';
import { ElSelect, ElOption, ElRow } from 'element-plus';
import { drawingreviewReceiptsDetail, drawingreviewReceiptsList } from '@/api/design/drawingreview';
// 定义历史记录项类型
interface HistoryItem {
id: string | number;
createTime: string;
}
// 定义表单数据类型
interface ExamineForm {
num: string;
projectName: string;
subprojectName: string;
stage: string;
professional: string;
volume: string;
designer: string;
verificationContent: string;
verificationOpinion: string;
executionOpinion: string;
proofreading: string;
proofreadingDate: string | Date | null;
executor: string;
executorDate: string | Date | null;
audit: string;
auditDate: string | Date | null;
}
// 响应式变量
const hisId = ref<string | number>('');
const hisList = ref<HistoryItem[]>([]);
const examineForm = reactive<ExamineForm>({
num: '',
projectName: '',
subprojectName: '',
stage: '',
professional: '',
volume: '',
designer: '',
verificationContent: '',
verificationOpinion: '',
executionOpinion: '',
proofreading: '',
proofreadingDate: null,
executor: '',
executorDate: null,
audit: '',
auditDate: null
});
// 处理历史记录选择变化
const handleShowInfo = async (value: string | number) => {
getDetails(value);
};
// 日期格式化方法
const dateFormat = (date: string | Date | null): string => {
if (!date) return '';
// 处理字符串类型的日期
if (typeof date === 'string') {
date = new Date(date);
}
// 检查日期是否有效
if (isNaN(date.getTime())) {
return '';
}
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0');
const day = String(date.getDate()).padStart(2, '0');
const hours = String(date.getHours()).padStart(2, '0');
const minutes = String(date.getMinutes()).padStart(2, '0');
return `${year}-${month}-${day} ${hours}:${minutes}`;
};
// 获取详情
const getList = async (drawingreviewId) => {
let res = await drawingreviewReceiptsList({ drawingreviewId });
hisList.value = res.rows;
if (hisList.value.length > 0) {
hisId.value = hisList.value[0].id;
getDetails(hisId.value);
}
};
const getDetails = async (id) => {
let res = await drawingreviewReceiptsDetail(id);
Object.assign(examineForm, res.data);
};
// 抛出
defineExpose({ getList });
</script>
<style scoped lang="scss">
.volume-catalog-container {
padding: 20px;
box-sizing: border-box;
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>

View File

@ -46,18 +46,15 @@
</el-row>
</template>
<el-table v-loading="loading" :data="volumeCatalogList">
<el-table-column label="序号" type="index" width="60" align="center" />
<el-table-column label="子项名称" align="center" prop="designSubitem" />
<el-table-column label="设计状态" align="center" prop="designState">
<template #default="scope">
<dict-tag :options="design_state" :value="scope.row.designState" />
</template>
</el-table-column>
<el-table-column label="专业" align="center" prop="specialty">
<template #default="scope">
<dict-tag :options="des_user_major" :value="scope.row.specialty" />
</template>
</el-table-column>
<el-table-column label="设计人员" align="center" prop="principal" />
<el-table-column label="专业" align="center" prop="specialtyName"> </el-table-column>
<el-table-column label="设计人员" align="center" prop="principalName" />
<el-table-column label="卷册号" align="center" prop="volumeNumber" />
<el-table-column label="资料名称" align="center" prop="documentName" />
<el-table-column label="计划出图时间" align="center" prop="plannedCompletion" width="200" />
@ -114,7 +111,7 @@
v-hasPermi="['out:monthPlan:remove']"
>查看流程</el-button
>
<el-button type="warning" link size="small" icon="View" v-if="scope.row.auditType != 'draft'" @click="handleViewHistory(scope.row)"
<el-button type="warning" link icon="View" v-if="scope.row.auditType != 'draft'" @click="handleViewHistory(scope.row)"
>查看单据</el-button
>
</template>
@ -134,7 +131,9 @@
</el-select>
</el-form-item>
<el-form-item label="设计人员" prop="principal">
<el-input v-model="form.principal" placeholder="请输入设计人员" />
<el-select v-model="form.principal" placeholder="请选择设计人员" class="transition-all duration-300 border-gray-300">
<el-option v-for="item in userAppList" :key="item.userId" :label="item.userName" :value="item.userId" />
</el-select>
</el-form-item>
<el-form-item label="设计状态" prop="designState">
<el-select v-model="form.designState" placeholder="请选择设计状态">
@ -164,7 +163,7 @@
<el-dialog draggable title="上传图纸卷册文件" v-model="uploadVisible" width="500px" append-to-body>
<el-form :model="uploadForm" label-width="80px" :inline="false">
<el-form-item label="上传文件" prop="fileId">
<file-upload v-model="uploadForm.fileId"></file-upload>
<file-upload :fileType="['pdf']" :fileSize="''" v-model="uploadForm.fileId"></file-upload>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onSubmit" :loading="buttonLoading">确定</el-button>
@ -188,12 +187,12 @@
</el-link>
</template>
</el-table-column>
<el-table-column prop="size" label="是否变更" align="center">
<el-table-column prop="size" label="是否变更" align="center" width="120">
<template #default="scope">
<el-tag :type="scope.row.type == 1 ? 'success' : 'info'">{{ scope.row.type == 1 ? '否' : '是' }}</el-tag>
</template>
</el-table-column>
<el-table-column prop="size" label="状态" width="170" align="center">
<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>
@ -211,100 +210,8 @@
</span>
</template>
</el-dialog>
<el-dialog draggable title="查看历史" v-model="dialogHistory" width="800px" append-to-body>
<div>
<span>选择历史退回记录</span>
<el-select v-model="hisId" placeholder="请选择" style="width: 240px" @change="handleShowInfo">
<el-option v-for="item in hisList" :key="item.id" :label="item.createTime" :value="item.id" />
</el-select>
<div style="margin-top: 20px" class="volumeCatalog_box">
<span style="color: #0d9df5">查看excel文件</span>
<div style="margin-top: 20px" class="table-content" id="table-content">
<el-row class="mb20" style="display: flex; justify-content: center">
<h2>设计验证表</h2>
</el-row>
<el-row class="mb10" style="display: flex; justify-content: space-between">
<div class="head-text">
<span>编号</span>
<span>{{ examineForm.num }}</span>
</div>
<div class="head-text"></div>
</el-row>
<table style="width: 100%" border="1" cellspacing="1">
<thead>
<tr>
<th colspan="2">工程名称</th>
<td class="th-bg" colspan="10">{{ examineForm.projectName }}</td>
</tr>
</thead>
<tbody>
<tr>
<th colspan="2">子项名称</th>
<td class="th-bg" colspan="6">{{ examineForm.subprojectName }}</td>
<th colspan="2">设计阶段</th>
<td class="th-bg" colspan="2">{{ examineForm.stage }}</td>
</tr>
</tbody>
<tbody>
<tr>
<th colspan="2">专业</th>
<td class="th-bg" colspan="2">{{ examineForm.professional }}</td>
<th colspan="2">卷册</th>
<td class="th-bg" colspan="2">{{ examineForm.volume }}</td>
<th colspan="2">设计人</th>
<td class="th-bg" colspan="2">{{ examineForm.designer }}</td>
</tr>
</tbody>
<tbody>
<tr>
<th colspan="2">验证内容</th>
<td class="th-bg" colspan="10">{{ examineForm.verificationContent }}</td>
</tr>
</tbody>
<tbody>
<tr>
<th colspan="6">验证意见</th>
<th class="th-bg" colspan="6">执行意见</th>
</tr>
</tbody>
<tbody>
<tr>
<td colspan="6">
<div style="height: 400px">{{ examineForm.verificationOpinion }}</div>
</td>
<td class="th-bg" colspan="6">
<div style="height: 400px">{{ examineForm.executionOpinion }}</div>
</td>
</tr>
</tbody>
<tbody>
<tr>
<td colspan="6">
<div style="display: flex; align-items: center; justify-content: space-between">
<span> 校审 {{ examineForm.proofreading }} </span>
<span> {{ dateFormat(examineForm.proofreadingDate) }}</span>
</div>
</td>
<td rowspan="2" colspan="6">
<div>执行人 {{ examineForm.executor }}</div>
<div style="display: flex; align-items: center; justify-content: flex-end">
{{ dateFormat(examineForm.executorDate) }}
</div>
</td>
</tr>
<tr>
<td class="th-bg" colspan="6">
<div style="display: flex; align-items: center; justify-content: space-between">
<span>审核 {{ examineForm.audit }}</span>
<span> {{ dateFormat(examineForm.auditDate) }}</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<el-dialog title="单据" v-model="dialogHistory" width="800px">
<histroy ref="histroyRef"></histroy>
</el-dialog>
</div>
</template>
@ -322,7 +229,9 @@ import {
} from '@/api/design/volumeCatalog';
import { VolumeCatalogVO } from '@/api/design/volumeCatalog/types';
import { useUserStoreHook } from '@/store/modules/user';
import histroy from './comm/histroy.vue';
const fileList = ref([]);
import { designUserList } from '@/api/design/appointment';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { design_state, wf_business_status, des_user_major } = toRefs(proxy?.useDict('design_state', 'wf_business_status', 'des_user_major'));
import { drawingreviewReceiptsDetail, drawingreviewReceiptsList } from '@/api/design/drawingreview';
@ -331,12 +240,11 @@ const buttonLoading = ref(false);
const loading = ref(true);
const showSearch = ref(true);
const ids = ref<Array<string | number>>([]);
const histroyRef = ref<InstanceType<typeof histroy>>();
const single = ref(true);
const multiple = ref(true);
const total = ref(0);
const hisId = ref('');
const dialogHistory = ref(false);
const hisList = ref([]);
// 获取用户 store
const userStore = useUserStoreHook();
// 从 store 中获取项目列表和当前选中的项目
@ -382,7 +290,7 @@ const examineForm = ref({
volume: ''
});
const userList = ref([]);
const userAppList = ref([]); //人事任命的用户
const initFormData: any = {
design: undefined,
projectId: currentProject.value?.id || '',
@ -425,26 +333,26 @@ const getList = async () => {
loading.value = false;
}
};
const dateFormat = (v) => {
if (!v) return '-';
let time = new Date(v);
let y = time.getFullYear();
let MM = time.getMonth() + 1;
MM = MM < 10 ? '0' + MM : MM;
let d = time.getDate();
d = d < 10 ? '0' + d : d;
return y + '年' + MM + '月' + d + '日';
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 handleViewHistory = async (row) => {
// 查看历史流程记录
dialogHistory.value = true;
hisId.value = '';
let res = await drawingreviewReceiptsList({ drawingreviewId: row.design });
hisList.value = res.rows;
if (hisList.value.length > 0) {
hisId.value = hisList.value[0].id;
getDetails(hisId.value);
}
// 查看历史流程记录
nextTick(() => {
histroyRef.value?.getList(row.design);
});
};
const handleShowInfo = (val) => {
getDetails(val);
@ -508,12 +416,6 @@ const handleUpload = async (row?: any) => {
uploadForm.fileList = res.data.filter((item) => item.status == '1') || [];
uploadVisible.value = true;
};
/** 查看文件 */
const lookFile = (fileId: string) => {
// lookViewerFile(fileId);
};
/** 重置上传表单 */
const resetUploadForm = () => {
uploadForm.userIds = [];
@ -612,6 +514,7 @@ const handleUpdate = async (row?: VolumeCatalogVO) => {
};
onMounted(() => {
getUserAppList();
getList();
});
@ -621,6 +524,7 @@ const listeningProject = watch(
(nid, oid) => {
queryParams.value.projectId = nid;
form.value.projectId = nid;
getUserAppList();
getList();
}
);