基础信息
This commit is contained in:
1 parent
b6334f796c
commit
61235c6ec2
2 files changed
+227
-47
No files matched your search
@@ -15,48 +15,89 @@
|
||||
|
||||
<div class="px-4 mt-2">
|
||||
<v-form ref="form">
|
||||
<!-- 流程信息 -->
|
||||
<v-row>
|
||||
<v-col cols="12" sm="12" md="3" xl="3" class=" pb-3">
|
||||
<span class="jh-input-label">流程名<span class="red--text text--accent-2 ml-1">*必填</span></span>
|
||||
<v-text-field
|
||||
class="jh-v-input mr-2" dense filled single-line color="success"
|
||||
v-model="formObj['workflowName']" :rules="validationRules.requireRules">
|
||||
</v-text-field>
|
||||
</v-col>
|
||||
<v-col cols="12" sm="12" md="3" xl="3" class=" pb-3">
|
||||
<span class="jh-input-label">备注</span>
|
||||
<v-text-field
|
||||
class="jh-v-input mr-2" dense filled single-line color="success"
|
||||
v-model="formObj['workflowRemark']">
|
||||
</v-text-field>
|
||||
</v-col>
|
||||
<v-col cols="12" sm="12" md="3" xl="3" class=" pb-3">
|
||||
<span class="jh-input-label">审批模式</span>
|
||||
<v-select
|
||||
class="jh-v-input mr-2" dense filled single-line color="success"
|
||||
v-model="formObj['mode']" :items="constantObj.modeList" />
|
||||
</v-col>
|
||||
</v-row>
|
||||
<template>
|
||||
<v-stepper non-linear flat outlined>
|
||||
<v-stepper-header>
|
||||
<v-stepper-step
|
||||
editable
|
||||
step="1"
|
||||
>
|
||||
基础信息
|
||||
</v-stepper-step>
|
||||
<v-divider></v-divider>
|
||||
<v-stepper-step
|
||||
editable
|
||||
step="2"
|
||||
>
|
||||
模板设置
|
||||
</v-stepper-step>
|
||||
<v-divider></v-divider>
|
||||
<v-stepper-step
|
||||
step="3"
|
||||
editable
|
||||
>
|
||||
流程设置
|
||||
</v-stepper-step>
|
||||
</v-stepper-header>
|
||||
<v-stepper-items flat outlined>
|
||||
<v-stepper-content step="1">
|
||||
<v-card flat>
|
||||
<v-card-text>
|
||||
<div class="mt-1">
|
||||
{{formObj.basicInfo}}
|
||||
<!-- <div class="text-subtitle-2 mb-2">基础信息</div> -->
|
||||
<workflow-basic-info :basic-info="formObj.basicInfo"></workflow-basic-info>
|
||||
</div>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-stepper-content>
|
||||
<v-stepper-content step="2">
|
||||
<v-card flat>
|
||||
<v-card-text>
|
||||
<div class="mt-1">
|
||||
{{formObj.workflowForm}}
|
||||
<!-- <div class="text-subtitle-2 mb-2">模板设置</div> -->
|
||||
<tpl-form-design :form="formObj.workflowForm" v-if="!loading"></tpl-form-design>
|
||||
</div>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-stepper-content>
|
||||
<v-stepper-content step="3">
|
||||
<v-card flat>
|
||||
<v-card-text>
|
||||
<div class="mt-1">
|
||||
<!-- <div class="text-subtitle-2 mb-2">流程设置</div> -->
|
||||
<process-flow
|
||||
ref="processFlow"
|
||||
:data="formObj.workflowConfig"
|
||||
:user="constantObj.userList"
|
||||
:group="constantObj.groupList"
|
||||
:tpl="constantObj.workflowFormList"
|
||||
:mode="formObj.mode">
|
||||
</process-flow>
|
||||
</div>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-stepper-content>
|
||||
</v-stepper-items>
|
||||
</v-stepper>
|
||||
|
||||
<!-- 模板设置 -->
|
||||
<div class="mt-8">
|
||||
<div class="text-subtitle-2 mb-2">模板设置</div>
|
||||
<tpl-form-design :form="formObj.workflowForm" v-if="!loading"></tpl-form-design>
|
||||
</div>
|
||||
|
||||
<!-- 流程设置 -->
|
||||
<div class="mt-8">
|
||||
<div class="text-subtitle-2 mb-2">流程设置</div>
|
||||
<process-flow
|
||||
ref="processFlow"
|
||||
:data="formObj.workflowConfig"
|
||||
:user="constantObj.userList"
|
||||
:group="constantObj.groupList"
|
||||
:tpl="constantObj.workflowFormList"
|
||||
:mode="formObj.mode">
|
||||
</process-flow>
|
||||
</div>
|
||||
</template>
|
||||
<!-- <v-card flat>
|
||||
<v-card-text>
|
||||
<div class="mt-8">
|
||||
<div class="text-subtitle-2 mb-2">流程设置</div>
|
||||
<process-flow
|
||||
ref="processFlow"
|
||||
:data="formObj.workflowConfig"
|
||||
:user="constantObj.userList"
|
||||
:group="constantObj.groupList"
|
||||
:tpl="constantObj.workflowFormList"
|
||||
:mode="formObj.mode">
|
||||
</process-flow>
|
||||
</div>
|
||||
</v-card-text>
|
||||
</v-card> -->
|
||||
</v-form>
|
||||
</div>
|
||||
|
||||
@@ -74,6 +115,8 @@
|
||||
{% include 'component/flow/processFlow.html' %}
|
||||
{% include 'component/flow/editLine.html' %}
|
||||
{% include 'component/flow/editNode.html' %}
|
||||
{% include 'component/workflowBasicInfo.html' %}
|
||||
{% include 'component/common/dateTimePicker.html' %}
|
||||
<script type="module">
|
||||
Vue.component("workflow-editor-drawer", {
|
||||
template: '#workflow-editor-drawer',
|
||||
@@ -92,16 +135,14 @@ Vue.component("workflow-editor-drawer", {
|
||||
userList: [],
|
||||
groupList: [],
|
||||
workflowFormList: [],
|
||||
modeList: [
|
||||
{text: '串行', value: 'serial'},
|
||||
{text: '并行', value: 'parallel'},
|
||||
]
|
||||
},
|
||||
formObj: {},
|
||||
submitUiActionId: 'createItem',
|
||||
loading: false,
|
||||
isHelpPageDrawerShown: false,
|
||||
formSubmitData: null
|
||||
formSubmitData: null,
|
||||
|
||||
tab: null
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -156,13 +197,18 @@ Vue.component("workflow-editor-drawer", {
|
||||
if(item) {
|
||||
this.submitUiActionId = 'updateItem';
|
||||
let formObj = _.clone(item);
|
||||
formObj.basicInfo = {
|
||||
workflowName: item.workflowName,
|
||||
workflowRemark: item.workflowRemark,
|
||||
mode: item.mode,
|
||||
}
|
||||
formObj.workflowConfig = formObj.workflowConfig ? JSON.parse(formObj.workflowConfig) : null;
|
||||
formObj.workflowForm = formObj.workflowForm ? (typeof formObj.workflowForm == 'string'? JSON.parse(formObj.workflowForm): formObj.workflowForm) : [];
|
||||
formObj.mode = formObj.workflowConfig.mode || 'serial';
|
||||
this.formObj = formObj;
|
||||
} else {
|
||||
this.submitUiActionId = 'createItem';
|
||||
this.formObj = {workflowForm: [], workflowConfig: {lineList: [], nodeList: []}, mode: 'serial'};
|
||||
this.formObj = {basicInfo: {}, workflowForm: [], workflowConfig: {lineList: [], nodeList: []}, mode: 'serial'};
|
||||
}
|
||||
this.$refs.form.resetValidation();
|
||||
this.loading = false;
|
||||
|
||||
Reference in new issue
Block a user