仿钉钉设计器-字段权限顺序调整
This commit is contained in:
parent
5ee0a7b946
commit
58fc91b810
@ -149,7 +149,11 @@
|
|||||||
@change="approveMethodChanged"
|
@change="approveMethodChanged"
|
||||||
>
|
>
|
||||||
<div class="flex-col">
|
<div class="flex-col">
|
||||||
<div v-for="(item, index) in APPROVE_METHODS" :key="index" class="flex items-center">
|
<div
|
||||||
|
v-for="(item, index) in APPROVE_METHODS"
|
||||||
|
:key="index"
|
||||||
|
class="flex items-center"
|
||||||
|
>
|
||||||
<el-radio
|
<el-radio
|
||||||
:value="item.value"
|
:value="item.value"
|
||||||
:label="item.value"
|
:label="item.value"
|
||||||
@ -166,7 +170,10 @@
|
|||||||
:max="100"
|
:max="100"
|
||||||
:step="10"
|
:step="10"
|
||||||
size="small"
|
size="small"
|
||||||
v-if="item.value === ApproveMethodType.APPROVE_BY_RATIO && currentNode.attributes.approveMethod === ApproveMethodType.APPROVE_BY_RATIO"
|
v-if="
|
||||||
|
item.value === ApproveMethodType.APPROVE_BY_RATIO &&
|
||||||
|
currentNode.attributes.approveMethod === ApproveMethodType.APPROVE_BY_RATIO
|
||||||
|
"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -177,21 +184,14 @@
|
|||||||
<el-radio-group v-model="currentNode.attributes.rejectHandler.type">
|
<el-radio-group v-model="currentNode.attributes.rejectHandler.type">
|
||||||
<div class="flex-col">
|
<div class="flex-col">
|
||||||
<div v-for="(item, index) in REJECT_HANDLER_TYPES" :key="index">
|
<div v-for="(item, index) in REJECT_HANDLER_TYPES" :key="index">
|
||||||
<el-radio
|
<el-radio :key="item.value" :value="item.value" :label="item.label" />
|
||||||
:key="item.value"
|
|
||||||
:value="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
/>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item
|
<el-form-item
|
||||||
v-if="
|
v-if="currentNode.attributes.rejectHandler.type == RejectHandlerType.RETURN_USER_TASK"
|
||||||
currentNode.attributes.rejectHandler.type == RejectHandlerType.RETURN_USER_TASK
|
|
||||||
"
|
|
||||||
label="驳回节点"
|
label="驳回节点"
|
||||||
prop="rejectHandlerNode"
|
prop="rejectHandlerNode"
|
||||||
>
|
>
|
||||||
@ -282,8 +282,8 @@
|
|||||||
<div class="field-permit-title">
|
<div class="field-permit-title">
|
||||||
<div class="setting-title-label first-title"> 字段名称 </div>
|
<div class="setting-title-label first-title"> 字段名称 </div>
|
||||||
<div class="other-titles">
|
<div class="other-titles">
|
||||||
<span class="setting-title-label">可编辑</span>
|
|
||||||
<span class="setting-title-label">只读</span>
|
<span class="setting-title-label">只读</span>
|
||||||
|
<span class="setting-title-label">可编辑</span>
|
||||||
<span class="setting-title-label">隐藏</span>
|
<span class="setting-title-label">隐藏</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -542,7 +542,7 @@ const approveMethodChanged = () => {
|
|||||||
currentNode.value.attributes.rejectHandler.type = RejectHandlerType.FINISH_PROCESS
|
currentNode.value.attributes.rejectHandler.type = RejectHandlerType.FINISH_PROCESS
|
||||||
const approveMethod = currentNode.value.attributes?.approveMethod
|
const approveMethod = currentNode.value.attributes?.approveMethod
|
||||||
if (approveMethod === ApproveMethodType.APPROVE_BY_RATIO) {
|
if (approveMethod === ApproveMethodType.APPROVE_BY_RATIO) {
|
||||||
currentNode.value.attributes.approveRatio = 100;
|
currentNode.value.attributes.approveRatio = 100
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 默认 6小时
|
// 默认 6小时
|
||||||
|
@ -1,23 +1,23 @@
|
|||||||
// 获取条件节点默认的名称
|
// 获取条件节点默认的名称
|
||||||
export const getDefaultConditionNodeName = (index:number, defaultFlow: boolean) : string => {
|
export const getDefaultConditionNodeName = (index: number, defaultFlow: boolean): string => {
|
||||||
if ( defaultFlow ){
|
if (defaultFlow) {
|
||||||
return "其它情况"
|
return '其它情况'
|
||||||
}
|
}
|
||||||
return '条件' + (index+1)
|
return '条件' + (index + 1)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获得默认的表单字段权限.
|
// 获得默认的表单字段权限.
|
||||||
export const getDefaultFieldsPermission = (formFields: string[] | undefined) =>{
|
export const getDefaultFieldsPermission = (formFields: string[] | undefined) => {
|
||||||
const defaultFieldsPermission : any[] = [];
|
const defaultFieldsPermission: any[] = []
|
||||||
if(formFields){
|
if (formFields) {
|
||||||
formFields.forEach((fieldStr: string) => {
|
formFields.forEach((fieldStr: string) => {
|
||||||
const { field, title } = JSON.parse(fieldStr)
|
const { field, title } = JSON.parse(fieldStr)
|
||||||
defaultFieldsPermission.push({
|
defaultFieldsPermission.push({
|
||||||
field,
|
field,
|
||||||
title,
|
title,
|
||||||
permission: '2' // 只读
|
permission: '1' // 只读
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
return defaultFieldsPermission;
|
return defaultFieldsPermission
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user