dataMeta.ts
1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
const useDataMetaStore = defineStore("dataMeta", () => {
const guid: Ref<string> = ref("")
const databaseName = ref("")
const tableName = ref("")
const databaseChName = ref("");
const databaseGuid = ref('');
const fieldGuid = ref("");
const fieldEnName = ref('');
const isFieldLineage = ref(false);
const set = (prop?: {
tableGuid: string;
table: string;
databas: string;
databaseCh: string;
dsGuid: string;
fGuid?: string;
fEnName?: string;
isFieldLine?: boolean;
}) => {
guid.value = prop?.tableGuid || "";
databaseName.value = prop?.databas || "";
tableName.value = prop?.table || "";
databaseChName.value = prop?.databaseCh || "";
databaseGuid.value = prop?.dsGuid || "";
fieldGuid.value = prop?.fGuid || "";
fieldEnName.value = prop?.fEnName || "";
isFieldLineage.value = prop?.isFieldLine ?? false;
}
return {
guid,
databaseName,
tableName,
databaseChName,
databaseGuid,
fieldGuid,
fieldEnName,
isFieldLineage,
set
}
})
export default useDataMetaStore