diff --git a/src/api/matrixapi/type.ts b/src/api/matrixapi/type.ts index 07d946742..8716705e7 100644 --- a/src/api/matrixapi/type.ts +++ b/src/api/matrixapi/type.ts @@ -109,3 +109,12 @@ export interface orgAndUserMatrixCont{ mhid:number; } +//权限矩阵组合 +export interface matrixInfo{ + matrixid:number; + matrixName:string; + factorid:number; + factorName:string; + outcomeid:number; + outcomeName:string; +} diff --git a/src/components/workflow/addNode.vue b/src/components/workflow/addNode.vue index a1839a931..fbe6e33a5 100644 --- a/src/components/workflow/addNode.vue +++ b/src/components/workflow/addNode.vue @@ -67,7 +67,15 @@ const addType = (type:any)=> { "fromNode": fromNodeNumber, "gotoNode":gotoNodeNumber!=""?[gotoNodeNumber]:[], "sendBackNode":"beginnode", - "attribute":1 + "attribute":1, + "matrix":{ + "matrixid":0, + "matrixName":"", + "factorid":0, + "factorName":"", + "outcomeid":0, + "outcomeName":"", + } } // console.log("p4",data) } else if (type == 2) { @@ -100,7 +108,15 @@ const addType = (type:any)=> { "fromNode": fromNodeNumber, "gotoNode":gotoNodeNumber!=""?[gotoNodeNumber]:[], "sendBackNode":"beginnode", - "attribute":1 + "attribute":1, + "matrix":{ + "matrixid":0, + "matrixName":"", + "factorid":0, + "factorName":"", + "outcomeid":0, + "outcomeName":"", + } } // console.log("p6",data) } diff --git a/src/components/workflow/dialog/matrix.vue b/src/components/workflow/dialog/matrix.vue new file mode 100644 index 000000000..0abbd09eb --- /dev/null +++ b/src/components/workflow/dialog/matrix.vue @@ -0,0 +1,215 @@ + + + + + + + + + + {{item.name}} {{item.orgname}} + + + + + + + + + + + + + + + + + + + + + {{item.name}} {{}}{{item.pinyin}} + + + + + + + + + diff --git a/src/components/workflow/drwer/approverDrawer.vue b/src/components/workflow/drwer/approverDrawer.vue index 61a031c19..d94c0d404 100644 --- a/src/components/workflow/drwer/approverDrawer.vue +++ b/src/components/workflow/drwer/approverDrawer.vue @@ -11,6 +11,10 @@ import { getAllParentNode,judgeOptionalNode } from '@/api/workflowapi/index' import PositionDialog from '@/components/workflow/dialog/positionDialog.vue' import FormWord from '@/components/workflow/dialog/formWord.vue' +import MatrixPage from '@/components/workflow/dialog/matrix.vue' + + +import { matrixInfo } from '@/api/matrixapi/type' let props = defineProps({ nodeConfig:{ @@ -55,13 +59,15 @@ let visible = computed({ closeDrawer() } }) +const matrixIsShow = ref(false) watch(visible,(val:any)=>{ // if(val) }) watch(approverConfig1, (val:any)=>{ - // console.log("directormaxlevel",visible.value) + // console.log("directormaxlevel",visible.value)\ + matrixIsShow.value = false approverConfig.value = val.value if(val.type == 3){ nodeTitle.value = "执行人设置" @@ -95,14 +101,22 @@ watch(approverConfig1, (val:any)=>{ } }) } - - - + if(val.value.settype == 9){ + matrixIsShow.value = true + matrixFieldList.value = approverConfig.value.matrix; + } }) let changeRange = ()=> { approverConfig.value.nodeUserList = []; } + +//权限矩阵 +const matrixList = ref() +const matrixCont = ref() +const matrixFieldList = ref() + const changeType = (val:any)=> { + matrixIsShow.value = false approverConfig.value.nodeUserList = []; approverConfig.value.examineMode = 1; approverConfig.value.noHanderAction = 2; @@ -113,7 +127,11 @@ const changeType = (val:any)=> { approverConfig.value.selectRange = 1; } else if (val == 7) { approverConfig.value.examineEndDirectorLevel = 1 - } + }else if (val == 9){ + matrixIsShow.value = true + matrixFieldList.value = approverConfig.value.matrix; + } + } const addApprover = ()=> { approverVisible.value = true; @@ -170,6 +188,12 @@ const sureFormTableApprover = (data:any)=> { approverConfig.value.nodeUserList = data; appFormTableVisible.value = false; } + + +//更新审批人设置 +const updateMatrix = (val:any) =>{ + approverConfig.value.matrix = val; +} @@ -181,7 +205,7 @@ const sureFormTableApprover = (data:any)=> { - {{label}}=>{{value}} + {{label}} @@ -283,6 +307,7 @@ const sureFormTableApprover = (data:any)=> { + 指定审批字段 添加/修改审批字段 @@ -291,8 +316,18 @@ const sureFormTableApprover = (data:any)=> { 清除 + + + + + + - + 多人审批时采用的审批方式 依次审批 @@ -300,7 +335,7 @@ const sureFormTableApprover = (data:any)=> { 非会签(有一位审批人同意即可) - + 审批人为空时 自动审批通过/不允许发起 diff --git a/src/utils/workflow/index.ts b/src/utils/workflow/index.ts index 13978473c..c96deb1e6 100644 --- a/src/utils/workflow/index.ts +++ b/src/utils/workflow/index.ts @@ -125,6 +125,18 @@ All.prototype = { } } + }else if (nodeConfig.settype == 9){ + if(nodeConfig.matrix && nodeConfig.matrix.outcomeName){ + let strVal = nodeConfig.matrix.outcomeName + if (nodeConfig.examineMode == 1) { + return strVal + "依次审批" + } else if (nodeConfig.examineMode == 2) { + return strVal + "会签" + }else if (nodeConfig.examineMode == 3) { + return strVal + "非会签" + } + } + } }, dealStr(str:any, obj:any) { diff --git a/src/views/sysworkflow/codepage/index.vue b/src/views/sysworkflow/codepage/index.vue index 009adb853..5932cb8ec 100644 --- a/src/views/sysworkflow/codepage/index.vue +++ b/src/views/sysworkflow/codepage/index.vue @@ -288,7 +288,7 @@ const setupWorkFlow = (cont:customerFormCont) => { - +
指定审批字段
多人审批时采用的审批方式
审批人为空时