From b1de314a5083907e7b301e20d8da6f53937a6c35 Mon Sep 17 00:00:00 2001 From: herenshan112 Date: Wed, 22 Nov 2023 13:42:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=81=E7=A8=8B=E4=B8=8E=E8=A1=A8=E5=8D=95?= =?UTF-8?q?=E6=95=B4=E5=90=88=E9=A1=B5=E9=9D=A2=E6=98=BE=E7=A4=BA=E5=AE=8C?= =?UTF-8?q?=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/DesignForm/requestapi.ts | 18 +- src/api/DesignForm/type.ts | 5 + src/api/taskapi/types.ts | 13 +- src/assets/icons/addshixian.svg | 1 + src/assets/icons/addxuxian.svg | 1 + .../DesignForm/public/expand/user.vue | 33 +- .../DesignForm/public/expand/userDialog.vue | 37 +- .../DesignForm/public/form/form.vue | 14 +- .../DesignForm/public/form/formGroup.vue | 1 + .../DesignForm/public/form/formItem.vue | 14 +- .../workflow/drwer/approverDrawer.vue | 2 +- src/utils/workflow/const.ts | 41 ++ src/utils/workflow/index.ts | 62 +- src/views/public/orguser/orgalluser.vue | 347 +++++++++++ src/views/public/orguser/orguser.vue | 195 +++++++ src/views/sysworkflow/codepage/page.vue | 4 + .../taskmanagement/edittaskcustomerform.vue | 4 + .../taskplatform/taskmanagement/flowStep.vue | 166 +++++- .../taskmanagement/taskcustomerform.vue | 248 +++++++- .../taskmanagement/taskcustomerformnew.vue | 552 ++++++++++++++++++ .../taskplatform/taskmanagement/tasklist.vue | 2 +- ....timestamp-1700547221061-a6108b35a7917.mjs | 0 22 files changed, 1664 insertions(+), 96 deletions(-) create mode 100644 src/assets/icons/addshixian.svg create mode 100644 src/assets/icons/addxuxian.svg create mode 100644 src/views/public/orguser/orgalluser.vue create mode 100644 src/views/public/orguser/orguser.vue create mode 100644 src/views/taskplatform/taskmanagement/taskcustomerformnew.vue rename vite.config.ts.timestamp-1700438049737-94a706be71b5b.mjs => vite.config.ts.timestamp-1700547221061-a6108b35a7917.mjs (100%) diff --git a/src/api/DesignForm/requestapi.ts b/src/api/DesignForm/requestapi.ts index 31427eb7b..7ca85d064 100644 --- a/src/api/DesignForm/requestapi.ts +++ b/src/api/DesignForm/requestapi.ts @@ -20,7 +20,8 @@ import { publicFormTableStruct, hanziToPinyin, gogoBackFormTabelStruct, - nodeFlow + nodeFlow, + searchUserListForm } from './type'; //自定义表单列表 export function getCustomerFormList(queryParams: SearchForm): AxiosPromise { @@ -168,10 +169,19 @@ export function chineseToPinyin(data: hanziToPinyin){ data: data }); } -//获取工作流步进节点 -export function generateFlow(data: nodeFlow){ + +//自定义表单搜索人员 +export function searchUserList(data: searchUserListForm){ + return request({ + url: '/systemapi/task_flow/searchUserList', + method: 'post', + data: data + }); +} +//自定义表单搜索人员 +export function gainFlowPeople(data?: string[]){ return request({ - url: '/systemapi/task_flow/generateFlow', + url: '/systemapi/task_flow/gainFlowPeople', method: 'post', data: data }); diff --git a/src/api/DesignForm/type.ts b/src/api/DesignForm/type.ts index b58d2a154..5e3f89d83 100644 --- a/src/api/DesignForm/type.ts +++ b/src/api/DesignForm/type.ts @@ -166,3 +166,8 @@ export interface nodeUserInfo{ icon?:string; iconToBase64?:string; } +//自定义表单搜索人员 +export interface searchUserListForm extends PageQuery{ + name?: string; + department?:number; +} diff --git a/src/api/taskapi/types.ts b/src/api/taskapi/types.ts index 8e4a2279f..c5a1f9cd9 100644 --- a/src/api/taskapi/types.ts +++ b/src/api/taskapi/types.ts @@ -57,18 +57,21 @@ export interface customerFormVersionCont{ } //获取工作流步进节点 export interface nodeFlow extends customerFormLogo{ - conditionList?:conditionInfo[] + conditionList?:conditionInfo[]; + nodelPeople?:nodelPeoples[] +} +export interface nodelPeoples { + factorid?:string; + userList?:string } export interface conditionInfo{ - factorid:string; - type:number; + factorid?:string; + type?:number; isCheckbox?:boolean; answers?:string[]; oneanswer?:string; customFields?:customFieldsInfo[]; nodeUserList?:nodeUserInfo[]; - - } //自定义条件 export interface customFieldsInfo{ diff --git a/src/assets/icons/addshixian.svg b/src/assets/icons/addshixian.svg new file mode 100644 index 000000000..6f7530b3d --- /dev/null +++ b/src/assets/icons/addshixian.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/addxuxian.svg b/src/assets/icons/addxuxian.svg new file mode 100644 index 000000000..2613e9339 --- /dev/null +++ b/src/assets/icons/addxuxian.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/components/DesignForm/public/expand/user.vue b/src/components/DesignForm/public/expand/user.vue index 6a0e47906..4c74cf570 100644 --- a/src/components/DesignForm/public/expand/user.vue +++ b/src/components/DesignForm/public/expand/user.vue @@ -33,21 +33,26 @@ const value = computed({ return props.modelValue }, set: (newVal: any) => { - console.log("value-set",newVal) + console.log("value-set",newVal,newVal.length) // emits('update:modelValue', newVal) - let newValJson:criteriaForPeopleList[] = JSON.parse(newVal) - console.log("value-newValJson",newValJson) - if(newValJson.length > 0){ - let userAry = new Array - let userKeyAry = new Array - newValJson.forEach(item =>{ - userAry.push(item.name+"("+item.number+")") - userKeyAry.push(item.userkey.toString()) - }) - emits('update:modelValue', userAry.join(',')) - // userlist.value = userAry.join(',') - // - } + + let newValJson:criteriaForPeopleList[] = JSON.parse(newVal) + console.log("value-newValJson",newValJson) + + if(newValJson.length > 0){ + let userAry = new Array + let userKeyAry = new Array + newValJson.forEach(item =>{ + userAry.push(item.name+"("+item.number+")") + userKeyAry.push(item.userkey.toString()) + }) + emits('update:modelValue', userAry.join(',')) + // userlist.value = userAry.join(',') + // + }else{ + emits('update:modelValue', "") + } + }, }); diff --git a/src/components/DesignForm/public/expand/userDialog.vue b/src/components/DesignForm/public/expand/userDialog.vue index 9558cad51..b20d4eb65 100644 --- a/src/components/DesignForm/public/expand/userDialog.vue +++ b/src/components/DesignForm/public/expand/userDialog.vue @@ -100,23 +100,35 @@ const tableRowClick = (row: any) => { }else{ checkDataList.push(row) } - console.log("checkDataList",checkDataList,row) + // console.log("checkDataList",checkDataList,row) } const delRowClick = (row: criteriaForPeopleList) => { + console.log("checkDataList",row) // checkData.value.forEach((item: any, index: number) => { // if (item === row) { // checkData.value.splice(index, 1) // } // }) - let checkDataAry = checkDataList - if(checkDataAry.length > 0) { - checkDataList.splice(0,checkDataList.length) - checkDataAry.forEach(item => { - if(item.id != row.id){ - checkDataList.push(item) + if(checkDataList &&checkDataList.length > 0) { + checkDataList.forEach((item:criteriaForPeopleList,index:number) => { + if(item.id == row.id){ + checkDataList.splice(index,1) } }) } + + + // let checkDataAry = checkDataList + // if(checkDataAry.length > 0) { + // checkDataList.splice(0,checkDataList.length) + // console.log("checkDataList----1------>",checkDataAry,checkDataList) + // checkDataAry.forEach(item => { + // if(item.id != row.id){ + // console.log("checkDataList---------->",item) + // checkDataList.push(item) + // } + // }) + // } } const delAllClick = () => { // checkData.value = [] @@ -131,6 +143,7 @@ const open = () => { .then(({data})=>{ console.log("弹窗处理",data) // checkDataList = data + checkDataList.splice(0,checkDataList.length) if(data.length > 0){ data.forEach((item:any) => { checkDataList.push(item) @@ -164,9 +177,11 @@ onMounted(() => { getUserList() }) }) + + const defaultProps ={ children: 'children', - label: 'name', + label: 'name', }