<template>
|
<el-dialog v-dialogDrag
|
append-to-body="true"
|
:close-on-click-modal="false"
|
:destroy-on-close="true"
|
:visible.sync="visible"
|
:width="width"
|
class="avue-dialog"
|
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-form-item label="流程模板">
|
<el-input v-model="saveParam.modelName" disabled placeholder="流程模板"></el-input>
|
</el-form-item>
|
<el-form-item label="流程名称" prop="processName">
|
<el-input v-model="saveParam.processName" placeholder="流程名称">
|
</el-input>
|
</el-form-item>
|
<el-form-item label="流程描述">
|
<el-input v-model="saveParam.processDesc" :rows="4" placeholder="流程描述" type="textarea">
|
</el-input>
|
</el-form-item>
|
</el-form>
|
|
<el-divider></el-divider>
|
<div class="btns-icon">
|
<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-select>
|
</el-form-item>
|
</el-form>
|
<div slot="footer" class="dialog-footer">
|
<el-button @click="handleCancel">取 消</el-button>
|
<el-button type="primary" @click="handleConfirm">确 定</el-button>
|
</div>
|
|
</el-dialog>
|
</template>
|
|
<script>
|
import {validatenull} from "@/util/validate";
|
|
export default {
|
name: "startWorkFlow",
|
props: {
|
paramVOS: {
|
type: Object,
|
default: {}
|
},
|
sourceData: {
|
//所属区域的上一区域选中数据
|
type: Object,
|
default: {}
|
},
|
dataStore: {
|
//弹窗时按钮所属区域选中数据
|
type: Array,
|
default: []
|
},
|
},
|
data() {
|
return {
|
visible: false,
|
saveParam: {},
|
users: [],
|
collectParam: {},
|
initFrom: [],
|
typeName: [],
|
}
|
},
|
watch: {
|
users: {
|
handler(val) {
|
this.collectParam.flowTaskUsers = val
|
},
|
deep: true,
|
immediate: true
|
},
|
parameter: {
|
handler(newval, oldval) {
|
this.saveParam = Object.assign({processName: '', processDesc: ''}, newval);
|
},
|
deep: true,
|
immediate: true
|
}
|
},
|
computed: {
|
fullscreen() {
|
if (this.paramVOS.width || this.paramVOS.height) {
|
return false;
|
} else if (this.paramVOS.form) {
|
return false;
|
}
|
return true;
|
},
|
width() {
|
if (!validatenull(this.paramVOS.width)) {
|
if (this.paramVOS.width.includes("px") || this.paramVOS.width.includes("%")) {
|
return this.paramVOS.width;
|
} else {
|
return this.paramVOS.width + "px";
|
}
|
} else {
|
return "40%";
|
}
|
},
|
},
|
methods: {
|
// 关闭弹窗
|
dialogClose() {
|
this.visible = false;
|
},
|
|
handleSelect() {
|
|
},
|
|
handleCollect() {
|
|
},
|
|
handleCancel() {
|
this.dialogClose();
|
},
|
|
handleConfirm() {
|
|
}
|
}
|
}
|
</script>
|
|
<style scoped lang="scss">
|
|
</style>
|