调整代码
This commit is contained in:
1 parent
b2df7f1fb6
commit
12bbc3dade
3 files changed
+41
-40
No files matched your search
@@ -1,7 +1,6 @@
|
|||||||
<!-- taskHistory.html >>>>>>>>>>>>> -->
|
<!-- taskHistory.html >>>>>>>>>>>>> -->
|
||||||
<script type="text/html" id="task-history">
|
<script type="text/html" id="task-history">
|
||||||
<div>
|
<div>
|
||||||
<!-- <div>111---{{taskId}}</div> -->
|
|
||||||
<div class="history-box">
|
<div class="history-box">
|
||||||
<div class="node-box d-flex mb-2" v-for="(nodeItem, nodeIndex) in workflowHistory" :key="nodeIndex">
|
<div class="node-box d-flex mb-2" v-for="(nodeItem, nodeIndex) in workflowHistory" :key="nodeIndex">
|
||||||
<div class="node-box-stepper">
|
<div class="node-box-stepper">
|
||||||
@@ -59,53 +58,25 @@
|
|||||||
vueComponent: 'task-history',
|
vueComponent: 'task-history',
|
||||||
vuetify: new Vuetify(),
|
vuetify: new Vuetify(),
|
||||||
props: {
|
props: {
|
||||||
taskId: {
|
|
||||||
type: String,
|
|
||||||
default: '',
|
|
||||||
},
|
|
||||||
taskConfigId: {
|
taskConfigId: {
|
||||||
type: String,
|
type: String,
|
||||||
default: '',
|
default: '',
|
||||||
},
|
},
|
||||||
workflowConfig: {
|
workflowHistory: {
|
||||||
type: Object,
|
type: Array,
|
||||||
default: ()=>{
|
default: ()=>{
|
||||||
return {}
|
return []
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
isTableLoading: false,
|
isTableLoading: false,
|
||||||
workflowHistory: [],
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
taskId: {
|
|
||||||
handler(val, oldVal) {
|
|
||||||
if (!val) return;
|
|
||||||
this.getTableData();
|
|
||||||
},
|
|
||||||
immediate: true,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// ---------- 获取列表 >>>>>>>>>> --------
|
|
||||||
async getTableData() {
|
|
||||||
this.isTableLoading = true;
|
|
||||||
const resultData = (await window.jianghuAxios({
|
|
||||||
data: {
|
|
||||||
appData: {
|
|
||||||
pageId: 'todo',
|
|
||||||
actionId: 'getTaskWorkflow',
|
|
||||||
actionData: {taskId: this.taskId},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})).data.appData.resultData
|
|
||||||
this.workflowHistory = resultData
|
|
||||||
this.isTableLoading = false;
|
|
||||||
},
|
|
||||||
// ---------- <<<<<<<<<< 获取列表 --------
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -149,7 +149,7 @@
|
|||||||
<v-row class="mt-4">
|
<v-row class="mt-4">
|
||||||
<v-col cols="12" sm="12" md="12">
|
<v-col cols="12" sm="12" md="12">
|
||||||
<div class="text-subtitle-2 mb-2 mx-4 font-weight-bold">审批流程</div>
|
<div class="text-subtitle-2 mb-2 mx-4 font-weight-bold">审批流程</div>
|
||||||
<task-history :workflow-config="updateItem.taskWorkflow" :task-id="updateItem.taskId" :task-config-id="updateItem.taskConfigId"></task-history>
|
<task-history :workflow-history="workflowHistory" :task-config-id="updateItem.taskConfigId"></task-history>
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
|
|
||||||
@@ -165,7 +165,7 @@
|
|||||||
<v-navigation-drawer
|
<v-navigation-drawer
|
||||||
v-model="isHelpPageDrawerShown" v-click-outside="drawerClickOutside" fixed temporary right width="80%"
|
v-model="isHelpPageDrawerShown" v-click-outside="drawerClickOutside" fixed temporary right width="80%"
|
||||||
class="elevation-24">
|
class="elevation-24">
|
||||||
<iframe style="border: 0" :src="`/${appInfo.appId}/pageDoc#todo.md`" width="100%"
|
<iframe style="border: 0" :src="`/${appInfo.appId}/pageDoc#approvalManagement.md`" width="100%"
|
||||||
height="100%"></iframe>
|
height="100%"></iframe>
|
||||||
<v-btn elevation="0" color="success" fab absolute top left small tile class="drawer-close-float-btn"
|
<v-btn elevation="0" color="success" fab absolute top left small tile class="drawer-close-float-btn"
|
||||||
@click="isHelpPageDrawerShown = false">
|
@click="isHelpPageDrawerShown = false">
|
||||||
@@ -241,7 +241,8 @@
|
|||||||
updateItem: {},
|
updateItem: {},
|
||||||
updateItemId: null,
|
updateItemId: null,
|
||||||
|
|
||||||
isSubmitNodeLoading: false
|
isSubmitNodeLoading: false,
|
||||||
|
workflowHistory:[]
|
||||||
|
|
||||||
},
|
},
|
||||||
// 计算
|
// 计算
|
||||||
@@ -266,6 +267,7 @@
|
|||||||
break;
|
break;
|
||||||
case 'startUpdateItem':
|
case 'startUpdateItem':
|
||||||
await this.prepareUpdateFormData(uiActionData);
|
await this.prepareUpdateFormData(uiActionData);
|
||||||
|
await this.getTaskWorkflow(uiActionData)
|
||||||
await this.openUpdateDrawer();
|
await this.openUpdateDrawer();
|
||||||
break;
|
break;
|
||||||
case 'submitNode':
|
case 'submitNode':
|
||||||
@@ -287,7 +289,7 @@
|
|||||||
const result = await window.jianghuAxios({
|
const result = await window.jianghuAxios({
|
||||||
data: {
|
data: {
|
||||||
appData: {
|
appData: {
|
||||||
pageId: 'todo',
|
pageId: 'approvalManagement',
|
||||||
actionId: 'selectItemList',
|
actionId: 'selectItemList',
|
||||||
actionData: {},
|
actionData: {},
|
||||||
}
|
}
|
||||||
@@ -301,7 +303,7 @@
|
|||||||
const result = await window.jianghuAxios({
|
const result = await window.jianghuAxios({
|
||||||
data: {
|
data: {
|
||||||
appData: {
|
appData: {
|
||||||
pageId: 'todo',
|
pageId: 'approvalManagement',
|
||||||
actionId: 'selectHistoryList',
|
actionId: 'selectHistoryList',
|
||||||
actionData: {},
|
actionData: {},
|
||||||
whereLike: { createHistoryBy: '<$ ctx.userInfo.userId $>', taskConfigId: 'approvalTask-' },
|
whereLike: { createHistoryBy: '<$ ctx.userInfo.userId $>', taskConfigId: 'approvalTask-' },
|
||||||
@@ -329,6 +331,19 @@
|
|||||||
this.updateItem.taskComment = ''; // 备注
|
this.updateItem.taskComment = ''; // 备注
|
||||||
},
|
},
|
||||||
|
|
||||||
|
async getTaskWorkflow({ taskId }){
|
||||||
|
const resultData = (await window.jianghuAxios({
|
||||||
|
data: {
|
||||||
|
appData: {
|
||||||
|
pageId: 'approvalManagement',
|
||||||
|
actionId: 'getTaskWorkflow',
|
||||||
|
actionData: {taskId},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})).data.appData.resultData
|
||||||
|
this.workflowHistory = resultData
|
||||||
|
},
|
||||||
|
|
||||||
async openUpdateDrawer() {
|
async openUpdateDrawer() {
|
||||||
this.isSubmitDrawerShown = true;
|
this.isSubmitDrawerShown = true;
|
||||||
},
|
},
|
||||||
@@ -352,7 +367,7 @@
|
|||||||
await window.jianghuAxios({
|
await window.jianghuAxios({
|
||||||
data: {
|
data: {
|
||||||
appData: {
|
appData: {
|
||||||
pageId: 'todo',
|
pageId: 'approvalManagement',
|
||||||
actionId: 'submitNode',
|
actionId: 'submitNode',
|
||||||
actionData: {
|
actionData: {
|
||||||
updateItem: this.updateItem,
|
updateItem: this.updateItem,
|
||||||
@@ -118,7 +118,7 @@
|
|||||||
<v-row class="mt-4" v-if="isViewDrawerShown" >
|
<v-row class="mt-4" v-if="isViewDrawerShown" >
|
||||||
<v-col cols="12" sm="12" md="12">
|
<v-col cols="12" sm="12" md="12">
|
||||||
<div class="text-subtitle-2 mb-2 mx-4 font-weight-bold">历史审核记录</div>
|
<div class="text-subtitle-2 mb-2 mx-4 font-weight-bold">历史审核记录</div>
|
||||||
<task-history :task-id="viewItem.taskId"></task-history>
|
<task-history :task-id="viewItem.taskId" :workflow-history="workflowHistory"></task-history>
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
|
|
||||||
@@ -204,7 +204,8 @@
|
|||||||
'已拒绝': 'red',
|
'已拒绝': 'red',
|
||||||
'审核中': 'blue',
|
'审核中': 'blue',
|
||||||
"已撤回": 'grey'
|
"已撤回": 'grey'
|
||||||
}
|
},
|
||||||
|
workflowHistory:[]
|
||||||
},
|
},
|
||||||
// 计算
|
// 计算
|
||||||
computed: {
|
computed: {
|
||||||
@@ -226,6 +227,7 @@
|
|||||||
break;
|
break;
|
||||||
case 'startUpdateItem':
|
case 'startUpdateItem':
|
||||||
await this.prepareViewItemData(uiActionData);
|
await this.prepareViewItemData(uiActionData);
|
||||||
|
await this.getTaskWorkflow(uiActionData)
|
||||||
await this.openViewDrawer();
|
await this.openViewDrawer();
|
||||||
break;
|
break;
|
||||||
case 'revokeTask':
|
case 'revokeTask':
|
||||||
@@ -279,6 +281,19 @@
|
|||||||
this.viewItem = _.cloneDeep(funObj);
|
this.viewItem = _.cloneDeep(funObj);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
async getTaskWorkflow({ taskId }){
|
||||||
|
const resultData = (await window.jianghuAxios({
|
||||||
|
data: {
|
||||||
|
appData: {
|
||||||
|
pageId: 'taskManagement',
|
||||||
|
actionId: 'getTaskWorkflow',
|
||||||
|
actionData: { taskId },
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})).data.appData.resultData
|
||||||
|
this.workflowHistory = resultData
|
||||||
|
},
|
||||||
|
|
||||||
async openViewDrawer() {
|
async openViewDrawer() {
|
||||||
this.isViewDrawerShown = true;
|
this.isViewDrawerShown = true;
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in new issue
Block a user