提交修改
This commit is contained in:
parent
9190eabe59
commit
3d7ee782b1
145056
apaas-custom-mydemo/apaas-custom-mydemo.common.js
Normal file
145056
apaas-custom-mydemo/apaas-custom-mydemo.common.js
Normal file
File diff suppressed because one or more lines are too long
1
apaas-custom-mydemo/apaas-custom-mydemo.css
Normal file
1
apaas-custom-mydemo/apaas-custom-mydemo.css
Normal file
File diff suppressed because one or more lines are too long
145066
apaas-custom-mydemo/apaas-custom-mydemo.umd.js
Normal file
145066
apaas-custom-mydemo/apaas-custom-mydemo.umd.js
Normal file
File diff suppressed because one or more lines are too long
19
apaas-custom-mydemo/apaas-custom-mydemo.umd.min.js
vendored
Normal file
19
apaas-custom-mydemo/apaas-custom-mydemo.umd.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
146
apaas-custom-mydemo/apaas.json
Normal file
146
apaas-custom-mydemo/apaas.json
Normal 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"
|
||||||
|
}
|
||||||
10
apaas-custom-mydemo/demo.html
Normal file
10
apaas-custom-mydemo/demo.html
Normal 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>
|
||||||
BIN
apaas-custom-mydemo/static/custom/apaas-custom-mydemo/1.jpg
Normal file
BIN
apaas-custom-mydemo/static/custom/apaas-custom-mydemo/1.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
52
src/api/demo/activiti.js
Normal file
52
src/api/demo/activiti.js
Normal 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
47
src/api/demo/data.js
Normal 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'
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -18,109 +18,13 @@ export default {
|
|||||||
url: '/custom/support/demo/getPerson',
|
url: '/custom/support/demo/getPerson',
|
||||||
method: 'get'
|
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: {
|
TEST_FILE_UPLOAD: {
|
||||||
url: '/custom/benchmark/uploadFile',
|
url: '/custom/benchmark/uploadFile',
|
||||||
method: 'post'
|
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: {
|
SELECT_USER_BY_DEPT: {
|
||||||
url: '/custom/responsible/getUserByDepartmentId',
|
url: '/custom/responsible/getUserByDepartmentId',
|
||||||
@ -172,77 +76,16 @@ export default {
|
|||||||
url: '/custom/responsible/getDeptFilled',
|
url: '/custom/responsible/getDeptFilled',
|
||||||
method: 'get'
|
method: 'get'
|
||||||
},
|
},
|
||||||
GET_REPORT_LIST: {
|
|
||||||
url: '/custom/benchmark/getReportAndTodoByCondition',
|
DEL_MODEL: {
|
||||||
method: 'post'
|
url: '/custom/template/deleteTemplate',
|
||||||
},
|
|
||||||
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'
|
method: 'get'
|
||||||
},
|
},
|
||||||
GET_REPORT_DETAIL_PROCESS: {
|
DEL_ENGINE_MODEL: {
|
||||||
url: '/custom/benchmark/getReportProcess',
|
url: '/custom/dataEntryEngineModel/delete',
|
||||||
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'
|
method: 'get'
|
||||||
},
|
},
|
||||||
|
|
||||||
DELETE_PERMISSION_DATA: {
|
|
||||||
url: '/custom/permission/deleteRole',
|
|
||||||
method: 'get'
|
|
||||||
},
|
|
||||||
GET_ALL_DATA_SYSTEAM_LIST: {
|
GET_ALL_DATA_SYSTEAM_LIST: {
|
||||||
url: '/custom/common/getSystemAndPara',
|
url: '/custom/common/getSystemAndPara',
|
||||||
method: 'get'
|
method: 'get'
|
||||||
@ -263,52 +106,6 @@ export default {
|
|||||||
url: '/custom/common/insertModelCommon',
|
url: '/custom/common/insertModelCommon',
|
||||||
method: 'post'
|
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: {
|
HANDLE_FILLER_BACK: {
|
||||||
url: '/custom/todoTaskPojo/todoReturn',
|
url: '/custom/todoTaskPojo/todoReturn',
|
||||||
@ -353,71 +150,12 @@ export default {
|
|||||||
url: '/custom/todoTaskPojo/createResPerson?userID=',
|
url: '/custom/todoTaskPojo/createResPerson?userID=',
|
||||||
method: 'post'
|
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: {
|
GET_ENGINE_VERSIONS: {
|
||||||
url: '/custom/engineParamDetailPojo/selectVersionList',
|
url: '/custom/engineParamDetailPojo/selectVersionList',
|
||||||
method: 'post'
|
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: {
|
TEXT_DEMO: {
|
||||||
url: '/custom/delete/submitApproval',
|
url: '/custom/delete/submitApproval',
|
||||||
method: 'get'
|
method: 'get'
|
||||||
@ -426,6 +164,26 @@ export default {
|
|||||||
url: '/custom/analysis/showReport',
|
url: '/custom/analysis/showReport',
|
||||||
method: 'post'
|
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: {
|
GET_MODEL_QUERY: {
|
||||||
url: '/custom/tcDataQuery/tcDataSelectByPartsNames',
|
url: '/custom/tcDataQuery/tcDataSelectByPartsNames',
|
||||||
method: 'post'
|
method: 'post'
|
||||||
@ -462,4 +220,10 @@ export default {
|
|||||||
url: '/custom/responsible/getImportTemplate',
|
url: '/custom/responsible/getImportTemplate',
|
||||||
method: 'get'
|
method: 'get'
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 修改流程主题
|
||||||
|
EDIT_DATA_PROCESS_TITLE: {
|
||||||
|
url: '/custom/activiti/updateFlowTitle',
|
||||||
|
method: 'get'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
128
src/api/demo/model.js
Normal file
128
src/api/demo/model.js
Normal 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'
|
||||||
|
}
|
||||||
|
}
|
||||||
68
src/api/demo/permission.js
Normal file
68
src/api/demo/permission.js
Normal 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
66
src/api/demo/report.js
Normal 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'
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -12,7 +12,12 @@ import AdminApi from './admin'
|
|||||||
import PersonalApi from './personal'
|
import PersonalApi from './personal'
|
||||||
import WorkbenchApi from './workbench'
|
import WorkbenchApi from './workbench'
|
||||||
import AppPage from './app-page'
|
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 {
|
export default {
|
||||||
...CommonApi,
|
...CommonApi,
|
||||||
@ -21,5 +26,10 @@ export default {
|
|||||||
...PersonalApi,
|
...PersonalApi,
|
||||||
...WorkbenchApi,
|
...WorkbenchApi,
|
||||||
...AppPage,
|
...AppPage,
|
||||||
...demoApi
|
...demoApi,
|
||||||
|
...dataApi,
|
||||||
|
...modelApi,
|
||||||
|
...reportApi,
|
||||||
|
...activitiApi,
|
||||||
|
...permissionApi
|
||||||
}
|
}
|
||||||
|
|||||||
@ -42,7 +42,6 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
|
|
||||||
<el-form-item label="项目名称" prop="projectName">
|
<el-form-item label="项目名称" prop="projectName">
|
||||||
<el-input v-model="formData.projectName" placeholder="请输入" maxlength="100" />
|
<el-input v-model="formData.projectName" placeholder="请输入" maxlength="100" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|||||||
@ -1,6 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="apaas-custom-page-mydemo custom-page">
|
<div class="apaas-custom-page-mydemo custom-page">
|
||||||
<template v-if="!showProgressDetail">
|
<template v-if="!showProgressDetail">
|
||||||
|
<div class="page-header">
|
||||||
|
<div class="title">
|
||||||
|
参数模板审批流程
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="page-search-panel">
|
<div class="page-search-panel">
|
||||||
<el-form class="search-list">
|
<el-form class="search-list">
|
||||||
<div class="search-component">
|
<div class="search-component">
|
||||||
@ -648,4 +653,7 @@ export default {
|
|||||||
color: #dcdfe6;
|
color: #dcdfe6;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
::v-deep .el-button {
|
||||||
|
line-height: 0.85 !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -1377,4 +1377,7 @@ export default {
|
|||||||
margin-left: 20px;
|
margin-left: 20px;
|
||||||
text-align: right !important;
|
text-align: right !important;
|
||||||
}
|
}
|
||||||
|
::v-deep .el-button {
|
||||||
|
line-height: 0.85 !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -56,9 +56,12 @@
|
|||||||
/>
|
/>
|
||||||
<template v-if="!isEditMode && !isJustCheckMode">
|
<template v-if="!isEditMode && !isJustCheckMode">
|
||||||
<el-button size="small" @click="handleEdit">编辑</el-button>
|
<el-button size="small" @click="handleEdit">编辑</el-button>
|
||||||
<el-button type="primary" size="small" @click="handleInitiateApproval"
|
<el-button v-if="shouldShowResendButton" size="small" :loading="resending" @click="handleResend">
|
||||||
>发起审批</el-button
|
直送
|
||||||
>
|
</el-button>
|
||||||
|
<el-button type="primary" size="small" @click="handleInitiateApproval">
|
||||||
|
{{ shouldShowResendButton ? '重新发起' : '发起审批' }}
|
||||||
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="isEditMode">
|
<template v-else-if="isEditMode">
|
||||||
<el-button size="small" @click="handleSaveEdit">保存编辑</el-button>
|
<el-button size="small" @click="handleSaveEdit">保存编辑</el-button>
|
||||||
@ -217,7 +220,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- 填写人列:只在非分发模式下显示,只读 -->
|
<!-- 填写人列:只在非分发模式下显示,只读 -->
|
||||||
<div v-if="!isDispatchMode && !isEditMode" class="cell">
|
<div v-if="!isDispatchMode && !isEditMode" class="cell">
|
||||||
<span>{{ row.filledBy || '-' }}</span>
|
<span>{{ row.filledByName || row.filledBy || '-' }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -228,6 +231,40 @@
|
|||||||
|
|
||||||
<!-- 审批内容区域 -->
|
<!-- 审批内容区域 -->
|
||||||
<div v-if="isApprovalMode" class="page-approval-content">
|
<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 class="approval-content">
|
||||||
<!-- 变更数据表格 -->
|
<!-- 变更数据表格 -->
|
||||||
<div
|
<div
|
||||||
@ -402,6 +439,10 @@ export default {
|
|||||||
type: String,
|
type: String,
|
||||||
default: ''
|
default: ''
|
||||||
},
|
},
|
||||||
|
canResend: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
isDispatchMode: {
|
isDispatchMode: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
@ -425,6 +466,14 @@ export default {
|
|||||||
type: String,
|
type: String,
|
||||||
default: ''
|
default: ''
|
||||||
},
|
},
|
||||||
|
flowId: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
fromTodo: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
// 机型详情信息(包含 modelName 和 projectNumber)
|
// 机型详情信息(包含 modelName 和 projectNumber)
|
||||||
detail: {
|
detail: {
|
||||||
type: Object,
|
type: Object,
|
||||||
@ -460,6 +509,8 @@ export default {
|
|||||||
isApprovalMode: false, // 发起审批模式状态
|
isApprovalMode: false, // 发起审批模式状态
|
||||||
engineDetailInfo: null, // 机型详情信息(包含 modelName 和 projectNumber)
|
engineDetailInfo: null, // 机型详情信息(包含 modelName 和 projectNumber)
|
||||||
wholeEngineParamsRawData: [], // 存储"整车参数"的原始第三级数据(数组格式)
|
wholeEngineParamsRawData: [], // 存储"整车参数"的原始第三级数据(数组格式)
|
||||||
|
flowNodes: [], // 审批流程节点数据
|
||||||
|
progressDetailData: {}, // 审批流程详情数据
|
||||||
approvalFormData: {
|
approvalFormData: {
|
||||||
processTitle: '',
|
processTitle: '',
|
||||||
description: ''
|
description: ''
|
||||||
@ -467,6 +518,9 @@ export default {
|
|||||||
dispatchLoading: false, // 分发loading状态
|
dispatchLoading: false, // 分发loading状态
|
||||||
approvalSubmitting: false, // 审批提交loading状态
|
approvalSubmitting: false, // 审批提交loading状态
|
||||||
approvalChangeData: [], // 审批变更数据
|
approvalChangeData: [], // 审批变更数据
|
||||||
|
resending: false, // 直送提交loading状态
|
||||||
|
isResendMode: false, // 是否为重新发起模式
|
||||||
|
resendApprovalData: null, // 重新发起时保存的审批流程数据
|
||||||
approvalWorkflowSteps: [
|
approvalWorkflowSteps: [
|
||||||
{
|
{
|
||||||
name: '校对',
|
name: '校对',
|
||||||
@ -558,6 +612,64 @@ export default {
|
|||||||
return {
|
return {
|
||||||
整车参数: params
|
整车参数: 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: {
|
watch: {
|
||||||
@ -609,6 +721,12 @@ export default {
|
|||||||
this.loadFillerPersons()
|
this.loadFillerPersons()
|
||||||
// 加载树数据
|
// 加载树数据
|
||||||
this.loadTreeData()
|
this.loadTreeData()
|
||||||
|
// 检查是否可以直送(如果是从待办页面进入且有 flowId,或者 detail 中有 flowId)
|
||||||
|
const flowId = this.detail?.flowId || this.flowId
|
||||||
|
if (flowId) {
|
||||||
|
console.log('flowId', flowId)
|
||||||
|
this.canResendApproval()
|
||||||
|
}
|
||||||
// this.loadEngineDetailInfo()
|
// this.loadEngineDetailInfo()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -1051,6 +1169,23 @@ export default {
|
|||||||
console.log('handleBack called')
|
console.log('handleBack called')
|
||||||
this.$emit('back')
|
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() {
|
onVersionChange() {
|
||||||
// 切换版本时,如果处于编辑模式,退出编辑模式并恢复原始数据
|
// 切换版本时,如果处于编辑模式,退出编辑模式并恢复原始数据
|
||||||
if (this.isEditMode) {
|
if (this.isEditMode) {
|
||||||
@ -2298,7 +2433,8 @@ export default {
|
|||||||
url: api.EXPORT_TEMPLATE.url,
|
url: api.EXPORT_TEMPLATE.url,
|
||||||
method: api.EXPORT_TEMPLATE.method,
|
method: api.EXPORT_TEMPLATE.method,
|
||||||
params: {
|
params: {
|
||||||
engineModelID: this.detail.id
|
engineModelID: this.detail.id,
|
||||||
|
userId: getUserId()
|
||||||
},
|
},
|
||||||
responseType: 'blob' // 设置响应类型为 blob
|
responseType: 'blob' // 设置响应类型为 blob
|
||||||
}
|
}
|
||||||
@ -2412,6 +2548,7 @@ export default {
|
|||||||
const formData = new FormData()
|
const formData = new FormData()
|
||||||
formData.append('file', file)
|
formData.append('file', file)
|
||||||
formData.append('modelId', this.detail.id)
|
formData.append('modelId', this.detail.id)
|
||||||
|
formData.append('userId', getUserId())
|
||||||
|
|
||||||
const request = {
|
const request = {
|
||||||
...api.IMPORT_ENGINE_MODEL,
|
...api.IMPORT_ENGINE_MODEL,
|
||||||
@ -2479,6 +2616,9 @@ export default {
|
|||||||
} else if (this.filledBy) {
|
} else if (this.filledBy) {
|
||||||
// 如果是填写发动机参数值模式(从 todo 页面传递),传递 filledBy
|
// 如果是填写发动机参数值模式(从 todo 页面传递),传递 filledBy
|
||||||
params.filledById = this.filledBy
|
params.filledById = this.filledBy
|
||||||
|
} else if (this.fromTodo && this.canResend) {
|
||||||
|
// 如果从 todo 页面以 isRejectedApprovalMode(数据拒绝)进入,传递 filledById
|
||||||
|
params.filledById = currentUserId
|
||||||
}
|
}
|
||||||
|
|
||||||
// 如果是批量修改责任人的分发责任人页面,添加 isRes 参数
|
// 如果是批量修改责任人的分发责任人页面,添加 isRes 参数
|
||||||
@ -2575,15 +2715,24 @@ export default {
|
|||||||
)
|
)
|
||||||
|
|
||||||
const resPersonId = item.resPersonId || item.responsiblePersonId || item.filledBy || ''
|
const resPersonId = item.resPersonId || item.responsiblePersonId || item.filledBy || ''
|
||||||
const filledBy = item.filledBy || item.responsiblePersonId || ''
|
// 处理填写人:优先使用 filler 对象,如果没有则使用 filledBy 字段
|
||||||
// 处理 department 字段,将 · 替换为 -
|
let filledBy = ''
|
||||||
const department = (item.department || '平台部').replace(/·/g, '-')
|
|
||||||
// 处理 filledByUserId:如果 filledBy 有值,直接使用 filledBy(userId)
|
|
||||||
let filledByUserId = ''
|
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) {
|
if (filledBy) {
|
||||||
// filledByUserId 存储 userId(与 filledBy 保持一致)
|
|
||||||
filledByUserId = filledBy
|
filledByUserId = filledBy
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
// 处理 department 字段,将 · 替换为 -
|
||||||
|
const department = (item.department || '平台部').replace(/·/g, '-')
|
||||||
|
|
||||||
// 根据子系统和部门查找责任人(默认赋值)
|
// 根据子系统和部门查找责任人(默认赋值)
|
||||||
// 从 GET_MANAGER_DATA 的返回值中查找匹配的责任人
|
// 从 GET_MANAGER_DATA 的返回值中查找匹配的责任人
|
||||||
@ -2648,7 +2797,32 @@ export default {
|
|||||||
version: this.currentVersionId,
|
version: this.currentVersionId,
|
||||||
resPersonId: finalResPersonId, // 责任人ID(使用 userId)
|
resPersonId: finalResPersonId, // 责任人ID(使用 userId)
|
||||||
filledBy: filledBy, // 填写人ID(userId,用于提交)
|
filledBy: filledBy, // 填写人ID(userId,用于提交)
|
||||||
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) {
|
if (existingIndex >= 0) {
|
||||||
@ -2664,6 +2838,38 @@ export default {
|
|||||||
console.log('处理后的数据:', this.versionData[this.currentVersionId])
|
console.log('处理后的数据:', this.versionData[this.currentVersionId])
|
||||||
},
|
},
|
||||||
handleInitiateApproval() {
|
handleInitiateApproval() {
|
||||||
|
// 如果是重新发起模式(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.isApprovalMode = true
|
||||||
// 重置表单数据
|
// 重置表单数据
|
||||||
@ -2706,6 +2912,7 @@ export default {
|
|||||||
loading: false
|
loading: false
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
getApprovalChange() {
|
getApprovalChange() {
|
||||||
const request = {
|
const request = {
|
||||||
@ -2733,6 +2940,79 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
this.approvalChangeData = []
|
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) => {
|
.asyncErrorCatch((err) => {
|
||||||
console.error('获取审批变更失败:', err)
|
console.error('获取审批变更失败:', err)
|
||||||
@ -2746,6 +3026,8 @@ export default {
|
|||||||
handleApprovalCancel() {
|
handleApprovalCancel() {
|
||||||
// 取消审批,退出审批模式
|
// 取消审批,退出审批模式
|
||||||
this.isApprovalMode = false
|
this.isApprovalMode = false
|
||||||
|
this.isResendMode = false
|
||||||
|
this.resendApprovalData = null
|
||||||
// 重置表单数据
|
// 重置表单数据
|
||||||
this.approvalFormData = {
|
this.approvalFormData = {
|
||||||
processTitle: '',
|
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 => {
|
||||||
|
// 提取需要的字段:username、userNumber,并将 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() {
|
handleApprovalFormSubmit() {
|
||||||
// 验证必填环节是否已选择处理人(会签不是必填)
|
// 验证必填环节是否已选择处理人(会签不是必填)
|
||||||
const requiredStepsWithoutHandlers = this.approvalWorkflowSteps.filter(
|
const requiredStepsWithoutHandlers = this.approvalWorkflowSteps.filter(
|
||||||
@ -2860,6 +3295,7 @@ export default {
|
|||||||
// 调用发起审批接口
|
// 调用发起审批接口
|
||||||
const request = {
|
const request = {
|
||||||
...api.START_ENGINE_CHECK,
|
...api.START_ENGINE_CHECK,
|
||||||
|
flowId: this.flowId || '',
|
||||||
params: submitData,
|
params: submitData,
|
||||||
disableSuccessMsg: true
|
disableSuccessMsg: true
|
||||||
}
|
}
|
||||||
@ -3084,6 +3520,7 @@ export default {
|
|||||||
.page-approval-content {
|
.page-approval-content {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
@ -3091,6 +3528,60 @@ export default {
|
|||||||
overflow-x: hidden;
|
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 {
|
.page-footer {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
@ -3109,10 +3600,10 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.left-tree-panel {
|
.left-tree-panel {
|
||||||
width: 200px;
|
width: 230px;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
border: 1px solid #ebeef5;
|
border: 1px solid #ebeef5;
|
||||||
padding: 12px;
|
padding: 8px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
overflow-y: auto !important;
|
overflow-y: auto !important;
|
||||||
.tree-search-header {
|
.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>
|
</style>
|
||||||
|
|||||||
@ -2,6 +2,9 @@
|
|||||||
<div class="manager-data-page custom-page">
|
<div class="manager-data-page custom-page">
|
||||||
<div class="page-content">
|
<div class="page-content">
|
||||||
<div class="header-section">
|
<div class="header-section">
|
||||||
|
<div class="title">
|
||||||
|
责任人管理
|
||||||
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<el-button type="primary" @click="handleAdd">
|
<el-button type="primary" @click="handleAdd">
|
||||||
新增
|
新增
|
||||||
@ -1278,4 +1281,7 @@ export default {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
::v-deep .el-button {
|
||||||
|
line-height: 0.85 !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -92,14 +92,14 @@
|
|||||||
@click="handleRemoveModel(index)"
|
@click="handleRemoveModel(index)"
|
||||||
></i>
|
></i>
|
||||||
<div v-else class="add-model-placeholder" @click="handleAddModel">
|
<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>
|
<span>添加机型</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</th>
|
</th>
|
||||||
<th class="add-column">
|
<th class="add-column">
|
||||||
<div class="add-model-placeholder" @click="handleAddModel">
|
<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>
|
<span>添加机型</span>
|
||||||
</div>
|
</div>
|
||||||
</th>
|
</th>
|
||||||
@ -354,19 +354,15 @@ export default {
|
|||||||
paramList.forEach((item) => {
|
paramList.forEach((item) => {
|
||||||
const parameterName = item.parameterName || ''
|
const parameterName = item.parameterName || ''
|
||||||
const parameterId = item.parameterId || ''
|
const parameterId = item.parameterId || ''
|
||||||
|
// 使用原始的partsName,不进行归一化处理,实现精确匹配
|
||||||
const partsName = item.partsName || ''
|
const partsName = item.partsName || ''
|
||||||
|
// 用于显示的零部件名称(保持原值)
|
||||||
|
const displayPartsName = partsName
|
||||||
|
|
||||||
if (parameterName) {
|
if (parameterName) {
|
||||||
// 确定用于匹配和显示的零部件名称(partsName)
|
|
||||||
// 如果 partsName 是 `/`、空白或没有,都视为零部件名称为 `/` 的参数
|
|
||||||
// 显示时为空,但匹配时使用 `/` 进行匹配
|
|
||||||
const normalizedPartsName =
|
|
||||||
!partsName || partsName.trim() === '' || partsName === '/' ? '/' : partsName
|
|
||||||
const displayPartsName = normalizedPartsName
|
|
||||||
|
|
||||||
// 检查是否匹配选中的零部件名称
|
// 检查是否匹配选中的零部件名称
|
||||||
// 如果选中了父节点(子系统),则显示该子系统下的所有参数
|
// 如果选中了父节点(子系统),则显示该子系统下的所有参数
|
||||||
// 如果选中了子节点(零部件),则只显示匹配的零部件参数
|
// 如果选中了子节点(零部件),则只显示匹配的零部件参数(精确匹配)
|
||||||
let shouldInclude = false
|
let shouldInclude = false
|
||||||
|
|
||||||
// 检查该子系统是否被直接选中(作为父节点,没有子节点被选中)
|
// 检查该子系统是否被直接选中(作为父节点,没有子节点被选中)
|
||||||
@ -390,27 +386,44 @@ export default {
|
|||||||
|
|
||||||
if (isSubsystemDirectlySelected) {
|
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 {
|
} else {
|
||||||
// 如果有子节点被选中,只显示匹配的零部件参数
|
// 如果不存在匹配的子节点,显示该参数(该参数不属于任何子节点)
|
||||||
// 检查是否在 parameterTypes 中,或者是否在 subsystemTypes 中(格式:子系统名称-零部件名称)
|
shouldInclude = true
|
||||||
// 对于 partsName 是 `/`、空白或没有的情况,都匹配到 label 为 `/` 的节点
|
}
|
||||||
|
} else {
|
||||||
|
// 如果有子节点被选中,只显示匹配的零部件参数(精确匹配)
|
||||||
shouldInclude = false
|
shouldInclude = false
|
||||||
|
|
||||||
// 检查是否在 parameterTypes 中(直接匹配零部件名称)
|
// 检查是否在 parameterTypes 中(精确匹配零部件名称)
|
||||||
if (parameterTypes.includes(normalizedPartsName)) {
|
if (parameterTypes.includes(partsName)) {
|
||||||
shouldInclude = true
|
shouldInclude = true
|
||||||
}
|
}
|
||||||
|
|
||||||
// 检查是否在 subsystemTypes 中(格式:子系统名称-零部件名称)
|
// 检查是否在 subsystemTypes 中(格式:子系统名称-零部件名称,精确匹配)
|
||||||
if (!shouldInclude) {
|
if (!shouldInclude) {
|
||||||
// 对于零部件名称为 `/`、空白或没有的情况,匹配 subsystemTypes 中的 `子系统名称-/`
|
shouldInclude = subsystemTypes.includes(`${subsystemName}-${partsName}`)
|
||||||
if (normalizedPartsName === '/') {
|
|
||||||
shouldInclude = subsystemTypes.includes(`${subsystemName}-/`)
|
|
||||||
} else {
|
|
||||||
// 对于其他零部件名称,直接匹配
|
|
||||||
shouldInclude = subsystemTypes.includes(`${subsystemName}-${normalizedPartsName}`)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -783,8 +796,11 @@ export default {
|
|||||||
// 批量加载选中机型的详情
|
// 批量加载选中机型的详情
|
||||||
const loadPromises = this.selectedModels.map((model) => {
|
const loadPromises = this.selectedModels.map((model) => {
|
||||||
const modelId = model.id || model.rowId || model.engineModelID
|
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 || '',
|
modelName: model.modelName || model.productFullName || '',
|
||||||
productNumber: model.productNumber || '',
|
productNumber: model.productNumber || '',
|
||||||
plate: model.plate || '',
|
plate: model.plate || '',
|
||||||
@ -795,7 +811,7 @@ export default {
|
|||||||
projectNumber: model.projectNumber || '',
|
projectNumber: model.projectNumber || '',
|
||||||
parameterNum: model.parameterNum || ''
|
parameterNum: model.parameterNum || ''
|
||||||
})
|
})
|
||||||
return this.loadModelDetail(modelId, model, model.parameterVersion, subsystemTypes)
|
return this.loadModelDetail(modelId, model, parameterVersion, subsystemTypes)
|
||||||
})
|
})
|
||||||
|
|
||||||
Promise.all(loadPromises)
|
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)
|
return this.loadModelDetail(modelId, modelData, parameterVersion, subsystemTypes)
|
||||||
})
|
})
|
||||||
@ -1084,10 +1116,13 @@ export default {
|
|||||||
handleRemoveModel(index) {
|
handleRemoveModel(index) {
|
||||||
const removedModel = this.comparisonModels[index]
|
const removedModel = this.comparisonModels[index]
|
||||||
if (removedModel && removedModel.id) {
|
if (removedModel && removedModel.id) {
|
||||||
|
// 使用 id+版本 作为唯一标识,与保存时的 key 保持一致
|
||||||
|
const parameterVersion = removedModel.parameterVersion || 1
|
||||||
|
const modelKey = `${removedModel.id}_${parameterVersion}`
|
||||||
// 从 allModelDetailData 中删除该机型的数据
|
// 从 allModelDetailData 中删除该机型的数据
|
||||||
this.$delete(this.allModelDetailData, removedModel.id)
|
this.$delete(this.allModelDetailData, modelKey)
|
||||||
// 从 allModelRawData 中删除该机型的原始数据
|
// 从 allModelRawData 中删除该机型的原始数据
|
||||||
this.$delete(this.allModelRawData, removedModel.id)
|
this.$delete(this.allModelRawData, modelKey)
|
||||||
}
|
}
|
||||||
this.comparisonModels.splice(index, 1)
|
this.comparisonModels.splice(index, 1)
|
||||||
},
|
},
|
||||||
@ -1187,8 +1222,13 @@ export default {
|
|||||||
},
|
},
|
||||||
// 下载
|
// 下载
|
||||||
handleDownloadComparisonData() {
|
handleDownloadComparisonData() {
|
||||||
// 获取已添加在右侧的机型ID
|
// 获取已添加在右侧的机型ID和版本
|
||||||
const allSelectedIds = this.comparisonModels.map((item) => item.id).filter((id) => id)
|
const allSelectedIds = this.comparisonModels
|
||||||
|
.filter((item) => item.id)
|
||||||
|
.map((item) => ({
|
||||||
|
modelId: item.id,
|
||||||
|
parameterVersion: item.parameterVersion || ''
|
||||||
|
}))
|
||||||
if (allSelectedIds.length === 0) {
|
if (allSelectedIds.length === 0) {
|
||||||
this.$message({
|
this.$message({
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
@ -1198,6 +1238,31 @@ export default {
|
|||||||
}
|
}
|
||||||
// 获取选中的参数类型
|
// 获取选中的参数类型
|
||||||
const { subsystemTypes } = this.getSelectedSubsystemsAndTypes()
|
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) => {
|
||||||
|
// 如果子系统是"整车参数",isGlobal为1,否则为0
|
||||||
|
const isGlobal = item.subsystem === '整车参数' ? 1 : 0
|
||||||
|
item.parameters.forEach((param) => {
|
||||||
|
parameters.push({
|
||||||
|
parameterId: param.parameterId,
|
||||||
|
isGlobal: isGlobal
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 过滤掉整车参数(isGlobal === 1),只保留parameterId
|
||||||
|
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 { url, method = 'post', headers = {} } = api.DOWNLOAD_MODEL_QUERY_DATA || {}
|
||||||
const requestConfig = {
|
const requestConfig = {
|
||||||
url,
|
url,
|
||||||
@ -1205,7 +1270,8 @@ export default {
|
|||||||
data: {
|
data: {
|
||||||
userID: getUserId(),
|
userID: getUserId(),
|
||||||
modelIds: allSelectedIds,
|
modelIds: allSelectedIds,
|
||||||
subsystemParts: subsystemTypes
|
parameterIds: parameterIds,
|
||||||
|
subsystemParts: filteredSubsystemTypes
|
||||||
},
|
},
|
||||||
responseType: 'blob',
|
responseType: 'blob',
|
||||||
headers,
|
headers,
|
||||||
@ -1296,15 +1362,27 @@ export default {
|
|||||||
|
|
||||||
// 遍历常用配置中的参数,根据 partsName 统计零部件
|
// 遍历常用配置中的参数,根据 partsName 统计零部件
|
||||||
subsystemConfig.parameters.forEach((commonParam) => {
|
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 字段
|
// 直接使用常用配置中的 partsName 字段
|
||||||
if (commonParam.partsName) {
|
if (commonParam.partsName) {
|
||||||
const partsName = commonParam.partsName
|
const partsName = commonParam.partsName
|
||||||
// 如果 partsName 是 '/',表示选中整个子系统,使用子系统名称作为标识
|
// 如果 partsName 是 '/',表示选中整个子系统,使用子系统名称作为标识
|
||||||
const displayPartsName = partsName
|
const displayPartsName = partsName
|
||||||
subsystemPartsMap.get(subsystemName).add(displayPartsName)
|
subsystemPartsMap.get(targetSubsystemName).add(displayPartsName)
|
||||||
} else {
|
} else {
|
||||||
// 如果没有 partsName,尝试从 allParametersData 中查找匹配的参数
|
// 如果没有 partsName,尝试从 allParametersData 中查找匹配的参数
|
||||||
const subsystemData = this.allParametersData[subsystemName]
|
const subsystemData = this.allParametersData[targetSubsystemName]
|
||||||
if (Array.isArray(subsystemData)) {
|
if (Array.isArray(subsystemData)) {
|
||||||
const matchedParam = subsystemData.find((param) => {
|
const matchedParam = subsystemData.find((param) => {
|
||||||
if (commonParam.parameterId) {
|
if (commonParam.parameterId) {
|
||||||
@ -1319,8 +1397,14 @@ export default {
|
|||||||
// 获取零部件名称(partsName),如果是 `/` 则使用子系统名称
|
// 获取零部件名称(partsName),如果是 `/` 则使用子系统名称
|
||||||
const partsName = matchedParam.partsName
|
const partsName = matchedParam.partsName
|
||||||
const displayPartsName = 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
|
const subsystemName = matchedSubsystemName
|
||||||
|
|
||||||
// 检查是否有 partsName 为 '/' 的情况(应该选中子系统节点本身)
|
// 检查是否有 partsName 为 '/' 的情况(应该选中子系统节点本身)
|
||||||
if (partsNames.has(subsystemName)) {
|
if (partsNames.has('/')) {
|
||||||
// 如果 partsName 是 '/',选中子系统节点(一级节点)
|
// 如果 partsName 是 '/',选中子系统节点(一级节点)
|
||||||
keysToCheck.push(node.id)
|
keysToCheck.push(node.id)
|
||||||
// 从 partsNames 中移除子系统名称,避免重复处理
|
// 从 partsNames 中移除 '/',避免重复处理
|
||||||
partsNames.delete(subsystemName)
|
partsNames.delete('/')
|
||||||
}
|
}
|
||||||
|
|
||||||
// 处理其他零部件名称(二级节点)
|
// 处理其他零部件名称(二级节点)
|
||||||
@ -1453,18 +1537,25 @@ export default {
|
|||||||
|
|
||||||
// 构建常用配置中的参数映射:subsystem -> Set<parameterKey>
|
// 构建常用配置中的参数映射:subsystem -> Set<parameterKey>
|
||||||
// parameterKey 格式:优先使用 parameterId,如果没有则使用 parameterName
|
// parameterKey 格式:优先使用 parameterId,如果没有则使用 parameterName
|
||||||
|
// 对于 isGlobal === 1 的参数,归类到"整车参数"子系统
|
||||||
const commonParamsMap = new Map()
|
const commonParamsMap = new Map()
|
||||||
this.currentCommonConfig.subsystems.forEach((subsystemConfig) => {
|
this.currentCommonConfig.subsystems.forEach((subsystemConfig) => {
|
||||||
const subsystemName = subsystemConfig.subsystem
|
const subsystemName = subsystemConfig.subsystem
|
||||||
const paramKeys = new Set()
|
|
||||||
subsystemConfig.parameters.forEach((p) => {
|
subsystemConfig.parameters.forEach((p) => {
|
||||||
|
// 检查是否是 isGlobal 为 1 的参数(属于"整车参数"子系统)
|
||||||
|
const isGlobal = p.isGlobal === 1 || p.isGlobal === '1'
|
||||||
|
// 如果 isGlobal 为 1,该参数属于"整车参数"子系统,否则属于原子系统
|
||||||
|
const targetSubsystemName = isGlobal ? '整车参数' : subsystemName
|
||||||
|
|
||||||
// 优先使用 parameterId,如果没有则使用 parameterName
|
// 优先使用 parameterId,如果没有则使用 parameterName
|
||||||
const key = p.parameterId || p.parameterName
|
const key = p.parameterId || p.parameterName
|
||||||
if (key) {
|
if (key) {
|
||||||
paramKeys.add(key)
|
if (!commonParamsMap.has(targetSubsystemName)) {
|
||||||
|
commonParamsMap.set(targetSubsystemName, new Set())
|
||||||
|
}
|
||||||
|
commonParamsMap.get(targetSubsystemName).add(key)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
commonParamsMap.set(subsystemName, paramKeys)
|
|
||||||
})
|
})
|
||||||
|
|
||||||
// 获取当前根据树节点应该显示的所有参数(不受常用配置影响)
|
// 获取当前根据树节点应该显示的所有参数(不受常用配置影响)
|
||||||
@ -1478,34 +1569,20 @@ export default {
|
|||||||
paramList.forEach((item) => {
|
paramList.forEach((item) => {
|
||||||
const parameterName = item.parameterName || ''
|
const parameterName = item.parameterName || ''
|
||||||
const parameterId = item.parameterId || ''
|
const parameterId = item.parameterId || ''
|
||||||
|
// 使用原始的partsName,不进行归一化处理,实现精确匹配
|
||||||
const partsName = item.partsName || ''
|
const partsName = item.partsName || ''
|
||||||
|
|
||||||
// 确定用于匹配的零部件名称(partsName)
|
|
||||||
// 如果 partsName 是 `/`、空白或没有,都视为零部件名称为 `/` 的参数
|
|
||||||
const normalizedPartsName =
|
|
||||||
!partsName || partsName.trim() === '' || partsName === '/' ? '/' : partsName
|
|
||||||
|
|
||||||
// 检查该参数是否在当前选中的树节点下
|
// 检查该参数是否在当前选中的树节点下
|
||||||
let isInSelectedNodes = false
|
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]
|
const nodeInfo = this.nodeMap[nodeId]
|
||||||
return (
|
return (
|
||||||
nodeInfo &&
|
nodeInfo &&
|
||||||
nodeInfo.isParent &&
|
nodeInfo.isParent &&
|
||||||
nodeInfo.label === subsystemName &&
|
nodeInfo.label === subsystemName &&
|
||||||
|
// 确保该子系统没有子节点被选中
|
||||||
!this.checkedKeys.some((childNodeId) => {
|
!this.checkedKeys.some((childNodeId) => {
|
||||||
const childNodeInfo = this.nodeMap[childNodeId]
|
const childNodeInfo = this.nodeMap[childNodeId]
|
||||||
return (
|
return (
|
||||||
@ -1517,10 +1594,48 @@ export default {
|
|||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
// 如果子系统被直接选中,且该参数的 partsName 是 `/`、空白或没有,包含该参数
|
if (isSubsystemDirectlySelected) {
|
||||||
if (isSubsystemDirectlySelected && normalizedPartsName === '/') {
|
// 如果子系统被直接选中(没有子节点被选中),检查是否有匹配的子节点
|
||||||
|
// 检查该子系统是否有对应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 // 精确匹配
|
||||||
|
)
|
||||||
|
})
|
||||||
|
// 只有当匹配的子节点被选中时,才包含该参数
|
||||||
|
isInSelectedNodes = isMatchingChildSelected
|
||||||
|
} else {
|
||||||
|
// 如果不存在匹配的子节点,包含该参数(该参数不属于任何子节点)
|
||||||
isInSelectedNodes = true
|
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
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// 构建参数ID数组
|
// 构建参数对象数组
|
||||||
let parameters = []
|
let parameters = []
|
||||||
saveData.subsystems.forEach((item) => {
|
saveData.subsystems.forEach((item) => {
|
||||||
|
// 如果子系统是"整车参数",isGlobal为1,否则为0
|
||||||
|
const isGlobal = item.subsystem === '整车参数' ? 1 : 0
|
||||||
item.parameters.forEach((param) => {
|
item.parameters.forEach((param) => {
|
||||||
parameters.push(param.parameterId)
|
parameters.push({
|
||||||
|
parameterId: param.parameterId,
|
||||||
|
isGlobal: isGlobal
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -1753,8 +1873,13 @@ export default {
|
|||||||
}
|
}
|
||||||
let parameters = []
|
let parameters = []
|
||||||
saveData.subsystems.forEach((item) => {
|
saveData.subsystems.forEach((item) => {
|
||||||
|
// 如果子系统是"整车参数",isGlobal为1,否则为0
|
||||||
|
const isGlobal = item.subsystem === '整车参数' ? 1 : 0
|
||||||
item.parameters.forEach((param) => {
|
item.parameters.forEach((param) => {
|
||||||
parameters.push(param.parameterId)
|
parameters.push({
|
||||||
|
parameterId: param.parameterId,
|
||||||
|
isGlobal: isGlobal
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
// 构建保存数据
|
// 构建保存数据
|
||||||
@ -1956,6 +2081,9 @@ export default {
|
|||||||
},
|
},
|
||||||
// 加载树数据
|
// 加载树数据
|
||||||
loadTreeData() {
|
loadTreeData() {
|
||||||
|
// 先加载所有参数数据,然后根据参数数据构建树结构(包括"整车参数")
|
||||||
|
this.loadAllParametersData().then(() => {
|
||||||
|
// 加载树结构数据
|
||||||
const request = {
|
const request = {
|
||||||
...api.GET_ENGINE_DETAIL_QUERY,
|
...api.GET_ENGINE_DETAIL_QUERY,
|
||||||
params: {
|
params: {
|
||||||
@ -1978,19 +2106,8 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 创建默认的"整车参数"子系统节点(放在第一位)
|
// 根据接口返回的"整车参数"参数数据构建树结构
|
||||||
const wholeEngineParamsNode = {
|
const wholeEngineParamsNode = this.buildWholeEngineParamsNode()
|
||||||
id: 'parent-whole-engine-params',
|
|
||||||
label: '整车参数',
|
|
||||||
tip: '',
|
|
||||||
children: [] // 整车参数没有子节点(零部件名称)
|
|
||||||
}
|
|
||||||
// 保存"整车参数"节点映射
|
|
||||||
this.nodeMap['parent-whole-engine-params'] = {
|
|
||||||
label: '整车参数',
|
|
||||||
parentLabel: null,
|
|
||||||
isParent: true
|
|
||||||
}
|
|
||||||
|
|
||||||
// 将"整车参数"节点放在第一位,其他节点放在后面
|
// 将"整车参数"节点放在第一位,其他节点放在后面
|
||||||
treeDataResult = [wholeEngineParamsNode, ...treeDataResult]
|
treeDataResult = [wholeEngineParamsNode, ...treeDataResult]
|
||||||
@ -2002,8 +2119,6 @@ export default {
|
|||||||
// 始终使用完整的树数据
|
// 始终使用完整的树数据
|
||||||
this.treeData = JSON.parse(JSON.stringify(this.allTreeData))
|
this.treeData = JSON.parse(JSON.stringify(this.allTreeData))
|
||||||
|
|
||||||
// 加载所有参数数据(先加载参数数据,再根据常用配置更新选中状态)
|
|
||||||
this.loadAllParametersData().then(() => {
|
|
||||||
// 如果已选择常用配置,根据可显示的参数更新选中状态
|
// 如果已选择常用配置,根据可显示的参数更新选中状态
|
||||||
if (this.currentCommonConfig) {
|
if (this.currentCommonConfig) {
|
||||||
// 1. 先根据常用配置选中树节点
|
// 1. 先根据常用配置选中树节点
|
||||||
@ -2028,11 +2143,11 @@ export default {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
|
||||||
.asyncErrorCatch((err) => {
|
.asyncErrorCatch((err) => {
|
||||||
console.error('获取参数列表失败:', err)
|
console.error('获取参数列表失败:', err)
|
||||||
this.$message.error('获取参数列表失败')
|
this.$message.error('获取参数列表失败')
|
||||||
})
|
})
|
||||||
|
})
|
||||||
},
|
},
|
||||||
// 加载所有参数数据
|
// 加载所有参数数据
|
||||||
loadAllParametersData() {
|
loadAllParametersData() {
|
||||||
@ -2047,43 +2162,11 @@ export default {
|
|||||||
// 输出格式: { "子系统名称": [{ parameterId, parameterName, partsName, subsystem }] }
|
// 输出格式: { "子系统名称": [{ parameterId, parameterName, partsName, subsystem }] }
|
||||||
const result = {}
|
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 (resp && resp.data) {
|
||||||
if (Array.isArray(resp.data)) {
|
if (Array.isArray(resp.data)) {
|
||||||
resp.data.forEach((item) => {
|
resp.data.forEach((item) => {
|
||||||
if (item.subsystem && Array.isArray(item.parameters)) {
|
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) => ({
|
result[item.subsystem] = item.parameters.map((param) => ({
|
||||||
parameterId: param.parameterId || '',
|
parameterId: param.parameterId || '',
|
||||||
parameterName: param.parameterName || '',
|
parameterName: param.parameterName || '',
|
||||||
@ -2091,7 +2174,6 @@ export default {
|
|||||||
subsystem: item.subsystem // 保存子系统名称
|
subsystem: item.subsystem // 保存子系统名称
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
}
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2104,23 +2186,8 @@ export default {
|
|||||||
})
|
})
|
||||||
.asyncErrorCatch((err) => {
|
.asyncErrorCatch((err) => {
|
||||||
console.error('获取所有参数数据失败:', err)
|
console.error('获取所有参数数据失败:', err)
|
||||||
// 即使接口失败,也要添加默认的"整车参数"参数列表
|
// 即使接口失败,也设置空对象
|
||||||
this.allParametersData = {
|
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.savedAllParametersData = JSON.parse(JSON.stringify(this.allParametersData))
|
this.savedAllParametersData = JSON.parse(JSON.stringify(this.allParametersData))
|
||||||
// 即使失败,也调用获取常用列表
|
// 即使失败,也调用获取常用列表
|
||||||
@ -2215,6 +2282,66 @@ export default {
|
|||||||
})
|
})
|
||||||
return keys
|
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 功能相同,保留以备用)
|
// 加载机型数据(用于弹窗选择,与 loadModelListForDialog 功能相同,保留以备用)
|
||||||
loadComparisonModels() {
|
loadComparisonModels() {
|
||||||
this.loadModelListForDialog()
|
this.loadModelListForDialog()
|
||||||
@ -2605,4 +2732,8 @@ export default {
|
|||||||
.v-modal {
|
.v-modal {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
::v-deep .el-button {
|
||||||
|
line-height: 0.85 !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -435,4 +435,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
::v-deep .el-button {
|
||||||
|
line-height: 0.85 !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -20,9 +20,9 @@
|
|||||||
<el-button v-if="hasTemplateManagementEditPermission()" class="import-btn" @click="handleImportTemplate()">
|
<el-button v-if="hasTemplateManagementEditPermission()" class="import-btn" @click="handleImportTemplate()">
|
||||||
导入参数模板
|
导入参数模板
|
||||||
</el-button>
|
</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>
|
</div>
|
||||||
<div class="page-search-panel">
|
<div class="page-search-panel">
|
||||||
@ -114,6 +114,16 @@
|
|||||||
>
|
>
|
||||||
修改
|
修改
|
||||||
</a>
|
</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>
|
||||||
<div v-if="colConfig.customSlot === 'version'" :key="index + '' + rowIndex">
|
<div v-if="colConfig.customSlot === 'version'" :key="index + '' + rowIndex">
|
||||||
V{{ row[colConfig.prop] || '' }}
|
V{{ row[colConfig.prop] || '' }}
|
||||||
@ -177,6 +187,7 @@
|
|||||||
:template-version="currentVersion"
|
:template-version="currentVersion"
|
||||||
:version-list="versionList"
|
:version-list="versionList"
|
||||||
:detail="currentDetail"
|
:detail="currentDetail"
|
||||||
|
:from-todo="fromTodo"
|
||||||
:template-management-permissions="templateManagementPermissions"
|
:template-management-permissions="templateManagementPermissions"
|
||||||
class="model-detail-wrapper"
|
class="model-detail-wrapper"
|
||||||
@back="handleBackFromDetail"
|
@back="handleBackFromDetail"
|
||||||
@ -268,7 +279,8 @@ export default {
|
|||||||
tenantId: '1764149921900',
|
tenantId: '1764149921900',
|
||||||
userId: getUserId(),
|
userId: getUserId(),
|
||||||
errorDialogVisible: false,
|
errorDialogVisible: false,
|
||||||
templateManagementPermissions: [] // 暂存 menuPath 为 "数据录入/模板管理" 的权限数组
|
templateManagementPermissions: [], // 暂存 menuPath 为 "数据录入/模板管理" 的权限数组
|
||||||
|
fromTodo: false // 是否从待办页面进入
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -412,6 +424,31 @@ export default {
|
|||||||
console.error('获取用户自身角色失败:', err)
|
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() {
|
filterTemplateManagementPermissions() {
|
||||||
try {
|
try {
|
||||||
@ -530,6 +567,11 @@ export default {
|
|||||||
this.currentTemplateId = row.rowId
|
this.currentTemplateId = row.rowId
|
||||||
this.currentTemplateRowId = row.id
|
this.currentTemplateRowId = row.id
|
||||||
this.currentTemplateName = row.templateName
|
this.currentTemplateName = row.templateName
|
||||||
|
if (row.returnNum > 0) {
|
||||||
|
this.fromTodo = true
|
||||||
|
} else {
|
||||||
|
this.fromTodo = false
|
||||||
|
}
|
||||||
// 默认使用最新版本(po_code)
|
// 默认使用最新版本(po_code)
|
||||||
this.currentVersion = row.version
|
this.currentVersion = row.version
|
||||||
// 保存当前模板的详情(包含 status)
|
// 保存当前模板的详情(包含 status)
|
||||||
@ -659,11 +701,12 @@ export default {
|
|||||||
handleVersionClick(data) {
|
handleVersionClick(data) {
|
||||||
console.log(data, 'data')
|
console.log(data, 'data')
|
||||||
// 处理版本弹窗中的版本点击事件,跳转到详情页面
|
// 处理版本弹窗中的版本点击事件,跳转到详情页面
|
||||||
const { version, templateId, template, versionList, changeId } = data
|
const { version, templateId, template, versionList, changeId, returnNum } = data
|
||||||
this.currentTemplateRowId = changeId
|
this.currentTemplateRowId = changeId
|
||||||
// 设置模板ID和名称,跳转到详情页面
|
// 设置模板ID和名称,跳转到详情页面
|
||||||
this.currentTemplateId = templateId
|
this.currentTemplateId = templateId
|
||||||
this.currentTemplateName = template.templateName || ''
|
this.currentTemplateName = template.templateName || ''
|
||||||
|
this.fromTodo = returnNum > 0 || false
|
||||||
// 设置点击的版本信息
|
// 设置点击的版本信息
|
||||||
this.currentVersion = version.name || version.version || ''
|
this.currentVersion = version.name || version.version || ''
|
||||||
// 更新当前模板的详情(包含 status)
|
// 更新当前模板的详情(包含 status)
|
||||||
@ -1185,7 +1228,7 @@ export default {
|
|||||||
flex: 1;
|
flex: 1;
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
padding: 0 20px 20px 20px;
|
padding: 10px;
|
||||||
background: #f7f7f7;
|
background: #f7f7f7;
|
||||||
|
|
||||||
.x-empty-page {
|
.x-empty-page {
|
||||||
@ -1234,7 +1277,7 @@ export default {
|
|||||||
|
|
||||||
.link-separator {
|
.link-separator {
|
||||||
width: 4px;
|
width: 4px;
|
||||||
display: inline-block;
|
height: 14px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1263,4 +1306,7 @@ export default {
|
|||||||
.operation {
|
.operation {
|
||||||
justify-content: flex-start !important;
|
justify-content: flex-start !important;
|
||||||
}
|
}
|
||||||
|
::v-deep .el-button {
|
||||||
|
line-height: 0.85 !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -7,7 +7,7 @@
|
|||||||
>
|
>
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
我的已办
|
我的经办
|
||||||
</div>
|
</div>
|
||||||
<div class="operation">
|
<div class="operation">
|
||||||
<x-svg-icon
|
<x-svg-icon
|
||||||
@ -450,4 +450,7 @@ export default {
|
|||||||
min-height: 0;
|
min-height: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
::v-deep .el-button {
|
||||||
|
line-height: 0.85 !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -47,19 +47,19 @@
|
|||||||
<a
|
<a
|
||||||
href="javascript:void(0)"
|
href="javascript:void(0)"
|
||||||
class="el-link el-link--primary"
|
class="el-link el-link--primary"
|
||||||
@click.stop="handleRowView(row)">
|
@click.stop="handleRowView(row)"
|
||||||
|
>
|
||||||
查看
|
查看
|
||||||
</a>
|
</a>
|
||||||
</div>
|
<span v-if="row.enableReturn == 1" style="width: 6px; display: inline-block"></span>
|
||||||
<!-- <div v-if="colConfig.customSlot === 'options'" :key="'op' + index + '' + rowIndex">
|
|
||||||
<a
|
<a
|
||||||
v-if="row.currentNode === '校对'"
|
v-if="row.enableReturn == 1"
|
||||||
href="javascript:void(0)"
|
href="javascript:void(0)"
|
||||||
class="el-link el-link--primary"
|
class="el-link el-link--primary"
|
||||||
@click.stop="handleRowWithdraw(row)"
|
@click.stop="handleRowWithdraw(row)"
|
||||||
>撤回</a
|
>撤回</a
|
||||||
>
|
>
|
||||||
</div> -->
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template slot="empty">
|
<template slot="empty">
|
||||||
@ -124,6 +124,7 @@ import ApprovalProgressDetail from './approvalProgressDetail.vue'
|
|||||||
import ReportDetail from './reportDetail.vue'
|
import ReportDetail from './reportDetail.vue'
|
||||||
import { getUserId } from '@/utils'
|
import { getUserId } from '@/utils'
|
||||||
import api from '@/api/demo'
|
import api from '@/api/demo'
|
||||||
|
import { flow } from 'lodash-es'
|
||||||
export default {
|
export default {
|
||||||
name: 'TodoPage',
|
name: 'TodoPage',
|
||||||
components: {
|
components: {
|
||||||
@ -159,13 +160,32 @@ export default {
|
|||||||
colConfigs: [
|
colConfigs: [
|
||||||
// { prop: 'documentNo', label: '单据编号', showOverflowTooltip: true, minWidth: '140' },
|
// { prop: 'documentNo', label: '单据编号', showOverflowTooltip: true, minWidth: '140' },
|
||||||
{ prop: 'processTitle', label: '流程主题', showOverflowTooltip: true, minWidth: '160' },
|
{ 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: 'statusCode', label: '状态代号', showOverflowTooltip: true, minWidth: '120' },
|
||||||
// { prop: 'modelName', 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: 'currentProcessor',
|
||||||
{ prop: 'creationDate', label: '创建时间', showOverflowTooltip: true, minWidth: '160', align: 'center', formatter: this.formatDateTime },
|
label: '当前处理人',
|
||||||
{ prop: 'options', label: '操作', customSlot: 'options', align: 'center', width: '100', fixed: 'right' }
|
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: '',
|
seqType: '',
|
||||||
seqConfig: {},
|
seqConfig: {},
|
||||||
@ -359,6 +379,112 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleRowWithdraw(row) {
|
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)
|
console.warn(row)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -445,4 +571,7 @@ export default {
|
|||||||
min-height: 0;
|
min-height: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
::v-deep .el-button {
|
||||||
|
line-height: 0.85 !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -783,4 +783,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
::v-deep .el-button {
|
||||||
|
line-height: 0.85 !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -108,8 +108,9 @@
|
|||||||
>
|
>
|
||||||
查看
|
查看
|
||||||
</a>
|
</a>
|
||||||
|
<span v-if="row.distributeStatus != '已分发' && hasEngineDataEditPermission()" class="link-separator"></span>
|
||||||
<a
|
<a
|
||||||
v-if="row.distributeStatus != '已分发'"
|
v-if="row.distributeStatus != '已分发' && hasEngineDataEditPermission()"
|
||||||
href="javascript:void(0)"
|
href="javascript:void(0)"
|
||||||
class="el-link el-link--primary"
|
class="el-link el-link--primary"
|
||||||
style="margin-left: 5px;"
|
style="margin-left: 5px;"
|
||||||
@ -117,6 +118,16 @@
|
|||||||
>
|
>
|
||||||
分发
|
分发
|
||||||
</a>
|
</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>
|
||||||
<div v-if="colConfig.customSlot === 'distributeStatus'" :key="index + '' + rowIndex">
|
<div v-if="colConfig.customSlot === 'distributeStatus'" :key="index + '' + rowIndex">
|
||||||
<span v-if="row[colConfig.prop] === '已分发'" class="status-tag status-done">
|
<span v-if="row[colConfig.prop] === '已分发'" class="status-tag status-done">
|
||||||
@ -185,6 +196,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
|
|
||||||
<el-button @click="handleImportDialogClose">取消</el-button>
|
<el-button @click="handleImportDialogClose">取消</el-button>
|
||||||
<el-button type="primary" :loading="importing" @click="handleImportConfirm">
|
<el-button type="primary" :loading="importing" @click="handleImportConfirm">
|
||||||
开始导入
|
开始导入
|
||||||
@ -328,7 +340,7 @@ export default {
|
|||||||
label: '操作',
|
label: '操作',
|
||||||
customSlot: 'options',
|
customSlot: 'options',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: '80',
|
width: '120',
|
||||||
fixed: 'right'
|
fixed: 'right'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@ -429,6 +441,32 @@ export default {
|
|||||||
this.dispatchType = 'todo' // 分发责任人
|
this.dispatchType = 'todo' // 分发责任人
|
||||||
this.showEngineDetail = true
|
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) {
|
pageSizeChange(size) {
|
||||||
this.pagination.pageSize = size
|
this.pagination.pageSize = size
|
||||||
this.pagination.currentPage = 1
|
this.pagination.currentPage = 1
|
||||||
@ -874,4 +912,11 @@ export default {
|
|||||||
line-height: 32px;
|
line-height: 32px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.link-separator {
|
||||||
|
width: 4px;
|
||||||
|
height: 14px;
|
||||||
|
}
|
||||||
|
::v-deep .el-button {
|
||||||
|
line-height: 0.85 !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -1,5 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="permission-management-page custom-page">
|
<div class="permission-management-page custom-page">
|
||||||
|
<div class="page-header">
|
||||||
|
<div class="title">
|
||||||
|
权限管理
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="page-content">
|
<div class="page-content">
|
||||||
<div class="header-section">
|
<div class="header-section">
|
||||||
<el-button type="primary" @click="handleAddRole">
|
<el-button type="primary" @click="handleAddRole">
|
||||||
@ -2420,4 +2425,7 @@ export default {
|
|||||||
.page-content {
|
.page-content {
|
||||||
width: calc(100% - 80px) !important;
|
width: calc(100% - 80px) !important;
|
||||||
}
|
}
|
||||||
|
::v-deep .el-button {
|
||||||
|
line-height: 0.85 !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -110,9 +110,7 @@
|
|||||||
v-for="(colConfig, index) in tableConfig.colConfigs"
|
v-for="(colConfig, index) in tableConfig.colConfigs"
|
||||||
v-slot:[colConfig.customHeadSlot]="{ column }"
|
v-slot:[colConfig.customHeadSlot]="{ column }"
|
||||||
>
|
>
|
||||||
<div v-if="colConfig.customHeadSlot" :key="index">
|
<div v-if="colConfig.customHeadSlot" :key="index"> {{ column }} {{ colConfig }} </div>
|
||||||
{{ column }} {{ colConfig }}
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template
|
<template
|
||||||
@ -133,13 +131,13 @@
|
|||||||
已完成
|
已完成
|
||||||
</span>
|
</span>
|
||||||
<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;"
|
style="background: #909399; padding: 4px 8px; color: white; border-radius: 20px;"
|
||||||
>
|
>
|
||||||
草稿
|
草稿
|
||||||
</span>
|
</span>
|
||||||
<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;"
|
style="background: #F56C6C; padding: 4px 8px; color: white; border-radius: 20px;"
|
||||||
>
|
>
|
||||||
已拒绝
|
已拒绝
|
||||||
@ -161,7 +159,7 @@
|
|||||||
</a>
|
</a>
|
||||||
<span style="width: 6px; display: inline-block"></span>
|
<span style="width: 6px; display: inline-block"></span>
|
||||||
<a
|
<a
|
||||||
v-if="row.status === 'DRAFT' && hasReportEditPermission()"
|
v-if="row.status === 'DRAFT' && hasReportEditPermission() && row.returnNum === 0"
|
||||||
href="javascript:void(0)"
|
href="javascript:void(0)"
|
||||||
class="el-link el-link--primary"
|
class="el-link el-link--primary"
|
||||||
@click.stop="handleEdit(row)"
|
@click.stop="handleEdit(row)"
|
||||||
@ -169,6 +167,15 @@
|
|||||||
修改
|
修改
|
||||||
</a>
|
</a>
|
||||||
<span style="width: 6px; display: inline-block"></span>
|
<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
|
<!-- <a
|
||||||
v-if="row.status === 'APPROVING'"
|
v-if="row.status === 'APPROVING'"
|
||||||
href="javascript:void(0)"
|
href="javascript:void(0)"
|
||||||
@ -182,7 +189,7 @@
|
|||||||
style="width: 6px; display: inline-block"
|
style="width: 6px; display: inline-block"
|
||||||
></span> -->
|
></span> -->
|
||||||
<a
|
<a
|
||||||
v-if="!row.status || row.status === '' || row.status === 'DRAFT'"
|
v-if=" row.status === 'DRAFT' && row.returnNum === 0"
|
||||||
href="javascript:void(0)"
|
href="javascript:void(0)"
|
||||||
class="el-link el-link--primary"
|
class="el-link el-link--primary"
|
||||||
@click.stop="handleLaunch(row)"
|
@click.stop="handleLaunch(row)"
|
||||||
@ -213,6 +220,20 @@
|
|||||||
>
|
>
|
||||||
下载
|
下载
|
||||||
</a>
|
</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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -227,6 +248,8 @@
|
|||||||
<report-detail
|
<report-detail
|
||||||
v-else
|
v-else
|
||||||
:detail="currentReportDetail"
|
:detail="currentReportDetail"
|
||||||
|
:from-todo="fromTodo"
|
||||||
|
:can-resend="canResend"
|
||||||
@close="closeReportDetail"
|
@close="closeReportDetail"
|
||||||
@refresh="handleReportDetailRefresh"
|
@refresh="handleReportDetailRefresh"
|
||||||
/>
|
/>
|
||||||
@ -353,6 +376,71 @@
|
|||||||
placeholder="请输入"
|
placeholder="请输入"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</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>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
@ -376,9 +464,7 @@
|
|||||||
>
|
>
|
||||||
<div class="dialog-body-wrapper">
|
<div class="dialog-body-wrapper">
|
||||||
<div class="approval-process-title">
|
<div class="approval-process-title">
|
||||||
<div class="description-label">
|
<div class="description-label"> 流程主题 <span class="required-mark">*</span> </div>
|
||||||
流程主题 <span class="required-mark">*</span>
|
|
||||||
</div>
|
|
||||||
<el-input
|
<el-input
|
||||||
v-model="launchProcessTitle"
|
v-model="launchProcessTitle"
|
||||||
maxlength="100"
|
maxlength="100"
|
||||||
@ -517,6 +603,7 @@ export default {
|
|||||||
projectNumber: '',
|
projectNumber: '',
|
||||||
status: ''
|
status: ''
|
||||||
},
|
},
|
||||||
|
fromTodo: false,
|
||||||
statusOptions: [
|
statusOptions: [
|
||||||
{ id: 'DRAFT', label: '草稿' },
|
{ id: 'DRAFT', label: '草稿' },
|
||||||
{ id: 'APPROVING', label: '审批中' },
|
{ id: 'APPROVING', label: '审批中' },
|
||||||
@ -529,6 +616,7 @@ export default {
|
|||||||
selectedFile: null,
|
selectedFile: null,
|
||||||
fileList: [],
|
fileList: [],
|
||||||
uploading: false,
|
uploading: false,
|
||||||
|
canResend: false,
|
||||||
dialogMode: 'create', // 'create' 表示新增,'edit' 表示修改,'restart' 表示重新发起
|
dialogMode: 'create', // 'create' 表示新增,'edit' 表示修改,'restart' 表示重新发起
|
||||||
currentRestartRow: null, // 当前要重新发起的行数据
|
currentRestartRow: null, // 当前要重新发起的行数据
|
||||||
currentEditRow: null, // 当前要修改的行数据
|
currentEditRow: null, // 当前要修改的行数据
|
||||||
@ -589,7 +677,24 @@ export default {
|
|||||||
series: [{ required: true, message: '请输入系列', trigger: 'blur' }],
|
series: [{ required: true, message: '请输入系列', trigger: 'blur' }],
|
||||||
marketSegment: [{ required: true, message: '请输入细分市场', trigger: 'blur' }],
|
marketSegment: [{ required: true, message: '请输入细分市场', trigger: 'blur' }],
|
||||||
projectName: [{ 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: [
|
approvalWorkflowSteps: [
|
||||||
{
|
{
|
||||||
@ -719,9 +824,7 @@ export default {
|
|||||||
const parameterPer = perm.parameterPer
|
const parameterPer = perm.parameterPer
|
||||||
return (
|
return (
|
||||||
permissionPath === '对标报告' &&
|
permissionPath === '对标报告' &&
|
||||||
(parameterPer === 2 ||
|
(parameterPer === 2 || parameterPer === '2' || parameterPer === '编辑')
|
||||||
parameterPer === '2' ||
|
|
||||||
parameterPer === '编辑')
|
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
@ -772,8 +875,33 @@ export default {
|
|||||||
marketSegment: '',
|
marketSegment: '',
|
||||||
projectName: '',
|
projectName: '',
|
||||||
projectNumber: '',
|
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.fileList = []
|
||||||
this.selectedFile = null
|
this.selectedFile = null
|
||||||
this.createDialogVisible = true
|
this.createDialogVisible = true
|
||||||
@ -804,7 +932,8 @@ export default {
|
|||||||
marketSegment: row.marketSegment || '',
|
marketSegment: row.marketSegment || '',
|
||||||
projectName: row.projectName || '',
|
projectName: row.projectName || '',
|
||||||
projectNumber: row.projectNumber || '',
|
projectNumber: row.projectNumber || '',
|
||||||
explanation: row.explanation || ''
|
explanation: row.explanation || '',
|
||||||
|
processTitle: row.processTitle || ''
|
||||||
}
|
}
|
||||||
// 如果有文件路径,显示在文件列表中
|
// 如果有文件路径,显示在文件列表中
|
||||||
if (row.fileUrl || row.filePath) {
|
if (row.fileUrl || row.filePath) {
|
||||||
@ -818,19 +947,9 @@ export default {
|
|||||||
this.fileList = []
|
this.fileList = []
|
||||||
}
|
}
|
||||||
this.selectedFile = null
|
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: '校对',
|
name: '校对',
|
||||||
required: true,
|
required: true,
|
||||||
@ -853,7 +972,56 @@ export default {
|
|||||||
loading: false
|
loading: false
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
this.launchDialogVisible = true
|
|
||||||
|
// 如果有flowId,调用GET_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() {
|
handleLaunchDialogClose() {
|
||||||
this.launchDialogVisible = false
|
this.launchDialogVisible = false
|
||||||
@ -924,17 +1092,13 @@ export default {
|
|||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const nodeList = this.launchWorkflowSteps.map((step, index) => ({
|
// 从当前行数据中获取flowId
|
||||||
nodeName: step.name,
|
const flowId = this.currentLaunchRow.flowId
|
||||||
assignees: step.handlers,
|
|
||||||
nodeOrder: index + 1
|
|
||||||
}))
|
|
||||||
// 构建提交数据
|
// 构建提交数据
|
||||||
const submitData = {
|
const submitData = {
|
||||||
processTitle: this.launchProcessTitle,
|
|
||||||
reportId: reportId,
|
reportId: reportId,
|
||||||
userId: getUserId(),
|
flowId: flowId, // 添加flowId参数
|
||||||
nodeList: nodeList
|
userId: getUserId()
|
||||||
}
|
}
|
||||||
|
|
||||||
this.launching = true
|
this.launching = true
|
||||||
@ -1038,6 +1202,36 @@ export default {
|
|||||||
handleLaunchHandlerChange(stepIndex, selectedIds) {
|
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) {
|
handleRestart(row) {
|
||||||
this.dialogMode = 'restart'
|
this.dialogMode = 'restart'
|
||||||
this.currentRestartRow = row
|
this.currentRestartRow = row
|
||||||
@ -1091,8 +1285,33 @@ export default {
|
|||||||
marketSegment: '',
|
marketSegment: '',
|
||||||
projectName: '',
|
projectName: '',
|
||||||
projectNumber: '',
|
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.fileList = []
|
||||||
this.selectedFile = null
|
this.selectedFile = null
|
||||||
if (this.$refs.createForm) {
|
if (this.$refs.createForm) {
|
||||||
@ -1198,42 +1417,67 @@ export default {
|
|||||||
|
|
||||||
// 根据 dialogMode 选择不同的接口
|
// 根据 dialogMode 选择不同的接口
|
||||||
let request
|
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 接口
|
// 修改:调用 EDIT_REPORT 接口
|
||||||
const reportId = this.currentEditRow.reportId || this.currentEditRow.id
|
const reportId = this.currentEditRow.reportId || this.currentEditRow.id
|
||||||
|
// 构建审批环节数据
|
||||||
|
|
||||||
request = {
|
request = {
|
||||||
...api.EDIT_REPORT,
|
...api.EDIT_REPORT,
|
||||||
params: {
|
params: {
|
||||||
reportId: reportId,
|
reportId: reportId,
|
||||||
|
flowId: this.currentEditRow.flowId || '',
|
||||||
...this.createFormData,
|
...this.createFormData,
|
||||||
|
processTitle: this.createFormData.processTitle,
|
||||||
|
nodeList: nodeList,
|
||||||
createBy: getUserId(),
|
createBy: getUserId(),
|
||||||
userId: getUserId()
|
userId: getUserId()
|
||||||
|
},
|
||||||
|
disableSuccessMsg: true
|
||||||
}
|
}
|
||||||
}
|
} else if (
|
||||||
} else if (this.dialogMode === 'restart' && this.currentRestartRow) {
|
this.dialogMode === 'edit' &&
|
||||||
|
this.currentEditRow &&
|
||||||
|
this.currentEditRow.returnNum > 0
|
||||||
|
) {
|
||||||
// 重新发起:调用 RESTART_REPORT_APPROVAL 接口
|
// 重新发起:调用 RESTART_REPORT_APPROVAL 接口
|
||||||
request = {
|
request = {
|
||||||
...api.RESTART_REPORT_APPROVAL,
|
...api.RESTART_REPORT_APPROVAL,
|
||||||
params: {
|
params: {
|
||||||
reportId: this.currentRestartRow.id || this.currentRestartRow.reportId,
|
reportId: this.currentEditRow.id || this.currentEditRow.reportId,
|
||||||
...this.createFormData,
|
...this.createFormData,
|
||||||
proofreadUsers: this.approvalWorkflowSteps[0].handlers,
|
nodeList: nodeList,
|
||||||
reviewUsers: this.approvalWorkflowSteps[1].handlers,
|
|
||||||
countersignUsers: [],
|
|
||||||
approveUsers: this.approvalWorkflowSteps[2].handlers,
|
|
||||||
createBy: getUserId(),
|
createBy: getUserId(),
|
||||||
userId: getUserId()
|
userId: getUserId()
|
||||||
}
|
},
|
||||||
|
disableSuccessMsg: true
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// 新增:调用 SAVE_REPORT 接口(不传审批人员)
|
// 新增:调用 SAVE_REPORT 接口,包含流程主题和审批环节
|
||||||
|
const nodeList = this.approvalWorkflowSteps.map((step, index) => ({
|
||||||
|
nodeName: step.name,
|
||||||
|
assignees: step.handlers,
|
||||||
|
nodeOrder: index + 1
|
||||||
|
}))
|
||||||
request = {
|
request = {
|
||||||
...api.SAVE_REPORT,
|
...api.SAVE_REPORT,
|
||||||
params: {
|
params: {
|
||||||
...this.createFormData,
|
...this.createFormData,
|
||||||
|
processTitle: this.createFormData.processTitle,
|
||||||
|
nodeList: nodeList,
|
||||||
createBy: getUserId(),
|
createBy: getUserId(),
|
||||||
userId: getUserId()
|
userId: getUserId()
|
||||||
}
|
},
|
||||||
|
disableSuccessMsg: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1353,6 +1597,145 @@ export default {
|
|||||||
// 如果不在,等用户下次搜索时会自动补充
|
// 如果不在,等用户下次搜索时会自动补充
|
||||||
// 确保已选择的人员信息在选项中,以便正确显示 username
|
// 确保已选择的人员信息在选项中,以便正确显示 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() {
|
handleDownloadTemplate() {
|
||||||
// this.$message && this.$message.success && this.$message.success('开始下载模板')
|
// this.$message && this.$message.success && this.$message.success('开始下载模板')
|
||||||
},
|
},
|
||||||
@ -1461,8 +1844,15 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 只传递 reportId,让详情组件自己调用接口
|
// 只传递 reportId,让详情组件自己调用接口
|
||||||
|
// 从report.vue列表进入时,fromTodo始终为false,不显示审批操作按钮
|
||||||
this.currentReportDetail = { reportId: reportId, flowId: row.flowId }
|
this.currentReportDetail = { reportId: reportId, flowId: row.flowId }
|
||||||
|
this.fromTodo = false
|
||||||
this.showReportDetail = true
|
this.showReportDetail = true
|
||||||
|
if (row.returnNum > 0) {
|
||||||
|
this.canResend = true
|
||||||
|
} else {
|
||||||
|
this.canResend = false
|
||||||
|
}
|
||||||
},
|
},
|
||||||
closeReportDetail() {
|
closeReportDetail() {
|
||||||
this.showReportDetail = false
|
this.showReportDetail = false
|
||||||
@ -1825,4 +2215,7 @@ export default {
|
|||||||
margin-left: 20px;
|
margin-left: 20px;
|
||||||
text-align: right !important;
|
text-align: right !important;
|
||||||
}
|
}
|
||||||
|
::v-deep .el-button {
|
||||||
|
line-height: 0.85 !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -352,4 +352,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
::v-deep .el-button {
|
||||||
|
line-height: 0.85 !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -1,19 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="apaas-custom-page-mydemo custom-page">
|
<div class="apaas-custom-page-mydemo custom-page">
|
||||||
<template v-if="!showReportDetail">
|
<template v-if="!showReportDetail">
|
||||||
<!-- <div class="page-header">
|
<div class="page-header">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
报告管理
|
竞品报告审批流程
|
||||||
</div>
|
</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="page-search-panel">
|
||||||
<div class="searched-fields">
|
<div class="searched-fields">
|
||||||
@ -1644,4 +1636,7 @@ export default {
|
|||||||
margin-left: 20px;
|
margin-left: 20px;
|
||||||
text-align: right !important;
|
text-align: right !important;
|
||||||
}
|
}
|
||||||
|
::v-deep .el-button {
|
||||||
|
line-height: 0.85 !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -515,7 +515,7 @@ export default {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.showEngineCheck = true
|
this.showEngineCheck = true
|
||||||
this.currentCheckDetail = row
|
this.currentCheckDetail = { ...row, flowId: row.id }
|
||||||
},
|
},
|
||||||
closeEngineCheck() {
|
closeEngineCheck() {
|
||||||
this.showEngineCheck = false
|
this.showEngineCheck = false
|
||||||
@ -783,4 +783,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
::v-deep .el-button {
|
||||||
|
line-height: 0.85 !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -108,6 +108,7 @@
|
|||||||
>
|
>
|
||||||
查看
|
查看
|
||||||
</a>
|
</a>
|
||||||
|
<span v-if="row.distributeStatus != '已分发' && hasEngineDataEditPermission()" class="link-separator"></span>
|
||||||
<a
|
<a
|
||||||
v-if="row.distributeStatus != '已分发' && hasEngineDataEditPermission()"
|
v-if="row.distributeStatus != '已分发' && hasEngineDataEditPermission()"
|
||||||
href="javascript:void(0)"
|
href="javascript:void(0)"
|
||||||
@ -117,6 +118,16 @@
|
|||||||
>
|
>
|
||||||
分发
|
分发
|
||||||
</a>
|
</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>
|
||||||
<div v-if="colConfig.customSlot === 'distributeStatus'" :key="index + '' + rowIndex">
|
<div v-if="colConfig.customSlot === 'distributeStatus'" :key="index + '' + rowIndex">
|
||||||
<span v-if="row[colConfig.prop] === '已分发'" class="status-tag status-done">
|
<span v-if="row[colConfig.prop] === '已分发'" class="status-tag status-done">
|
||||||
@ -329,7 +340,7 @@ export default {
|
|||||||
label: '操作',
|
label: '操作',
|
||||||
customSlot: 'options',
|
customSlot: 'options',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: '80',
|
width: '120',
|
||||||
fixed: 'right'
|
fixed: 'right'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@ -430,6 +441,32 @@ export default {
|
|||||||
this.dispatchType = 'todo' // 分发责任人
|
this.dispatchType = 'todo' // 分发责任人
|
||||||
this.showEngineDetail = true
|
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) {
|
pageSizeChange(size) {
|
||||||
this.pagination.pageSize = size
|
this.pagination.pageSize = size
|
||||||
this.pagination.currentPage = 1
|
this.pagination.currentPage = 1
|
||||||
@ -453,6 +490,7 @@ export default {
|
|||||||
this.currentEngineDetail = null
|
this.currentEngineDetail = null
|
||||||
this.isDispatchMode = false
|
this.isDispatchMode = false
|
||||||
this.dispatchType = 'todo'
|
this.dispatchType = 'todo'
|
||||||
|
this.loadData()
|
||||||
},
|
},
|
||||||
currentChange(currentPage) {
|
currentChange(currentPage) {
|
||||||
this.pagination.currentPage = currentPage
|
this.pagination.currentPage = currentPage
|
||||||
@ -875,4 +913,8 @@ export default {
|
|||||||
line-height: 32px;
|
line-height: 32px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.link-separator {
|
||||||
|
width: 4px;
|
||||||
|
height: 14px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -1244,5 +1244,8 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
::v-deep .el-button {
|
||||||
|
line-height: 0.85 !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
<div class="apaas-custom-page-todo custom-page">
|
<div class="apaas-custom-page-todo custom-page">
|
||||||
<template
|
<template
|
||||||
v-if="
|
v-if="
|
||||||
!showEngineDetail && !showEngineCheck && !showApprovalProgressDetail && !showReportDetail
|
!showEngineDetail && !showEngineCheck && !showApprovalProgressDetail && !showReportDetail && !showModelDetail
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
@ -91,6 +91,9 @@
|
|||||||
:dispatch-type="dispatchType"
|
:dispatch-type="dispatchType"
|
||||||
:responsible-person-id="responsiblePersonId"
|
:responsible-person-id="responsiblePersonId"
|
||||||
:filled-by="filledBy"
|
:filled-by="filledBy"
|
||||||
|
:flow-id="flowId"
|
||||||
|
:can-resend="canResend"
|
||||||
|
:from-todo="fromTodo"
|
||||||
class="engine-detail-wrapper"
|
class="engine-detail-wrapper"
|
||||||
@back="handleBackFromDetail"
|
@back="handleBackFromDetail"
|
||||||
/>
|
/>
|
||||||
@ -101,6 +104,7 @@
|
|||||||
:detail="currentEngineDetail"
|
:detail="currentEngineDetail"
|
||||||
:visible="showEngineCheck"
|
:visible="showEngineCheck"
|
||||||
:engine-type="engineType"
|
:engine-type="engineType"
|
||||||
|
:from-todo="fromTodo"
|
||||||
@refresh="handleBackFromCheck"
|
@refresh="handleBackFromCheck"
|
||||||
class="engine-check-wrapper"
|
class="engine-check-wrapper"
|
||||||
@close="handleBackFromCheck"
|
@close="handleBackFromCheck"
|
||||||
@ -111,6 +115,8 @@
|
|||||||
v-if="showApprovalProgressDetail"
|
v-if="showApprovalProgressDetail"
|
||||||
:detail="currentApprovalDetail"
|
:detail="currentApprovalDetail"
|
||||||
:visible="showApprovalProgressDetail"
|
:visible="showApprovalProgressDetail"
|
||||||
|
:from-todo="true"
|
||||||
|
:create-by="createdById"
|
||||||
class="approval-progress-detail-wrapper"
|
class="approval-progress-detail-wrapper"
|
||||||
@refresh="handleBackFromApprovalProgress"
|
@refresh="handleBackFromApprovalProgress"
|
||||||
@close="handleBackFromApprovalProgress"
|
@close="handleBackFromApprovalProgress"
|
||||||
@ -121,9 +127,26 @@
|
|||||||
v-if="showReportDetail"
|
v-if="showReportDetail"
|
||||||
:detail="currentReportDetail"
|
:detail="currentReportDetail"
|
||||||
:visible="showReportDetail"
|
:visible="showReportDetail"
|
||||||
|
:from-todo="fromTodo"
|
||||||
|
:can-resend="canResend"
|
||||||
class="report-detail-wrapper"
|
class="report-detail-wrapper"
|
||||||
@close="handleBackFromReport"
|
@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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -132,6 +155,7 @@ import EngineDetail from './engineDetail.vue'
|
|||||||
import EngineCheck from './engineCheck.vue'
|
import EngineCheck from './engineCheck.vue'
|
||||||
import ApprovalProgressDetail from './approvalProgressDetail.vue'
|
import ApprovalProgressDetail from './approvalProgressDetail.vue'
|
||||||
import ReportDetail from './reportDetail.vue'
|
import ReportDetail from './reportDetail.vue'
|
||||||
|
import ModelDetail from './modelDetail.vue'
|
||||||
import { getUserId } from '@/utils'
|
import { getUserId } from '@/utils'
|
||||||
import api from '@/api/demo'
|
import api from '@/api/demo'
|
||||||
export default {
|
export default {
|
||||||
@ -140,14 +164,26 @@ export default {
|
|||||||
EngineDetail,
|
EngineDetail,
|
||||||
EngineCheck,
|
EngineCheck,
|
||||||
ApprovalProgressDetail,
|
ApprovalProgressDetail,
|
||||||
ReportDetail
|
ReportDetail,
|
||||||
|
ModelDetail
|
||||||
},
|
},
|
||||||
data: function() {
|
data: function() {
|
||||||
return {
|
return {
|
||||||
tableData: [],
|
tableData: [],
|
||||||
pagination: { currentPage: 1, pageSize: 10, total: 0 },
|
pagination: { currentPage: 1, pageSize: 10, total: 0 },
|
||||||
showEngineDetail: false,
|
showEngineDetail: false,
|
||||||
|
canResend: false,
|
||||||
showEngineCheck: false,
|
showEngineCheck: false,
|
||||||
|
showModelDetail: false,
|
||||||
|
currentTemplateId: '',
|
||||||
|
currentTemplateRowId: '',
|
||||||
|
currentTemplateName: '',
|
||||||
|
currentVersion: '',
|
||||||
|
versionList: [],
|
||||||
|
currentDetail: null,
|
||||||
|
flowId: '',
|
||||||
|
createdById: '',
|
||||||
|
templateManagementPermissions: [],
|
||||||
currentModel: '',
|
currentModel: '',
|
||||||
currentEngineModelID: '',
|
currentEngineModelID: '',
|
||||||
currentEngineDetail: null,
|
currentEngineDetail: null,
|
||||||
@ -159,7 +195,8 @@ export default {
|
|||||||
showApprovalProgressDetail: false, // 是否显示模板审核详情
|
showApprovalProgressDetail: false, // 是否显示模板审核详情
|
||||||
currentApprovalDetail: null, // 当前模板审核详情
|
currentApprovalDetail: null, // 当前模板审核详情
|
||||||
showReportDetail: false, // 是否显示对标报告详情
|
showReportDetail: false, // 是否显示对标报告详情
|
||||||
currentReportDetail: null // 当前对标报告详情
|
currentReportDetail: null, // 当前对标报告详情
|
||||||
|
fromTodo: true // 从待办列表进入,默认为true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -168,8 +205,14 @@ export default {
|
|||||||
rowDraggable: false,
|
rowDraggable: false,
|
||||||
colConfigs: [
|
colConfigs: [
|
||||||
// { prop: 'documentNo', label: '单据编号', showOverflowTooltip: true, minWidth: '140' },
|
// { 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: 'statusCode', label: '状态代号', showOverflowTooltip: true, minWidth: '120' },
|
||||||
// { prop: 'modelName', label: '产品型号', showOverflowTooltip: true, minWidth: '120' },
|
// { prop: 'modelName', label: '产品型号', showOverflowTooltip: true, minWidth: '120' },
|
||||||
{
|
{
|
||||||
@ -183,7 +226,7 @@ export default {
|
|||||||
prop: 'creationDate',
|
prop: 'creationDate',
|
||||||
label: '创建时间',
|
label: '创建时间',
|
||||||
showOverflowTooltip: true,
|
showOverflowTooltip: true,
|
||||||
minWidth: '160',
|
minWidth: '150',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
formatter: this.formatDateTime
|
formatter: this.formatDateTime
|
||||||
},
|
},
|
||||||
@ -204,6 +247,7 @@ export default {
|
|||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.loadData()
|
this.loadData()
|
||||||
|
this.filterTemplateManagementPermissions()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
pageSizeChange(size) {
|
pageSizeChange(size) {
|
||||||
@ -246,6 +290,55 @@ export default {
|
|||||||
this.$message.info('已取消')
|
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) {
|
handleRowView(row) {
|
||||||
// 根据流程主题判断打开哪种页面
|
// 根据流程主题判断打开哪种页面
|
||||||
const dataType = row.dataType || ''
|
const dataType = row.dataType || ''
|
||||||
@ -254,27 +347,89 @@ export default {
|
|||||||
const isInApprovalMode = dataType === '数据审批'
|
const isInApprovalMode = dataType === '数据审批'
|
||||||
const isModelCheck = dataType === '模板审核'
|
const isModelCheck = dataType === '模板审核'
|
||||||
const isReportCheck = dataType === '对标报告审核'
|
const isReportCheck = dataType === '对标报告审核'
|
||||||
|
const isRejectedReportMode = dataType === '对标报告拒绝'
|
||||||
|
const isRejectedModelMode = dataType === '模板拒绝'
|
||||||
|
const isRejectedApprovalMode = dataType === '数据拒绝'
|
||||||
|
|
||||||
// 设置引擎型号信息
|
// 设置引擎型号信息
|
||||||
this.currentModel = row.modelName || row.productFullName || ''
|
this.currentModel = row.modelName || row.productFullName || ''
|
||||||
// engineModelID 可能来自不同的字段,需要根据实际情况调整
|
// engineModelID 可能来自不同的字段,需要根据实际情况调整
|
||||||
this.currentEngineModelID = row.modelId
|
this.currentEngineModelID = row.modelId
|
||||||
|
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) {
|
||||||
// 如果是"数据审批",打开审批页面
|
// 如果是"数据审批",打开审批页面
|
||||||
if (isInApprovalMode) {
|
this.currentEngineDetail = { ...row, flowId: row.documentNo, id: row.documentNo }
|
||||||
this.currentEngineDetail = { ...row, id: row.documentNo }
|
|
||||||
this.showEngineCheck = true
|
this.showEngineCheck = true
|
||||||
this.showEngineDetail = false
|
this.showEngineDetail = false
|
||||||
|
this.canResend = false
|
||||||
|
this.fromTodo = true
|
||||||
this.showApprovalProgressDetail = false
|
this.showApprovalProgressDetail = false
|
||||||
this.showReportDetail = false
|
this.showReportDetail = false
|
||||||
// 根据数据类型判断发动机类型(可能需要根据实际字段调整)
|
// 根据数据类型判断发动机类型(可能需要根据实际字段调整)
|
||||||
// 这里假设有 dataType 字段,或者可以根据其他字段判断
|
// 这里假设有 dataType 字段,或者可以根据其他字段判断
|
||||||
this.engineType = row.dataType === '竞品' ? '竞品' : '玉柴'
|
this.engineType = row.dataType === '竞品' ? '竞品' : '玉柴'
|
||||||
return
|
return
|
||||||
}
|
} else if (isModelCheck) {
|
||||||
|
this.createdById = row.createdById || ''
|
||||||
// 如果是"模板审核",打开模板审核详情页面
|
// 如果是"模板审核",打开模板审核详情页面
|
||||||
if (isModelCheck) {
|
|
||||||
this.showApprovalProgressDetail = true
|
this.showApprovalProgressDetail = true
|
||||||
this.showEngineDetail = false
|
this.showEngineDetail = false
|
||||||
this.showEngineCheck = false
|
this.showEngineCheck = false
|
||||||
@ -286,11 +441,11 @@ export default {
|
|||||||
...row
|
...row
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
} else if (isReportCheck) {
|
||||||
|
this.fromTodo = true
|
||||||
// 如果是"对标报告审核",打开对标报告详情页面
|
// 如果是"对标报告审核",打开对标报告详情页面
|
||||||
if (isReportCheck) {
|
|
||||||
this.showReportDetail = true
|
this.showReportDetail = true
|
||||||
|
this.canResend = false
|
||||||
this.showEngineDetail = false
|
this.showEngineDetail = false
|
||||||
this.showEngineCheck = false
|
this.showEngineCheck = false
|
||||||
this.showApprovalProgressDetail = false
|
this.showApprovalProgressDetail = false
|
||||||
@ -301,17 +456,28 @@ export default {
|
|||||||
...row
|
...row
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
} 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接口)
|
// 如果是"管理员分发责任人",打开分发模式且是分发填写人(显示填写人列,调用UPDATE_PARAM接口)
|
||||||
// 其他情况打开分发模式且是分发责任人
|
// 其他情况打开分发模式且是分发责任人
|
||||||
if (isFillParameterMode) {
|
|
||||||
this.currentEngineDetail = { ...row, id: row.modelId }
|
this.currentEngineDetail = { ...row, id: row.modelId }
|
||||||
// 填写发动机参数值:非分发模式(只读),传递 filledBy
|
// 填写发动机参数值:非分发模式(只读),传递 filledBy
|
||||||
this.isDispatchMode = false
|
this.isDispatchMode = false
|
||||||
|
this.canResend = false
|
||||||
this.dispatchType = 'todo'
|
this.dispatchType = 'todo'
|
||||||
this.filledBy = row.ownerId || ''
|
this.filledBy = row.ownerId || ''
|
||||||
|
this.flowId = row.documentNo || ''
|
||||||
this.responsiblePersonId = ''
|
this.responsiblePersonId = ''
|
||||||
} else if (isResponsibleDispatchMode) {
|
} else if (isResponsibleDispatchMode) {
|
||||||
this.currentEngineDetail = { ...row, id: row.modelId }
|
this.currentEngineDetail = { ...row, id: row.modelId }
|
||||||
@ -332,6 +498,10 @@ export default {
|
|||||||
this.showApprovalProgressDetail = false
|
this.showApprovalProgressDetail = false
|
||||||
this.showReportDetail = false
|
this.showReportDetail = false
|
||||||
},
|
},
|
||||||
|
handleBackFromTodoDetail() {
|
||||||
|
this.showModelDetail = false
|
||||||
|
this.loadData() // 刷新待办列表
|
||||||
|
},
|
||||||
handleBackFromDetail() {
|
handleBackFromDetail() {
|
||||||
this.showEngineDetail = false
|
this.showEngineDetail = false
|
||||||
this.currentModel = ''
|
this.currentModel = ''
|
||||||
@ -501,5 +671,17 @@ export default {
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
min-height: 0;
|
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>
|
</style>
|
||||||
|
|||||||
@ -99,6 +99,7 @@ export default {
|
|||||||
this.$emit('version-click', {
|
this.$emit('version-click', {
|
||||||
version: version,
|
version: version,
|
||||||
changeId: version.id,
|
changeId: version.id,
|
||||||
|
returnNum: version.returnNum,
|
||||||
templateId: version.rowId || (this.currentRow && (this.currentRow.rowId || this.currentRow.templateRowId || this.currentRow.id)),
|
templateId: version.rowId || (this.currentRow && (this.currentRow.rowId || this.currentRow.templateRowId || this.currentRow.id)),
|
||||||
template: this.currentRow,
|
template: this.currentRow,
|
||||||
versionList: this.versionList // 传递版本列表
|
versionList: this.versionList // 传递版本列表
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user