| | |
| | | <template> |
| | | <el-dialog v-dialogDrag |
| | | append-to-body="true" |
| | | :close-on-click-modal="false" |
| | | :destroy-on-close="true" |
| | | :visible.sync="visible" |
| | | :width="width" |
| | | append-to-body="true" |
| | | class="avue-dialog" |
| | | style="margin-top: -10% !important;" |
| | | title="启动流程" |
| | | top="0" |
| | | style="margin-top: -10% !important;" |
| | | @close="dialogClose"> |
| | | |
| | | <el-form :model="saveParam" :rules="rules" class="demo-form-inline" label-position="left" label-width="auto"> |
| | |
| | | <!-- <el-button circle icon="el-icon-star-off" @click="handleCollect"></el-button>--> |
| | | <!-- </div>--> |
| | | <el-form :model="collectParam" class="demo-form-inline" label-position="left" label-width="auto"> |
| | | <el-form-item v-for="(item, index) in initFrom" :key="index" :label="item.taskName"> |
| | | <el-select v-model="collectParam.flowTaskUsers[index]['userId']" :placeholder="item.taskName" filterable |
| | | style="width: 100%;" @change="handleSelect($event, index)"> |
| | | <el-option v-for="(key, keyi) in typeName" :key="keyi" :label="key.userNames" |
| | | :value="key.userId"></el-option> |
| | | <el-form-item v-for="(item, index) in initFrom" :key="index" :label="`节点${index + 1}`"> |
| | | <el-select style="width: 100%;" filterable v-model="collectParam.flowTaskUsers[index]['userId']" |
| | | :placeholder="item.value" @change="handleSelect($event, index)"> |
| | | <el-option :label="key.name" :value="key.name" v-for="(key, keyi) in item.processNodes" |
| | | :key="keyi"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-form> |
| | |
| | | |
| | | <script> |
| | | import {validatenull} from "@/util/validate"; |
| | | import {getTemplateByType} from "@/api/base/startWork/index" |
| | | import {getTemplateByType, getAllProcessNode} from "@/api/base/startWork/index" |
| | | |
| | | export default { |
| | | name: "startWorkFlow", |
| | | props: { |
| | |
| | | filterTemplate:"" |
| | | } |
| | | getTemplateByType(params).then(res => { |
| | | console.log(res) |
| | | const data = res.data.data; |
| | | data.forEach(item => { |
| | | this.getProcessNode(item); |
| | | }) |
| | | this.initFrom = data; |
| | | }).catch(error => { |
| | | console.log(error); |
| | | }) |
| | | }, |
| | | |
| | | // 请求流程节点 |
| | | getProcessNode(item) { |
| | | let params = { |
| | | processOid: item.attributes.oid, |
| | | maxSecret: -1 |
| | | } |
| | | getAllProcessNode(params).then(res => { |
| | | const nodes = res.data.data; |
| | | item.processNodes = nodes; |
| | | }).catch(error => { |
| | | console.log(error); |
| | | }) |
| | | }, |
| | | |
| | | // 关闭弹窗 |
| | | dialogClose() { |
| | | this.visible = false; |
| | |
| | | }, |
| | | |
| | | handleConfirm() { |
| | | console.log(this.paramVOS) |
| | | console.log(this.initFrom); |
| | | }, |
| | | |
| | | // 流程名称初始化绑定 |
| | |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | <style lang="scss" scoped> |
| | | |
| | | </style> |