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