明树Git Lab

Commit 355db9e2 authored by zhanghan's avatar zhanghan

状态处理

parent 330f85bb
Pipeline #111286 passed with stage
in 20 seconds
......@@ -7,7 +7,7 @@
v-for="(node, index) in activeNodes"
:key="index"
class="flow-node-wrap"
:ref="el => nodeEls[index] = el"
:ref="(el) => (nodeEls[index] = el)"
>
<div
class="flow-node"
......@@ -15,7 +15,9 @@
>
<span class="node-label">{{ node.label }}</span>
</div>
<div v-if="node.annotation" class="flow-annotation">{{ node.annotation }}</div>
<div v-if="node.annotation" class="flow-annotation">
{{ node.annotation }}
</div>
<div v-if="index < activeNodes.length - 1" class="flow-arrow">
<div class="arrow-line"></div>
<div class="arrow-head"></div>
......@@ -29,7 +31,14 @@
:height="svgHeight"
>
<defs>
<marker id="arrowMarker" markerWidth="8" markerHeight="6" refX="8" refY="3" orient="auto">
<marker
id="arrowMarker"
markerWidth="8"
markerHeight="6"
refX="8"
refY="3"
orient="auto"
>
<path d="M0,0 L8,3 L0,6 Z" fill="#909399" />
</marker>
</defs>
......@@ -50,7 +59,9 @@
text-anchor="middle"
dominant-baseline="middle"
:transform="`rotate(-90, ${path.textX}, ${path.textY})`"
>退回修改</text>
>
退回修改
</text>
</g>
</svg>
</div>
......@@ -89,15 +100,24 @@ const simpleNodes = [
];
const complexLevelMap = {
1: 2, 2: 2, 7: 2,
1: 2,
2: 2,
7: 2,
3: 4,
4: 6, 8: 6,
5: 7, 9: 7, 13: 7, 14: 7, 15: 7,
4: 6,
8: 6,
5: 7,
9: 7,
13: 7,
14: 7,
15: 7,
};
const simpleLevelMap = {
1: 2, 2: 2,
3: 3, 4: 3,
1: 2,
2: 2,
3: 3,
4: 3,
5: 4,
};
......@@ -179,7 +199,7 @@ watch(
() => [props.flowType, props.currentState],
() => {
nextTick(() => nextTick(calcReturnPaths));
}
},
);
</script>
......@@ -215,7 +235,7 @@ watch(
.return-svg {
position: absolute;
top: 0;
left: 0;
left: -20px;
pointer-events: none;
overflow: visible;
}
......
......@@ -71,7 +71,11 @@
<el-table-column label="操作人" min-width="100">
<template #default="{ row }">{{ row.creator?.name }}</template>
</el-table-column>
<el-table-column prop="actionName" label="项目步骤" min-width="120" />
<el-table-column
prop="actionName"
label="项目步骤"
min-width="120"
/>
<el-table-column
prop="approvalMessage"
label="审核意见"
......@@ -81,7 +85,10 @@
</el-table>
</div>
<div class="process-right">
<ProcessFlowChart :flow-type="flowType" :current-state="currentState" />
<ProcessFlowChart
:flow-type="flowType"
:current-state="currentState"
/>
</div>
</div>
<template #footer>
......@@ -213,7 +220,8 @@ const handleProcess = () => {
}
.process-right {
width: 420px;
// width: 360px;
max-width: 420px;
flex-shrink: 0;
border-left: 1px solid #ebeef5;
display: flex;
......
......@@ -72,7 +72,10 @@
>
<el-button
type="primary"
v-if="formData.projectLzType == '1'"
v-if="
formData.projectLzType == '1' &&
formData.projectCreator == userInfo?.id
"
@click="saveClick('submit')"
>发起立项填报</el-button
>
......@@ -94,7 +97,7 @@
"
type="primary"
@click="auditDialogVisible = true"
>{{ formData.projectLzType == '3' ? '初审' : '审核' }}</el-button
>{{ formData.projectLzType == "3" ? "初审" : "审核" }}</el-button
>
<el-button
v-if="
......@@ -180,12 +183,18 @@
</div>
</template>
</el-dialog>
</div>
</template>
<script setup>
import { reactive, ref, computed, onMounted, getCurrentInstance, provide } from "vue";
import {
reactive,
ref,
computed,
onMounted,
getCurrentInstance,
provide,
} from "vue";
import { useRouter, useRoute } from "vue-router";
import { ElMessage, ElMessageBox } from "element-plus";
import { useUserStore } from "@/stores/user.js";
......@@ -214,6 +223,8 @@ const userInfo =
(sessionStorage.getItem("userInfo") &&
JSON.parse(sessionStorage.getItem("userInfo"))) ||
{};
console.log(userInfo, "userInfo");
let canAudit = ref(false);
userInfo.roles.map((item) => {
if (["xmlx_sp", "xmjc_sp"].includes(item.key)) {
......@@ -221,15 +232,16 @@ userInfo.roles.map((item) => {
}
});
const isTouGuanBu = userInfo.departs?.some(d => d.name === '投资管理部门');
const isTouGuanBu = userInfo.departs?.some((d) => d.name === "投资管理部门");
const currentFlowState = computed(() => {
const lxState = Number(formData.projectLzType) || 0;
const jcState = Number(jcFormData.projectLzType) || 0;
return jcState >= 7 ? jcState : lxState;
});
const flowType = computed(() => {
if (isTouGuanBu && currentFlowState.value >= 1 && currentFlowState.value <= 6) return 'simple';
return 'complex';
if (isTouGuanBu && currentFlowState.value >= 1 && currentFlowState.value <= 6)
return "simple";
return "complex";
});
// tab相关
......
......@@ -96,19 +96,14 @@ let tableColumns = ref([
width: 120,
align: "center",
formatter: (data) => {
return data.projectLzType === "1"
? "待立项"
: data.projectLzType === "3"
? "立项审批中"
: data.projectLzType === "5"
? "已立项"
: data.projectLzType === "7"
? "决策填报中"
: data.projectLzType === "8"
? "决策审批中"
: data.projectLzType === "9"
? "已决策"
: "待立项";
const type = data.projectLzType;
if (type === "1") return "待立项";
if (type === "2" || type === "3" || type === "4") return "立项审批中";
if (type === "5") return "已立项";
if (type === "7") return "决策填报中";
if (type === "8") return "决策审批中";
if (type === "9") return "已决策";
return "待立项";
},
},
{
......
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