adtec-core-package 0.7.2 → 0.7.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adtec-core-package",
3
- "version": "0.7.2",
3
+ "version": "0.7.4",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "scripts": {
@@ -1,5 +1,7 @@
1
1
  import request from '../utils/request'
2
2
  import type { IOrgDeptInfo } from '../interface/IOrgDeptInfo'
3
+ import type { IMdmOrgQuery } from '@/interface/IMdmOrgQuery.ts'
4
+ import type { IMdmOrg } from '@/interface/IMdmOrg.ts'
3
5
 
4
6
  /**
5
7
  * Create by丁盼
@@ -14,4 +16,11 @@ export default {
14
16
  getMdmOrgDeptTree(): Promise<IOrgDeptInfo[]> {
15
17
  return request.post('/api/base/mdmDept/getMdmOrgDeptTree', {})
16
18
  },
19
+
20
+ /**
21
+ * 获取组织列表
22
+ */
23
+ getMdmOrgList(query: IMdmOrgQuery) {
24
+ return request.post<IMdmOrg[]>('/api/base/mdmDept/getMdmOrgList', query)
25
+ },
17
26
  }
@@ -6,8 +6,8 @@ import { storeToRefs } from 'pinia'
6
6
 
7
7
  export default function useDictHooks(dictTypes?: string[]) {
8
8
  const dictStores = dictStore()
9
+ const {clearDict} = dictStores
9
10
  const { dictMap, dictDefaultValueMap, dictDataMap } = storeToRefs(dictStores)
10
-
11
11
  const getDict = async (dictTypes?: string[]) => {
12
12
  try {
13
13
  if (!dictTypes || !dictTypes.length) return
@@ -75,5 +75,6 @@ export default function useDictHooks(dictTypes?: string[]) {
75
75
  getDict,
76
76
  getDictName,
77
77
  getDictData,
78
+ clearDict
78
79
  }
79
80
  }
@@ -25,4 +25,6 @@ export interface BaseEntity {
25
25
 
26
26
  // 创建者名字,同样该字段在数据库表结构对应的映射中不存在(exist = false),仅在代码逻辑中有使用
27
27
  createByName?: string
28
+
29
+ orgId?:string
28
30
  }
@@ -0,0 +1,45 @@
1
+ /**
2
+ * 创建人 胡啸东
3
+ * 说明: Iss
4
+ * 创建时间: 2024/11/21 下午3:16
5
+ * 修改时间: 2024/11/21 下午3:16
6
+ */
7
+ export interface IMdmOrg {
8
+ // 组织ID
9
+ id?: string
10
+
11
+ // 组织编码
12
+ code?: string
13
+
14
+ // 组织名称
15
+ name?: string
16
+
17
+ // 简称
18
+ shortName?: string
19
+
20
+ // 备注
21
+ remark?: string
22
+
23
+ // 是否有效,存布尔字典“SysBool”的值:1=是,0=否。
24
+ isValid?: string
25
+
26
+ // 是否删除,1=是,0=否。
27
+ isDelete?: string
28
+
29
+ // 创建者
30
+ createBy?: string
31
+
32
+ // 创建者
33
+ createByName?: string
34
+ // 创建时间
35
+ createTime?: string
36
+
37
+ // 更新者
38
+ updateBy?: string
39
+
40
+ // 更新者
41
+ updateByName?: string
42
+
43
+ // 更新时间
44
+ updateTime?: string
45
+ }
@@ -1,4 +1,4 @@
1
- import type { IpageDataQuery } from 'adtec-core-package/src/interface/PageData'
1
+ import type { IpageDataQuery } from './PageData.ts'
2
2
 
3
3
  /**
4
4
  * 创建人 胡啸东
@@ -20,10 +20,18 @@ export const dictStore = defineStore('dictStore', () => {
20
20
  const dictDataMap = ref<dictDataMapType>({})
21
21
  const dictDefaultValueMap = ref<dictMapType>({})
22
22
 
23
- const clearDict = () => {
24
- dictMap.value = {}
25
- dictDataMap.value = {}
26
- dictDefaultValueMap.value = {}
23
+ const clearDict = (dictType?:string[]) => {
24
+ if (dictType) {
25
+ dictType.forEach(item => {
26
+ delete dictMap.value[item]
27
+ delete dictDataMap.value[item]
28
+ delete dictDefaultValueMap.value[item]
29
+ })
30
+ } else {
31
+ dictMap.value = {}
32
+ dictDataMap.value = {}
33
+ dictDefaultValueMap.value = {}
34
+ }
27
35
  }
28
36
  return {
29
37
  dictMap,