fix(系统管理): 组织模板修改cr
This commit is contained in:
parent
1eb66b2a8e
commit
7e5a86f881
|
@ -131,12 +131,12 @@ export interface WorkFlowType {
|
|||
|
||||
// 创建组织工作流状态
|
||||
export interface OrdWorkStatus {
|
||||
scopeId: string;
|
||||
id: string;
|
||||
scopeId?: string;
|
||||
id?: string;
|
||||
name: string;
|
||||
scene: SeneType;
|
||||
scene?: SeneType;
|
||||
remark: string;
|
||||
allTransferTo: boolean; // 是否允许所有状态流转到该状态
|
||||
allTransferTo?: boolean; // 是否允许所有状态流转到该状态
|
||||
}
|
||||
|
||||
// 状态列表
|
||||
|
|
|
@ -92,10 +92,8 @@
|
|||
await formRef.value?.validate().then(async (error) => {
|
||||
if (!error) {
|
||||
try {
|
||||
if (!isEdit.value) {
|
||||
form.value.allTransferTo = enable as boolean;
|
||||
}
|
||||
if (!form.value.id) {
|
||||
form.value.allTransferTo = enable as boolean;
|
||||
await createWorkFlowStatus(form.value);
|
||||
Message.success(t('system.orgTemplate.addSuccessState'));
|
||||
} else {
|
||||
|
@ -115,9 +113,13 @@
|
|||
// 编辑
|
||||
function handleEdit(record: OrdWorkStatus) {
|
||||
visible.value = true;
|
||||
form.value.name = record.name;
|
||||
form.value.id = record.id;
|
||||
form.value.remark = record.remark;
|
||||
const { name, id, remark, scene } = record;
|
||||
form.value = {
|
||||
name,
|
||||
id,
|
||||
remark,
|
||||
scene,
|
||||
};
|
||||
}
|
||||
|
||||
watch(
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
<span class="mb-2">{{ t('system.orgTemplate.startState') }} </span>
|
||||
<MsTag>{{ startState }}</MsTag>
|
||||
</div>
|
||||
<icon-arrow-right :style="{ 'font-size': '16px' }" class="mt-8 text-[var(--color-text-brand)]" />
|
||||
<icon-arrow-right class="mt-8 text-[16px] text-[var(--color-text-brand)]" />
|
||||
<div class="flex flex-col">
|
||||
<span class="mb-2"> {{ t('system.orgTemplate.endState') }}</span>
|
||||
<MsTag>{{ endState }}</MsTag>
|
||||
|
@ -124,18 +124,12 @@
|
|||
|
||||
// 计算开始状态
|
||||
const startState = computed(() => {
|
||||
const startStatus = props.totalData.find((item: WorkFlowType) => item.id === props.stateItem.id);
|
||||
if (startStatus) {
|
||||
return startStatus.name;
|
||||
}
|
||||
return props.totalData.find((item: WorkFlowType) => item.id === props.stateItem.id)?.name;
|
||||
});
|
||||
|
||||
// 计算结束状态
|
||||
const endState = computed(() => {
|
||||
const endStatus = props.totalData.find((item: WorkFlowType) => item.id === props.columnItem.dataIndex);
|
||||
if (endStatus) {
|
||||
return endStatus.name;
|
||||
}
|
||||
return props.totalData.find((item: WorkFlowType) => item.id === props.columnItem.dataIndex)?.name;
|
||||
});
|
||||
|
||||
// 计算是否禁用状态
|
||||
|
|
Loading…
Reference in New Issue