发起审批 && 清理代码
This commit is contained in:
1 parent
5f7e5a038f
commit
b64c952d0f
30 files changed
+308
-1228
No files matched your search
@@ -8,51 +8,61 @@
|
||||
<!-- {{taskData.workflowForm}} -->
|
||||
<!-- 表单 -->
|
||||
<v-row class="ma-4 mt-2">
|
||||
<v-col cols="12" v-for="(formItem, index) in taskData.workflowForm" :key="index" class="px-2 py-1 ma-0">
|
||||
<span class="jh-input-label">{{ index + 1 }}. {{ formItem.statement }}<span v-show="formItem.isRequire" class="red--text ml-1">*</span></span>
|
||||
<form-component-list v-if="isDrawerShown" :form-item="formItem" :disabled='false' :readonly='false' @calc-workflow="getWorkflow" ></form-component-list>
|
||||
</v-col>
|
||||
<template v-if="taskData.workflowForm && taskData.workflowForm.length > 0">
|
||||
<v-col cols="12" v-for="(formItem, index) in taskData.workflowForm" :key="index" class="px-2 py-1 ma-0">
|
||||
<span class="jh-input-label">{{ index + 1 }}. {{ formItem.statement }}<span v-show="formItem.isRequire" class="red--text ml-1">*</span></span>
|
||||
<form-component-list v-if="isDrawerShown" :form-item="formItem" :disabled='false' :readonly='false' @calc-workflow="getWorkflow" ></form-component-list>
|
||||
</v-col>
|
||||
</template>
|
||||
<template v-else>
|
||||
暂无表单,请联系管理员!
|
||||
</template>
|
||||
</v-row>
|
||||
<v-divider class="jh-divider"></v-divider>
|
||||
<!-- 审批流 -->
|
||||
<v-row class="ma-4 mt-2">
|
||||
<v-col cols="12" class="font-weight-bold pa-0 mx-0 my-2">审批流程</v-col>
|
||||
<v-col cols="12" class="pa-0 ma-0">
|
||||
<div v-for="(node, nodeIndex) in curWorkflow">
|
||||
<div class="node-box">
|
||||
<div class="node-box-stepper" color="#cdcfd1">
|
||||
<v-icon v-if="node.properties.type == 'approvalTask'" color="#cdcfd1">mdi-account-circle</v-icon>
|
||||
<v-icon v-if="node.properties.type == 'noticeTask'" color="#cdcfd1">mdi-send-circle</v-icon>
|
||||
<div v-if="nodeIndex < curWorkflow.length - 1" class="vertical-line"></div>
|
||||
</div>
|
||||
<div class="node-box-item">
|
||||
<div class="item-label font-weight-bold ">
|
||||
{{node.properties.label}}
|
||||
<v-chip class="ml-1 px-1 py-2" x-small v-if="node.properties.approvalType" label outlined color="#4caf50">
|
||||
{{node.properties.approvalType}}
|
||||
</v-chip>
|
||||
<template v-if="curWorkflow.length > 0">
|
||||
<v-col cols="12" class="pa-0 ma-0">
|
||||
<div v-for="(node, nodeIndex) in curWorkflow">
|
||||
<div class="node-box">
|
||||
<div class="node-box-stepper" color="#cdcfd1">
|
||||
<v-icon v-if="node.properties.type == 'approvalTask'" color="#cdcfd1">mdi-account-circle</v-icon>
|
||||
<v-icon v-if="node.properties.type == 'noticeTask'" color="#cdcfd1">mdi-send-circle</v-icon>
|
||||
<div v-if="nodeIndex < curWorkflow.length - 1" class="vertical-line"></div>
|
||||
</div>
|
||||
<div class="d-flex align-center">
|
||||
<template v-for="(userId, userIndex) in node.properties.userIdList">
|
||||
<div class="item-user-box d-flex justify-space-between px-2 mr-2">
|
||||
<span class="omit">{{ constantObj.userList.find(u => u.userId == userId)?.username || userId }}</span>
|
||||
<v-icon class="ml-1" color="#a4a7aa" @click="doUiAction('deleteNodeUser', {nodeIndex ,userIndex})">mdi-close</v-icon>
|
||||
</div>
|
||||
<v-icon v-if="userIndex != node.properties.userIdList.length && node.properties.approvalType == '依次审批'"
|
||||
class="mr-2" color="#afb1b4" small>
|
||||
mdi-arrow-right-thin
|
||||
</v-icon>
|
||||
</template>
|
||||
<template>
|
||||
<div class="abb-user d-flex justify-center align-center" @click="doUiAction('startAddNodeUser', nodeIndex)">
|
||||
<v-icon color="#4caf50">mdi-plus</v-icon>
|
||||
</div>
|
||||
</template>
|
||||
<div class="node-box-item">
|
||||
<div class="item-label font-weight-bold ">
|
||||
{{node.properties.label}}
|
||||
<v-chip class="ml-1 px-1 py-2" x-small v-if="node.properties.approvalType" label outlined color="#4caf50">
|
||||
{{node.properties.approvalType}}
|
||||
</v-chip>
|
||||
</div>
|
||||
<div class="d-flex align-center">
|
||||
<template v-for="(userId, userIndex) in node.properties.userIdList">
|
||||
<div class="item-user-box d-flex justify-space-between px-2 mr-2">
|
||||
<span class="omit">{{ constantObj.userList.find(u => u.userId == userId)?.username || userId }}</span>
|
||||
<v-icon class="ml-1" color="#a4a7aa" @click="doUiAction('deleteNodeUser', {nodeIndex ,userIndex})">mdi-close</v-icon>
|
||||
</div>
|
||||
<v-icon v-if="userIndex != node.properties.userIdList.length && node.properties.approvalType == '依次审批'"
|
||||
class="mr-2" color="#afb1b4" small>
|
||||
mdi-arrow-right-thin
|
||||
</v-icon>
|
||||
</template>
|
||||
<template>
|
||||
<div class="abb-user d-flex justify-center align-center" @click="doUiAction('startAddNodeUser', nodeIndex)">
|
||||
<v-icon color="#4caf50">mdi-plus</v-icon>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</v-col>
|
||||
</v-col>
|
||||
</template>
|
||||
<template v-else>
|
||||
暂无节点,请联系管理员!
|
||||
</template>
|
||||
</v-row>
|
||||
<v-row class="justify-end mx-0 my-8 px-4">
|
||||
<!-- 抽屉操作按钮 -->
|
||||
@@ -111,7 +121,7 @@
|
||||
</template>
|
||||
</v-card>
|
||||
</template>
|
||||
|
||||
{% include 'component/tpl/tplFormDesign.html' %}
|
||||
<script type="module">
|
||||
Vue.component("create-task-drawer", {
|
||||
template: '#create-task-drawer',
|
||||
@@ -205,9 +215,9 @@ Vue.component("create-task-drawer", {
|
||||
let formObj = _.cloneDeep(item);
|
||||
formObj.workflowInfo = {
|
||||
workflowName: item.workflowName,
|
||||
...JSON.parse(item.workflowInfo),
|
||||
...item.workflowInfo,
|
||||
}
|
||||
formObj.workflowConfig = formObj.workflowConfig ? JSON.parse(formObj.workflowConfig) : null;
|
||||
formObj.workflowConfig = formObj.workflowConfig ? formObj.workflowConfig : null;
|
||||
formObj.workflowForm = formObj.workflowForm ? (typeof formObj.workflowForm == 'string'? JSON.parse(formObj.workflowForm): formObj.workflowForm) : [];
|
||||
formObj.workflowForm.forEach(f => f.answer = []) // 兼容多选
|
||||
this.defaultWorkflowConfig = _.cloneDeep(formObj.workflowConfig);
|
||||
|
||||
Reference in new issue
Block a user