Skip to content

Commit 5b59ff1

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents 3b79a6b + 718c6e6 commit 5b59ff1

File tree

3 files changed

+62
-50
lines changed

3 files changed

+62
-50
lines changed

QMPlusServer/model/dbModel/worfFlow.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,21 @@ import (
88
//工作流属性表
99
type Workflow struct {
1010
gorm.Model
11-
WorkflowNickName string // 工作流名称
12-
WorkflowName string // 工作流英文id
13-
WorkflowDescription string // 工作流描述
14-
WorkflowStep []WorkflowStepInfo // 工作流步骤
11+
WorkflowNickName string `json:"workflowNickName"` // 工作流名称
12+
WorkflowName string `json:"workflowName"` // 工作流英文id
13+
WorkflowDescription string `json:"workflowDescription"` // 工作流描述
14+
WorkflowStep []WorkflowStepInfo `json:"workflowStep"` // 工作流步骤
1515
}
1616

1717
// 工作流状态表
1818
type WorkflowStepInfo struct {
1919
gorm.Model
20-
WorkflowID uint `json:"-"` // 所属工作流ID
21-
IsStrat bool // 是否是开始流节点
22-
StepName string // 工作流名称
23-
StepNo float64 // 步骤id (第几步)
24-
StepAuthorityID string // 操作者级别id
25-
IsEnd bool // 是否是完结流节点
20+
WorkflowID uint `json:"workflowID"` // 所属工作流ID
21+
IsStrat bool `json:"isStrat"` // 是否是开始流节点
22+
StepName string `json:"stepName"` // 工作流名称
23+
StepNo float64 `json:"stepNo"` // 步骤id (第几步)
24+
StepAuthorityID string `json:"stepAuthorityID"` // 操作者级别id
25+
IsEnd bool `json:"isEnd"` // 是否是完结流节点
2626
}
2727

2828
//创建工作流

QMPlusVuePage/src/style/base.scss

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,24 +18,36 @@
1818
float: right;
1919
}
2020

21+
.mg {
22+
margin: 10px !important;
23+
}
24+
2125
.left-mg-xs {
22-
margin-left: 6px;
26+
margin-left: 6px !important;
2327
}
2428

2529
.left-mg-sm {
26-
margin-left: 10px;
30+
margin-left: 10px !important;
2731
}
2832

2933
.left-mg-md {
30-
margin-left: 14px;
34+
margin-left: 14px !important;
35+
}
36+
37+
.top-mg-lg {
38+
margin-top: 20px !important;
39+
}
40+
41+
.tb-mg-lg {
42+
margin: 20px 0 !important;
3143
}
3244

3345
.bottom-mg-lg {
34-
margin-bottom: 20px;
46+
margin-bottom: 20px !important;
3547
}
3648

3749
.left-mg-lg {
38-
margin-left: 18px;
50+
margin-left: 18px !important;
3951
}
4052

4153
.title-1 {

QMPlusVuePage/src/view/workflow/workflowCreate/workflowCreate.vue

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@
1111
<el-input type="text" v-model="form.workflowDescription"></el-input>
1212
</el-form-item>
1313
</el-form>
14-
<el-table :data="tableData" border style="width: 100%">
14+
<el-button @click="createWorkflowStep" class="fl-right mg" type="primary">新增</el-button>
15+
<el-table :data="form.workflowStep" border style="width: 100%">
1516
<el-table-column label="是否是完结流节点" prop="isEnd">
16-
<template scope="scope">
17+
<template slot-scope="scope">
1718
<el-select placeholder="请选择" v-model="scope.row.isEnd">
1819
<el-option
1920
:key="key"
@@ -25,7 +26,7 @@
2526
</template>
2627
</el-table-column>
2728
<el-table-column label="是否是开始流节点" prop="isStrat">
28-
<template scope="scope">
29+
<template slot-scope="scope">
2930
<el-select placeholder="请选择" v-model="scope.row.isStrat">
3031
<el-option
3132
:key="key"
@@ -37,45 +38,45 @@
3738
</template>
3839
</el-table-column>
3940
<el-table-column label="操作者级别id" prop="stepAuthorityID">
40-
<template scope="scope">
41+
<template slot-scope="scope">
4142
<el-input placeholder="请输入" type="text" v-model="scope.row.stepAuthorityID"></el-input>
4243
</template>
4344
</el-table-column>
4445
<el-table-column label="工作流名称" prop="stepName">
45-
<template scope="scope">
46+
<template slot-scope="scope">
4647
<el-input placeholder="请输入" type="text" v-model="scope.row.stepName"></el-input>
4748
</template>
4849
</el-table-column>
4950
<el-table-column label="步骤id" prop="stepNo">
50-
<template scope="scope">
51+
<template slot-scope="scope">
5152
<el-input placeholder="请输入" type="text" v-model="scope.row.stepNo"></el-input>
5253
</template>
5354
</el-table-column>
5455
</el-table>
55-
<el-button @click="submit" type="primary">提交</el-button>
56+
<el-button @click="submit" type="primary" class="fl-right mg">提交</el-button>
5657
</div>
5758
</template>
5859

5960
<script>
6061
import { createWorkFlow } from '@/api/workflow'
6162
export default {
62-
name: 'workflow',
63+
name: 'Workflow',
6364
data() {
6465
return {
6566
form: {
6667
workflowName: '',
6768
workflowDescription: '',
68-
workflowNickName: ''
69+
workflowNickName: '',
70+
workflowStep: [
71+
{
72+
isEnd: false,
73+
isStrat: true,
74+
stepAuthorityID: '',
75+
stepName: '',
76+
stepNo: ''
77+
}
78+
]
6979
},
70-
tableData: [
71-
{
72-
isEnd: '',
73-
isStrat: '',
74-
stepAuthorityID: '',
75-
stepName: '',
76-
stepNo: ''
77-
}
78-
],
7980
options: [
8081
{
8182
name: '',
@@ -88,28 +89,27 @@ export default {
8889
]
8990
}
9091
},
91-
component: {},
9292
methods: {
93+
createWorkflowStep() {
94+
this.form.workflowStep.push({
95+
isEnd: false,
96+
isStrat: false,
97+
stepAuthorityID: '',
98+
stepName: '',
99+
stepNo: ''
100+
})
101+
},
93102
async submit() {
94-
let params = {
95-
workflowDescription: this.form.workflowDescription,
96-
workflowName: this.form.workflowName,
97-
workflowNickName: this.form.workflowNickName,
98-
workflowStep: [
99-
{
100-
isEnd: this.tableData[0].isEnd,
101-
isStrat: this.tableData[0].isStrat,
102-
stepAuthorityID: this.tableData[0].stepAuthorityID,
103-
stepName: this.tableData[0].stepName,
104-
stepNo: this.tableData[0].stepNo
105-
}
106-
]
103+
const res = await createWorkFlow(this.form)
104+
if(res.success){
105+
this.$message({
106+
message:"创建成功",
107+
type:"success"
108+
})
107109
}
108-
const res = await createWorkFlow(params)
109-
console.log(res)
110110
}
111111
}
112112
}
113113
</script>
114-
<style scoped>
114+
<style>
115115
</style>

0 commit comments

Comments
 (0)