jmash-region 0.0.1 → 0.0.3
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/dist/{edit-BBgaXo7r.mjs → edit-BofAehfs.mjs} +1 -1
- package/dist/{edit.vue_vue_type_script_setup_true_lang-C4FJ1dMZ.mjs → edit.vue_vue_type_script_setup_true_lang-DIB1Rij-.mjs} +133 -134
- package/dist/{index-BuYbOeq6.mjs → index-BT93ZnZ1.mjs} +4 -5
- package/dist/index-C1Hml01a.mjs +1602 -0
- package/dist/{index-DWUZrsjg.mjs → index-Cm74yBxt.mjs} +2 -2
- package/dist/index.mjs +6 -1428
- package/dts/src/App.vue.d.ts +2 -0
- package/dts/src/api/region/dict.d.ts +7 -0
- package/dts/src/api/region/index.d.ts +7 -0
- package/dts/src/api/region/os-dict-region/index.d.ts +18 -0
- package/dts/src/api/region/os-dict-region/types.d.ts +74 -0
- package/dts/src/components/JmashRegionCascader/index.vue.d.ts +6 -0
- package/dts/src/components/JmashRegionTree/index.vue.d.ts +6 -0
- package/dts/src/components/JmashTable/index.vue.d.ts +47 -0
- package/dts/src/constant.d.ts +16 -0
- package/dts/src/index.d.ts +10 -0
- package/dts/src/lang/index.d.ts +1 -0
- package/dts/src/lang/region/en.d.ts +2 -0
- package/dts/src/lang/region/zh-cn.d.ts +31 -0
- package/dts/src/main.d.ts +2 -0
- package/dts/src/permission.d.ts +1 -0
- package/dts/src/utils/index.d.ts +12 -0
- package/dts/src/views/region/os-dict-region/edit.vue.d.ts +33 -0
- package/dts/src/views/region/os-dict-region/index.vue.d.ts +2 -0
- package/dts/src/views/region/os-region-component/index.vue.d.ts +2 -0
- package/package.json +58 -58
- package/dist/index-C0q1Spk1.mjs +0 -4
- package/dist/index-CYXjL9hA.mjs +0 -4
- package/dist/index-S5ZXIciD.mjs +0 -12
- package/dist/index.vue_vue_type_script_setup_true_lang-BKzkVa9A.mjs +0 -63
- package/dist/index.vue_vue_type_script_setup_true_lang-DTmt2AA1.mjs +0 -58
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { AxiosPromise } from "axios";
|
|
2
|
+
import type { DictRegionApi, DictRegionReq, DictRegionModel, DictRegionList, DictRegionKey, DictRegionCreateReq, DictRegionUpdateReq, DictRegionExportReq, DictRegionImportReq } from "./types";
|
|
3
|
+
declare class DictRegionApiImpl implements DictRegionApi {
|
|
4
|
+
getKey(model: DictRegionModel): DictRegionKey;
|
|
5
|
+
findList(query?: DictRegionReq): AxiosPromise<DictRegionList>;
|
|
6
|
+
findByCode(query: DictRegionReq): AxiosPromise<DictRegionModel>;
|
|
7
|
+
findById(query: DictRegionKey): AxiosPromise<DictRegionModel>;
|
|
8
|
+
create(data: DictRegionCreateReq): AxiosPromise<DictRegionModel>;
|
|
9
|
+
update(data: DictRegionUpdateReq): AxiosPromise<DictRegionModel>;
|
|
10
|
+
move(key: DictRegionKey, up: boolean): AxiosPromise<boolean>;
|
|
11
|
+
enable(key: DictRegionKey, enable: boolean): AxiosPromise<boolean>;
|
|
12
|
+
delete(query: DictRegionKey): AxiosPromise<DictRegionModel>;
|
|
13
|
+
downloadTemplate(): AxiosPromise;
|
|
14
|
+
importExcel(data: DictRegionImportReq): AxiosPromise<string>;
|
|
15
|
+
exportExcel(queryParams: DictRegionExportReq): AxiosPromise;
|
|
16
|
+
}
|
|
17
|
+
declare const dictRegionApi: DictRegionApiImpl;
|
|
18
|
+
export { dictRegionApi };
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import type { EntityApi, EntityReq, EntityModel, EntityList, EntityTotal, EntityKey, EntityCreateReq, EntityUpdateReq, EntityExportReq, EntityImportReq } from "jmash-core";
|
|
2
|
+
export interface DictRegionApi extends EntityApi {
|
|
3
|
+
}
|
|
4
|
+
export interface DictRegionReq extends EntityReq {
|
|
5
|
+
likeRegionName?: string;
|
|
6
|
+
enable?: boolean;
|
|
7
|
+
hasEnable?: boolean;
|
|
8
|
+
parentId?: string;
|
|
9
|
+
excludeId?: string;
|
|
10
|
+
hasParent?: boolean;
|
|
11
|
+
regionCode?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface DictRegionModel extends EntityModel {
|
|
14
|
+
regionId: string;
|
|
15
|
+
parentId?: string;
|
|
16
|
+
regionCode: string;
|
|
17
|
+
regionName?: string;
|
|
18
|
+
regionPinyin?: string;
|
|
19
|
+
regionType?: string;
|
|
20
|
+
regionCategory?: string;
|
|
21
|
+
depth: number;
|
|
22
|
+
orderBy?: number;
|
|
23
|
+
enable?: boolean;
|
|
24
|
+
description?: string;
|
|
25
|
+
hasChildren?: boolean;
|
|
26
|
+
children?: DictRegionModel[];
|
|
27
|
+
}
|
|
28
|
+
export interface DictRegionList extends EntityList {
|
|
29
|
+
results: Array<DictRegionModel>;
|
|
30
|
+
}
|
|
31
|
+
export interface DictRegionModelTotal extends EntityTotal {
|
|
32
|
+
totalSize: number;
|
|
33
|
+
}
|
|
34
|
+
export interface DictRegionKey extends EntityKey {
|
|
35
|
+
tenant?: string;
|
|
36
|
+
regionId?: string;
|
|
37
|
+
}
|
|
38
|
+
export interface DictRegionCreateReq extends EntityCreateReq {
|
|
39
|
+
parentId?: string;
|
|
40
|
+
regionCode?: string;
|
|
41
|
+
regionName?: string;
|
|
42
|
+
regionPinyin?: string;
|
|
43
|
+
regionType?: string;
|
|
44
|
+
regionCategory?: string;
|
|
45
|
+
enable?: boolean;
|
|
46
|
+
description?: string;
|
|
47
|
+
}
|
|
48
|
+
export interface DictRegionUpdateReq extends EntityUpdateReq {
|
|
49
|
+
regionId?: string;
|
|
50
|
+
parentId?: string;
|
|
51
|
+
regionCode?: string;
|
|
52
|
+
regionName?: string;
|
|
53
|
+
regionPinyin?: string;
|
|
54
|
+
regionType?: string;
|
|
55
|
+
regionCategory?: string;
|
|
56
|
+
enable?: boolean;
|
|
57
|
+
description?: string;
|
|
58
|
+
}
|
|
59
|
+
export type DictRegionFormReq = DictRegionCreateReq | DictRegionUpdateReq;
|
|
60
|
+
export interface DictRegionExportReq extends EntityExportReq {
|
|
61
|
+
req: DictRegionReq;
|
|
62
|
+
}
|
|
63
|
+
export interface DictRegionImportReq extends EntityImportReq {
|
|
64
|
+
}
|
|
65
|
+
export interface DictRegionMoveKey {
|
|
66
|
+
tenant?: string;
|
|
67
|
+
regionId?: string;
|
|
68
|
+
up?: boolean;
|
|
69
|
+
}
|
|
70
|
+
export interface DictRegionEnableKey {
|
|
71
|
+
tenant?: string;
|
|
72
|
+
regionId?: string;
|
|
73
|
+
enable?: boolean;
|
|
74
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<globalThis.ExtractPropTypes<{
|
|
2
|
+
modelValue: globalThis.PropType<string[]>;
|
|
3
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
4
|
+
modelValue: globalThis.PropType<string[]>;
|
|
5
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<globalThis.ExtractPropTypes<{
|
|
2
|
+
modelValue: globalThis.PropType<string>;
|
|
3
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
4
|
+
modelValue: globalThis.PropType<string>;
|
|
5
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { type PropType } from "vue";
|
|
2
|
+
import type { TableColumn } from "jmash-core";
|
|
3
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<globalThis.ExtractPropTypes<{
|
|
4
|
+
tableLabel: {
|
|
5
|
+
type: PropType<TableColumn[]>;
|
|
6
|
+
default: () => never[];
|
|
7
|
+
};
|
|
8
|
+
isSelection: {
|
|
9
|
+
type: BooleanConstructor;
|
|
10
|
+
default: boolean;
|
|
11
|
+
};
|
|
12
|
+
}>, {
|
|
13
|
+
clearSelection: () => any;
|
|
14
|
+
getSelectionRows: () => any;
|
|
15
|
+
toggleRowSelection: (row: any, selected: boolean) => any;
|
|
16
|
+
toggleAllSelection: () => any;
|
|
17
|
+
toggleRowExpansion: (row: any, expanded?: boolean | undefined) => any;
|
|
18
|
+
setCurrentRow: (row: any) => any;
|
|
19
|
+
clearSort: () => any;
|
|
20
|
+
clearFilter: (columnKeys?: string[] | undefined) => any;
|
|
21
|
+
doLayout: () => any;
|
|
22
|
+
sort: (prop: string, order: string) => any;
|
|
23
|
+
scrollTo: (options: number | ScrollToOptions, yCoord?: number | undefined) => any;
|
|
24
|
+
setScrollTop: (top?: number | undefined) => any;
|
|
25
|
+
setScrollLeft: (left?: number | undefined) => any;
|
|
26
|
+
refs: () => any;
|
|
27
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
28
|
+
tableLabel: {
|
|
29
|
+
type: PropType<TableColumn[]>;
|
|
30
|
+
default: () => never[];
|
|
31
|
+
};
|
|
32
|
+
isSelection: {
|
|
33
|
+
type: BooleanConstructor;
|
|
34
|
+
default: boolean;
|
|
35
|
+
};
|
|
36
|
+
}>> & Readonly<{}>, {
|
|
37
|
+
tableLabel: TableColumn[];
|
|
38
|
+
isSelection: boolean;
|
|
39
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, Partial<Record<string, (_: {
|
|
40
|
+
data: any;
|
|
41
|
+
}) => any>>>;
|
|
42
|
+
export default _default;
|
|
43
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
44
|
+
new (): {
|
|
45
|
+
$slots: S;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare class Constant {
|
|
2
|
+
static readonly MODULE_REGION = "region";
|
|
3
|
+
static readonly DEFAULT_ID = "00000000-0000-0000-0000-000000000000";
|
|
4
|
+
static readonly ENUM_REGION_TYPE = "jmash.region.protobuf.RegionType";
|
|
5
|
+
static readonly ENUM_REGION_CATEGORY = "jmash.region.protobuf.RegionCategory";
|
|
6
|
+
static readonly ENABLE_VALUES: globalThis.Ref<{
|
|
7
|
+
key: boolean;
|
|
8
|
+
value: string;
|
|
9
|
+
}[], {
|
|
10
|
+
key: boolean;
|
|
11
|
+
value: string;
|
|
12
|
+
}[] | {
|
|
13
|
+
key: boolean;
|
|
14
|
+
value: string;
|
|
15
|
+
}[]>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { App } from "vue";
|
|
2
|
+
import JmashRegionTree from "@/components/JmashRegionTree/index.vue";
|
|
3
|
+
import JmashRegionCascader from "@/components/JmashRegionCascader/index.vue";
|
|
4
|
+
export { JmashRegionTree, JmashRegionCascader };
|
|
5
|
+
export { dictRegionApi } from "@/api/region/os-dict-region";
|
|
6
|
+
export type { DictRegionApi, DictRegionReq, DictRegionModel, DictRegionList, DictRegionKey, DictRegionMoveKey, DictRegionEnableKey, DictRegionCreateReq, DictRegionUpdateReq, DictRegionExportReq, DictRegionImportReq, } from "@/api/region/os-dict-region/types";
|
|
7
|
+
declare const dict: {
|
|
8
|
+
install(app: App): void;
|
|
9
|
+
};
|
|
10
|
+
export default dict;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function loadLang(i18n: any): void;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
common: {
|
|
3
|
+
delete: string;
|
|
4
|
+
confirm: string;
|
|
5
|
+
cancel: string;
|
|
6
|
+
confirmDelete: string;
|
|
7
|
+
deleteSuccess: string;
|
|
8
|
+
};
|
|
9
|
+
dictRegion: {
|
|
10
|
+
name: string;
|
|
11
|
+
addChild: string;
|
|
12
|
+
parentId: string;
|
|
13
|
+
parentIdPlaceholder: string;
|
|
14
|
+
regionCode: string;
|
|
15
|
+
regionCodePlaceholder: string;
|
|
16
|
+
regionName: string;
|
|
17
|
+
regionNamePlaceholder: string;
|
|
18
|
+
regionPinyin: string;
|
|
19
|
+
regionPinyinPlaceholder: string;
|
|
20
|
+
regionType: string;
|
|
21
|
+
regionTypePlaceholder: string;
|
|
22
|
+
regionCategory: string;
|
|
23
|
+
regionCategoryPlaceholder: string;
|
|
24
|
+
enable: string;
|
|
25
|
+
enablePlaceholder: string;
|
|
26
|
+
orderBy: string;
|
|
27
|
+
description: string;
|
|
28
|
+
descriptionPlaceholder: string;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "nprogress/nprogress.css";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { DictRegionModel } from "@/api/region/os-dict-region/types";
|
|
2
|
+
export declare const findParentRegions: (regionId: string, regions: DictRegionModel[]) => string[];
|
|
3
|
+
export interface ExtractIdsOrCodes {
|
|
4
|
+
regionIds: string[];
|
|
5
|
+
regionCodes: string[];
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* 返回区域ID和区域编码
|
|
9
|
+
* @param model DictRegionModel
|
|
10
|
+
* @returns ExtractIdsOrCodes { regionIds: string[], regionCodes: string[] }
|
|
11
|
+
*/
|
|
12
|
+
export declare const extractIdsOrCodes: (model: DictRegionModel) => ExtractIdsOrCodes;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { type PropType } from "vue";
|
|
2
|
+
import type { DictRegionKey } from "@/api/region/os-dict-region/types";
|
|
3
|
+
declare const _default: import("vue").DefineComponent<globalThis.ExtractPropTypes<{
|
|
4
|
+
modelValue: PropType<boolean>;
|
|
5
|
+
entityKey: {
|
|
6
|
+
type: PropType<DictRegionKey>;
|
|
7
|
+
default: () => void;
|
|
8
|
+
};
|
|
9
|
+
parentId: {
|
|
10
|
+
type: PropType<string>;
|
|
11
|
+
default: string;
|
|
12
|
+
};
|
|
13
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
14
|
+
refresh: (...args: any[]) => void;
|
|
15
|
+
reload: (...args: any[]) => void;
|
|
16
|
+
}, string, import("vue").PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
17
|
+
modelValue: PropType<boolean>;
|
|
18
|
+
entityKey: {
|
|
19
|
+
type: PropType<DictRegionKey>;
|
|
20
|
+
default: () => void;
|
|
21
|
+
};
|
|
22
|
+
parentId: {
|
|
23
|
+
type: PropType<string>;
|
|
24
|
+
default: string;
|
|
25
|
+
};
|
|
26
|
+
}>> & Readonly<{
|
|
27
|
+
onRefresh?: ((...args: any[]) => any) | undefined;
|
|
28
|
+
onReload?: ((...args: any[]) => any) | undefined;
|
|
29
|
+
}>, {
|
|
30
|
+
parentId: string;
|
|
31
|
+
entityKey: DictRegionKey;
|
|
32
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
33
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
package/package.json
CHANGED
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "jmash-region",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"private": false,
|
|
5
|
-
"module": "dist/index.mjs",
|
|
6
|
-
"types": "dts/src/index.d.ts",
|
|
7
|
-
"files": [
|
|
8
|
-
"dist",
|
|
9
|
-
"dts/src"
|
|
10
|
-
],
|
|
11
|
-
"scripts": {
|
|
12
|
-
"dev": "vite",
|
|
13
|
-
"build": "vite build && pnpm build:dts",
|
|
14
|
-
"build:dts": "vue-tsc --declaration --emitDeclarationOnly",
|
|
15
|
-
"preview": "vite preview",
|
|
16
|
-
"build-only": "vite build",
|
|
17
|
-
"type-check": "vue-tsc --build --force",
|
|
18
|
-
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
|
|
19
|
-
"format": "prettier --write src/"
|
|
20
|
-
},
|
|
21
|
-
"peerDependencies": {
|
|
22
|
-
"axios": "^1.6.7",
|
|
23
|
-
"element-plus": "^2.7.5",
|
|
24
|
-
"jmash-core": "^0.0.95",
|
|
25
|
-
"jmash-dict": "^0.0.41",
|
|
26
|
-
"jmash-rbac": "^0.0.30",
|
|
27
|
-
"pinia": "^2.1.7",
|
|
28
|
-
"vue": "^3.4.21",
|
|
29
|
-
"vue-i18n": "^9.10.1",
|
|
30
|
-
"vue-router": "^4.3.0"
|
|
31
|
-
},
|
|
32
|
-
"devDependencies": {
|
|
33
|
-
"@
|
|
34
|
-
"@tsconfig/node20": "^20.1.2",
|
|
35
|
-
"@types/node": "^20.11.10",
|
|
36
|
-
"@vitejs/plugin-vue": "^5.0.3",
|
|
37
|
-
"@vue/
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"typescript": "
|
|
46
|
-
"unplugin-auto-import": "^0.17.5",
|
|
47
|
-
"unplugin-vue-components": "^0.26.0",
|
|
48
|
-
"vite": "^5.0.11",
|
|
49
|
-
"vue-tsc": "^1.8.27"
|
|
50
|
-
},
|
|
51
|
-
"dependencies": {
|
|
52
|
-
"@vueuse/core": "^10.9.0",
|
|
53
|
-
"file-saver": "^2.0.5",
|
|
54
|
-
"nprogress": "^0.2.0",
|
|
55
|
-
"pinyin-pro": "^3.25.0",
|
|
56
|
-
"qs": "^6.12.0"
|
|
57
|
-
}
|
|
58
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "jmash-region",
|
|
3
|
+
"version": "0.0.3",
|
|
4
|
+
"private": false,
|
|
5
|
+
"module": "dist/index.mjs",
|
|
6
|
+
"types": "dts/src/index.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist",
|
|
9
|
+
"dts/src"
|
|
10
|
+
],
|
|
11
|
+
"scripts": {
|
|
12
|
+
"dev": "vite",
|
|
13
|
+
"build": "vite build && pnpm build:dts",
|
|
14
|
+
"build:dts": "vue-tsc --declaration --emitDeclarationOnly",
|
|
15
|
+
"preview": "vite preview",
|
|
16
|
+
"build-only": "vite build",
|
|
17
|
+
"type-check": "vue-tsc --build --force",
|
|
18
|
+
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
|
|
19
|
+
"format": "prettier --write src/"
|
|
20
|
+
},
|
|
21
|
+
"peerDependencies": {
|
|
22
|
+
"axios": "^1.6.7",
|
|
23
|
+
"element-plus": "^2.7.5",
|
|
24
|
+
"jmash-core": "^0.0.95",
|
|
25
|
+
"jmash-dict": "^0.0.41",
|
|
26
|
+
"jmash-rbac": "^0.0.30",
|
|
27
|
+
"pinia": "^2.1.7",
|
|
28
|
+
"vue": "^3.4.21",
|
|
29
|
+
"vue-i18n": "^9.10.1",
|
|
30
|
+
"vue-router": "^4.3.0"
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"@eslint/js": "^9.14.0",
|
|
34
|
+
"@tsconfig/node20": "^20.1.2",
|
|
35
|
+
"@types/node": "^20.11.10",
|
|
36
|
+
"@vitejs/plugin-vue": "^5.0.3",
|
|
37
|
+
"@vue/tsconfig": "^0.5.1",
|
|
38
|
+
"eslint": "^9.14.0",
|
|
39
|
+
"eslint-plugin-vue": "^9.30.0",
|
|
40
|
+
"globals": "^15.12.0",
|
|
41
|
+
"npm-run-all2": "^6.1.1",
|
|
42
|
+
"prettier": "^3.0.3",
|
|
43
|
+
"sass": "^1.72.0",
|
|
44
|
+
"typescript": "~5.3.0",
|
|
45
|
+
"typescript-eslint": "^8.13.0",
|
|
46
|
+
"unplugin-auto-import": "^0.17.5",
|
|
47
|
+
"unplugin-vue-components": "^0.26.0",
|
|
48
|
+
"vite": "^5.0.11",
|
|
49
|
+
"vue-tsc": "^1.8.27"
|
|
50
|
+
},
|
|
51
|
+
"dependencies": {
|
|
52
|
+
"@vueuse/core": "^10.9.0",
|
|
53
|
+
"file-saver": "^2.0.5",
|
|
54
|
+
"nprogress": "^0.2.0",
|
|
55
|
+
"pinyin-pro": "^3.25.0",
|
|
56
|
+
"qs": "^6.12.0"
|
|
57
|
+
}
|
|
58
|
+
}
|
package/dist/index-C0q1Spk1.mjs
DELETED
package/dist/index-CYXjL9hA.mjs
DELETED
package/dist/index-S5ZXIciD.mjs
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
const i = (s) => {
|
|
2
|
-
const e = {
|
|
3
|
-
regionIds: [],
|
|
4
|
-
regionCodes: []
|
|
5
|
-
}, n = (r) => {
|
|
6
|
-
e.regionIds.push(r.regionId), e.regionCodes.push(r.regionCode), r.children && r.children.length > 0 && r.children.forEach((o) => n(o));
|
|
7
|
-
};
|
|
8
|
-
return n(s), e;
|
|
9
|
-
};
|
|
10
|
-
export {
|
|
11
|
-
i as e
|
|
12
|
-
};
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { defineComponent as f, useModel as C, ref as i, watchEffect as g, resolveComponent as v, openBlock as _, createBlock as x } from "vue";
|
|
2
|
-
import { dictRegionApi as s } from "./index.mjs";
|
|
3
|
-
import { e as y } from "./index-S5ZXIciD.mjs";
|
|
4
|
-
const L = /* @__PURE__ */ f({
|
|
5
|
-
__name: "index",
|
|
6
|
-
props: {
|
|
7
|
-
modelValue: {},
|
|
8
|
-
modelModifiers: {}
|
|
9
|
-
},
|
|
10
|
-
emits: ["update:modelValue"],
|
|
11
|
-
setup(u) {
|
|
12
|
-
const l = C(u, "modelValue"), n = i([]), c = () => {
|
|
13
|
-
s.findByCode({ regionCode: l.value }).then(({ data: o }) => {
|
|
14
|
-
const e = y(o);
|
|
15
|
-
n.value = e.regionCodes;
|
|
16
|
-
});
|
|
17
|
-
};
|
|
18
|
-
g(
|
|
19
|
-
() => l.value && !n.value.length && c()
|
|
20
|
-
);
|
|
21
|
-
const d = i([]), p = (o) => {
|
|
22
|
-
s.findList({
|
|
23
|
-
likeRegionName: o
|
|
24
|
-
}).then(({ data: e }) => {
|
|
25
|
-
d.value = e.results.map((a) => (a.hasChildren = !a.hasChildren, a));
|
|
26
|
-
});
|
|
27
|
-
}, h = () => {
|
|
28
|
-
n.value = [];
|
|
29
|
-
}, m = (o, e) => {
|
|
30
|
-
s.findList({
|
|
31
|
-
parentId: o.data.regionId
|
|
32
|
-
}).then(({ data: a }) => {
|
|
33
|
-
const t = a.results.map((r) => (r.hasChildren = !r.hasChildren, r));
|
|
34
|
-
!o.data.regionId && (d.value = t), e(t);
|
|
35
|
-
});
|
|
36
|
-
};
|
|
37
|
-
return (o, e) => {
|
|
38
|
-
const a = v("el-tree-select");
|
|
39
|
-
return _(), x(a, {
|
|
40
|
-
lazy: "",
|
|
41
|
-
filterable: "",
|
|
42
|
-
"check-strictly": "",
|
|
43
|
-
modelValue: l.value,
|
|
44
|
-
"onUpdate:modelValue": e[0] || (e[0] = (t) => l.value = t),
|
|
45
|
-
"node-key": "regionCode",
|
|
46
|
-
load: m,
|
|
47
|
-
data: d.value,
|
|
48
|
-
"default-expanded-keys": n.value,
|
|
49
|
-
"filter-method": p,
|
|
50
|
-
onClear: h,
|
|
51
|
-
props: {
|
|
52
|
-
value: "regionCode",
|
|
53
|
-
label: "regionName",
|
|
54
|
-
isLeaf: "hasChildren",
|
|
55
|
-
children: "children"
|
|
56
|
-
}
|
|
57
|
-
}, null, 8, ["modelValue", "data", "default-expanded-keys"]);
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
export {
|
|
62
|
-
L as _
|
|
63
|
-
};
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { defineComponent as m, useModel as f, ref as g, resolveComponent as v, openBlock as h, createBlock as C } from "vue";
|
|
2
|
-
import { dictRegionApi as d } from "./index.mjs";
|
|
3
|
-
const V = /* @__PURE__ */ m({
|
|
4
|
-
__name: "index",
|
|
5
|
-
props: {
|
|
6
|
-
modelValue: {},
|
|
7
|
-
modelModifiers: {}
|
|
8
|
-
},
|
|
9
|
-
emits: ["update:modelValue"],
|
|
10
|
-
setup(s) {
|
|
11
|
-
const r = f(s, "modelValue"), i = {
|
|
12
|
-
lazy: !0,
|
|
13
|
-
// 开启懒加载
|
|
14
|
-
checkStrictly: !0,
|
|
15
|
-
// 选择任意一级选项
|
|
16
|
-
lazyLoad(l, o) {
|
|
17
|
-
var e;
|
|
18
|
-
d.findList({
|
|
19
|
-
parentId: (e = l.data) == null ? void 0 : e.regionId
|
|
20
|
-
}).then(({ data: t }) => {
|
|
21
|
-
const c = t.results.map((n) => ({
|
|
22
|
-
label: n.regionName,
|
|
23
|
-
value: n.regionCode,
|
|
24
|
-
regionId: n.regionId,
|
|
25
|
-
leaf: !n.hasChildren
|
|
26
|
-
}));
|
|
27
|
-
o(c);
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
}, u = () => {
|
|
31
|
-
r.value = [], a.value = [];
|
|
32
|
-
}, a = g([]), p = (l) => (d.findList({
|
|
33
|
-
likeRegionName: l
|
|
34
|
-
}).then(({ data: o }) => {
|
|
35
|
-
a.value = o.results.map((e) => ({
|
|
36
|
-
label: e.regionName,
|
|
37
|
-
value: e.regionCode,
|
|
38
|
-
regionId: e.regionId,
|
|
39
|
-
leaf: !e.hasChildren
|
|
40
|
-
}));
|
|
41
|
-
}), !1);
|
|
42
|
-
return (l, o) => {
|
|
43
|
-
const e = v("el-cascader");
|
|
44
|
-
return h(), C(e, {
|
|
45
|
-
modelValue: r.value,
|
|
46
|
-
"onUpdate:modelValue": o[0] || (o[0] = (t) => r.value = t),
|
|
47
|
-
props: i,
|
|
48
|
-
options: a.value,
|
|
49
|
-
filterable: "",
|
|
50
|
-
onClear: u,
|
|
51
|
-
"before-filter": p
|
|
52
|
-
}, null, 8, ["modelValue", "options"]);
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
export {
|
|
57
|
-
V as _
|
|
58
|
-
};
|