Browse Source

流程

master
蔡玲玲 2 weeks ago
parent
commit
1c79e452d1
  1. 102
      base-vue/src/views/modules/deploy/flwdeployprodef.vue
  2. 6
      base-vue/src/views/modules/flow/flow.vue

102
base-vue/src/views/modules/deploy/flwdeployprodef.vue

@ -39,7 +39,6 @@
align="center" align="center"
label="流程KEY"> label="流程KEY">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="suupensionState" prop="suupensionState"
header-align="center" header-align="center"
@ -71,7 +70,6 @@
<img :src="$imgBasePath+'downloadFlowImg?defId='+scope.row.id" width="200" height="100"> <img :src="$imgBasePath+'downloadFlowImg?defId='+scope.row.id" width="200" height="100">
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="version" prop="version"
header-align="center" header-align="center"
@ -125,46 +123,43 @@
title="发起流程" title="发起流程"
:visible.sync="dialogFormVisible" :visible.sync="dialogFormVisible"
width="30%"> width="30%">
<div style="height: auto;margin-bottom: 30px;"> <el-form :model="flowForm" label-width="100px" class="demo-dynamic">
<el-form :model="dynamiForm" label-width="100px" class="demo-dynamic"> <el-form-item
v-for="(form) in dynamiForm"
<el-form-item :label="form.name"
v-for="(form) in dynamiForm" :key="form.key"
:label="form.name" :prop="form.key"
:key="form.key" >
:prop="form.key" <el-select v-if="form.type == 'assignee'" v-model="flowForm[form.key]" placeholder="请选择">
<el-option
> v-for="item in users"
<el-select v-if="form.type == 'assignee'" v-model="form.value" placeholder="请选择"> :key="item.userId"
<el-option :label="item.nickname+'['+item.username+']'"
v-for="item in users" :value="item.userId">
:key="item.userId" </el-option>
:label="item.nickname+'['+item.username+']'" </el-select>
:value="item.userId"> <el-select v-if="form.type == 'candidateUsers'" v-model="flowForm[form.key]" placeholder="请选择">
</el-option> <el-option
</el-select> v-for="item in users"
<el-select v-if="form.type == 'candidateUsers'" v-model="form.value" placeholder="请选择"> :key="item.userId"
<el-option :label="item.nickname+'['+item.username+']'"
v-for="item in users" :value="item.userId">
:key="item.userId" </el-option>
:label="item.nickname+'['+item.username+']'" </el-select>
:value="item.userId"> <el-select v-if="form.type == 'candidateGroups'" v-model="flowForm[form.key]" placeholder="请选择">
</el-option> <el-option
</el-select> v-for="item in roles"
<el-select v-if="form.type == 'candidateGroups'" v-model="form.value" placeholder="请选择"> :key="item.roleId"
<el-option :label="item.roleName"
v-for="item in roles" :value="item.roleId">
:key="item.roleId" </el-option>
:label="item.roleName" </el-select>
:value="item.roleId"> </el-form-item>
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="submitStartFlow()">提交</el-button>
</el-form-item>
</el-form> </el-form>
</div> <span slot="footer" class="dialog-footer">
<el-button size="mini" @click="dialogFormVisible = false">取消</el-button>
<el-button size="mini" type="primary" @click="submitStartFlow()">提交</el-button>
</span>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
@ -177,11 +172,9 @@
id:'', id:'',
dataForm: { dataForm: {
key: '' key: ''
},dynamiForm:[],
domain:{},
flowForm:{
}, },
dynamiForm:[],
flowForm:{},
flowImg:'', flowImg:'',
flowXML:'', flowXML:'',
users:[], users:[],
@ -234,10 +227,8 @@
currentChangeHandle (val) { currentChangeHandle (val) {
this.pageIndex = val this.pageIndex = val
this.getDataList() this.getDataList()
},submitStartFlow(){ },
for( var item of this.dynamiForm){ submitStartFlow(){
this.flowForm[item.key] = item.value
}
this.flowForm.id = this.id this.flowForm.id = this.id
// //
this.$http({ this.$http({
@ -263,7 +254,8 @@
// //
selectionChangeHandle (val) { selectionChangeHandle (val) {
this.dataListSelections = val this.dataListSelections = val
},startFlowHandle(id){ },
startFlowHandle(id){
this.id = id this.id = id
// //
this.flowForm = {} this.flowForm = {}
@ -277,13 +269,18 @@
this.users = data.users this.users = data.users
this.roles = data.roles this.roles = data.roles
// flowForm // flowForm
for( var item of this.dynamiForm){
this.flowForm[item.key] = item.value
}
this.dialogFormVisible = true this.dialogFormVisible = true
} }
}) })
},showFlowImgHandle(id){ },
showFlowImgHandle(id){
this.flowImg = this.$imgBasePath + "downloadFlowImg?defId="+id this.flowImg = this.$imgBasePath + "downloadFlowImg?defId="+id
this.dialogVisible = true this.dialogVisible = true
},showFlowXMLHandle(id){ },
showFlowXMLHandle(id){
this.$http({ this.$http({
url: this.$http.adornUrl(`/flow/deploy/flowXML/${id}`), url: this.$http.adornUrl(`/flow/deploy/flowXML/${id}`),
method: 'get', method: 'get',
@ -298,7 +295,6 @@
}, },
// //
suupensHandle (id,state) { suupensHandle (id,state) {
this.$confirm(`确定对该记录进行[${state==2 ? '挂起' : '激活'}]操作?`, '提示', { this.$confirm(`确定对该记录进行[${state==2 ? '挂起' : '激活'}]操作?`, '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',

6
base-vue/src/views/modules/flow/flow.vue

@ -7,8 +7,6 @@
<div class="canvas" ref="canvas"></div> <div class="canvas" ref="canvas"></div>
<div id="js-properties-panel4" class="panel"></div> <div id="js-properties-panel4" class="panel"></div>
</div> </div>
<el-dialog <el-dialog
title="保存流程定义信息" title="保存流程定义信息"
:visible.sync="dialogVisible" :visible.sync="dialogVisible"
@ -21,7 +19,6 @@
<el-form-item label="流程KEY" prop="modelKey"> <el-form-item label="流程KEY" prop="modelKey">
<el-input v-model="dataForm.modelKey" placeholder="流程KEY"></el-input> <el-input v-model="dataForm.modelKey" placeholder="流程KEY"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="visible = false">取消</el-button> <el-button @click="visible = false">取消</el-button>
@ -153,7 +150,8 @@ export default {
this.$message.error(data.msg) this.$message.error(data.msg)
} }
}) })
} },
handleClose () {}
}, },
// //
computed: {} computed: {}

Loading…
Cancel
Save