提交修改

This commit is contained in:
大黑 2026-01-19 11:30:41 +08:00
parent 9190eabe59
commit 3d7ee782b1
40 changed files with 296588 additions and 1628 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,146 @@
{
"entry": "index.js",
"copyAssets": ["public/custom/apaas-custom-mydemo"],
"router": {
"apaas-custom-modalContorl":{
"name": "apaas-custom-modalContorl",
"path": "apaas-custom-modalContorl",
"meta": {
"title": "模板管理"
}
},
"apaas-custom-selfEnginedata":{
"name": "apaas-custom-selfEnginedata",
"path": "apaas-custom-selfEnginedata",
"meta": {
"title": "玉柴发动机数据"
}
},
"apaas-custom-otherEnginedata":{
"name": "apaas-custom-otherEnginedata",
"path": "apaas-custom-otherEnginedata",
"meta": {
"title": "竞品发动机数据"
}
},
"apaas-custom-checkData":{
"name": "apaas-custom-checkData",
"path": "apaas-custom-checkData",
"meta": {
"title": "数据检查"
}
},
"apaas-custom-report":{
"name": "apaas-custom-report",
"path": "apaas-custom-report",
"meta": {
"title": "对标报告"
}
},
"apaas-custom-reportList":{
"name": "apaas-custom-reportList",
"path": "apaas-custom-reportList",
"meta": {
"title": "报告列表"
}
},
"apaas-custom-reportDetail":{
"name": "apaas-custom-reportDetail",
"path": "apaas-custom-reportDetail",
"meta": {
"title": "报告详情"
}
},
"apaas-custom-reportCheck":{
"name": "apaas-custom-reportCheck",
"path": "apaas-custom-reportCheck",
"meta": {
"title": "报告检查"
}
},
"apaas-custom-modelDetail":{
"name": "apaas-custom-modelDetail",
"path": "apaas-custom-modelDetail",
"meta": {
"title": "系统参数管理"
}
},
"apaas-custom-engineDetail":{
"name": "apaas-custom-engineDetail",
"path": "apaas-custom-engineDetail",
"meta": {
"title": "发动机参数详情"
}
},
"apaas-custom-approvalManagement":{
"name": "apaas-custom-approvalManagement",
"path": "apaas-custom-approvalManagement",
"meta": {
"title": "模板审批管理"
}
},
"apaas-custom-toDoList":{
"name": "apaas-custom-toDoList",
"path": "apaas-custom-toDoList",
"meta": {
"title": "数据待办"
}
},
"apaas-custom-myDone":{
"name": "apaas-custom-myDone",
"path": "apaas-custom-myDone",
"meta": {
"title": "我的已办"
}
},
"apaas-custom-mySend":{
"name": "apaas-custom-mySend",
"path": "apaas-custom-mySend",
"meta": {
"title": "我发起的"
}
},
"apaas-custom-selfEngineCheck":{
"name": "apaas-custom-selfEngineCheck",
"path": "apaas-custom-selfEngineCheck",
"meta": {
"title": "玉柴发动机审核"
}
},
"apaas-custom-otherEngineCheck":{
"name": "apaas-custom-otherEngineCheck",
"path": "apaas-custom-otherEngineCheck",
"meta": {
"title": "竞品发动机审核"
}
},
"apaas-custom-managerData":{
"name": "apaas-custom-managerData",
"path": "apaas-custom-managerData",
"meta": {
"title": "责任人管理"
}
},
"apaas-custom-fillerData":{
"name": "apaas-custom-fillerData",
"path": "apaas-custom-fillerData",
"meta": {
"title": "填写人管理"
}
},
"apaas-custom-permissionManagement":{
"name": "apaas-custom-permissionManagement",
"path": "apaas-custom-permissionManagement",
"meta": {
"title": "权限管理"
}
}
},
"customWidgetList": [
{
"code": "mydemo",
"text": "mydemo"
}
],
"outputName": "apaas-custom-mydemo"
}

View File

@ -0,0 +1,10 @@
<meta charset="utf-8">
<title>apaas-custom-mydemo demo</title>
<script src="./apaas-custom-mydemo.umd.js"></script>
<link rel="stylesheet" href="./apaas-custom-mydemo.css">
<script>
console.log(apaas-custom-mydemo)
</script>

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

52
src/api/demo/activiti.js Normal file
View File

@ -0,0 +1,52 @@
export default {
ENGINE_CHECK_LIST: {
url: '/custom/activiti/showEngReview',
method: 'post'
},
START_ENGINE_CHECK: {
url: '/custom/activiti/startActiviti',
method: 'post'
},
HANDLE_ENGINE_CHECK: {
url: '/custom/activiti/handleApproval',
method: 'post'
},
//撤回
RETURN_ENGINE_CHECK: {
url: '/custom/activiti/returnApproval',
method: 'get'
},
GET_ENGINE_CHECK_DETAIL: {
url: '/custom/activiti/showActiviti',
method: 'post'
},
CHANGE_ENGINE_DATA: {
url: '/custom/activiti/initiateApproval',
method: 'get'
},
// 审批相关接口
CHECK_DATA_CAN_RETURN: {
url: '/custom/activiti/getIsDirect',
method: 'get'
},
GET_DATA_APPROVAL_USERS: {
url: '/custom/activiti/getApprovalUsers',
method: 'get'
},
RESEND_DATA_APPROVAL: {
url: '/custom/activiti/directSendingApproval',
method: 'get'
},
GET_CAN_RETURN_DATA_NODE: {
url: '/custom/activiti/getReturnNodes',
method: 'get'
},
CAN_RETURN_DATA_NODE: {
url: '/custom/activiti/handleReturnToNode',
method: 'post'
},
RESTART_DATA_APPROVAL: {
url: '/custom/activiti/handleReturn',
method: 'post'
}
}

47
src/api/demo/data.js Normal file
View File

@ -0,0 +1,47 @@
export default {
GET_USER_SELF_ROLE: {
url: '/custom/permission/selectPersByUser',
method: 'get'
},
EDIT_PERMISSION_DATA_ROLE: {
url: '/custom/permission/updateRole?userID=',
method: 'post'
},
//获取引擎列表
GET_ENGINE_LIST_SELF: {
url: '/custom/dataEntryEngineModel/selectByPage',
method: 'post'
},
DOWNLOAD_ENGINE_DEMO: {
url: '/custom/dataEntryEngineModel/excelExport',
method: 'get'
},
//添加引擎
ADD_ENGINE_MODEL: {
url: '/custom/dataEntryEngineModel/insert',
method: 'post'
},
//导入引擎
IMPORT_ENGINE_MODEL: {
url: '/custom/dataEntryEngineModel/import',
method: 'post'
},
//获取参数列表
GET_PARAM_LIST: {
url: '/custom/engineParamDetailPojo/selectParamList',
method: 'get'
},
IMPORT_ENGINE_MODEL_PARAM: {
url: '/custom/dataEntryEngineModel/excelImport',
method: 'post'
},
//获取引擎详情
GET_ENGINE_DETAIL: {
url: '/custom/engineParamDetailPojo/selectValueByMoreParam',
method: 'post'
},
GET_ENGINE_TABLE_DETAIL: {
url: '/custom/engineParamDetailPojo/selectParamListAndModel',
method: 'get'
}
}

View File

@ -8,7 +8,7 @@ export default {
url: '/xdap-app/process/submit',
method: 'post'
},
DOWNLOAD_FILE: {
url: '/xdap-app/attachments/downloadFile',
method: 'get'
@ -18,109 +18,13 @@ export default {
url: '/custom/support/demo/getPerson',
method: 'get'
},
//添加模板
ADD_MODEL: {
url: '/custom/template/insertTemplate',
method: 'post'
},
//模板管理列表
GET_MODEL_LIST: {
url: '/custom/template/getTemplateByCondition',
method: 'get'
},
//导入模板
IMPORT_MODEL: {
url: '/custom/template/import',
method: 'post'
},
//修改模板
EDIT_MODEL: {
url: '/custom/template/updateTemplate',
method: 'post'
},
//查看版本
CHECK_MODEL_VERISON: {
url: '/custom/template/getTemplateVersion',
method: 'get'
},
//下载
DOWNLODE_MODEL: {
url: '/custom/template/export',
method: 'get'
},
DOWNLODE_ALL_MODEL: {
url: '/custom/template/exportMultiple',
method: 'get'
},
//获取部门
GET_DEPARTMENT: {
url: '/custom/template/getDept',
method: 'get'
},
//查询详情
GET_MODEL_DETAIL: {
url: '/custom/parameter/getParameterByCondition',
method: 'get'
},
//测试文件上传
//测试文件上传
TEST_FILE_UPLOAD: {
url: '/custom/benchmark/uploadFile',
method: 'post'
},
//添加参数
ADD_MODEL_PARAM: {
url: '/custom/parameter/insertParameter',
method: 'post'
},
//维护参数
EDIT_MODEL_PARAM: {
url: '/custom/parameter/maintenanceParameters',
method: 'post'
},
DELETE_MODEL_PARAM: {
url: '/custom/parameter/deleteParameter',
method: 'get'
},
START_APPROVAL: {
url: '/custom/approval/startApproval',
method: 'post'
},
GET_APPROVAL_LIST: {
url: '/custom/approval/getApprovalList',
method: 'get'
},
HANDLE_APPROVAL: {
url: '/custom/approval/handleApproval',
method: 'post'
},
//获取审批详情
// GET_APPROVAL_DETAIL: {
// url: '/custom/approval/getApprovalDetail',
// method: 'get'
// },
//获取所有人
GET_ALLUSERS: {
url: '/custom/approval/getUsersByCondition',
method: 'get'
},
//获取审批变更
GET_APPROVAL_CHANGE: {
url: '/custom/approval/getTemplateChanges',
method: 'get'
}, //获取审批所有
GET_PPROVAL_ALL: {
url: '/custom/approval/getApprovalProcess',
method: 'get'
},
GET_SUB_DEPT: {
url: '/custom/responsible/getSubDepartmentById',
method: 'get'
},
//处理模板审批撤回
RETURN_APPROVAL: {
url: '/custom/approval/handleReturn',
method: 'post'
},
//获取用户列表
SELECT_USER_BY_DEPT: {
url: '/custom/responsible/getUserByDepartmentId',
@ -172,77 +76,16 @@ export default {
url: '/custom/responsible/getDeptFilled',
method: 'get'
},
GET_REPORT_LIST: {
url: '/custom/benchmark/getReportAndTodoByCondition',
method: 'post'
},
GET_REPORT_LIST_BY_CONDITION: {
url: '/custom/benchmark/getApprovalList',
method: 'post'
},
ADD_REPORT: {
url: '/custom/benchmark/startReportApproval',
method: 'post'
},
SAVE_REPORT: {
url: '/custom/benchmark/insertReport',
method: 'post'
},
EDIT_REPORT: {
url: '/custom/benchmark/updateReport',
method: 'post'
},
RESTART_REPORT_APPROVAL: {
url: '/custom/benchmark/restartReportApproval',
method: 'post'
},
START_REPORT_APPROVAL: {
url: '/custom/benchmark/handleReportApproval',
method: 'post'
},
GET_REPORT_DETAIL: {
url: '/custom/benchmark/getReportDetail',
DEL_MODEL: {
url: '/custom/template/deleteTemplate',
method: 'get'
},
GET_REPORT_DETAIL_PROCESS: {
url: '/custom/benchmark/getReportProcess',
method: 'get'
},
DOWNLOAD_REPORT: {
url: '/custom/benchmark/downloadReport',
method: 'get'
},
//权限管理相关接口
//获取权限管理列表
GET_PERMISSION_DATA: {
url: '/custom/permission/getUserRoleAndPermission',
method: 'get'
},
//保存权限管理
SAVE_PERMISSION_DATA: {
url: '/custom/permission/insertRole',
method: 'post'
},
//修改权限管理
EDIT_PERMISSION_DATA: {
url: '/custom/permission/updatePermission',
method: 'post'
},
//删除权限管理
DELETE_PERMISSION_DATA: {
url: '/custom/permission/deletePermission',
method: 'get'
},
//获取所有权限表
GET_ALL_PERMISSION_LIST: {
url: '/custom/permission/getAllPermission',
method: 'get'
},
DELETE_PERMISSION_DATA: {
url: '/custom/permission/deleteRole',
DEL_ENGINE_MODEL: {
url: '/custom/dataEntryEngineModel/delete',
method: 'get'
},
GET_ALL_DATA_SYSTEAM_LIST: {
url: '/custom/common/getSystemAndPara',
method: 'get'
@ -250,7 +93,7 @@ export default {
GET_ALL_SYSTEM_ROLE_LIST: {
url: '/custom/responsible/getAllSubsystem',
method: 'get'
},
},
GET_USER_COMMONLY_USED: {
url: '/custom/common/getModelCommon',
method: 'get'
@ -263,52 +106,6 @@ export default {
url: '/custom/common/insertModelCommon',
method: 'post'
},
//亚松
GET_USER_SELF_ROLE: {
url: '/custom/permission/selectPersByUser',
method: 'get'
},
EDIT_PERMISSION_DATA_ROLE: {
url: '/custom/permission/updateRole?userID=',
method: 'post'
},
//获取引擎列表
GET_ENGINE_LIST_SELF: {
url: '/custom/dataEntryEngineModel/selectByPage',
method: 'post'
},
DOWNLOAD_ENGINE_DEMO: {
url: '/custom/dataEntryEngineModel/excelExport',
method: 'get'
},
//添加引擎
ADD_ENGINE_MODEL: {
url: '/custom/dataEntryEngineModel/insert',
method: 'post'
},
//导入引擎
IMPORT_ENGINE_MODEL: {
url: '/custom/dataEntryEngineModel/import',
method: 'post'
},
//获取参数列表
GET_PARAM_LIST: {
url: '/custom/engineParamDetailPojo/selectParamList',
method: 'get'
},
IMPORT_ENGINE_MODEL_PARAM: {
url: '/custom/dataEntryEngineModel/excelImport',
method: 'post'
},
//获取引擎详情
GET_ENGINE_DETAIL: {
url: '/custom/engineParamDetailPojo/selectValueByMoreParam',
method: 'post'
},
GET_ENGINE_TABLE_DETAIL: {
url: '/custom/engineParamDetailPojo/selectParamListAndModel',
method: 'get'
},
//填写人退回
HANDLE_FILLER_BACK: {
url: '/custom/todoTaskPojo/todoReturn',
@ -353,71 +150,12 @@ export default {
url: '/custom/todoTaskPojo/createResPerson?userID=',
method: 'post'
},
ENGINE_CHECK_LIST: {
url: '/custom/activiti/showEngReview',
method: 'post'
},
START_ENGINE_CHECK: {
url: '/custom/activiti/startActiviti',
method: 'post'
},
HANDLE_ENGINE_CHECK: {
url: '/custom/activiti/handleApproval',
method: 'post'
},
//撤回
RETURN_ENGINE_CHECK: {
url: '/custom/activiti/returnApproval',
method: 'get'
},
GET_ENGINE_CHECK_DETAIL: {
url: '/custom/activiti/showActiviti',
method: 'post'
},
CHANGE_ENGINE_DATA: {
url: '/custom/activiti/initiateApproval',
method: 'get'
},
CHECK_ROLE_USER_DEPT:{
url: '/custom/permission/selectUserOrDeptByRole',
method: 'get'
},
GET_ENGINE_VERSIONS: {
url: '/custom/engineParamDetailPojo/selectVersionList',
method: 'post'
},
GET_NOW_USER_ROLE: {
url: '/custom/permission/selectPermByUserId',
method: 'get'
},
ADD_ROLE_PERMISSION: {
url: '/custom/permission/addRoles',
method: 'post'
},
GET_ROLE_PERMISSION: {
url: '/custom/permission/selectRoles',
method: 'get'
},
DELETE_ROLE_PERMISSION: {
url: '/custom/permission/removeRoles',
method: 'get'
},
GET_ROLE_PERMISSION_BING: {
url: '/custom/permission/userRoleBinding',
method: 'post'
},
GET_SUB_SYSTEM_DATA_LIST: {
url: '/custom/permission/getAllParameters',
method: 'get'
},
EDIT_ROLE_CONTROL_LIST: {
url: '/custom/permission/updatePerForRole',
method: 'post'
},
GET_ROLE_CONTROL_LIST: {
url: '/custom/permission/selectPersByRole',
method: 'get'
},
TEXT_DEMO: {
url: '/custom/delete/submitApproval',
method: 'get'
@ -426,6 +164,26 @@ export default {
url: '/custom/analysis/showReport',
method: 'post'
},
GET_CHECK_LIST: {
url: '/custom/analysis/selectModelByLike',
method: 'post'
},
GET_CHECK_DATA_COMMON: {
url: '/custom/analysis/selectModelByLike',
method: 'get'
},
ADD_CHECK_DATA_COMMON: {
url: '/custom/analysis/insertModelCommon',
method: 'post'
},
EDIT_CHECK_DATA_COMMON: {
url: '/custom/analysis/updateModelCommon',
method: 'post'
},
GET_CHECK_DATA_Y_DATA: {
url: '/custom/analysis/getAvailableParameters',
method: 'get'
},
GET_MODEL_QUERY: {
url: '/custom/tcDataQuery/tcDataSelectByPartsNames',
method: 'post'
@ -462,4 +220,10 @@ export default {
url: '/custom/responsible/getImportTemplate',
method: 'get'
},
// 修改流程主题
EDIT_DATA_PROCESS_TITLE: {
url: '/custom/activiti/updateFlowTitle',
method: 'get'
}
}

128
src/api/demo/model.js Normal file
View File

@ -0,0 +1,128 @@
export default {
//添加模板
ADD_MODEL: {
url: '/custom/template/insertTemplate',
method: 'post'
},
//模板管理列表
GET_MODEL_LIST: {
url: '/custom/template/getTemplateByCondition',
method: 'get'
},
//导入模板
IMPORT_MODEL: {
url: '/custom/template/import',
method: 'post'
},
//修改模板
EDIT_MODEL: {
url: '/custom/template/updateTemplate',
method: 'post'
},
//查看版本
CHECK_MODEL_VERISON: {
url: '/custom/template/getTemplateVersion',
method: 'get'
},
//下载
DOWNLODE_MODEL: {
url: '/custom/template/export',
method: 'get'
},
DOWNLODE_ALL_MODEL: {
url: '/custom/template/exportMultiple',
method: 'get'
},
//获取部门
GET_DEPARTMENT: {
url: '/custom/template/getDept',
method: 'get'
},
//查询详情
GET_MODEL_DETAIL: {
url: '/custom/parameter/getParameterByCondition',
method: 'get'
},
//添加参数
ADD_MODEL_PARAM: {
url: '/custom/parameter/insertParameter',
method: 'post'
},
//维护参数
EDIT_MODEL_PARAM: {
url: '/custom/parameter/maintenanceParameters',
method: 'post'
},
DELETE_MODEL_PARAM: {
url: '/custom/parameter/deleteParameter',
method: 'get'
},
START_APPROVAL: {
url: '/custom/approval/startApproval',
method: 'post'
},
GET_APPROVAL_LIST: {
url: '/custom/approval/getApprovalList',
method: 'get'
},
HANDLE_APPROVAL: {
url: '/custom/approval/handleApproval',
method: 'post'
},
//获取审批详情
// GET_APPROVAL_DETAIL: {
// url: '/custom/approval/getApprovalDetail',
// method: 'get'
// },
//获取所有人
GET_ALLUSERS: {
url: '/custom/approval/getUsersByCondition',
method: 'get'
},
//获取审批变更
GET_APPROVAL_CHANGE: {
url: '/custom/approval/getTemplateChanges',
method: 'get'
}, //获取审批所有
GET_PPROVAL_ALL: {
url: '/custom/approval/getApprovalProcess',
method: 'get'
},
GET_SUB_DEPT: {
url: '/custom/responsible/getSubDepartmentById',
method: 'get'
},
//处理模板审批撤回
RETURN_APPROVAL: {
url: '/custom/approval/handleReturn',
method: 'post'
},
RETURN_MODEL_APPROVAL: {
url: '/custom/approval/handleReturnToNode',
method: 'post'
},
RESTART_MODEL_APPROVAL: {
url: '/custom/approval/directSendingApproval',
method: 'get'
},
GET_MODEL_BY_ID: {
url: '/custom/template/getTemplateById',
method: 'get'
},
GET_CAN_RETURN_NODE: {
url: '/custom/approval/getReturnNodes',
method: 'get'
},
GET_RETURN_APPROVAL: {
url: '/custom/approval/getApprovalUsers',
method: 'get'
},
GET_CAN_RESEND_APPROVAL: {
url: '/custom/approval/getIsDirect?',
method: 'get'
},
EDIT_APPROVAL_PROCESS_TITLE: {
url: '/custom/approval/updateFlowTitle',
method: 'get'
}
}

View File

@ -0,0 +1,68 @@
export default {
//权限管理相关接口
//获取权限管理列表
GET_PERMISSION_DATA: {
url: '/custom/permission/getUserRoleAndPermission',
method: 'get'
},
//保存权限管理
SAVE_PERMISSION_DATA: {
url: '/custom/permission/insertRole',
method: 'post'
},
//修改权限管理
EDIT_PERMISSION_DATA: {
url: '/custom/permission/updatePermission',
method: 'post'
},
//删除权限管理
DELETE_PERMISSION_DATA: {
url: '/custom/permission/deletePermission',
method: 'get'
},
//获取所有权限表
GET_ALL_PERMISSION_LIST: {
url: '/custom/permission/getAllPermission',
method: 'get'
},
DELETE_PERMISSION_DATA: {
url: '/custom/permission/deleteRole',
method: 'get'
},
CHECK_ROLE_USER_DEPT: {
url: '/custom/permission/selectUserOrDeptByRole',
method: 'get'
},
GET_NOW_USER_ROLE: {
url: '/custom/permission/selectPermByUserId',
method: 'get'
},
ADD_ROLE_PERMISSION: {
url: '/custom/permission/addRoles',
method: 'post'
},
GET_ROLE_PERMISSION: {
url: '/custom/permission/selectRoles',
method: 'get'
},
DELETE_ROLE_PERMISSION: {
url: '/custom/permission/removeRoles',
method: 'get'
},
GET_ROLE_PERMISSION_BING: {
url: '/custom/permission/userRoleBinding',
method: 'post'
},
GET_SUB_SYSTEM_DATA_LIST: {
url: '/custom/permission/getAllParameters',
method: 'get'
},
EDIT_ROLE_CONTROL_LIST: {
url: '/custom/permission/updatePerForRole',
method: 'post'
},
GET_ROLE_CONTROL_LIST: {
url: '/custom/permission/selectPersByRole',
method: 'get'
}
}

66
src/api/demo/report.js Normal file
View File

@ -0,0 +1,66 @@
export default {
GET_REPORT_LIST: {
url: '/custom/benchmark/getReportAndTodoByCondition',
method: 'post'
},
GET_REPORT_LIST_BY_CONDITION: {
url: '/custom/benchmark/getApprovalList',
method: 'post'
},
ADD_REPORT: {
url: '/custom/benchmark/startReportApproval',
method: 'post'
},
SAVE_REPORT: {
url: '/custom/benchmark/insertReport',
method: 'post'
},
EDIT_REPORT: {
url: '/custom/benchmark/updateReport',
method: 'post'
},
RESTART_REPORT_APPROVAL: {
url: '/custom/benchmark/restartReportApproval',
method: 'post'
},
START_REPORT_APPROVAL: {
url: '/custom/benchmark/handleReportApproval',
method: 'post'
},
GET_REPORT_DETAIL: {
url: '/custom/benchmark/getReportDetail',
method: 'get'
},
GET_REPORT_DETAIL_PROCESS: {
url: '/custom/benchmark/getReportProcess',
method: 'get'
},
DOWNLOAD_REPORT: {
url: '/custom/benchmark/downloadReport',
method: 'get'
},
DELETE_REPORT: {
url: '/custom/benchmark/deleteReport',
method: 'get'
},
RETURN_REPORT: {
url: '/custom/benchmark/handleReturn',
method: 'post'
},
RESTART_REPORT_TODO: {
url: '/custom/benchmark/restartApproval',
method: 'get'
},
RESEND_REPORT_APPROVAL: {
url: '/custom/benchmark/directSendingApproval',
method: 'get'
},
RETURN_REPORT_TODO: {
url: '/custom/benchmark/handleReturnToNode',
method: 'post'
},
GET_REPORT_APPROVAL_USERS: {
url: '/custom/benchmark/getApprovalUsers',
method: 'get'
}
}

View File

@ -12,7 +12,12 @@ import AdminApi from './admin'
import PersonalApi from './personal'
import WorkbenchApi from './workbench'
import AppPage from './app-page'
import demoApi from './demo'
import demoApi from './demo/index'
import dataApi from './demo/data'
import modelApi from './demo/model'
import reportApi from './demo/report'
import activitiApi from './demo/activiti'
import permissionApi from './demo/permission'
export default {
...CommonApi,
@ -21,5 +26,10 @@ export default {
...PersonalApi,
...WorkbenchApi,
...AppPage,
...demoApi
...demoApi,
...dataApi,
...modelApi,
...reportApi,
...activitiApi,
...permissionApi
}

View File

@ -42,7 +42,6 @@
</el-form-item>
</div>
<div class="form-row">
<el-form-item label="项目名称" prop="projectName">
<el-input v-model="formData.projectName" placeholder="请输入" maxlength="100" />
</el-form-item>

View File

@ -1,6 +1,11 @@
<template>
<div class="apaas-custom-page-mydemo custom-page">
<template v-if="!showProgressDetail">
<div class="page-header">
<div class="title">
参数模板审批流程
</div>
</div>
<div class="page-search-panel">
<el-form class="search-list">
<div class="search-component">
@ -648,4 +653,7 @@ export default {
color: #dcdfe6;
}
}
::v-deep .el-button {
line-height: 0.85 !important;
}
</style>

View File

@ -1377,4 +1377,7 @@ export default {
margin-left: 20px;
text-align: right !important;
}
::v-deep .el-button {
line-height: 0.85 !important;
}
</style>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -56,9 +56,12 @@
/>
<template v-if="!isEditMode && !isJustCheckMode">
<el-button size="small" @click="handleEdit">编辑</el-button>
<el-button type="primary" size="small" @click="handleInitiateApproval"
>发起审批</el-button
>
<el-button v-if="shouldShowResendButton" size="small" :loading="resending" @click="handleResend">
直送
</el-button>
<el-button type="primary" size="small" @click="handleInitiateApproval">
{{ shouldShowResendButton ? '重新发起' : '发起审批' }}
</el-button>
</template>
<template v-else-if="isEditMode">
<el-button size="small" @click="handleSaveEdit">保存编辑</el-button>
@ -217,7 +220,7 @@
</div>
<!-- 填写人列只在非分发模式下显示只读 -->
<div v-if="!isDispatchMode && !isEditMode" class="cell">
<span>{{ row.filledBy || '-' }}</span>
<span>{{ row.filledByName || row.filledBy || '-' }}</span>
</div>
</div>
</div>
@ -228,6 +231,40 @@
<!-- 审批内容区域 -->
<div v-if="isApprovalMode" class="page-approval-content">
<!-- 基础信息 -->
<section v-if="detail && detail.flowId" class="block-section">
<div class="section-title">
基础信息
</div>
<div class="info-grid">
<!-- 流程主题单独一行 -->
<div class="info-item-full">
<span class="label">流程主题</span>
<span class="value">{{ progressDetail.progressTitle || detail.processTitle || '--' }}</span>
</div>
<!-- 其他信息一行两个 -->
<div class="info-row">
<div class="info-item">
<span class="label">创建人</span>
<span class="value">{{ detail.createBy || '--' }}</span>
</div>
<div class="info-item">
<span class="label">创建时间</span>
<span class="value">{{ formatTime(detail.createdTime || detail.createTime) || '--' }}</span>
</div>
</div>
<div class="info-row">
<div class="info-item">
<span class="label">当前环节</span>
<span class="value">{{ currentNode || '--' }}</span>
</div>
<div class="info-item">
<span class="label">当前处理人</span>
<span class="value">{{ currentProcessor || '--' }}</span>
</div>
</div>
</div>
</section>
<div class="approval-content">
<!-- 变更数据表格 -->
<div
@ -402,6 +439,10 @@ export default {
type: String,
default: ''
},
canResend: {
type: Boolean,
default: false
},
isDispatchMode: {
type: Boolean,
default: false
@ -425,6 +466,14 @@ export default {
type: String,
default: ''
},
flowId: {
type: String,
default: ''
},
fromTodo: {
type: Boolean,
default: false
},
// modelName projectNumber
detail: {
type: Object,
@ -460,6 +509,8 @@ export default {
isApprovalMode: false, //
engineDetailInfo: null, // modelName projectNumber
wholeEngineParamsRawData: [], // ""
flowNodes: [], //
progressDetailData: {}, //
approvalFormData: {
processTitle: '',
description: ''
@ -467,6 +518,9 @@ export default {
dispatchLoading: false, // loading
approvalSubmitting: false, // loading
approvalChangeData: [], //
resending: false, // loading
isResendMode: false, //
resendApprovalData: null, //
approvalWorkflowSteps: [
{
name: '校对',
@ -558,6 +612,64 @@ export default {
return {
整车参数: params
}
},
//
progressDetail() {
if (this.progressDetailData && Object.keys(this.progressDetailData).length > 0) {
return {
progressTitle: this.progressDetailData.progressTitle || '',
contentName: this.progressDetailData.contentName || '',
templateVersion: this.progressDetailData.templateVersion || '',
explanation: this.progressDetailData.explanation || '',
description: this.progressDetailData.explanation || this.progressDetailData.description || ''
}
}
return {
progressTitle: this.detail.processTitle || '',
contentName: '',
templateVersion: '',
explanation: '',
description: ''
}
},
//
currentNode() {
if (this.flowNodes && this.flowNodes.length > 0) {
// """"
const approvingNode = this.flowNodes.find((node) =>
node.result === '待审批' || node.result === 'APPROVING'
)
if (approvingNode) {
return approvingNode.node || '--'
}
//
const lastNode = this.flowNodes[this.flowNodes.length - 1]
return lastNode ? (lastNode.node || '--') : '--'
}
return '--'
},
//
currentProcessor() {
if (this.flowNodes && this.flowNodes.length > 0) {
// """"
const approvingNode = this.flowNodes.find((node) =>
node.result === '待审批' || node.result === 'APPROVING'
)
if (approvingNode) {
// 使使
return approvingNode.undoUserName || approvingNode.todoUserName || '--'
}
}
return '--'
},
// """"
shouldShowResendButton() {
// flowId""""
if (this.fromTodo && this.detail && (this.detail.flowId || this.flowId) && this.canResend) {
return true
}
// canResend true
return this.canResend || false
}
},
watch: {
@ -609,6 +721,12 @@ export default {
this.loadFillerPersons()
//
this.loadTreeData()
// flowId detail flowId
const flowId = this.detail?.flowId || this.flowId
if (flowId) {
console.log('flowId', flowId)
this.canResendApproval()
}
// this.loadEngineDetailInfo()
},
methods: {
@ -1051,6 +1169,23 @@ export default {
console.log('handleBack called')
this.$emit('back')
},
formatTime(time) {
if (!time) return '--'
//
if (typeof time === 'number') {
const date = new Date(time)
return date.toLocaleString('zh-CN', {
year: 'numeric',
month: '2-digit',
day: '2-digit',
hour: '2-digit',
minute: '2-digit',
second: '2-digit'
})
}
//
return time
},
onVersionChange() {
// 退
if (this.isEditMode) {
@ -2298,7 +2433,8 @@ export default {
url: api.EXPORT_TEMPLATE.url,
method: api.EXPORT_TEMPLATE.method,
params: {
engineModelID: this.detail.id
engineModelID: this.detail.id,
userId: getUserId()
},
responseType: 'blob' // blob
}
@ -2412,6 +2548,7 @@ export default {
const formData = new FormData()
formData.append('file', file)
formData.append('modelId', this.detail.id)
formData.append('userId', getUserId())
const request = {
...api.IMPORT_ENGINE_MODEL,
@ -2479,6 +2616,9 @@ export default {
} else if (this.filledBy) {
// todo filledBy
params.filledById = this.filledBy
} else if (this.fromTodo && this.canResend) {
// todo isRejectedApprovalMode filledById
params.filledById = currentUserId
}
// isRes
@ -2575,15 +2715,24 @@ export default {
)
const resPersonId = item.resPersonId || item.responsiblePersonId || item.filledBy || ''
const filledBy = item.filledBy || item.responsiblePersonId || ''
// 使 filler 使 filledBy
let filledBy = ''
let filledByUserId = ''
let fillerUsername = ''
if (item.filler && item.filler.id) {
// filler 使 filler.id filledBy filledByUserId
filledBy = item.filler.id
filledByUserId = item.filler.id
fillerUsername = item.filler.username || ''
} else {
// filler 使
filledBy = item.filledBy || item.responsiblePersonId || ''
if (filledBy) {
filledByUserId = filledBy
}
}
// department · -
const department = (item.department || '平台部').replace(/·/g, '-')
// filledByUserId filledBy 使 filledByuserId
let filledByUserId = ''
if (filledBy) {
// filledByUserId userId filledBy
filledByUserId = filledBy
}
//
// GET_MANAGER_DATA
@ -2648,7 +2797,32 @@ export default {
version: this.currentVersionId,
resPersonId: finalResPersonId, // ID使 userId
filledBy: filledBy, // IDuserId
filledByUserId: filledByUserId // userId el-select v-model filledBy
filledByUserId: filledByUserId, // userId el-select v-model filledBy
filledByName: fillerUsername //
}
// filler filledByUserId fillerUserOptions
if (item.filler && item.filler.id && filledByUserId) {
const rowId = paramData.id || `${paramData.subsystemName}-${paramData.parameterName}`
if (!this.fillerUserOptions[rowId]) {
this.$set(this.fillerUserOptions, rowId, [])
}
//
const existingOptionIndex = this.fillerUserOptions[rowId].findIndex(
(opt) => opt.userId === filledByUserId
)
const fillerOption = {
userId: filledByUserId,
username: fillerUsername || item.filler.username || '',
userNumber: item.filler.userNumber || item.filler.userId || filledByUserId
}
if (existingOptionIndex >= 0) {
//
this.$set(this.fillerUserOptions[rowId], existingOptionIndex, fillerOption)
} else {
//
this.fillerUserOptions[rowId].push(fillerOption)
}
}
if (existingIndex >= 0) {
@ -2664,48 +2838,81 @@ export default {
console.log('处理后的数据:', this.versionData[this.currentVersionId])
},
handleInitiateApproval() {
//
this.isApprovalMode = true
//
this.approvalFormData = {
processTitle: '',
description: ''
}
//
this.approvalChangeData = []
//
this.getApprovalChange()
//
this.approvalWorkflowSteps = [
{
name: '校对',
required: true,
handlers: [],
options: [],
loading: false
},
{
name: '审核',
required: true,
handlers: [],
options: [],
loading: false
},
{
name: '会签',
required: false,
handlers: [],
options: [],
loading: false
},
{
name: '批准',
required: true,
handlers: [],
options: [],
loading: false
// fromTodo flowId canResend true GET_DATA_APPROVAL_USERS
if (this.shouldShowResendButton) {
this.isResendMode = true
const flowId = this.engineModelID
const request = {
...api.GET_DATA_APPROVAL_USERS,
params: {
templateId: flowId
},
disableSuccessMsg: true
}
]
this.$request(request)
.asyncThen((resp) => {
console.log('获取审批流程信息:', resp)
//
this.resendApprovalData = resp
// getApprovalChange
this.getApprovalChange()
})
.asyncErrorCatch((err) => {
console.error('获取审批流程信息失败:', err)
//
this.isResendMode = false
this.resendApprovalData = null
this.getApprovalChange()
this.$message.warning('获取原审批流程信息失败,将使用空的人员列表')
})
} else {
//
this.isResendMode = false
this.resendApprovalData = null
//
this.isApprovalMode = true
//
this.approvalFormData = {
processTitle: '',
description: ''
}
//
this.approvalChangeData = []
//
this.getApprovalChange()
//
this.approvalWorkflowSteps = [
{
name: '校对',
required: true,
handlers: [],
options: [],
loading: false
},
{
name: '审核',
required: true,
handlers: [],
options: [],
loading: false
},
{
name: '会签',
required: false,
handlers: [],
options: [],
loading: false
},
{
name: '批准',
required: true,
handlers: [],
options: [],
loading: false
}
]
}
},
getApprovalChange() {
const request = {
@ -2733,6 +2940,79 @@ export default {
} else {
this.approvalChangeData = []
}
//
if (this.isResendMode && this.resendApprovalData) {
this.isApprovalMode = true
//
this.approvalWorkflowSteps = [
{
name: '校对',
required: true,
handlers: [],
options: [],
loading: false
},
{
name: '审核',
required: true,
handlers: [],
options: [],
loading: false
},
{
name: '会签',
required: false,
handlers: [],
options: [],
loading: false
},
{
name: '批准',
required: true,
handlers: [],
options: [],
loading: false
}
]
this.fillResendApprovalData(this.resendApprovalData)
//
this.isResendMode = false
this.resendApprovalData = null
} else {
//
this.isApprovalMode = true
//
this.approvalWorkflowSteps = [
{
name: '校对',
required: true,
handlers: [],
options: [],
loading: false
},
{
name: '审核',
required: true,
handlers: [],
options: [],
loading: false
},
{
name: '会签',
required: false,
handlers: [],
options: [],
loading: false
},
{
name: '批准',
required: true,
handlers: [],
options: [],
loading: false
}
]
}
})
.asyncErrorCatch((err) => {
console.error('获取审批变更失败:', err)
@ -2746,6 +3026,8 @@ export default {
handleApprovalCancel() {
// 退
this.isApprovalMode = false
this.isResendMode = false
this.resendApprovalData = null
//
this.approvalFormData = {
processTitle: '',
@ -2785,6 +3067,159 @@ export default {
}
]
},
//
canResendApproval() {
const flowId = this.detail?.flowId || this.flowId
if (!flowId) {
this.canResend = false
return
}
const request = {
...api.CHECK_DATA_CAN_RETURN,
params: {
flowId: flowId
},
disableSuccessMsg: true
}
this.$request(request)
.asyncThen((resp) => {
console.log('检查是否可以直送:', resp)
this.canResend = resp.data || false
})
.asyncErrorCatch((err) => {
console.error('获取是否可以直送失败:', err)
this.canResend = false
})
},
//
handleResend() {
if (!this.detail || !this.detail.id) {
this.$message.error('缺少审批ID无法执行直送操作')
return
}
this.$confirm('确定要执行直送操作吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
this.resending = true
const request = {
...api.RESEND_DATA_APPROVAL,
params: {
flowId: this.flowId,
userId: getUserId()
},
disableSuccessMsg: true
}
this.$request(request)
.asyncThen((resp) => {
this.$message({
message: '直送成功',
type: 'success'
})
//
this.$emit('refresh')
this.resending = false
//
this.canResendApproval()
})
.asyncErrorCatch((err) => {
console.error('直送失败:', err)
this.$message({
message: err.message || '直送失败,请重试',
type: 'error'
})
this.resending = false
})
})
.catch(() => {
//
})
},
//
fillResendApprovalData(data) {
//
let nodeList = []
let respData = data
//
if (Array.isArray(data)) {
//
nodeList = data
} else if (data && Array.isArray(data.data)) {
nodeList = data.data
respData = data
} else if (data && Array.isArray(data.result)) {
nodeList = data.result
respData = data
} else if (data && Array.isArray(data.nodeList)) {
nodeList = data.nodeList
respData = data
} else if (data && Array.isArray(data.flowNodes)) {
nodeList = data.flowNodes
respData = data
} else if (data && data.data && Array.isArray(data.data)) {
nodeList = data.data
respData = data
}
//
if (respData && !Array.isArray(respData)) {
if (respData.progressTitle || respData.processTitle) {
this.approvalFormData.processTitle = respData.progressTitle || respData.processTitle || ''
}
if (respData.explanation || respData.description) {
this.approvalFormData.description = respData.explanation || respData.description || ''
}
}
// nodeName
if (nodeList && nodeList.length > 0) {
nodeList.forEach((nodeItem) => {
const nodeName = nodeItem.nodeName || nodeItem.node || ''
if (!nodeName) {
return
}
//
const step = this.approvalWorkflowSteps.find(s => s.name === nodeName)
if (!step) {
return
}
// assignees
const assignees = nodeItem.assignees || []
if (!Array.isArray(assignees) || assignees.length === 0) {
return
}
// assignees id userId
const handlerInfos = assignees.map(assignee => {
// usernameuserNumber id userId
const userId = assignee.userId || assignee.id || ''
return {
userId: userId,
username: assignee.username || '',
userNumber: assignee.userNumber || assignee.account || ''
}
}).filter(item => item.userId) // userId
// handlers handlers userId
if (handlerInfos.length > 0) {
step.handlers = handlerInfos.map(h => h.userId).filter(Boolean)
// options
step.options = handlerInfos.map(h => ({
userId: h.userId,
username: h.username || '',
userNumber: h.userNumber || ''
})).filter(opt => opt.userId)
}
})
}
},
handleApprovalFormSubmit() {
//
const requiredStepsWithoutHandlers = this.approvalWorkflowSteps.filter(
@ -2860,6 +3295,7 @@ export default {
//
const request = {
...api.START_ENGINE_CHECK,
flowId: this.flowId || '',
params: submitData,
disableSuccessMsg: true
}
@ -3084,6 +3520,7 @@ export default {
.page-approval-content {
background: #fff;
display: flex;
flex-direction: column;
flex: 1;
min-height: 0;
padding: 20px;
@ -3091,6 +3528,60 @@ export default {
overflow-x: hidden;
}
.block-section {
border-radius: 8px;
padding: 24px 24px 16px 24px;
margin-bottom: 24px;
background: #fff;
.section-title {
font-size: 16px;
font-weight: 600;
color: #303133;
margin-bottom: 16px;
}
}
.info-grid {
.label {
font-size: 16px;
color: #909399;
}
.value {
font-size: 16px;
color: #303133;
font-weight: 500;
}
.info-item-full {
display: flex;
gap: 16px 24px;
margin-bottom: 16px;
.label {
min-width: 100px;
}
.value {
flex: 1;
}
}
.info-row {
display: flex;
gap: 16px 24px;
margin-bottom: 16px;
.info-item {
flex: 1;
display: flex;
gap: 16px 24px;
.label {
min-width: 100px;
}
}
}
}
.page-footer {
display: flex;
justify-content: flex-end;
@ -3109,10 +3600,10 @@ export default {
}
.left-tree-panel {
width: 200px;
width: 230px;
background: #fff;
border: 1px solid #ebeef5;
padding: 12px;
padding: 8px;
font-size: 14px;
overflow-y: auto !important;
.tree-search-header {
@ -3624,4 +4115,10 @@ export default {
}
}
}
:deep(.el-tree-node__content){
padding-left: 10px !important;
}
::v-deep .el-button {
line-height: 0.85 !important;
}
</style>

View File

@ -2,6 +2,9 @@
<div class="manager-data-page custom-page">
<div class="page-content">
<div class="header-section">
<div class="title">
责任人管理
</div>
<div>
<el-button type="primary" @click="handleAdd">
新增
@ -1278,4 +1281,7 @@ export default {
width: 100%;
}
}
::v-deep .el-button {
line-height: 0.85 !important;
}
</style>

View File

@ -92,14 +92,14 @@
@click="handleRemoveModel(index)"
></i>
<div v-else class="add-model-placeholder" @click="handleAddModel">
<i class="el-icon-plus"></i>
<i class="el-icon-plus" style="font-size: 16px; font-weight: bold;"></i>
<span>添加机型</span>
</div>
</div>
</th>
<th class="add-column">
<div class="add-model-placeholder" @click="handleAddModel">
<i class="el-icon-plus"></i>
<i class="el-icon-plus" style="font-size: 16px; font-weight: bold;"></i>
<span>添加机型</span>
</div>
</th>
@ -354,19 +354,15 @@ export default {
paramList.forEach((item) => {
const parameterName = item.parameterName || ''
const parameterId = item.parameterId || ''
// 使partsName
const partsName = item.partsName || ''
//
const displayPartsName = partsName
if (parameterName) {
// partsName
// partsName `/` `/`
// 使 `/`
const normalizedPartsName =
!partsName || partsName.trim() === '' || partsName === '/' ? '/' : partsName
const displayPartsName = normalizedPartsName
//
//
//
//
let shouldInclude = false
//
@ -390,27 +386,44 @@ export default {
if (isSubsystemDirectlySelected) {
//
shouldInclude = true
// 使
// partsName
const hasMatchingChildNode = this.treeData.some((node) => {
if (node.label === subsystemName && node.children) {
return node.children.some((child) => child.label === partsName)
}
return false
})
if (hasMatchingChildNode) {
// partsName
const isMatchingChildSelected = this.checkedKeys.some((nodeId) => {
const nodeInfo = this.nodeMap[nodeId]
return (
nodeInfo &&
!nodeInfo.isParent &&
nodeInfo.parentLabel === subsystemName &&
nodeInfo.label === partsName //
)
})
//
shouldInclude = isMatchingChildSelected
} else {
//
shouldInclude = true
}
} else {
//
// parameterTypes subsystemTypes -
// partsName `/` label `/`
//
shouldInclude = false
// parameterTypes
if (parameterTypes.includes(normalizedPartsName)) {
// parameterTypes
if (parameterTypes.includes(partsName)) {
shouldInclude = true
}
// subsystemTypes -
// subsystemTypes -
if (!shouldInclude) {
// `/` subsystemTypes `-/`
if (normalizedPartsName === '/') {
shouldInclude = subsystemTypes.includes(`${subsystemName}-/`)
} else {
//
shouldInclude = subsystemTypes.includes(`${subsystemName}-${normalizedPartsName}`)
}
shouldInclude = subsystemTypes.includes(`${subsystemName}-${partsName}`)
}
}
@ -783,8 +796,11 @@ export default {
//
const loadPromises = this.selectedModels.map((model) => {
const modelId = model.id || model.rowId || model.engineModelID
const parameterVersion = model.parameterVersion || 1
// 使 id+ getParamValue key
const modelKey = `${modelId}_${parameterVersion}`
// ""
this.$set(this.allModelRawData, modelId, {
this.$set(this.allModelRawData, modelKey, {
modelName: model.modelName || model.productFullName || '',
productNumber: model.productNumber || '',
plate: model.plate || '',
@ -795,7 +811,7 @@ export default {
projectNumber: model.projectNumber || '',
parameterNum: model.parameterNum || ''
})
return this.loadModelDetail(modelId, model, model.parameterVersion, subsystemTypes)
return this.loadModelDetail(modelId, model, parameterVersion, subsystemTypes)
})
Promise.all(loadPromises)
@ -960,6 +976,22 @@ export default {
}
}
// allModelRawData
const modelKey = `${modelId}_${parameterVersion}`
if (!this.allModelRawData[modelKey]) {
this.$set(this.allModelRawData, modelKey, {
modelName: modelData.modelName || modelData.productFullName || model.name || '',
productNumber: modelData.productNumber || '',
plate: modelData.plate || '',
platform: modelData.platform || '',
series: modelData.series || '',
marketSegment: modelData.marketSegment || '',
projectName: modelData.projectName || '',
projectNumber: modelData.projectNumber || '',
parameterNum: modelData.parameterNum || ''
})
}
//
return this.loadModelDetail(modelId, modelData, parameterVersion, subsystemTypes)
})
@ -1084,10 +1116,13 @@ export default {
handleRemoveModel(index) {
const removedModel = this.comparisonModels[index]
if (removedModel && removedModel.id) {
// 使 id+ key
const parameterVersion = removedModel.parameterVersion || 1
const modelKey = `${removedModel.id}_${parameterVersion}`
// allModelDetailData
this.$delete(this.allModelDetailData, removedModel.id)
this.$delete(this.allModelDetailData, modelKey)
// allModelRawData
this.$delete(this.allModelRawData, removedModel.id)
this.$delete(this.allModelRawData, modelKey)
}
this.comparisonModels.splice(index, 1)
},
@ -1187,8 +1222,13 @@ export default {
},
//
handleDownloadComparisonData() {
// ID
const allSelectedIds = this.comparisonModels.map((item) => item.id).filter((id) => id)
// ID
const allSelectedIds = this.comparisonModels
.filter((item) => item.id)
.map((item) => ({
modelId: item.id,
parameterVersion: item.parameterVersion || ''
}))
if (allSelectedIds.length === 0) {
this.$message({
type: 'warning',
@ -1198,6 +1238,31 @@ export default {
}
//
const { subsystemTypes } = this.getSelectedSubsystemsAndTypes()
// ""
const filteredSubsystemTypes = subsystemTypes.filter(
(item) => !item.startsWith('整车参数-')
)
// ID""parameters
const saveData = this.collectCurrentDisplayParams()
let parameters = []
if (saveData && saveData.subsystems && saveData.subsystems.length > 0) {
saveData.subsystems.forEach((item) => {
// ""isGlobal10
const isGlobal = item.subsystem === '整车参数' ? 1 : 0
item.parameters.forEach((param) => {
parameters.push({
parameterId: param.parameterId,
isGlobal: isGlobal
})
})
})
}
// isGlobal === 1parameterId
const parameterIds = parameters
.filter((param) => param.isGlobal !== 1 && param.parameterId)
.map((param) => param.parameterId)
const { url, method = 'post', headers = {} } = api.DOWNLOAD_MODEL_QUERY_DATA || {}
const requestConfig = {
url,
@ -1205,7 +1270,8 @@ export default {
data: {
userID: getUserId(),
modelIds: allSelectedIds,
subsystemParts: subsystemTypes
parameterIds: parameterIds,
subsystemParts: filteredSubsystemTypes
},
responseType: 'blob',
headers,
@ -1296,15 +1362,27 @@ export default {
// partsName
subsystemConfig.parameters.forEach((commonParam) => {
// isGlobal 1 ""
const isGlobal = commonParam.isGlobal === 1 || commonParam.isGlobal === '1'
let targetSubsystemName = subsystemName
if (isGlobal) {
// isGlobal 1""
targetSubsystemName = '整车参数'
if (!subsystemPartsMap.has(targetSubsystemName)) {
subsystemPartsMap.set(targetSubsystemName, new Set())
}
}
// 使 partsName
if (commonParam.partsName) {
const partsName = commonParam.partsName
// partsName '/'使
const displayPartsName = partsName
subsystemPartsMap.get(subsystemName).add(displayPartsName)
subsystemPartsMap.get(targetSubsystemName).add(displayPartsName)
} else {
// partsName allParametersData
const subsystemData = this.allParametersData[subsystemName]
const subsystemData = this.allParametersData[targetSubsystemName]
if (Array.isArray(subsystemData)) {
const matchedParam = subsystemData.find((param) => {
if (commonParam.parameterId) {
@ -1319,8 +1397,14 @@ export default {
// partsName `/` 使
const partsName = matchedParam.partsName
const displayPartsName = partsName
subsystemPartsMap.get(subsystemName).add(displayPartsName)
subsystemPartsMap.get(targetSubsystemName).add(displayPartsName)
} else {
// partsName 使 '/'
subsystemPartsMap.get(targetSubsystemName).add('/')
}
} else {
// 使 '/'
subsystemPartsMap.get(targetSubsystemName).add('/')
}
}
})
@ -1350,11 +1434,11 @@ export default {
const subsystemName = matchedSubsystemName
// partsName '/'
if (partsNames.has(subsystemName)) {
if (partsNames.has('/')) {
// partsName '/'
keysToCheck.push(node.id)
// partsNames
partsNames.delete(subsystemName)
// partsNames '/'
partsNames.delete('/')
}
//
@ -1453,18 +1537,25 @@ export default {
// subsystem -> Set<parameterKey>
// parameterKey 使 parameterId使 parameterName
// isGlobal === 1 ""
const commonParamsMap = new Map()
this.currentCommonConfig.subsystems.forEach((subsystemConfig) => {
const subsystemName = subsystemConfig.subsystem
const paramKeys = new Set()
subsystemConfig.parameters.forEach((p) => {
// isGlobal 1 ""
const isGlobal = p.isGlobal === 1 || p.isGlobal === '1'
// isGlobal 1""
const targetSubsystemName = isGlobal ? '整车参数' : subsystemName
// 使 parameterId使 parameterName
const key = p.parameterId || p.parameterName
if (key) {
paramKeys.add(key)
if (!commonParamsMap.has(targetSubsystemName)) {
commonParamsMap.set(targetSubsystemName, new Set())
}
commonParamsMap.get(targetSubsystemName).add(key)
}
})
commonParamsMap.set(subsystemName, paramKeys)
})
//
@ -1478,49 +1569,73 @@ export default {
paramList.forEach((item) => {
const parameterName = item.parameterName || ''
const parameterId = item.parameterId || ''
// 使partsName
const partsName = item.partsName || ''
// partsName
// partsName `/` `/`
const normalizedPartsName =
!partsName || partsName.trim() === '' || partsName === '/' ? '/' : partsName
//
let isInSelectedNodes = false
if (parameterTypes.length === 0) {
//
isInSelectedNodes = true
} else {
//
// partsName `/` label `/`
isInSelectedNodes =
parameterTypes.includes(normalizedPartsName) ||
subsystemTypes.includes(`${subsystemName}-${normalizedPartsName}`) ||
subsystemTypes.includes(`${subsystemName}-/`)
//
if (!isInSelectedNodes) {
const isSubsystemDirectlySelected = this.checkedKeys.some((nodeId) => {
//
const isSubsystemDirectlySelected = this.checkedKeys.some((nodeId) => {
const nodeInfo = this.nodeMap[nodeId]
return (
nodeInfo &&
nodeInfo.isParent &&
nodeInfo.label === subsystemName &&
//
!this.checkedKeys.some((childNodeId) => {
const childNodeInfo = this.nodeMap[childNodeId]
return (
childNodeInfo &&
!childNodeInfo.isParent &&
childNodeInfo.parentLabel === subsystemName
)
})
)
})
if (isSubsystemDirectlySelected) {
//
// partsName
const hasMatchingChildNode = this.treeData.some((node) => {
if (node.label === subsystemName && node.children) {
return node.children.some((child) => child.label === partsName)
}
return false
})
if (hasMatchingChildNode) {
// partsName
const isMatchingChildSelected = this.checkedKeys.some((nodeId) => {
const nodeInfo = this.nodeMap[nodeId]
return (
nodeInfo &&
nodeInfo.isParent &&
nodeInfo.label === subsystemName &&
!this.checkedKeys.some((childNodeId) => {
const childNodeInfo = this.nodeMap[childNodeId]
return (
childNodeInfo &&
!childNodeInfo.isParent &&
childNodeInfo.parentLabel === subsystemName
)
})
!nodeInfo.isParent &&
nodeInfo.parentLabel === subsystemName &&
nodeInfo.label === partsName //
)
})
// partsName `/`
if (isSubsystemDirectlySelected && normalizedPartsName === '/') {
//
isInSelectedNodes = isMatchingChildSelected
} else {
//
isInSelectedNodes = true
}
} else {
//
if (parameterTypes.length === 0) {
// isSubsystemDirectlySelected
isInSelectedNodes = false
} else {
// parameterTypes
if (parameterTypes.includes(partsName)) {
isInSelectedNodes = true
}
// subsystemTypes -
if (!isInSelectedNodes) {
isInSelectedNodes = subsystemTypes.includes(`${subsystemName}-${partsName}`)
}
}
}
@ -1660,11 +1775,16 @@ export default {
return
}
// ID
//
let parameters = []
saveData.subsystems.forEach((item) => {
// ""isGlobal10
const isGlobal = item.subsystem === '整车参数' ? 1 : 0
item.parameters.forEach((param) => {
parameters.push(param.parameterId)
parameters.push({
parameterId: param.parameterId,
isGlobal: isGlobal
})
})
})
@ -1753,8 +1873,13 @@ export default {
}
let parameters = []
saveData.subsystems.forEach((item) => {
// ""isGlobal10
const isGlobal = item.subsystem === '整车参数' ? 1 : 0
item.parameters.forEach((param) => {
parameters.push(param.parameterId)
parameters.push({
parameterId: param.parameterId,
isGlobal: isGlobal
})
})
})
//
@ -1956,6 +2081,9 @@ export default {
},
//
loadTreeData() {
// ""
this.loadAllParametersData().then(() => {
//
const request = {
...api.GET_ENGINE_DETAIL_QUERY,
params: {
@ -1978,19 +2106,8 @@ export default {
}
}
// ""
const wholeEngineParamsNode = {
id: 'parent-whole-engine-params',
label: '整车参数',
tip: '',
children: [] //
}
// ""
this.nodeMap['parent-whole-engine-params'] = {
label: '整车参数',
parentLabel: null,
isParent: true
}
// ""
const wholeEngineParamsNode = this.buildWholeEngineParamsNode()
// ""
treeDataResult = [wholeEngineParamsNode, ...treeDataResult]
@ -2002,8 +2119,6 @@ export default {
// 使
this.treeData = JSON.parse(JSON.stringify(this.allTreeData))
//
this.loadAllParametersData().then(() => {
//
if (this.currentCommonConfig) {
// 1.
@ -2027,11 +2142,11 @@ export default {
}
})
}
})
})
.asyncErrorCatch((err) => {
console.error('获取参数列表失败:', err)
this.$message.error('获取参数列表失败')
})
})
},
//
@ -2047,50 +2162,17 @@ export default {
// : { "": [{ parameterId, parameterName, partsName, subsystem }] }
const result = {}
// ""
result['整车参数'] = [
{ parameterName: '状态代号', parameterId: '', partsName: '/', subsystem: '整车参数' },
{ parameterName: '产品型号', parameterId: '', partsName: '/', subsystem: '整车参数' },
{ parameterName: '板块', parameterId: '', partsName: '/', subsystem: '整车参数' },
{ parameterName: '平台', parameterId: '', partsName: '/', subsystem: '整车参数' },
{ parameterName: '系列', parameterId: '', partsName: '/', subsystem: '整车参数' },
{ parameterName: '细分市场', parameterId: '', partsName: '/', subsystem: '整车参数' },
{ parameterName: '项目名称', parameterId: '', partsName: '/', subsystem: '整车参数' },
{ parameterName: '项目编号', parameterId: '', partsName: '/', subsystem: '整车参数' },
{ parameterName: '排放', parameterId: '', partsName: '/', subsystem: '整车参数' },
{ parameterName: '燃烧类型', parameterId: '', partsName: '/', subsystem: '整车参数' },
{ parameterName: '排量', parameterId: '', partsName: '/', subsystem: '整车参数' },
{ parameterName: '标准参数', parameterId: '', partsName: '/', subsystem: '整车参数' }
]
//
// ""
if (resp && resp.data) {
if (Array.isArray(resp.data)) {
resp.data.forEach((item) => {
if (item.subsystem && Array.isArray(item.parameters)) {
// ""
if (item.subsystem === '整车参数') {
//
const existingParams = result['整车参数'] || []
const existingParamNames = new Set(existingParams.map((p) => p.parameterName))
item.parameters.forEach((param) => {
if (!existingParamNames.has(param.parameterName)) {
result['整车参数'].push({
parameterId: param.parameterId || '',
parameterName: param.parameterName || '',
partsName: param.partsName || '/',
subsystem: '整车参数'
})
}
})
} else {
result[item.subsystem] = item.parameters.map((param) => ({
parameterId: param.parameterId || '',
parameterName: param.parameterName || '',
partsName: param.partsName || '',
subsystem: item.subsystem //
}))
}
}
})
}
@ -2104,23 +2186,8 @@ export default {
})
.asyncErrorCatch((err) => {
console.error('获取所有参数数据失败:', err)
// 使""
this.allParametersData = {
整车参数: [
{ parameterName: '状态代号', parameterId: '', partsName: '/', subsystem: '整车参数' },
{ parameterName: '产品型号', parameterId: '', partsName: '/', subsystem: '整车参数' },
{ parameterName: '板块', parameterId: '', partsName: '/', subsystem: '整车参数' },
{ parameterName: '平台', parameterId: '', partsName: '/', subsystem: '整车参数' },
{ parameterName: '系列', parameterId: '', partsName: '/', subsystem: '整车参数' },
{ parameterName: '细分市场', parameterId: '', partsName: '/', subsystem: '整车参数' },
{ parameterName: '项目名称', parameterId: '', partsName: '/', subsystem: '整车参数' },
{ parameterName: '项目编号', parameterId: '', partsName: '/', subsystem: '整车参数' },
{ parameterName: '排放', parameterId: '', partsName: '/', subsystem: '整车参数' },
{ parameterName: '燃烧类型', parameterId: '', partsName: '/', subsystem: '整车参数' },
{ parameterName: '排量', parameterId: '', partsName: '/', subsystem: '整车参数' },
{ parameterName: '标准参数', parameterId: '', partsName: '/', subsystem: '整车参数' }
]
}
// 使
this.allParametersData = {}
// 使
this.savedAllParametersData = JSON.parse(JSON.stringify(this.allParametersData))
// 使
@ -2215,6 +2282,66 @@ export default {
})
return keys
},
// ""
buildWholeEngineParamsNode() {
const subsystemName = '整车参数'
const parentId = 'parent-whole-engine-params'
// allParametersData ""
const parameters = this.allParametersData[subsystemName] || []
// partsName'/'
const partsNameSet = new Set()
parameters.forEach((param) => {
const partsName = param.partsName || ''
// partsName'/'
if (partsName && partsName !== '/') {
partsNameSet.add(partsName)
}
})
//
const children = []
const seenLabels = new Set() //
Array.from(partsNameSet).forEach((partsName, childIdx) => {
// label
if (seenLabels.has(partsName)) {
return
}
seenLabels.add(partsName)
const childId = `${parentId}-${childIdx}`
children.push({
id: childId,
label: partsName,
tip: ''
})
//
this.nodeMap[childId] = {
label: partsName,
parentLabel: subsystemName,
isParent: false
}
})
// ""
const wholeEngineParamsNode = {
id: parentId,
label: subsystemName,
tip: '',
children: children
}
// ""
this.nodeMap[parentId] = {
label: subsystemName,
parentLabel: null,
isParent: true
}
return wholeEngineParamsNode
},
// loadModelListForDialog
loadComparisonModels() {
this.loadModelListForDialog()
@ -2605,4 +2732,8 @@ export default {
.v-modal {
display: none !important;
}
::v-deep .el-button {
line-height: 0.85 !important;
}
</style>

View File

@ -435,4 +435,7 @@ export default {
}
}
}
::v-deep .el-button {
line-height: 0.85 !important;
}
</style>

View File

@ -20,9 +20,9 @@
<el-button v-if="hasTemplateManagementEditPermission()" class="import-btn" @click="handleImportTemplate()">
导入参数模板
</el-button>
<el-button v-if="hasTemplateManagementEditPermission()" type="primary" @click="handleAddTemplate()">
<!-- <el-button v-if="hasTemplateManagementEditPermission()" type="primary" @click="handleAddTemplate()">
添加参数模板
</el-button>
</el-button> -->
</div>
</div>
<div class="page-search-panel">
@ -114,6 +114,16 @@
>
修改
</a>
<span class="link-separator"></span>
<a
v-if="hasTemplateManagementEditPermission() && row.version === 1 && row.status === 'DRAFT'"
href="javascript:void(0)"
class="el-link el-link--primary"
style="color: red;"
@click.stop="handleRowDelete(row)"
>
删除
</a>
</div>
<div v-if="colConfig.customSlot === 'version'" :key="index + '' + rowIndex">
V{{ row[colConfig.prop] || '' }}
@ -177,6 +187,7 @@
:template-version="currentVersion"
:version-list="versionList"
:detail="currentDetail"
:from-todo="fromTodo"
:template-management-permissions="templateManagementPermissions"
class="model-detail-wrapper"
@back="handleBackFromDetail"
@ -268,7 +279,8 @@ export default {
tenantId: '1764149921900',
userId: getUserId(),
errorDialogVisible: false,
templateManagementPermissions: [] // menuPath "/"
templateManagementPermissions: [], // menuPath "/"
fromTodo: false //
}
},
computed: {
@ -412,6 +424,31 @@ export default {
console.error('获取用户自身角色失败:', err)
})
},
handleRowDelete(row) {
const request = {
...api.DEL_MODEL,
params: {
templateId: row.id
},
disableSuccessMsg: true
}
this.$request(request)
.asyncThen((resp) => {
console.log(resp, 'resp')
this.$message({
type: 'success',
message: '删除成功'
})
this.loadData()
})
.asyncErrorCatch((err) => {
console.error('删除模板失败:', err)
this.$message({
type: 'error',
message: '删除失败'
})
})
},
//
filterTemplateManagementPermissions() {
try {
@ -530,6 +567,11 @@ export default {
this.currentTemplateId = row.rowId
this.currentTemplateRowId = row.id
this.currentTemplateName = row.templateName
if (row.returnNum > 0) {
this.fromTodo = true
} else {
this.fromTodo = false
}
// 使po_code
this.currentVersion = row.version
// status
@ -659,11 +701,12 @@ export default {
handleVersionClick(data) {
console.log(data, 'data')
//
const { version, templateId, template, versionList, changeId } = data
const { version, templateId, template, versionList, changeId, returnNum } = data
this.currentTemplateRowId = changeId
// ID
this.currentTemplateId = templateId
this.currentTemplateName = template.templateName || ''
this.fromTodo = returnNum > 0 || false
//
this.currentVersion = version.name || version.version || ''
// status
@ -1185,7 +1228,7 @@ export default {
flex: 1;
min-height: 0;
flex-direction: column;
padding: 0 20px 20px 20px;
padding: 10px;
background: #f7f7f7;
.x-empty-page {
@ -1234,7 +1277,7 @@ export default {
.link-separator {
width: 4px;
display: inline-block;
height: 14px;
}
}
@ -1263,4 +1306,7 @@ export default {
.operation {
justify-content: flex-start !important;
}
::v-deep .el-button {
line-height: 0.85 !important;
}
</style>

File diff suppressed because it is too large Load Diff

View File

@ -7,7 +7,7 @@
>
<div class="page-header">
<div class="title">
我的
我的
</div>
<div class="operation">
<x-svg-icon
@ -450,4 +450,7 @@ export default {
min-height: 0;
}
}
::v-deep .el-button {
line-height: 0.85 !important;
}
</style>

View File

@ -47,19 +47,19 @@
<a
href="javascript:void(0)"
class="el-link el-link--primary"
@click.stop="handleRowView(row)">
@click.stop="handleRowView(row)"
>
查看
</a>
</div>
<!-- <div v-if="colConfig.customSlot === 'options'" :key="'op' + index + '' + rowIndex">
</a>
<span v-if="row.enableReturn == 1" style="width: 6px; display: inline-block"></span>
<a
v-if="row.currentNode === '校对'"
v-if="row.enableReturn == 1"
href="javascript:void(0)"
class="el-link el-link--primary"
@click.stop="handleRowWithdraw(row)"
>撤回</a
>
</div> -->
</div>
</template>
<template slot="empty">
@ -124,6 +124,7 @@ import ApprovalProgressDetail from './approvalProgressDetail.vue'
import ReportDetail from './reportDetail.vue'
import { getUserId } from '@/utils'
import api from '@/api/demo'
import { flow } from 'lodash-es'
export default {
name: 'TodoPage',
components: {
@ -159,13 +160,32 @@ export default {
colConfigs: [
// { prop: 'documentNo', label: '', showOverflowTooltip: true, minWidth: '140' },
{ prop: 'processTitle', label: '流程主题', showOverflowTooltip: true, minWidth: '160' },
{ prop: 'currentNode', label: '当前环节', showOverflowTooltip: true, minWidth: '140' },
{ prop: 'currentNode', label: '当前环节', showOverflowTooltip: true, minWidth: '100' },
// { prop: 'statusCode', label: '', showOverflowTooltip: true, minWidth: '120' },
// { prop: 'modelName', label: '', showOverflowTooltip: true, minWidth: '120' },
{ prop: 'currentProcessor', label: '当前处理人', showOverflowTooltip: true, minWidth: '120' },
{ prop: 'createdBy', label: '创建人', showOverflowTooltip: true, minWidth: '120' },
{ prop: 'creationDate', label: '创建时间', showOverflowTooltip: true, minWidth: '160', align: 'center', formatter: this.formatDateTime },
{ prop: 'options', label: '操作', customSlot: 'options', align: 'center', width: '100', fixed: 'right' }
{
prop: 'currentProcessor',
label: '当前处理人',
showOverflowTooltip: true,
minWidth: '100'
},
{ prop: 'createdBy', label: '创建人', showOverflowTooltip: true, minWidth: '100' },
{
prop: 'creationDate',
label: '创建时间',
showOverflowTooltip: true,
minWidth: '160',
align: 'center',
formatter: this.formatDateTime
},
{
prop: 'options',
label: '操作',
customSlot: 'options',
align: 'center',
width: '140',
fixed: 'right'
}
],
seqType: '',
seqConfig: {},
@ -359,6 +379,112 @@ export default {
}
},
handleRowWithdraw(row) {
const isModelCheck = row.dataType === '模板审核'
const canWithdrawNode = (row.enableReturn = 1)
const isReportCheck = row.dataType === '对标报告审核'
const isInApprovalMode = row.dataType === '数据审批'
if (isModelCheck && canWithdrawNode) {
this.$confirm('确定撤回吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
const request = {
...api.RETURN_APPROVAL,
params: {
flowId: row.documentNo,
userId: getUserId(),
opinion: '同意',
result: 'RETURN'
},
disableSuccessMsg: true
}
this.$request(request)
.asyncThen((resp) => {
console.log('确定撤回')
this.loadData()
})
.asyncErrorCatch((err) => {
console.error('撤回失败:', err)
this.$message.error('撤回失败')
})
})
.catch(() => {
console.log('取消撤回')
})
}
if (isReportCheck && canWithdrawNode) {
this.$confirm('确定撤回吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
const request = {
...api.RETURN_REPORT,
params: {
flowId: row.documentNo,
userId: getUserId(),
opinion: '同意',
result: 'RETURN'
},
disableSuccessMsg: true
}
this.$request(request)
.asyncThen((resp) => {
console.log('确定撤回')
this.loadData()
})
.asyncErrorCatch((err) => {
console.error('撤回失败:', err)
this.$message.error('撤回失败')
})
})
.catch(() => {
console.log('取消撤回')
})
}
if (isInApprovalMode && canWithdrawNode) {
this.$confirm('确定撤回吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
console.log('确定撤回')
const request = {
...api.RESTART_DATA_APPROVAL,
params: {
flowId: row.documentNo,
userId: getUserId(),
opinion: '同意',
result: 'RETURN'
},
disableSuccessMsg: true
}
this.$request(request)
.asyncThen(() => {
console.log('确定撤回')
this.$message({
type: 'success',
message: '撤回成功'
})
this.loadData()
})
.asyncErrorCatch(() => {
this.$message({
type: 'error',
message: '撤回失败'
})
this.loadData()
})
})
.catch(() => {
console.log('取消撤回')
})
}
console.warn(row)
}
}
@ -445,4 +571,7 @@ export default {
min-height: 0;
}
}
::v-deep .el-button {
line-height: 0.85 !important;
}
</style>

View File

@ -783,4 +783,7 @@ export default {
}
}
}
::v-deep .el-button {
line-height: 0.85 !important;
}
</style>

View File

@ -108,8 +108,9 @@
>
查看
</a>
<span v-if="row.distributeStatus != '已分发' && hasEngineDataEditPermission()" class="link-separator"></span>
<a
v-if="row.distributeStatus != '已分发'"
v-if="row.distributeStatus != '已分发' && hasEngineDataEditPermission()"
href="javascript:void(0)"
class="el-link el-link--primary"
style="margin-left: 5px;"
@ -117,6 +118,16 @@
>
分发
</a>
<span v-if="row.distributeStatus === '未分发' && hasEngineDataEditPermission() && row.versionNumber === 1" class="link-separator"></span>
<a
v-if="row.distributeStatus === '未分发' && hasEngineDataEditPermission() && row.versionNumber === 1"
href="javascript:void(0)"
class="el-link el-link--primary"
style="margin-left: 5px;"
@click.stop="handleRowDelete(row, rowIndex)"
>
删除
</a>
</div>
<div v-if="colConfig.customSlot === 'distributeStatus'" :key="index + '' + rowIndex">
<span v-if="row[colConfig.prop] === '已分发'" class="status-tag status-done">
@ -185,6 +196,7 @@
</div>
</el-upload>
<span slot="footer" class="dialog-footer">
<el-button @click="handleImportDialogClose">取消</el-button>
<el-button type="primary" :loading="importing" @click="handleImportConfirm">
开始导入
@ -328,7 +340,7 @@ export default {
label: '操作',
customSlot: 'options',
align: 'center',
width: '80',
width: '120',
fixed: 'right'
}
],
@ -429,6 +441,32 @@ export default {
this.dispatchType = 'todo' //
this.showEngineDetail = true
},
handleRowDelete(row, rowIndex) {
console.log(row, 'row')
const request = {
...api.DEL_ENGINE_MODEL,
params: {
modelId: row.id
},
disableSuccessMsg: true
}
this.$request(request)
.asyncThen((resp) => {
console.log(resp, 'resp')
this.$message({
type: 'success',
message: '删除成功'
})
this.loadData()
})
.asyncErrorCatch((err) => {
console.error('删除机型失败:', err)
this.$message({
type: 'error',
message: '删除失败'
})
})
},
pageSizeChange(size) {
this.pagination.pageSize = size
this.pagination.currentPage = 1
@ -874,4 +912,11 @@ export default {
line-height: 32px;
}
}
.link-separator {
width: 4px;
height: 14px;
}
::v-deep .el-button {
line-height: 0.85 !important;
}
</style>

View File

@ -1,5 +1,10 @@
<template>
<div class="permission-management-page custom-page">
<div class="page-header">
<div class="title">
权限管理
</div>
</div>
<div class="page-content">
<div class="header-section">
<el-button type="primary" @click="handleAddRole">
@ -2420,4 +2425,7 @@ export default {
.page-content {
width: calc(100% - 80px) !important;
}
::v-deep .el-button {
line-height: 0.85 !important;
}
</style>

View File

@ -110,9 +110,7 @@
v-for="(colConfig, index) in tableConfig.colConfigs"
v-slot:[colConfig.customHeadSlot]="{ column }"
>
<div v-if="colConfig.customHeadSlot" :key="index">
{{ column }} {{ colConfig }}
</div>
<div v-if="colConfig.customHeadSlot" :key="index"> {{ column }} {{ colConfig }} </div>
</template>
<template
@ -133,13 +131,13 @@
已完成
</span>
<span
v-else-if="row[colConfig.prop] === 'DRAFT'"
v-else-if="row[colConfig.prop] === 'DRAFT' && row.returnNum === 0"
style="background: #909399; padding: 4px 8px; color: white; border-radius: 20px;"
>
草稿
</span>
<span
v-else-if="row[colConfig.prop] === 'REJECTED'"
v-else-if="row[colConfig.prop] === 'DRAFT' && row.returnNum > 0"
style="background: #F56C6C; padding: 4px 8px; color: white; border-radius: 20px;"
>
已拒绝
@ -161,7 +159,7 @@
</a>
<span style="width: 6px; display: inline-block"></span>
<a
v-if="row.status === 'DRAFT' && hasReportEditPermission()"
v-if="row.status === 'DRAFT' && hasReportEditPermission() && row.returnNum === 0"
href="javascript:void(0)"
class="el-link el-link--primary"
@click.stop="handleEdit(row)"
@ -169,6 +167,15 @@
修改
</a>
<span style="width: 6px; display: inline-block"></span>
<a
v-if="row.status === 'DRAFT' && hasReportEditPermission() && row.returnNum > 0"
href="javascript:void(0)"
class="el-link el-link--primary"
@click.stop="handleEdit(row)"
>
重新发起
</a>
<span style="width: 6px; display: inline-block"></span>
<!-- <a
v-if="row.status === 'APPROVING'"
href="javascript:void(0)"
@ -182,7 +189,7 @@
style="width: 6px; display: inline-block"
></span> -->
<a
v-if="!row.status || row.status === '' || row.status === 'DRAFT'"
v-if=" row.status === 'DRAFT' && row.returnNum === 0"
href="javascript:void(0)"
class="el-link el-link--primary"
@click.stop="handleLaunch(row)"
@ -213,6 +220,20 @@
>
下载
</a>
<span
v-if="row.status === 'DRAFT' || row.status === 'REJECTED'"
style="width: 6px; display: inline-block"
></span>
<a
v-if="
row.status === 'DRAFT' || (row.status === 'REJECTED' && hasReportEditPermission())
"
href="javascript:void(0)"
class="el-link el-link--primary"
@click.stop="handleDelete(row)"
>
删除
</a>
</div>
</template>
@ -227,6 +248,8 @@
<report-detail
v-else
:detail="currentReportDetail"
:from-todo="fromTodo"
:can-resend="canResend"
@close="closeReportDetail"
@refresh="handleReportDetailRefresh"
/>
@ -353,6 +376,71 @@
placeholder="请输入"
/>
</el-form-item>
<!-- 流程主题 -->
<el-form-item label="流程主题" prop="processTitle">
<el-input
v-model="createFormData.processTitle"
maxlength="100"
show-word-limit
placeholder="请输入流程主题"
/>
</el-form-item>
<!-- 审批环节 -->
<el-form-item label="审批环节" prop="approvalWorkflowSteps">
<div class="approval-workflow">
<div class="workflow-table">
<table class="workflow-table-content">
<thead>
<tr>
<th class="step-name-col">
环节名称
</th>
<th class="handler-col">
处理人
</th>
</tr>
</thead>
<tbody>
<tr
v-for="(step, index) in approvalWorkflowSteps"
:key="index"
class="workflow-row"
>
<td class="step-name-cell">
<span class="step-name">
{{ step.name }}
<span v-if="step.required" class="required-mark">*</span>
</span>
</td>
<td class="handler-cell">
<el-select
v-model="step.handlers"
multiple
filterable
remote
placeholder="请选择"
:remote-method="(query) => handleRemoteSearch(query, index)"
:loading="step.loading"
class="handler-select"
@change="(value) => handleHandlerChange(index, value)"
>
<el-option
v-for="person in step.options"
:key="person.userNumber"
:value="person.userId"
:label="person.username"
>
<span class="username-text">{{ person.username }}</span>
<span class="user-id-text">{{ person.userNumber }}</span>
</el-option>
</el-select>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</el-form-item>
</el-form>
</div>
<div slot="footer" class="dialog-footer">
@ -376,9 +464,7 @@
>
<div class="dialog-body-wrapper">
<div class="approval-process-title">
<div class="description-label">
流程主题 <span class="required-mark">*</span>
</div>
<div class="description-label"> 流程主题 <span class="required-mark">*</span> </div>
<el-input
v-model="launchProcessTitle"
maxlength="100"
@ -517,6 +603,7 @@ export default {
projectNumber: '',
status: ''
},
fromTodo: false,
statusOptions: [
{ id: 'DRAFT', label: '草稿' },
{ id: 'APPROVING', label: '审批中' },
@ -529,6 +616,7 @@ export default {
selectedFile: null,
fileList: [],
uploading: false,
canResend: false,
dialogMode: 'create', // 'create' 'edit' 'restart'
currentRestartRow: null, //
currentEditRow: null, //
@ -589,7 +677,24 @@ export default {
series: [{ required: true, message: '请输入系列', trigger: 'blur' }],
marketSegment: [{ required: true, message: '请输入细分市场', trigger: 'blur' }],
projectName: [{ required: true, message: '请输入项目名称', trigger: 'blur' }],
projectNumber: [{ required: true, message: '请输入项目编号', trigger: 'blur' }]
projectNumber: [{ required: true, message: '请输入项目编号', trigger: 'blur' }],
processTitle: [{ required: true, message: '请输入流程主题', trigger: 'blur' }],
approvalWorkflowSteps: [
{
validator: (rule, value, callback) => {
const requiredStepsWithoutHandlers = this.approvalWorkflowSteps.filter(
(step) => step.required && (!step.handlers || step.handlers.length === 0)
)
if (requiredStepsWithoutHandlers.length > 0) {
const stepNames = requiredStepsWithoutHandlers.map((step) => step.name).join('、')
callback(new Error(`请为必填环节"${stepNames}"选择处理人`))
} else {
callback()
}
},
trigger: 'change'
}
]
},
approvalWorkflowSteps: [
{
@ -719,9 +824,7 @@ export default {
const parameterPer = perm.parameterPer
return (
permissionPath === '对标报告' &&
(parameterPer === 2 ||
parameterPer === '2' ||
parameterPer === '编辑')
(parameterPer === 2 || parameterPer === '2' || parameterPer === '编辑')
)
})
} catch (err) {
@ -772,8 +875,33 @@ export default {
marketSegment: '',
projectName: '',
projectNumber: '',
explanation: ''
explanation: '',
processTitle: ''
}
//
this.approvalWorkflowSteps = [
{
name: '校对',
required: true,
handlers: [],
options: [],
loading: false
},
{
name: '审核',
required: true,
handlers: [],
options: [],
loading: false
},
{
name: '批准',
required: true,
handlers: [],
options: [],
loading: false
}
]
this.fileList = []
this.selectedFile = null
this.createDialogVisible = true
@ -804,7 +932,8 @@ export default {
marketSegment: row.marketSegment || '',
projectName: row.projectName || '',
projectNumber: row.projectNumber || '',
explanation: row.explanation || ''
explanation: row.explanation || '',
processTitle: row.processTitle || ''
}
//
if (row.fileUrl || row.filePath) {
@ -818,19 +947,9 @@ export default {
this.fileList = []
}
this.selectedFile = null
this.createDialogVisible = true
//
this.$nextTick(() => {
if (this.$refs.createForm) {
this.$refs.createForm.clearValidate()
}
})
},
handleLaunch(row) {
this.currentLaunchRow = row
this.launchProcessTitle = row.title || ''
//
this.launchWorkflowSteps = [
this.approvalWorkflowSteps = [
{
name: '校对',
required: true,
@ -853,7 +972,56 @@ export default {
loading: false
}
]
this.launchDialogVisible = true
// flowIdGET_RETURN_APPROVAL
if (row.flowId) {
this.loadApprovalUsers(row.flowId)
}
this.createDialogVisible = true
//
this.$nextTick(() => {
if (this.$refs.createForm) {
this.$refs.createForm.clearValidate()
}
})
},
handleLaunch(row) {
this.currentLaunchRow = row
this.$confirm('确定发起审批吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
const submitData = {
reportId: row.reportId,
flowId: row.flowId,
userId: getUserId()
}
const request = {
...api.ADD_REPORT,
params: submitData,
disableSuccessMsg: true
}
this.$request(request)
.asyncThen((resp) => {
this.loadData() //
})
.asyncErrorCatch((err) => {
console.error('发起失败:', err)
this.$message({
type: 'error',
message: '发起失败,请重试'
})
})
})
.catch(() => {
this.$message({
type: 'info',
message: '取消发起审批'
})
})
},
handleLaunchDialogClose() {
this.launchDialogVisible = false
@ -924,17 +1092,13 @@ export default {
})
return
}
const nodeList = this.launchWorkflowSteps.map((step, index) => ({
nodeName: step.name,
assignees: step.handlers,
nodeOrder: index + 1
}))
// flowId
const flowId = this.currentLaunchRow.flowId
//
const submitData = {
processTitle: this.launchProcessTitle,
reportId: reportId,
userId: getUserId(),
nodeList: nodeList
flowId: flowId, // flowId
userId: getUserId()
}
this.launching = true
@ -1038,6 +1202,36 @@ export default {
handleLaunchHandlerChange(stepIndex, selectedIds) {
//
},
handleDelete(row) {
this.$confirm('确定删除该报告吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const request = {
...api.DELETE_REPORT,
params: {
reportId: row.reportId
},
disableSuccessMsg: true
}
this.$request(request)
.asyncThen((resp) => {
this.$message({
type: 'success',
message: '删除成功'
})
this.loadData()
})
.asyncErrorCatch((err) => {
console.error('删除失败:', err)
this.$message({
type: 'error',
message: '删除失败'
})
})
})
},
handleRestart(row) {
this.dialogMode = 'restart'
this.currentRestartRow = row
@ -1091,8 +1285,33 @@ export default {
marketSegment: '',
projectName: '',
projectNumber: '',
explanation: ''
explanation: '',
processTitle: ''
}
//
this.approvalWorkflowSteps = [
{
name: '校对',
required: true,
handlers: [],
options: [],
loading: false
},
{
name: '审核',
required: true,
handlers: [],
options: [],
loading: false
},
{
name: '批准',
required: true,
handlers: [],
options: [],
loading: false
}
]
this.fileList = []
this.selectedFile = null
if (this.$refs.createForm) {
@ -1198,42 +1417,67 @@ export default {
// dialogMode
let request
if (this.dialogMode === 'edit' && this.currentEditRow) {
const nodeList = this.approvalWorkflowSteps.map((step, index) => ({
nodeName: step.name,
assignees: step.handlers,
nodeOrder: index + 1
}))
if (
this.dialogMode === 'edit' &&
this.currentEditRow &&
this.currentEditRow.returnNum === 0
) {
// EDIT_REPORT
const reportId = this.currentEditRow.reportId || this.currentEditRow.id
//
request = {
...api.EDIT_REPORT,
params: {
reportId: reportId,
flowId: this.currentEditRow.flowId || '',
...this.createFormData,
processTitle: this.createFormData.processTitle,
nodeList: nodeList,
createBy: getUserId(),
userId: getUserId()
}
},
disableSuccessMsg: true
}
} else if (this.dialogMode === 'restart' && this.currentRestartRow) {
} else if (
this.dialogMode === 'edit' &&
this.currentEditRow &&
this.currentEditRow.returnNum > 0
) {
// RESTART_REPORT_APPROVAL
request = {
...api.RESTART_REPORT_APPROVAL,
params: {
reportId: this.currentRestartRow.id || this.currentRestartRow.reportId,
reportId: this.currentEditRow.id || this.currentEditRow.reportId,
...this.createFormData,
proofreadUsers: this.approvalWorkflowSteps[0].handlers,
reviewUsers: this.approvalWorkflowSteps[1].handlers,
countersignUsers: [],
approveUsers: this.approvalWorkflowSteps[2].handlers,
nodeList: nodeList,
createBy: getUserId(),
userId: getUserId()
}
},
disableSuccessMsg: true
}
} else {
// SAVE_REPORT
// SAVE_REPORT
const nodeList = this.approvalWorkflowSteps.map((step, index) => ({
nodeName: step.name,
assignees: step.handlers,
nodeOrder: index + 1
}))
request = {
...api.SAVE_REPORT,
params: {
...this.createFormData,
processTitle: this.createFormData.processTitle,
nodeList: nodeList,
createBy: getUserId(),
userId: getUserId()
}
},
disableSuccessMsg: true
}
}
@ -1353,6 +1597,145 @@ export default {
//
// 便 username
},
// /
loadApprovalUsers(flowId) {
if (!flowId) {
return
}
const request = {
...api.GET_REPORT_APPROVAL_USERS,
params: {
flowId: flowId
},
disableSuccessMsg: true
}
this.$request(request)
.asyncThen((resp) => {
console.log('获取审批流程信息:', resp)
this.fillApprovalUsersData(resp, this.approvalWorkflowSteps)
})
.asyncErrorCatch((err) => {
console.error('获取审批流程信息失败:', err)
})
},
//
loadLaunchApprovalUsers(flowId) {
if (!flowId) {
return
}
const request = {
...api.GET_REPORT_APPROVAL_USERS,
params: {
flowId: flowId
},
disableSuccessMsg: true
}
this.$request(request)
.asyncThen((resp) => {
console.log('获取审批流程信息:', resp)
this.fillApprovalUsersData(resp, this.launchWorkflowSteps)
// launchProcessTitle
let data = null
if (Array.isArray(resp.data)) {
data = resp.data
} else if (resp.data && !Array.isArray(resp.data)) {
data = resp.data
}
if (data && !Array.isArray(data)) {
if (data.progressTitle || data.processTitle) {
this.launchProcessTitle = data.progressTitle || data.processTitle || ''
}
}
})
.asyncErrorCatch((err) => {
console.error('获取审批流程信息失败:', err)
})
},
// approvalProgressDetail.vue
fillApprovalUsersData(resp, workflowSteps) {
//
let nodeList = []
let data = null
if (Array.isArray(resp.data)) {
data = resp.data
} else if (Array.isArray(resp.data?.data)) {
data = resp.data.data
} else if (Array.isArray(resp.data?.result)) {
data = resp.data.result
} else if (Array.isArray(resp)) {
data = resp
} else if (resp.data && !Array.isArray(resp.data)) {
data = resp.data
}
if (Array.isArray(data)) {
nodeList = data
} else if (data && Array.isArray(data.data)) {
nodeList = data.data
} else if (data && Array.isArray(data.result)) {
nodeList = data.result
} else if (data && Array.isArray(data.nodeList)) {
nodeList = data.nodeList
} else if (data && Array.isArray(data.flowNodes)) {
nodeList = data.flowNodes
}
//
if (data && !Array.isArray(data)) {
if (data.progressTitle || data.processTitle) {
if (workflowSteps === this.approvalWorkflowSteps) {
this.createFormData.processTitle = data.progressTitle || data.processTitle || ''
}
}
}
// nodeName
if (nodeList && nodeList.length > 0) {
nodeList.forEach((nodeItem) => {
const nodeName = nodeItem.nodeName || nodeItem.node || ''
if (!nodeName) {
return
}
//
const step = workflowSteps.find((s) => s.name === nodeName)
if (!step) {
return
}
// assignees
const assignees = nodeItem.assignees || []
if (!Array.isArray(assignees) || assignees.length === 0) {
return
}
// assignees id userId
const handlerInfos = assignees
.map((assignee) => {
const userId = assignee.userId || assignee.id || ''
return {
userId: userId,
username: assignee.username || '',
userNumber: assignee.userNumber || assignee.account || ''
}
})
.filter((item) => item.userId)
// handlers handlers userId
if (handlerInfos.length > 0) {
step.handlers = handlerInfos.map((h) => h.userId).filter(Boolean)
// options
step.options = handlerInfos
.map((h) => ({
userId: h.userId,
username: h.username || '',
userNumber: h.userNumber || ''
}))
.filter((opt) => opt.userId)
}
})
}
},
handleDownloadTemplate() {
// this.$message && this.$message.success && this.$message.success('')
},
@ -1461,8 +1844,15 @@ export default {
}
// reportId
// report.vuefromTodofalse
this.currentReportDetail = { reportId: reportId, flowId: row.flowId }
this.fromTodo = false
this.showReportDetail = true
if (row.returnNum > 0) {
this.canResend = true
} else {
this.canResend = false
}
},
closeReportDetail() {
this.showReportDetail = false
@ -1825,4 +2215,7 @@ export default {
margin-left: 20px;
text-align: right !important;
}
::v-deep .el-button {
line-height: 0.85 !important;
}
</style>

View File

@ -352,4 +352,7 @@ export default {
}
}
}
::v-deep .el-button {
line-height: 0.85 !important;
}
</style>

File diff suppressed because it is too large Load Diff

View File

@ -1,19 +1,11 @@
<template>
<div class="apaas-custom-page-mydemo custom-page">
<template v-if="!showReportDetail">
<!-- <div class="page-header">
<div class="page-header">
<div class="title">
报告管理
竞品报告审批流程
</div>
<div class="operation">
<x-svg-icon
:name="'refresh-icon'"
class="pointer"
style="cursor: pointer;"
@click.native="handleRefresh()"
></x-svg-icon>
</div>
</div> -->
</div>
<div class="page-search-panel">
<div class="searched-fields">
@ -1644,4 +1636,7 @@ export default {
margin-left: 20px;
text-align: right !important;
}
::v-deep .el-button {
line-height: 0.85 !important;
}
</style>

View File

@ -515,7 +515,7 @@ export default {
return
}
this.showEngineCheck = true
this.currentCheckDetail = row
this.currentCheckDetail = { ...row, flowId: row.id }
},
closeEngineCheck() {
this.showEngineCheck = false
@ -783,4 +783,7 @@ export default {
}
}
}
::v-deep .el-button {
line-height: 0.85 !important;
}
</style>

View File

@ -108,6 +108,7 @@
>
查看
</a>
<span v-if="row.distributeStatus != '已分发' && hasEngineDataEditPermission()" class="link-separator"></span>
<a
v-if="row.distributeStatus != '已分发' && hasEngineDataEditPermission()"
href="javascript:void(0)"
@ -117,6 +118,16 @@
>
分发
</a>
<span class="link-separator" v-if="row.distributeStatus === '未分发' && hasEngineDataEditPermission() && row.versionNumber === 1"></span>
<a
v-if="row.distributeStatus === '未分发' && hasEngineDataEditPermission() && row.versionNumber === 1"
href="javascript:void(0)"
class="el-link el-link--primary"
style="margin-left: 5px;"
@click.stop="handleRowDelete(row, rowIndex)"
>
删除
</a>
</div>
<div v-if="colConfig.customSlot === 'distributeStatus'" :key="index + '' + rowIndex">
<span v-if="row[colConfig.prop] === '已分发'" class="status-tag status-done">
@ -329,7 +340,7 @@ export default {
label: '操作',
customSlot: 'options',
align: 'center',
width: '80',
width: '120',
fixed: 'right'
}
],
@ -430,6 +441,32 @@ export default {
this.dispatchType = 'todo' //
this.showEngineDetail = true
},
handleRowDelete(row, rowIndex) {
console.log(row, 'row')
const request = {
...api.DEL_ENGINE_MODEL,
params: {
modelId: row.id
},
disableSuccessMsg: true
}
this.$request(request)
.asyncThen((resp) => {
console.log(resp, 'resp')
this.$message({
type: 'success',
message: '删除成功'
})
this.loadData()
})
.asyncErrorCatch((err) => {
console.error('删除机型失败:', err)
this.$message({
type: 'error',
message: '删除失败'
})
})
},
pageSizeChange(size) {
this.pagination.pageSize = size
this.pagination.currentPage = 1
@ -453,6 +490,7 @@ export default {
this.currentEngineDetail = null
this.isDispatchMode = false
this.dispatchType = 'todo'
this.loadData()
},
currentChange(currentPage) {
this.pagination.currentPage = currentPage
@ -875,4 +913,8 @@ export default {
line-height: 32px;
}
}
.link-separator {
width: 4px;
height: 14px;
}
</style>

View File

@ -1244,5 +1244,8 @@ export default {
}
}
}
::v-deep .el-button {
line-height: 0.85 !important;
}
</style>

View File

@ -2,7 +2,7 @@
<div class="apaas-custom-page-todo custom-page">
<template
v-if="
!showEngineDetail && !showEngineCheck && !showApprovalProgressDetail && !showReportDetail
!showEngineDetail && !showEngineCheck && !showApprovalProgressDetail && !showReportDetail && !showModelDetail
"
>
<div class="page-header">
@ -91,6 +91,9 @@
:dispatch-type="dispatchType"
:responsible-person-id="responsiblePersonId"
:filled-by="filledBy"
:flow-id="flowId"
:can-resend="canResend"
:from-todo="fromTodo"
class="engine-detail-wrapper"
@back="handleBackFromDetail"
/>
@ -101,6 +104,7 @@
:detail="currentEngineDetail"
:visible="showEngineCheck"
:engine-type="engineType"
:from-todo="fromTodo"
@refresh="handleBackFromCheck"
class="engine-check-wrapper"
@close="handleBackFromCheck"
@ -111,6 +115,8 @@
v-if="showApprovalProgressDetail"
:detail="currentApprovalDetail"
:visible="showApprovalProgressDetail"
:from-todo="true"
:create-by="createdById"
class="approval-progress-detail-wrapper"
@refresh="handleBackFromApprovalProgress"
@close="handleBackFromApprovalProgress"
@ -121,9 +127,26 @@
v-if="showReportDetail"
:detail="currentReportDetail"
:visible="showReportDetail"
:from-todo="fromTodo"
:can-resend="canResend"
class="report-detail-wrapper"
@close="handleBackFromReport"
/>
<!-- 模板详情组件 -->
<model-detail
v-if="showModelDetail"
:template-id="currentTemplateId"
:change-id="currentTemplateRowId"
:template-name="currentTemplateName"
:template-version="currentVersion"
:version-list="versionList"
:flow-id="flowId"
:detail="currentDetail"
:template-management-permissions="templateManagementPermissions"
:from-todo="true"
class="model-detail-wrapper"
@back="handleBackFromTodoDetail"
/>
</div>
</template>
@ -132,6 +155,7 @@ import EngineDetail from './engineDetail.vue'
import EngineCheck from './engineCheck.vue'
import ApprovalProgressDetail from './approvalProgressDetail.vue'
import ReportDetail from './reportDetail.vue'
import ModelDetail from './modelDetail.vue'
import { getUserId } from '@/utils'
import api from '@/api/demo'
export default {
@ -140,14 +164,26 @@ export default {
EngineDetail,
EngineCheck,
ApprovalProgressDetail,
ReportDetail
ReportDetail,
ModelDetail
},
data: function() {
return {
tableData: [],
pagination: { currentPage: 1, pageSize: 10, total: 0 },
showEngineDetail: false,
canResend: false,
showEngineCheck: false,
showModelDetail: false,
currentTemplateId: '',
currentTemplateRowId: '',
currentTemplateName: '',
currentVersion: '',
versionList: [],
currentDetail: null,
flowId: '',
createdById: '',
templateManagementPermissions: [],
currentModel: '',
currentEngineModelID: '',
currentEngineDetail: null,
@ -159,7 +195,8 @@ export default {
showApprovalProgressDetail: false, //
currentApprovalDetail: null, //
showReportDetail: false, //
currentReportDetail: null //
currentReportDetail: null, //
fromTodo: true // true
}
},
computed: {
@ -168,8 +205,14 @@ export default {
rowDraggable: false,
colConfigs: [
// { prop: 'documentNo', label: '', showOverflowTooltip: true, minWidth: '140' },
{ prop: 'processTitle', label: '流程主题', showOverflowTooltip: true, minWidth: '160', customSlot: 'processTitle' },
{ prop: 'currentNode', label: '当前环节', showOverflowTooltip: true, minWidth: '140' },
{
prop: 'processTitle',
label: '流程主题',
showOverflowTooltip: true,
minWidth: '200',
customSlot: 'processTitle'
},
{ prop: 'currentNode', label: '当前环节', showOverflowTooltip: true, minWidth: '120' },
// { prop: 'statusCode', label: '', showOverflowTooltip: true, minWidth: '120' },
// { prop: 'modelName', label: '', showOverflowTooltip: true, minWidth: '120' },
{
@ -183,7 +226,7 @@ export default {
prop: 'creationDate',
label: '创建时间',
showOverflowTooltip: true,
minWidth: '160',
minWidth: '150',
align: 'center',
formatter: this.formatDateTime
},
@ -204,6 +247,7 @@ export default {
},
mounted() {
this.loadData()
this.filterTemplateManagementPermissions()
},
methods: {
pageSizeChange(size) {
@ -214,7 +258,7 @@ export default {
rowClickEvent(row) {
console.warn(row)
},
//退
// 退
handleRowBack(row) {
this.$confirm('确定退回吗?', '提示', {
confirmButtonText: '确定',
@ -246,6 +290,55 @@ export default {
this.$message.info('已取消')
})
},
filterTemplateManagementPermissions() {
try {
const permissionDataStr = localStorage.getItem('user_self_role')
if (!permissionDataStr) {
this.templateManagementPermissions = []
return
}
const permissionData = JSON.parse(permissionDataStr)
if (!Array.isArray(permissionData)) {
this.templateManagementPermissions = []
return
}
// menuPath "/"
this.templateManagementPermissions = permissionData.filter((perm) => {
return perm.menuPath === '数据录入/模板管理'
})
console.log('模板管理权限数据:', this.templateManagementPermissions)
} catch (err) {
console.error('过滤模板管理权限失败:', err)
this.templateManagementPermissions = []
}
},
loadVersionList(row) {
const templateRowId = row && (row.rowId || row.templateRowId || row.id)
if (!templateRowId) {
this.versionList = []
return
}
const request = {
...api.CHECK_MODEL_VERISON,
params: {
templateRowId
},
disableSuccessMsg: true
}
this.$request(request, false)
.asyncThen((resp) => {
const list =
(resp && resp.data && (resp.data.result || resp.data.list || resp.data)) || []
this.versionList = Array.isArray(list) ? list : []
})
.asyncErrorCatch((err) => {
console.error('获取版本列表失败:', err)
this.versionList = []
})
},
handleRowView(row) {
//
const dataType = row.dataType || ''
@ -254,27 +347,89 @@ export default {
const isInApprovalMode = dataType === '数据审批'
const isModelCheck = dataType === '模板审核'
const isReportCheck = dataType === '对标报告审核'
const isRejectedReportMode = dataType === '对标报告拒绝'
const isRejectedModelMode = dataType === '模板拒绝'
const isRejectedApprovalMode = dataType === '数据拒绝'
//
this.currentModel = row.modelName || row.productFullName || ''
// engineModelID
this.currentEngineModelID = row.modelId
// ""
if (isInApprovalMode) {
this.currentEngineDetail = { ...row, id: row.documentNo }
if (isRejectedModelMode) {
const request = {
...api.GET_MODEL_BY_ID,
params: {
templateId: row.modelId
},
disableSuccessMsg: true
}
this.$request(request)
.asyncThen((resp) => {
console.log(resp)
const templateData = resp.data
// 使 modelContorl.vue
this.currentTemplateId = row.modelId
this.currentTemplateRowId = templateData.id
this.currentTemplateName = templateData.templateName || ''
this.currentVersion = templateData.version || ''
// detail flowId status
this.currentDetail = {
status: templateData.status || '',
flowId: row.documentNo || '',
changeId: this.currentTemplateRowId
}
this.flowId = row.documentNo || ''
// modelContorl.vue
this.loadVersionList({
rowId: this.currentTemplateId,
id: this.currentTemplateRowId,
templateRowId: this.currentTemplateId
})
//
if (this.templateManagementPermissions.length === 0) {
this.filterTemplateManagementPermissions()
}
this.showModelDetail = true
this.showEngineDetail = false
this.showEngineCheck = false
this.showApprovalProgressDetail = false
this.showReportDetail = false
})
.asyncErrorCatch((err) => {
console.error('获取模板详情失败:', err)
this.$message.error('获取模板详情失败')
})
return
} else if (isRejectedApprovalMode) {
// "" engineDetail
this.currentEngineDetail = { ...row, flowId: row.documentNo, id: row.modelId }
this.flowId = row.documentNo || ''
this.showEngineDetail = true
this.canResend = true
this.showEngineCheck = false
this.showApprovalProgressDetail = false
this.showReportDetail = false
this.showModelDetail = false
this.fromTodo = true
//
this.engineType = row.dataType === '竞品' ? '竞品' : '玉柴'
return
} else if (isInApprovalMode) {
// ""
this.currentEngineDetail = { ...row, flowId: row.documentNo, id: row.documentNo }
this.showEngineCheck = true
this.showEngineDetail = false
this.canResend = false
this.fromTodo = true
this.showApprovalProgressDetail = false
this.showReportDetail = false
//
// dataType
this.engineType = row.dataType === '竞品' ? '竞品' : '玉柴'
return
}
// ""
if (isModelCheck) {
} else if (isModelCheck) {
this.createdById = row.createdById || ''
// ""
this.showApprovalProgressDetail = true
this.showEngineDetail = false
this.showEngineCheck = false
@ -286,11 +441,11 @@ export default {
...row
}
return
}
// ""
if (isReportCheck) {
} else if (isReportCheck) {
this.fromTodo = true
// ""
this.showReportDetail = true
this.canResend = false
this.showEngineDetail = false
this.showEngineCheck = false
this.showApprovalProgressDetail = false
@ -301,17 +456,28 @@ export default {
...row
}
return
}
// ""
// ""UPDATE_PARAM
//
if (isFillParameterMode) {
} else if (isRejectedReportMode) {
this.fromTodo = false // report.vue
this.showReportDetail = true
this.canResend = true
this.showEngineDetail = false
this.showEngineCheck = false
this.showApprovalProgressDetail = false
// report.vue
const reportId = row.modelId || row.reportId || row.id
this.currentReportDetail = { reportId: reportId, flowId: row.documentNo || row.flowId }
return
} else if (isFillParameterMode) {
// ""
// ""UPDATE_PARAM
//
this.currentEngineDetail = { ...row, id: row.modelId }
// filledBy
this.isDispatchMode = false
this.canResend = false
this.dispatchType = 'todo'
this.filledBy = row.ownerId || ''
this.flowId = row.documentNo || ''
this.responsiblePersonId = ''
} else if (isResponsibleDispatchMode) {
this.currentEngineDetail = { ...row, id: row.modelId }
@ -332,6 +498,10 @@ export default {
this.showApprovalProgressDetail = false
this.showReportDetail = false
},
handleBackFromTodoDetail() {
this.showModelDetail = false
this.loadData() //
},
handleBackFromDetail() {
this.showEngineDetail = false
this.currentModel = ''
@ -501,5 +671,17 @@ export default {
flex-direction: column;
min-height: 0;
}
.model-detail-wrapper {
width: 100%;
height: 100%;
flex: 1;
display: flex;
flex-direction: column;
min-height: 0;
}
}
::v-deep .el-button {
line-height: 0.85 !important;
}
</style>

View File

@ -99,6 +99,7 @@ export default {
this.$emit('version-click', {
version: version,
changeId: version.id,
returnNum: version.returnNum,
templateId: version.rowId || (this.currentRow && (this.currentRow.rowId || this.currentRow.templateRowId || this.currentRow.id)),
template: this.currentRow,
versionList: this.versionList //