fix(系统管理): 组织模板修改cr

This commit is contained in:
xinxin.wu 2023-11-03 17:40:28 +08:00 committed by Craftsman
parent 1eb66b2a8e
commit 7e5a86f881
3 changed files with 15 additions and 19 deletions

View File

@ -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; // 是否允许所有状态流转到该状态
}
// 状态列表

View File

@ -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(

View File

@ -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;
});
//