|
@@ -22,6 +22,30 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
+ <div class="part-box part-box-pad" style="padding-bottom: 5px">
|
|
|
|
+ <el-form
|
|
|
|
+ ref="modalFormComp"
|
|
|
|
+ :model="flowInfo"
|
|
|
|
+ :rules="rules"
|
|
|
|
+ label-width="140px"
|
|
|
|
+ >
|
|
|
|
+ <el-form-item prop="modelType" label="指定审批人类型:">
|
|
|
|
+ <el-select
|
|
|
|
+ v-model="flowInfo.modelType"
|
|
|
|
+ placeholder="请选择流程指定审批人类型"
|
|
|
|
+ @change="initFlowNodes"
|
|
|
|
+ >
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="(val, key) in FLOW_MODEL_TYPE"
|
|
|
|
+ :key="key"
|
|
|
|
+ :value="key"
|
|
|
|
+ :label="val"
|
|
|
|
+ ></el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-form>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
<div class="flow-box">
|
|
<div class="flow-box">
|
|
<div class="flow-content">
|
|
<div class="flow-content">
|
|
<div class="flow-main">
|
|
<div class="flow-main">
|
|
@@ -377,6 +401,7 @@ import { deepCopy } from "../../../plugins/utils";
|
|
import { flowDetail, updateFlowDetail } from "../api";
|
|
import { flowDetail, updateFlowDetail } from "../api";
|
|
import SelectUserDialog from "./SelectUserDialog";
|
|
import SelectUserDialog from "./SelectUserDialog";
|
|
import SelectRoleDialog from "./SelectRoleDialog";
|
|
import SelectRoleDialog from "./SelectRoleDialog";
|
|
|
|
+import { FLOW_MODEL_TYPE } from "../../../constants/enumerate";
|
|
|
|
|
|
const initFlowInfo = {
|
|
const initFlowInfo = {
|
|
id: null,
|
|
id: null,
|
|
@@ -423,6 +448,7 @@ export default {
|
|
return {
|
|
return {
|
|
modalIsShow: false,
|
|
modalIsShow: false,
|
|
isSubmit: false,
|
|
isSubmit: false,
|
|
|
|
+ FLOW_MODEL_TYPE,
|
|
initNodes: [
|
|
initNodes: [
|
|
{
|
|
{
|
|
id: "1",
|
|
id: "1",
|
|
@@ -482,6 +508,15 @@ export default {
|
|
APPROVE_USER_SELECT_RANGE: {
|
|
APPROVE_USER_SELECT_RANGE: {
|
|
ALL: "全单位",
|
|
ALL: "全单位",
|
|
ROLE: "指定角色"
|
|
ROLE: "指定角色"
|
|
|
|
+ },
|
|
|
|
+ rules: {
|
|
|
|
+ modelType: [
|
|
|
|
+ {
|
|
|
|
+ required: true,
|
|
|
|
+ message: "请选择流程指定审批人类型",
|
|
|
|
+ trigger: "change"
|
|
|
|
+ }
|
|
|
|
+ ]
|
|
}
|
|
}
|
|
};
|
|
};
|
|
},
|
|
},
|
|
@@ -500,11 +535,13 @@ export default {
|
|
this.toSelectNode(this.nodes[1]);
|
|
this.toSelectNode(this.nodes[1]);
|
|
} else {
|
|
} else {
|
|
this.flowInfo = this.$objAssign(initFlowInfo, val);
|
|
this.flowInfo = this.$objAssign(initFlowInfo, val);
|
|
- this.nodes = deepCopy(this.initNodes);
|
|
|
|
- // this.toSelectNode(this.nodes[1]);
|
|
|
|
- this.toAddNode(this.nodes[0].id);
|
|
|
|
|
|
+ this.initFlowNodes();
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ initFlowNodes() {
|
|
|
|
+ this.nodes = deepCopy(this.initNodes);
|
|
|
|
+ this.toAddNode(this.nodes[0].id);
|
|
|
|
+ },
|
|
visibleChange() {
|
|
visibleChange() {
|
|
this.initData(this.instance);
|
|
this.initData(this.instance);
|
|
},
|
|
},
|
|
@@ -637,6 +674,11 @@ export default {
|
|
return true;
|
|
return true;
|
|
},
|
|
},
|
|
async submit() {
|
|
async submit() {
|
|
|
|
+ const valid = await this.$refs.modalFormComp.validate().catch(() => {});
|
|
|
|
+ if (!valid) return;
|
|
|
|
+
|
|
|
|
+ if (!this.checkData()) return;
|
|
|
|
+
|
|
if (this.isSubmit) return;
|
|
if (this.isSubmit) return;
|
|
const result = await this.$confirm(
|
|
const result = await this.$confirm(
|
|
`确定要发布流程【${this.instance.name}】吗?`,
|
|
`确定要发布流程【${this.instance.name}】吗?`,
|
|
@@ -647,8 +689,6 @@ export default {
|
|
).catch(() => {});
|
|
).catch(() => {});
|
|
if (result !== "confirm") return;
|
|
if (result !== "confirm") return;
|
|
|
|
|
|
- if (!this.checkData()) return;
|
|
|
|
-
|
|
|
|
this.nodes.forEach(node => {
|
|
this.nodes.forEach(node => {
|
|
const dom = document.getElementById(`node-${node.id}`);
|
|
const dom = document.getElementById(`node-${node.id}`);
|
|
node.w = dom.clientWidth;
|
|
node.w = dom.clientWidth;
|