调整代码
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 >>>>>>>>>>>>> -->
|
||||
<script type="text/html" id="task-history">
|
||||
<div>
|
||||
<!-- <div>111---{{taskId}}</div> -->
|
||||
<div class="history-box">
|
||||
<div class="node-box d-flex mb-2" v-for="(nodeItem, nodeIndex) in workflowHistory" :key="nodeIndex">
|
||||
<div class="node-box-stepper">
|
||||
@@ -59,53 +58,25 @@
|
||||
vueComponent: 'task-history',
|
||||
vuetify: new Vuetify(),
|
||||
props: {
|
||||
taskId: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
taskConfigId: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
workflowConfig: {
|
||||
type: Object,
|
||||
workflowHistory: {
|
||||
type: Array,
|
||||
default: ()=>{
|
||||
return {}
|
||||
return []
|
||||
},
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isTableLoading: false,
|
||||
workflowHistory: [],
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
taskId: {
|
||||
handler(val, oldVal) {
|
||||
if (!val) return;
|
||||
this.getTableData();
|
||||
},
|
||||
immediate: true,
|
||||
},
|
||||
},
|
||||
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-col cols="12" sm="12" md="12">
|
||||
<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-row>
|
||||
|
||||
@@ -165,7 +165,7 @@
|
||||
<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%"
|
||||
<iframe style="border: 0" :src="`/${appInfo.appId}/pageDoc#approvalManagement.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">
|
||||
@@ -241,7 +241,8 @@
|
||||
updateItem: {},
|
||||
updateItemId: null,
|
||||
|
||||
isSubmitNodeLoading: false
|
||||
isSubmitNodeLoading: false,
|
||||
workflowHistory:[]
|
||||
|
||||
},
|
||||
// 计算
|
||||
@@ -266,6 +267,7 @@
|
||||
break;
|
||||
case 'startUpdateItem':
|
||||
await this.prepareUpdateFormData(uiActionData);
|
||||
await this.getTaskWorkflow(uiActionData)
|
||||
await this.openUpdateDrawer();
|
||||
break;
|
||||
case 'submitNode':
|
||||
@@ -287,7 +289,7 @@
|
||||
const result = await window.jianghuAxios({
|
||||
data: {
|
||||
appData: {
|
||||
pageId: 'todo',
|
||||
pageId: 'approvalManagement',
|
||||
actionId: 'selectItemList',
|
||||
actionData: {},
|
||||
}
|
||||
@@ -301,7 +303,7 @@
|
||||
const result = await window.jianghuAxios({
|
||||
data: {
|
||||
appData: {
|
||||
pageId: 'todo',
|
||||
pageId: 'approvalManagement',
|
||||
actionId: 'selectHistoryList',
|
||||
actionData: {},
|
||||
whereLike: { createHistoryBy: '<$ ctx.userInfo.userId $>', taskConfigId: 'approvalTask-' },
|
||||
@@ -329,6 +331,19 @@
|
||||
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() {
|
||||
this.isSubmitDrawerShown = true;
|
||||
},
|
||||
@@ -352,7 +367,7 @@
|
||||
await window.jianghuAxios({
|
||||
data: {
|
||||
appData: {
|
||||
pageId: 'todo',
|
||||
pageId: 'approvalManagement',
|
||||
actionId: 'submitNode',
|
||||
actionData: {
|
||||
updateItem: this.updateItem,
|
||||
@@ -118,7 +118,7 @@
|
||||
<v-row class="mt-4" v-if="isViewDrawerShown" >
|
||||
<v-col cols="12" sm="12" md="12">
|
||||
<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-row>
|
||||
|
||||
@@ -204,7 +204,8 @@
|
||||
'已拒绝': 'red',
|
||||
'审核中': 'blue',
|
||||
"已撤回": 'grey'
|
||||
}
|
||||
},
|
||||
workflowHistory:[]
|
||||
},
|
||||
// 计算
|
||||
computed: {
|
||||
@@ -226,6 +227,7 @@
|
||||
break;
|
||||
case 'startUpdateItem':
|
||||
await this.prepareViewItemData(uiActionData);
|
||||
await this.getTaskWorkflow(uiActionData)
|
||||
await this.openViewDrawer();
|
||||
break;
|
||||
case 'revokeTask':
|
||||
@@ -278,6 +280,19 @@
|
||||
async prepareViewItemData(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() {
|
||||
this.isViewDrawerShown = true;
|
||||
|
||||
Reference in new issue
Block a user