diff --git a/package.json b/package.json index 36b100f0f..51c4bad81 100644 --- a/package.json +++ b/package.json @@ -75,6 +75,7 @@ "@types/md5": "^2.3.2", "@types/nprogress": "^0.2.0", "@types/path-browserify": "^1.0.0", + "@types/uuid": "^9.0.7", "@typescript-eslint/eslint-plugin": "^5.59.6", "@typescript-eslint/parser": "^5.59.6", "autoprefixer": "^10.4.14", diff --git a/src/api/DesignForm/requestapi.ts b/src/api/DesignForm/requestapi.ts index aa3b40a2b..31c83c4ca 100644 --- a/src/api/DesignForm/requestapi.ts +++ b/src/api/DesignForm/requestapi.ts @@ -19,7 +19,10 @@ import { optimizeRepairForm, publicFormTableStruct, hanziToPinyin, - gogoBackFormTabelStruct + gogoBackFormTabelStruct, + nodeFlow, + searchUserListForm, + taskflowquery } from './type'; //自定义表单列表 export function getCustomerFormList(queryParams: SearchForm): AxiosPromise { @@ -167,3 +170,44 @@ export function chineseToPinyin(data: hanziToPinyin){ data: data }); } + +//自定义表单搜索人员 +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/gainFlowPeople', + method: 'post', + data: data + }); +} +//发起工作流 +export function startRunFlow(data?:any){ + return request({ + url: '/systemapi/task_flow/startRunFlow', + method: 'post', + data: data + }); +} +//流程任务 +export function taskFlowList(data?:taskflowquery){ + return request({ + url: '/systemapi/task_flow/taskFlowList', + method: 'post', + data: data + }); +} +//获取正在执行得任务流程 +export function gainRunTaskFlow(data?:customerFormLogo){ + return request({ + url: '/systemapi/task_flow/gainRunTaskFlow', + method: 'post', + data: data + }); +} diff --git a/src/api/DesignForm/type.ts b/src/api/DesignForm/type.ts index ca7500ce4..0677054db 100644 --- a/src/api/DesignForm/type.ts +++ b/src/api/DesignForm/type.ts @@ -59,6 +59,8 @@ export interface customerFormVersionCont{ editTime:number; table_structure:string; dict:string; + createrstr:string; + flowkeystr:string; } //编辑自定义表单内容 export interface editFormInfo extends customerFromCont{ @@ -132,3 +134,46 @@ export interface hanziToPinyin{ types:number; connector:string; } +//获取工作流步进节点 +export interface nodeFlow extends enableVersionId{ + conditionList?:conditionInfo[] +} +export interface conditionInfo{ + factorid:string; + type:number; + isCheckbox?:boolean; + answers?:string[]; + oneanswer?:string; + customFields?:customFieldsInfo[]; + nodeUserList?:nodeUserInfo[]; + + +} +//自定义条件 +export interface customFieldsInfo{ + wordfield:string; + optType:string; + leftval:string; + leftoptType?:string; + rightoptType?:string; + rightval?:string; +} +//节点条件人员 +export interface nodeUserInfo{ + type:number; + targetId:string; + name?:string; + icon?:string; + iconToBase64?:string; +} +//自定义表单搜索人员 +export interface searchUserListForm extends PageQuery{ + name?: string; + department?:number; +} +//流程任务 +export interface taskflowquery extends PageQuery{ + title?: string; //任务标题 + class?:number; //类型:1、我的请求;2、待办事宜;3、已办事宜;4:草稿箱 + state?:number; //状态:状态:1、草稿;2:驳回;3:审批中;4:归档;5:删除 +} diff --git a/src/api/taskapi/management.ts b/src/api/taskapi/management.ts index 1c68803cc..888ec0973 100644 --- a/src/api/taskapi/management.ts +++ b/src/api/taskapi/management.ts @@ -6,7 +6,8 @@ import { gainTaskListQuery, gainTaskListPageResult, customerFormLogo, - customerFormVersionCont + customerFormVersionCont, + nodeFlow } from '@/api/taskapi/types' @@ -64,3 +65,12 @@ export function delCustomerFormData(data: customerFormLogo) { data: data }); } + +//获取工作流步进节点 +export function generateFlow(data: nodeFlow):any{ + return request({ + url: '/systemapi/task_flow/generateFlow', + method: 'post', + data: data + }); +} diff --git a/src/api/taskapi/types.ts b/src/api/taskapi/types.ts index 4cd6dcae0..3d463af0e 100644 --- a/src/api/taskapi/types.ts +++ b/src/api/taskapi/types.ts @@ -23,6 +23,7 @@ export interface taskLonCont{ //获取可执行得任务列表 export interface gainTaskListQuery extends PageQuery { status?: number; + type?: number; } //执行得任务记录列表 export interface taskListCont{ @@ -55,3 +56,38 @@ export interface customerFormVersionCont{ table_structure:string; dict:string; } +//获取工作流步进节点 +export interface nodeFlow extends customerFormLogo{ + conditionList?:conditionInfo[]; + nodelPeople?:nodelPeoples[] +} +export interface nodelPeoples { + factorid?:string; + userList?:string +} +export interface conditionInfo{ + factorid?:string; + type?:number; + isCheckbox?:boolean; + answers?:string[]; + oneanswer?:string; + customFields?:customFieldsInfo[]; + nodeUserList?:nodeUserInfo[]; +} +//自定义条件 +export interface customFieldsInfo{ + wordfield:string; + optType:string; + leftval:string; + leftoptType?:string; + rightoptType?:string; + rightval?:string; +} +//节点条件人员 +export interface nodeUserInfo{ + type:number; + targetId:string; + name?:string; + icon?:string; + iconToBase64?:string; +} 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/assets/icons/caogaoxiang(1).svg b/src/assets/icons/caogaoxiang(1).svg new file mode 100644 index 000000000..335cbcb76 --- /dev/null +++ b/src/assets/icons/caogaoxiang(1).svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/caogaoxiang.svg b/src/assets/icons/caogaoxiang.svg new file mode 100644 index 000000000..918d62a02 --- /dev/null +++ b/src/assets/icons/caogaoxiang.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/daiBanShiYi.svg b/src/assets/icons/daiBanShiYi.svg new file mode 100644 index 000000000..a52ee66ce --- /dev/null +++ b/src/assets/icons/daiBanShiYi.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/myQingQiu.svg b/src/assets/icons/myQingQiu.svg new file mode 100644 index 000000000..16e48815c --- /dev/null +++ b/src/assets/icons/myQingQiu.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/newFlow.svg b/src/assets/icons/newFlow.svg new file mode 100644 index 000000000..aa3c3fc29 --- /dev/null +++ b/src/assets/icons/newFlow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/yiBanRenwu.svg b/src/assets/icons/yiBanRenwu.svg new file mode 100644 index 000000000..d1d38eadd --- /dev/null +++ b/src/assets/icons/yiBanRenwu.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/images/1.png b/src/assets/images/1.png new file mode 100644 index 000000000..7d1e905ca Binary files /dev/null and b/src/assets/images/1.png differ diff --git a/src/assets/images/2.png b/src/assets/images/2.png new file mode 100644 index 000000000..e16488e45 Binary files /dev/null and b/src/assets/images/2.png differ diff --git a/src/components/DesignForm/public/expand/user.vue b/src/components/DesignForm/public/expand/user.vue index 6a0e47906..0dbadee94 100644 --- a/src/components/DesignForm/public/expand/user.vue +++ b/src/components/DesignForm/public/expand/user.vue @@ -28,26 +28,31 @@ const userDialogEl = ref() // const userlist = ref("") const value = computed({ get: () => { - console.log("value-get",props.modelValue) + // console.log("value-get",props.modelValue) // userlist.value = props.modelValue 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', "") + } + }, }); @@ -57,7 +62,7 @@ const openDialog = () => { userDialogEl.value.open() } onMounted(() => { - console.log("value---1--》",value.value,props.modelValue) + // console.log("value---1--》",value.value,props.modelValue) nextTick(() => {}) }) diff --git a/src/components/DesignForm/public/expand/userDialog.vue b/src/components/DesignForm/public/expand/userDialog.vue index 9558cad51..5cf031cca 100644 --- a/src/components/DesignForm/public/expand/userDialog.vue +++ b/src/components/DesignForm/public/expand/userDialog.vue @@ -35,7 +35,7 @@ const getTreeData = () => { // }) getOrgFormTree() .then(({ data }) => { - console.log(data) + // console.log(data) treeData.value = data.list }).finally(()=>{}) } @@ -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 = [] @@ -125,12 +137,13 @@ const delAllClick = () => { // 弹窗处理 const open = () => { visible.value = true - console.log("open--->",props.modelValue) + // console.log("open--->",props.modelValue) if (props.modelValue) { searchUserCustomerFormList({name:props.modelValue}) .then(({data})=>{ - console.log("弹窗处理",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', }