|
|
@@ -1,12 +1,6 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <el-drawer
|
|
|
- class="test"
|
|
|
- :model-value="true"
|
|
|
- @close="() => emit('onClose')"
|
|
|
- with-header="true"
|
|
|
- size="35%"
|
|
|
- >
|
|
|
+ <el-drawer class="test" :model-value="true" @close="() => emit('onClose')" with-header="true" size="35%">
|
|
|
<template #header="{ titleId }">
|
|
|
<p :id="titleId">{{ title }}</p>
|
|
|
</template>
|
|
|
@@ -39,12 +33,8 @@
|
|
|
</el-form>
|
|
|
<div style="position: absolute; left: 108px; bottom: 67px">
|
|
|
<el-button v-if="!props.detail.id" @click="resetDraw">重置</el-button>
|
|
|
- <el-button v-if="!props.detail.id" type="primary" @click="addNewType(ruleFormRef)">
|
|
|
- 提交
|
|
|
- </el-button>
|
|
|
- <el-button v-if="props.detail.id" type="primary" @click="editedSub(ruleFormRef)">
|
|
|
- 提交
|
|
|
- </el-button>
|
|
|
+ <el-button v-if="!props.detail.id" type="primary" @click="addNewType(ruleFormRef)"> 提交 </el-button>
|
|
|
+ <el-button v-if="props.detail.id" type="primary" @click="editedSub(ruleFormRef)"> 提交 </el-button>
|
|
|
</div>
|
|
|
</el-drawer></div
|
|
|
>
|
|
|
@@ -55,6 +45,7 @@
|
|
|
// import { IS_DISABLED } from '@/types/scene/constant.ts';
|
|
|
import { type FormInstance, type FormRules } from 'element-plus';
|
|
|
import { addWorkspace, editWorkspace } from '@/api/scene/scene.ts';
|
|
|
+ import { uid } from 'uid';
|
|
|
|
|
|
const props = defineProps<{
|
|
|
// allCodes: string[];
|
|
|
@@ -133,6 +124,7 @@
|
|
|
// // isDisabled: ruleForm.isDisabled,
|
|
|
workshopId: props.detail.workshopId,
|
|
|
// orderNum: props.detail.orderNum,
|
|
|
+ code: uid(20),
|
|
|
};
|
|
|
addWorkspace(newAddData)
|
|
|
.then(() => {
|