提交 84b70bca 编写于 作者: Mr.奇淼('s avatar Mr.奇淼(

工作流定义前端页面bug处理

上级 1c11e86a
......@@ -8,21 +8,21 @@ import (
//工作流属性表
type Workflow struct {
gorm.Model
WorkflowNickName string // 工作流名称
WorkflowName string // 工作流英文id
WorkflowDescription string // 工作流描述
WorkflowStep []WorkflowStepInfo // 工作流步骤
WorkflowNickName string `json:"workflowNickName"` // 工作流名称
WorkflowName string `json:"workflowName"` // 工作流英文id
WorkflowDescription string `json:"workflowDescription"` // 工作流描述
WorkflowStep []WorkflowStepInfo `json:"workflowStep"` // 工作流步骤
}
// 工作流状态表
type WorkflowStepInfo struct {
gorm.Model
WorkflowID uint `json:"-"` // 所属工作流ID
IsStrat bool // 是否是开始流节点
StepName string // 工作流名称
StepNo float64 // 步骤id (第几步)
StepAuthorityID string // 操作者级别id
IsEnd bool // 是否是完结流节点
WorkflowID uint `json:"workflowID"` // 所属工作流ID
IsStrat bool `json:"isStrat"` // 是否是开始流节点
StepName string `json:"stepName"` // 工作流名称
StepNo float64 `json:"stepNo"` // 步骤id (第几步)
StepAuthorityID string `json:"stepAuthorityID"` // 操作者级别id
IsEnd bool `json:"isEnd"` // 是否是完结流节点
}
//创建工作流
......
......@@ -18,24 +18,36 @@
float: right;
}
.mg {
margin: 10px !important;
}
.left-mg-xs {
margin-left: 6px;
margin-left: 6px !important;
}
.left-mg-sm {
margin-left: 10px;
margin-left: 10px !important;
}
.left-mg-md {
margin-left: 14px;
margin-left: 14px !important;
}
.top-mg-lg {
margin-top: 20px !important;
}
.tb-mg-lg {
margin: 20px 0 !important;
}
.bottom-mg-lg {
margin-bottom: 20px;
margin-bottom: 20px !important;
}
.left-mg-lg {
margin-left: 18px;
margin-left: 18px !important;
}
.title-1 {
......
......@@ -11,9 +11,10 @@
<el-input type="text" v-model="form.workflowDescription"></el-input>
</el-form-item>
</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">
<template scope="scope">
<template slot-scope="scope">
<el-select placeholder="请选择" v-model="scope.row.isEnd">
<el-option
:key="key"
......@@ -25,7 +26,7 @@
</template>
</el-table-column>
<el-table-column label="是否是开始流节点" prop="isStrat">
<template scope="scope">
<template slot-scope="scope">
<el-select placeholder="请选择" v-model="scope.row.isStrat">
<el-option
:key="key"
......@@ -37,45 +38,45 @@
</template>
</el-table-column>
<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>
</template>
</el-table-column>
<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>
</template>
</el-table-column>
<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>
</template>
</el-table-column>
</el-table>
<el-button @click="submit" type="primary">提交</el-button>
<el-button @click="submit" type="primary" class="fl-right mg">提交</el-button>
</div>
</template>
<script>
import { createWorkFlow } from '@/api/workflow'
export default {
name: 'workflow',
name: 'Workflow',
data() {
return {
form: {
workflowName: '',
workflowDescription: '',
workflowNickName: ''
workflowNickName: '',
workflowStep: [
{
isEnd: '',
isStrat: '',
stepAuthorityID: '',
stepName: '',
stepNo: ''
}
]
},
tableData: [
{
isEnd: '',
isStrat: '',
stepAuthorityID: '',
stepName: '',
stepNo: ''
}
],
options: [
{
name: '',
......@@ -88,28 +89,27 @@ export default {
]
}
},
component: {},
methods: {
createWorkflowStep() {
this.form.workflowStep.push({
isEnd: '',
isStrat: '',
stepAuthorityID: '',
stepName: '',
stepNo: ''
})
},
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>
<style scoped>
<style>
</style>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册