2025-08-12 21:05:02 +08:00
|
|
|
|
<template>
|
2025-08-13 19:11:51 +08:00
|
|
|
|
<div class="p-2 drawingreview">
|
2025-08-12 21:05:02 +08:00
|
|
|
|
<el-card shadow="never">
|
|
|
|
|
<template #header>
|
|
|
|
|
<el-row :gutter="10" class="mb8">
|
|
|
|
|
<el-col :span="1.5">
|
2025-08-13 19:11:51 +08:00
|
|
|
|
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['design:drawingreview:add']">新增</el-button>
|
2025-08-12 21:05:02 +08:00
|
|
|
|
</el-col>
|
2025-08-13 19:11:51 +08:00
|
|
|
|
<right-toolbar @queryTable="getList"></right-toolbar>
|
2025-08-12 21:05:02 +08:00
|
|
|
|
</el-row>
|
|
|
|
|
</template>
|
2025-08-13 19:11:51 +08:00
|
|
|
|
<el-table v-loading="loading" :data="drawingreviewList">
|
|
|
|
|
<el-table-column type="index" label="序号" width="100" align="center" />
|
2025-08-12 21:05:02 +08:00
|
|
|
|
<el-table-column label="文件名称" align="center" prop="fileName" />
|
2025-08-13 19:11:51 +08:00
|
|
|
|
<el-table-column label="流程状态" align="center">
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<dict-tag :options="wf_business_status" :value="scope.row.auditType" />
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
2025-08-12 21:05:02 +08:00
|
|
|
|
<el-table-column label="备注" align="center" prop="remark" />
|
2025-08-13 19:11:51 +08:00
|
|
|
|
<el-table-column label="操作" align="center">
|
2025-08-12 21:05:02 +08:00
|
|
|
|
<template #default="scope">
|
2025-08-13 19:11:51 +08:00
|
|
|
|
<el-row :gutter="10" class="mb8"
|
|
|
|
|
><el-col :span="1.5" v-if="scope.row.auditType === 'draft' || scope.row.auditType === 'cancel' || scope.row.auditType === 'back'">
|
|
|
|
|
<el-button size="small" type="primary" icon="Edit" @click="handleUpdate(scope.row)">审核</el-button>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
<el-button type="warning" size="small" icon="View" v-if="scope.row.auditType != 'draft'" @click="handleViewInfo(scope.row)"
|
|
|
|
|
>查看流程</el-button
|
|
|
|
|
> </el-col
|
|
|
|
|
><el-col :span="1.5">
|
|
|
|
|
<el-button type="warning" size="small" icon="View" v-if="scope.row.auditType != 'draft'" @click="handleViewHistory(scope.row)"
|
|
|
|
|
>查看历史</el-button
|
|
|
|
|
>
|
|
|
|
|
</el-col></el-row
|
|
|
|
|
>
|
2025-08-12 21:05:02 +08:00
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
2025-08-13 19:11:51 +08:00
|
|
|
|
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
2025-08-12 21:05:02 +08:00
|
|
|
|
</el-card>
|
|
|
|
|
<el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
|
|
|
|
|
<el-form ref="drawingreviewFormRef" :model="form" :rules="rules" label-width="80px">
|
2025-08-13 19:11:51 +08:00
|
|
|
|
<el-form-item label="图纸文件" prop="auditType">
|
2025-08-12 21:05:02 +08:00
|
|
|
|
<el-upload ref="uploadRef" class="upload-demo" :http-request="importExcel">
|
|
|
|
|
<template #trigger>
|
|
|
|
|
<el-button type="primary">上传excel</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-upload>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="备注" prop="remark">
|
|
|
|
|
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
<template #footer>
|
|
|
|
|
<div class="dialog-footer">
|
|
|
|
|
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
2025-08-13 19:11:51 +08:00
|
|
|
|
<el-button @click="dialog.visible = false">取 消</el-button>
|
2025-08-12 21:05:02 +08:00
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
</el-dialog>
|
2025-08-13 19:11:51 +08:00
|
|
|
|
<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.id" :value="item.id" />
|
|
|
|
|
</el-select>
|
|
|
|
|
<div style="margin-top: 20px">
|
|
|
|
|
<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>
|
2025-08-12 21:05:02 +08:00
|
|
|
|
</div>
|
2025-08-13 19:11:51 +08:00
|
|
|
|
</div>
|
2025-08-12 21:05:02 +08:00
|
|
|
|
</el-dialog>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup name="Drawingreview">
|
2025-08-13 19:11:51 +08:00
|
|
|
|
import { computed, getCurrentInstance, toRefs } from 'vue';
|
|
|
|
|
import {
|
|
|
|
|
listDrawingreview,
|
|
|
|
|
addDrawingreview,
|
|
|
|
|
updateDrawingreview,
|
|
|
|
|
ObtainHistoricalDesignDrawingsForReview,
|
|
|
|
|
drawingreview
|
|
|
|
|
} from '@/api/design/drawingreview';
|
2025-08-12 21:05:02 +08:00
|
|
|
|
import { useUserStoreHook } from '@/store/modules/user';
|
|
|
|
|
import { fromFile } from 'geotiff';
|
|
|
|
|
const { proxy } = getCurrentInstance();
|
2025-08-13 19:11:51 +08:00
|
|
|
|
const { wf_business_status } = toRefs(proxy?.useDict('wf_business_status'));
|
|
|
|
|
|
2025-08-12 21:05:02 +08:00
|
|
|
|
const userStore = useUserStoreHook();
|
|
|
|
|
const loading = ref(true);
|
|
|
|
|
const buttonLoading = ref(false);
|
|
|
|
|
const total = ref(0);
|
|
|
|
|
const drawingreviewList = ref([]);
|
2025-08-13 19:11:51 +08:00
|
|
|
|
const hisList = ref([]);
|
|
|
|
|
const hisId = ref('');
|
|
|
|
|
const fromData = new FormData();
|
2025-08-12 21:05:02 +08:00
|
|
|
|
const currentProject = computed(() => userStore.selectedProject);
|
|
|
|
|
const dialog = reactive({
|
|
|
|
|
visible: false,
|
|
|
|
|
title: ''
|
|
|
|
|
});
|
2025-08-13 19:11:51 +08:00
|
|
|
|
const dialogHistory = ref(false);
|
2025-08-12 21:05:02 +08:00
|
|
|
|
const initexamineForm = {
|
|
|
|
|
id: undefined,
|
|
|
|
|
projectId: currentProject.value?.id,
|
|
|
|
|
auditType: undefined,
|
2025-08-13 19:11:51 +08:00
|
|
|
|
remark: undefined
|
|
|
|
|
};
|
2025-08-12 21:05:02 +08:00
|
|
|
|
const drawingreviewFormRef = ref();
|
|
|
|
|
const data = reactive({
|
|
|
|
|
form: { ...initexamineForm },
|
|
|
|
|
queryParams: {
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
projectId: currentProject.value?.id,
|
|
|
|
|
auditType: undefined,
|
2025-08-13 19:11:51 +08:00
|
|
|
|
params: {}
|
2025-08-12 21:05:02 +08:00
|
|
|
|
},
|
|
|
|
|
rules: {
|
2025-08-13 19:11:51 +08:00
|
|
|
|
id: [{ required: true, message: '项目ID不能为空', trigger: 'blur' }]
|
2025-08-12 21:05:02 +08:00
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
const { queryParams, form, rules } = toRefs(data);
|
2025-08-13 19:11:51 +08:00
|
|
|
|
const examineForm = ref({
|
2025-08-12 21:05:02 +08:00
|
|
|
|
audit: '',
|
|
|
|
|
auditDate: '',
|
|
|
|
|
auditId: '',
|
|
|
|
|
designer: '',
|
|
|
|
|
executionOpinion: '',
|
|
|
|
|
executor: '',
|
|
|
|
|
executorDate: '',
|
|
|
|
|
executorId: '',
|
|
|
|
|
id: '1',
|
|
|
|
|
num: '',
|
|
|
|
|
professional: '',
|
|
|
|
|
projectId: '',
|
|
|
|
|
projectName: '',
|
|
|
|
|
proofreading: '',
|
|
|
|
|
proofreadingDate: '',
|
|
|
|
|
proofreadingId: '',
|
|
|
|
|
stage: '',
|
|
|
|
|
subprojectId: '',
|
|
|
|
|
subprojectName: '',
|
|
|
|
|
verificationContent: '',
|
|
|
|
|
verificationOpinion: '',
|
|
|
|
|
volume: ''
|
|
|
|
|
});
|
2025-08-13 19:11:51 +08:00
|
|
|
|
// 时间 格式化 YYYY-MM-DD 改为 YYYY年MM月DD日
|
|
|
|
|
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 + '日';
|
|
|
|
|
};
|
2025-08-12 21:05:02 +08:00
|
|
|
|
/** 查询设计-图纸评审列表 */
|
|
|
|
|
const getList = async () => {
|
|
|
|
|
loading.value = true;
|
|
|
|
|
const res = await listDrawingreview(queryParams.value);
|
|
|
|
|
drawingreviewList.value = res.rows;
|
|
|
|
|
total.value = res.total;
|
|
|
|
|
loading.value = false;
|
2025-08-13 19:11:51 +08:00
|
|
|
|
};
|
2025-08-12 21:05:02 +08:00
|
|
|
|
/** 新增按钮操作 */
|
|
|
|
|
const handleAdd = () => {
|
|
|
|
|
reset();
|
|
|
|
|
dialog.visible = true;
|
2025-08-13 19:11:51 +08:00
|
|
|
|
dialog.title = '添加设计-图纸评审';
|
|
|
|
|
};
|
2025-08-12 21:05:02 +08:00
|
|
|
|
/** 表单重置 */
|
|
|
|
|
const reset = () => {
|
|
|
|
|
form.value = { ...initexamineForm };
|
|
|
|
|
drawingreviewFormRef.value?.resetFields();
|
2025-08-13 19:11:51 +08:00
|
|
|
|
};
|
|
|
|
|
function handleUpdate(row) {
|
|
|
|
|
proxy.$tab.closePage(proxy.$route);
|
|
|
|
|
proxy.$router.push({
|
|
|
|
|
path: `/design-management/drawingreview/indexEdit`,
|
|
|
|
|
query: {
|
|
|
|
|
id: row.id,
|
|
|
|
|
type: 'update'
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
function handleViewInfo(row) {
|
|
|
|
|
proxy.$tab.closePage(proxy.$route);
|
|
|
|
|
proxy.$router.push({
|
|
|
|
|
path: `/design-management/drawingreview/indexEdit`,
|
|
|
|
|
query: {
|
|
|
|
|
id: row.id,
|
|
|
|
|
type: 'view'
|
|
|
|
|
}
|
|
|
|
|
});
|
2025-08-12 21:05:02 +08:00
|
|
|
|
}
|
2025-08-13 19:11:51 +08:00
|
|
|
|
const handleViewHistory = async (row) => {
|
|
|
|
|
// 查看历史流程记录
|
|
|
|
|
dialogHistory.value = true;
|
|
|
|
|
let res = await ObtainHistoricalDesignDrawingsForReview(row.id);
|
|
|
|
|
console.log(res);
|
|
|
|
|
hisList.value = res;
|
|
|
|
|
hisId.value = hisList.value[0].id;
|
|
|
|
|
getDetails(hisId.value);
|
|
|
|
|
};
|
|
|
|
|
const handleShowInfo = (val) => {
|
|
|
|
|
getDetails(val);
|
|
|
|
|
};
|
|
|
|
|
const getDetails = async (id) => {
|
|
|
|
|
let res = await drawingreview(id);
|
|
|
|
|
examineForm.value = res.data;
|
|
|
|
|
};
|
2025-08-12 21:05:02 +08:00
|
|
|
|
/** 提交按钮 */
|
|
|
|
|
const submitForm = () => {
|
|
|
|
|
drawingreviewFormRef.value?.validate(async (valid) => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
buttonLoading.value = true;
|
|
|
|
|
if (form.value.id) {
|
2025-08-13 19:11:51 +08:00
|
|
|
|
await updateDrawingreview(form.value).finally(() => (buttonLoading.value = false));
|
2025-08-12 21:05:02 +08:00
|
|
|
|
} else {
|
2025-08-13 19:11:51 +08:00
|
|
|
|
await addDrawingreview(form.value, fromData).finally(() => (buttonLoading.value = false));
|
2025-08-12 21:05:02 +08:00
|
|
|
|
}
|
2025-08-13 19:11:51 +08:00
|
|
|
|
proxy?.$modal.msgSuccess('操作成功');
|
2025-08-12 21:05:02 +08:00
|
|
|
|
dialog.visible = false;
|
|
|
|
|
await getList();
|
|
|
|
|
}
|
|
|
|
|
});
|
2025-08-13 19:11:51 +08:00
|
|
|
|
};
|
2025-08-12 21:05:02 +08:00
|
|
|
|
// 上传excel
|
|
|
|
|
function importExcel(options) {
|
2025-08-13 19:11:51 +08:00
|
|
|
|
fromData.append('file', options.file);
|
2025-08-12 21:05:02 +08:00
|
|
|
|
}
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
getList();
|
|
|
|
|
});
|
|
|
|
|
</script>
|
2025-08-13 19:11:51 +08:00
|
|
|
|
<style lang="scss">
|
|
|
|
|
.drawingreview {
|
|
|
|
|
.upload-demo {
|
|
|
|
|
width: 100% !important;
|
|
|
|
|
}
|
2025-08-13 23:42:24 +08:00
|
|
|
|
table {
|
|
|
|
|
border-collapse: collapse; //合并为一个单一的边框
|
|
|
|
|
border-color: rgba(199, 199, 199, 1); //边框颜色按实际自定义即可
|
2025-08-13 19:11:51 +08:00
|
|
|
|
}
|
2025-08-13 23:42:24 +08:00
|
|
|
|
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);
|
|
|
|
|
}
|
2025-08-13 19:11:51 +08:00
|
|
|
|
}
|
2025-08-13 23:42:24 +08:00
|
|
|
|
}
|
|
|
|
|
tbody {
|
|
|
|
|
tr {
|
|
|
|
|
td {
|
|
|
|
|
text-align: left;
|
|
|
|
|
height: 40px; //设置单元格最小高度
|
|
|
|
|
padding: 15px;
|
|
|
|
|
}
|
|
|
|
|
th {
|
|
|
|
|
height: 35px; //设置单元格最小高度
|
|
|
|
|
text-align: center;
|
|
|
|
|
letter-spacing: 5px;
|
|
|
|
|
padding: 15px;
|
|
|
|
|
}
|
2025-08-13 19:11:51 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
2025-08-13 23:42:24 +08:00
|
|
|
|
.table-content {
|
|
|
|
|
box-shadow: 0px 0px 10px #ddd;
|
|
|
|
|
padding: 20px;
|
|
|
|
|
position: relative;
|
|
|
|
|
}
|
2025-08-13 19:11:51 +08:00
|
|
|
|
}
|
|
|
|
|
</style>
|