|
|
@@ -1,13 +1,41 @@
|
|
|
<template>
|
|
|
- <el-dialog :title="title" :visible.sync="dialogVisible" :close-on-click-modal="false" :close-on-press-escape="false" append-to-body class="bpmn-agent-dialog" width="60%" top="10vh" @open="getFormData" @close="closeDialog">
|
|
|
+ <el-dialog
|
|
|
+ :title="title"
|
|
|
+ :visible.sync="dialogVisible"
|
|
|
+ :close-on-click-modal="false"
|
|
|
+ :close-on-press-escape="false"
|
|
|
+ append-to-body
|
|
|
+ class="bpmn-agent-dialog"
|
|
|
+ width="60%"
|
|
|
+ top="10vh"
|
|
|
+ @open="getFormData"
|
|
|
+ @close="closeDialog"
|
|
|
+ >
|
|
|
<div style="padding: 15px">
|
|
|
- <el-form ref="agentForm" v-loading="dialogLoading" class="bpmnForm" :element-loading-text="$t('common.loading')" :model="bpmAgent" :rules="rules" :label-width="formLabelWidth" label-position="left" @submit.native.prevent>
|
|
|
+ <el-form
|
|
|
+ ref="agentForm"
|
|
|
+ v-loading="dialogLoading"
|
|
|
+ class="bpmnForm"
|
|
|
+ :element-loading-text="$t('common.loading')"
|
|
|
+ :model="bpmAgent"
|
|
|
+ :rules="rules"
|
|
|
+ :label-width="formLabelWidth"
|
|
|
+ label-position="left"
|
|
|
+ @submit.native.prevent
|
|
|
+ >
|
|
|
<el-row v-if="srcList.length > 0">
|
|
|
<el-col :span="24">
|
|
|
<el-form-item label="代理人参考图片:">
|
|
|
<div class="imageListClass">
|
|
|
- <div v-for="(item,index) in srcList" :key="index">
|
|
|
- <el-image :src="item" class="sinImageList" :preview-src-list="srcList" />
|
|
|
+ <div
|
|
|
+ v-for="(item, index) in srcList"
|
|
|
+ :key="index"
|
|
|
+ >
|
|
|
+ <el-image
|
|
|
+ :src="item"
|
|
|
+ class="sinImageList"
|
|
|
+ :preview-src-list="srcList"
|
|
|
+ />
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
@@ -17,7 +45,11 @@
|
|
|
<el-row>
|
|
|
<el-col :span="24">
|
|
|
<el-form-item label="标题:" prop="title">
|
|
|
- <el-input v-if="!readonly" v-model="bpmAgent.title" placeholder="请输入标题" />
|
|
|
+ <el-input
|
|
|
+ v-if="!readonly"
|
|
|
+ v-model="bpmAgent.title"
|
|
|
+ placeholder="请输入标题"
|
|
|
+ />
|
|
|
<span v-else>{{ bpmAgent.title }}</span>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
@@ -26,17 +58,58 @@
|
|
|
<el-row :gutter="20">
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="生效时间:" prop="effectiveTime">
|
|
|
- <el-date-picker v-if="!readonly" v-model="bpmAgent.effectiveTime" class="time" type="date" value-format="yyyy-MM-dd" placeholder="请选择生效时间" />
|
|
|
+ <el-date-picker
|
|
|
+ v-if="!readonly"
|
|
|
+ v-model="bpmAgent.effectiveTime"
|
|
|
+ class="time"
|
|
|
+ type="date"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ placeholder="请选择生效时间"
|
|
|
+ />
|
|
|
<span v-else>{{ bpmAgent.effectiveTime }}</span>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="失效时间:" prop="expiryTime">
|
|
|
- <el-date-picker v-if="!readonly" v-model="bpmAgent.expiryTime" class="time" type="date" value-format="yyyy-MM-dd" placeholder="请选择失效时间" />
|
|
|
+ <el-date-picker
|
|
|
+ v-if="!readonly"
|
|
|
+ v-model="bpmAgent.expiryTime"
|
|
|
+ class="time"
|
|
|
+ type="date"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ placeholder="请选择失效时间"
|
|
|
+ />
|
|
|
<span v-else>{{ bpmAgent.expiryTime }}</span>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="是否启用:" prop="isEnabled">
|
|
|
+ <el-switch
|
|
|
+ v-if="!readonly"
|
|
|
+ v-model="bpmAgent.isEnabled"
|
|
|
+ active-value="enabled"
|
|
|
+ inactive-value="disabled"
|
|
|
+ />
|
|
|
+ <el-tag
|
|
|
+ v-else
|
|
|
+ :type="
|
|
|
+ bpmAgent.isEnabled
|
|
|
+ | optionsFilter(statusOptions, 'type')
|
|
|
+ "
|
|
|
+ >{{
|
|
|
+ bpmAgent.isEnabled
|
|
|
+ | optionsFilter(statusOptions, "label")
|
|
|
+ }}</el-tag>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-alert
|
|
|
+ title="1、菜单按钮权限的代理"
|
|
|
+ type="success"
|
|
|
+ :closable="false"
|
|
|
+ />
|
|
|
<el-row :gutter="20">
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="委托人:" prop="delegatorId">
|
|
|
@@ -57,7 +130,14 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item v-if="bpmAgent.agentType === 'all' || bpmAgent.agentType === 'part'" label="代理人:" prop="agenterId">
|
|
|
+ <el-form-item
|
|
|
+ v-if="
|
|
|
+ bpmAgent.agentType === 'all' ||
|
|
|
+ bpmAgent.agentType === 'part'
|
|
|
+ "
|
|
|
+ label="代理人:"
|
|
|
+ prop="agenterId"
|
|
|
+ >
|
|
|
<ibps-user-selector
|
|
|
v-if="!readonly"
|
|
|
v-model="bpmAgent.agenterId"
|
|
|
@@ -75,18 +155,34 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
-
|
|
|
- <el-row>
|
|
|
+ <el-row :gutter="20">
|
|
|
<el-col :span="24">
|
|
|
- <el-form-item>
|
|
|
+ <el-form-item
|
|
|
+ prop="bpmAgentRoleList"
|
|
|
+ >
|
|
|
<template slot="label">
|
|
|
- 委托人角色:
|
|
|
- <help-tip :title="formAsterisk.title" :content="formAsterisk.content" />
|
|
|
+ 委托人角色
|
|
|
+ <help-tip
|
|
|
+ :title="formAsterisk.title"
|
|
|
+ :content="formAsterisk.content"
|
|
|
+ />:
|
|
|
</template>
|
|
|
- <el-checkbox-group v-if="!readonly" v-model="checkRoleList">
|
|
|
- <el-checkbox v-for="item in roleList" :key="item.id" :label="item.id">{{ item.name }}</el-checkbox>
|
|
|
+ <el-checkbox-group
|
|
|
+ v-if="!readonly"
|
|
|
+ v-model="bpmAgent.bpmAgentRoleList"
|
|
|
+ >
|
|
|
+ <el-checkbox
|
|
|
+ v-for="item in roleList"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.id"
|
|
|
+ >{{ item.name }}</el-checkbox>
|
|
|
</el-checkbox-group>
|
|
|
- <span v-else>{{ getWeiTuoName(checkRoleList,roleList) }}</span>
|
|
|
+ <span v-else>{{
|
|
|
+ getWeiTuoName(
|
|
|
+ bpmAgent.bpmAgentRoleList,
|
|
|
+ roleList
|
|
|
+ )
|
|
|
+ }}</span>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
@@ -97,21 +193,41 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
-
|
|
|
+ <el-alert
|
|
|
+ title="2、流程数据扭转的代理"
|
|
|
+ type="success"
|
|
|
+ :closable="false"
|
|
|
+ />
|
|
|
<!-- 全部代理 || 部分代理 -->
|
|
|
<el-row :gutter="20">
|
|
|
- <el-col :span="12" col>
|
|
|
+ <el-col :span="24" col>
|
|
|
<el-form-item label="代理类型:" prop="agentType">
|
|
|
- <el-radio-group v-if="!readonly" v-model="bpmAgent.agentType">
|
|
|
- <el-radio v-for="option in agentTypeOptions" :key="option.value" :label="option.value">{{ option.label }}</el-radio>
|
|
|
+ <el-radio-group
|
|
|
+ v-if="!readonly"
|
|
|
+ v-model="bpmAgent.agentType"
|
|
|
+ >
|
|
|
+ <el-radio
|
|
|
+ v-for="option in agentTypeOptions"
|
|
|
+ :key="option.value"
|
|
|
+ :label="option.value"
|
|
|
+ >{{ option.label }}</el-radio>
|
|
|
</el-radio-group>
|
|
|
- <el-tag v-else :type="bpmAgent.agentType | optionsFilter(agentTypeOptions, 'type')">{{ bpmAgent.agentType | optionsFilter(agentTypeOptions, 'label') }}</el-tag>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12" col>
|
|
|
- <el-form-item label="是否启用:" prop="isEnabled">
|
|
|
- <el-switch v-if="!readonly" v-model="bpmAgent.isEnabled" active-value="enabled" inactive-value="disabled" />
|
|
|
- <el-tag v-else :type="bpmAgent.isEnabled | optionsFilter(statusOptions, 'type')">{{ bpmAgent.isEnabled | optionsFilter(statusOptions, 'label') }}</el-tag>
|
|
|
+ <el-tag
|
|
|
+ v-else
|
|
|
+ :type="
|
|
|
+ bpmAgent.agentType
|
|
|
+ | optionsFilter(
|
|
|
+ agentTypeOptions,
|
|
|
+ 'type'
|
|
|
+ )
|
|
|
+ "
|
|
|
+ >{{
|
|
|
+ bpmAgent.agentType
|
|
|
+ | optionsFilter(
|
|
|
+ agentTypeOptions,
|
|
|
+ "label"
|
|
|
+ )
|
|
|
+ }}</el-tag>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
@@ -119,19 +235,60 @@
|
|
|
<div v-if="bpmAgent.agentType === 'part'">
|
|
|
<el-form-item label="流程定义">
|
|
|
<div v-if="!readonly" class="dialog-right">
|
|
|
- <bpm-definition-selector button multiple @callback="updateDefine" />
|
|
|
- <el-button class="ibps-icon-remove ibps-ml-10" type="danger" @click="handleAllDelete(multipleSelection)">删除</el-button>
|
|
|
+ <bpm-definition-selector
|
|
|
+ button
|
|
|
+ multiple
|
|
|
+ @callback="updateDefine"
|
|
|
+ />
|
|
|
+ <el-button
|
|
|
+ class="ibps-icon-remove ibps-ml-10"
|
|
|
+ type="danger"
|
|
|
+ @click="handleAllDelete(multipleSelection)"
|
|
|
+ >删除</el-button>
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
- <el-form-item v-loading="rowLoading" label-width="0px" :element-loading-text="$t('common.loading')">
|
|
|
- <el-table ref="multipleTable" border :data="bpmAgent.bpmAgentDefPoList" tooltip-effect="dark" style="width: 100%" @selection-change="handleSelectionChange">
|
|
|
- <el-table-column v-if="!readonly" type="selection" width="45" />
|
|
|
+ <el-form-item
|
|
|
+ v-loading="rowLoading"
|
|
|
+ label-width="0px"
|
|
|
+ :element-loading-text="$t('common.loading')"
|
|
|
+ >
|
|
|
+ <el-table
|
|
|
+ ref="multipleTable"
|
|
|
+ border
|
|
|
+ :data="bpmAgent.bpmAgentDefPoList"
|
|
|
+ tooltip-effect="dark"
|
|
|
+ style="width: 100%"
|
|
|
+ @selection-change="handleSelectionChange"
|
|
|
+ >
|
|
|
+ <el-table-column
|
|
|
+ v-if="!readonly"
|
|
|
+ type="selection"
|
|
|
+ width="45"
|
|
|
+ />
|
|
|
<el-table-column label="流程名称">
|
|
|
- <template slot-scope="scope">{{ scope.row.procDefName ? scope.row.procDefName : scope.row.name }}</template>
|
|
|
+ <template slot-scope="scope">{{
|
|
|
+ scope.row.procDefName
|
|
|
+ ? scope.row.procDefName
|
|
|
+ : scope.row.name
|
|
|
+ }}</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column v-if="!readonly" label="操作" width="55">
|
|
|
+ <el-table-column
|
|
|
+ v-if="!readonly"
|
|
|
+ label="操作"
|
|
|
+ width="55"
|
|
|
+ >
|
|
|
<template slot-scope="scope">
|
|
|
- <el-button type="danger" icon="el-icon-delete" circle @click="handleDelete(scope.$index, scope.row)" />
|
|
|
+ <el-button
|
|
|
+ type="danger"
|
|
|
+ icon="el-icon-delete"
|
|
|
+ circle
|
|
|
+ @click="
|
|
|
+ handleDelete(
|
|
|
+ scope.$index,
|
|
|
+ scope.row
|
|
|
+ )
|
|
|
+ "
|
|
|
+ />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
@@ -141,26 +298,67 @@
|
|
|
<!-- 条件代理 -->
|
|
|
<div v-if="bpmAgent.agentType === 'condition'">
|
|
|
<el-form-item label="流程名称:">
|
|
|
- <bpm-definition-selector v-model="bpmAgent.procDefId" :disabled="readonly" />
|
|
|
+ <bpm-definition-selector
|
|
|
+ v-model="bpmAgent.procDefId"
|
|
|
+ :disabled="readonly"
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="流程代理条件:">
|
|
|
<div v-if="!readonly" class="dialog-right">
|
|
|
- <el-button class="ibps-icon-add" type="primary" @click="openConditionDialog">添加</el-button>
|
|
|
- <el-button class="ibps-icon-remove ibps-ml-5" type="danger">删除</el-button>
|
|
|
+ <el-button
|
|
|
+ class="ibps-icon-add"
|
|
|
+ type="primary"
|
|
|
+ @click="openConditionDialog"
|
|
|
+ >添加</el-button>
|
|
|
+ <el-button
|
|
|
+ class="ibps-icon-remove ibps-ml-5"
|
|
|
+ type="danger"
|
|
|
+ >删除</el-button>
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
- <el-form-item v-loading="rowLoading" label-width="20px" :element-loading-text="$t('common.loading')">
|
|
|
- <el-table ref="multipleTable" :data="bpmAgent.bpmAgentConditionPoList" tooltip-effect="dark" style="width: 100%" @selection-change="handleConditionChange">
|
|
|
+ <el-form-item
|
|
|
+ v-loading="rowLoading"
|
|
|
+ label-width="20px"
|
|
|
+ :element-loading-text="$t('common.loading')"
|
|
|
+ >
|
|
|
+ <el-table
|
|
|
+ ref="multipleTable"
|
|
|
+ :data="bpmAgent.bpmAgentConditionPoList"
|
|
|
+ tooltip-effect="dark"
|
|
|
+ style="width: 100%"
|
|
|
+ @selection-change="handleConditionChange"
|
|
|
+ >
|
|
|
<el-table-column type="selection" width="55" />
|
|
|
<el-table-column label="代理人">
|
|
|
- <template slot-scope="scope">{{ scope.row.agenterName }}</template>
|
|
|
+ <template slot-scope="scope">{{
|
|
|
+ scope.row.agenterName
|
|
|
+ }}</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="条件名称">
|
|
|
- <template slot-scope="scope">{{ scope.row.name }}</template>
|
|
|
+ <template slot-scope="scope">{{
|
|
|
+ scope.row.name
|
|
|
+ }}</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="address" label="管理" width="100px" show-overflow-tooltip>
|
|
|
- <el-button type="primary" icon="el-icon-edit" circle @click="handleEdit(scope.$index, scope.row)" />
|
|
|
- <el-button type="danger" icon="el-icon-delete" circle @click="handleRemove(scope.$index, scope.row)" />
|
|
|
+ <el-table-column
|
|
|
+ prop="address"
|
|
|
+ label="管理"
|
|
|
+ width="100px"
|
|
|
+ show-overflow-tooltip
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ icon="el-icon-edit"
|
|
|
+ circle
|
|
|
+ @click="handleEdit(scope.$index, scope.row)"
|
|
|
+ />
|
|
|
+ <el-button
|
|
|
+ type="danger"
|
|
|
+ icon="el-icon-delete"
|
|
|
+ circle
|
|
|
+ @click="
|
|
|
+ handleRemove(scope.$index, scope.row)
|
|
|
+ "
|
|
|
+ />
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
</el-form-item>
|
|
|
@@ -169,11 +367,19 @@
|
|
|
</div>
|
|
|
|
|
|
<div slot="footer" class="el-dialog--center">
|
|
|
- <ibps-toolbar :actions="toolbars" @action-event="handleActionEvent" />
|
|
|
+ <ibps-toolbar
|
|
|
+ :actions="toolbars"
|
|
|
+ @action-event="handleActionEvent"
|
|
|
+ />
|
|
|
</div>
|
|
|
|
|
|
<!-- 添加规则弹窗 -->
|
|
|
- <condition :def-id="bpmAgent.procDefId" :visible="conditionDialogVisible" @callback="callbackBpmAgentConditionPoList" @close="(visible) => (conditionDialogVisible = visible)" />
|
|
|
+ <condition
|
|
|
+ :def-id="bpmAgent.procDefId"
|
|
|
+ :visible="conditionDialogVisible"
|
|
|
+ @callback="callbackBpmAgentConditionPoList"
|
|
|
+ @close="(visible) => (conditionDialogVisible = visible)"
|
|
|
+ />
|
|
|
</el-dialog>
|
|
|
</template>
|
|
|
|
|
|
@@ -216,7 +422,7 @@ export default {
|
|
|
return {
|
|
|
level,
|
|
|
formName: 'agentForm',
|
|
|
- formLabelWidth: '110px',
|
|
|
+ formLabelWidth: '115px',
|
|
|
dialogVisible: this.visible,
|
|
|
conditionDialogVisible: false, // 条件规则界面
|
|
|
dialogLoading: false,
|
|
|
@@ -245,12 +451,28 @@ export default {
|
|
|
rules: {
|
|
|
title: [
|
|
|
{ required: true, message: this.$t('validate.required') },
|
|
|
- { min: 1, max: 64, message: '长度不能超过64个字符', trigger: 'blur' }
|
|
|
+ {
|
|
|
+ min: 1,
|
|
|
+ max: 64,
|
|
|
+ message: '长度不能超过64个字符',
|
|
|
+ trigger: 'blur'
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ delegatorId: [
|
|
|
+ { required: true, message: this.$t('validate.required') }
|
|
|
],
|
|
|
- delegatorId: [{ required: true, message: this.$t('validate.required') }],
|
|
|
- agenterId: [{ required: true, message: this.$t('validate.required') }],
|
|
|
- effectiveTime: [{ required: true, message: this.$t('validate.required') }],
|
|
|
- expiryTime: [{ required: true, message: this.$t('validate.required') }]
|
|
|
+ agenterId: [
|
|
|
+ { required: true, message: this.$t('validate.required') }
|
|
|
+ ],
|
|
|
+ effectiveTime: [
|
|
|
+ { required: true, message: this.$t('validate.required') }
|
|
|
+ ],
|
|
|
+ expiryTime: [
|
|
|
+ { required: true, message: this.$t('validate.required') }
|
|
|
+ ],
|
|
|
+ isEnabled: [
|
|
|
+ { required: true, message: this.$t('validate.required') }
|
|
|
+ ]
|
|
|
},
|
|
|
toolbars: [
|
|
|
{
|
|
|
@@ -266,23 +488,25 @@ export default {
|
|
|
|
|
|
// 委托人和代理人 选择器修改通用选择器,需要这些参数
|
|
|
type: 'user',
|
|
|
- filter: [{
|
|
|
- descVal: '2',
|
|
|
- includeSub: true,
|
|
|
- old: 'position',
|
|
|
- partyId: '',
|
|
|
- partyName: '',
|
|
|
- scriptContent: '',
|
|
|
- type: 'user',
|
|
|
- userType: 'position'
|
|
|
- }],
|
|
|
+ filter: [
|
|
|
+ {
|
|
|
+ descVal: '2',
|
|
|
+ includeSub: true,
|
|
|
+ old: 'position',
|
|
|
+ partyId: '',
|
|
|
+ partyName: '',
|
|
|
+ scriptContent: '',
|
|
|
+ type: 'user',
|
|
|
+ userType: 'position'
|
|
|
+ }
|
|
|
+ ],
|
|
|
multiple: false,
|
|
|
filtrate: true,
|
|
|
store: 'id',
|
|
|
disabled: false,
|
|
|
readonlyText: 'null',
|
|
|
roleList: [],
|
|
|
- checkRoleList: [],
|
|
|
+ // checkRoleList: [],
|
|
|
daiRoleName: '',
|
|
|
yuanRoleList: [],
|
|
|
daiRoleList: [],
|
|
|
@@ -299,20 +523,20 @@ export default {
|
|
|
},
|
|
|
watch: {
|
|
|
visible: {
|
|
|
- handler: function (val, oldVal) {
|
|
|
+ handler: function () {
|
|
|
this.dialogVisible = this.visible
|
|
|
},
|
|
|
immediate: true
|
|
|
},
|
|
|
'bpmAgent.delegatorId': {
|
|
|
- handler: function (val, oldVal) {
|
|
|
+ handler: function () {
|
|
|
this.getWeiTuo(this.bpmAgent.delegatorId, 1)
|
|
|
},
|
|
|
immediate: true,
|
|
|
deep: true
|
|
|
},
|
|
|
'bpmAgent.agenterId': {
|
|
|
- handler: function (val, oldVal) {
|
|
|
+ handler: function () {
|
|
|
this.getWeiTuo(this.bpmAgent.agenterId, 2)
|
|
|
},
|
|
|
immediate: true,
|
|
|
@@ -334,7 +558,8 @@ export default {
|
|
|
methods: {
|
|
|
// 初始化
|
|
|
getInit () {
|
|
|
- this.filter[0].partyId = this.$store.getters.userInfo.employee.positions || ''
|
|
|
+ this.filter[0].partyId =
|
|
|
+ this.$store.getters.userInfo.employee.positions || ''
|
|
|
},
|
|
|
handleEdit () {
|
|
|
this.rowLoading = true
|
|
|
@@ -350,8 +575,7 @@ export default {
|
|
|
// TODO:
|
|
|
})
|
|
|
},
|
|
|
- callbackBpmAgentConditionPoList (data) {
|
|
|
- },
|
|
|
+ callbackBpmAgentConditionPoList () {},
|
|
|
handleDelete (index, arr) {
|
|
|
this.rowLoading = true
|
|
|
setTimeout(() => {
|
|
|
@@ -404,6 +628,10 @@ export default {
|
|
|
},
|
|
|
// 保存数据
|
|
|
handleSave () {
|
|
|
+ // 委托人和代理人校验
|
|
|
+ if (this.getVerification()) {
|
|
|
+ return
|
|
|
+ }
|
|
|
this.$refs[this.formName].validate((valid) => {
|
|
|
if (valid) {
|
|
|
this.saveData()
|
|
|
@@ -415,18 +643,22 @@ export default {
|
|
|
// 提交保存数据
|
|
|
saveData () {
|
|
|
const data = JSON.parse(JSON.stringify(this.bpmAgent))
|
|
|
- data.effectiveTime = new Date(this.bpmAgent.effectiveTime).getTime() || ''
|
|
|
- data.expiryTime = new Date(this.bpmAgent.expiryTime).getTime() || ''
|
|
|
+ data.effectiveTime =
|
|
|
+ new Date(this.bpmAgent.effectiveTime).getTime() || ''
|
|
|
+ data.expiryTime =
|
|
|
+ new Date(this.bpmAgent.expiryTime).getTime() || ''
|
|
|
// 检测生效时间日期是否发布日期在之前。
|
|
|
if (data.effectiveTime > data.expiryTime) {
|
|
|
ActionUtils.error('生效时间与失效时间范围不合法!')
|
|
|
return
|
|
|
}
|
|
|
- if (this.$utils.isEmpty(this.bpmAgent.bpmAgentDefPoList) && this.bpmAgent.agentType === 'part') {
|
|
|
+ if (
|
|
|
+ this.$utils.isEmpty(this.bpmAgent.bpmAgentDefPoList) &&
|
|
|
+ this.bpmAgent.agentType === 'part'
|
|
|
+ ) {
|
|
|
ActionUtils.error('流程定义数据不能为空!')
|
|
|
return
|
|
|
}
|
|
|
- this.bpmAgent.bpmAgentRoleList = this.checkRoleList
|
|
|
save(this.bpmAgent)
|
|
|
.then((response) => {
|
|
|
this.$emit('callback', this)
|
|
|
@@ -439,8 +671,8 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
})
|
|
|
- .catch((err) => {
|
|
|
- console.error(err)
|
|
|
+ .catch(() => {
|
|
|
+ ActionUtils.error('无法保存,请稍后检查数据重新再试')
|
|
|
})
|
|
|
},
|
|
|
// 关闭当前窗口
|
|
|
@@ -449,7 +681,7 @@ export default {
|
|
|
this.$refs[this.formName].resetFields()
|
|
|
this.daiRoleName = ''
|
|
|
this.roleList = []
|
|
|
- this.checkRoleList = []
|
|
|
+ // this.checkRoleList = []
|
|
|
},
|
|
|
/**
|
|
|
* 表单验证
|
|
|
@@ -476,8 +708,10 @@ export default {
|
|
|
})
|
|
|
.then((response) => {
|
|
|
this.bpmAgent = response.data
|
|
|
- this.checkRoleList = response.data.bpmAgentRoleList || []
|
|
|
- // this.bpmAgent.bpmAgentRoleList = response.data.bpmAgentRoleList || []
|
|
|
+
|
|
|
+ // this.checkRoleList = response.data.bpmAgentRoleList || []
|
|
|
+ this.bpmAgent.bpmAgentRoleList =
|
|
|
+ response.data.bpmAgentRoleList || []
|
|
|
this.formValidate()
|
|
|
this.dialogLoading = false
|
|
|
})
|
|
|
@@ -488,13 +722,13 @@ export default {
|
|
|
addDef () {
|
|
|
alert('打开流程选择器')
|
|
|
},
|
|
|
- callbackDelegatorrInfo (value, data, type) {
|
|
|
- this.checkRoleList = []
|
|
|
+ callbackDelegatorrInfo (data) {
|
|
|
+ // this.checkRoleList = []
|
|
|
this.bpmAgent.delegatorName = data.name
|
|
|
this.getVerification()
|
|
|
},
|
|
|
- callbackAgenterInfo (value, data, type) {
|
|
|
- this.checkRoleList = []
|
|
|
+ callbackAgenterInfo (data) {
|
|
|
+ // this.checkRoleList = []
|
|
|
this.bpmAgent.agenterName = data.name
|
|
|
this.getVerification()
|
|
|
},
|
|
|
@@ -513,7 +747,8 @@ export default {
|
|
|
if (this.$utils.isEmpty(this.bpmAgent.bpmAgentDefPoList)) {
|
|
|
this.bpmAgent.bpmAgentDefPoList = arr
|
|
|
} else {
|
|
|
- this.bpmAgent.bpmAgentDefPoList = this.bpmAgent.bpmAgentDefPoList.concat(arr)
|
|
|
+ this.bpmAgent.bpmAgentDefPoList =
|
|
|
+ this.bpmAgent.bpmAgentDefPoList.concat(arr)
|
|
|
}
|
|
|
this.rowLoading = false
|
|
|
})
|
|
|
@@ -545,21 +780,23 @@ export default {
|
|
|
getUrl (id) {
|
|
|
const sql1 = `select nei_rong_ from t_ipcc where id_ = '1'`
|
|
|
const sql2 = `select * from ibps_file_attachment where find_in_set(ID_,'${id}')`
|
|
|
- Promise.all([curdPost('sql', sql1), curdPost('sql', sql2)]).then(([res1, res2]) => {
|
|
|
- if (res1.state === 200 && res2.state === 200) {
|
|
|
- const datas1 = res1.variables.data
|
|
|
- const datas2 = res2.variables.data
|
|
|
- const ip = datas1[0].nei_rong_
|
|
|
- const imageList = datas2.map(item => {
|
|
|
- return ip + '/' + item.FILE_PATH_
|
|
|
- })
|
|
|
- this.srcList = imageList
|
|
|
+ Promise.all([curdPost('sql', sql1), curdPost('sql', sql2)]).then(
|
|
|
+ ([res1, res2]) => {
|
|
|
+ if (res1.state === 200 && res2.state === 200) {
|
|
|
+ const datas1 = res1.variables.data
|
|
|
+ const datas2 = res2.variables.data
|
|
|
+ const ip = datas1[0].nei_rong_
|
|
|
+ const imageList = datas2.map((item) => {
|
|
|
+ return ip + '/' + item.FILE_PATH_
|
|
|
+ })
|
|
|
+ this.srcList = imageList
|
|
|
+ }
|
|
|
}
|
|
|
- })
|
|
|
+ )
|
|
|
},
|
|
|
getWeiTuo (id, type = 1, formId = '') {
|
|
|
if (!id) return
|
|
|
- return new Promise((resolve, reject) => {
|
|
|
+ return new Promise((resolve) => {
|
|
|
load({ employeeId: id })
|
|
|
.then((response) => {
|
|
|
const data = response
|
|
|
@@ -575,14 +812,14 @@ export default {
|
|
|
this.getRoleList()
|
|
|
resolve(data)
|
|
|
})
|
|
|
- .catch(() => {
|
|
|
- })
|
|
|
+ .catch(() => {})
|
|
|
})
|
|
|
},
|
|
|
+ // 获取委托人角色信息
|
|
|
getRoleList () {
|
|
|
if (this.yuanRoleList.length > 0 && this.daiRoleList.length > 0) {
|
|
|
- this.roleList = this.yuanRoleList.filter(item => {
|
|
|
- return !this.daiRoleList.some(it => it.id === item.id)
|
|
|
+ this.roleList = this.yuanRoleList.filter((item) => {
|
|
|
+ return !this.daiRoleList.some((it) => it.id === item.id)
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
@@ -623,16 +860,15 @@ export default {
|
|
|
display: flex;
|
|
|
flex-wrap: wrap;
|
|
|
}
|
|
|
-.bpmnForm{
|
|
|
+.bpmnForm {
|
|
|
padding: 20px;
|
|
|
}
|
|
|
-.time{
|
|
|
+.time {
|
|
|
width: 100%;
|
|
|
}
|
|
|
-.sinImageList{
|
|
|
+.sinImageList {
|
|
|
width: 150px;
|
|
|
height: 150px;
|
|
|
margin: 10px;
|
|
|
}
|
|
|
-
|
|
|
</style>
|