review workflowManagement.html
1.table空数据(所有) 2.方法结构整理 workflowManagement 3.最新UI同步(所有)
This commit is contained in:
1 parent
959f4b55e8
commit
14cfbf118d
8 files changed
+257
-200
No files matched your search
@@ -11,6 +11,16 @@
|
||||
fixed-header
|
||||
hide-default-footer
|
||||
class="jh-fixed-table-height elevation-0 mt-0 mb-xs-4">
|
||||
<!--没有数据-->
|
||||
<template v-slot:loading>
|
||||
<div class="jh-no-data">数据加载中</div>
|
||||
</template>
|
||||
<template v-slot:no-data>
|
||||
<div class="jh-no-data">暂无数据</div>
|
||||
</template>
|
||||
<template v-slot:no-results>
|
||||
<div class="jh-no-data">暂无数据</div>
|
||||
</template>
|
||||
<!-- 节点说明 -->
|
||||
<template v-slot:item.taskHandleDesc="{ item }">
|
||||
<span v-if="item.taskConfigId.includes('userTask-')">
|
||||
@@ -57,8 +67,8 @@
|
||||
isTableLoading: false,
|
||||
headers: [
|
||||
{text: "名称", value: "taskTitle", width: 230, class: 'fixed', cellClass: 'fixed'},
|
||||
{text: "节点说明", value: "taskHandleDesc", width: 120},
|
||||
{text: "操作人", value: "operationByUser", width: 120},
|
||||
{text: "节点说明", value: "taskHandleDesc", width: 120},
|
||||
{text: "操作人", value: "operationByUser", width: 120},
|
||||
{text: "操作时间", value: "operationAt", width: 250},
|
||||
],
|
||||
tableData: [],
|
||||
@@ -101,4 +111,4 @@
|
||||
</script>
|
||||
<style>
|
||||
</style>
|
||||
<!-- <<<<<<<<<<<<< taskHistory.html -->
|
||||
<!-- <<<<<<<<<<<<< taskHistory.html -->
|
||||
@@ -1,165 +1,170 @@
|
||||
<template id="form-item-list-review">
|
||||
<div class="form-item-list-review-container">
|
||||
<!-- 单选 -->
|
||||
<template v-if="formItem.component.type === 'singleSelect'">
|
||||
<span class="jh-input-label">{{ formItem.component.statement
|
||||
}}</span>
|
||||
<v-radio-group readonly v-model="formItem.user.answer">
|
||||
<v-radio v-for="(option, optionIndex) in formItem.component.selectOptionList" :key="optionIndex"
|
||||
:label="assignmentOptionKey[optionIndex]+': '+option" :value="option"></v-radio>
|
||||
</v-radio-group>
|
||||
<!-- 单选 -->
|
||||
<template v-if="formItem.component.type === 'singleSelect'">
|
||||
<span class="jh-input-label">{{ formItem.component.statement }}</span>
|
||||
<v-radio-group readonly v-model="formItem.user.answer">
|
||||
<v-radio
|
||||
v-for="(option, optionIndex) in formItem.component.selectOptionList" :key="optionIndex"
|
||||
:label="assignmentOptionKey[optionIndex]+': '+option" :value="option"></v-radio>
|
||||
</v-radio-group>
|
||||
</template>
|
||||
<!-- 多选和填空 -->
|
||||
<template v-if="['fillBlank', 'multipleSelect'].includes(formItem.component.type)">
|
||||
<span class="jh-input-label" style="white-space:nowrap !important;" v-if="formItem.component.type === 'fillBlank'">
|
||||
<template v-for="(blank, blankIndex) in formItem.component.statement" :key="blankIndex">
|
||||
<span class="fill-blank fill-blank-input" v-if="blank.type === 'input'">{{
|
||||
formItem.user.answer[blank.id] }}</span>
|
||||
<span v-else>{{ blank.value }}</span>
|
||||
</template>
|
||||
<!-- 多选和填空 -->
|
||||
<template v-if="['fillBlank', 'multipleSelect'].includes(formItem.component.type)">
|
||||
|
||||
<span class="jh-input-label" style="white-space:nowrap !important;"
|
||||
v-if="formItem.component.type === 'fillBlank'">
|
||||
<template v-for="(blank, blankIndex) in formItem.component.statement" :key="blankIndex">
|
||||
<span class="fill-blank fill-blank-input" v-if="blank.type === 'input'">{{
|
||||
formItem.user.answer[blank.id] }}</span>
|
||||
<span v-else>{{ blank.value }}</span>
|
||||
</template>
|
||||
</span>
|
||||
<span class="jh-input-label" v-else>{{ formItem.component.statement
|
||||
}}</span>
|
||||
<template v-if="formItem.component.type === 'multipleSelect'">
|
||||
<template v-for="(option, optionIndex) in formItem.component.selectOptionList" :key="optionIndex">
|
||||
<v-checkbox readonly style="margin-top: 0px;" v-model="formItem.user.answer" :value="option"
|
||||
:label="assignmentOptionKey[optionIndex]+': '+option" hide-details color="red"></v-checkbox>
|
||||
</template>
|
||||
</template>
|
||||
</span>
|
||||
<span class="jh-input-label" v-else>{{ formItem.component.statement }}</span>
|
||||
<template v-if="formItem.component.type === 'multipleSelect'">
|
||||
<template v-for="(option, optionIndex) in formItem.component.selectOptionList" :key="optionIndex">
|
||||
<v-checkbox
|
||||
readonly style="margin-top: 0px;" v-model="formItem.user.answer" :value="option"
|
||||
:label="assignmentOptionKey[optionIndex]+': '+option" hide-details color="red"></v-checkbox>
|
||||
</template>
|
||||
<!-- 多行文本,问答和markdown -->
|
||||
<template v-if="['textarea', 'questionAnswer', 'markdown'].includes(formItem.component.type)">
|
||||
<span class="jh-input-label">{{ formItem.component.statement
|
||||
}}</span>
|
||||
<template v-if="formItem.component.type === 'markdown'" cols="12">
|
||||
<md2html :article-content="formItem.user.answer" @complete="isContentLoading = false"></md2html>
|
||||
</template>
|
||||
<template v-else cols="12">
|
||||
<v-textarea readonly dense filled single-line v-model="formItem.user.answer" :rows="5" auto-grow />
|
||||
</template>
|
||||
</template>
|
||||
<!-- 题目组 -->
|
||||
<template v-if="formItem.component.type === 'questionGroup'">
|
||||
<span class="jh-input-label">{{ formItem.component.statement
|
||||
}}</span>
|
||||
<md2html :article-content="formItem.component.markdownContent" @complete="isContentLoading = false">
|
||||
</md2html>
|
||||
|
||||
<form-item-list-review :form-item-list="formItem.component.itemList" :review-data="reviewData"
|
||||
:answer-check="answerCheck" />
|
||||
</template>
|
||||
<!-- 纯标题 -->
|
||||
<v-list-item-content v-if="formItem.component.type === 'displayText'">
|
||||
<p>{{formItem.component.statement}}</p>
|
||||
</v-list-item-content>
|
||||
</v-list-item>
|
||||
</v-card>
|
||||
</template>
|
||||
</template>
|
||||
<!-- 多行文本,问答和markdown -->
|
||||
<template v-if="['textarea', 'questionAnswer', 'markdown'].includes(formItem.component.type)">
|
||||
<span class="jh-input-label">{{ formItem.component.statement }}</span>
|
||||
<template v-if="formItem.component.type === 'markdown'" cols="12">
|
||||
<md2html :article-content="formItem.user.answer" @complete="isContentLoading = false"></md2html>
|
||||
</template>
|
||||
<template v-else cols="12">
|
||||
<v-textarea readonly dense filled single-line v-model="formItem.user.answer" :rows="5" auto-grow />
|
||||
</template>
|
||||
</template>
|
||||
<!-- 题目组 -->
|
||||
<template v-if="formItem.component.type === 'questionGroup'">
|
||||
<span class="jh-input-label">{{ formItem.component.statement }}</span>
|
||||
<md2html :article-content="formItem.component.markdownContent" @complete="isContentLoading = false">
|
||||
</md2html>
|
||||
<form-item-list-review
|
||||
:form-item-list="formItem.component.itemList" :review-data="reviewData"
|
||||
:answer-check="answerCheck" />
|
||||
</template>
|
||||
<!-- 纯标题 -->
|
||||
<v-list-item-content v-if="formItem.component.type === 'displayText'">
|
||||
<p>{{formItem.component.statement}}</p>
|
||||
</v-list-item-content>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
Vue.component("form-item-list-review", {
|
||||
template: '#form-item-list-review',
|
||||
vuetify: new Vuetify(),
|
||||
name: 'form-item-list-review',
|
||||
props: {
|
||||
formItem: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {};
|
||||
},
|
||||
},
|
||||
reviewData: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {};
|
||||
},
|
||||
},
|
||||
answerCheck: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {};
|
||||
},
|
||||
Vue.component("form-item-list-review", {
|
||||
template: '#form-item-list-review',
|
||||
vuetify: new Vuetify(),
|
||||
name: 'form-item-list-review',
|
||||
props: {
|
||||
formItem: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {};
|
||||
},
|
||||
},
|
||||
data: () => ({
|
||||
overlay: false,
|
||||
imgSrc: '',
|
||||
assignmentOptionKey: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K'],
|
||||
}),
|
||||
computed: {
|
||||
isMobile() {
|
||||
return window.innerWidth < 500;
|
||||
}
|
||||
reviewData: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {};
|
||||
},
|
||||
},
|
||||
destroyed() { },
|
||||
watch: {
|
||||
answerCheck: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {};
|
||||
},
|
||||
},
|
||||
created() {
|
||||
},
|
||||
methods: {}
|
||||
})
|
||||
},
|
||||
data: () => ({
|
||||
overlay: false,
|
||||
imgSrc: '',
|
||||
assignmentOptionKey: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K'],
|
||||
}),
|
||||
computed: {
|
||||
isMobile() {
|
||||
return window.innerWidth < 500;
|
||||
}
|
||||
},
|
||||
destroyed() {
|
||||
},
|
||||
watch: {},
|
||||
created() {
|
||||
},
|
||||
methods: {}
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.form-item-list-review-container {
|
||||
background-color: unset;
|
||||
}
|
||||
.form-item-list-review-container {
|
||||
background-color: unset;
|
||||
}
|
||||
|
||||
.form-item-list-review-container .jh-input-label {
|
||||
white-space: pre-line;
|
||||
font-weight: bold;
|
||||
font-size: 16px !important;
|
||||
}
|
||||
.form-item-list-review-container .jh-input-label {
|
||||
white-space: pre-line;
|
||||
font-weight: bold;
|
||||
font-size: 16px !important;
|
||||
}
|
||||
|
||||
.form-item-list-review-container audio {
|
||||
height: 35px;
|
||||
}
|
||||
.form-item-list-review-container audio {
|
||||
height: 35px;
|
||||
}
|
||||
|
||||
.form-item-list-review-container .audio-box {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.form-item-list-review-container .audio-box {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
/*.form-item-list-review-container .submit-handle-box {
|
||||
position: relative;
|
||||
/*.form-item-list-review-container .submit-handle-box {
|
||||
position: relative;
|
||||
}
|
||||
.form-item-list-review-container .submit-handle-box::after {
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
content: '';
|
||||
background-color: #e0e0e0;
|
||||
height: 200px;
|
||||
top: auto;
|
||||
bottom: auto;
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
content: '';
|
||||
background-color: #e0e0e0;
|
||||
height: 200px;
|
||||
top: auto;
|
||||
bottom: auto;
|
||||
}*/
|
||||
.student-remark textarea {
|
||||
color: rgb(0, 172, 37) !important;
|
||||
}
|
||||
.student-remark textarea {
|
||||
color: rgb(0, 172, 37) !important;
|
||||
}
|
||||
|
||||
.fill-blank {
|
||||
display: inline-block;
|
||||
.fill-blank {
|
||||
display: inline-block;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.fill-blank-input {
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
border-bottom: 2px solid gray;
|
||||
margin-left: 5px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
.icon-close {
|
||||
position: fixed; right: 10px; top: 5px; z-index: 50000
|
||||
}
|
||||
.icon-download {
|
||||
position: fixed; right: 50px; top: 5px; z-index: 50000
|
||||
}
|
||||
.file-prev-wrap {
|
||||
overflow: auto; max-width: 80vw; max-height: 90vh;
|
||||
}
|
||||
</style>
|
||||
.fill-blank-input {
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
border-bottom: 2px solid gray;
|
||||
margin-left: 5px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.icon-close {
|
||||
position: fixed;
|
||||
right: 10px;
|
||||
top: 5px;
|
||||
z-index: 50000
|
||||
}
|
||||
|
||||
.icon-download {
|
||||
position: fixed;
|
||||
right: 50px;
|
||||
top: 5px;
|
||||
z-index: 50000
|
||||
}
|
||||
|
||||
.file-prev-wrap {
|
||||
overflow: auto;
|
||||
max-width: 80vw;
|
||||
max-height: 90vh;
|
||||
}
|
||||
</style>
|
||||
@@ -5,7 +5,7 @@
|
||||
:form-item-list="form"
|
||||
ref="formItemListGenerator"/>
|
||||
|
||||
<!-- <v-navigation-drawer v-model="formItemListPreviewDrawer" fixed temporary hide-overlay bottom width="90%">
|
||||
<!-- <v-navigation-drawer v-model="formItemListPreviewDrawer" fixed temporary bottom width="90%">
|
||||
<v-toolbar dark class="blue darken-3" dense>
|
||||
<v-toolbar-title>表单预览</v-toolbar-title>
|
||||
<v-spacer></v-spacer>
|
||||
|
||||
@@ -67,6 +67,16 @@
|
||||
<v-switch v-model="isTableZebraLineShown" hide-details class="mx-3 my-2" label="显示斑马纹" dense flat></v-switch>
|
||||
</v-menu>
|
||||
</template>
|
||||
<!--没有数据-->
|
||||
<template v-slot:loading>
|
||||
<div class="jh-no-data">数据加载中</div>
|
||||
</template>
|
||||
<template v-slot:no-data>
|
||||
<div class="jh-no-data">暂无数据</div>
|
||||
</template>
|
||||
<template v-slot:no-results>
|
||||
<div class="jh-no-data">暂无数据</div>
|
||||
</template>
|
||||
<!--表格底部右侧分页-->
|
||||
<template v-slot:footer.page-text="pagination">
|
||||
<span>{{pagination.pageStart}}-{{pagination.pageStop}}</span>
|
||||
@@ -77,7 +87,7 @@
|
||||
<!-- <<<<<<<<<<<<< 页面内容 -->
|
||||
</div>
|
||||
<!-- <<<<<<<<<<<<< 创建审批抽屉 -->
|
||||
<v-navigation-drawer v-model="isCreateDrawerShown" :permanent="isCreateDrawerShown" fixed temporary right width="80%"
|
||||
<v-navigation-drawer v-model="isCreateDrawerShown" v-click-outside="drawerClickOutside" fixed temporary right width="80%"
|
||||
class="elevation-24">
|
||||
<v-form v-if="isCreateDrawerShown" ref="createForm" lazy-validation>
|
||||
<!--抽屉标题-->
|
||||
@@ -131,7 +141,7 @@
|
||||
<!-- 创建审批抽屉 >>>>>>>>>>>>> -->
|
||||
|
||||
<!-- 帮助页抽屉 >>>>>>>>>>>>> -->
|
||||
<v-navigation-drawer v-model="isHelpPageDrawerShown" fixed temporary right width="80%" hide-overlay
|
||||
<v-navigation-drawer v-model="isHelpPageDrawerShown" v-click-outside="drawerClickOutside" fixed temporary right width="80%"
|
||||
class="elevation-24">
|
||||
<iframe style="border: 0" :src="`/${appInfo.appId}/pageDoc#workflowManagement.md`" width="100%"
|
||||
height="100%"></iframe>
|
||||
|
||||
@@ -80,6 +80,16 @@
|
||||
<v-switch v-model="isTableZebraLineShown" hide-details class="mx-3 my-2" label="显示斑马纹" dense flat></v-switch>
|
||||
</v-menu>
|
||||
</template>
|
||||
<!--没有数据-->
|
||||
<template v-slot:loading>
|
||||
<div class="jh-no-data">数据加载中</div>
|
||||
</template>
|
||||
<template v-slot:no-data>
|
||||
<div class="jh-no-data">暂无数据</div>
|
||||
</template>
|
||||
<template v-slot:no-results>
|
||||
<div class="jh-no-data">暂无数据</div>
|
||||
</template>
|
||||
<!--表格底部右侧分页-->
|
||||
<template v-slot:footer.page-text="pagination">
|
||||
<span>{{pagination.pageStart}}-{{pagination.pageStop}}</span>
|
||||
@@ -89,7 +99,7 @@
|
||||
</v-card>
|
||||
<!-- <<<<<<<<<<<<< 页面内容 -->
|
||||
<!--编辑抽屉-->
|
||||
<v-navigation-drawer v-model="isViewDrawerShown" :permanent="isViewDrawerShown" fixed temporary right hide-overlay width="80%"
|
||||
<v-navigation-drawer v-model="isViewDrawerShown" v-click-outside="drawerClickOutside" fixed temporary right width="80%"
|
||||
class="elevation-24">
|
||||
<v-form v-if="isViewDrawerShown" ref="updateForm" lazy-validation>
|
||||
<!--抽屉标题-->
|
||||
@@ -117,7 +127,7 @@
|
||||
</div>
|
||||
|
||||
<!-- 帮助页抽屉 >>>>>>>>>>>>> -->
|
||||
<v-navigation-drawer v-model="isHelpPageDrawerShown" fixed temporary right width="80%" hide-overlay
|
||||
<v-navigation-drawer v-model="isHelpPageDrawerShown" v-click-outside="drawerClickOutside" fixed temporary right width="80%"
|
||||
class="elevation-24">
|
||||
<iframe style="border: 0" :src="`/${appInfo.appId}/pageDoc#taskHistory.md`" width="100%"
|
||||
height="100%"></iframe>
|
||||
|
||||
+12
-2
@@ -118,6 +118,16 @@
|
||||
<v-switch v-model="isTableZebraLineShown" hide-details class="mx-3 my-2" label="显示斑马纹" dense flat></v-switch>
|
||||
</v-menu>
|
||||
</template>
|
||||
<!--没有数据-->
|
||||
<template v-slot:loading>
|
||||
<div class="jh-no-data">数据加载中</div>
|
||||
</template>
|
||||
<template v-slot:no-data>
|
||||
<div class="jh-no-data">暂无数据</div>
|
||||
</template>
|
||||
<template v-slot:no-results>
|
||||
<div class="jh-no-data">暂无数据</div>
|
||||
</template>
|
||||
<!--表格底部右侧分页-->
|
||||
<template v-slot:footer.page-text="pagination">
|
||||
<span>{{pagination.pageStart}}-{{pagination.pageStop}}</span>
|
||||
@@ -127,7 +137,7 @@
|
||||
</v-card>
|
||||
<!-- <<<<<<<<<<<<< 页面内容 -->
|
||||
<!--编辑抽屉-->
|
||||
<v-navigation-drawer v-model="isSubmitDrawerShown" :permanent="isSubmitDrawerShown" fixed temporary right hide-overlay width="80%"
|
||||
<v-navigation-drawer v-model="isSubmitDrawerShown" v-click-outside="drawerClickOutside" fixed temporary right width="80%"
|
||||
class="elevation-24">
|
||||
<v-form v-if="isSubmitDrawerShown" ref="updateForm" lazy-validation>
|
||||
<!--抽屉标题-->
|
||||
@@ -168,7 +178,7 @@
|
||||
</div>
|
||||
|
||||
<!-- 帮助页抽屉 >>>>>>>>>>>>> -->
|
||||
<v-navigation-drawer v-model="isHelpPageDrawerShown" fixed temporary right width="80%" hide-overlay
|
||||
<v-navigation-drawer v-model="isHelpPageDrawerShown" v-click-outside="drawerClickOutside" fixed temporary right width="80%"
|
||||
class="elevation-24">
|
||||
<iframe style="border: 0" :src="`/${appInfo.appId}/pageDoc#todo.md`" width="100%"
|
||||
height="100%"></iframe>
|
||||
|
||||
@@ -49,19 +49,19 @@
|
||||
</v-text-field>
|
||||
</v-col>
|
||||
<v-col cols="12" sm="12" md="3" xl="3" class=" pb-3">
|
||||
<v-select class="cus-v-input mr-2" dense filled single-line color="success" prefix="审批模式:"
|
||||
v-model="editItem['mode']" :items="constantCollection.modeList" />
|
||||
<v-select class="cus-v-input mr-2" dense filled single-line color="success" prefix="审批模式:"
|
||||
v-model="editItem['mode']" :items="constantCollection.modeList" />
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card>
|
||||
|
||||
|
||||
<div class="pt-4 pb-4 text-h7">流程设置</div>
|
||||
<process-flow v-if="!loading" ref="processFlow" :data="editItem.workflowConfig" :user="constantCollection.userList"
|
||||
:group="constantCollection.groupList" :tpl="constantCollection.workflowFormList"
|
||||
:mode="editItem.mode">
|
||||
</process-flow>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- 页面loading 效果 -->
|
||||
<v-overlay :value="loading" absolute>
|
||||
<v-progress-circular
|
||||
@@ -71,7 +71,7 @@
|
||||
</v-overlay>
|
||||
|
||||
<!-- 帮助页抽屉 >>>>>>>>>>>>> -->
|
||||
<v-navigation-drawer v-model="isHelpPageDrawerShown" fixed temporary right width="80%" hide-overlay
|
||||
<v-navigation-drawer v-model="isHelpPageDrawerShown" v-click-outside="drawerClickOutside" fixed temporary right width="80%"
|
||||
class="elevation-24">
|
||||
<iframe style="border: 0" :src="`/${appInfo.appId}/pageDoc#workflowManagement.md`" width="100%"
|
||||
height="100%"></iframe>
|
||||
@@ -364,4 +364,4 @@
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
@@ -50,7 +50,7 @@
|
||||
<v-icon size="14" class="success--text">mdi-note-edit-outline</v-icon>申请
|
||||
</span>
|
||||
<span role="button" class="success--text jh-font-size-3 pr-2"
|
||||
@click="doUiAction('jumpUpdateWorkflow', item)">
|
||||
@click="doUiAction('jumpUpdateWorkflow', item)">
|
||||
<v-icon size="14" class="success--text">mdi-note-edit-outline</v-icon>编辑
|
||||
</span>
|
||||
</template>
|
||||
@@ -65,6 +65,16 @@
|
||||
<v-switch v-model="isTableZebraLineShown" hide-details class="mx-3 my-2" label="显示斑马纹" dense flat></v-switch>
|
||||
</v-menu>
|
||||
</template>
|
||||
<!--没有数据-->
|
||||
<template v-slot:loading>
|
||||
<div class="jh-no-data">数据加载中</div>
|
||||
</template>
|
||||
<template v-slot:no-data>
|
||||
<div class="jh-no-data">暂无数据</div>
|
||||
</template>
|
||||
<template v-slot:no-results>
|
||||
<div class="jh-no-data">暂无数据</div>
|
||||
</template>
|
||||
<!--表格底部右侧分页-->
|
||||
<template v-slot:footer.page-text="pagination">
|
||||
<span>{{pagination.pageStart}}-{{pagination.pageStop}}</span>
|
||||
@@ -75,8 +85,7 @@
|
||||
<!-- <<<<<<<<<<<<< 页面内容 -->
|
||||
</div>
|
||||
<!-- <<<<<<<<<<<<< 创建审批抽屉 -->
|
||||
<v-navigation-drawer v-model="isCreateDrawerShown" :permanent="isCreateDrawerShown" fixed temporary right width="80%"
|
||||
class="elevation-24">
|
||||
<v-navigation-drawer v-model="isCreateDrawerShown" v-click-outside="drawerClickOutside" fixed temporary right width="80%" class="elevation-24">
|
||||
<v-form v-if="isCreateDrawerShown" ref="createForm" lazy-validation>
|
||||
<!--抽屉标题-->
|
||||
<v-row>
|
||||
@@ -84,16 +93,16 @@
|
||||
</v-row>
|
||||
<!--抽屉表单主体-->
|
||||
<v-row class="mt-0 px-6">
|
||||
<v-col cols="12" sm="12" md="4" v-for="(item, index) in createFormList" :key="index">
|
||||
<v-col cols="12" sm="12" md="4" v-for="(item, index) in currentWorkflowForm" :key="index">
|
||||
<form-item :form-item="item"></form-item>
|
||||
</v-col>
|
||||
<v-col cols="12" sm="12" md="12">
|
||||
<span class="jh-input-label">审批流程 - 添加审批人</span>
|
||||
<v-row v-for="node in workflowPersonList">
|
||||
<v-col cols="2">
|
||||
<v-text-field class="cus-v-input " dense filled single-line hide-details v-model="node.label" disabled></v-text-field>
|
||||
<v-row v-for="workflowPersonItem in currentWorkflowPersonList">
|
||||
<v-col cols="12" xs="6" md="4">
|
||||
<v-text-field class="cus-v-input " dense filled single-line hide-details v-model="workflowPersonItem.label" disabled></v-text-field>
|
||||
</v-col>
|
||||
<v-col cols="4">
|
||||
<v-col cols="12" xs="6" md="4">
|
||||
<v-autocomplete
|
||||
class="cus-v-input mr-2"
|
||||
dense filled single-line clearable
|
||||
@@ -103,14 +112,12 @@
|
||||
multiple
|
||||
hide-details
|
||||
:rules="validationRules.requireRules"
|
||||
v-model="node.assignValue">
|
||||
|
||||
v-model="workflowPersonItem.assignValue">
|
||||
</v-autocomplete>
|
||||
</v-col>
|
||||
<v-col cols="4">
|
||||
<v-checkbox dense filled v-model="node.isNeedAllApproval" label="是否需要所有人审批" hide-details></v-checkbox>
|
||||
<v-col cols="12" xs="12" md="4" class="pt-xs-0">
|
||||
<v-checkbox class="ma-0" dense filled v-model="workflowPersonItem.isNeedAllApproval" label="是否需要所有人审批" hide-details></v-checkbox>
|
||||
</v-col>
|
||||
|
||||
</v-row>
|
||||
</v-col>
|
||||
</v-row>
|
||||
@@ -121,19 +128,15 @@
|
||||
</v-row>
|
||||
</v-form>
|
||||
<!--抽屉关闭按钮-->
|
||||
<v-btn elevation="0" color="success" fab absolute top left small tile class="drawer-close-float-btn"
|
||||
@click="isCreateDrawerShown = false">
|
||||
<v-btn elevation="0" color="success" fab absolute top left small tile class="drawer-close-float-btn" @click="isCreateDrawerShown = false">
|
||||
<v-icon>mdi-close</v-icon>
|
||||
</v-btn>
|
||||
</v-navigation-drawer>
|
||||
<!-- 创建审批抽屉 >>>>>>>>>>>>> -->
|
||||
|
||||
<!-- 帮助页抽屉 >>>>>>>>>>>>> -->
|
||||
<v-navigation-drawer v-model="isHelpPageDrawerShown" fixed temporary right width="80%" hide-overlay
|
||||
class="elevation-24">
|
||||
<iframe style="border: 0" :src="`/${appInfo.appId}/pageDoc#workflowManagement.md`" width="100%"
|
||||
height="100%"></iframe>
|
||||
|
||||
<v-navigation-drawer v-model="isHelpPageDrawerShown" v-click-outside="drawerClickOutside" fixed temporary right width="80%" class="elevation-24">
|
||||
<iframe style="border: 0" :src="`/${appInfo.appId}/pageDoc#workflowManagement.md`" width="100%" height="100%"></iframe>
|
||||
<v-btn elevation="0" color="success" fab absolute top left small tile class="drawer-close-float-btn"
|
||||
@click="isHelpPageDrawerShown = false">
|
||||
<v-icon>mdi-close</v-icon>
|
||||
@@ -188,6 +191,7 @@ new Vue({
|
||||
},
|
||||
isTableLoading: false,
|
||||
userList: [],
|
||||
tableDataFromBackend: [],
|
||||
tableData: [],
|
||||
headers: [
|
||||
{text: '操作', value: 'action', align: 'center', sortable: false, width: 120, class: 'fixed', cellClass: 'fixed'},
|
||||
@@ -199,13 +203,13 @@ new Vue({
|
||||
isTableZebraLineShown: true,
|
||||
|
||||
isCreateDrawerShown: false,
|
||||
createFormList: [],
|
||||
createItemWorkflowId: {},
|
||||
workflowPersonList: [],
|
||||
currentWorkflowForm: [],
|
||||
currentWorkflowId: {},
|
||||
currentWorkflowPersonList: [],
|
||||
},
|
||||
watch: {},
|
||||
created() {
|
||||
this.getTableData();
|
||||
this.doUiAction('getTableData');
|
||||
this.getUserList();
|
||||
},
|
||||
methods: {
|
||||
@@ -213,6 +217,7 @@ new Vue({
|
||||
switch (uiActionId) {
|
||||
case 'getTableData':
|
||||
await this.getTableData();
|
||||
await this.parseTableData();
|
||||
break;
|
||||
case 'startCreateWorkflow':
|
||||
await this.prepareCreateFormData(uiActionData);
|
||||
@@ -249,7 +254,12 @@ new Vue({
|
||||
}
|
||||
});
|
||||
|
||||
const rows = result.data.appData.resultData.rows;
|
||||
this.tableDataFromBackend = result.data.appData.resultData.rows;
|
||||
this.isTableLoading = false;
|
||||
},
|
||||
|
||||
async parseTableData() {
|
||||
const rows = _.cloneDeep(this.tableDataFromBackend);
|
||||
rows.forEach(row => {
|
||||
const workflowNodeList = JSON.parse(row.workflowConfig).nodeList;
|
||||
workflowNodeList.forEach(node => {
|
||||
@@ -258,9 +268,7 @@ new Vue({
|
||||
row.workflowPersonList = workflowNodeList.filter(node => node.id.includes('userTask-'));
|
||||
row.workflowForm = JSON.parse(row.workflowForm);
|
||||
});
|
||||
|
||||
this.tableData = rows;
|
||||
this.isTableLoading = false;
|
||||
},
|
||||
|
||||
async getUserList() {
|
||||
@@ -281,10 +289,11 @@ new Vue({
|
||||
|
||||
// ---------- <<<<<<<<<< 申请项目审核 --------
|
||||
async prepareCreateFormData(funObj) {
|
||||
console.log(funObj);
|
||||
const {workflowForm, workflowPersonList, workflowId} = funObj;
|
||||
this.createFormList = workflowForm;
|
||||
this.workflowPersonList = workflowPersonList;
|
||||
this.createItemWorkflowId = workflowId;
|
||||
this.currentWorkflowForm = workflowForm;
|
||||
this.currentWorkflowPersonList = workflowPersonList;
|
||||
this.currentWorkflowId = workflowId;
|
||||
},
|
||||
|
||||
async openCreateDrawer() {
|
||||
@@ -295,16 +304,18 @@ new Vue({
|
||||
throw new Error("请完善表单信息")
|
||||
}
|
||||
|
||||
this.workflowPersonList.forEach(workflowPerson => {
|
||||
if(!workflowPerson.assignValue) {
|
||||
workflowPerson.assignValue = [];
|
||||
this.currentWorkflowPersonList.forEach(workflowPersonItem => {
|
||||
if (!workflowPersonItem.assignValue) {
|
||||
workflowPersonItem.assignValue = [];
|
||||
}
|
||||
workflowPerson.assignValue = workflowPerson.assignValue.filter(userId => {
|
||||
return this.userList.find(user => user.userId === userId);
|
||||
workflowPersonItem.assignValue = workflowPersonItem.assignValue.filter(userId => {
|
||||
return this.userList.some(user => user.userId === userId);
|
||||
});
|
||||
workflowPerson.origin.properties.assignValue = workflowPerson.assignValue;
|
||||
if (workflowPerson.assignValue.length === 0) {
|
||||
window.vtoast.fail({message: `${workflowPerson.label}必填!`});
|
||||
if(!workflowPersonItem.origin) workflowPersonItem['origin'] = {};
|
||||
if(!workflowPersonItem.origin.properties) workflowPersonItem.origin['properties'] = {};
|
||||
workflowPersonItem.origin.properties.assignValue = workflowPersonItem.assignValue;
|
||||
if (workflowPersonItem.assignValue.length === 0) {
|
||||
window.vtoast.fail({message: `${workflowPersonItem.label}必填!`});
|
||||
throw new Error("[prepareValidate] 审批人 false");
|
||||
}
|
||||
});
|
||||
@@ -315,20 +326,21 @@ new Vue({
|
||||
}
|
||||
},
|
||||
prepareDoWorkItem() {
|
||||
console.log('create', this.createFormList);
|
||||
console.log('create', this.currentWorkflowForm);
|
||||
},
|
||||
|
||||
async doCreateWork() {
|
||||
await window.jhMask.show();
|
||||
await window.vtoast.loading("正在申请");
|
||||
await window.jianghuAxios({
|
||||
data: {
|
||||
appData: {
|
||||
pageId: 'workflowManagement',
|
||||
actionId: 'insertTask',
|
||||
actionData: {
|
||||
formItemList: this.createFormList,
|
||||
workflowId: this.createItemWorkflowId,
|
||||
workflowConfigCustom: JSON.stringify({nodeListOfUserTaskNode: this.workflowPersonList})
|
||||
formItemList: this.currentWorkflowForm,
|
||||
workflowId: this.currentWorkflowId,
|
||||
workflowConfigCustom: JSON.stringify({nodeListOfUserTaskNode: this.currentWorkflowPersonList})
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -337,8 +349,8 @@ new Vue({
|
||||
await window.vtoast.success("申请成功");
|
||||
},
|
||||
async closeCreateDrawer() {
|
||||
this.createFormList = null;
|
||||
this.createItemWorkflowId = null;
|
||||
this.currentWorkflowForm = null;
|
||||
this.currentWorkflowId = null;
|
||||
this.isCreateDrawerShown = false;
|
||||
},
|
||||
// ---------- 申请项目审核 >>>>>>>>>> --------
|
||||
|
||||
Reference in new issue
Block a user