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', }