review todo.html
This commit is contained in:
1 parent
14cfbf118d
commit
744c55bbf8
1 file changed
+36
-73
+36
-73
@@ -3,7 +3,7 @@
|
||||
{% block vueTemplate %}
|
||||
|
||||
<script type="text/html" id="app-template">
|
||||
<div>
|
||||
<div>
|
||||
<v-app mobile-breakpoint="sm">
|
||||
<jh-menu />
|
||||
<v-main class="mt-15">
|
||||
@@ -30,23 +30,13 @@
|
||||
color="success"
|
||||
>
|
||||
<v-btn value="todo" small class="jh-backend-search-btn">
|
||||
<v-badge
|
||||
v-if="tableData.length"
|
||||
inline
|
||||
:content="tableData.length"
|
||||
color="warning"
|
||||
>
|
||||
<v-badge v-if="tableData.length" inline :content="tableData.length" color="warning">
|
||||
<span class="">待处理</span>
|
||||
</v-badge>
|
||||
<span v-else class="">待处理</span>
|
||||
</v-btn>
|
||||
<v-btn value="history" small class="jh-backend-search-btn">
|
||||
<v-badge
|
||||
v-if="historyData.length"
|
||||
inline
|
||||
:content="historyData.length"
|
||||
color="grey darken-3"
|
||||
>
|
||||
<v-badge v-if="historyData.length" inline :content="historyData.length" color="grey darken-3">
|
||||
<span class="">已处理</span>
|
||||
</v-badge>
|
||||
<span v-else class="">已处理</span>
|
||||
@@ -55,8 +45,7 @@
|
||||
</v-col>
|
||||
<!--搜索-->
|
||||
<v-col cols="12" xs="8" sm="4" md="3" xl="2" class="pa-0">
|
||||
<v-text-field v-model="searchInput" color="success" prefix="搜索:" class="jh-v-input" dense filled hide-details
|
||||
single-line></v-text-field>
|
||||
<v-text-field v-model="searchInput" color="success" prefix="搜索:" class="jh-v-input" dense filled hide-details single-line></v-text-field>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<!--表格-->
|
||||
@@ -72,27 +61,16 @@
|
||||
checkbox-color="success"
|
||||
fixed-header
|
||||
class="jh-fixed-table-height elevation-0 mt-0 mb-xs-4">
|
||||
|
||||
<template v-slot:item.taskTitle="{ item }">
|
||||
<span>{{item.taskTitle}}</span>
|
||||
<span v-if="workflowType != 'todo'">
|
||||
<v-chip
|
||||
v-if="item.taskHandleDesc === '拒绝'"
|
||||
color="red"
|
||||
small
|
||||
dark
|
||||
>
|
||||
<template v-if="workflowType != 'todo'">
|
||||
<v-chip v-if="item.taskHandleDesc === '拒绝'" color="red" x-small dark>
|
||||
已{{item.taskHandleDesc}}
|
||||
</v-chip>
|
||||
<v-chip
|
||||
v-else
|
||||
color="green"
|
||||
small
|
||||
dark
|
||||
>
|
||||
<v-chip v-else color="green" x-small dark>
|
||||
已{{item.taskHandleDesc}}
|
||||
</v-chip>
|
||||
</span>
|
||||
</template>
|
||||
</template>
|
||||
<!--表格行操作按钮-->
|
||||
<template v-slot:item.action="{ item }">
|
||||
@@ -137,8 +115,7 @@
|
||||
</v-card>
|
||||
<!-- <<<<<<<<<<<<< 页面内容 -->
|
||||
<!--编辑抽屉-->
|
||||
<v-navigation-drawer v-model="isSubmitDrawerShown" v-click-outside="drawerClickOutside" fixed temporary right width="80%"
|
||||
class="elevation-24">
|
||||
<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>
|
||||
<!--抽屉标题-->
|
||||
<v-row>
|
||||
@@ -146,19 +123,20 @@
|
||||
</v-row>
|
||||
<!--抽屉表单-->
|
||||
<v-row class="mt-0 px-6">
|
||||
<v-col cols="12" sm="12" md="4" v-for="(item, index) in updateItem.taskFormInput.formList" :key="index">
|
||||
<form-item :form-item="item" readonly></form-item>
|
||||
<v-col cols="12" sm="12" md="4" v-for="(formItem, index) in updateItem.taskFormInput.formList" :key="index">
|
||||
<form-item :form-item="formItem" readonly></form-item>
|
||||
</v-col>
|
||||
<v-col cols="12" sm="12" md="12">
|
||||
<span class="jh-input-label">备注</span>
|
||||
<v-textarea class="jh-v-input" no-resize dense single-line filled
|
||||
<v-textarea
|
||||
class="jh-v-input" no-resize dense single-line filled
|
||||
v-model="updateItem.taskComment" :readonly="workflowType != 'todo'"></v-textarea>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<!--抽屉操作按钮-->
|
||||
<v-row class="justify-end mx-0 mt-8 px-6">
|
||||
<v-btn color="success" class="mx-4" v-for="item in lineTypeList" v-if="item.type" @click="doUiAction('submitNode', item.type)">
|
||||
{{ item.type }}
|
||||
<v-btn color="success" small class="ml-4" v-for="lineTypeItem in lineTypeList" v-if="lineTypeItem.type" @click="doUiAction('submitNode', lineTypeItem.type)">
|
||||
{{ lineTypeItem.type }}
|
||||
</v-btn>
|
||||
</v-row>
|
||||
<v-row class="mt-0 px-6">
|
||||
@@ -178,11 +156,11 @@
|
||||
</div>
|
||||
|
||||
<!-- 帮助页抽屉 >>>>>>>>>>>>> -->
|
||||
<v-navigation-drawer v-model="isHelpPageDrawerShown" v-click-outside="drawerClickOutside" fixed temporary right width="80%"
|
||||
<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>
|
||||
|
||||
<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>
|
||||
@@ -197,7 +175,7 @@
|
||||
<jh-mask />
|
||||
<jh-confirm-dialog />
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<div id="app">
|
||||
@@ -214,7 +192,7 @@
|
||||
<!-- <<<<<<<<<<<<< 加载页面组件 -->
|
||||
|
||||
<script type="module">
|
||||
new Vue({
|
||||
new Vue({
|
||||
el: '#app',
|
||||
template: '#app-template',
|
||||
vueComponent: 'page',
|
||||
@@ -222,14 +200,8 @@
|
||||
data: {
|
||||
// 面包屑
|
||||
breadcrumbs: [
|
||||
{
|
||||
text: '首页',
|
||||
disabled: true,
|
||||
},
|
||||
{
|
||||
text: '待办、已处理的任务',
|
||||
disabled: true,
|
||||
}
|
||||
{text: '首页', disabled: true,},
|
||||
{text: '待办、已处理的任务', disabled: true,}
|
||||
],
|
||||
isHelpPageDrawerShown: false,
|
||||
|
||||
@@ -246,10 +218,10 @@
|
||||
tableData: [],
|
||||
historyData: [],
|
||||
headers: [
|
||||
{ text: '操作', value: 'action', align: 'center', sortable: false, width: 120, class: 'fixed', cellClass: 'fixed' },
|
||||
{ text: "审批项", value: "taskTitle" },
|
||||
{ text: "操作者", value: "operationByUser", width: 120 },
|
||||
{ text: "操作时间", value: "operationAt", width: 250 }
|
||||
{text: '操作', value: 'action', align: 'center', sortable: false, width: 80, class: 'fixed', cellClass: 'fixed'},
|
||||
{text: "审批项", value: "taskTitle"},
|
||||
{text: "操作者", value: "operationByUser", width: 120},
|
||||
{text: "操作时间", value: "operationAt", width: 250}
|
||||
],
|
||||
|
||||
isSubmitDrawerShown: false,
|
||||
@@ -264,8 +236,7 @@
|
||||
return this.workflowType === 'todo' ? this.tableData : this.historyData;
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
},
|
||||
watch: {},
|
||||
mounted() {
|
||||
this.doUiAction('getTableData');
|
||||
this.doUiAction('getHistoryData');
|
||||
@@ -287,7 +258,7 @@
|
||||
await this.openUpdateDrawer();
|
||||
break;
|
||||
case 'submitNode':
|
||||
await this.confirmSumitDialog();
|
||||
await this.confirmSubmitDialog();
|
||||
await this.submitForReview(uiActionData);
|
||||
await this.closeSubmitDrawer();
|
||||
await this.clearSubmitData();
|
||||
@@ -295,7 +266,7 @@
|
||||
this.getHistoryData();
|
||||
break;
|
||||
default:
|
||||
console.error("[doUiAction] uiActionId not find", { uiActionId });
|
||||
console.error("[doUiAction] uiActionId not find", {uiActionId});
|
||||
break;
|
||||
}
|
||||
},
|
||||
@@ -310,7 +281,7 @@
|
||||
actionData: {},
|
||||
where: {taskStatus: 'running'},
|
||||
whereLike: {taskEditUserList: this.userId},
|
||||
orderBy: [{ column: 'operationAt', order: 'desc' }]
|
||||
orderBy: [{column: 'operationAt', order: 'desc'}]
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -333,7 +304,7 @@
|
||||
actionData: {},
|
||||
where: {taskStatus: 'running'},
|
||||
whereLike: {taskEditUserList: '<$ ctx.userInfo.userId $>', taskConfigId: 'userTask-'},
|
||||
orderBy: [{ column: 'id', order: 'desc' }]
|
||||
orderBy: [{column: 'id', order: 'desc'}]
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -361,42 +332,34 @@
|
||||
this.isSubmitDrawerShown = true;
|
||||
},
|
||||
|
||||
async confirmSumitDialog() {
|
||||
async confirmSubmitDialog() {
|
||||
if (await window.confirmDialog({title: "审核", content: "确定提交审核吗?"}) === false) {
|
||||
throw new Error("[confirmSumitDialog] 否");
|
||||
throw new Error("[confirmSubmitDialog] 否");
|
||||
}
|
||||
},
|
||||
|
||||
async clearSubmitData() {
|
||||
this.updateItem = {};
|
||||
},
|
||||
async submitForReview(type) {
|
||||
async submitForReview(lineType) {
|
||||
await window.vtoast.loading("提交审核");
|
||||
await window.jianghuAxios({
|
||||
data: {
|
||||
appData: {
|
||||
pageId: 'todo',
|
||||
actionId: 'submitNode',
|
||||
actionData: {type, id: this.updateItem.id, taskId: this.updateItem.taskId, taskComment: this.updateItem.taskComment}
|
||||
actionData: {type: lineType, id: this.updateItem.id, taskId: this.updateItem.taskId, taskComment: this.updateItem.taskComment}
|
||||
}
|
||||
}
|
||||
})
|
||||
await window.vtoast.success("提交审核成功");
|
||||
setTimeout(()=> {
|
||||
this.$emit('close-detail-drawer')
|
||||
// if (document.referrer) {
|
||||
// location.href = document.referrer;
|
||||
// } else {
|
||||
// history.back();
|
||||
// }
|
||||
}, 1000);
|
||||
},
|
||||
setLineTypeList(lineTypeList) {
|
||||
this.lineTypeList = _.uniqBy((lineTypeList||'').split(",").map(lineType => ({type: lineType, label: lineType})), 'type');
|
||||
this.lineTypeList = _.uniqBy((lineTypeList || '').split(",").map(lineType => ({type: lineType, label: lineType})), 'type');
|
||||
},
|
||||
// ---------- <<<<<<<<<<< 审核、查看 uiAction --------
|
||||
}
|
||||
})
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
Reference in new issue
Block a user