审批处理样式处理
This commit is contained in:
1 parent
e751661fc9
commit
5f7e5a038f
3 files changed
+262
-127
No files matched your search
@@ -1,41 +1,55 @@
|
||||
<!-- taskHistory.html >>>>>>>>>>>>> -->
|
||||
<script type="text/html" id="task-history">
|
||||
<div>
|
||||
<v-data-table
|
||||
:headers="headers"
|
||||
:items="tableData"
|
||||
:items-per-page="-1"
|
||||
mobile-breakpoint="0"
|
||||
:loading="isTableLoading"
|
||||
checkbox-color="success"
|
||||
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 }">
|
||||
<template v-if="item.taskConfigId.includes('userTask-')">
|
||||
<v-chip :color="item.taskHandleDesc === '拒绝' ? 'red' : 'green'" x-small dark>
|
||||
{{item.taskExplain}}:{{item.taskHandleDesc}}
|
||||
</v-chip>
|
||||
</template>
|
||||
<template v-else>
|
||||
<v-chip color="grey lighten-1" x-small dark>
|
||||
{{item.taskHandleDesc}}
|
||||
</v-chip>
|
||||
</template>
|
||||
<!-- <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">
|
||||
<template v-if="nodeItem.nodeStatus == '已同意'">
|
||||
<v-icon v-if="nodeItem.id.startsWith('approvalTask')" color="#4caf50">mdi-account-circle</v-icon>
|
||||
<v-icon v-if="nodeItem.id.startsWith('noticeTask')" color="#4caf50">mdi-send-circle</v-icon>
|
||||
</template>
|
||||
<template v-if="nodeItem.nodeStatus == '已拒绝'">
|
||||
<v-icon v-if="nodeItem.id.startsWith('approvalTask')" color="#f4807b">mdi-account-circle</v-icon>
|
||||
<v-icon v-if="nodeItem.id.startsWith('noticeTask')" color="#f4807b">mdi-send-circle</v-icon>
|
||||
</template>
|
||||
<template v-if="nodeItem.nodeStatus == '审批中'">
|
||||
<v-icon v-if="nodeItem.id.startsWith('approvalTask')" color="#cdcfd1">mdi-account-circle</v-icon>
|
||||
<v-icon v-if="nodeItem.id.startsWith('noticeTask')" color="#cdcfd1">mdi-send-circle</v-icon>
|
||||
</template>
|
||||
<div v-if="nodeIndex < workflowHistory.length - 1" class="vertical-line" :style="{ borderColor: nodeItem['nodeStatus'] === '已同意' ? '#4caf50' : '#cdcfd1' }"></div>
|
||||
</div>
|
||||
<div class="node-box-item">
|
||||
<div class="node-label font-weight-bold">
|
||||
{{nodeItem.label}}
|
||||
<template v-if="nodeItem.approvalType && (nodeItem.nodeStatus != '审批中' || nodeItem.id == taskConfigId)"> · {{nodeItem.nodeStatus}}</template>
|
||||
<v-chip class="ml-1 px-1 py-2" x-small v-if="nodeItem.approvalType" label outlined color="#4caf50">
|
||||
{{nodeItem.approvalType}}
|
||||
</v-chip>
|
||||
</div>
|
||||
<div class="node-user-box">
|
||||
<template v-for="(user, index) in nodeItem.userList" :key="index">
|
||||
<div class="user-box-item d-flex align-center mt-2" >
|
||||
<div class="text-center">
|
||||
<span class="ml-1">{{user.username}}</span>
|
||||
</div>
|
||||
<div class="d-flex align-center ml-4" v-if="nodeItem.id.startsWith('approvalTask') && user.handleDesc">
|
||||
<v-icon v-if="user.handleDesc == '同意'" size="16" color="green">mdi-check-circle-outline</v-icon>
|
||||
<v-icon v-if="user.handleDesc == '拒绝'" size="16" color="red">mdi-close-circle-outline</v-icon>
|
||||
<span class="ml-1">已{{user.handleDesc}} · {{user.createHistoryAt}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="user.comment" class="user-box-comment">
|
||||
{{user.comment}}
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
</v-data-table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</script>
|
||||
|
||||
@@ -49,17 +63,21 @@
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
taskConfigId: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
workflowConfig: {
|
||||
type: Object,
|
||||
default: ()=>{
|
||||
return {}
|
||||
},
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isTableLoading: false,
|
||||
headers: [
|
||||
{text: "名称", value: "taskTitle", width: 230, class: 'fixed', cellClass: 'fixed'},
|
||||
{text: "节点说明", value: "taskHandleDesc", width: 120},
|
||||
{text: "操作人", value: "operationByUser", width: 120},
|
||||
{text: "操作时间", value: "operationAt", width: 250},
|
||||
],
|
||||
tableData: [],
|
||||
workflowHistory: [],
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
@@ -75,21 +93,16 @@
|
||||
// ---------- 获取列表 >>>>>>>>>> --------
|
||||
async getTableData() {
|
||||
this.isTableLoading = true;
|
||||
const result = await window.jianghuAxios({
|
||||
const resultData = (await window.jianghuAxios({
|
||||
data: {
|
||||
appData: {
|
||||
pageId: 'todo',
|
||||
actionId: 'getTaskHistory',
|
||||
actionId: 'getTaskWorkflow',
|
||||
actionData: {taskId: this.taskId},
|
||||
}
|
||||
}
|
||||
})
|
||||
const {taskHistoryList, lineTypeList} = result.data.appData.resultData;
|
||||
taskHistoryList.forEach(task => {
|
||||
task.operationAt = task.taskStatus != 'end' ? dayjs(task.operationAt).format('YYYY-MM-DD HH:mm:ss') : ''
|
||||
})
|
||||
this.tableData = taskHistoryList;
|
||||
this.$emit('line-type-list', lineTypeList);
|
||||
})).data.appData.resultData
|
||||
this.workflowHistory = resultData
|
||||
this.isTableLoading = false;
|
||||
},
|
||||
// ---------- <<<<<<<<<< 获取列表 --------
|
||||
@@ -98,5 +111,40 @@
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.history-box{
|
||||
padding: 5px 16px;
|
||||
}
|
||||
|
||||
.node-user-box .user-box-comment{
|
||||
position:relative;
|
||||
margin-top: 10px;
|
||||
padding: 2px;
|
||||
border: 1px solid #4caf50;
|
||||
border-radius: 1%;
|
||||
}
|
||||
|
||||
.node-user-box .user-box-comment::before{
|
||||
content: "";
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border: solid #4caf50;
|
||||
border-width: 1px 0 0 1px;
|
||||
position: absolute;
|
||||
transform: translate(-50%, -50%) rotate(45deg);
|
||||
left: 12px;
|
||||
top: 0;
|
||||
background: linear-gradient(to right bottom, white 50%, transparent 50%);
|
||||
}
|
||||
|
||||
.node-box .node-box-item{
|
||||
margin: 2px 8px;
|
||||
}
|
||||
|
||||
.node-box-stepper .vertical-line {
|
||||
height: 80%;
|
||||
width: 0px;
|
||||
margin: 0 auto 1px;
|
||||
border: #cdcfd1 solid 1px;
|
||||
}
|
||||
</style>
|
||||
<!-- <<<<<<<<<<<<< taskHistory.html -->
|
||||
Reference in new issue
Block a user