计划出图
This commit is contained in:
@ -53,6 +53,14 @@ export const fillOutTheDesignVerificationForm = (data) => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
// 设计验证表
|
// 设计验证表
|
||||||
|
export const drawingreviewReceipts = (data) => {
|
||||||
|
return request({
|
||||||
|
url: '/design/drawingreviewReceipts',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 设计验证表
|
||||||
export const subProjectListAll = (id) => {
|
export const subProjectListAll = (id) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/design/drawingreview/subProjectList/' + id,
|
url: '/design/drawingreview/subProjectList/' + id,
|
||||||
@ -66,6 +74,21 @@ export const ObtainHistoricalDesignDrawingsForReview = (id) => {
|
|||||||
method: 'get'
|
method: 'get'
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
// 获取详情
|
||||||
|
export const drawingreviewReceiptsList = (params) => {
|
||||||
|
return request({
|
||||||
|
url: '/design/drawingreviewReceipts/list',
|
||||||
|
method: 'get',
|
||||||
|
params: params
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 根据历史设计图纸评审查询详情
|
||||||
|
export const drawingreviewReceiptsDetail = (id) => {
|
||||||
|
return request({
|
||||||
|
url: '/design/drawingreviewReceipts/' + id,
|
||||||
|
method: 'get'
|
||||||
|
});
|
||||||
|
};
|
||||||
// 根据历史设计图纸评审查询详情
|
// 根据历史设计图纸评审查询详情
|
||||||
export const drawingreview = (id) => {
|
export const drawingreview = (id) => {
|
||||||
return request({
|
return request({
|
||||||
|
@ -1,82 +1,4 @@
|
|||||||
<template>
|
<template>
|
||||||
<<<<<<< HEAD
|
|
||||||
<div class="billof-quantities">
|
|
||||||
<!-- tabPosition="left" -->
|
|
||||||
<el-tabs type="border-card" @tab-change="handleTabChange">
|
|
||||||
<el-tab-pane v-for="item, index in work_order_type" :key="item.value" :label="item.label">
|
|
||||||
<el-card v-if="index < 3" shadow="always">
|
|
||||||
<el-form :model="state.queryForm" :inline="true">
|
|
||||||
<el-form-item label="版本号" prop="versions">
|
|
||||||
<el-select v-model="state.queryForm.versions" placeholder="选择版本号">
|
|
||||||
<el-option v-for="item in state.options" :key="item.versions" :label="item.versions" :value="item.versions" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="表名" prop="sheet">
|
|
||||||
<el-select v-model="state.queryForm.sheet" placeholder="选择表名" @change="handleChange">
|
|
||||||
<el-option v-for="item in state.sheets" :key="item" :label="item" :value="item" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item>
|
|
||||||
<el-button type="primary" @click="openTable(true, index)">一键展开</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item>
|
|
||||||
<el-button type="primary" @click="openTable(false, index)">一键收起</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item>
|
|
||||||
<el-upload ref="uploadRef" class="upload-demo" :http-request="importExcel"
|
|
||||||
:show-file-list="false">
|
|
||||||
<template #trigger>
|
|
||||||
<el-button type="primary">导入excel</el-button>
|
|
||||||
</template>
|
|
||||||
</el-upload>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
</el-card>
|
|
||||||
<el-card v-if="index == 3" shadow="always">
|
|
||||||
<el-form :model="state.queryForm" :inline="true">
|
|
||||||
<el-form-item label="版本号" prop="versions">
|
|
||||||
<el-select v-model="state.queryForm.versions" placeholder="选择版本号"
|
|
||||||
@change="handleChangeVersion">
|
|
||||||
<el-option v-for="item in state.options" :key="item.versions" :label="item.versions"
|
|
||||||
:value="item.versions" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item>
|
|
||||||
<el-upload ref="uploadRef" class="upload-demo" :http-request="importExcel" style="margin-right: 12px;"
|
|
||||||
v-if="Object.keys(state.versionsData).length === 0 ||state.versionsData.status=='cancel'"
|
|
||||||
:show-file-list="false">
|
|
||||||
<template #trigger>
|
|
||||||
<el-button type="primary">导入excel</el-button>
|
|
||||||
</template>
|
|
||||||
</el-upload>
|
|
||||||
<el-button v-if="state.versionsData.status=='draft'" type="primary"con="edit" @click="clickApprovalSheet()">审核</el-button>
|
|
||||||
<el-button v-if="state.versionsData.status=='waiting'||state.versionsData.status=='finish'" icon="view" @click="lookApprovalFlow()" type="warning">查看流程</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
</el-card>
|
|
||||||
<el-table v-if="index < 3" :ref="(el) => tableRef[index] = el" :data="state.tableData" v-loading="state.loading.list"
|
|
||||||
stripe :row-class-name="state.tableData.length === 0 ? 'table-null' : ''"
|
|
||||||
style="width: 100%; margin-bottom: 20px;height: calc(100vh - 305px);" row-key="id" border
|
|
||||||
:default-expand-all="state.isOpen">
|
|
||||||
<el-table-column prop="num" label="编号" />
|
|
||||||
<el-table-column prop="name" label="工程或费用名称" />
|
|
||||||
<el-table-column prop="unit" label="单位" />
|
|
||||||
<el-table-column prop="quantity" label="数量" />
|
|
||||||
<el-table-column prop="remark" label="备注" />
|
|
||||||
</el-table>
|
|
||||||
<el-table v-if="index == 3" :data="state.tableData"
|
|
||||||
style="width: 100%; margin-bottom: 20px;height: calc(100vh - 305px);" row-key="id" border>
|
|
||||||
<el-table-column prop="num" label="编号" />
|
|
||||||
<el-table-column prop="name" label="名称" />
|
|
||||||
<el-table-column prop="specification" label="规格" />
|
|
||||||
<el-table-column prop="unit" label="单位" />
|
|
||||||
<el-table-column prop="quantity" label="数量" />
|
|
||||||
<el-table-column prop="remark" label="备注" />
|
|
||||||
</el-table>
|
|
||||||
</el-tab-pane>
|
|
||||||
</el-tabs>
|
|
||||||
</div>
|
|
||||||
=======
|
|
||||||
<div class="billof-quantities">
|
<div class="billof-quantities">
|
||||||
<!-- tabPosition="left" -->
|
<!-- tabPosition="left" -->
|
||||||
<el-tabs type="border-card" @tab-change="handleTabChange">
|
<el-tabs type="border-card" @tab-change="handleTabChange">
|
||||||
@ -165,7 +87,6 @@
|
|||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
>>>>>>> 3158dc84f7a6ef4568e1eeaf33df5b4b2fd1768f
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup name="billofQuantities">
|
<script setup name="billofQuantities">
|
||||||
@ -188,35 +109,6 @@ console.log(currentProject.value);
|
|||||||
// tableData
|
// tableData
|
||||||
// 版本号
|
// 版本号
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
<<<<<<< HEAD
|
|
||||||
work_order_type: 0,
|
|
||||||
// 版本号
|
|
||||||
version_num: '',
|
|
||||||
options: [],// 版本号选项
|
|
||||||
sheets: [], // sheet选项
|
|
||||||
queryForm: {
|
|
||||||
projectId: currentProject.value?.id,
|
|
||||||
versions: '',
|
|
||||||
sheet: '',
|
|
||||||
pageSize: 20,
|
|
||||||
pageNum: 1
|
|
||||||
},
|
|
||||||
loading: {
|
|
||||||
versions: false,
|
|
||||||
sheets: false,
|
|
||||||
list: false
|
|
||||||
},
|
|
||||||
error: null,
|
|
||||||
// 前三个
|
|
||||||
tableData: [],
|
|
||||||
// 物质设备清单
|
|
||||||
// tableData_sdsqd: [],
|
|
||||||
// 展开收起
|
|
||||||
isOpen: true,
|
|
||||||
// 版本号
|
|
||||||
versionsData:{}
|
|
||||||
})
|
|
||||||
=======
|
|
||||||
work_order_type: 0,
|
work_order_type: 0,
|
||||||
// 版本号
|
// 版本号
|
||||||
version_num: '',
|
version_num: '',
|
||||||
@ -244,7 +136,6 @@ const state = reactive({
|
|||||||
// 版本号
|
// 版本号
|
||||||
versionsData: {}
|
versionsData: {}
|
||||||
});
|
});
|
||||||
>>>>>>> 3158dc84f7a6ef4568e1eeaf33df5b4b2fd1768f
|
|
||||||
// tab切换
|
// tab切换
|
||||||
const handleTabChange = (tab) => {
|
const handleTabChange = (tab) => {
|
||||||
state.tableData = [];
|
state.tableData = [];
|
||||||
@ -276,25 +167,6 @@ async function getVersionNums(isSheet = true) {
|
|||||||
pageNum: 1
|
pageNum: 1
|
||||||
});
|
});
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
const { code, rows } = res || {};
|
|
||||||
if (code === 200) {
|
|
||||||
state.options = rows || [];
|
|
||||||
if (state.options.length > 0) {
|
|
||||||
state.queryForm.versions = state.options[0].versions;
|
|
||||||
if (state.work_order_type == 3) {
|
|
||||||
state.versionsData = state.options[0] || [];
|
|
||||||
console.log('state.versionsData',state.versionsData);
|
|
||||||
}
|
|
||||||
// 等待表名加载完成
|
|
||||||
console.log(isSheet, state.sheets.length);
|
|
||||||
if (isSheet) {
|
|
||||||
await handleSheetName();
|
|
||||||
} else {
|
|
||||||
await handleQueryList(isSheet);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
=======
|
|
||||||
const { code, rows } = res || {};
|
const { code, rows } = res || {};
|
||||||
if (code === 200) {
|
if (code === 200) {
|
||||||
state.options = rows || [];
|
state.options = rows || [];
|
||||||
@ -304,7 +176,6 @@ async function getVersionNums(isSheet = true) {
|
|||||||
console.log(isSheet, state.sheets.length);
|
console.log(isSheet, state.sheets.length);
|
||||||
if (isSheet) {
|
if (isSheet) {
|
||||||
await handleSheetName();
|
await handleSheetName();
|
||||||
>>>>>>> 3158dc84f7a6ef4568e1eeaf33df5b4b2fd1768f
|
|
||||||
} else {
|
} else {
|
||||||
await handleQueryList(isSheet);
|
await handleQueryList(isSheet);
|
||||||
}
|
}
|
||||||
@ -355,30 +226,6 @@ async function handleSheetName() {
|
|||||||
|
|
||||||
// 获取列表
|
// 获取列表
|
||||||
async function handleQueryList(isSheet = true) {
|
async function handleQueryList(isSheet = true) {
|
||||||
<<<<<<< HEAD
|
|
||||||
if (isSheet && !state.queryForm.sheet) {
|
|
||||||
console.warn('表名不存在,无法获取列表数据');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
state.loading.list = true;
|
|
||||||
state.error = null;
|
|
||||||
|
|
||||||
const result = await obtainTheList(state.queryForm);
|
|
||||||
|
|
||||||
if (result?.code === 200) {
|
|
||||||
state.tableData = result.data || [];
|
|
||||||
} else {
|
|
||||||
state.error = `获取列表数据失败: 错误码 ${result?.code}`;
|
|
||||||
console.error(state.error);
|
|
||||||
}
|
|
||||||
} catch (err) {
|
|
||||||
state.error = `获取列表数据时发生错误: ${err.message}`;
|
|
||||||
console.error(state.error, err);
|
|
||||||
} finally {
|
|
||||||
state.loading.list = false;
|
|
||||||
=======
|
|
||||||
if (isSheet && !state.queryForm.sheet) {
|
if (isSheet && !state.queryForm.sheet) {
|
||||||
console.warn('表名不存在,无法获取列表数据');
|
console.warn('表名不存在,无法获取列表数据');
|
||||||
return;
|
return;
|
||||||
@ -398,7 +245,6 @@ async function handleQueryList(isSheet = true) {
|
|||||||
} else {
|
} else {
|
||||||
state.error = `获取列表数据失败: 错误码 ${result?.code}`;
|
state.error = `获取列表数据失败: 错误码 ${result?.code}`;
|
||||||
console.error(state.error);
|
console.error(state.error);
|
||||||
>>>>>>> 3158dc84f7a6ef4568e1eeaf33df5b4b2fd1768f
|
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
state.error = `获取列表数据时发生错误: ${err.message}`;
|
state.error = `获取列表数据时发生错误: ${err.message}`;
|
||||||
@ -409,24 +255,6 @@ async function handleQueryList(isSheet = true) {
|
|||||||
}
|
}
|
||||||
// 上传excel
|
// 上传excel
|
||||||
function importExcel(options) {
|
function importExcel(options) {
|
||||||
<<<<<<< HEAD
|
|
||||||
console.log(options);
|
|
||||||
let formData = new FormData();
|
|
||||||
formData.append("file", options.file);
|
|
||||||
state.loading.list = true;
|
|
||||||
importExcelFile({ workOrderType: state.work_order_type, projectId: currentProject.value?.id }, formData).then(res => {
|
|
||||||
const { code } = res;
|
|
||||||
if (code == 200) {
|
|
||||||
proxy.$modal.msgSuccess(res.msg || '导入成功');
|
|
||||||
// 更新列表
|
|
||||||
getVersionNums(false)
|
|
||||||
} else {
|
|
||||||
getVersionNums()
|
|
||||||
proxy.$modal.msgError(res.msg || '导入失败');
|
|
||||||
}
|
|
||||||
}).finally(() => {
|
|
||||||
state.loading.list = false;
|
|
||||||
=======
|
|
||||||
console.log(options);
|
console.log(options);
|
||||||
const loading = ElLoading.service({
|
const loading = ElLoading.service({
|
||||||
lock: true,
|
lock: true,
|
||||||
@ -445,7 +273,6 @@ function importExcel(options) {
|
|||||||
} else {
|
} else {
|
||||||
proxy.$modal.msgError(res.msg || '导入失败');
|
proxy.$modal.msgError(res.msg || '导入失败');
|
||||||
}
|
}
|
||||||
>>>>>>> 3158dc84f7a6ef4568e1eeaf33df5b4b2fd1768f
|
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loading.close();
|
loading.close();
|
||||||
|
@ -1,221 +0,0 @@
|
|||||||
<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" label-width="110px">
|
|
||||||
<el-form-item label="申请单编号" prop="formNo">
|
|
||||||
<el-input v-model="queryParams.formNo" placeholder="请输入申请单编号" clearable @keyup.enter="handleQuery" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="工程名称" prop="projectName">
|
|
||||||
<el-input v-model="queryParams.projectName" placeholder="请输入工程名称" clearable @keyup.enter="handleQuery" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="提出单位" prop="submitUnit">
|
|
||||||
<el-input v-model="queryParams.submitUnit" placeholder="请输入提出单位" clearable @keyup.enter="handleQuery" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="专业" prop="specialty">
|
|
||||||
<el-input v-model="queryParams.specialty" placeholder="请输入专业" clearable @keyup.enter="handleQuery" />
|
|
||||||
</el-form-item>
|
|
||||||
|
|
||||||
<el-form-item label="卷册名称" prop="volumeName">
|
|
||||||
<el-input v-model="queryParams.volumeName" placeholder="请输入卷册名称" clearable @keyup.enter="handleQuery" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="卷册号" prop="volumeNo">
|
|
||||||
<el-input v-model="queryParams.volumeNo" placeholder="请输入卷册号" clearable @keyup.enter="handleQuery" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="提出日期" prop="submitDate">
|
|
||||||
<el-date-picker clearable v-model="queryParams.submitDate" type="date" value-format="YYYY-MM-DD" placeholder="请选择提出日期" />
|
|
||||||
</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">
|
|
||||||
<template #header>
|
|
||||||
<el-row :gutter="10" class="mb8">
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button type="primary" plain icon="ChatRound" @click="handleAdd" v-hasPermi="['design:designChange:add']">下发变更通知</el-button>
|
|
||||||
</el-col>
|
|
||||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
|
||||||
</el-row>
|
|
||||||
</template>
|
|
||||||
<el-table v-loading="loading" :data="designChangeList">
|
|
||||||
<el-table-column label="申请单编号" align="center" prop="formNo" />
|
|
||||||
<el-table-column label="工程名称" align="center" prop="projectName" />
|
|
||||||
<el-table-column label="提出单位" align="center" prop="submitUnit" />
|
|
||||||
<el-table-column label="专业" align="center" prop="specialty" />
|
|
||||||
<el-table-column label="提出日期" align="center" prop="submitDate" width="180">
|
|
||||||
<template #default="scope">
|
|
||||||
<span>{{ parseTime(scope.row.submitDate, '{y}-{m}-{d}') }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="卷册名称" align="center" prop="volumeName" />
|
|
||||||
<el-table-column label="卷册号" align="center" prop="volumeNo" />
|
|
||||||
<el-table-column label="变更原因" align="center" prop="changeReason">
|
|
||||||
<template #default="scope">
|
|
||||||
<dict-tag :options="design_change_reason_type" :value="scope.row.changeReason ? scope.row.changeReason.split(',') : []" />
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="变更内容" align="center" prop="changeContent" />
|
|
||||||
<!-- <el-table-column label="变更费用估算" align="center" prop="costEstimation" /> -->
|
|
||||||
<!-- <el-table-column label="变更文件" align="center">
|
|
||||||
<template #default="scope">
|
|
||||||
<span v-if="scope.row.file" style="color: rgb(41 145 255); cursor: pointer" @click="onOpen(scope.row.file.url)">
|
|
||||||
{{ scope.row.file.originalName }}</span
|
|
||||||
>
|
|
||||||
</template>
|
|
||||||
</el-table-column> -->
|
|
||||||
<el-table-column label="流程状态" align="center" prop="status">
|
|
||||||
<template #default="scope">
|
|
||||||
<dict-tag :options="wf_business_status" :value="scope.row.status" />
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="备注" align="center" prop="remark" />
|
|
||||||
<el-table-column label="操作" fixed="right" width="300">
|
|
||||||
<template #default="scope">
|
|
||||||
<!-- <el-button type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['design:designChange:edit']">审核</el-button> -->
|
|
||||||
<!-- <el-button type="success" icon="View" @click="handleViewInfo(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="danger" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['design:designChange:remove']">删除</el-button>
|
|
||||||
</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" />
|
|
||||||
</el-card>
|
|
||||||
<wordDetial ref="wordDetialRef"></wordDetial>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup name="DesignChange" lang="ts">
|
|
||||||
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';
|
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
||||||
const { design_change_reason_type } = toRefs<any>(proxy?.useDict('design_change_reason_type'));
|
|
||||||
// 获取用户 store
|
|
||||||
const userStore = useUserStoreHook();
|
|
||||||
// 从 store 中获取项目列表和当前选中的项目
|
|
||||||
const currentProject = computed(() => userStore.selectedProject);
|
|
||||||
const designChangeList = ref<DesignChangeVO[]>([]);
|
|
||||||
const wordDetialRef = ref<InstanceType<typeof wordDetial>>();
|
|
||||||
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>();
|
|
||||||
const data = reactive({
|
|
||||||
queryParams: {
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
projectId: currentProject.value?.id,
|
|
||||||
formNo: undefined,
|
|
||||||
projectName: undefined,
|
|
||||||
submitUnit: undefined,
|
|
||||||
specialty: undefined,
|
|
||||||
submitDate: undefined,
|
|
||||||
volumeName: undefined,
|
|
||||||
volumeNo: undefined,
|
|
||||||
changeReason: undefined,
|
|
||||||
status: undefined,
|
|
||||||
params: {}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
const { queryParams } = toRefs(data);
|
|
||||||
|
|
||||||
/** 查询设计变更管理列表 */
|
|
||||||
const getList = async () => {
|
|
||||||
loading.value = true;
|
|
||||||
const res = await listDesignChange(queryParams.value);
|
|
||||||
designChangeList.value = res.rows;
|
|
||||||
total.value = res.total;
|
|
||||||
loading.value = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
/** 搜索按钮操作 */
|
|
||||||
const handleQuery = () => {
|
|
||||||
queryParams.value.pageNum = 1;
|
|
||||||
getList();
|
|
||||||
};
|
|
||||||
|
|
||||||
/** 重置按钮操作 */
|
|
||||||
const resetQuery = () => {
|
|
||||||
queryFormRef.value?.resetFields();
|
|
||||||
handleQuery();
|
|
||||||
};
|
|
||||||
/** 新增按钮操作 */
|
|
||||||
const handleAdd = () => {
|
|
||||||
proxy.$tab.closePage(proxy.$route);
|
|
||||||
proxy.$router.push({
|
|
||||||
path: `/design-management/designChange/indexEdit`,
|
|
||||||
query: {
|
|
||||||
type: 'add'
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
/** 修改按钮操作 */
|
|
||||||
const handleUpdate = async (row?: DesignChangeVO) => {
|
|
||||||
proxy.$tab.closePage(proxy.$route);
|
|
||||||
proxy.$router.push({
|
|
||||||
path: `/design-management/designChange/indexEdit`,
|
|
||||||
query: {
|
|
||||||
id: row.id,
|
|
||||||
type: 'update'
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
/** 查看按钮操作 */
|
|
||||||
const handleViewInfo = (row) => {
|
|
||||||
proxy.$tab.closePage(proxy.$route);
|
|
||||||
proxy.$router.push({
|
|
||||||
path: `/design-management/designChange/indexEdit`,
|
|
||||||
query: {
|
|
||||||
id: row.id,
|
|
||||||
type: 'view'
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
/** 删除按钮操作 */
|
|
||||||
const handleDelete = async (row?: DesignChangeVO) => {
|
|
||||||
const _ids = row?.id || ids.value;
|
|
||||||
await proxy?.$modal.confirm('是否确认删除设计变更管理编号为"' + _ids + '"的数据项?').finally(() => (loading.value = false));
|
|
||||||
await delDesignChange(_ids);
|
|
||||||
proxy?.$modal.msgSuccess('删除成功');
|
|
||||||
await getList();
|
|
||||||
};
|
|
||||||
const handleView = (row) => {
|
|
||||||
// 查看详情
|
|
||||||
wordDetialRef.value?.openDialog(row, design_change_reason_type.value);
|
|
||||||
};
|
|
||||||
// 预览
|
|
||||||
const onOpen = (path: string) => {
|
|
||||||
window.open(path, '_blank');
|
|
||||||
};
|
|
||||||
onMounted(() => {
|
|
||||||
getList();
|
|
||||||
});
|
|
||||||
//监听项目id刷新数据
|
|
||||||
const listeningProject = watch(
|
|
||||||
() => currentProject.value.id,
|
|
||||||
(nid, oid) => {
|
|
||||||
queryParams.value.projectId = nid;
|
|
||||||
getList();
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
onUnmounted(() => {
|
|
||||||
listeningProject();
|
|
||||||
});
|
|
||||||
</script>
|
|
@ -59,16 +59,15 @@
|
|||||||
<dict-tag v-if="scope.row.fileId != null" :options="wf_business_status" :value="scope.row.status" />
|
<dict-tag v-if="scope.row.fileId != null" :options="wf_business_status" :value="scope.row.status" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="变更文件" align="center" width="300">
|
<el-table-column label="变更文件" align="center" prop="remark" width="150">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span
|
<el-button
|
||||||
|
link
|
||||||
|
type="primary"
|
||||||
v-if="scope.row.ossVoList && scope.row.ossVoList.length > 0"
|
v-if="scope.row.ossVoList && scope.row.ossVoList.length > 0"
|
||||||
style="color: rgb(41 145 255); cursor: pointer"
|
icon="View"
|
||||||
:key="item"
|
@click="handleDesignView(scope.row)"
|
||||||
v-for="item of scope.row.ossVoList"
|
>查看文件</el-button
|
||||||
@click="onOpen(item.url)"
|
|
||||||
>
|
|
||||||
{{ item.originalName + ',' }}</span
|
|
||||||
>
|
>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -81,9 +80,9 @@
|
|||||||
<el-table-column label="备注" align="center" prop="remark" width="150" />
|
<el-table-column label="备注" align="center" prop="remark" width="150" />
|
||||||
<el-table-column label="操作" fixed="right" width="340">
|
<el-table-column label="操作" fixed="right" width="340">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button type="primary" icon="Upload" @click="handleAddChange(scope.row)" v-if="!scope.row.fileId">上传</el-button>
|
<el-button type="primary" link icon="Upload" @click="handleAddChange(scope.row)" v-if="!scope.row.fileId">上传</el-button>
|
||||||
<el-button type="success" icon="View" @click="handleViewInfo(scope.row)">查看</el-button>
|
<el-button type="success" link icon="View" @click="handleViewInfo(scope.row)">查看</el-button>
|
||||||
<el-button type="success" icon="View" @click="handleViewDetail(scope.row)">通知单</el-button>
|
<el-button type="success" link icon="View" @click="handleViewDetail(scope.row)">通知单</el-button>
|
||||||
<!-- <el-tooltip content="查看文档" placement="top">
|
<!-- <el-tooltip content="查看文档" placement="top">
|
||||||
<el-button link type="primary" icon="Document" @click="handleView(scope.row)"></el-button>
|
<el-button link type="primary" icon="Document" @click="handleView(scope.row)"></el-button>
|
||||||
</el-tooltip> -->
|
</el-tooltip> -->
|
||||||
@ -93,6 +92,34 @@
|
|||||||
<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>
|
||||||
<wordDetial ref="wordDetialRef"></wordDetial>
|
<wordDetial ref="wordDetialRef"></wordDetial>
|
||||||
|
<el-dialog title="文件列表" v-model="viewVisible" width="500px">
|
||||||
|
<el-table v-if="fileList.length > 0" :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.originalName }}
|
||||||
|
</el-link>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" width="170" align="center">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-button type="success" link icon="View" @click="handleDownload(scope.row)"> 查看 </el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<div v-else class="empty-list text-center">暂无文件</div>
|
||||||
|
<template #footer>
|
||||||
|
<span>
|
||||||
|
<el-button type="primary" @click="viewVisible = false">关闭</el-button>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -121,6 +148,8 @@ const queryFormRef = ref<ElFormInstance>();
|
|||||||
const uploadUrl = computed(() => {
|
const uploadUrl = computed(() => {
|
||||||
return `/design/collectFile/upload`;
|
return `/design/collectFile/upload`;
|
||||||
});
|
});
|
||||||
|
const viewVisible = ref(false);
|
||||||
|
const fileList = ref([]);
|
||||||
const ossid = ref(null);
|
const ossid = ref(null);
|
||||||
const data = reactive({
|
const data = reactive({
|
||||||
queryParams: {
|
queryParams: {
|
||||||
@ -207,12 +236,9 @@ const handleViewInfo = (row) => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
const handleDelete = async (row?: DesignChangeVO) => {
|
const handleDesignView = async (row?: DesignChangeVO) => {
|
||||||
const _ids = row?.id || ids.value;
|
fileList.value = row.ossVoList;
|
||||||
await proxy?.$modal.confirm('是否确认删除设计变更管理编号为"' + _ids + '"的数据项?').finally(() => (loading.value = false));
|
viewVisible.value = true;
|
||||||
await delDesignChange(_ids);
|
|
||||||
proxy?.$modal.msgSuccess('删除成功');
|
|
||||||
await getList();
|
|
||||||
};
|
};
|
||||||
const handleView = (row) => {
|
const handleView = (row) => {
|
||||||
// 查看详情
|
// 查看详情
|
||||||
@ -222,6 +248,9 @@ const handleView = (row) => {
|
|||||||
const onOpen = (path: string) => {
|
const onOpen = (path: string) => {
|
||||||
window.open(path, '_blank');
|
window.open(path, '_blank');
|
||||||
};
|
};
|
||||||
|
const handleDownload = (row: any) => {
|
||||||
|
window.open(row.url, '_blank');
|
||||||
|
};
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getList();
|
getList();
|
||||||
|
@ -1,500 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="p-4 bg-gray-50">
|
|
||||||
<div class="max-w-4xl mx-auto">
|
|
||||||
<!-- 顶部按钮区域 -->
|
|
||||||
<el-card class="mb-4 rounded-lg shadow-sm bg-white border border-gray-100 transition-all hover:shadow-md">
|
|
||||||
<approvalButton
|
|
||||||
@submitForm="submitForm"
|
|
||||||
@approvalVerifyOpen="approvalVerifyOpen"
|
|
||||||
@handleApprovalRecord="handleApprovalRecord"
|
|
||||||
:buttonLoading="buttonLoading"
|
|
||||||
:id="form.id"
|
|
||||||
:status="form.status"
|
|
||||||
:pageType="routeParams.type"
|
|
||||||
/>
|
|
||||||
</el-card>
|
|
||||||
<!-- 表单区域 -->
|
|
||||||
<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>
|
|
||||||
</div>
|
|
||||||
<div class="p-6">
|
|
||||||
<el-form
|
|
||||||
ref="leaveFormRef"
|
|
||||||
v-loading="loading"
|
|
||||||
:disabled="routeParams.type === 'view'"
|
|
||||||
:model="form"
|
|
||||||
:rules="rules"
|
|
||||||
label-width="100px"
|
|
||||||
class="space-y-4"
|
|
||||||
>
|
|
||||||
<div class="grid grid-cols-1 gap-4">
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="申请单编号" prop="formNo">
|
|
||||||
<el-input v-model="form.formNo" placeholder="请输入申请单编号" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="工程名称" prop="projectName">
|
|
||||||
<el-input v-model="form.projectName" placeholder="请输入工程名称" /> </el-form-item
|
|
||||||
></el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="提出单位" prop="submitUnit">
|
|
||||||
<el-input v-model="form.submitUnit" placeholder="请输入提出单位" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="专业" prop="specialty">
|
|
||||||
<el-input v-model="form.specialty" placeholder="请输入专业" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="提出日期" prop="submitDate">
|
|
||||||
<el-date-picker clearable v-model="form.submitDate" type="date" value-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择提出日期">
|
|
||||||
</el-date-picker> </el-form-item
|
|
||||||
></el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="卷册名称" prop="volumeName"> <el-input v-model="form.volumeName" placeholder="请输入卷册名称" /> </el-form-item
|
|
||||||
></el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="原卷册号" prop="volumeNo"> <el-input v-model="form.volumeNo" placeholder="请输入卷册号" /> </el-form-item
|
|
||||||
></el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="子项名称" prop="subName">
|
|
||||||
<el-input v-model="form.extendDetail.subName" placeholder="请输入子项名称" /> </el-form-item
|
|
||||||
></el-col>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item label="原设计处置" prop="designDisposal">
|
|
||||||
<el-radio-group v-model="form.extendDetail.designDisposal">
|
|
||||||
<el-radio value="1" size="large">原图作废</el-radio>
|
|
||||||
<el-radio value="2" size="large">原图保留,部分修改</el-radio>
|
|
||||||
<el-radio value="3" size="large">原图保留,补充设计</el-radio>
|
|
||||||
</el-radio-group>
|
|
||||||
</el-form-item></el-col
|
|
||||||
>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="设计阶段" prop="designPhase">
|
|
||||||
<el-input v-model="form.extendDetail.designPhase" placeholder="请输入设计阶段" /> </el-form-item
|
|
||||||
></el-col>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item label="变更类别" prop="changeCategory">
|
|
||||||
<el-radio-group v-model="form.extendDetail.changeCategory">
|
|
||||||
<el-radio value="1" size="large">重大设计变更</el-radio>
|
|
||||||
<el-radio value="2" size="large">一般设计变更</el-radio>
|
|
||||||
</el-radio-group>
|
|
||||||
</el-form-item></el-col
|
|
||||||
>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item label="实施程序" prop="ImpProcedure">
|
|
||||||
<el-radio-group v-model="form.extendDetail.ImpProcedure">
|
|
||||||
<el-radio value="1" size="large">建设单位重新申报初步设计审批</el-radio>
|
|
||||||
<el-radio value="2" size="large">建设单位送原施工图审查机构审查、建设主管部分备案后交付实施</el-radio>
|
|
||||||
<el-radio value="3" size="large">建设单位确认后交付实施</el-radio>
|
|
||||||
</el-radio-group>
|
|
||||||
</el-form-item></el-col
|
|
||||||
>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="更改相关专业" prop="involvingProfessions">
|
|
||||||
<el-input v-model="form.extendDetail.involvingProfessions" placeholder="请输入更改相关专业" /> </el-form-item
|
|
||||||
></el-col>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item label="附图" prop="attachmentPic"> <image-upload v-model="form.attachmentPic" :fileSize="100" /> </el-form-item
|
|
||||||
></el-col>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item label="变更原因" prop="changeReason">
|
|
||||||
<el-checkbox-group v-model="form.changeReason">
|
|
||||||
<el-checkbox v-for="dict in design_change_reason_type" :key="dict.value" :value="dict.value">
|
|
||||||
{{ dict.label }}
|
|
||||||
</el-checkbox>
|
|
||||||
</el-checkbox-group>
|
|
||||||
</el-form-item></el-col
|
|
||||||
>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item label="变更内容" prop="changeContent">
|
|
||||||
<el-input v-model="form.changeContent" type="textarea" placeholder="请输入内容" /> </el-form-item
|
|
||||||
></el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="费用" prop="costEstimation">
|
|
||||||
<el-input v-model="form.costEstimation" type="number" placeholder="请输入费用" /> </el-form-item
|
|
||||||
></el-col>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item label="变更费用估算表" label-width="110px" prop="costEstimationFile">
|
|
||||||
<file-upload v-model="form.costEstimationFile" :fileSize="100" /> </el-form-item
|
|
||||||
></el-col>
|
|
||||||
<!-- <el-col :span="24">
|
|
||||||
<el-form-item label="变更文件" prop="fileId"> <file-upload v-model="form.fileId" :fileSize="100" /> </el-form-item
|
|
||||||
></el-col> -->
|
|
||||||
<el-col :span="24"
|
|
||||||
><el-form-item label="备注" prop="remark">
|
|
||||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" /> </el-form-item
|
|
||||||
></el-col>
|
|
||||||
</el-row>
|
|
||||||
</div>
|
|
||||||
</el-form>
|
|
||||||
</div>
|
|
||||||
</el-card>
|
|
||||||
<!-- 提交组件 -->
|
|
||||||
<submitVerify ref="submitVerifyRef" :task-variables="taskVariables" @submit-callback="submitCallback" />
|
|
||||||
<approvalRecord ref="approvalRecordRef"></approvalRecord>
|
|
||||||
<!-- 流程选择对话框 -->
|
|
||||||
<el-dialog
|
|
||||||
draggable
|
|
||||||
v-model="dialogVisible.visible"
|
|
||||||
:title="dialogVisible.title"
|
|
||||||
:before-close="handleClose"
|
|
||||||
width="500"
|
|
||||||
class="rounded-lg shadow-lg"
|
|
||||||
>
|
|
||||||
<div class="p-4">
|
|
||||||
<p class="text-gray-600 mb-4">请选择要启动的流程:</p>
|
|
||||||
<el-select v-model="flowCode" placeholder="请选择流程" style="width: 100%">
|
|
||||||
<el-option v-for="item in flowCodeOptions" :key="item.value" :label="item.label" :value="item.value" />
|
|
||||||
</el-select>
|
|
||||||
</div>
|
|
||||||
<template #footer>
|
|
||||||
<div class="dialog-footer p-4 border-t border-gray-100 flex justify-end space-x-3">
|
|
||||||
<el-button @click="handleClose" class="px-4 py-2 border border-gray-300 rounded-md text-gray-700 hover:bg-gray-50 transition-colors"
|
|
||||||
>取消</el-button
|
|
||||||
>
|
|
||||||
<el-button type="primary" @click="submitFlow()" class="px-4 py-2 bg-primary text-white rounded-md hover:bg-primary/90 transition-colors"
|
|
||||||
>确认</el-button
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup name="Leave" lang="ts">
|
|
||||||
import { LeaveForm, LeaveQuery, LeaveVO } from '@/api/workflow/leave/types';
|
|
||||||
import { startWorkFlow } from '@/api/workflow/task';
|
|
||||||
import SubmitVerify from '@/components/Process/submitVerify.vue';
|
|
||||||
import ApprovalRecord from '@/components/Process/approvalRecord.vue';
|
|
||||||
import ApprovalButton from '@/components/Process/approvalButton.vue';
|
|
||||||
import { StartProcessBo } from '@/api/workflow/workflowCommon/types';
|
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
||||||
import { useUserStoreHook } from '@/store/modules/user';
|
|
||||||
import { getDesignChange, addDesignChange, updateDesignChange } from '@/api/design/designChange';
|
|
||||||
const { design_change_reason_type } = toRefs<any>(proxy?.useDict('design_change_reason_type'));
|
|
||||||
|
|
||||||
// 获取用户 store
|
|
||||||
const userStore = useUserStoreHook();
|
|
||||||
// 从 store 中获取项目列表和当前选中的项目
|
|
||||||
const currentProject = computed(() => userStore.selectedProject);
|
|
||||||
const buttonLoading = ref(false);
|
|
||||||
const loading = ref(true);
|
|
||||||
//路由参数
|
|
||||||
const routeParams = ref<Record<string, any>>({});
|
|
||||||
const flowCodeOptions = [
|
|
||||||
{
|
|
||||||
value: currentProject.value?.id + '_designchanged',
|
|
||||||
label: '设计变更审批'
|
|
||||||
}
|
|
||||||
];
|
|
||||||
const flowCode = ref<string>('');
|
|
||||||
const status = ref<string>('');
|
|
||||||
const dialogVisible = reactive<DialogOption>({
|
|
||||||
visible: false,
|
|
||||||
title: '流程定义'
|
|
||||||
});
|
|
||||||
//提交组件
|
|
||||||
const submitVerifyRef = ref<InstanceType<typeof SubmitVerify>>();
|
|
||||||
//审批记录组件
|
|
||||||
const approvalRecordRef = ref<InstanceType<typeof ApprovalRecord>>();
|
|
||||||
//按钮组件
|
|
||||||
const approvalButtonRef = ref<InstanceType<typeof ApprovalButton>>();
|
|
||||||
|
|
||||||
const leaveFormRef = ref<ElFormInstance>();
|
|
||||||
const dialog = reactive({
|
|
||||||
visible: false,
|
|
||||||
title: '',
|
|
||||||
isEdit: false
|
|
||||||
});
|
|
||||||
const submitFormData = ref<StartProcessBo>({
|
|
||||||
businessId: '',
|
|
||||||
flowCode: '',
|
|
||||||
variables: {}
|
|
||||||
});
|
|
||||||
const taskVariables = ref<Record<string, any>>({});
|
|
||||||
const initFormData = {
|
|
||||||
id: undefined,
|
|
||||||
projectId: currentProject.value?.id,
|
|
||||||
formNo: undefined,
|
|
||||||
projectName: undefined,
|
|
||||||
submitUnit: undefined,
|
|
||||||
specialty: undefined,
|
|
||||||
submitDate: undefined,
|
|
||||||
volumeName: undefined,
|
|
||||||
volumeNo: undefined,
|
|
||||||
attachmentPic: undefined,
|
|
||||||
changeReason: [],
|
|
||||||
changeContent: undefined,
|
|
||||||
costEstimation: undefined,
|
|
||||||
costEstimationFile: undefined,
|
|
||||||
fileId: undefined,
|
|
||||||
status: undefined,
|
|
||||||
remark: undefined,
|
|
||||||
extendDetail: {
|
|
||||||
changeCategory: undefined,
|
|
||||||
ImpProcedure: undefined,
|
|
||||||
involvingProfessions: undefined,
|
|
||||||
subName: undefined,
|
|
||||||
designDisposal: undefined,
|
|
||||||
designPhase: undefined
|
|
||||||
}
|
|
||||||
};
|
|
||||||
const data = reactive({
|
|
||||||
form: { ...initFormData },
|
|
||||||
queryParams: {
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
projectId: currentProject.value?.id,
|
|
||||||
fileName: undefined,
|
|
||||||
fileType: undefined,
|
|
||||||
fileSuffix: undefined,
|
|
||||||
fileStatus: undefined,
|
|
||||||
originalName: undefined,
|
|
||||||
newest: undefined,
|
|
||||||
params: {}
|
|
||||||
},
|
|
||||||
rules: {}
|
|
||||||
});
|
|
||||||
|
|
||||||
const handleClose = () => {
|
|
||||||
dialogVisible.visible = false;
|
|
||||||
flowCode.value = '';
|
|
||||||
buttonLoading.value = false;
|
|
||||||
};
|
|
||||||
const { form, rules } = toRefs(data);
|
|
||||||
|
|
||||||
/** 表单重置 */
|
|
||||||
const reset = () => {
|
|
||||||
form.value = { ...initFormData };
|
|
||||||
leaveFormRef.value?.resetFields();
|
|
||||||
};
|
|
||||||
|
|
||||||
/** 获取详情 */
|
|
||||||
const getInfo = () => {
|
|
||||||
loading.value = true;
|
|
||||||
buttonLoading.value = false;
|
|
||||||
nextTick(async () => {
|
|
||||||
const res = await getDesignChange(routeParams.value.id);
|
|
||||||
Object.assign(form.value, res.data);
|
|
||||||
if (form.value.changeReason.length > 0) {
|
|
||||||
form.value.changeReason = form.value.changeReason.split(',');
|
|
||||||
}
|
|
||||||
loading.value = false;
|
|
||||||
buttonLoading.value = false;
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
/** 提交按钮 */
|
|
||||||
const submitForm = (status1: string) => {
|
|
||||||
status.value = status1;
|
|
||||||
var changeReason = '';
|
|
||||||
if (form.value.changeReason.length > 0) {
|
|
||||||
changeReason = form.value.changeReason.join(',');
|
|
||||||
}
|
|
||||||
leaveFormRef.value?.validate(async (valid: boolean) => {
|
|
||||||
if (valid) {
|
|
||||||
buttonLoading.value = true;
|
|
||||||
var res;
|
|
||||||
if (form.value.id) {
|
|
||||||
res = await updateDesignChange({ ...form.value, changeReason }).finally(() => (buttonLoading.value = false));
|
|
||||||
} else {
|
|
||||||
res = await addDesignChange({ ...form.value, changeReason }).finally(() => (buttonLoading.value = false));
|
|
||||||
}
|
|
||||||
if (res.code == 200) {
|
|
||||||
dialog.visible = false;
|
|
||||||
if (res.data.extendDetail == null) {
|
|
||||||
res.data.extendDetail = {
|
|
||||||
'changeCategory': '',
|
|
||||||
'ImpProcedure': '',
|
|
||||||
'involvingProfessions': '',
|
|
||||||
'subName': '',
|
|
||||||
'designDisposal': '',
|
|
||||||
'designPhase': ''
|
|
||||||
};
|
|
||||||
}
|
|
||||||
submit(status.value, res.data);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
const submitFlow = async () => {
|
|
||||||
handleStartWorkFlow(form.value);
|
|
||||||
dialogVisible.visible = false;
|
|
||||||
};
|
|
||||||
//提交申请
|
|
||||||
const handleStartWorkFlow = async (data: LeaveForm) => {
|
|
||||||
try {
|
|
||||||
submitFormData.value.flowCode = flowCode.value;
|
|
||||||
submitFormData.value.businessId = data.id;
|
|
||||||
//流程变量
|
|
||||||
taskVariables.value = {
|
|
||||||
// leave4/5 使用的流程变量
|
|
||||||
userList: ['1', '3', '4'],
|
|
||||||
costEstimation: form.value.costEstimation
|
|
||||||
};
|
|
||||||
submitFormData.value.variables = taskVariables.value;
|
|
||||||
const resp = await startWorkFlow(submitFormData.value);
|
|
||||||
if (submitVerifyRef.value) {
|
|
||||||
buttonLoading.value = false;
|
|
||||||
submitVerifyRef.value.openDialog(resp.data.taskId);
|
|
||||||
}
|
|
||||||
} finally {
|
|
||||||
buttonLoading.value = false;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
//审批记录
|
|
||||||
const handleApprovalRecord = () => {
|
|
||||||
approvalRecordRef.value.init(form.value.id);
|
|
||||||
};
|
|
||||||
//提交回调
|
|
||||||
const submitCallback = async () => {
|
|
||||||
await proxy.$tab.closePage(proxy.$route);
|
|
||||||
proxy.$router.go(-1);
|
|
||||||
};
|
|
||||||
//审批
|
|
||||||
const approvalVerifyOpen = async () => {
|
|
||||||
submitVerifyRef.value.openDialog(routeParams.value.taskId);
|
|
||||||
};
|
|
||||||
const submit = async (status, data) => {
|
|
||||||
form.value = data;
|
|
||||||
if (status === 'draft') {
|
|
||||||
buttonLoading.value = false;
|
|
||||||
proxy?.$modal.msgSuccess('暂存成功');
|
|
||||||
proxy.$tab.closePage(proxy.$route);
|
|
||||||
proxy.$router.go(-1);
|
|
||||||
} else {
|
|
||||||
if ((form.value.status === 'draft' && (flowCode.value === '' || flowCode.value === null)) || routeParams.value.type === 'add') {
|
|
||||||
flowCode.value = flowCodeOptions[0].value;
|
|
||||||
dialogVisible.visible = true;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
//说明启动过先随意穿个参数
|
|
||||||
if (flowCode.value === '' || flowCode.value === null) {
|
|
||||||
flowCode.value = 'xx';
|
|
||||||
}
|
|
||||||
await handleStartWorkFlow(data);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
nextTick(async () => {
|
|
||||||
routeParams.value = proxy.$route.query;
|
|
||||||
reset();
|
|
||||||
loading.value = false;
|
|
||||||
if (routeParams.value.type === 'update' || routeParams.value.type === 'view' || routeParams.value.type === 'approval') {
|
|
||||||
getInfo();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
<style scoped lang="scss">
|
|
||||||
/* 全局样式 */
|
|
||||||
:root {
|
|
||||||
--primary: #409eff;
|
|
||||||
--primary-light: #66b1ff;
|
|
||||||
--primary-dark: #3a8ee6;
|
|
||||||
--success: #67c23a;
|
|
||||||
--warning: #e6a23c;
|
|
||||||
--danger: #f56c6c;
|
|
||||||
--info: #909399;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 表单样式优化 */
|
|
||||||
.el-form-item {
|
|
||||||
.el-form-item__label {
|
|
||||||
color: #606266;
|
|
||||||
font-weight: 500;
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-input__inner,
|
|
||||||
.el-select .el-input__inner {
|
|
||||||
border-radius: 4px;
|
|
||||||
transition:
|
|
||||||
border-color 0.2s,
|
|
||||||
box-shadow 0.2s;
|
|
||||||
|
|
||||||
&:focus {
|
|
||||||
border-color: var(--primary-light);
|
|
||||||
box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-textarea__inner {
|
|
||||||
border-radius: 4px;
|
|
||||||
transition:
|
|
||||||
border-color 0.2s,
|
|
||||||
box-shadow 0.2s;
|
|
||||||
|
|
||||||
&:focus {
|
|
||||||
border-color: var(--primary-light);
|
|
||||||
box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 按钮样式优化 */
|
|
||||||
.el-button {
|
|
||||||
border-radius: 4px;
|
|
||||||
transition: all 0.2s;
|
|
||||||
|
|
||||||
&.is-primary {
|
|
||||||
background-color: var(--primary);
|
|
||||||
border-color: var(--primary);
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
background-color: var(--primary-light);
|
|
||||||
border-color: var(--primary-light);
|
|
||||||
}
|
|
||||||
|
|
||||||
&:active {
|
|
||||||
background-color: var(--primary-dark);
|
|
||||||
border-color: var(--primary-dark);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&.is-text {
|
|
||||||
color: var(--primary);
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
color: var(--primary-light);
|
|
||||||
background-color: rgba(64, 158, 255, 0.05);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 卡片样式优化 */
|
|
||||||
.el-card {
|
|
||||||
transition: all 0.3s ease;
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
/* transform: translateY(-2px); */
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 对话框样式优化 */
|
|
||||||
.el-dialog {
|
|
||||||
.el-dialog__header {
|
|
||||||
background-color: #f5f7fa;
|
|
||||||
border-bottom: 1px solid #ebeef5;
|
|
||||||
padding: 15px 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-dialog__title {
|
|
||||||
font-size: 16px;
|
|
||||||
font-weight: 600;
|
|
||||||
color: #303133;
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-dialog__footer {
|
|
||||||
padding: 15px 20px;
|
|
||||||
border-top: 1px solid #ebeef5;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -299,7 +299,9 @@ onMounted(() => {
|
|||||||
routeParams.value = proxy.$route.query;
|
routeParams.value = proxy.$route.query;
|
||||||
reset();
|
reset();
|
||||||
getList();
|
getList();
|
||||||
getInfo();
|
if (routeParams.value.type != 'add') {
|
||||||
|
getInfo();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,415 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="p-4 bg-gray-50 ">
|
|
||||||
<div class="max-w-4xl mx-auto">
|
|
||||||
<!-- 顶部按钮区域 -->
|
|
||||||
<el-card class="mb-4 rounded-lg shadow-sm bg-white border border-gray-100 transition-all hover:shadow-md">
|
|
||||||
<approvalButton
|
|
||||||
@submitForm="submitForm"
|
|
||||||
@approvalVerifyOpen="approvalVerifyOpen"
|
|
||||||
@handleApprovalRecord="handleApprovalRecord"
|
|
||||||
:buttonLoading="buttonLoading"
|
|
||||||
:id="form.id"
|
|
||||||
:status="form.status"
|
|
||||||
:pageType="routeParams.type"
|
|
||||||
/>
|
|
||||||
</el-card>
|
|
||||||
|
|
||||||
<!-- 表单区域 -->
|
|
||||||
<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>
|
|
||||||
</div>
|
|
||||||
<div class="p-6">
|
|
||||||
<el-form
|
|
||||||
ref="leaveFormRef"
|
|
||||||
v-loading="loading"
|
|
||||||
: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="fileType" class="mb-2">
|
|
||||||
<el-select v-model="form.fileType" placeholder="请选择图纸类型" class="w-full">
|
|
||||||
<el-option v-for="dict in drawing_file_type" :key="dict.value" :label="dict.label" :value="dict.value"></el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="版本号" prop="versionNumber" class="mb-2">
|
|
||||||
<el-input v-model="form.versionNumber" placeholder="请输入版本号" class="w-full"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="文件名称" prop="fileName" class="mb-2 ">
|
|
||||||
<el-input v-model="form.fileName" placeholder="请输入文件名称" class="w-full"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="图纸文件" prop="fileUrl" class="mb-2 md:col-span-2">
|
|
||||||
<file-upload :limit="1" :fileType="['pdf']" :fileSize="100" v-model="form.fileUrl" class="w-full"></file-upload>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="备注" prop="remark" class="mb-2 md:col-span-2">
|
|
||||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" :rows="4" class="w-full"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</div>
|
|
||||||
</el-form>
|
|
||||||
</div>
|
|
||||||
</el-card>
|
|
||||||
<!-- 提交组件 -->
|
|
||||||
<submitVerify ref="submitVerifyRef" :task-variables="taskVariables" @submit-callback="submitCallback" />
|
|
||||||
<approvalRecord ref="approvalRecordRef"></approvalRecord>
|
|
||||||
<!-- 流程选择对话框 -->
|
|
||||||
<el-dialog
|
|
||||||
draggable
|
|
||||||
v-model="dialogVisible.visible"
|
|
||||||
:title="dialogVisible.title"
|
|
||||||
:before-close="handleClose"
|
|
||||||
width="500"
|
|
||||||
class="rounded-lg shadow-lg"
|
|
||||||
>
|
|
||||||
<div class="p-4">
|
|
||||||
<p class="text-gray-600 mb-4">请选择要启动的流程:</p>
|
|
||||||
<el-select v-model="flowCode" placeholder="请选择流程" style="width: 100%">
|
|
||||||
<el-option v-for="item in flowCodeOptions" :key="item.value" :label="item.label" :value="item.value" />
|
|
||||||
</el-select>
|
|
||||||
</div>
|
|
||||||
<template #footer>
|
|
||||||
<div class="dialog-footer p-4 border-t border-gray-100 flex justify-end space-x-3">
|
|
||||||
<el-button @click="handleClose" class="px-4 py-2 border border-gray-300 rounded-md text-gray-700 hover:bg-gray-50 transition-colors"
|
|
||||||
>取消</el-button
|
|
||||||
>
|
|
||||||
<el-button type="primary" @click="submitFlow()" class="px-4 py-2 bg-primary text-white rounded-md hover:bg-primary/90 transition-colors"
|
|
||||||
>确认</el-button
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup name="Leave" lang="ts">
|
|
||||||
import { LeaveForm, LeaveQuery, LeaveVO } from '@/api/workflow/leave/types';
|
|
||||||
import { startWorkFlow } from '@/api/workflow/task';
|
|
||||||
import SubmitVerify from '@/components/Process/submitVerify.vue';
|
|
||||||
import ApprovalRecord from '@/components/Process/approvalRecord.vue';
|
|
||||||
import ApprovalButton from '@/components/Process/approvalButton.vue';
|
|
||||||
import { StartProcessBo } from '@/api/workflow/workflowCommon/types';
|
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
||||||
import { DrawingForm } from '@/api/design/drawing/types';
|
|
||||||
import { useUserStoreHook } from '@/store/modules/user';
|
|
||||||
import { updateDrawing, getDrawing, addDrawing } from '@/api/design/drawing';
|
|
||||||
|
|
||||||
// 获取用户 store
|
|
||||||
const userStore = useUserStoreHook();
|
|
||||||
// 从 store 中获取项目列表和当前选中的项目
|
|
||||||
const currentProject = computed(() => userStore.selectedProject);
|
|
||||||
const { drawing_file_type } = toRefs<any>(proxy?.useDict('drawing_file_type'));
|
|
||||||
const buttonLoading = ref(false);
|
|
||||||
const loading = ref(true);
|
|
||||||
//路由参数
|
|
||||||
const routeParams = ref<Record<string, any>>({});
|
|
||||||
const flowCodeOptions = [
|
|
||||||
{
|
|
||||||
value: currentProject.value?.id + '_changedrawing',
|
|
||||||
label: '变更图纸审批'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
value: currentProject.value?.id + '_blueprintdrawing',
|
|
||||||
label: '蓝图审批'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
value: currentProject.value?.id + '_processdrawing',
|
|
||||||
label: '过程图纸审批'
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
const flowCode = ref<string>('');
|
|
||||||
const status = ref<string>('');
|
|
||||||
const dialogVisible = reactive<DialogOption>({
|
|
||||||
visible: false,
|
|
||||||
title: '流程定义'
|
|
||||||
});
|
|
||||||
//提交组件
|
|
||||||
const submitVerifyRef = ref<InstanceType<typeof SubmitVerify>>();
|
|
||||||
//审批记录组件
|
|
||||||
const approvalRecordRef = ref<InstanceType<typeof ApprovalRecord>>();
|
|
||||||
//按钮组件
|
|
||||||
const approvalButtonRef = ref<InstanceType<typeof ApprovalButton>>();
|
|
||||||
|
|
||||||
const leaveFormRef = ref<ElFormInstance>();
|
|
||||||
const dialog = reactive({
|
|
||||||
visible: false,
|
|
||||||
title: '',
|
|
||||||
isEdit: false
|
|
||||||
});
|
|
||||||
const submitFormData = ref<StartProcessBo>({
|
|
||||||
businessId: '',
|
|
||||||
flowCode: '',
|
|
||||||
variables: {}
|
|
||||||
});
|
|
||||||
const taskVariables = ref<Record<string, any>>({});
|
|
||||||
|
|
||||||
const initFormData: DrawingForm = {
|
|
||||||
id: undefined,
|
|
||||||
projectId: currentProject.value?.id,
|
|
||||||
versionNumber: undefined,
|
|
||||||
fileName: undefined,
|
|
||||||
fileUrl: undefined,
|
|
||||||
fileType: undefined,
|
|
||||||
fileSuffix: undefined,
|
|
||||||
originalName: undefined,
|
|
||||||
remark: undefined,
|
|
||||||
file: undefined
|
|
||||||
};
|
|
||||||
const data = reactive<PageData<LeaveForm, LeaveQuery>>({
|
|
||||||
form: { ...initFormData },
|
|
||||||
queryParams: {
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
projectId: currentProject.value?.id,
|
|
||||||
fileName: undefined,
|
|
||||||
fileType: undefined,
|
|
||||||
fileSuffix: undefined,
|
|
||||||
fileStatus: undefined,
|
|
||||||
originalName: undefined,
|
|
||||||
newest: undefined,
|
|
||||||
params: {}
|
|
||||||
},
|
|
||||||
rules: {
|
|
||||||
versionNumber: [{ required: true, message: '版本号不能为空', trigger: 'blur' }],
|
|
||||||
fileName: [{ required: true, message: '文件名称不能为空', trigger: 'blur' }],
|
|
||||||
fileType: [{ required: true, message: '文件类型不能为空', trigger: 'change' }],
|
|
||||||
fileUrl: [
|
|
||||||
{
|
|
||||||
validator: (rule, value, callback) => {
|
|
||||||
// 新增时必须上传文件
|
|
||||||
if (!form.value.fileUrl) {
|
|
||||||
callback(new Error('请上传图纸文件'));
|
|
||||||
} else {
|
|
||||||
callback();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
trigger: 'change'
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
const handleClose = () => {
|
|
||||||
dialogVisible.visible = false;
|
|
||||||
flowCode.value = '';
|
|
||||||
buttonLoading.value = false;
|
|
||||||
};
|
|
||||||
const { form, rules } = toRefs(data);
|
|
||||||
|
|
||||||
/** 表单重置 */
|
|
||||||
const reset = () => {
|
|
||||||
form.value = { ...initFormData };
|
|
||||||
leaveFormRef.value?.resetFields();
|
|
||||||
};
|
|
||||||
|
|
||||||
/** 获取详情 */
|
|
||||||
const getInfo = () => {
|
|
||||||
loading.value = true;
|
|
||||||
buttonLoading.value = false;
|
|
||||||
nextTick(async () => {
|
|
||||||
const res = await getDrawing(routeParams.value.id);
|
|
||||||
Object.assign(form.value, res.data);
|
|
||||||
loading.value = false;
|
|
||||||
buttonLoading.value = false;
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
/** 提交按钮 */
|
|
||||||
const submitForm = (status1: string) => {
|
|
||||||
status.value = status1;
|
|
||||||
leaveFormRef.value?.validate(async (valid: boolean) => {
|
|
||||||
if (valid) {
|
|
||||||
buttonLoading.value = true;
|
|
||||||
var res;
|
|
||||||
if (form.value.id) {
|
|
||||||
res = await updateDrawing(form.value).finally(() => (buttonLoading.value = false));
|
|
||||||
} else {
|
|
||||||
res = await addDrawing(form.value).finally(() => (buttonLoading.value = false));
|
|
||||||
}
|
|
||||||
if (res.code == 200) {
|
|
||||||
dialog.visible = false;
|
|
||||||
submit(status.value, res.data);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
const submitFlow = async () => {
|
|
||||||
handleStartWorkFlow(form.value);
|
|
||||||
dialogVisible.visible = false;
|
|
||||||
};
|
|
||||||
//提交申请
|
|
||||||
const handleStartWorkFlow = async (data: LeaveForm) => {
|
|
||||||
try {
|
|
||||||
submitFormData.value.flowCode = flowCode.value;
|
|
||||||
submitFormData.value.businessId = data.id;
|
|
||||||
//流程变量
|
|
||||||
taskVariables.value = {
|
|
||||||
// leave4/5 使用的流程变量
|
|
||||||
userList: ['1', '3', '4']
|
|
||||||
};
|
|
||||||
submitFormData.value.variables = taskVariables.value;
|
|
||||||
const resp = await startWorkFlow(submitFormData.value);
|
|
||||||
if (submitVerifyRef.value) {
|
|
||||||
buttonLoading.value = false;
|
|
||||||
submitVerifyRef.value.openDialog(resp.data.taskId);
|
|
||||||
}
|
|
||||||
} finally {
|
|
||||||
buttonLoading.value = false;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
//审批记录
|
|
||||||
const handleApprovalRecord = () => {
|
|
||||||
approvalRecordRef.value.init(form.value.id);
|
|
||||||
};
|
|
||||||
//提交回调
|
|
||||||
const submitCallback = async () => {
|
|
||||||
await proxy.$tab.closePage(proxy.$route);
|
|
||||||
proxy.$router.go(-1);
|
|
||||||
};
|
|
||||||
//审批
|
|
||||||
const approvalVerifyOpen = async () => {
|
|
||||||
submitVerifyRef.value.openDialog(routeParams.value.taskId);
|
|
||||||
};
|
|
||||||
// 图纸上传成功之后 开始提交
|
|
||||||
const submit = async (status, data) => {
|
|
||||||
form.value = data;
|
|
||||||
if (status === 'draft') {
|
|
||||||
buttonLoading.value = false;
|
|
||||||
proxy?.$modal.msgSuccess('暂存成功');
|
|
||||||
proxy.$tab.closePage(proxy.$route);
|
|
||||||
proxy.$router.go(-1);
|
|
||||||
} else {
|
|
||||||
if ((form.value.status === 'draft' && (flowCode.value === '' || flowCode.value === null)) || routeParams.value.type === 'add') {
|
|
||||||
flowCode.value = flowCodeOptions[0].value;
|
|
||||||
dialogVisible.visible = true;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
//说明启动过先随意穿个参数
|
|
||||||
if (flowCode.value === '' || flowCode.value === null) {
|
|
||||||
flowCode.value = 'xx';
|
|
||||||
}
|
|
||||||
console.log(data);
|
|
||||||
await handleStartWorkFlow(data);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
nextTick(async () => {
|
|
||||||
routeParams.value = proxy.$route.query;
|
|
||||||
reset();
|
|
||||||
|
|
||||||
loading.value = false;
|
|
||||||
if (routeParams.value.type === 'update' || routeParams.value.type === 'view' || routeParams.value.type === 'approval') {
|
|
||||||
getInfo();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
<style scoped lang="scss">
|
|
||||||
/* 全局样式 */
|
|
||||||
:root {
|
|
||||||
--primary: #409eff;
|
|
||||||
--primary-light: #66b1ff;
|
|
||||||
--primary-dark: #3a8ee6;
|
|
||||||
--success: #67c23a;
|
|
||||||
--warning: #e6a23c;
|
|
||||||
--danger: #f56c6c;
|
|
||||||
--info: #909399;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 表单样式优化 */
|
|
||||||
.el-form-item {
|
|
||||||
.el-form-item__label {
|
|
||||||
color: #606266;
|
|
||||||
font-weight: 500;
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-input__inner,
|
|
||||||
.el-select .el-input__inner {
|
|
||||||
border-radius: 4px;
|
|
||||||
transition:
|
|
||||||
border-color 0.2s,
|
|
||||||
box-shadow 0.2s;
|
|
||||||
|
|
||||||
&:focus {
|
|
||||||
border-color: var(--primary-light);
|
|
||||||
box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-textarea__inner {
|
|
||||||
border-radius: 4px;
|
|
||||||
transition:
|
|
||||||
border-color 0.2s,
|
|
||||||
box-shadow 0.2s;
|
|
||||||
|
|
||||||
&:focus {
|
|
||||||
border-color: var(--primary-light);
|
|
||||||
box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 按钮样式优化 */
|
|
||||||
.el-button {
|
|
||||||
border-radius: 4px;
|
|
||||||
transition: all 0.2s;
|
|
||||||
|
|
||||||
&.is-primary {
|
|
||||||
background-color: var(--primary);
|
|
||||||
border-color: var(--primary);
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
background-color: var(--primary-light);
|
|
||||||
border-color: var(--primary-light);
|
|
||||||
}
|
|
||||||
|
|
||||||
&:active {
|
|
||||||
background-color: var(--primary-dark);
|
|
||||||
border-color: var(--primary-dark);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&.is-text {
|
|
||||||
color: var(--primary);
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
color: var(--primary-light);
|
|
||||||
background-color: rgba(64, 158, 255, 0.05);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 卡片样式优化 */
|
|
||||||
.el-card {
|
|
||||||
transition: all 0.3s ease;
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
/* transform: translateY(-2px); */
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 对话框样式优化 */
|
|
||||||
.el-dialog {
|
|
||||||
.el-dialog__header {
|
|
||||||
background-color: #f5f7fa;
|
|
||||||
border-bottom: 1px solid #ebeef5;
|
|
||||||
padding: 15px 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-dialog__title {
|
|
||||||
font-size: 16px;
|
|
||||||
font-weight: 600;
|
|
||||||
color: #303133;
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-dialog__footer {
|
|
||||||
padding: 15px 20px;
|
|
||||||
border-top: 1px solid #ebeef5;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -236,7 +236,8 @@ const submitCallback = async () => {
|
|||||||
};
|
};
|
||||||
//审批
|
//审批
|
||||||
const approvalVerifyOpen = async () => {
|
const approvalVerifyOpen = async () => {
|
||||||
submitVerifyRef.value.openDialog(routeParams.value.taskId);
|
submitVerifyRef.value.openDialog(routeParams.value.taskId, true, routeParams.value.businessId);
|
||||||
|
// submitVerifyRef.value.openDialog(routeParams.value.taskId);
|
||||||
};
|
};
|
||||||
// 图纸上传成功之后 开始提交
|
// 图纸上传成功之后 开始提交
|
||||||
const submit = async (status, data) => {
|
const submit = async (status, data) => {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-form ref="formRef" :model="formData" :rules="rules" label-width="120px" class="info-form" @validate="handleValidate">
|
<el-form ref="formRef" :model="formData" :rules="rules" label-width="120px" class="info-form">
|
||||||
<!-- 基本信息区域 -->
|
<!-- 基本信息区域 -->
|
||||||
<div class="form-section">
|
<div class="form-section">
|
||||||
<div class="section-title">
|
<div class="section-title">
|
||||||
@ -157,7 +157,7 @@
|
|||||||
|
|
||||||
<script setup name="ExamineForm" lang="ts">
|
<script setup name="ExamineForm" lang="ts">
|
||||||
import { ref, watch, reactive } from 'vue';
|
import { ref, watch, reactive } from 'vue';
|
||||||
import { fillOutTheDesignVerificationForm } from '@/api/design/drawingreview';
|
import { fillOutTheDesignVerificationForm, drawingreviewReceipts } from '@/api/design/drawingreview';
|
||||||
import type { FormInstance, FormRules } from 'element-plus';
|
import type { FormInstance, FormRules } from 'element-plus';
|
||||||
import { useUserStoreHook } from '@/store/modules/user';
|
import { useUserStoreHook } from '@/store/modules/user';
|
||||||
import { computed } from 'vue';
|
import { computed } from 'vue';
|
||||||
@ -249,12 +249,6 @@ const getSubProject = async () => {
|
|||||||
subProjectMap.set(item.id, item.projectName);
|
subProjectMap.set(item.id, item.projectName);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
// 处理验证事件
|
|
||||||
const handleValidate = (prop: string, isValid: boolean, rule: any) => {
|
|
||||||
// 可根据需要处理验证事件
|
|
||||||
console.log(`字段 ${prop} 验证${isValid ? '通过' : '失败'}`);
|
|
||||||
};
|
|
||||||
|
|
||||||
// 验证表单
|
// 验证表单
|
||||||
const validate = async () => {
|
const validate = async () => {
|
||||||
if (formRef.value) {
|
if (formRef.value) {
|
||||||
@ -287,11 +281,11 @@ const submit = async (businessId) => {
|
|||||||
const isValid = await validate();
|
const isValid = await validate();
|
||||||
if (isValid) {
|
if (isValid) {
|
||||||
formData.subprojectName = subProjectMap.get(formData.subprojectId);
|
formData.subprojectName = subProjectMap.get(formData.subprojectId);
|
||||||
formData.id = businessId;
|
formData.drawingreviewId = businessId;
|
||||||
const res = await fillOutTheDesignVerificationForm(formData);
|
const res = await drawingreviewReceipts(formData);
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
// 提交成功处理逻辑
|
// // 提交成功处理逻辑
|
||||||
console.log('提交成功');
|
// console.log('提交成功');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
@ -1,361 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="p-4 bg-gray-50">
|
|
||||||
<div class="max-w-4xl mx-auto">
|
|
||||||
<!-- 顶部按钮区域 -->
|
|
||||||
<el-card class="mb-4 rounded-lg shadow-sm bg-white border border-gray-100 transition-all hover:shadow-md">
|
|
||||||
<approvalButton
|
|
||||||
@submitForm="submitForm"
|
|
||||||
@approvalVerifyOpen="approvalVerifyOpen"
|
|
||||||
@handleApprovalRecord="handleApprovalRecord"
|
|
||||||
:buttonLoading="buttonLoading"
|
|
||||||
:id="form.id"
|
|
||||||
:status="form.auditType"
|
|
||||||
:pageType="routeParams.type"
|
|
||||||
/>
|
|
||||||
</el-card>
|
|
||||||
<!-- 表单区域 -->
|
|
||||||
<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>
|
|
||||||
</div>
|
|
||||||
<div class="p-6">
|
|
||||||
<el-form
|
|
||||||
ref="leaveFormRef"
|
|
||||||
v-loading="loading"
|
|
||||||
:disabled="routeParams.type === 'view'"
|
|
||||||
:model="form"
|
|
||||||
:rules="rules"
|
|
||||||
label-width="100px"
|
|
||||||
class="space-y-4"
|
|
||||||
>
|
|
||||||
<div class="grid grid-cols-1 gap-4">
|
|
||||||
<el-row>
|
|
||||||
<!-- <el-col :span="12">
|
|
||||||
<el-form-item label="文件名称" prop="formNo">
|
|
||||||
<el-input disabled v-model="form.fileName" placeholder="请输入文件名称" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col> -->
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item label="文件" prop="formNo">
|
|
||||||
<div style="display: flex">
|
|
||||||
<span style="color: rgb(50, 142, 248)" @click="onOpen">点击打开</span>
|
|
||||||
</div>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item label="备注" prop="formNo">
|
|
||||||
<el-input disabled type="textarea" v-model="form.remark" placeholder="请输入内容" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</div>
|
|
||||||
</el-form>
|
|
||||||
</div>
|
|
||||||
</el-card>
|
|
||||||
<!-- 提交组件 -->
|
|
||||||
<submitVerify ref="submitVerifyRef" :task-variables="taskVariables" @submit-callback="submitCallback" />
|
|
||||||
<approvalRecord ref="approvalRecordRef"></approvalRecord>
|
|
||||||
<!-- 流程选择对话框 -->
|
|
||||||
<el-dialog
|
|
||||||
draggable
|
|
||||||
v-model="dialogVisible.visible"
|
|
||||||
:title="dialogVisible.title"
|
|
||||||
:before-close="handleClose"
|
|
||||||
width="500"
|
|
||||||
class="rounded-lg shadow-lg"
|
|
||||||
>
|
|
||||||
<div class="p-4">
|
|
||||||
<p class="text-gray-600 mb-4">请选择要启动的流程:</p>
|
|
||||||
<el-select v-model="flowCode" placeholder="请选择流程" style="width: 100%">
|
|
||||||
<el-option v-for="item in flowCodeOptions" :key="item.value" :label="item.label" :value="item.value" />
|
|
||||||
</el-select>
|
|
||||||
</div>
|
|
||||||
<template #footer>
|
|
||||||
<div class="dialog-footer p-4 border-t border-gray-100 flex justify-end space-x-3">
|
|
||||||
<el-button @click="handleClose" class="px-4 py-2 border border-gray-300 rounded-md text-gray-700 hover:bg-gray-50 transition-colors"
|
|
||||||
>取消</el-button
|
|
||||||
>
|
|
||||||
<el-button type="primary" @click="submitFlow()" class="px-4 py-2 bg-primary text-white rounded-md hover:bg-primary/90 transition-colors"
|
|
||||||
>确认</el-button
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup name="Leave" lang="ts">
|
|
||||||
import { LeaveForm, LeaveQuery, LeaveVO } from '@/api/workflow/leave/types';
|
|
||||||
import { startWorkFlow } from '@/api/workflow/task';
|
|
||||||
import SubmitVerify from '@/components/Process/submitVerify.vue';
|
|
||||||
import ApprovalRecord from '@/components/Process/approvalRecord.vue';
|
|
||||||
import ApprovalButton from '@/components/Process/approvalButton.vue';
|
|
||||||
import { StartProcessBo } from '@/api/workflow/workflowCommon/types';
|
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
||||||
import { useUserStoreHook } from '@/store/modules/user';
|
|
||||||
const { design_change_reason_type } = toRefs<any>(proxy?.useDict('design_change_reason_type'));
|
|
||||||
import { getKnowledgeDocument } from '@/api/design/technicalStandard';
|
|
||||||
import { getCollectFile } from '@/api/design/condition';
|
|
||||||
import { drawingreviewzQuery } from '@/api/design/drawingreview';
|
|
||||||
|
|
||||||
// 获取用户 store
|
|
||||||
const userStore = useUserStoreHook();
|
|
||||||
// 从 store 中获取项目列表和当前选中的项目
|
|
||||||
const currentProject = computed(() => userStore.selectedProject);
|
|
||||||
const buttonLoading = ref(false);
|
|
||||||
const loading = ref(true);
|
|
||||||
//路由参数
|
|
||||||
const routeParams = ref<Record<string, any>>({});
|
|
||||||
const flowCode = ref<string>('');
|
|
||||||
const status = ref<string>('');
|
|
||||||
const dialogVisible = reactive<DialogOption>({
|
|
||||||
visible: false,
|
|
||||||
title: '流程定义'
|
|
||||||
});
|
|
||||||
//提交组件
|
|
||||||
const submitVerifyRef = ref<InstanceType<typeof SubmitVerify>>();
|
|
||||||
//审批记录组件
|
|
||||||
const approvalRecordRef = ref<InstanceType<typeof ApprovalRecord>>();
|
|
||||||
//按钮组件
|
|
||||||
const flowCodeOptions = [
|
|
||||||
{
|
|
||||||
value: currentProject.value?.id + '_desDrawingReview',
|
|
||||||
label: '图纸评审'
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
const leaveFormRef = ref<ElFormInstance>();
|
|
||||||
const dialog = reactive({
|
|
||||||
visible: false,
|
|
||||||
title: '',
|
|
||||||
isEdit: false
|
|
||||||
});
|
|
||||||
const submitFormData = ref<StartProcessBo>({
|
|
||||||
businessId: '',
|
|
||||||
flowCode: '',
|
|
||||||
variables: {}
|
|
||||||
});
|
|
||||||
const taskVariables = ref<Record<string, any>>({});
|
|
||||||
|
|
||||||
const initFormData = {
|
|
||||||
id: undefined,
|
|
||||||
fileName: undefined,
|
|
||||||
fileUrl: undefined,
|
|
||||||
status: undefined,
|
|
||||||
originalName: undefined
|
|
||||||
};
|
|
||||||
const data = reactive({
|
|
||||||
form: { ...initFormData },
|
|
||||||
rules: {}
|
|
||||||
});
|
|
||||||
const onOpen = () => {
|
|
||||||
window.open(form.value.path, '_blank');
|
|
||||||
};
|
|
||||||
const handleClose = () => {
|
|
||||||
dialogVisible.visible = false;
|
|
||||||
flowCode.value = '';
|
|
||||||
buttonLoading.value = false;
|
|
||||||
};
|
|
||||||
const { form, rules } = toRefs(data);
|
|
||||||
|
|
||||||
/** 表单重置 */
|
|
||||||
const reset = () => {
|
|
||||||
form.value = { ...initFormData };
|
|
||||||
leaveFormRef.value?.resetFields();
|
|
||||||
};
|
|
||||||
|
|
||||||
/** 获取详情 */
|
|
||||||
const getInfo = () => {
|
|
||||||
loading.value = true;
|
|
||||||
buttonLoading.value = false;
|
|
||||||
nextTick(async () => {
|
|
||||||
const res = await drawingreviewzQuery(routeParams.value.id);
|
|
||||||
Object.assign(form.value, res.data);
|
|
||||||
loading.value = false;
|
|
||||||
buttonLoading.value = false;
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
/** 提交按钮 */
|
|
||||||
const submitForm = (status1: string) => {
|
|
||||||
status.value = status1;
|
|
||||||
submit(status.value, form.value);
|
|
||||||
};
|
|
||||||
|
|
||||||
const submitFlow = async () => {
|
|
||||||
handleStartWorkFlow(form.value);
|
|
||||||
dialogVisible.visible = false;
|
|
||||||
};
|
|
||||||
//提交申请
|
|
||||||
const handleStartWorkFlow = async (data: LeaveForm) => {
|
|
||||||
try {
|
|
||||||
submitFormData.value.flowCode = flowCode.value;
|
|
||||||
submitFormData.value.businessId = data.id;
|
|
||||||
//流程变量
|
|
||||||
taskVariables.value = {
|
|
||||||
// leave4/5 使用的流程变量
|
|
||||||
userList: ['1', '3', '4']
|
|
||||||
};
|
|
||||||
submitFormData.value.variables = taskVariables.value;
|
|
||||||
const resp = await startWorkFlow(submitFormData.value);
|
|
||||||
if (submitVerifyRef.value) {
|
|
||||||
buttonLoading.value = false;
|
|
||||||
submitVerifyRef.value.openDialog(resp.data.taskId);
|
|
||||||
}
|
|
||||||
} finally {
|
|
||||||
buttonLoading.value = false;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
//审批记录
|
|
||||||
const handleApprovalRecord = () => {
|
|
||||||
approvalRecordRef.value.init(form.value.id);
|
|
||||||
};
|
|
||||||
//提交回调
|
|
||||||
const submitCallback = async () => {
|
|
||||||
await proxy.$tab.closePage(proxy.$route);
|
|
||||||
proxy.$router.go(-1);
|
|
||||||
};
|
|
||||||
//审批
|
|
||||||
const approvalVerifyOpen = async () => {
|
|
||||||
// 图纸评审验证
|
|
||||||
submitVerifyRef.value.openDialog(routeParams.value.taskId, true, routeParams.value.businessId);
|
|
||||||
};
|
|
||||||
const submit = async (status, data) => {
|
|
||||||
form.value = data;
|
|
||||||
if (status === 'draft') {
|
|
||||||
buttonLoading.value = false;
|
|
||||||
proxy?.$modal.msgSuccess('暂存成功');
|
|
||||||
proxy.$tab.closePage(proxy.$route);
|
|
||||||
proxy.$router.go(-1);
|
|
||||||
} else {
|
|
||||||
if ((form.value.auditType === 'draft' && (flowCode.value === '' || flowCode.value === null)) || routeParams.value.type === 'add') {
|
|
||||||
flowCode.value = flowCodeOptions[0].value;
|
|
||||||
dialogVisible.visible = true;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
//说明启动过先随意穿个参数
|
|
||||||
if (flowCode.value === '' || flowCode.value === null) {
|
|
||||||
flowCode.value = 'xx';
|
|
||||||
}
|
|
||||||
await handleStartWorkFlow(data);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
nextTick(async () => {
|
|
||||||
routeParams.value = proxy.$route.query;
|
|
||||||
|
|
||||||
reset();
|
|
||||||
loading.value = false;
|
|
||||||
console.log(routeParams.value.type);
|
|
||||||
if (routeParams.value.type === 'update' || routeParams.value.type === 'view' || routeParams.value.type === 'approval') {
|
|
||||||
getInfo();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
<style scoped lang="scss">
|
|
||||||
/* 全局样式 */
|
|
||||||
:root {
|
|
||||||
--primary: #409eff;
|
|
||||||
--primary-light: #66b1ff;
|
|
||||||
--primary-dark: #3a8ee6;
|
|
||||||
--success: #67c23a;
|
|
||||||
--warning: #e6a23c;
|
|
||||||
--danger: #f56c6c;
|
|
||||||
--info: #909399;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 表单样式优化 */
|
|
||||||
.el-form-item {
|
|
||||||
.el-form-item__label {
|
|
||||||
color: #606266;
|
|
||||||
font-weight: 500;
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-input__inner,
|
|
||||||
.el-select .el-input__inner {
|
|
||||||
border-radius: 4px;
|
|
||||||
transition:
|
|
||||||
border-color 0.2s,
|
|
||||||
box-shadow 0.2s;
|
|
||||||
|
|
||||||
&:focus {
|
|
||||||
border-color: var(--primary-light);
|
|
||||||
box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-textarea__inner {
|
|
||||||
border-radius: 4px;
|
|
||||||
transition:
|
|
||||||
border-color 0.2s,
|
|
||||||
box-shadow 0.2s;
|
|
||||||
|
|
||||||
&:focus {
|
|
||||||
border-color: var(--primary-light);
|
|
||||||
box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 按钮样式优化 */
|
|
||||||
.el-button {
|
|
||||||
border-radius: 4px;
|
|
||||||
transition: all 0.2s;
|
|
||||||
|
|
||||||
&.is-primary {
|
|
||||||
background-color: var(--primary);
|
|
||||||
border-color: var(--primary);
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
background-color: var(--primary-light);
|
|
||||||
border-color: var(--primary-light);
|
|
||||||
}
|
|
||||||
|
|
||||||
&:active {
|
|
||||||
background-color: var(--primary-dark);
|
|
||||||
border-color: var(--primary-dark);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&.is-text {
|
|
||||||
color: var(--primary);
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
color: var(--primary-light);
|
|
||||||
background-color: rgba(64, 158, 255, 0.05);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 卡片样式优化 */
|
|
||||||
.el-card {
|
|
||||||
transition: all 0.3s ease;
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
/* transform: translateY(-2px); */
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 对话框样式优化 */
|
|
||||||
.el-dialog {
|
|
||||||
.el-dialog__header {
|
|
||||||
background-color: #f5f7fa;
|
|
||||||
border-bottom: 1px solid #ebeef5;
|
|
||||||
padding: 15px 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-dialog__title {
|
|
||||||
font-size: 16px;
|
|
||||||
font-weight: 600;
|
|
||||||
color: #303133;
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-dialog__footer {
|
|
||||||
padding: 15px 20px;
|
|
||||||
border-top: 1px solid #ebeef5;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -1,12 +1,9 @@
|
|||||||
<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">
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
<div v-show="showSearch" class="mb-[10px]">
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
||||||
<!-- <el-form-item label="子项ID" prop="designSubitemId">
|
|
||||||
<el-input v-model="queryParams.designSubitemId" placeholder="请输入设计子项ID" clearable @keyup.enter="handleQuery" />
|
|
||||||
</el-form-item> -->
|
|
||||||
<el-form-item label="卷册号" prop="volumeNumber">
|
<el-form-item label="卷册号" prop="volumeNumber">
|
||||||
<el-input v-model="queryParams.volumeNumber" placeholder="请输入卷册号" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.volumeNumber" placeholder="请输入卷册号" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -48,9 +45,7 @@
|
|||||||
<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>
|
||||||
|
<el-table v-loading="loading" :data="volumeCatalogList">
|
||||||
<el-table v-loading="loading" :data="volumeCatalogList" @selection-change="handleSelectionChange">
|
|
||||||
<el-table-column type="selection" width="55" 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="designState">
|
<el-table-column label="设计状态" align="center" prop="designState">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
@ -82,24 +77,31 @@
|
|||||||
<el-button link type="primary" icon="View" @click="handleView(scope.row)" v-hasPermi="['out:monthPlan:remove']">查看文件</el-button>
|
<el-button link type="primary" icon="View" @click="handleView(scope.row)" v-hasPermi="['out:monthPlan:remove']">查看文件</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" width="200">
|
<el-table-column label="操作" align="center" fixed="right" width="200">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button
|
<el-button
|
||||||
link
|
link
|
||||||
type="primary"
|
type="primary"
|
||||||
v-if="scope.row.auditStatus != 'finish'"
|
v-if="scope.row.auditStatus != 'finish' && scope.row.auditStatus != 'termination'"
|
||||||
icon="Edit"
|
icon="Edit"
|
||||||
@click="handleUpdate(scope.row)"
|
@click="handleUpdate(scope.row)"
|
||||||
v-hasPermi="['design:volumeCatalog:edit']"
|
v-hasPermi="['design:volumeCatalog:edit']"
|
||||||
>修改</el-button
|
>修改</el-button
|
||||||
>
|
>
|
||||||
<el-button link type="primary" icon="Upload" @click="handleUpload(scope.row)" v-if="scope.row.auditStatus == 'draft'">上传图纸</el-button>
|
<el-button
|
||||||
|
link
|
||||||
|
type="primary"
|
||||||
|
icon="Upload"
|
||||||
|
@click="handleUpload(scope.row)"
|
||||||
|
v-if="scope.row.auditStatus == 'draft' || scope.row.auditStatus == 'back'"
|
||||||
|
>上传图纸</el-button
|
||||||
|
>
|
||||||
<el-button
|
<el-button
|
||||||
link
|
link
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="edit"
|
icon="edit"
|
||||||
@click="handleAudit(scope.row)"
|
@click="handleAudit(scope.row)"
|
||||||
v-if="scope.row.auditStatus == 'draft'"
|
v-if="scope.row.auditStatus == 'draft' || scope.row.auditStatus == 'back'"
|
||||||
v-hasPermi="['out:monthPlan:remove']"
|
v-hasPermi="['out:monthPlan:remove']"
|
||||||
>审核</el-button
|
>审核</el-button
|
||||||
>
|
>
|
||||||
@ -112,6 +114,9 @@
|
|||||||
v-hasPermi="['out:monthPlan:remove']"
|
v-hasPermi="['out:monthPlan:remove']"
|
||||||
>查看流程</el-button
|
>查看流程</el-button
|
||||||
>
|
>
|
||||||
|
<el-button type="warning" link size="small" icon="View" v-if="scope.row.auditType != 'draft'" @click="handleViewHistory(scope.row)"
|
||||||
|
>查看单据</el-button
|
||||||
|
>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@ -128,8 +133,8 @@
|
|||||||
<el-option :value="item.value" v-for="item in des_user_major" :key="item.value" :label="item.label" />
|
<el-option :value="item.value" v-for="item in des_user_major" :key="item.value" :label="item.label" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="负责人" prop="principal">
|
<el-form-item label="设计人员" prop="principal">
|
||||||
<el-input v-model="form.principal" placeholder="请输入负责人" />
|
<el-input v-model="form.principal" placeholder="请输入设计人员" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="设计状态" prop="designState">
|
<el-form-item label="设计状态" prop="designState">
|
||||||
<el-select v-model="form.designState" placeholder="请选择设计状态">
|
<el-select v-model="form.designState" placeholder="请选择设计状态">
|
||||||
@ -206,6 +211,101 @@
|
|||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</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>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -225,7 +325,7 @@ import { useUserStoreHook } from '@/store/modules/user';
|
|||||||
const fileList = ref([]);
|
const fileList = ref([]);
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
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'));
|
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';
|
||||||
const volumeCatalogList = ref<VolumeCatalogVO[]>([]);
|
const volumeCatalogList = ref<VolumeCatalogVO[]>([]);
|
||||||
const buttonLoading = ref(false);
|
const buttonLoading = ref(false);
|
||||||
const loading = ref(true);
|
const loading = ref(true);
|
||||||
@ -234,7 +334,9 @@ 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 hisId = ref('');
|
||||||
|
const dialogHistory = ref(false);
|
||||||
|
const hisList = ref([]);
|
||||||
// 获取用户 store
|
// 获取用户 store
|
||||||
const userStore = useUserStoreHook();
|
const userStore = useUserStoreHook();
|
||||||
// 从 store 中获取项目列表和当前选中的项目
|
// 从 store 中获取项目列表和当前选中的项目
|
||||||
@ -255,7 +357,30 @@ const uploadForm = reactive({
|
|||||||
fileList: [],
|
fileList: [],
|
||||||
cancellationIds: [] // 用于存储已作废的文件ID
|
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 userList = ref([]);
|
||||||
|
|
||||||
const initFormData: any = {
|
const initFormData: any = {
|
||||||
@ -300,7 +425,34 @@ const getList = async () => {
|
|||||||
loading.value = false;
|
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 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);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const handleShowInfo = (val) => {
|
||||||
|
getDetails(val);
|
||||||
|
};
|
||||||
|
const getDetails = async (id) => {
|
||||||
|
let res = await drawingreviewReceiptsDetail(id);
|
||||||
|
examineForm.value = res.data;
|
||||||
|
};
|
||||||
/** 取消按钮 */
|
/** 取消按钮 */
|
||||||
const cancel = () => {
|
const cancel = () => {
|
||||||
reset();
|
reset();
|
||||||
@ -477,3 +629,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>
|
||||||
|
@ -1,414 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="p-4 bg-gray-50">
|
|
||||||
<div class="max-w-4xl mx-auto">
|
|
||||||
<!-- 顶部按钮区域 -->
|
|
||||||
<el-card class="mb-4 rounded-lg shadow-sm bg-white border border-gray-100 transition-all hover:shadow-md">
|
|
||||||
<approvalButton
|
|
||||||
@submitForm="submitForm"
|
|
||||||
@approvalVerifyOpen="approvalVerifyOpen"
|
|
||||||
@handleApprovalRecord="handleApprovalRecord"
|
|
||||||
:buttonLoading="buttonLoading"
|
|
||||||
:id="form.design"
|
|
||||||
:status="form.auditStatus"
|
|
||||||
:pageType="routeParams.type"
|
|
||||||
/>
|
|
||||||
</el-card>
|
|
||||||
<!-- 表单区域 -->
|
|
||||||
<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>
|
|
||||||
</div>
|
|
||||||
<div class="p-6">
|
|
||||||
<el-form
|
|
||||||
ref="leaveFormRef"
|
|
||||||
v-loading="loading"
|
|
||||||
:disabled="routeParams.type === 'view'"
|
|
||||||
:model="form"
|
|
||||||
:rules="rules"
|
|
||||||
label-width="100px"
|
|
||||||
class="space-y-4"
|
|
||||||
>
|
|
||||||
<div class="grid grid-cols-1 gap-4">
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="子项" prop="designSubitem">
|
|
||||||
<el-input v-model="form.designSubitem" placeholder="请输入设计子项" disabled />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="专业" prop="specialty"> <el-input v-model="form.specialty" disabled placeholder="请输入专业" /> </el-form-item
|
|
||||||
></el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="负责人" prop="principal">
|
|
||||||
<el-input v-model="form.principal" placeholder="请输入负责人" disabled />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="设计状态" prop="designState">
|
|
||||||
<el-select v-model="form.designState" placeholder="请选择设计状态" disabled>
|
|
||||||
<el-option :value="item.value" v-for="item in design_state" :key="item.value" :label="item.label" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="计划出图时间" prop="plannedCompletion">
|
|
||||||
<el-date-picker
|
|
||||||
v-model="form.plannedCompletion"
|
|
||||||
type="date"
|
|
||||||
value-format="YYYY-MM-DD"
|
|
||||||
disabled
|
|
||||||
placeholder="请选择计划出图时间"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="卷册号" prop="volumeNumber">
|
|
||||||
<el-input v-model="form.volumeNumber" placeholder="请输入卷册号" disabled /> </el-form-item
|
|
||||||
></el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="资料名称" prop="documentName">
|
|
||||||
<el-input v-model="form.documentName" placeholder="请输入资料名称" disabled />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="备注" prop="remark"> <el-input v-model="form.remark" placeholder="请输入备注" disabled /> </el-form-item
|
|
||||||
></el-col>
|
|
||||||
<el-col :span="24" v-for="(item, index) in form.fileVoList">
|
|
||||||
<el-form-item :label="index == 0 ? '已上传文件' : ''" v-if="item.status == 1">
|
|
||||||
<el-link type="primary" :underline="false" :href="item.fileUrl" target="_blank">{{ item.fileName }}</el-link>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</div>
|
|
||||||
</el-form>
|
|
||||||
</div>
|
|
||||||
</el-card>
|
|
||||||
<!-- 提交组件 -->
|
|
||||||
<submitVerify ref="submitVerifyRef" :task-variables="taskVariables" @submit-callback="submitCallback" />
|
|
||||||
<approvalRecord ref="approvalRecordRef"></approvalRecord>
|
|
||||||
<!-- 流程选择对话框 -->
|
|
||||||
<el-dialog
|
|
||||||
draggable
|
|
||||||
v-model="dialogVisible.visible"
|
|
||||||
:title="dialogVisible.title"
|
|
||||||
:before-close="handleClose"
|
|
||||||
width="500"
|
|
||||||
class="rounded-lg shadow-lg"
|
|
||||||
>
|
|
||||||
<div class="p-4">
|
|
||||||
<p class="text-gray-600 mb-4">请选择要启动的流程:</p>
|
|
||||||
<el-select v-model="flowCode" placeholder="请选择流程" style="width: 100%">
|
|
||||||
<el-option v-for="item in flowCodeOptions" :key="item.value" :label="item.label" :value="item.value" />
|
|
||||||
</el-select>
|
|
||||||
</div>
|
|
||||||
<template #footer>
|
|
||||||
<div class="dialog-footer p-4 border-t border-gray-100 flex justify-end space-x-3">
|
|
||||||
<el-button @click="handleClose" class="px-4 py-2 border border-gray-300 rounded-md text-gray-700 hover:bg-gray-50 transition-colors"
|
|
||||||
>取消</el-button
|
|
||||||
>
|
|
||||||
<el-button type="primary" @click="submitFlow()" class="px-4 py-2 bg-primary text-white rounded-md hover:bg-primary/90 transition-colors"
|
|
||||||
>确认</el-button
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup name="Leave" lang="ts">
|
|
||||||
import { LeaveForm, LeaveQuery, LeaveVO } from '@/api/workflow/leave/types';
|
|
||||||
import { startWorkFlow } from '@/api/workflow/task';
|
|
||||||
import SubmitVerify from '@/components/Process/submitVerify.vue';
|
|
||||||
import ApprovalRecord from '@/components/Process/approvalRecord.vue';
|
|
||||||
import ApprovalButton from '@/components/Process/approvalButton.vue';
|
|
||||||
import { StartProcessBo } from '@/api/workflow/workflowCommon/types';
|
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
||||||
import { useUserStoreHook } from '@/store/modules/user';
|
|
||||||
import { getDesignChange, addDesignChange, updateDesignChange } from '@/api/design/designChange';
|
|
||||||
import { getVolumeCatalog } from '@/api/design/volumeCatalog';
|
|
||||||
const { design_state } = toRefs<any>(proxy?.useDict('design_state'));
|
|
||||||
|
|
||||||
// 获取用户 store
|
|
||||||
const userStore = useUserStoreHook();
|
|
||||||
// 从 store 中获取项目列表和当前选中的项目
|
|
||||||
const currentProject = computed(() => userStore.selectedProject);
|
|
||||||
const buttonLoading = ref(false);
|
|
||||||
const loading = ref(true);
|
|
||||||
//路由参数
|
|
||||||
const routeParams = ref<Record<string, any>>({});
|
|
||||||
const flowCodeOptions = [
|
|
||||||
{
|
|
||||||
value: currentProject.value?.id + '_designTheDiagram',
|
|
||||||
label: '设计出图计划审批'
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
const flowCode = ref<string>('');
|
|
||||||
const status = ref<string>('');
|
|
||||||
const dialogVisible = reactive<DialogOption>({
|
|
||||||
visible: false,
|
|
||||||
title: '流程定义'
|
|
||||||
});
|
|
||||||
//提交组件
|
|
||||||
const submitVerifyRef = ref<InstanceType<typeof SubmitVerify>>();
|
|
||||||
//审批记录组件
|
|
||||||
const approvalRecordRef = ref<InstanceType<typeof ApprovalRecord>>();
|
|
||||||
//按钮组件
|
|
||||||
const approvalButtonRef = ref<InstanceType<typeof ApprovalButton>>();
|
|
||||||
|
|
||||||
const leaveFormRef = ref<ElFormInstance>();
|
|
||||||
const dialog = reactive({
|
|
||||||
visible: false,
|
|
||||||
title: '',
|
|
||||||
isEdit: false
|
|
||||||
});
|
|
||||||
const submitFormData = ref<StartProcessBo>({
|
|
||||||
businessId: '',
|
|
||||||
flowCode: '',
|
|
||||||
variables: {}
|
|
||||||
});
|
|
||||||
const taskVariables = ref<Record<string, any>>({});
|
|
||||||
|
|
||||||
const initFormData = {
|
|
||||||
id: undefined,
|
|
||||||
projectId: currentProject.value?.id,
|
|
||||||
formNo: undefined,
|
|
||||||
projectName: undefined,
|
|
||||||
submitUnit: undefined,
|
|
||||||
specialty: undefined,
|
|
||||||
submitDate: undefined,
|
|
||||||
volumeName: undefined,
|
|
||||||
volumeNo: undefined,
|
|
||||||
attachmentPic: undefined,
|
|
||||||
changeReason: [],
|
|
||||||
changeContent: undefined,
|
|
||||||
costEstimation: undefined,
|
|
||||||
costEstimationFile: undefined,
|
|
||||||
fileId: undefined,
|
|
||||||
status: undefined,
|
|
||||||
remark: undefined
|
|
||||||
};
|
|
||||||
const data = reactive({
|
|
||||||
form: { ...initFormData },
|
|
||||||
queryParams: {
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
projectId: currentProject.value?.id,
|
|
||||||
fileName: undefined,
|
|
||||||
fileType: undefined,
|
|
||||||
fileSuffix: undefined,
|
|
||||||
fileStatus: undefined,
|
|
||||||
originalName: undefined,
|
|
||||||
newest: undefined,
|
|
||||||
params: {}
|
|
||||||
},
|
|
||||||
rules: {}
|
|
||||||
});
|
|
||||||
|
|
||||||
const handleClose = () => {
|
|
||||||
dialogVisible.visible = false;
|
|
||||||
flowCode.value = '';
|
|
||||||
buttonLoading.value = false;
|
|
||||||
};
|
|
||||||
const { form, rules } = toRefs(data);
|
|
||||||
|
|
||||||
/** 表单重置 */
|
|
||||||
const reset = () => {
|
|
||||||
form.value = { ...initFormData };
|
|
||||||
leaveFormRef.value?.resetFields();
|
|
||||||
};
|
|
||||||
|
|
||||||
/** 获取详情 */
|
|
||||||
const getInfo = () => {
|
|
||||||
loading.value = true;
|
|
||||||
buttonLoading.value = false;
|
|
||||||
nextTick(async () => {
|
|
||||||
const res = await getVolumeCatalog(routeParams.value.id);
|
|
||||||
Object.assign(form.value, res.data);
|
|
||||||
|
|
||||||
loading.value = false;
|
|
||||||
buttonLoading.value = false;
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
/** 提交按钮 */
|
|
||||||
const submitForm = (status1: string) => {
|
|
||||||
status.value = status1;
|
|
||||||
submit(status.value, form.value);
|
|
||||||
};
|
|
||||||
|
|
||||||
const submitFlow = async () => {
|
|
||||||
handleStartWorkFlow(form.value);
|
|
||||||
dialogVisible.visible = false;
|
|
||||||
};
|
|
||||||
//提交申请
|
|
||||||
const handleStartWorkFlow = async (data: LeaveForm) => {
|
|
||||||
try {
|
|
||||||
submitFormData.value.flowCode = flowCode.value;
|
|
||||||
submitFormData.value.businessId = data.design;
|
|
||||||
//流程变量
|
|
||||||
taskVariables.value = {
|
|
||||||
// leave4/5 使用的流程变量
|
|
||||||
userList: ['1', '3', '4']
|
|
||||||
};
|
|
||||||
submitFormData.value.variables = taskVariables.value;
|
|
||||||
const resp = await startWorkFlow(submitFormData.value);
|
|
||||||
if (submitVerifyRef.value) {
|
|
||||||
buttonLoading.value = false;
|
|
||||||
submitVerifyRef.value.openDialog(resp.data.taskId);
|
|
||||||
}
|
|
||||||
} finally {
|
|
||||||
buttonLoading.value = false;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
//审批记录
|
|
||||||
const handleApprovalRecord = () => {
|
|
||||||
approvalRecordRef.value.init(form.value.design);
|
|
||||||
};
|
|
||||||
//提交回调
|
|
||||||
const submitCallback = async () => {
|
|
||||||
await proxy.$tab.closePage(proxy.$route);
|
|
||||||
proxy.$router.go(-1);
|
|
||||||
};
|
|
||||||
//审批
|
|
||||||
const approvalVerifyOpen = async () => {
|
|
||||||
submitVerifyRef.value.openDialog(routeParams.value.taskId);
|
|
||||||
};
|
|
||||||
// 图纸上传成功之后 开始提交
|
|
||||||
const submit = async (status, data) => {
|
|
||||||
form.value = data;
|
|
||||||
if (status === 'draft') {
|
|
||||||
buttonLoading.value = false;
|
|
||||||
proxy?.$modal.msgSuccess('暂存成功');
|
|
||||||
proxy.$tab.closePage(proxy.$route);
|
|
||||||
proxy.$router.go(-1);
|
|
||||||
} else {
|
|
||||||
if ((form.value.auditStatus === 'draft' && (flowCode.value === '' || flowCode.value === null)) || routeParams.value.type === 'add') {
|
|
||||||
flowCode.value = flowCodeOptions[0].value;
|
|
||||||
dialogVisible.visible = true;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
//说明启动过先随意穿个参数
|
|
||||||
if (flowCode.value === '' || flowCode.value === null) {
|
|
||||||
flowCode.value = 'xx';
|
|
||||||
}
|
|
||||||
await handleStartWorkFlow(data);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
nextTick(async () => {
|
|
||||||
routeParams.value = proxy.$route.query;
|
|
||||||
reset();
|
|
||||||
loading.value = false;
|
|
||||||
if (routeParams.value.type === 'update' || routeParams.value.type === 'view' || routeParams.value.type === 'approval') {
|
|
||||||
getInfo();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
<style scoped lang="scss">
|
|
||||||
/* 全局样式 */
|
|
||||||
:root {
|
|
||||||
--primary: #409eff;
|
|
||||||
--primary-light: #66b1ff;
|
|
||||||
--primary-dark: #3a8ee6;
|
|
||||||
--success: #67c23a;
|
|
||||||
--warning: #e6a23c;
|
|
||||||
--danger: #f56c6c;
|
|
||||||
--info: #909399;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 表单样式优化 */
|
|
||||||
.el-form-item {
|
|
||||||
.el-form-item__label {
|
|
||||||
color: #606266;
|
|
||||||
font-weight: 500;
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-input__inner,
|
|
||||||
.el-select .el-input__inner {
|
|
||||||
border-radius: 4px;
|
|
||||||
transition:
|
|
||||||
border-color 0.2s,
|
|
||||||
box-shadow 0.2s;
|
|
||||||
|
|
||||||
&:focus {
|
|
||||||
border-color: var(--primary-light);
|
|
||||||
box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-textarea__inner {
|
|
||||||
border-radius: 4px;
|
|
||||||
transition:
|
|
||||||
border-color 0.2s,
|
|
||||||
box-shadow 0.2s;
|
|
||||||
|
|
||||||
&:focus {
|
|
||||||
border-color: var(--primary-light);
|
|
||||||
box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 按钮样式优化 */
|
|
||||||
.el-button {
|
|
||||||
border-radius: 4px;
|
|
||||||
transition: all 0.2s;
|
|
||||||
|
|
||||||
&.is-primary {
|
|
||||||
background-color: var(--primary);
|
|
||||||
border-color: var(--primary);
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
background-color: var(--primary-light);
|
|
||||||
border-color: var(--primary-light);
|
|
||||||
}
|
|
||||||
|
|
||||||
&:active {
|
|
||||||
background-color: var(--primary-dark);
|
|
||||||
border-color: var(--primary-dark);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&.is-text {
|
|
||||||
color: var(--primary);
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
color: var(--primary-light);
|
|
||||||
background-color: rgba(64, 158, 255, 0.05);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 卡片样式优化 */
|
|
||||||
.el-card {
|
|
||||||
transition: all 0.3s ease;
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
/* transform: translateY(-2px); */
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 对话框样式优化 */
|
|
||||||
.el-dialog {
|
|
||||||
.el-dialog__header {
|
|
||||||
background-color: #f5f7fa;
|
|
||||||
border-bottom: 1px solid #ebeef5;
|
|
||||||
padding: 15px 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-dialog__title {
|
|
||||||
font-size: 16px;
|
|
||||||
font-weight: 600;
|
|
||||||
color: #303133;
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-dialog__footer {
|
|
||||||
padding: 15px 20px;
|
|
||||||
border-top: 1px solid #ebeef5;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
Reference in New Issue
Block a user