feat: add flow store
This commit is contained in:
parent
02c5aa2a1c
commit
44ae39907e
7 changed files with 83 additions and 55 deletions
|
|
@ -21,9 +21,11 @@ import {
|
|||
ServiceAndProduct,
|
||||
} from './types';
|
||||
import { ref } from 'vue';
|
||||
import useFlowStore from '../flow';
|
||||
|
||||
const useProductServiceStore = defineStore('api-product-service', () => {
|
||||
// Product Type
|
||||
const flowStore = useFlowStore();
|
||||
|
||||
const workNameItems = ref<{ id: string; name: string; isEdit: boolean }[]>(
|
||||
[],
|
||||
|
|
@ -76,7 +78,7 @@ const useProductServiceStore = defineStore('api-product-service', () => {
|
|||
{
|
||||
headers: {
|
||||
'X-Session-Id': flow?.sessionId,
|
||||
'X-Rtid': flow?.refTransactionId,
|
||||
'X-Rtid': flow?.refTransactionId || flowStore.rtid,
|
||||
'X-Tid': flow?.transactionId,
|
||||
},
|
||||
},
|
||||
|
|
@ -190,7 +192,7 @@ const useProductServiceStore = defineStore('api-product-service', () => {
|
|||
{
|
||||
headers: {
|
||||
'X-Session-Id': flow?.sessionId,
|
||||
'X-Rtid': flow?.refTransactionId,
|
||||
'X-Rtid': flow?.refTransactionId || flowStore.rtid,
|
||||
'X-Tid': flow?.transactionId,
|
||||
},
|
||||
},
|
||||
|
|
@ -300,7 +302,7 @@ const useProductServiceStore = defineStore('api-product-service', () => {
|
|||
{
|
||||
headers: {
|
||||
'X-Session-Id': flow?.sessionId,
|
||||
'X-Rtid': flow?.refTransactionId,
|
||||
'X-Rtid': flow?.refTransactionId || flowStore.rtid,
|
||||
'X-Tid': flow?.transactionId,
|
||||
},
|
||||
},
|
||||
|
|
@ -428,7 +430,7 @@ const useProductServiceStore = defineStore('api-product-service', () => {
|
|||
{
|
||||
headers: {
|
||||
'X-Session-Id': flow?.sessionId,
|
||||
'X-Rtid': flow?.refTransactionId,
|
||||
'X-Rtid': flow?.refTransactionId || flowStore.rtid,
|
||||
'X-Tid': flow?.transactionId,
|
||||
},
|
||||
},
|
||||
|
|
@ -491,7 +493,7 @@ const useProductServiceStore = defineStore('api-product-service', () => {
|
|||
{
|
||||
headers: {
|
||||
'X-Session-Id': flow?.sessionId,
|
||||
'X-Rtid': flow?.refTransactionId,
|
||||
'X-Rtid': flow?.refTransactionId || flowStore.rtid,
|
||||
'X-Tid': flow?.transactionId,
|
||||
},
|
||||
},
|
||||
|
|
@ -588,7 +590,7 @@ const useProductServiceStore = defineStore('api-product-service', () => {
|
|||
>(`/work${(params && '?'.concat(query)) || ''}`, {
|
||||
headers: {
|
||||
'X-Session-Id': flow?.sessionId,
|
||||
'X-Rtid': flow?.refTransactionId,
|
||||
'X-Rtid': flow?.refTransactionId || flowStore.rtid,
|
||||
'X-Tid': flow?.transactionId,
|
||||
},
|
||||
});
|
||||
|
|
@ -681,7 +683,7 @@ const useProductServiceStore = defineStore('api-product-service', () => {
|
|||
{
|
||||
headers: {
|
||||
'X-Session-Id': flow?.sessionId,
|
||||
'X-Rtid': flow?.refTransactionId,
|
||||
'X-Rtid': flow?.refTransactionId || flowStore.rtid,
|
||||
'X-Tid': flow?.transactionId,
|
||||
},
|
||||
},
|
||||
|
|
@ -732,7 +734,7 @@ const useProductServiceStore = defineStore('api-product-service', () => {
|
|||
{
|
||||
headers: {
|
||||
'X-Session-Id': flow?.sessionId,
|
||||
'X-Rtid': flow?.refTransactionId,
|
||||
'X-Rtid': flow?.refTransactionId || flowStore.rtid,
|
||||
'X-Tid': flow?.transactionId,
|
||||
},
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue