明树Git Lab

Commit 5cf73d4f authored by zhanghan's avatar zhanghan

处理简单流程和复杂流程的提交

parent 662dde01
Pipeline #111335 passed with stage
in 20 seconds
...@@ -101,11 +101,11 @@ const complexBiIndices = new Set([1, 3]); ...@@ -101,11 +101,11 @@ const complexBiIndices = new Set([1, 3]);
const simpleNodes = [ const simpleNodes = [
{ label: "开始", type: "terminal" }, { label: "开始", type: "terminal" },
{ label: "投管部员工发起" }, { label: "投管部员工发起" },
{ label: "投管部正副职审核", annotation: "提交/退回", returnTo: 1 }, { label: "投管部正副职审核" },
{ label: "结束", type: "terminal" }, { label: "结束", type: "terminal" },
]; ];
const simpleBiIndices = new Set(); const simpleBiIndices = new Set([1]);
const complexLevelMap = { const complexLevelMap = {
1: 2, 1: 2,
...@@ -347,7 +347,7 @@ watch( ...@@ -347,7 +347,7 @@ watch(
.bi-arrow { .bi-arrow {
position: absolute; position: absolute;
left: calc(50% + -4px); left: calc(50% + -5px);
top: 0; top: 0;
bottom: 0; bottom: 0;
display: flex; display: flex;
......
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
</div> </div>
<div class="process-right"> <div class="process-right">
<ProcessFlowChart <ProcessFlowChart
:flow-type="flowType" :flow-type="effectiveFlowType"
:current-state="currentState" :current-state="currentState"
/> />
</div> </div>
...@@ -98,7 +98,7 @@ ...@@ -98,7 +98,7 @@
</div> </div>
</template> </template>
<script setup> <script setup>
import { ref } from "vue"; import { ref, computed } from "vue";
import { useRouter, useRoute } from "vue-router"; import { useRouter, useRoute } from "vue-router";
import ProcessFlowChart from "./ProcessFlowChart.vue"; import ProcessFlowChart from "./ProcessFlowChart.vue";
...@@ -153,6 +153,12 @@ const emit = defineEmits(["save", "back", "export", "process"]); ...@@ -153,6 +153,12 @@ const emit = defineEmits(["save", "back", "export", "process"]);
const route = useRoute(); const route = useRoute();
const router = useRouter(); const router = useRouter();
const effectiveFlowType = computed(() => {
const hasInvestmentManagement = props.processData.some((record) =>
record.creator?.departs?.some((dept) => dept.parentIds?.includes("41")),
);
return hasInvestmentManagement ? "simple" : "complex";
});
const processDialogVisible = ref(false); const processDialogVisible = ref(false);
......
import { defineStore } from "pinia"; import { defineStore } from "pinia";
export const useUserStore = defineStore('user', { export const useUserStore = defineStore("user", {
state: () => ({ state: () => ({
userInfo: null, userInfo: null,
authToken: "" authToken: "",
}), }),
actions: { actions: {
setUseInfo(data) { setUseInfo(data) {
this.userInfo = data; this.userInfo = data;
this.authToken = data.token; this.authToken = data.token;
sessionStorage.setItem("authToken", data.token); sessionStorage.setItem("authToken", data.token);
sessionStorage.setItem("userInfo", JSON.stringify(data)); sessionStorage.setItem("userInfo", JSON.stringify(data));
}, },
clearUserInfo () { clearUserInfo() {
this.userInfo = null; this.userInfo = null;
this.authToken = ""; this.authToken = "";
sessionStorage.removeItem("authToken"); sessionStorage.removeItem("authToken");
sessionStorage.removeItem("userInfo"); sessionStorage.removeItem("userInfo");
} },
} },
}) });
\ No newline at end of file
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