设计出图修改
This commit is contained in:
@ -95,3 +95,24 @@ export const uploadVolumeFile = (query?: any): AxiosPromise => {
|
|||||||
data: query
|
data: query
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
/**
|
||||||
|
* 获取文件列表
|
||||||
|
* @param query
|
||||||
|
*/
|
||||||
|
export const volumeFileList = (params) => {
|
||||||
|
return request({
|
||||||
|
url: '/design/volumeFile/list',
|
||||||
|
method: 'get',
|
||||||
|
params: params
|
||||||
|
});
|
||||||
|
};
|
||||||
|
/**
|
||||||
|
* 获取文件详情
|
||||||
|
* @param query
|
||||||
|
*/
|
||||||
|
export const getileDetail = (id) => {
|
||||||
|
return request({
|
||||||
|
url: '/design/volumeFile/' + id,
|
||||||
|
method: 'get'
|
||||||
|
});
|
||||||
|
};
|
||||||
|
@ -48,12 +48,7 @@
|
|||||||
tag="ul"
|
tag="ul"
|
||||||
@click.stop
|
@click.stop
|
||||||
>
|
>
|
||||||
<li
|
<li style="margin-top: 10px" v-for="(file, index) in fileList" :key="file.uid" class="el-upload-list__item ele-upload-list__item-content">
|
||||||
style="margin-top: 10px;"
|
|
||||||
v-for="(file, index) in fileList"
|
|
||||||
:key="file.uid"
|
|
||||||
class="el-upload-list__item ele-upload-list__item-content"
|
|
||||||
>
|
|
||||||
<el-link :href="`${file.url}`" :underline="false" target="_blank">
|
<el-link :href="`${file.url}`" :underline="false" target="_blank">
|
||||||
<span class="el-icon-document"> {{ getFileName(file.name) }} </span>
|
<span class="el-icon-document"> {{ getFileName(file.name) }} </span>
|
||||||
</el-link>
|
</el-link>
|
||||||
@ -303,6 +298,7 @@ const uploadedSuccessfully = (res: any) => {
|
|||||||
fileUploadRef.value?.clearFiles();
|
fileUploadRef.value?.clearFiles();
|
||||||
proxy?.$modal.closeLoading();
|
proxy?.$modal.closeLoading();
|
||||||
proxy?.$modal.msgSuccess('导入成功');
|
proxy?.$modal.msgSuccess('导入成功');
|
||||||
|
props.onUploadSuccess?.(fileList.value, res);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<span class="dialog-footer">
|
<span class="dialog-footer">
|
||||||
<el-button :disabled="buttonDisabled" type="primary" @click="handleCompleteTask"> 提交 </el-button>
|
<el-button :disabled="buttonDisabled" type="primary" @click="handleCompleteTask"> 通过 </el-button>
|
||||||
<el-button v-if="task.flowStatus === 'waiting' && buttonObj.trust" :disabled="buttonDisabled" type="primary" @click="openDelegateTask">
|
<el-button v-if="task.flowStatus === 'waiting' && buttonObj.trust" :disabled="buttonDisabled" type="primary" @click="openDelegateTask">
|
||||||
委托
|
委托
|
||||||
</el-button>
|
</el-button>
|
||||||
@ -63,11 +63,11 @@
|
|||||||
type="danger"
|
type="danger"
|
||||||
@click="handleTerminationTask"
|
@click="handleTerminationTask"
|
||||||
>
|
>
|
||||||
终止
|
拒绝
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button v-if="task.flowStatus === 'waiting' && buttonObj.back" :disabled="buttonDisabled" type="danger" @click="handleBackProcessOpen">
|
<!-- <el-button v-if="task.flowStatus === 'waiting' && buttonObj.back" :disabled="buttonDisabled" type="danger" @click="handleBackProcessOpen">
|
||||||
退回
|
退回
|
||||||
</el-button>
|
</el-button> -->
|
||||||
<el-button :disabled="buttonDisabled" @click="cancel">取消</el-button>
|
<el-button :disabled="buttonDisabled" @click="cancel">取消</el-button>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
@ -141,6 +141,15 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
<el-dialog v-model="isShowSubmit" title="设计验证提交" width="800px" draggable :close-on-click-modal="false">
|
||||||
|
<detailForm ref="detailFormTeRef"></detailForm>
|
||||||
|
<template #footer>
|
||||||
|
<div class="dialog-footer" style="float: right; padding-bottom: 20px">
|
||||||
|
<el-button type="primary" @click="handleShowSubmit">确认</el-button>
|
||||||
|
<el-button @click="isShowSubmit = false">取消</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -202,6 +211,8 @@ const nickName = ref({});
|
|||||||
const isDrawing = ref(false); //图纸评审标志
|
const isDrawing = ref(false); //图纸评审标志
|
||||||
const businessId = ref(''); //业务id
|
const businessId = ref(''); //业务id
|
||||||
const isShowTermination = ref(false); //显示终止
|
const isShowTermination = ref(false); //显示终止
|
||||||
|
const isShowSubmit = ref(false); //显示终止
|
||||||
|
|
||||||
//节点编码
|
//节点编码
|
||||||
const nodeCode = ref<string>('');
|
const nodeCode = ref<string>('');
|
||||||
const buttonObj = ref<any>({
|
const buttonObj = ref<any>({
|
||||||
@ -293,6 +304,7 @@ const emits = defineEmits(['submitCallback', 'cancelCallback']);
|
|||||||
const handleCompleteTask = async () => {
|
const handleCompleteTask = async () => {
|
||||||
form.value.taskId = taskId.value;
|
form.value.taskId = taskId.value;
|
||||||
form.value.variables = props.taskVariables;
|
form.value.variables = props.taskVariables;
|
||||||
|
|
||||||
let verify = false;
|
let verify = false;
|
||||||
if (buttonObj.value.pop && nestNodeList.value && nestNodeList.value.length > 0) {
|
if (buttonObj.value.pop && nestNodeList.value && nestNodeList.value.length > 0) {
|
||||||
nestNodeList.value.forEach((e) => {
|
nestNodeList.value.forEach((e) => {
|
||||||
@ -323,6 +335,10 @@ const handleCompleteTask = async () => {
|
|||||||
});
|
});
|
||||||
form.value.flowCopyList = flowCopyList;
|
form.value.flowCopyList = flowCopyList;
|
||||||
}
|
}
|
||||||
|
if (isDrawing.value) {
|
||||||
|
isShowSubmit.value = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
await proxy?.$modal.confirm('是否确认提交?');
|
await proxy?.$modal.confirm('是否确认提交?');
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
buttonDisabled.value = true;
|
buttonDisabled.value = true;
|
||||||
@ -336,7 +352,15 @@ const handleCompleteTask = async () => {
|
|||||||
buttonDisabled.value = false;
|
buttonDisabled.value = false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
const handleShowSubmit = async () => {
|
||||||
|
await completeTask(form.value).finally(() => {
|
||||||
|
// 提交设计验证
|
||||||
|
detailFormTeRef.value.submit(businessId.value);
|
||||||
|
});
|
||||||
|
dialog.visible = false;
|
||||||
|
emits('submitCallback');
|
||||||
|
proxy?.$modal.msgSuccess('操作成功');
|
||||||
|
};
|
||||||
/** 驳回弹窗打开 */
|
/** 驳回弹窗打开 */
|
||||||
const handleBackProcessOpen = async () => {
|
const handleBackProcessOpen = async () => {
|
||||||
backForm.value = {};
|
backForm.value = {};
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="p-6 bg-gray-50">
|
<div class="p-6 bg-gray-50">
|
||||||
<div class="appWidth mx-auto bg-white rounded-xl shadow-sm overflow-hidden transition-all duration-300 hover:shadow-md">
|
<div class="appointment mx-auto bg-white rounded-xl shadow-sm overflow-hidden transition-all duration-300 hover:shadow-md">
|
||||||
<!-- 表单标题区域 -->
|
<!-- 表单标题区域 -->
|
||||||
<div class="bg-gradient-to-r from-blue-500 to-blue-600 text-white p-6">
|
<div class="bg-gradient-to-r from-blue-500 to-blue-600 text-white p-6">
|
||||||
<h2 class="text-2xl font-bold flex items-center"><i class="el-icon-user-circle mr-3"></i>人员配置</h2>
|
<h2 class="text-2xl font-bold flex items-center"><i class="el-icon-user-circle mr-3"></i>人员配置</h2>
|
||||||
@ -640,7 +640,7 @@ onMounted(() => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.appWidth {
|
.appointment {
|
||||||
width: 70vw;
|
width: 70vw;
|
||||||
max-width: 1600px;
|
max-width: 1600px;
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="p-6 bg-gray-50">
|
<div class="p-6 bg-gray-50">
|
||||||
<div class="appWidth mx-auto bg-white rounded-xl shadow-sm overflow-hidden transition-all duration-300 hover:shadow-md">
|
<div class="received mx-auto bg-white rounded-xl shadow-sm overflow-hidden transition-all duration-300 hover:shadow-md">
|
||||||
<!-- 表单标题区域 -->
|
<!-- 表单标题区域 -->
|
||||||
<div class="bg-gradient-to-r from-blue-500 to-blue-600 text-white p-6">
|
<div class="bg-gradient-to-r from-blue-500 to-blue-600 text-white p-6">
|
||||||
<h2 class="text-2xl font-bold flex items-center"><i class="el-icon-user-circle mr-3"></i>收集资料清单</h2>
|
<h2 class="text-2xl font-bold flex items-center"><i class="el-icon-user-circle mr-3"></i>收集资料清单</h2>
|
||||||
@ -347,7 +347,7 @@ onUnmounted(() => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.appWidth {
|
.received {
|
||||||
width: 90%;
|
width: 90%;
|
||||||
max-width: 1000px;
|
max-width: 1000px;
|
||||||
}
|
}
|
||||||
@ -378,7 +378,7 @@ onUnmounted(() => {
|
|||||||
|
|
||||||
// 响应式调整
|
// 响应式调整
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
.appWidth {
|
.received {
|
||||||
width: 95%;
|
width: 95%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
339
src/views/design/volumeCatalog/blueprintEdit.vue
Normal file
339
src/views/design/volumeCatalog/blueprintEdit.vue
Normal file
@ -0,0 +1,339 @@
|
|||||||
|
<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.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">
|
||||||
|
<div class="grid grid-cols-1 gap-4">
|
||||||
|
<el-form
|
||||||
|
ref="leaveFormRef"
|
||||||
|
:disabled="routeParams.type === 'view' || form.auditStatus == 'waiting'"
|
||||||
|
:model="form"
|
||||||
|
:rules="rules"
|
||||||
|
label-width="100px"
|
||||||
|
class="space-y-4"
|
||||||
|
>
|
||||||
|
<el-form-item label="图纸文件" prop="fileId" class="mb-2 md:col-span-2">
|
||||||
|
<el-input v-model="form.fileName" disabled placeholder="图纸名称" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
</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 { getileDetail } from '@/api/design/volumeCatalog';
|
||||||
|
// 获取用户 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 + '_bpDesignFile',
|
||||||
|
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,
|
||||||
|
fileVoList: []
|
||||||
|
};
|
||||||
|
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 getileDetail(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.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>
|
@ -14,23 +14,20 @@
|
|||||||
</el-link>
|
</el-link>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<!-- 版本号列 -->
|
<!-- 版本号列 -->
|
||||||
<el-table-column prop="size" label="版本号" align="center" width="120">
|
<el-table-column prop="size" label="版本号" align="center" width="100">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{ scope.row.version }}</span>
|
<span>{{ scope.row.version }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<!-- 审核状态列 -->
|
<!-- 审核状态列 -->
|
||||||
<el-table-column label="审核状态" align="center" prop="auditStatus">
|
<el-table-column label="审核状态" align="center" prop="auditStatus" width="100">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<dict-tag :options="wfBusinessStatus" :value="scope.row.status" />
|
<dict-tag :options="wfBusinessStatus" :value="scope.row.auditStatus" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<!-- 操作列 - 通过slot接收不同标签页的操作按钮 -->
|
<!-- 操作列 - 通过slot接收不同标签页的操作按钮 -->
|
||||||
<el-table-column label="操作" width="170" align="center">
|
<el-table-column label="操作" width="240" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<slot name="operation" :row="scope.row"></slot>
|
<slot name="operation" :row="scope.row"></slot>
|
||||||
</template>
|
</template>
|
||||||
|
@ -58,9 +58,9 @@
|
|||||||
<el-table-column label="卷册号" align="center" prop="volumeNumber" />
|
<el-table-column label="卷册号" align="center" prop="volumeNumber" />
|
||||||
<el-table-column label="资料名称" align="center" prop="documentName" />
|
<el-table-column label="资料名称" align="center" prop="documentName" />
|
||||||
<el-table-column label="计划出图时间" align="center" prop="plannedCompletion" width="200" />
|
<el-table-column label="计划出图时间" align="center" prop="plannedCompletion" width="200" />
|
||||||
<el-table-column label="审核状态" align="center" prop="auditStatus">
|
<el-table-column label="图纸文件" align="center" prop="remark" width="150">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<dict-tag :options="wf_business_status" :value="scope.row.auditStatus" />
|
<el-button link type="primary" icon="View" @click="handleView(scope.row)" v-hasPermi="['design:volumeFile:query']">查看文件</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="上传说明" align="center" prop="explainText">
|
<el-table-column label="上传说明" align="center" prop="explainText">
|
||||||
@ -69,11 +69,6 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="备注" align="center" prop="remark" />
|
<el-table-column label="备注" align="center" prop="remark" />
|
||||||
<el-table-column label="图纸文件" align="center" prop="remark" width="150">
|
|
||||||
<template #default="scope">
|
|
||||||
<el-button link type="primary" icon="View" @click="handleView(scope.row)" v-hasPermi="['design:volumeFile:query']">查看文件</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="操作" align="center" fixed="right" width="200">
|
<el-table-column label="操作" align="center" fixed="right" width="200">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button
|
<el-button
|
||||||
@ -94,25 +89,6 @@
|
|||||||
v-hasPermi="['design:volumeFile:add']"
|
v-hasPermi="['design:volumeFile:add']"
|
||||||
>上传图纸</el-button
|
>上传图纸</el-button
|
||||||
>
|
>
|
||||||
<!-- <el-button
|
|
||||||
link
|
|
||||||
type="primary"
|
|
||||||
icon="edit"
|
|
||||||
@click="handleAudit(scope.row)"
|
|
||||||
v-if="scope.row.auditStatus == 'draft' || scope.row.auditStatus == 'back'"
|
|
||||||
>审核</el-button
|
|
||||||
>
|
|
||||||
<el-button link type="primary" icon="View" v-if="scope.row.auditStatus != 'draft'" @click="handleAuditView(scope.row)"
|
|
||||||
>查看流程</el-button
|
|
||||||
>
|
|
||||||
<el-button
|
|
||||||
type="warning"
|
|
||||||
link
|
|
||||||
icon="View"
|
|
||||||
v-if="scope.row.auditType == 'back' || scope.row.auditStatus == 'termination'"
|
|
||||||
@click="handleViewHistory(scope.row)"
|
|
||||||
>查看单据</el-button
|
|
||||||
> -->
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@ -161,7 +137,7 @@
|
|||||||
</el-dialog>
|
</el-dialog>
|
||||||
<el-dialog draggable title="上传图纸文件" v-model="uploadVisible" width="500px" append-to-body>
|
<el-dialog draggable title="上传图纸文件" v-model="uploadVisible" width="500px" append-to-body>
|
||||||
<el-form :model="uploadForm" label-width="80px" :inline="false">
|
<el-form :model="uploadForm" label-width="80px" :inline="false">
|
||||||
<el-form-item label="蓝图" prop="type">
|
<el-form-item label="图纸类型" prop="type">
|
||||||
<el-select v-model="uploadForm.type" placeholder="请选择图纸类型"
|
<el-select v-model="uploadForm.type" placeholder="请选择图纸类型"
|
||||||
><el-option label="过程图纸" value="1" /><el-option label="蓝图" value="3"
|
><el-option label="过程图纸" value="1" /><el-option label="蓝图" value="3"
|
||||||
/></el-select>
|
/></el-select>
|
||||||
@ -182,36 +158,52 @@
|
|||||||
<!-- 查看文件列表 -->
|
<!-- 查看文件列表 -->
|
||||||
<el-dialog draggable title="图纸列表" v-model="viewVisible" width="45%">
|
<el-dialog draggable title="图纸列表" v-model="viewVisible" width="45%">
|
||||||
<el-tabs type="border-card" v-model="activeName" class="demo-tabs" @tab-click="handleClick">
|
<el-tabs type="border-card" v-model="activeName" class="demo-tabs" @tab-click="handleClick">
|
||||||
<el-tab-pane label="蓝图" name="first"
|
<el-tab-pane label="蓝图" name="3"
|
||||||
><TableContent :data="fileList" :wf-business-status="wf_business_status">
|
><TableContent :data="fileList" :wf-business-status="wf_business_status">
|
||||||
<template #operation="{ row }">
|
<template #operation="{ row }">
|
||||||
<el-button link type="primary" icon="edit" @click="handleAudit(row)" v-if="row.status == 'draft' || row.status == 'back'"
|
<el-button link type="primary" icon="edit" @click="handleAuditLantu(row)" v-if="row.auditStatus == 'draft' || row.auditStatus == 'back'"
|
||||||
|
>审核</el-button
|
||||||
|
>
|
||||||
|
<el-button link type="primary" icon="View" v-if="row.auditStatus != 'draft'" @click="handleAuditViewLantu(row)">查看流程</el-button>
|
||||||
|
<el-button type="danger" link icon="Download" @click="handleDownload(row)"> 下载 </el-button>
|
||||||
|
<el-button
|
||||||
|
type="warning"
|
||||||
|
link
|
||||||
|
icon="View"
|
||||||
|
v-if="row.auditStatus == 'back' || row.auditStatus == 'termination' || row.auditStatus == 'finish'"
|
||||||
|
@click="handleViewHistory(row)"
|
||||||
|
>查看单据</el-button
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</TableContent></el-tab-pane
|
||||||
|
>
|
||||||
|
<el-tab-pane label="过程图纸 " name="1"
|
||||||
|
><TableContent :data="fileList" :wf-business-status="wf_business_status">
|
||||||
|
<template #operation="{ row }">
|
||||||
|
<el-button link type="primary" icon="edit" @click="handleAudit(row)" v-if="row.auditStatus == 'draft' || row.auditStatus == 'back'"
|
||||||
>审核</el-button
|
>审核</el-button
|
||||||
>
|
>
|
||||||
<el-button link type="primary" icon="View" v-if="row.status != 'draft'" @click="handleAuditView(row)">查看流程</el-button>
|
<el-button link type="primary" icon="View" v-if="row.status != 'draft'" @click="handleAuditView(row)">查看流程</el-button>
|
||||||
<el-button type="danger" link icon="Download" @click="handleDownload(row)"> 下载 </el-button>
|
<el-button type="danger" link icon="Download" @click="handleDownload(row)"> 下载 </el-button>
|
||||||
|
<el-button
|
||||||
|
type="warning"
|
||||||
|
link
|
||||||
|
icon="View"
|
||||||
|
v-if="row.auditStatus == 'back' || row.auditStatus == 'termination' || row.auditStatus == 'finish'"
|
||||||
|
@click="handleViewHistory(row)"
|
||||||
|
>查看单据</el-button
|
||||||
|
>
|
||||||
</template>
|
</template>
|
||||||
</TableContent></el-tab-pane
|
</TableContent></el-tab-pane
|
||||||
>
|
>
|
||||||
<el-tab-pane label="过程图纸 " name="second"
|
<el-tab-pane label="变更" name="2"
|
||||||
><TableContent :data="fileList" :wf-business-status="wf_business_status">
|
|
||||||
<template #operation="{ row }">
|
|
||||||
<el-button link type="primary" icon="edit" @click="handleAudit(row)" v-if="row.status == 'draft' || row.status == 'back'"
|
|
||||||
>审核</el-button
|
|
||||||
>
|
|
||||||
<el-button link type="primary" icon="View" v-if="row.status != 'draft'" @click="handleAuditView(row)">查看流程</el-button>
|
|
||||||
<el-button type="danger" link icon="Download" @click="handleDownload(row)"> 下载 </el-button>
|
|
||||||
</template>
|
|
||||||
</TableContent></el-tab-pane
|
|
||||||
>
|
|
||||||
<el-tab-pane label="变更" name="third"
|
|
||||||
><TableContent :data="fileList" :wf-business-status="wf_business_status">
|
><TableContent :data="fileList" :wf-business-status="wf_business_status">
|
||||||
<template #operation="{ row }">
|
<template #operation="{ row }">
|
||||||
<el-button type="danger" link icon="Download" @click="handleDownload(row)"> 下载 </el-button>
|
<el-button type="danger" link icon="Download" @click="handleDownload(row)"> 下载 </el-button>
|
||||||
</template>
|
</template>
|
||||||
</TableContent></el-tab-pane
|
</TableContent></el-tab-pane
|
||||||
>
|
>
|
||||||
<el-tab-pane label="作废 " name="fourth"
|
<el-tab-pane label="作废 " name="4"
|
||||||
><TableContent :data="fileList" :wf-business-status="wf_business_status">
|
><TableContent :data="fileList" :wf-business-status="wf_business_status">
|
||||||
<template #operation="{ row }">
|
<template #operation="{ row }">
|
||||||
<el-button type="danger" link icon="Download" @click="handleDownload(row)"> 下载1 </el-button>
|
<el-button type="danger" link icon="Download" @click="handleDownload(row)"> 下载1 </el-button>
|
||||||
@ -240,7 +232,7 @@ import {
|
|||||||
updateVolumeCatalog,
|
updateVolumeCatalog,
|
||||||
uploadVolumeFile,
|
uploadVolumeFile,
|
||||||
getVolumeCatafileList,
|
getVolumeCatafileList,
|
||||||
lookViewerFile
|
volumeFileList
|
||||||
} from '@/api/design/volumeCatalog';
|
} from '@/api/design/volumeCatalog';
|
||||||
import { VolumeCatalogVO } from '@/api/design/volumeCatalog/types';
|
import { VolumeCatalogVO } from '@/api/design/volumeCatalog/types';
|
||||||
import { useUserStoreHook } from '@/store/modules/user';
|
import { useUserStoreHook } from '@/store/modules/user';
|
||||||
@ -260,7 +252,8 @@ const histroyRef = ref<InstanceType<typeof histroy>>();
|
|||||||
const TableContentRef = ref<InstanceType<typeof TableContentRef>>();
|
const TableContentRef = ref<InstanceType<typeof TableContentRef>>();
|
||||||
const single = ref(true);
|
const single = ref(true);
|
||||||
const multiple = ref(true);
|
const multiple = ref(true);
|
||||||
const activeName = ref('first');
|
const activeName = ref('3');
|
||||||
|
const design = ref('');
|
||||||
const total = ref(0);
|
const total = ref(0);
|
||||||
const dialogHistory = ref(false);
|
const dialogHistory = ref(false);
|
||||||
// 获取用户 store
|
// 获取用户 store
|
||||||
@ -371,7 +364,7 @@ const handleViewHistory = async (row) => {
|
|||||||
dialogHistory.value = true;
|
dialogHistory.value = true;
|
||||||
// 查看历史流程记录
|
// 查看历史流程记录
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
histroyRef.value?.getList(row.design);
|
histroyRef.value?.getList(row.id);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
const handleShowInfo = (val) => {
|
const handleShowInfo = (val) => {
|
||||||
@ -421,7 +414,8 @@ const handleAdd = () => {
|
|||||||
|
|
||||||
const handleView = (row?: any) => {
|
const handleView = (row?: any) => {
|
||||||
fileList.value = row.fileVoList;
|
fileList.value = row.fileVoList;
|
||||||
|
design.value = row.design;
|
||||||
|
getVolumeFileList('3');
|
||||||
viewVisible.value = true;
|
viewVisible.value = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -511,12 +505,33 @@ const handleUploadSuccess = async (flieList: any, res: any) => {
|
|||||||
proxy?.$modal.msgSuccess('文件上传成功');
|
proxy?.$modal.msgSuccess('文件上传成功');
|
||||||
getList();
|
getList();
|
||||||
};
|
};
|
||||||
|
/** 审核蓝图按钮操作 */
|
||||||
/** 审核按钮操作 */
|
const handleAuditLantu = async (row) => {
|
||||||
|
proxy.$tab.closePage(proxy.$route);
|
||||||
|
proxy.$router.push({
|
||||||
|
path: `/approval/volumeCatalog/blueprintEdit`,
|
||||||
|
query: {
|
||||||
|
id: row.id,
|
||||||
|
type: 'update'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
/** 查看蓝图按钮操作 */
|
||||||
|
const handleAuditViewLantu = async (row) => {
|
||||||
|
proxy.$tab.closePage(proxy.$route);
|
||||||
|
proxy.$router.push({
|
||||||
|
path: `/approval/volumeCatalog/blueprintEdit`,
|
||||||
|
query: {
|
||||||
|
id: row.id,
|
||||||
|
type: 'view'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
/** 审核过程按钮操作 */
|
||||||
const handleAudit = async (row) => {
|
const handleAudit = async (row) => {
|
||||||
proxy.$tab.closePage(proxy.$route);
|
proxy.$tab.closePage(proxy.$route);
|
||||||
proxy.$router.push({
|
proxy.$router.push({
|
||||||
path: `/approval/drawingreview/indexEdit`,
|
path: `/approval/volumeCatalog/indexEdit`,
|
||||||
query: {
|
query: {
|
||||||
id: row.id,
|
id: row.id,
|
||||||
type: 'update'
|
type: 'update'
|
||||||
@ -527,7 +542,7 @@ const handleAudit = async (row) => {
|
|||||||
const handleAuditView = async (row) => {
|
const handleAuditView = async (row) => {
|
||||||
proxy.$tab.closePage(proxy.$route);
|
proxy.$tab.closePage(proxy.$route);
|
||||||
proxy.$router.push({
|
proxy.$router.push({
|
||||||
path: `/approval/drawingreview/indexEdit`,
|
path: `/approval/volumeCatalog/indexEdit`,
|
||||||
query: {
|
query: {
|
||||||
id: row.id,
|
id: row.id,
|
||||||
type: 'view'
|
type: 'view'
|
||||||
@ -543,9 +558,17 @@ const handleUpdate = async (row?: VolumeCatalogVO) => {
|
|||||||
dialog.visible = true;
|
dialog.visible = true;
|
||||||
dialog.title = '修改设计出图计划';
|
dialog.title = '修改设计出图计划';
|
||||||
};
|
};
|
||||||
// 过程图纸
|
// 获取文件列表
|
||||||
const handleClick = () => {
|
const getVolumeFileList = async (type) => {
|
||||||
//
|
let res = await volumeFileList({ volumeCatalogId: design.value, type });
|
||||||
|
fileList.value = [];
|
||||||
|
if (res.code === 200) {
|
||||||
|
fileList.value = res.rows;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
// 切换
|
||||||
|
const handleClick = (val) => {
|
||||||
|
getVolumeFileList(val.props.name);
|
||||||
};
|
};
|
||||||
const handleAuditInfo = (row) => {
|
const handleAuditInfo = (row) => {
|
||||||
// 审核图纸
|
// 审核图纸
|
||||||
|
339
src/views/design/volumeCatalog/indexEdit.vue
Normal file
339
src/views/design/volumeCatalog/indexEdit.vue
Normal file
@ -0,0 +1,339 @@
|
|||||||
|
<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.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">
|
||||||
|
<div class="grid grid-cols-1 gap-4">
|
||||||
|
<el-form
|
||||||
|
ref="leaveFormRef"
|
||||||
|
:disabled="routeParams.type === 'view' || form.auditStatus == 'waiting'"
|
||||||
|
:model="form"
|
||||||
|
:rules="rules"
|
||||||
|
label-width="100px"
|
||||||
|
class="space-y-4"
|
||||||
|
>
|
||||||
|
<el-form-item label="图纸文件" prop="fileId" class="mb-2 md:col-span-2">
|
||||||
|
<el-input v-model="form.fileName" disabled placeholder="图纸名称" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
</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 { getileDetail } from '@/api/design/volumeCatalog';
|
||||||
|
// 获取用户 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 + '_procDesignFile',
|
||||||
|
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,
|
||||||
|
fileVoList: []
|
||||||
|
};
|
||||||
|
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 getileDetail(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.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>
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="p-6 bg-gray-50 main">
|
<div class="p-6 bg-gray-50 main">
|
||||||
<div class="appWidth mx-auto mt-38 bg-white rounded-xl shadow-sm overflow-hidden transition-all duration-300 hover:shadow-md">
|
<div class="appWidth1 mx-auto mt-38 bg-white rounded-xl shadow-sm overflow-hidden transition-all duration-300 hover:shadow-md">
|
||||||
<!-- 表单标题区域 -->
|
<!-- 表单标题区域 -->
|
||||||
<div class="bg-gradient-to-r from-blue-500 to-blue-600 text-white p-6">
|
<div class="bg-gradient-to-r from-blue-500 to-blue-600 text-white p-6">
|
||||||
<h2 class="text-2xl font-bold flex items-center"><i class="el-icon-user-circle mr-3"></i>人员配置</h2>
|
<h2 class="text-2xl font-bold flex items-center"><i class="el-icon-user-circle mr-3"></i>人员配置</h2>
|
||||||
@ -196,7 +196,7 @@ onUnmounted(() => {
|
|||||||
.main {
|
.main {
|
||||||
height: calc(100vh - 90px);
|
height: calc(100vh - 90px);
|
||||||
}
|
}
|
||||||
.appWidth {
|
.appWidth1 {
|
||||||
width: 50vw;
|
width: 50vw;
|
||||||
max-width: 1200px;
|
max-width: 1200px;
|
||||||
.el-select__wrapper {
|
.el-select__wrapper {
|
||||||
@ -315,7 +315,7 @@ onUnmounted(() => {
|
|||||||
|
|
||||||
// 适配小屏幕
|
// 适配小屏幕
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
.appWidth {
|
.appWidth1 {
|
||||||
width: 95vw;
|
width: 95vw;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user