Skip to content

Commit

Permalink
1.6.132 20241021
Browse files Browse the repository at this point in the history
1 审批中心添加审批过的页面。
2 实体详情添加撤回审批
  • Loading branch information
wangraoji committed Oct 21, 2024
1 parent d61f8de commit 3ce6be6
Show file tree
Hide file tree
Showing 9 changed files with 164 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/components/mlEntityMenuAndList/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ const getApprovalList = async () => {
}
if (defaultCode.value != "all") {
param.filter.items.push({
fieldName,
fieldName: props.entityName == 'ApprovalTask' ? 'approvalConfigId.entityCode' : 'entityCode',
op: "EQ",
value: defaultCode.value,
});
Expand Down
6 changes: 6 additions & 0 deletions src/config/route.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,12 @@ const routes = [
component: 'system/approval-center/center-cc',
meta: { title: '抄送我的', hidden: true }
},
{
path: `/web/center-approved`,
name: 'CenterApproved',
component: 'system/approval-center/center-approved',
meta: { title: '审批过的', hidden: true }
},
]
},
// 数据导入
Expand Down
75 changes: 73 additions & 2 deletions src/layout/components/setMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
</span>
</div>
</div>

<!-- 二级菜单 -->
<VueDraggableNext
ghost-class="subghost"
chosen-class="subchosenClass"
Expand Down Expand Up @@ -119,6 +119,14 @@
{{ child.name }}
</div>
<div class="action-icon">
<span
class="icon-span add-icon mr-5"
@click.stop="addChildrenMenu(child)"
>
<el-icon size="16">
<ElIconCloseBold />
</el-icon>
</span>
<span
class="icon-span"
@click.stop="
Expand All @@ -130,7 +138,58 @@
</el-icon>
</span>
</div>
<!-- 三级菜单 -->
<VueDraggableNext
ghost-class="subghost2"
chosen-class="subchosenClass2"
animation="300"
:force-fallback="false"
handle=".submover"
:list="child.children"
>
<div
class="child2-div"
v-for="(child2, subInx2) of child.children"
:key="subInx2"
@click="nodeClick(child2)"
:class="{
'is-active':
child?.guid == child2.guid,
}"
>
<div class="submover fl">
<el-icon size="20" class="icon">
<ElIconRank />
</el-icon>
</div>
<div class="fl item text-ellipsis">
<el-icon
class="icon"
v-if="!child2.useIcon"
>
<SetUp />
</el-icon>
<el-icon class="icon" v-else>
<component :is="child2.useIcon" />
</el-icon>
{{ child2.name }}
</div>
<div class="action-icon">
<span
class="icon-span"
@click.stop="
delMenu(child2, subInx, subInx2)
"
>
<el-icon size="16">
<ElIconCloseBold />
</el-icon>
</span>
</div>
</div>
</VueDraggableNext>
</div>

</VueDraggableNext>
</div>
</VueDraggableNext>
Expand Down Expand Up @@ -565,6 +624,11 @@ const getGroupEntityList = (target) => {
name: "capprovalCc",
entityCode: "capprovalCc",
},
{
label: "审批过的",
name: "centerApproved",
entityCode: "centerApproved",
},
],
});
}
Expand Down Expand Up @@ -1022,7 +1086,6 @@ div {
}
.parent-li {
// height: 888px;
font-size: 13px;
color: #303030;
text-decoration: none;
Expand Down Expand Up @@ -1141,6 +1204,14 @@ div {
opacity: 0;
}
}
.subghost2 {
border: 1px dashed #999;
background: #000 !important;
.submover,
.item {
opacity: 0;
}
}
.share-to {
font-size: 13px;
padding-left: 20px;
Expand Down
1 change: 1 addition & 0 deletions src/layout/components/userbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
<el-dropdown-item command="CenterHandle">待我处理</el-dropdown-item>
<el-dropdown-item command="CenterSubmit">我提交的</el-dropdown-item>
<el-dropdown-item command="CenterCc">抄送我的</el-dropdown-item>
<el-dropdown-item command="CenterApproved">审批过的</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown>
Expand Down
2 changes: 1 addition & 1 deletion src/store/modules/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const useCommonStore = defineStore('commonStore', () => {

// 系统配置
let publicSetting = ref({
webVer: "1.6.131 20241021"
webVer: "1.6.132 20241021"
});
const getEntityList = () => {
return new Promise(async (resolve, reject) => {
Expand Down
58 changes: 57 additions & 1 deletion src/views/customize-menu/components/ApprovalRelated.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,25 @@
</el-button>
</el-row>
<el-row v-if="$TOOL.checkRole('r6013') && myApproval.revokeApproval">
<el-button type="success" plain @click="revokeApproval">
<el-button
type="success"
plain
@click="revokeApproval"
:loading="approvalDialog.loading"
>
撤销审批
</el-button>
</el-row>
<el-row v-if="myApproval.withdrawApproval">
<el-button
type="success"
plain
@click="withdrawApproval"
:loading="approvalDialog.loading"
>
撤回审批
</el-button>
</el-row>
<el-row v-if="myApproval.queryHistory">
<el-button
type="success"
Expand Down Expand Up @@ -278,6 +293,47 @@ const revokeApproval = () => {
})
.catch(() => {});
};
// 撤回审批
const withdrawApproval = () => {
ElMessageBox.confirm("是否确认撤回审批?", "提示:", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(async () => {
approvalDialog.loading = true;
// 是否复杂工作流
let isFlowVariables = !!myApproval.value.flowVariables;
if(isFlowVariables){
// 复杂工作流
let res = await http.post(
"/plugins/metaWorkFlow/workflow/process/withdraw",
[myApproval.value.flowVariables.processInstanceId]
);
if (res) {
ElMessage.success("撤销成功");
emits("onSubmit");
closeDialog();
}
}else{
// 简单工作流
let res = await http.get(
"/approval/withdraw?approvalTaskId=" +
myApproval.value.approvalTaskId
);
if (res) {
ElMessage.success("撤销成功");
emits("onSubmit");
closeDialog();
}
}
approvalDialog.loading = false;
})
.catch(() => {});
}
// 自选审批人
let optionalApprovals = ref([]);
// 提交接口
Expand Down
2 changes: 1 addition & 1 deletion src/views/customize-menu/list.vue
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ const props = defineProps({
type: String,
default: "",
},
// 自定义双击行时间
// 自定义双击行事件
listRowDblClick: {
type: Function,
default: null,
Expand Down
11 changes: 11 additions & 0 deletions src/views/system/approval-center/center-approved.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<template>
<centerList type="approved"/>
</template>

<script setup>
import centerList from "./center-list.vue";
</script>

<style>
</style>
15 changes: 13 additions & 2 deletions src/views/system/approval-center/center-list.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
:align="'center'"
width="160"
key="1"
v-if="type === 'handle' || type === 'cc'"
v-if="type === 'handle' || type === 'cc' || type === 'approved'"
fixed="right"
>
<template #default="scope">
Expand All @@ -34,7 +34,7 @@
size="small"
type="success"
@click="approveRow(scope.row)"
v-if="type != 'cc'"
v-if="type != 'cc' && type != 'approved'"
>审批</el-button>
</template>
</el-table-column>
Expand Down Expand Up @@ -117,6 +117,17 @@ onBeforeMount(() => {
},
],
},
approved: {
title: "审批过的",
value: 4,
filterItems: [
{
fieldName: "approvalTaskId",
op: "APPROVED",
value: null
},
],
},
};
});
Expand Down

0 comments on commit 3ce6be6

Please sign in to comment.