明树Git Lab

Commit bf1aa83c authored by zhanghan's avatar zhanghan

1

parent cd31ecd8
......@@ -130,7 +130,10 @@ const simpleLevelMap = {
};
const activeNodes = computed(() => {
return props.flowType === "simple" ? simpleNodes : complexNodes;
const result = props.flowType === "simple" ? simpleNodes : complexNodes;
console.log('[ProcessFlowChart] flowType:', props.flowType, '=> 使用' + (props.flowType === 'simple' ? '简单' : '复杂') + '流程, currentState:', props.currentState);
console.log('[ProcessFlowChart] 节点列表:', result.map(n => n.label).join(' -> '));
return result;
});
const hasBidirectional = (index) => {
......@@ -141,7 +144,9 @@ const hasBidirectional = (index) => {
const highlightLevel = computed(() => {
const map = props.flowType === "simple" ? simpleLevelMap : complexLevelMap;
return map[props.currentState] || 0;
const level = map[props.currentState] || 0;
console.log('[ProcessFlowChart] currentState:', props.currentState, '=> highlightLevel:', level, '(使用' + (props.flowType === 'simple' ? '简单' : '复杂') + 'LevelMap)');
return level;
});
const flowTitle = computed(() => {
......
......@@ -154,14 +154,19 @@ const emit = defineEmits(["save", "back", "export", "process"]);
const route = useRoute();
const router = useRouter();
const effectiveFlowType = computed(() => {
const hasInvestmentManagement = props.processData.some((record) =>
record.creator?.departs?.some(
const firstRecord = props.processData[0];
console.log('[FlowType] 发起人记录:', firstRecord ? JSON.stringify({
actionName: firstRecord.actionName,
creator: firstRecord.creator?.name,
departs: firstRecord.creator?.departs?.map(d => ({ id: d.id, name: d.name, parentIds: d.parentIds })),
}) : '无');
const hasInvestmentManagement = firstRecord?.creator?.departs?.some(
(dept) =>
// 只要满足以下任意一个条件,就判定为投管
dept.parentIds?.includes("41") || dept.id == "41",
),
);
return hasInvestmentManagement ? "simple" : "complex";
) ?? false;
const result = hasInvestmentManagement ? "simple" : "complex";
console.log('[FlowType] 发起人是否投管部:', hasInvestmentManagement, '=> flowType:', result);
return result;
});
const processDialogVisible = ref(false);
......
......@@ -61,18 +61,6 @@
<div class="header-right">
<el-button type="default" @click="backClick">返回</el-button>
<template v-if="!loading && !isPreview">
<el-button
type="primary"
v-if="
!formData.projectLzType ||
(['1', '5', '7'].includes(
formData.projectLzType.toString(),
) &&
isXmtb)
"
@click="saveClick('save')"
>保存</el-button
>
<el-button
type="primary"
v-if="
......@@ -89,15 +77,17 @@
>发起决策信息填报</el-button
>
</template>
<el-button type="primary" @click="saveClick('save')"
>保存</el-button
>
<el-button
v-if="isPreview && formData.projectLzType == '3'"
v-if="formData.projectLzType == '3'"
type="primary"
@click="auditDialogVisible = true"
>初审</el-button
>
<el-button
v-if="
isPreview &&
formData?.daibanUsers?.includes(userInfo?.id) &&
hasApproveRole &&
formData.projectLzType == '4'
......@@ -114,7 +104,6 @@
>
<el-button
v-if="
isPreview &&
formData?.daibanUsers?.includes(userInfo?.id) &&
hasApproveRole &&
formData?.projectLzType == '2'
......@@ -229,7 +218,7 @@ const { proxy } = getCurrentInstance();
const userStore = useUserStore();
let token = ref("");
token.value = userStore.authToken || sessionStorage.getItem("authToken") || "";
const isXmtb = userStore?.isXmtb;
const isTgbu = userStore?.isTgbu;
const userInfo =
userStore.userInfo ||
......
......@@ -43,6 +43,13 @@
@click="viewDecision(row)"
>{{ canAudit ? "审批" : "查看" }}</el-button
>
<el-button
link
type="primary"
size="small"
@click="editProject(row)"
>编辑</el-button
>
</template>
</common-table>
</div>
......@@ -57,7 +64,14 @@ import { ElMessage, ElMessageBox } from "element-plus";
import { useUserStore } from "@/stores/user.js";
import CommonTable from "@/components/common/commonTable.vue";
import SearchForm from "@/components/common/SearchForm.vue";
const editProject = (item) => {
router.push({
name: "addProject",
query: {
projectId: item.id,
},
});
};
const handleSearch = (formData) => {
currentPage.value = 1;
getProjectData(formData);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment