|
@@ -11,9 +11,10 @@
|
|
<el-input type="text" v-model="form.workflowDescription"></el-input>
|
|
<el-input type="text" v-model="form.workflowDescription"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
- <el-table :data="tableData" border style="width: 100%">
|
|
|
|
|
|
+ <el-button @click="createWorkflowStep" class="fl-right mg" type="primary">新增</el-button>
|
|
|
|
+ <el-table :data="form.workflowStep" border style="width: 100%">
|
|
<el-table-column label="是否是完结流节点" prop="isEnd">
|
|
<el-table-column label="是否是完结流节点" prop="isEnd">
|
|
- <template scope="scope">
|
|
|
|
|
|
+ <template slot-scope="scope">
|
|
<el-select placeholder="请选择" v-model="scope.row.isEnd">
|
|
<el-select placeholder="请选择" v-model="scope.row.isEnd">
|
|
<el-option
|
|
<el-option
|
|
:key="key"
|
|
:key="key"
|
|
@@ -25,7 +26,7 @@
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="是否是开始流节点" prop="isStrat">
|
|
<el-table-column label="是否是开始流节点" prop="isStrat">
|
|
- <template scope="scope">
|
|
|
|
|
|
+ <template slot-scope="scope">
|
|
<el-select placeholder="请选择" v-model="scope.row.isStrat">
|
|
<el-select placeholder="请选择" v-model="scope.row.isStrat">
|
|
<el-option
|
|
<el-option
|
|
:key="key"
|
|
:key="key"
|
|
@@ -37,45 +38,45 @@
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="操作者级别id" prop="stepAuthorityID">
|
|
<el-table-column label="操作者级别id" prop="stepAuthorityID">
|
|
- <template scope="scope">
|
|
|
|
|
|
+ <template slot-scope="scope">
|
|
<el-input placeholder="请输入" type="text" v-model="scope.row.stepAuthorityID"></el-input>
|
|
<el-input placeholder="请输入" type="text" v-model="scope.row.stepAuthorityID"></el-input>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="工作流名称" prop="stepName">
|
|
<el-table-column label="工作流名称" prop="stepName">
|
|
- <template scope="scope">
|
|
|
|
|
|
+ <template slot-scope="scope">
|
|
<el-input placeholder="请输入" type="text" v-model="scope.row.stepName"></el-input>
|
|
<el-input placeholder="请输入" type="text" v-model="scope.row.stepName"></el-input>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="步骤id" prop="stepNo">
|
|
<el-table-column label="步骤id" prop="stepNo">
|
|
- <template scope="scope">
|
|
|
|
|
|
+ <template slot-scope="scope">
|
|
<el-input placeholder="请输入" type="text" v-model="scope.row.stepNo"></el-input>
|
|
<el-input placeholder="请输入" type="text" v-model="scope.row.stepNo"></el-input>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
- <el-button @click="submit" type="primary">提交</el-button>
|
|
|
|
|
|
+ <el-button @click="submit" type="primary" class="fl-right mg">提交</el-button>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import { createWorkFlow } from '@/api/workflow'
|
|
import { createWorkFlow } from '@/api/workflow'
|
|
export default {
|
|
export default {
|
|
- name: 'workflow',
|
|
|
|
|
|
+ name: 'Workflow',
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
form: {
|
|
form: {
|
|
workflowName: '',
|
|
workflowName: '',
|
|
workflowDescription: '',
|
|
workflowDescription: '',
|
|
- workflowNickName: ''
|
|
|
|
|
|
+ workflowNickName: '',
|
|
|
|
+ workflowStep: [
|
|
|
|
+ {
|
|
|
|
+ isEnd: '',
|
|
|
|
+ isStrat: '',
|
|
|
|
+ stepAuthorityID: '',
|
|
|
|
+ stepName: '',
|
|
|
|
+ stepNo: ''
|
|
|
|
+ }
|
|
|
|
+ ]
|
|
},
|
|
},
|
|
- tableData: [
|
|
|
|
- {
|
|
|
|
- isEnd: '',
|
|
|
|
- isStrat: '',
|
|
|
|
- stepAuthorityID: '',
|
|
|
|
- stepName: '',
|
|
|
|
- stepNo: ''
|
|
|
|
- }
|
|
|
|
- ],
|
|
|
|
options: [
|
|
options: [
|
|
{
|
|
{
|
|
name: '是',
|
|
name: '是',
|
|
@@ -88,28 +89,27 @@ export default {
|
|
]
|
|
]
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- component: {},
|
|
|
|
methods: {
|
|
methods: {
|
|
|
|
+ createWorkflowStep() {
|
|
|
|
+ this.form.workflowStep.push({
|
|
|
|
+ isEnd: '',
|
|
|
|
+ isStrat: '',
|
|
|
|
+ stepAuthorityID: '',
|
|
|
|
+ stepName: '',
|
|
|
|
+ stepNo: ''
|
|
|
|
+ })
|
|
|
|
+ },
|
|
async submit() {
|
|
async submit() {
|
|
- let params = {
|
|
|
|
- workflowDescription: this.form.workflowDescription,
|
|
|
|
- workflowName: this.form.workflowName,
|
|
|
|
- workflowNickName: this.form.workflowNickName,
|
|
|
|
- workflowStep: [
|
|
|
|
- {
|
|
|
|
- isEnd: this.tableData[0].isEnd,
|
|
|
|
- isStrat: this.tableData[0].isStrat,
|
|
|
|
- stepAuthorityID: this.tableData[0].stepAuthorityID,
|
|
|
|
- stepName: this.tableData[0].stepName,
|
|
|
|
- stepNo: this.tableData[0].stepNo
|
|
|
|
- }
|
|
|
|
- ]
|
|
|
|
|
|
+ const res = await createWorkFlow(this.form)
|
|
|
|
+ if(res.success){
|
|
|
|
+ this.$message({
|
|
|
|
+ message:"创建成功",
|
|
|
|
+ type:"success"
|
|
|
|
+ })
|
|
}
|
|
}
|
|
- const res = await createWorkFlow(params)
|
|
|
|
- console.log(res)
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
-<style scoped>
|
|
|
|
|
|
+<style>
|
|
</style>
|
|
</style>
|