18 changed files with 1382 additions and 417 deletions
@ -1,9 +1,26 @@ |
|||
export interface publicid{ |
|||
id?: string; |
|||
} |
|||
//表单名称
|
|||
export interface formTableName{ |
|||
name?: string; |
|||
} |
|||
|
|||
//错误提示
|
|||
export interface tipListStrucr{ |
|||
export interface flowversion{ |
|||
id:string; |
|||
version:string; |
|||
state:number; |
|||
key:string; |
|||
} |
|||
|
|||
//工作流判断条件
|
|||
export interface flowFactorCont{ |
|||
id:number; |
|||
factorid:string; |
|||
options:optionsInfo[] |
|||
} |
|||
export interface optionsInfo{ |
|||
label:string; |
|||
value:string; |
|||
} |
|||
|
|||
@ -0,0 +1,135 @@ |
|||
<!-- |
|||
@ 作者: 秦东 |
|||
@ 时间: 2023-10-20 13:32:10 |
|||
@ 备注: 表单字段 |
|||
--> |
|||
<script lang='ts' setup> |
|||
import { formWordList, gainFormTableWorde, searchVal } from '@/components/workflow/dialog/common' |
|||
import $func from '@/utils/workflow/index' |
|||
//引入样式 |
|||
import '@/styles/workflowcss/dialog.scss' |
|||
//引入页面 |
|||
import selectBox from '@/components/workflow/selectBoxs.vue' |
|||
import selectResult from '@/components/workflow/selectResult.vue' |
|||
|
|||
let props = defineProps({ |
|||
visible: { |
|||
type: Boolean, |
|||
default: false |
|||
}, |
|||
data: { |
|||
type: Array, |
|||
default: () => [] |
|||
}, |
|||
formid:{ |
|||
type:String, |
|||
default:"" |
|||
}, |
|||
formtype:{ |
|||
type:Number, |
|||
default:1 |
|||
} |
|||
}); |
|||
let checkedFormList = ref([]) |
|||
let emits = defineEmits(['update:visible', 'change']) |
|||
let list = computed(() => { |
|||
if(props.formtype == 1){ |
|||
return [{ |
|||
type: 'formword', |
|||
not: false, |
|||
data: formWordList.value, |
|||
isActive: (item) => $func.toggleClass(checkedFormList.value, item, 'id'), |
|||
|
|||
change: (item) => { |
|||
checkedFormList.value = [item] |
|||
} |
|||
}] |
|||
}else{ |
|||
return [{ |
|||
type: 'formword', |
|||
not: true, |
|||
data: formWordList.value, |
|||
isActive: (item) => $func.toggleClass(checkedFormList.value, item, 'id'), |
|||
change: (item)=> $func.toChecked(checkedFormList.value, item), |
|||
}] |
|||
} |
|||
|
|||
}) |
|||
let resList = computed(() => { |
|||
if(props.formtype == 1){ |
|||
return [{ |
|||
type: 'formword', |
|||
data: checkedFormList.value, |
|||
cancel: (item) => $func.removeEle(checkedFormList.value, item, 'id') |
|||
}] |
|||
}else{ |
|||
return [{ |
|||
type: 'formword', |
|||
data: checkedFormList.value, |
|||
cancel: (item)=> $func.removeEle(checkedFormList.value, item) |
|||
}] |
|||
} |
|||
}) |
|||
//关闭弹窗 |
|||
const closeDialog = () => { |
|||
emits('update:visible', false) |
|||
} |
|||
let isShow = computed({ |
|||
get() { |
|||
return props.visible |
|||
}, |
|||
set(val) { |
|||
closeDialog() |
|||
} |
|||
}) |
|||
watch(() => props.visible, (val) => { |
|||
if (val) { |
|||
gainFormTableWorde(props.formid,props.formtype); |
|||
searchVal.value = ""; |
|||
checkedFormList.value = props.data.map(({ name, id,options,isCheckbox }) => ({ |
|||
name: name, |
|||
id: id, |
|||
options:options, |
|||
isCheckbox:isCheckbox |
|||
})); |
|||
} |
|||
}) |
|||
let total = computed(() => checkedFormList.value.length) |
|||
const saveDialog = () => { |
|||
|
|||
let checkedList = checkedFormList.value.map(item => ({ |
|||
type: props.formtype, |
|||
name: item.name, |
|||
id: item.id, |
|||
options:item.options, |
|||
isCheckbox:item.isCheckbox |
|||
})) |
|||
emits('change', checkedList) |
|||
} |
|||
const delList = () => { |
|||
checkedFormList.value = []; |
|||
} |
|||
</script> |
|||
<template> |
|||
<el-dialog v-model="isShow" title="选择人力资源字段" :width="600" append-to-body class="promoter_person"> |
|||
<div class="person_body clear"> |
|||
<el-row> |
|||
<el-col :span="12"> |
|||
<div class="person_tree l"> |
|||
<selectBox :list="list"/> |
|||
</div> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<selectResult :list="resList" :total="total" @del="delList"/> |
|||
</el-col> |
|||
</el-row> |
|||
</div> |
|||
<template #footer> |
|||
<el-button @click="closeDialog">取 消</el-button> |
|||
<el-button type="primary" @click="saveDialog">确 定</el-button> |
|||
</template> |
|||
</el-dialog> |
|||
</template> |
|||
<style lang='scss' scoped> |
|||
|
|||
</style> |
|||
@ -0,0 +1,104 @@ |
|||
<!-- |
|||
@ 作者: 秦东 |
|||
@ 时间: 2023-10-19 08:13:15 |
|||
@ 备注: 行政岗位 |
|||
--> |
|||
<script lang='ts' setup> |
|||
import { positionList, searchPostName, getPostList, searchVal } from '@/components/workflow/dialog/common' |
|||
import $func from '@/utils/workflow/index' |
|||
//引入样式 |
|||
import '@/styles/workflowcss/dialog.scss' |
|||
//引入页面 |
|||
import selectBox from '@/components/workflow/selectBoxs.vue' |
|||
import selectResult from '@/components/workflow/selectResult.vue' |
|||
|
|||
let props = defineProps({ |
|||
visible: { |
|||
type: Boolean, |
|||
default: false |
|||
}, |
|||
data: { |
|||
type: Array, |
|||
default: () => [] |
|||
} |
|||
}); |
|||
let checkedRoleList = ref([]) |
|||
let emits = defineEmits(['update:visible', 'change']) |
|||
let list = computed(() => { |
|||
return [{ |
|||
type: 'position', |
|||
data: positionList.value, |
|||
isActive: (item) => $func.toggleClass(checkedRoleList.value, item, 'id'), |
|||
// change: (item) => { |
|||
// checkedRoleList.value = [item] |
|||
// } |
|||
change: (item)=> $func.toChecked(checkedRoleList.value, item), |
|||
}] |
|||
}) |
|||
let resList = computed(() => { |
|||
return [{ |
|||
type: 'position', |
|||
data: checkedRoleList.value, |
|||
// cancel: (item) => $func.removeEle(checkedRoleList.value, item, 'id') |
|||
cancel: (item)=> $func.removeEle(checkedRoleList.value, item) |
|||
}] |
|||
}) |
|||
let visibleDialog = computed({ |
|||
get() { |
|||
return props.visible |
|||
}, |
|||
set(val) { |
|||
closeDialog() |
|||
} |
|||
}) |
|||
watch(() => props.visible, (val) => { |
|||
if (val) { |
|||
getPostList(); |
|||
searchVal.value = ""; |
|||
checkedRoleList.value = props.data.map(({ name, targetId }) => ({ |
|||
name: name, |
|||
id: targetId |
|||
})); |
|||
} |
|||
}) |
|||
let total = computed(() => checkedRoleList.value.length) |
|||
const saveDialog = () => { |
|||
let checkedList = checkedRoleList.value.map(item => ({ |
|||
type: "position", |
|||
targetId: item.id, |
|||
name: item.name |
|||
})) |
|||
emits('change', checkedList) |
|||
} |
|||
const delList = () => { |
|||
checkedRoleList.value = []; |
|||
} |
|||
|
|||
const closeDialog = () => { |
|||
emits('update:visible', false) |
|||
} |
|||
</script> |
|||
<template> |
|||
<el-dialog v-model="visibleDialog" title="选择岗位" :width="600" append-to-body class="promoter_person"> |
|||
<div class="person_body clear"> |
|||
<el-row> |
|||
<el-col :span="12"> |
|||
<div class="person_tree l"> |
|||
<input v-model="searchVal" type="text" placeholder="搜索岗位" @input="searchPostName($event,2)"> |
|||
<selectBox :list="list"/> |
|||
</div> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<selectResult :list="resList" :total="total" @del="delList"/> |
|||
</el-col> |
|||
</el-row> |
|||
</div> |
|||
<template #footer> |
|||
<el-button @click="closeDialog">取 消</el-button> |
|||
<el-button type="primary" @click="saveDialog">确 定</el-button> |
|||
</template> |
|||
</el-dialog> |
|||
</template> |
|||
<style lang='scss' scoped> |
|||
|
|||
</style> |
|||
File diff suppressed because one or more lines are too long
Loading…
Reference in new issue