diff --git a/public/index.html b/public/index.html index 577e03b..12cc90f 100644 --- a/public/index.html +++ b/public/index.html @@ -4,6 +4,12 @@ + + + + + + <%= webpackConfig.name %> diff --git a/src/api/preload.js b/src/api/preload.js index ad183d6..c09caf1 100644 --- a/src/api/preload.js +++ b/src/api/preload.js @@ -59,24 +59,40 @@ All.prototype = { arr.splice(includesIndex, 1); }, setApproverStr(nodeConfig) { - console.log("设置节点框显示内容--》",nodeConfig); + // console.log("设置节点框显示内容--》",nodeConfig); if (nodeConfig.settype == 1) { if (nodeConfig.nodeUserList.length == 1) { return nodeConfig.nodeUserList[0].name } else if (nodeConfig.nodeUserList.length > 1) { if (nodeConfig.examineMode == 1) { - return this.arrToStr(nodeConfig.nodeUserList) + return this.arrToStr(nodeConfig.nodeUserList) + "依次审批" } else if (nodeConfig.examineMode == 2) { return nodeConfig.nodeUserList.length + "人会签" + }else{ + return nodeConfig.nodeUserList.length + "人非会签" } } } else if (nodeConfig.settype == 2) { let level = nodeConfig.directorLevel == 1 ? '直接主管' : '第' + nodeConfig.directorLevel + '级主管' if (nodeConfig.examineMode == 1) { - return level + return level + "依次审批" } else if (nodeConfig.examineMode == 2) { return level + "会签" + }else{ + return level + "非会签" } + + } else if (nodeConfig.settype == 3) { + let level = nodeConfig.nodeUserList.length > 0 ? this.arrToStr(nodeConfig.nodeUserList):""; + + if (nodeConfig.examineMode == 1) { + return level + "依次审批" + } else if (nodeConfig.examineMode == 2) { + return level + "会签" + }else{ + return level + "非会签" + } + } else if (nodeConfig.settype == 4) { if (nodeConfig.selectRange == 1) { return "发起人自选" @@ -113,7 +129,10 @@ All.prototype = { return arr.join("或") }, conditionStr(nodeConfig, index) { - var { conditionList, nodeUserList } = nodeConfig.conditionNodes[index]; + var { conditionList, nodeUserList,databasecondition } = nodeConfig.conditionNodes[index]; + + // console.log("条件解析--->",nodeConfig.conditionNodes[index]) + if (conditionList.length == 0) { return (index == nodeConfig.conditionNodes.length - 1) && nodeConfig.conditionNodes[0].conditionList.length != 0 ? '其他条件进入此流程' : '请设置条件' } else { @@ -139,6 +158,83 @@ All.prototype = { str += `${zdy1} ${opt1} ${showName} ${opt2} ${zdy2} 并且 ` } } + if(showType == "datatable"){ + // console.log("条件解析--1->",databasecondition,databasecondition.len) + if(databasecondition.length != 0){ + databasecondition.forEach(item => { + if(item.wordlist){ + // console.log("条件解析--2->",item.wordlist) + if(item.wordlist.length > 0){ + // console.log("条件解析--5->",item.wordlist) + item.wordlist.forEach(itemWord=>{ + switch(itemWord.notation){ + case "1": + case "2": + case "3": + case "4": + case "5": + var optTypesStr = ["", "<", ">", "≤", "=", "≥"][itemWord.notation] + str += itemWord.key +' '+ optTypesStr + ' ' + itemWord.equation.letfval + ' 并且 ' + // console.log("条件解析--4->",itemWord.notation) + break; + case "6": + var optTypeLeftStr = ["", "<", "", "≤"][itemWord.equation.leftnotation] + var optTypeRightStr = ["", "<", "", "≤"][itemWord.equation.rightnotation] + str += itemWord.equation.letfval + ' ' + optTypeLeftStr + ' ' + itemWord.key + ' ' + optTypeRightStr + ' ' + itemWord.equation.rightval +' 并且 ' + break; + case "in": + str += itemWord.key + '包含' + itemWord.equation.letfval + ' 并且 ' + break; + case "notin": + str += itemWord.key + '不包含' + itemWord.equation.letfval + ' 并且 ' + break; + default: + str += itemWord.key + itemWord.equation.letfval + ' 并且 ' + break; + } + }) + } + // console.log("条件解析--3->",str) + } + }); + } + } + if(columnType == "custom"){ + // console.log("条件解析--250->",conditionList[i],conditionList[i].condition) + if(conditionList[i].condition){ + if(conditionList[i].condition.length > 0){ + conditionList[i].condition.forEach(itemcon=>{ + // console.log("条件解析-1-4->",itemcon.optType) + switch(itemcon.optType){ + case "1": + case "2": + case "3": + case "4": + case "5": + var optTypesStr = ["", "<", ">", "≤", "=", "≥"][itemcon.factor.leftoptType] + str += itemcon.wordfield +' '+ optTypesStr + ' ' + itemcon.factor.leftval + ' 并且 ' + // console.log("条件解析--4->",str) + break; + case "6": + var optTypeLeftStr = ["", "<", "", "≤"][itemcon.factor.leftoptType] + var optTypeRightStr = ["", "<", "", "≤"][itemcon.factor.rightoptType] + str += itemcon.factor.leftval + ' ' + optTypeLeftStr + ' ' + itemcon.wordfield + ' ' + optTypeRightStr + ' ' + itemcon.factor.rightval +' 并且 ' + // console.log("条件解析--4-6------>",itemcon.factor.leftoptType,itemcon.factor.rightoptType,optTypeLeftStr,optTypeRightStr) + break; + case "7": + str += itemcon.wordfield + '包含' + itemcon.factor.leftval + ' 并且 ' + break; + case "8": + str += itemcon.wordfield + '不包含' + itemcon.factor.leftval + ' 并且 ' + break; + default: + str += itemcon.wordfield + itemcon.factor.leftval + ' 并且 ' + break; + } + }) + } + } + } } return str ? str.substring(0, str.length - 4) : '请设置条件' } diff --git a/src/api/workflowapi/workflowaip.js b/src/api/workflowapi/workflowaip.js index 6def516..63402d1 100644 --- a/src/api/workflowapi/workflowaip.js +++ b/src/api/workflowapi/workflowaip.js @@ -3,7 +3,7 @@ import request from '@/utils/requestFile' //获取流程数值 export const getShiyanData = (data) => { return request({ - url: '/workflowapi/shiyan_data', + url: '/workflowapi/look_work_flow', method: 'post', data: data }) @@ -15,7 +15,7 @@ export const getShiyanData = (data) => { */ export const getRoles = (data) => { return request({ - url: '/workflowapi/shiyan_data', + url: '/powerpc/system_role_list_flow', method: 'post', data: data }) @@ -39,7 +39,7 @@ export const getShiyanData = (data) => { */ export const getEmployees = (data) => { return request({ - url: '/workflowapi/shiyan_data', + url: '/powerpc/search_people', method: 'post', data: data }) @@ -55,4 +55,115 @@ export const getShiyanData = (data) => { method: 'post', data: data }) +} +/** + * 获取条件字段 + * @param {*} data + * @returns + */ + export const getDataBaseTable = (data) => { + return request({ + url: '/workflowapi/get_data_base_table', + method: 'post', + data: data + }) +} +/** + * 获取条件字段 + * @param {*} data + * @returns + */ + export const getDataBaseTableCont = (data) => { + return request({ + url: '/workflowapi/get_data_base_tablecont', + method: 'post', + data: data + }) +} + +/** + * 获取条件字段 + * @param {*} data + * @returns + */ + export const getWorkFlowList = (data) => { + return request({ + url: '/workflowapi/get_work_flow_list', + method: 'post', + data: data + }) +} + +/** + * 发布流程 + */ +export const publishWorkFlow = (data) => { + return request({ + url: '/workflowapi/publish_work_flow', + method: 'post', + data: data + }) +} +/** + * 编辑工作流主体状态 + */ + export const editWorkFlowState = (data) => { + return request({ + url: '/workflowapi/edit_work_flow_state', + method: 'post', + data: data + }) +} +/** + * 初始化工作流 + */ + export const initializeWorkFlow = (data) => { + return request({ + url: '/workflowapi/init_work_flow', + method: 'post', + data: data + }) +} +/** + * 获取工作流版本 + */ + export const getWorkFlowVersionList = (data) => { + return request({ + url: '/workflowapi/get_workflow_version_list', + method: 'post', + data: data + }) +} + +/** + * 获取统一岗位 + */ + export const GetPositionUnify = (data) => { + return request({ + url: '/powerpc/get_position_unify', + method: 'post', + data: data + }) +} + +/** + * 搜索统一岗位 + */ + export const SearchPositionUnify = (data) => { + return request({ + url: '/powerpc/search_position_unify', + method: 'post', + data: data + }) +} + +/** + * 启用流程版本 + */ + export const StartUsingVersion = (data) => { + return request({ + url: '/workflowapi/start_using_version', + method: 'post', + data: data + }) } \ No newline at end of file diff --git a/src/component_old/Breadcrumb/index.vue b/src/component_old/Breadcrumb/index.vue deleted file mode 100644 index bb9234c..0000000 --- a/src/component_old/Breadcrumb/index.vue +++ /dev/null @@ -1,78 +0,0 @@ - - - - - diff --git a/src/component_old/Hamburger/index.vue b/src/component_old/Hamburger/index.vue deleted file mode 100644 index 368b002..0000000 --- a/src/component_old/Hamburger/index.vue +++ /dev/null @@ -1,44 +0,0 @@ - - - - - diff --git a/src/component_old/SvgIcon/index.vue b/src/component_old/SvgIcon/index.vue deleted file mode 100644 index b07ded2..0000000 --- a/src/component_old/SvgIcon/index.vue +++ /dev/null @@ -1,62 +0,0 @@ - - - - - diff --git a/src/component_old/dialog/employeesDialog.vue b/src/component_old/dialog/employeesDialog.vue deleted file mode 100644 index 1779f48..0000000 --- a/src/component_old/dialog/employeesDialog.vue +++ /dev/null @@ -1,129 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/component_old/dialog/employeesRoleDialog.vue b/src/component_old/dialog/employeesRoleDialog.vue deleted file mode 100644 index d08d3f1..0000000 --- a/src/component_old/dialog/employeesRoleDialog.vue +++ /dev/null @@ -1,146 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/component_old/dialog/errorDialog.vue b/src/component_old/dialog/errorDialog.vue deleted file mode 100644 index 8e2483a..0000000 --- a/src/component_old/dialog/errorDialog.vue +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/src/component_old/dialog/roleDialog.vue b/src/component_old/dialog/roleDialog.vue deleted file mode 100644 index ef71b36..0000000 --- a/src/component_old/dialog/roleDialog.vue +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/src/component_old/projectDialog/index.vue b/src/component_old/projectDialog/index.vue deleted file mode 100644 index 11b0c81..0000000 --- a/src/component_old/projectDialog/index.vue +++ /dev/null @@ -1,151 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/component_old/selectBox.vue b/src/component_old/selectBox.vue deleted file mode 100644 index 427cf39..0000000 --- a/src/component_old/selectBox.vue +++ /dev/null @@ -1,88 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/component_old/selectResult copy.vue b/src/component_old/selectResult copy.vue deleted file mode 100644 index bc6e07f..0000000 --- a/src/component_old/selectResult copy.vue +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/src/components/dialog/employeesDialog.vue b/src/components/dialog/employeesDialog.vue index 0c003dd..b384e95 100644 --- a/src/components/dialog/employeesDialog.vue +++ b/src/components/dialog/employeesDialog.vue @@ -33,6 +33,7 @@ export default { if (val) { this.getDepartmentList(); this.searchVal = ""; + console.log("visible----------->",this.data); this.checkedEmployessList = this.data.filter(item => item.type === 1).map(({ name, targetId }) => ({ employeeName: name, id: targetId diff --git a/src/component_old/drawer/approverDrawer.vue b/src/components/drawer/appexecutorDrawer.vue similarity index 87% rename from src/component_old/drawer/approverDrawer.vue rename to src/components/drawer/appexecutorDrawer.vue index e20af7c..40eb975 100644 --- a/src/component_old/drawer/approverDrawer.vue +++ b/src/components/drawer/appexecutorDrawer.vue @@ -1,14 +1,15 @@ diff --git a/src/views/workflow/editflowcont.vue b/src/views/workflow/editflowcont.vue new file mode 100644 index 0000000..4852e00 --- /dev/null +++ b/src/views/workflow/editflowcont.vue @@ -0,0 +1,220 @@ + + + + \ No newline at end of file diff --git a/src/views/workflow/flow.vue b/src/views/workflow/flow.vue index 7cff3c2..226cc5b 100644 --- a/src/views/workflow/flow.vue +++ b/src/views/workflow/flow.vue @@ -21,6 +21,7 @@ + @@ -28,9 +29,10 @@ + \ No newline at end of file diff --git a/src/views/workflow/lookflowcont.vue b/src/views/workflow/lookflowcont.vue new file mode 100644 index 0000000..f2a019d --- /dev/null +++ b/src/views/workflow/lookflowcont.vue @@ -0,0 +1,150 @@ + + + + \ No newline at end of file diff --git a/src/views/workflow/myFlow.vue b/src/views/workflow/myFlow.vue new file mode 100644 index 0000000..6032280 --- /dev/null +++ b/src/views/workflow/myFlow.vue @@ -0,0 +1,233 @@ + + + \ No newline at end of file diff --git a/src/views/workflow/workflowlist.vue b/src/views/workflow/workflowlist.vue new file mode 100644 index 0000000..a7a8769 --- /dev/null +++ b/src/views/workflow/workflowlist.vue @@ -0,0 +1,274 @@ + + + + \ No newline at end of file