|
@@ -21,6 +21,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="create-approval-header-right">
|
|
|
+ <el-button @click="saveHandler" v-if="false">暂存</el-button>
|
|
|
<el-button type="primary" @click="submitHandler">发布</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -38,9 +39,10 @@ import BasicInfoTab from './components/BasicInfo.vue'
|
|
|
import ExtendSetTab from './components/ExtendSet.vue'
|
|
|
import FlowDesignTab from './components/FlowDesign.vue'
|
|
|
import FormDesignTab from './components/FormDesign.vue'
|
|
|
+import {ElMessage} from "element-plus";
|
|
|
|
|
|
const flowStore = useFlowStore()
|
|
|
-const { flowName } = storeToRefs(flowStore)
|
|
|
+const { flowName, flowProcessId } = storeToRefs(flowStore)
|
|
|
const componentsArr = [
|
|
|
{
|
|
|
component: BasicInfoTab,
|
|
@@ -71,7 +73,20 @@ const activeName = ref('基础信息')
|
|
|
|
|
|
const submitHandler = () => {}
|
|
|
|
|
|
+const saveHandler = () => {
|
|
|
+ // 基础信息
|
|
|
+ // 表单设计
|
|
|
+ // 流程设计
|
|
|
+ // 扩展设置
|
|
|
+}
|
|
|
+
|
|
|
const activeComponent = item => {
|
|
|
+ if (!flowProcessId.value) {
|
|
|
+ return ElMessage({
|
|
|
+ message: '请先保存基础信息',
|
|
|
+ type: 'error'
|
|
|
+ })
|
|
|
+ }
|
|
|
activeName.value = item.label
|
|
|
}
|
|
|
|