图纸 优化
This commit is contained in:
@ -1,73 +1,47 @@
|
||||
<template>
|
||||
<div class="p-2">
|
||||
<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>
|
||||
<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="p-2 drawingreview">
|
||||
<el-card shadow="never">
|
||||
<template #header>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Plus" @click="handleAdd"
|
||||
v-hasPermi="['design:drawingreview:add']">新增</el-button>
|
||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['design:drawingreview:add']">新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()"
|
||||
v-hasPermi="['design:drawingreview:edit']">修改</el-button>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()"
|
||||
v-hasPermi="['design:drawingreview:remove']">删除</el-button>
|
||||
</el-col> -->
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="Download" @click="handleExport"
|
||||
v-hasPermi="['design:drawingreview:export']">导出</el-button>
|
||||
</el-col> -->
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||
<right-toolbar @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<el-table v-loading="loading" :data="drawingreviewList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="项目ID" align="center" prop="id" v-if="true" />
|
||||
<el-table v-loading="loading" :data="drawingreviewList">
|
||||
<el-table-column type="index" label="序号" width="100" align="center" />
|
||||
<el-table-column label="文件名称" align="center" prop="fileName" />
|
||||
<el-table-column label="审核类型" align="center" prop="auditType" />
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<el-table-column label="流程状态" align="center">
|
||||
<template #default="scope">
|
||||
<!-- <el-tooltip content="修改" placement="top">
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['design:drawingreview:edit']"></el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip content="删除" placement="top">
|
||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)"
|
||||
v-hasPermi="['design:drawingreview:remove']"></el-button>
|
||||
</el-tooltip> -->
|
||||
<el-tooltip content="修改" placement="top">
|
||||
<el-button link type="primary" icon="Edit" @click="handleExamine(scope.row)"></el-button>
|
||||
</el-tooltip>
|
||||
<dict-tag :options="wf_business_status" :value="scope.row.auditType" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="操作" align="center">
|
||||
<template #default="scope">
|
||||
<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
|
||||
>
|
||||
</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-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
|
||||
<el-form ref="drawingreviewFormRef" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="项目ID" prop="projectId">
|
||||
<el-input v-model="form.projectId" placeholder="请输入项目ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="审核类型" prop="auditType">
|
||||
<el-form-item label="图纸文件" prop="auditType">
|
||||
<el-upload ref="uploadRef" class="upload-demo" :http-request="importExcel">
|
||||
<template #trigger>
|
||||
<el-button type="primary">上传excel</el-button>
|
||||
@ -81,136 +55,142 @@
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
<el-button @click="dialog.visible = false">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<el-dialog title="审核" v-model="examineDialog" width="500px" append-to-body>
|
||||
<el-form ref="formRef" :model="examineForm" :rules="rules1" label-width="120px" class="info-form">
|
||||
<!-- 基本信息区域 -->
|
||||
<el-form-item label="编号" prop="num">
|
||||
<el-input v-model="examineForm.num" placeholder="请输入编号" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="专业" prop="professional">
|
||||
<el-input v-model="examineForm.professional" placeholder="请输入专业" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="设计阶段" prop="stage">
|
||||
<el-input v-model="examineForm.stage" placeholder="请输入设计阶段" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="卷册" prop="volume">
|
||||
<el-input v-model="examineForm.volume" placeholder="请输入卷册" />
|
||||
</el-form-item>
|
||||
|
||||
<!-- 项目信息区域 -->
|
||||
<el-form-item label="项目ID" prop="projectId">
|
||||
<el-input v-model="examineForm.projectId" placeholder="请输入项目ID" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="项目名称" prop="projectName">
|
||||
<el-input v-model="examineForm.projectName" placeholder="请输入项目名称" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="子项目ID" prop="subprojectId">
|
||||
<el-input v-model="examineForm.subprojectId" placeholder="请输入子项目ID" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="子项目名称" prop="subprojectName">
|
||||
<el-input v-model="examineForm.subprojectName" placeholder="请输入子项目名称" />
|
||||
</el-form-item>
|
||||
|
||||
<!-- 人员信息区域 -->
|
||||
<el-form-item label="设计人" prop="designer">
|
||||
<el-input v-model="examineForm.designer" placeholder="请输入设计人" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="校审人员" prop="proofreading">
|
||||
<el-input v-model="examineForm.proofreading" placeholder="请输入校审人员" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="校审人员ID" prop="proofreadingId">
|
||||
<el-input v-model="examineForm.proofreadingId" placeholder="请输入校审人员ID" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="校审时间" prop="proofreadingDate">
|
||||
<el-date-picker v-model="examineForm.proofreadingDate" type="datetime" placeholder="选择校审时间"
|
||||
value-format="YYYY-MM-DD HH:mm:ss" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="审核人员" prop="audit">
|
||||
<el-input v-model="examineForm.audit" placeholder="请输入审核人员" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="审核人员ID" prop="auditId">
|
||||
<el-input v-model="examineForm.auditId" placeholder="请输入审核人员ID" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="审核时间" prop="auditDate">
|
||||
<el-date-picker v-model="examineForm.auditDate" type="datetime" placeholder="选择审核时间"
|
||||
value-format="YYYY-MM-DD HH:mm:ss" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="执行人员" prop="executor">
|
||||
<el-input v-model="examineForm.executor" placeholder="请输入执行人员" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="执行人员ID" prop="executorId">
|
||||
<el-input v-model="examineForm.executorId" placeholder="请输入执行人员ID" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="执行时间" prop="executorDate">
|
||||
<el-date-picker v-model="examineForm.executorDate" type="datetime" placeholder="选择执行时间"
|
||||
value-format="YYYY-MM-DD HH:mm:ss" />
|
||||
</el-form-item>
|
||||
|
||||
<!-- 意见和内容区域 -->
|
||||
<el-form-item label="验证内容" prop="verificationContent">
|
||||
<el-input v-model="examineForm.verificationContent" type="textarea" placeholder="请输入验证内容" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="验证意见" prop="verificationOpinion">
|
||||
<el-input v-model="examineForm.verificationOpinion" type="textarea" placeholder="请输入验证意见" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="执行意见" prop="executionOpinion">
|
||||
<el-input v-model="examineForm.executionOpinion" type="textarea" placeholder="请输入执行意见" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button :loading="buttonLoading" type="primary" @click="submitexamineForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
<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>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="Drawingreview">
|
||||
import { computed, getCurrentInstance,toRefs } from 'vue';
|
||||
import { listDrawingreview, getDrawingreview, addDrawingreview, updateDrawingreview,fillOutTheDesignVerificationForm } from '@/api/design/drawingreview';
|
||||
import { computed, getCurrentInstance, toRefs } from 'vue';
|
||||
import {
|
||||
listDrawingreview,
|
||||
addDrawingreview,
|
||||
updateDrawingreview,
|
||||
ObtainHistoricalDesignDrawingsForReview,
|
||||
drawingreview
|
||||
} from '@/api/design/drawingreview';
|
||||
import { useUserStoreHook } from '@/store/modules/user';
|
||||
import { fromFile } from 'geotiff';
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { wf_business_status } = toRefs(proxy?.useDict('wf_business_status'));
|
||||
|
||||
const userStore = useUserStoreHook();
|
||||
const loading = ref(true);
|
||||
const buttonLoading = ref(false);
|
||||
const total = ref(0);
|
||||
const drawingreviewList = ref([]);
|
||||
const fromData = new FormData()
|
||||
const hisList = ref([]);
|
||||
const hisId = ref('');
|
||||
const fromData = new FormData();
|
||||
const currentProject = computed(() => userStore.selectedProject);
|
||||
const dialog = reactive({
|
||||
visible: false,
|
||||
title: ''
|
||||
});
|
||||
const dialogHistory = ref(false);
|
||||
const initexamineForm = {
|
||||
id: undefined,
|
||||
projectId: currentProject.value?.id,
|
||||
auditType: undefined,
|
||||
remark: undefined,
|
||||
}
|
||||
remark: undefined
|
||||
};
|
||||
const drawingreviewFormRef = ref();
|
||||
const data = reactive({
|
||||
form: { ...initexamineForm },
|
||||
@ -219,17 +199,14 @@ const data = reactive({
|
||||
pageSize: 10,
|
||||
projectId: currentProject.value?.id,
|
||||
auditType: undefined,
|
||||
params: {
|
||||
}
|
||||
params: {}
|
||||
},
|
||||
rules: {
|
||||
id: [
|
||||
{ required: true, message: "项目ID不能为空", trigger: "blur" }
|
||||
],
|
||||
id: [{ required: true, message: '项目ID不能为空', trigger: 'blur' }]
|
||||
}
|
||||
});
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
const examineForm = reactive({
|
||||
const examineForm = ref({
|
||||
audit: '',
|
||||
auditDate: '',
|
||||
auditId: '',
|
||||
@ -253,6 +230,17 @@ const examineForm = reactive({
|
||||
verificationOpinion: '',
|
||||
volume: ''
|
||||
});
|
||||
// 时间 格式化 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 + '日';
|
||||
};
|
||||
/** 查询设计-图纸评审列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true;
|
||||
@ -260,46 +248,126 @@ const getList = async () => {
|
||||
drawingreviewList.value = res.rows;
|
||||
total.value = res.total;
|
||||
loading.value = false;
|
||||
}
|
||||
};
|
||||
/** 新增按钮操作 */
|
||||
const handleAdd = () => {
|
||||
reset();
|
||||
dialog.visible = true;
|
||||
dialog.title = "添加设计-图纸评审";
|
||||
}
|
||||
/** 重置按钮操作 */
|
||||
const resetQuery = () => {
|
||||
queryFormRef.value?.resetFields();
|
||||
handleQuery();
|
||||
}
|
||||
dialog.title = '添加设计-图纸评审';
|
||||
};
|
||||
/** 表单重置 */
|
||||
const reset = () => {
|
||||
form.value = { ...initexamineForm };
|
||||
drawingreviewFormRef.value?.resetFields();
|
||||
};
|
||||
function handleUpdate(row) {
|
||||
proxy.$tab.closePage(proxy.$route);
|
||||
proxy.$router.push({
|
||||
path: `/design-management/drawingreview/indexEdit`,
|
||||
query: {
|
||||
id: row.id,
|
||||
type: 'update'
|
||||
}
|
||||
});
|
||||
}
|
||||
function handleQuery(){}
|
||||
function handleExamine(){}
|
||||
function handleViewInfo(row) {
|
||||
proxy.$tab.closePage(proxy.$route);
|
||||
proxy.$router.push({
|
||||
path: `/design-management/drawingreview/indexEdit`,
|
||||
query: {
|
||||
id: row.id,
|
||||
type: 'view'
|
||||
}
|
||||
});
|
||||
}
|
||||
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;
|
||||
};
|
||||
/** 提交按钮 */
|
||||
const submitForm = () => {
|
||||
drawingreviewFormRef.value?.validate(async (valid) => {
|
||||
if (valid) {
|
||||
buttonLoading.value = true;
|
||||
if (form.value.id) {
|
||||
await updateDrawingreview(form.value).finally(() => buttonLoading.value = false);
|
||||
await updateDrawingreview(form.value).finally(() => (buttonLoading.value = false));
|
||||
} else {
|
||||
await addDrawingreview(form.value, fromData).finally(() => buttonLoading.value = false);
|
||||
await addDrawingreview(form.value, fromData).finally(() => (buttonLoading.value = false));
|
||||
}
|
||||
proxy?.$modal.msgSuccess("操作成功");
|
||||
proxy?.$modal.msgSuccess('操作成功');
|
||||
dialog.visible = false;
|
||||
await getList();
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
// 上传excel
|
||||
function importExcel(options) {
|
||||
fromData.append("file", options.file)
|
||||
fromData.append('file', options.file);
|
||||
}
|
||||
onMounted(() => {
|
||||
getList();
|
||||
});
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.drawingreview {
|
||||
.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>
|
||||
|
Reference in New Issue
Block a user