@partex/one-core 1.0.0
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/README.md +591 -0
- package/lib/components/auth/index.d.ts +1 -0
- package/lib/components/auth/index.vue.d.ts +3 -0
- package/lib/components/back/index.d.ts +1 -0
- package/lib/components/back/index.vue.d.ts +17 -0
- package/lib/components/common.d.ts +100 -0
- package/lib/components/components.d.ts +17 -0
- package/lib/components/create.d.ts +16 -0
- package/lib/components/dashboard/index.d.ts +1 -0
- package/lib/components/dashboard/store.d.ts +6 -0
- package/lib/components/error404/index.d.ts +1 -0
- package/lib/components/error404/index.vue.d.ts +5 -0
- package/lib/components/error500/index.d.ts +1 -0
- package/lib/components/error500/index.vue.d.ts +5 -0
- package/lib/components/footer/index.d.ts +1 -0
- package/lib/components/footer/index.vue.d.ts +15 -0
- package/lib/components/header/api.d.ts +44 -0
- package/lib/components/header/index.d.ts +4 -0
- package/lib/components/header/index.vue.d.ts +114 -0
- package/lib/components/header/interface.d.ts +14 -0
- package/lib/components/header/message.vue.d.ts +51 -0
- package/lib/components/header/pop.vue.d.ts +53 -0
- package/lib/components/header/store.d.ts +20 -0
- package/lib/components/icon.d.ts +17 -0
- package/lib/components/importer/api.d.ts +21 -0
- package/lib/components/importer/index.d.ts +1 -0
- package/lib/components/importer/index.vue.d.ts +115 -0
- package/lib/components/index.d.ts +5 -0
- package/lib/components/local/en-US.d.ts +89 -0
- package/lib/components/local/index.d.ts +175 -0
- package/lib/components/local/zh-CN.d.ts +88 -0
- package/lib/components/login/api.d.ts +7 -0
- package/lib/components/login/index.d.ts +3 -0
- package/lib/components/login/index.vue.d.ts +76 -0
- package/lib/components/login/interface.d.ts +49 -0
- package/lib/components/login/store.d.ts +47 -0
- package/lib/components/logo/index.d.ts +1 -0
- package/lib/components/logo/index.vue.d.ts +18 -0
- package/lib/components/my/api.d.ts +3 -0
- package/lib/components/my/index.d.ts +1 -0
- package/lib/components/my/index.vue.d.ts +30 -0
- package/lib/components/my/interface.d.ts +14 -0
- package/lib/components/numberRoll/index.d.ts +1 -0
- package/lib/components/numberRoll/index.vue.d.ts +47 -0
- package/lib/components/preset.d.ts +5 -0
- package/lib/components/report/api.d.ts +1 -0
- package/lib/components/report/index.d.ts +1 -0
- package/lib/components/report/index.vue.d.ts +9 -0
- package/lib/components/searchBar/index.d.ts +2 -0
- package/lib/components/searchBar/index.vue.d.ts +74 -0
- package/lib/components/searchBar/interface.d.ts +76 -0
- package/lib/components/searchBar/item.vue.d.ts +63 -0
- package/lib/components/skeleton/index.d.ts +1 -0
- package/lib/components/skeleton/index.vue.d.ts +24 -0
- package/lib/components/table/index.d.ts +1 -0
- package/lib/components/table/index.vue.d.ts +158 -0
- package/lib/index.d.ts +1 -0
- package/lib/one-core.cjs +1 -0
- package/lib/one-core.js +4982 -0
- package/lib/one-core.umd.cjs +1 -0
- package/lib/style.css +1 -0
- package/package.json +77 -0
- package/volar.d.ts +19 -0
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import type { SelectOption, SelectGroupOption, CascaderOption, TreeSelectOption } from 'naive-ui';
|
|
2
|
+
interface Base {
|
|
3
|
+
title: (() => string) | string;
|
|
4
|
+
show?: boolean;
|
|
5
|
+
clearable?: boolean;
|
|
6
|
+
placeholder?: (() => string) | string;
|
|
7
|
+
updateValue?: (value: [] | string | number | null, data: any) => void;
|
|
8
|
+
}
|
|
9
|
+
export interface Input extends Base {
|
|
10
|
+
type: 'input';
|
|
11
|
+
}
|
|
12
|
+
export interface InputNumber extends Base {
|
|
13
|
+
type: 'number';
|
|
14
|
+
min?: number;
|
|
15
|
+
max?: number;
|
|
16
|
+
step?: number;
|
|
17
|
+
showButton?: boolean;
|
|
18
|
+
suffix?: string;
|
|
19
|
+
validator?: (value: number) => boolean;
|
|
20
|
+
}
|
|
21
|
+
export interface Select extends Base {
|
|
22
|
+
type: 'select';
|
|
23
|
+
multiple?: boolean;
|
|
24
|
+
options: Array<SelectOption | SelectGroupOption> | any;
|
|
25
|
+
}
|
|
26
|
+
export interface Dropdown extends Base {
|
|
27
|
+
type: 'dropdown';
|
|
28
|
+
options: SelectOption[] | any;
|
|
29
|
+
}
|
|
30
|
+
export interface Cascader extends Base {
|
|
31
|
+
type: 'cascader';
|
|
32
|
+
multiple?: boolean;
|
|
33
|
+
checkStrategy?: 'all' | 'parent' | 'child';
|
|
34
|
+
options: CascaderOption[] | any;
|
|
35
|
+
}
|
|
36
|
+
export interface TreeSelect extends Base {
|
|
37
|
+
type: 'treeSelect';
|
|
38
|
+
multiple?: boolean;
|
|
39
|
+
checkStrategy?: 'all' | 'parent' | 'child';
|
|
40
|
+
options: TreeSelectOption[] | any;
|
|
41
|
+
}
|
|
42
|
+
export interface DatePicker extends Base {
|
|
43
|
+
type: 'datePicker';
|
|
44
|
+
dateType: 'date' | 'datetime' | 'daterange' | 'datetimerange' | 'month' | 'monthrange' | 'year' | 'quarter';
|
|
45
|
+
format?: string;
|
|
46
|
+
isDateDisabled?: (current: number) => boolean;
|
|
47
|
+
shortcuts?: Record<string, number | (() => number)> | Record<string, [number, number] | (() => [number, number])>;
|
|
48
|
+
}
|
|
49
|
+
type unUse = 'title' | 'show';
|
|
50
|
+
type unGroupUse = 'title' | 'clearable';
|
|
51
|
+
export interface GInput extends Omit<Input, unUse> {
|
|
52
|
+
key: string;
|
|
53
|
+
options?: Array<SelectOption | SelectGroupOption>;
|
|
54
|
+
}
|
|
55
|
+
export interface GInputNumber extends Omit<InputNumber, unUse> {
|
|
56
|
+
key: string;
|
|
57
|
+
options?: Array<SelectOption | SelectGroupOption>;
|
|
58
|
+
}
|
|
59
|
+
export interface GDatePicker extends Omit<DatePicker, unUse> {
|
|
60
|
+
key: string;
|
|
61
|
+
options?: Array<SelectOption | SelectGroupOption>;
|
|
62
|
+
}
|
|
63
|
+
export interface GSelectPicker extends Omit<Select, unUse> {
|
|
64
|
+
key: string;
|
|
65
|
+
}
|
|
66
|
+
export type GroupInput = GInput | GInputNumber | GDatePicker | GSelectPicker;
|
|
67
|
+
export interface Group extends Omit<Base, unGroupUse> {
|
|
68
|
+
type: 'group';
|
|
69
|
+
options: Array<SelectOption | SelectGroupOption>;
|
|
70
|
+
input: GroupInput;
|
|
71
|
+
width?: number | string;
|
|
72
|
+
}
|
|
73
|
+
export type ISearchBarType = {
|
|
74
|
+
[key in string]: Input | InputNumber | Select | Dropdown | Cascader | TreeSelect | DatePicker | Group;
|
|
75
|
+
};
|
|
76
|
+
export {};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { DefineComponent, Ref, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
|
|
2
|
+
import type { ISearchBarType } from './interface';
|
|
3
|
+
declare const _default: DefineComponent<{
|
|
4
|
+
value: {
|
|
5
|
+
required: true;
|
|
6
|
+
type: ObjectConstructor;
|
|
7
|
+
default: () => {};
|
|
8
|
+
};
|
|
9
|
+
data: {
|
|
10
|
+
required: true;
|
|
11
|
+
type: PropType<ISearchBarType>;
|
|
12
|
+
default: () => {};
|
|
13
|
+
};
|
|
14
|
+
cols: {
|
|
15
|
+
type: PropType<number>;
|
|
16
|
+
default: number;
|
|
17
|
+
};
|
|
18
|
+
small: {
|
|
19
|
+
type: PropType<boolean>;
|
|
20
|
+
default: boolean;
|
|
21
|
+
};
|
|
22
|
+
}, {
|
|
23
|
+
more: Ref<boolean>;
|
|
24
|
+
offset: Ref<number>;
|
|
25
|
+
collapsed: Ref<boolean>;
|
|
26
|
+
searchData: Ref<{
|
|
27
|
+
[x: string]: any;
|
|
28
|
+
}>;
|
|
29
|
+
dropDisplay: Ref<{
|
|
30
|
+
[x: string]: any;
|
|
31
|
+
}>;
|
|
32
|
+
columnsPopover: Ref<{
|
|
33
|
+
key: string;
|
|
34
|
+
}[]>;
|
|
35
|
+
showMore: () => void;
|
|
36
|
+
dropValueChange: (key: string, value: string, item: any) => void;
|
|
37
|
+
dropDisplayToggle: (key: string) => void;
|
|
38
|
+
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes<{
|
|
39
|
+
value: {
|
|
40
|
+
required: true;
|
|
41
|
+
type: ObjectConstructor;
|
|
42
|
+
default: () => {};
|
|
43
|
+
};
|
|
44
|
+
data: {
|
|
45
|
+
required: true;
|
|
46
|
+
type: PropType<ISearchBarType>;
|
|
47
|
+
default: () => {};
|
|
48
|
+
};
|
|
49
|
+
cols: {
|
|
50
|
+
type: PropType<number>;
|
|
51
|
+
default: number;
|
|
52
|
+
};
|
|
53
|
+
small: {
|
|
54
|
+
type: PropType<boolean>;
|
|
55
|
+
default: boolean;
|
|
56
|
+
};
|
|
57
|
+
}>>, {
|
|
58
|
+
data: ISearchBarType;
|
|
59
|
+
small: boolean;
|
|
60
|
+
value: Record<string, any>;
|
|
61
|
+
cols: number;
|
|
62
|
+
}, {}>;
|
|
63
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as OcSkeleton } from './index.vue';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
|
|
2
|
+
declare const _default: DefineComponent<{
|
|
3
|
+
cols: {
|
|
4
|
+
type: PropType<number>;
|
|
5
|
+
default: number;
|
|
6
|
+
};
|
|
7
|
+
num: {
|
|
8
|
+
type: PropType<[number, number][]>;
|
|
9
|
+
default: () => number[][];
|
|
10
|
+
};
|
|
11
|
+
}, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes<{
|
|
12
|
+
cols: {
|
|
13
|
+
type: PropType<number>;
|
|
14
|
+
default: number;
|
|
15
|
+
};
|
|
16
|
+
num: {
|
|
17
|
+
type: PropType<[number, number][]>;
|
|
18
|
+
default: () => number[][];
|
|
19
|
+
};
|
|
20
|
+
}>>, {
|
|
21
|
+
cols: number;
|
|
22
|
+
num: [number, number][];
|
|
23
|
+
}, {}>;
|
|
24
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as OcTable } from './index.vue';
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import { DefineComponent, Ref, VNodeChild, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
|
|
2
|
+
import type { Query, ObjectKey } from '../common';
|
|
3
|
+
import type { ISearchBarType } from '../searchBar/interface';
|
|
4
|
+
import type { DataTableColumn } from 'naive-ui';
|
|
5
|
+
declare const _default: DefineComponent<{
|
|
6
|
+
init: {
|
|
7
|
+
type: PropType<Function>;
|
|
8
|
+
default: () => void;
|
|
9
|
+
};
|
|
10
|
+
loading: {
|
|
11
|
+
type: PropType<boolean>;
|
|
12
|
+
default: boolean;
|
|
13
|
+
};
|
|
14
|
+
searchData: {
|
|
15
|
+
required: true;
|
|
16
|
+
type: PropType<ISearchBarType>;
|
|
17
|
+
default: () => {};
|
|
18
|
+
};
|
|
19
|
+
columns: {
|
|
20
|
+
type: PropType<DataTableColumn<any>[]>;
|
|
21
|
+
default: () => never[];
|
|
22
|
+
};
|
|
23
|
+
columnsData: {
|
|
24
|
+
type: PropType<any[]>;
|
|
25
|
+
default: () => never[];
|
|
26
|
+
};
|
|
27
|
+
query: {
|
|
28
|
+
type: PropType<Query>;
|
|
29
|
+
default: () => {
|
|
30
|
+
page: number;
|
|
31
|
+
pageCount: number;
|
|
32
|
+
pageSize: number;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
cols: {
|
|
36
|
+
type: PropType<number>;
|
|
37
|
+
default: number;
|
|
38
|
+
};
|
|
39
|
+
small: {
|
|
40
|
+
type: PropType<boolean>;
|
|
41
|
+
default: boolean;
|
|
42
|
+
};
|
|
43
|
+
resetButton: {
|
|
44
|
+
type: PropType<boolean>;
|
|
45
|
+
default: boolean;
|
|
46
|
+
};
|
|
47
|
+
height: {
|
|
48
|
+
type: PropType<string>;
|
|
49
|
+
default: string;
|
|
50
|
+
};
|
|
51
|
+
scrollX: {
|
|
52
|
+
type: PropType<string>;
|
|
53
|
+
default: null;
|
|
54
|
+
};
|
|
55
|
+
}, {
|
|
56
|
+
query: Ref<{
|
|
57
|
+
page: number;
|
|
58
|
+
pageSize?: number | undefined;
|
|
59
|
+
pageCount?: number | undefined;
|
|
60
|
+
itemCount?: number | undefined;
|
|
61
|
+
pageSizes?: number[] | undefined;
|
|
62
|
+
isGetAll?: 0 | 1 | undefined;
|
|
63
|
+
keyword?: string | undefined;
|
|
64
|
+
columnKey?: string | undefined;
|
|
65
|
+
order?: string | undefined;
|
|
66
|
+
showQuickJumper?: boolean | undefined;
|
|
67
|
+
showSizePicker?: boolean | undefined;
|
|
68
|
+
pageSlot?: number | undefined;
|
|
69
|
+
sorter?: ObjectKey<any> | undefined;
|
|
70
|
+
prefix?: ((info: {
|
|
71
|
+
startIndex: number;
|
|
72
|
+
endIndex: number;
|
|
73
|
+
page: number;
|
|
74
|
+
pageSize: number;
|
|
75
|
+
pageCount: number;
|
|
76
|
+
itemCount: number | undefined;
|
|
77
|
+
}) => VNodeChild) | undefined;
|
|
78
|
+
suffix?: ((info: {
|
|
79
|
+
startIndex: number;
|
|
80
|
+
endIndex: number;
|
|
81
|
+
page: number;
|
|
82
|
+
pageSize: number;
|
|
83
|
+
pageCount: number;
|
|
84
|
+
itemCount: number | undefined;
|
|
85
|
+
}) => VNodeChild) | undefined;
|
|
86
|
+
}>;
|
|
87
|
+
doSearch: (value: any) => void;
|
|
88
|
+
pageChange: (page: number) => void;
|
|
89
|
+
pageSizeChange: (pageSize: number) => void;
|
|
90
|
+
pageSorter: (options: ObjectKey) => void;
|
|
91
|
+
showTable: Ref<boolean>;
|
|
92
|
+
searchValue: Ref<{}>;
|
|
93
|
+
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, "on-update:value"[], "on-update:value", PublicProps, Readonly<ExtractPropTypes<{
|
|
94
|
+
init: {
|
|
95
|
+
type: PropType<Function>;
|
|
96
|
+
default: () => void;
|
|
97
|
+
};
|
|
98
|
+
loading: {
|
|
99
|
+
type: PropType<boolean>;
|
|
100
|
+
default: boolean;
|
|
101
|
+
};
|
|
102
|
+
searchData: {
|
|
103
|
+
required: true;
|
|
104
|
+
type: PropType<ISearchBarType>;
|
|
105
|
+
default: () => {};
|
|
106
|
+
};
|
|
107
|
+
columns: {
|
|
108
|
+
type: PropType<DataTableColumn<any>[]>;
|
|
109
|
+
default: () => never[];
|
|
110
|
+
};
|
|
111
|
+
columnsData: {
|
|
112
|
+
type: PropType<any[]>;
|
|
113
|
+
default: () => never[];
|
|
114
|
+
};
|
|
115
|
+
query: {
|
|
116
|
+
type: PropType<Query>;
|
|
117
|
+
default: () => {
|
|
118
|
+
page: number;
|
|
119
|
+
pageCount: number;
|
|
120
|
+
pageSize: number;
|
|
121
|
+
};
|
|
122
|
+
};
|
|
123
|
+
cols: {
|
|
124
|
+
type: PropType<number>;
|
|
125
|
+
default: number;
|
|
126
|
+
};
|
|
127
|
+
small: {
|
|
128
|
+
type: PropType<boolean>;
|
|
129
|
+
default: boolean;
|
|
130
|
+
};
|
|
131
|
+
resetButton: {
|
|
132
|
+
type: PropType<boolean>;
|
|
133
|
+
default: boolean;
|
|
134
|
+
};
|
|
135
|
+
height: {
|
|
136
|
+
type: PropType<string>;
|
|
137
|
+
default: string;
|
|
138
|
+
};
|
|
139
|
+
scrollX: {
|
|
140
|
+
type: PropType<string>;
|
|
141
|
+
default: null;
|
|
142
|
+
};
|
|
143
|
+
}>> & {
|
|
144
|
+
"onOn-update:value"?: ((...args: any[]) => any) | undefined;
|
|
145
|
+
}, {
|
|
146
|
+
small: boolean;
|
|
147
|
+
query: Query;
|
|
148
|
+
loading: boolean;
|
|
149
|
+
columns: DataTableColumn<any>[];
|
|
150
|
+
scrollX: string;
|
|
151
|
+
init: Function;
|
|
152
|
+
cols: number;
|
|
153
|
+
height: string;
|
|
154
|
+
searchData: ISearchBarType;
|
|
155
|
+
resetButton: boolean;
|
|
156
|
+
columnsData: any[];
|
|
157
|
+
}, {}>;
|
|
158
|
+
export default _default;
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components/index'
|
package/lib/one-core.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var Ko=Object.defineProperty;var Xo=(o,t,n)=>t in o?Ko(o,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):o[t]=n;var le=(o,t,n)=>(Xo(o,typeof t!="symbol"?t+"":t,n),n);Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),d=require("naive-ui"),F=require("vue-router"),Ce=require("axios"),ce=require("md5"),H=require("vue-i18n"),Qo=e.defineComponent({name:"OcSearchBarItem",components:{NIcon:d.NIcon,NButton:d.NButton,NGrid:d.NGrid,NGridItem:d.NGridItem,NInput:d.NInput,NInputNumber:d.NInputNumber,NSelect:d.NSelect,NPopover:d.NPopover,NDataTable:d.NDataTable,NCascader:d.NCascader,NTreeSelect:d.NTreeSelect,NDatePicker:d.NDatePicker,NInputGroup:d.NInputGroup,NInputGroupLabel:d.NInputGroupLabel},props:{value:{required:!0,type:Object,default:()=>({})},data:{required:!0,type:Object,default:()=>({})},cols:{type:Number,default:4},small:{type:Boolean,default:!1}},setup(o,{expose:t}){const n=e.ref(!0),l=e.ref(!0),r=e.ref(0),i=e.ref("{}"),s=e.ref({}),c=e.ref({}),p=e.ref([{key:"label"}]),m=(w,C,S)=>{const B=S.options.filter(O=>String(O.label).toLocaleLowerCase().indexOf(String(C).toLocaleLowerCase())>-1)||[];s.value[w].options=B,B.length===0?s.value[w].display=!1:s.value[w].display=!0},N=w=>{var O;Object.keys(w).forEach(a=>{const k=w[a];k.show=k.show??!0,k.type==="dropdown"&&(s.value[a]={display:!1,options:k.options})});let C=0;const S=o.small?1:o.cols,B=Object.keys(w);if(Object.keys(w).length>0)for(let a=0;a<=S;a++)(O=w[B[a]])!=null&&O.show&&(C=C+1);r.value=S-C>=0?S-C-1:-1,C>S?l.value=!0:l.value=!1,o.small&&(n.value=!1,l.value=!1),c.value=Object.assign({},o.value)},v=w=>{s.value[w].options.length===0?s.value[w].display=!1:s.value[w].display=!0},f=()=>{n.value=!n.value};return t({getValues:()=>{const w=JSON.stringify(c.value,(C,S)=>S===void 0?null:S);return JSON.parse(w)},clearValues:()=>{c.value=JSON.parse(i.value)}}),e.onMounted(()=>{i.value=JSON.stringify(o.value),N(o.data)}),e.watch(()=>o.value,w=>{c.value=Object.assign({},c.value,w)},{deep:!0}),e.watch(()=>o.data,w=>{N(w)},{deep:!0}),{more:l,offset:r,collapsed:n,searchData:c,dropDisplay:s,columnsPopover:p,showMore:f,dropValueChange:m,dropDisplayToggle:v}}}),$=(o,t)=>{const n=o.__vccOpts||o;for(const[l,r]of t)n[l]=r;return n},Zo={class:"oc-search-bar-line"},Yo={key:0,class:"oc-search-action-more"},et=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},[e.createElementVNode("g",{fill:"none"},[e.createElementVNode("path",{d:"M4.22 8.47a.75.75 0 0 1 1.06 0L12 15.19l6.72-6.72a.75.75 0 1 1 1.06 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L4.22 9.53a.75.75 0 0 1 0-1.06z",fill:"currentColor"})])],-1),ot=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},[e.createElementVNode("g",{fill:"none"},[e.createElementVNode("path",{d:"M4.22 15.53a.75.75 0 0 0 1.06 0L12 8.81l6.72 6.72a.75.75 0 1 0 1.06-1.06l-7.25-7.25a.75.75 0 0 0-1.06 0l-7.25 7.25a.75.75 0 0 0 0 1.06z",fill:"currentColor"})])],-1);function tt(o,t,n,l,r,i){const s=e.resolveComponent("NGridItem"),c=e.resolveComponent("NInputGroupLabel"),p=e.resolveComponent("NInput"),m=e.resolveComponent("NInputNumber"),N=e.resolveComponent("NSelect"),v=e.resolveComponent("NDataTable"),f=e.resolveComponent("NPopover"),h=e.resolveComponent("NCascader"),_=e.resolveComponent("NTreeSelect"),w=e.resolveComponent("NDatePicker"),C=e.resolveComponent("NInputGroup"),S=e.resolveComponent("NGrid"),B=e.resolveComponent("NIcon"),O=e.resolveComponent("NButton");return e.openBlock(),e.createElementBlock("div",Zo,[e.createVNode(S,{"x-gap":"15","y-gap":"15",cols:o.small?1:o.cols,"collapsed-rows":1,collapsed:o.collapsed},{default:e.withCtx(()=>[o.offset>-1?(e.openBlock(),e.createBlock(s,{key:0,offset:o.offset},null,8,["offset"])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.data,(a,k,P)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`${k}_${P}`},[a.show?(e.openBlock(),e.createBlock(s,{key:0},{default:e.withCtx(()=>[a.type!=="group"?(e.openBlock(),e.createBlock(C,{key:0},{default:e.withCtx(()=>{var E;return[e.createVNode(c,{class:"oc-group-label"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(typeof a.title=="string"?a.title:a.title()),1)]),_:2},1024),a.type==="input"?(e.openBlock(),e.createBlock(p,{key:0,value:o.searchData[k],"onUpdate:value":y=>o.searchData[k]=y,placeholder:typeof(a==null?void 0:a.placeholder)=="string"?a==null?void 0:a.placeholder:(a==null?void 0:a.placeholder)&&(a==null?void 0:a.placeholder()),"on-update:value":y=>{a.updateValue?a.updateValue(y,JSON.parse(JSON.stringify(o.searchData))):o.searchData[k]=y},clearable:a.clearable??!0},null,8,["value","onUpdate:value","placeholder","on-update:value","clearable"])):e.createCommentVNode("",!0),a.type==="number"?(e.openBlock(),e.createBlock(m,{key:1,value:o.searchData[k],"onUpdate:value":y=>o.searchData[k]=y,placeholder:typeof(a==null?void 0:a.placeholder)=="string"?a==null?void 0:a.placeholder:(a==null?void 0:a.placeholder)&&(a==null?void 0:a.placeholder()),min:a==null?void 0:a.min,max:a==null?void 0:a.max,step:(a==null?void 0:a.step)||1,"show-button":(a==null?void 0:a.showButton)||!0,"update-value-on-input":!1,validator:a==null?void 0:a.validator,"on-update:value":y=>{a.updateValue?a.updateValue(y,JSON.parse(JSON.stringify(o.searchData))):o.searchData[k]=y},clearable:a.clearable??!0},e.createSlots({_:2},[a!=null&&a.suffix?{name:"suffix",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a==null?void 0:a.suffix),1)]),key:"0"}:void 0]),1032,["value","onUpdate:value","placeholder","min","max","step","show-button","validator","on-update:value","clearable"])):e.createCommentVNode("",!0),a.type==="select"?(e.openBlock(),e.createBlock(N,{key:2,value:o.searchData[k],"onUpdate:value":y=>o.searchData[k]=y,"show-checkmark":!1,placeholder:typeof(a==null?void 0:a.placeholder)=="string"?a==null?void 0:a.placeholder:(a==null?void 0:a.placeholder)&&(a==null?void 0:a.placeholder()),options:a.options,multiple:a.multiple,"on-update:value":y=>{a.updateValue?a.updateValue(y,JSON.parse(JSON.stringify(o.searchData))):o.searchData[k]=y},clearable:a.clearable??!0,"max-tag-count":"responsive",filterable:"",style:{flex:"1",width:"0"}},null,8,["value","onUpdate:value","placeholder","options","multiple","on-update:value","clearable"])):e.createCommentVNode("",!0),a.type==="dropdown"?(e.openBlock(),e.createBlock(f,{key:3,width:"trigger",trigger:"manual",style:{padding:"5px"},"show-arrow":!1,show:(E=o.dropDisplay[k])==null?void 0:E.display,"on-clickoutside":()=>{o.dropDisplay[k].display=!1}},{trigger:e.withCtx(()=>[e.createVNode(p,{value:o.searchData[k],placeholder:typeof(a==null?void 0:a.placeholder)=="string"?a==null?void 0:a.placeholder:(a==null?void 0:a.placeholder)&&(a==null?void 0:a.placeholder()),clearable:a.clearable??!0,"on-update:value":y=>{o.searchData[k]=y,o.dropValueChange(k,y,a)},onClick:y=>o.dropDisplayToggle(k),onFocus:y=>o.dropDisplayToggle(k)},null,8,["value","placeholder","clearable","on-update:value","onClick","onFocus"])]),default:e.withCtx(()=>{var y;return[e.createVNode(v,{columns:o.columnsPopover,data:((y=o.dropDisplay[k])==null?void 0:y.options)||[],"max-height":300,bordered:!1,"bottom-bordered":!1,"row-props":R=>({style:"cursor: pointer;",onClick:()=>{o.searchData[k]=R.value,o.dropDisplay[k].display=!1}}),size:"small","virtual-scroll":"",class:"oc-popover-table"},null,8,["columns","data","row-props"])]}),_:2},1032,["show","on-clickoutside"])):e.createCommentVNode("",!0),a.type==="cascader"?(e.openBlock(),e.createBlock(h,{key:4,value:o.searchData[k],"onUpdate:value":y=>o.searchData[k]=y,placeholder:typeof(a==null?void 0:a.placeholder)=="string"?a==null?void 0:a.placeholder:(a==null?void 0:a.placeholder)&&(a==null?void 0:a.placeholder()),options:a.options,"check-strategy":a.checkStrategy||"all",multiple:a.multiple,"on-update:value":y=>{a.updateValue?a.updateValue(y,JSON.parse(JSON.stringify(o.searchData))):o.searchData[k]=y},clearable:a.clearable??!0,"max-tag-count":"responsive",filterable:""},null,8,["value","onUpdate:value","placeholder","options","check-strategy","multiple","on-update:value","clearable"])):e.createCommentVNode("",!0),a.type==="treeSelect"?(e.openBlock(),e.createBlock(_,{key:5,value:o.searchData[k],"onUpdate:value":y=>o.searchData[k]=y,placeholder:typeof(a==null?void 0:a.placeholder)=="string"?a==null?void 0:a.placeholder:(a==null?void 0:a.placeholder)&&(a==null?void 0:a.placeholder()),options:a.options,"check-strategy":a.checkStrategy||"all",multiple:a.multiple,"on-update:value":y=>{a.updateValue?a.updateValue(y,JSON.parse(JSON.stringify(o.searchData))):o.searchData[k]=y},clearable:a.clearable??!0,"max-tag-count":"responsive",filterable:""},null,8,["value","onUpdate:value","placeholder","options","check-strategy","multiple","on-update:value","clearable"])):e.createCommentVNode("",!0),a.type==="datePicker"?(e.openBlock(),e.createBlock(w,{key:6,value:o.searchData[k],"onUpdate:value":y=>o.searchData[k]=y,placeholder:typeof(a==null?void 0:a.placeholder)=="string"?a==null?void 0:a.placeholder:(a==null?void 0:a.placeholder)&&(a==null?void 0:a.placeholder()),type:a.dateType,format:a==null?void 0:a.format,"is-date-disabled":a==null?void 0:a.isDateDisabled,shortcuts:a==null?void 0:a.shortcuts,"update-value-on-close":a.dateType!=="year","on-update:value":y=>{a.updateValue?a.updateValue(y,JSON.parse(JSON.stringify(o.searchData))):o.searchData[k]=y},clearable:a.clearable??!0,"close-on-select":""},null,8,["value","onUpdate:value","placeholder","type","format","is-date-disabled","shortcuts","update-value-on-close","on-update:value","clearable"])):e.createCommentVNode("",!0)]}),_:2},1024)):e.createCommentVNode("",!0),a.type==="group"?(e.openBlock(),e.createBlock(C,{key:1},{default:e.withCtx(()=>{var E,y,R,J,W,G,K,X,V,b,T,z,M,g,L,Oe,ze,Ae,Re,Le,qe,je,Ue,Fe,Ge;return[e.createVNode(N,{value:o.searchData[k],"onUpdate:value":D=>o.searchData[k]=D,options:a.options,"show-checkmark":!1,style:e.normalizeStyle(a.width?typeof a.width=="number"?{width:`${a.width}px`}:{width:a.width}:{}),"on-update:value":D=>{a.updateValue?a.updateValue(D,JSON.parse(JSON.stringify(o.searchData))):o.searchData[k]=D},class:"oc-group-select",placeholder:" "},null,8,["value","onUpdate:value","options","style","on-update:value"]),a.input.type==="input"?(e.openBlock(),e.createBlock(p,{key:0,value:o.searchData[a.input.key],"onUpdate:value":D=>o.searchData[a.input.key]=D,placeholder:typeof((E=a.input)==null?void 0:E.placeholder)=="string"?(y=a.input)==null?void 0:y.placeholder:((R=a.input)==null?void 0:R.placeholder)&&((J=a.input)==null?void 0:J.placeholder()),"on-update:value":D=>{a.input.updateValue?a.input.updateValue(D,JSON.parse(JSON.stringify(o.searchData))):o.searchData[a.input.key]=D},clearable:a.input.clearable??!0,style:{flex:"1"}},null,8,["value","onUpdate:value","placeholder","on-update:value","clearable"])):e.createCommentVNode("",!0),a.input.type==="number"?(e.openBlock(),e.createBlock(m,{key:1,value:o.searchData[a.input.key],"onUpdate:value":D=>o.searchData[a.input.key]=D,placeholder:typeof((W=a.input)==null?void 0:W.placeholder)=="string"?(G=a.input)==null?void 0:G.placeholder:((K=a.input)==null?void 0:K.placeholder)&&((X=a.input)==null?void 0:X.placeholder()),min:(V=a.input)==null?void 0:V.min,max:(b=a.input)==null?void 0:b.max,step:((T=a.input)==null?void 0:T.step)||1,"show-button":((z=a.input)==null?void 0:z.showButton)||!0,"update-value-on-input":!1,validator:(M=a.input)==null?void 0:M.validator,"on-update:value":D=>{a.input.updateValue?a.input.updateValue(D,JSON.parse(JSON.stringify(o.searchData))):o.searchData[a.input.key]=D},clearable:a.input.clearable??!0,style:{flex:"1"}},e.createSlots({_:2},[(g=a.input)!=null&&g.suffix?{name:"suffix",fn:e.withCtx(()=>{var D;return[e.createTextVNode(e.toDisplayString((D=a.input)==null?void 0:D.suffix),1)]}),key:"0"}:void 0]),1032,["value","onUpdate:value","placeholder","min","max","step","show-button","validator","on-update:value","clearable"])):e.createCommentVNode("",!0),a.input.type==="datePicker"?(e.openBlock(),e.createBlock(w,{key:2,value:o.searchData[a.input.key],"onUpdate:value":D=>o.searchData[a.input.key]=D,placeholder:typeof((L=a.input)==null?void 0:L.placeholder)=="string"?(Oe=a.input)==null?void 0:Oe.placeholder:((ze=a.input)==null?void 0:ze.placeholder)&&((Ae=a.input)==null?void 0:Ae.placeholder()),type:a.input.dateType,format:(Re=a.input)==null?void 0:Re.format,"is-date-disabled":(Le=a.input)==null?void 0:Le.isDateDisabled,shortcuts:(qe=a.input)==null?void 0:qe.shortcuts,"update-value-on-close":a.input.dateType!=="year","on-update:value":D=>{a.input.updateValue?a.input.updateValue(D,JSON.parse(JSON.stringify(o.searchData))):o.searchData[a.input.key]=D},clearable:a.input.clearable??!0,"close-on-select":"",style:{flex:"1"}},null,8,["value","onUpdate:value","placeholder","type","format","is-date-disabled","shortcuts","update-value-on-close","on-update:value","clearable"])):e.createCommentVNode("",!0),a.input.type==="select"?(e.openBlock(),e.createBlock(N,{key:3,value:o.searchData[a.input.key],"onUpdate:value":D=>o.searchData[a.input.key]=D,"show-checkmark":!1,placeholder:typeof((je=a.input)==null?void 0:je.placeholder)=="string"?(Ue=a.input)==null?void 0:Ue.placeholder:((Fe=a.input)==null?void 0:Fe.placeholder)&&((Ge=a.input)==null?void 0:Ge.placeholder()),options:a.input.options,multiple:a.input.multiple,"on-update:value":D=>{a.input.updateValue?a.input.updateValue(D,JSON.parse(JSON.stringify(o.searchData))):o.searchData[a.input.key]=D},clearable:a.input.clearable??!0,"max-tag-count":"responsive",filterable:"",style:{flex:"1",width:"0"}},null,8,["value","onUpdate:value","placeholder","options","multiple","on-update:value","clearable"])):e.createCommentVNode("",!0)]}),_:2},1024)):e.createCommentVNode("",!0)]),_:2},1024)):e.createCommentVNode("",!0)],64))),128))]),_:1},8,["cols","collapsed"]),o.more?(e.openBlock(),e.createElementBlock("div",Yo,[o.collapsed?(e.openBlock(),e.createBlock(O,{key:0,onClick:o.showMore},{icon:e.withCtx(()=>[e.createVNode(B,null,{default:e.withCtx(()=>[et]),_:1})]),_:1},8,["onClick"])):(e.openBlock(),e.createBlock(O,{key:1,onClick:o.showMore},{icon:e.withCtx(()=>[e.createVNode(B,null,{default:e.withCtx(()=>[ot]),_:1})]),_:1},8,["onClick"]))])):e.createCommentVNode("",!0)])}const nt=$(Qo,[["render",tt]]),at=e.defineComponent({name:"OcSearchBar",components:{NSpace:d.NSpace,NIcon:d.NIcon,NTooltip:d.NTooltip,NButton:d.NButton,NPopover:d.NPopover,OcSearchBarItem:nt},props:{value:{required:!0,type:Object,default:()=>({})},data:{required:!0,type:Object,default:()=>({})},loading:{type:Boolean,default:!1},cols:{type:Number,default:4},small:{type:Boolean,default:!1},resetButton:{type:Boolean,default:!0}},emits:["update:loading","on-update:value"],setup(o,{emit:t,slots:n}){const l=e.ref(),r=e.ref(!!n.header),i=e.ref(window.screen.availWidth<=1300),s=()=>{if(!o.loading&&l.value){const m=l.value.getValues();t("update:loading",!0),t("on-update:value",m)}},c=()=>{o.loading||(l.value.clearValues(),s())},p=()=>{i.value=window.screen.availWidth<=1300};return e.onMounted(()=>{window.addEventListener("resize",p)}),e.onBeforeUnmount(()=>{window.removeEventListener("resize",p)}),{itemRef:l,isSlotHeader:r,availWidth:i,doSearch:s,clearAll:c}}}),rt={key:0,class:"oc-search-bar-title"},lt={key:1,class:"oc-search-bar-popover"},st=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},[e.createElementVNode("path",{d:"M26 6H4v3.17l7.41 7.42l.59.58V26h4v-2h2v2a2 2 0 0 1-2 2h-4a2 2 0 0 1-2-2v-8l-7.41-7.41A2 2 0 0 1 2 9.17V6a2 2 0 0 1 2-2h22z",fill:"currentColor"}),e.createElementVNode("path",{d:"M29.71 11.29l-3-3a1 1 0 0 0-1.42 0L16 17.59V22h4.41l9.3-9.29a1 1 0 0 0 0-1.42zM19.59 20H18v-1.59l5-5L24.59 15zM26 13.59L24.41 12L26 10.41L27.59 12z",fill:"currentColor"})],-1),ct={class:"oc-search-bar-popover-content"},it=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},[e.createElementVNode("g",{fill:"none"},[e.createElementVNode("path",{d:"M10 2.75a7.25 7.25 0 0 1 5.63 11.819l4.9 4.9a.75.75 0 0 1-.976 1.134l-.084-.073l-4.901-4.9A7.25 7.25 0 1 1 10 2.75zm0 1.5a5.75 5.75 0 1 0 0 11.5a5.75 5.75 0 0 0 0-11.5z",fill:"currentColor"})])],-1),dt=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},[e.createElementVNode("g",{fill:"none"},[e.createElementVNode("path",{d:"M16.25 5.18a.75.75 0 0 0 .142 1.051a7.251 7.251 0 0 1-3.599 12.976l.677-.677a.75.75 0 0 0-.977-1.133l-.084.073l-2 2a.75.75 0 0 0-.073.976l.073.084l2 2a.75.75 0 0 0 1.133-.976l-.072-.084l-.75-.75A8.75 8.75 0 0 0 17.301 5.04a.75.75 0 0 0-1.051.141zm-5.72-3.71a.75.75 0 0 0 0 1.06l.75.75a8.75 8.75 0 0 0-4.85 15.47a.75.75 0 1 0 .956-1.157a7.251 7.251 0 0 1 3.82-12.8l-.676.677a.75.75 0 1 0 1.061 1.06l2-2a.75.75 0 0 0 0-1.06l-2-2a.75.75 0 0 0-1.06 0z",fill:"currentColor"})])],-1),ut={class:"oc-search-bar-center"},pt=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},[e.createElementVNode("g",{fill:"none"},[e.createElementVNode("path",{d:"M10 2.75a7.25 7.25 0 0 1 5.63 11.819l4.9 4.9a.75.75 0 0 1-.976 1.134l-.084-.073l-4.901-4.9A7.25 7.25 0 1 1 10 2.75zm0 1.5a5.75 5.75 0 1 0 0 11.5a5.75 5.75 0 0 0 0-11.5z",fill:"currentColor"})])],-1),mt=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},[e.createElementVNode("g",{fill:"none"},[e.createElementVNode("path",{d:"M16.25 5.18a.75.75 0 0 0 .142 1.051a7.251 7.251 0 0 1-3.599 12.976l.677-.677a.75.75 0 0 0-.977-1.133l-.084.073l-2 2a.75.75 0 0 0-.073.976l.073.084l2 2a.75.75 0 0 0 1.133-.976l-.072-.084l-.75-.75A8.75 8.75 0 0 0 17.301 5.04a.75.75 0 0 0-1.051.141zm-5.72-3.71a.75.75 0 0 0 0 1.06l.75.75a8.75 8.75 0 0 0-4.85 15.47a.75.75 0 1 0 .956-1.157a7.251 7.251 0 0 1 3.82-12.8l-.676.677a.75.75 0 1 0 1.061 1.06l2-2a.75.75 0 0 0 0-1.06l-2-2a.75.75 0 0 0-1.06 0z",fill:"currentColor"})])],-1);function ft(o,t,n,l,r,i){const s=e.resolveComponent("NIcon"),c=e.resolveComponent("NButton"),p=e.resolveComponent("OcSearchBarItem"),m=e.resolveComponent("NTooltip"),N=e.resolveComponent("NSpace"),v=e.resolveComponent("NPopover");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["oc-search-bar",{small:!o.isSlotHeader&&(o.small||o.availWidth)}])},[o.isSlotHeader?(e.openBlock(),e.createElementBlock("span",rt,[e.renderSlot(o.$slots,"header")])):e.createCommentVNode("",!0),o.small||o.availWidth?(e.openBlock(),e.createElementBlock("div",lt,[e.createVNode(m,{trigger:"hover"},{trigger:e.withCtx(()=>[e.createVNode(v,{placement:"bottom","display-directive":"show",trigger:"click","show-arrow":!1,to:!1},{trigger:e.withCtx(()=>[e.createVNode(c,{class:"oc-search-bar-popover-button"},{icon:e.withCtx(()=>[e.createVNode(s,null,{default:e.withCtx(()=>[st]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("div",ct,[e.createVNode(p,{ref:"itemRef",value:o.value,data:o.data,loading:o.loading,small:""},null,8,["value","data","loading"]),e.createVNode(N,{justify:"end",size:15,wrap:!1,class:"oc-search-bar-popover-action"},{default:e.withCtx(()=>[e.createVNode(m,{trigger:"hover"},{trigger:e.withCtx(()=>[e.createVNode(c,{loading:o.loading,class:"button-primary",onClick:o.doSearch},{icon:e.withCtx(()=>[e.createVNode(s,null,{default:e.withCtx(()=>[it]),_:1})]),_:1},8,["loading","onClick"])]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(o.$t("Common.search")),1)]),_:1}),o.resetButton?(e.openBlock(),e.createBlock(m,{key:0,trigger:"hover"},{trigger:e.withCtx(()=>[e.createVNode(c,{loading:o.loading,onClick:o.clearAll},{icon:e.withCtx(()=>[e.createVNode(s,null,{default:e.withCtx(()=>[dt]),_:1})]),_:1},8,["loading","onClick"])]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(o.$t("Common.reset")),1)]),_:1})):e.createCommentVNode("",!0)]),_:1})])]),_:1})]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(o.$t("Common.filter")),1)]),_:1}),e.createVNode(N,{size:15,wrap:!1,class:"oc-search-action"},{default:e.withCtx(()=>[e.renderSlot(o.$slots,"action")]),_:3})])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createElementVNode("div",ut,[e.createVNode(p,{ref:"itemRef",value:o.value,data:o.data,loading:o.loading,cols:o.cols},null,8,["value","data","loading","cols"]),e.createVNode(N,{size:15,wrap:!1,style:{"padding-left":"15px"}},{default:e.withCtx(()=>[e.createVNode(m,{trigger:"hover"},{trigger:e.withCtx(()=>[e.createVNode(c,{loading:o.loading,class:"button-primary",onClick:o.doSearch},{icon:e.withCtx(()=>[e.createVNode(s,null,{default:e.withCtx(()=>[pt]),_:1})]),_:1},8,["loading","onClick"])]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(o.$t("Common.search")),1)]),_:1}),o.resetButton?(e.openBlock(),e.createBlock(m,{key:0,trigger:"hover"},{trigger:e.withCtx(()=>[e.createVNode(c,{loading:o.loading,onClick:o.clearAll},{icon:e.withCtx(()=>[e.createVNode(s,null,{default:e.withCtx(()=>[mt]),_:1})]),_:1},8,["loading","onClick"])]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(o.$t("Common.reset")),1)]),_:1})):e.createCommentVNode("",!0)]),_:1})]),e.createVNode(N,{size:15,wrap:!1,class:"oc-search-action"},{default:e.withCtx(()=>[e.renderSlot(o.$slots,"action")]),_:3})],64))],2)}const ye=$(at,[["render",ft]]),ht=e.defineComponent({name:"OcTable",components:{NDataTable:d.NDataTable,OcSearchBar:ye},props:{init:{type:Function,default:()=>{}},loading:{type:Boolean,default:!1},searchData:{required:!0,type:Object,default:()=>({})},columns:{type:Array,default:()=>[]},columnsData:{type:Array,default:()=>[]},query:{type:Object,default:()=>({page:1,pageCount:1,pageSize:30})},cols:{type:Number,default:4},small:{type:Boolean,default:!1},resetButton:{type:Boolean,default:!0},height:{type:String,default:""},scrollX:{type:String,default:null}},emits:["on-update:value"],setup(o,{emit:t}){const n=e.ref(!0),l=e.ref({}),r=e.ref({page:1,pageCount:1,pageSize:30}),i=m=>{o.loading||t("on-update:value",m)},s=m=>{r.value.page=m,o.init()},c=m=>{r.value.pageSize=m,r.value.page=1,o.init()},p=m=>{r.value.sorter=m,o.init()};return e.onMounted(()=>{const m={};l.value=m,(!o.columns||o.columns.length===0)&&(n.value=!1)}),e.watch(()=>o.query,m=>{r.value=m}),{query:r,doSearch:i,pageChange:s,pageSizeChange:c,pageSorter:p,showTable:n,searchValue:l}}}),gt={key:0,class:"com-card"};function wt(o,t,n,l,r,i){const s=e.resolveComponent("OcSearchBar"),c=e.resolveComponent("NDataTable");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(s,{loading:o.loading,value:o.searchValue,data:o.searchData,cols:o.cols,small:o.small,resetButton:o.resetButton,"onOnUpdate:value":o.doSearch},{header:e.withCtx(()=>[e.renderSlot(o.$slots,"header")]),action:e.withCtx(()=>[e.renderSlot(o.$slots,"action")]),_:3},8,["loading","value","data","cols","small","resetButton","onOnUpdate:value"]),o.showTable?(e.openBlock(),e.createElementBlock("div",gt,[e.createVNode(c,{columns:o.columns,data:o.columnsData,loading:o.loading,pagination:o.query,"on-update:page":o.pageChange,"on-update:page-size":o.pageSizeChange,"on-update:sorter":o.pageSorter,"min-height":o.height,"max-height":o.height,"scroll-x":o.scrollX,remote:""},null,8,["columns","data","loading","pagination","on-update:page","on-update:page-size","on-update:sorter","min-height","max-height","scroll-x"])])):e.createCommentVNode("",!0)])}const to=$(ht,[["render",wt]]),q=F.createRouter({history:F.createWebHistory(),routes:[],scrollBehavior:()=>({left:0,top:0})}),he=document.querySelector("html");q.beforeEach(()=>{he==null||he.removeAttribute("style")});const Nt=Object.prototype.hasOwnProperty;function no(o,t){const n=[];for(const l in o){if(!Nt.call(o,l))continue;const r=o[l],i=encodeURIComponent(l);let s;typeof r=="object"?s=no(r,t?t+"["+i+"]":i):s=(t?t+"["+i+"]":i)+"="+encodeURIComponent(r),n.push(s)}return n.join("&")}const{notification:ge}=d.createDiscreteApi(["notification"],{configProviderProps:{themeOverrides:{common:{borderRadius:"16px",borderRadiusSmall:"8px",primaryColor:"#8e54c8",primaryColorHover:"#9b66d0",primaryColorPressed:"#8e54c8",primaryColorSuppl:"#8e54c8",infoColor:"#2080f0",infoColorHover:"#57a4fd",infoColorPressed:"#2080f0",infoColorSuppl:"#2080f0",successColor:"#5dae57",successColorHover:"#70ce69",successColorPressed:"#5dae57",successColorSuppl:"#5dae57",warningColor:"#f0973a",warningColorHover:"#ffb05d",warningColorPressed:"#f0973a",warningColorSuppl:"#f0973a",errorColor:"#e65444",errorColorHover:"#fc6c5d",errorColorPressed:"#e65444",errorColorSuppl:"#e65444",cardColor:"#fff"},Button:{textColor:"rgb(var(--font))"},Notification:{borderRadius:"16px"}}},notificationProviderProps:{placement:"top"}}),ne=Ce.create({timeout:3e5,responseType:"json",headers:{platformType:"T1"}});let ve=Ce.CancelToken.source();ne.interceptors.request.use(o=>{var n;o.cancelToken=ve.token;const t=A("token",!1);if(o.headers&&t&&(o.headers["X-Auth-Token"]=t),((n=o.method)==null?void 0:n.toLocaleUpperCase())==="GET"){const l=no(o.data);l&&(o.url=`${o.url}?${l}`)}return o},o=>Promise.reject(o));ne.interceptors.response.use(o=>{const t=o.data;if(o.config.responseType==="blob"||o.config.responseType==="text")return Promise.resolve(o.data);if(t.ok)return Promise.resolve(t.data);{let n=t.message;return(n.indexOf("Connection refused")>-1||n.indexOf("finishConnect")>-1)&&(n="网络错误,请稍后重试"),ge.error({content:n,duration:3e3}),Promise.reject(n)}},o=>{if(o&&o.code==="ECONNABORTED"&&o.config&&o.config.url&&o.config.url.indexOf("auth/user/getCurrentUserInfo")>-1&&(bo(),q.replace("/custom/500")),o&&o.response)switch(o.response.status){case 401:case 403:ae("token"),window.location.href="/login";break;default:return ge.destroyAll(),ge.error({content:"系统正在维护中,请稍后再试!",duration:3e3}),Promise.reject()}else return Promise.reject()});const vt=()=>{ve.cancel(),ve=Ce.CancelToken.source()},I=e.reactive({needUpdate:!1,download:!1,theme:!1,lang:"zh-CN",platformName:"智能效率监测平台",platformType:"T1",platformUrl:"/iot/home/all"});function be(o){I.download=o}function Ct(o){I.lang=o}function ee(o){j("lang",o,0),I.lang=o;const t=document.body;t.dataset.lang=o}function ke(o){I.theme=o;const t=document.body,n=document.querySelector("meta[name=theme-color]");n&&(o?(n.setAttribute("content","#2b2b2d"),t.dataset.theme="dark"):(n.setAttribute("content","#ffffff"),t.dataset.theme=""))}function ao(o){I.platformName=o.platformName,I.platformType=o.platformType,I.platformUrl=o.platformUrl}function yt(o){I.platformName=o}function bt(o){I.needUpdate=o}const kt=()=>x("api/auth/user/logout"),_t=()=>x("api/manager/message/markReadAll"),Vt=()=>x("api/auth/user/updateTenantRenewalStatus"),$t=o=>x("api/manager/job/remove",o),St=o=>x("api/manager/job/retry",{jobId:o}),Bt=o=>new Promise((t,n)=>{const l=me(o);x("api/manager/job/page",l).then(r=>{const i=pe(r);t(i)}).catch(()=>{n()})}),ro=o=>new Promise((t,n)=>{const l=new FormData;l.append("jobType","EXPORT"),Object.keys(o).forEach(r=>{o.query&&r==="query"?l.append("query",JSON.stringify(o.query)):l.append(r,o[r])}),Ie("api/manager/job/submit",l).then(()=>{be(!0),t()}).catch(r=>{n(r)})}),It=o=>new Promise((t,n)=>{const l=me(o);l.status===-1&&(l.status=""),x("api/manager/message/messagePage",l).then(r=>{const i=pe(r);t({data:i,unRead:r.unRead})}).catch(()=>{n()})}),Tt=o=>x("api/manager/message/markRead",{messageId:o}),He=o=>{const t=JSON.parse(JSON.stringify(o));return t.password=ce(t.password),x("api/user/v2/login",t)},Dt=()=>new Promise((o,t)=>{x("api/auth/user/getCurrentUserInfo",{},"json",1e4).then(n=>{const l=["046459"];n.commissioner=!1,l.includes(String(n.tenantLoginCode))&&(n.commissioner=!0);const r=n.ownedProducts?JSON.parse(n.ownedProducts):[];switch(r.includes(2)?n.platform_tdm=!0:n.platform_tdm=!1,r.includes(3)?n.platform_qms=!0:n.platform_qms=!1,r.includes(4)?n.platform_twin=!0:n.platform_twin=!1,r.includes(5)?n.platform_maintain=!0:n.platform_maintain=!1,r.includes(6)?n.platform_simple_tdm=!0:n.platform_simple_tdm=!1,n.systemType){case"Premium":n.systemType=1;break;case"Flagship":n.systemType=2;break;default:n.systemType=0;break}n.info=JSON.parse(n.info),o(n)}).catch(()=>{t()})});let lo=!0;const u=e.reactive({commissioner:!1,factoryId:"",tenantLoginCode:"",thirdUserId:"",userId:"",email:"",name:"",realName:"",phone:"",description:"",tenantName:"",oeeStatus:0,ncFlg:0,info:{type:0,id:"",viewType:1,interval:5,theme:"light"},kind:0,systemType:0,password:"",enable:!0,platform_tdm:!1,platform_qms:!1,platform_twin:!1,platform_maintain:!1,platform_simple_tdm:!1,authorizationGroupArray:[],authorizationMachineArray:[],iot_menu_authorization:[],tdm_menu_authorization:[],qms_menu_authorization:[],endTime:0,tenantStatus:1,renewalStatus:0,roleId:1,industryCategory:"0"});function Pt(o){lo=o}function _e(o){const t=window.location.host;if(t.includes("partexiot")){const n=A("token",!1);u.industryCategory=o.industryCategory||"0",!t.includes("vpn")&&lo&&(o.industryCategory==="0"&&t.includes("printing")&&(window.location.href=`https://www.partexiot.cn/auth?auth=${n}`),o.industryCategory==="1"&&!t.includes("printing")&&(window.location.href=`https://printing.partexiot.cn/auth?auth=${n}`))}if(u.commissioner=o.commissioner,u.factoryId=o.factoryId,u.tenantLoginCode=o.tenantLoginCode,u.userId=o.userId,u.email=o.email,u.name=o.name,u.realName=o.realName,u.tenantName=o.tenantName,u.phone=o.phone,u.info=o.info,u.kind=o.kind,u.oeeStatus=o.oeeStatus||0,u.ncFlg=o.ncFlg||0,u.systemType=o.systemType,u.platform_tdm=o.platform_tdm,u.platform_qms=o.platform_qms,u.platform_twin=o.platform_twin,u.platform_maintain=o.platform_maintain,u.platform_simple_tdm=o.platform_simple_tdm,u.authorizationGroupArray=o.authorizationGroupArray||[],u.authorizationMachineArray=o.authorizationMachineArray||[],u.iot_menu_authorization=o.iot_menu_authorization||[],u.tdm_menu_authorization=o.tdm_menu_authorization||[],u.qms_menu_authorization=o.qms_menu_authorization||[],u.endTime=o.endTime??0,u.tenantStatus=o.tenantStatus??1,u.renewalStatus=o.renewalStatus??0,u.roleId=o.roleId||0,u.kind===1){const n=o.info,l=String(o.info.type);l==="0"&&q.replace(`/dashboard/list?machGroupId=${n.id}&theme=${n.theme||"light"}`),l==="1"&&q.replace(`/dashboard/single?machId=${n.id}&type=${n.viewType??1}&theme=${n.theme||"light"}`),l==="2"&&q.push(`/dashboard/carousel?theme=${n.theme||"light"}`),l==="3"&&q.push(`/dashboard/carouselist?theme=${n.theme||"light"}`),l==="4"&&q.push(`/dashboard/performance?schemeId=${n.id}&theme=${n.theme||"light"}`)}}function ie(){return new Promise((o,t)=>{Dt().then(n=>{_e(n),o(n)}).catch(()=>{t()})})}function de(){u.factoryId="",u.commissioner=!1,u.tenantLoginCode="",u.userId="",u.email="",u.name="",u.realName="",u.tenantName="",u.phone="",u.description="",u.info={type:0,id:"",viewType:1,interval:5,theme:"light"},u.kind=0,u.systemType=0,u.oeeStatus=0,u.ncFlg=0,u.password="",u.enable=!0,u.platform_tdm=!1,u.platform_qms=!1,u.platform_twin=!1,u.platform_maintain=!1,u.platform_simple_tdm=!1,u.authorizationGroupArray=[],u.authorizationMachineArray=[],u.iot_menu_authorization=[],u.tdm_menu_authorization=[],u.qms_menu_authorization=[],u.endTime=0,u.tenantStatus=1,u.renewalStatus=0,u.roleId=1}async function Ve(){await kt().catch(()=>null),ae("token"),de(),window.location.href="/login"}const Et={},Mt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},xt=e.createElementVNode("g",{fill:"none"},[e.createElementVNode("path",{d:"M12 1.996a7.49 7.49 0 0 1 7.496 7.25l.004.25v4.097l1.38 3.156a1.249 1.249 0 0 1-1.145 1.75L15 18.502a3 3 0 0 1-5.995.177L9 18.499H4.275a1.251 1.251 0 0 1-1.147-1.747L4.5 13.594V9.496c0-4.155 3.352-7.5 7.5-7.5zM13.5 18.5l-3 .002a1.5 1.5 0 0 0 2.993.145l.007-.147zM12 3.496c-3.32 0-6 2.674-6 6v4.41L4.656 17h14.697L18 13.907V9.509l-.003-.225A5.988 5.988 0 0 0 12 3.496z",fill:"currentColor"})],-1),Ot=[xt];function zt(o,t){return e.openBlock(),e.createElementBlock("svg",Mt,Ot)}const so=$(Et,[["render",zt]]),At={},Rt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Lt=e.createElementVNode("g",{fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("path",{d:"M8 6h12"}),e.createElementVNode("path",{d:"M6 12h12"}),e.createElementVNode("path",{d:"M4 18h12"})],-1),qt=[Lt];function jt(o,t){return e.openBlock(),e.createElementBlock("svg",Rt,qt)}const co=$(At,[["render",jt]]),Ut={},Ft={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Gt=e.createElementVNode("g",{fill:"none"},[e.createElementVNode("path",{d:"M15.53 4.22a.75.75 0 0 1 0 1.06L8.81 12l6.72 6.72a.75.75 0 1 1-1.06 1.06l-7.25-7.25a.75.75 0 0 1 0-1.06l7.25-7.25a.75.75 0 0 1 1.06 0z",fill:"currentColor"})],-1),Ht=[Gt];function Jt(o,t){return e.openBlock(),e.createElementBlock("svg",Ft,Ht)}const io=$(Ut,[["render",Jt]]),Wt={},Kt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Xt=e.createElementVNode("g",{fill:"none"},[e.createElementVNode("path",{d:"M16.53 11.72l-.084-.072a.75.75 0 0 0-.976.072l-2.72 2.72V7.75l-.007-.102A.75.75 0 0 0 12 7l-.102.007a.75.75 0 0 0-.648.743v6.692L8.53 11.72l-.085-.073a.75.75 0 0 0-.976 1.133l4 4.002l.084.072a.75.75 0 0 0 .976-.072l4.001-4l.073-.085a.75.75 0 0 0-.073-.977zM6.25 3A3.25 3.25 0 0 0 3 6.25v11.5A3.25 3.25 0 0 0 6.25 21h11.5A3.25 3.25 0 0 0 21 17.75V6.25A3.25 3.25 0 0 0 17.75 3H6.25zM4.5 6.25c0-.966.784-1.75 1.75-1.75h11.5c.966 0 1.75.784 1.75 1.75v11.5a1.75 1.75 0 0 1-1.75 1.75H6.25a1.75 1.75 0 0 1-1.75-1.75V6.25z",fill:"currentColor"})],-1),Qt=[Xt];function Zt(o,t){return e.openBlock(),e.createElementBlock("svg",Kt,Qt)}const uo=$(Wt,[["render",Zt]]),Yt={},en={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},on=e.createElementVNode("g",{fill:"none"},[e.createElementVNode("path",{d:"M20.026 17.001c-2.762 4.784-8.879 6.423-13.663 3.661A9.965 9.965 0 0 1 3.13 17.68a.75.75 0 0 1 .365-1.132c3.767-1.348 5.785-2.91 6.956-5.146c1.232-2.353 1.551-4.93.689-8.463a.75.75 0 0 1 .769-.927a9.961 9.961 0 0 1 4.457 1.327c4.784 2.762 6.423 8.879 3.66 13.662z",fill:"currentColor"})],-1),tn=[on];function nn(o,t){return e.openBlock(),e.createElementBlock("svg",en,tn)}const po=$(Yt,[["render",nn]]),an={},rn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},ln=e.createElementVNode("g",{fill:"none"},[e.createElementVNode("path",{d:"M12 2a.75.75 0 0 1 .75.75v1.5a.75.75 0 0 1-1.5 0v-1.5A.75.75 0 0 1 12 2zm5 10a5 5 0 1 1-10 0a5 5 0 0 1 10 0zm4.25.75a.75.75 0 0 0 0-1.5h-1.5a.75.75 0 0 0 0 1.5h1.5zM12 19a.75.75 0 0 1 .75.75v1.5a.75.75 0 0 1-1.5 0v-1.5A.75.75 0 0 1 12 19zm-7.75-6.25a.75.75 0 0 0 0-1.5h-1.5a.75.75 0 0 0 0 1.5h1.5zm-.03-8.53a.75.75 0 0 1 1.06 0l1.5 1.5a.75.75 0 0 1-1.06 1.06l-1.5-1.5a.75.75 0 0 1 0-1.06zm1.06 15.56a.75.75 0 1 1-1.06-1.06l1.5-1.5a.75.75 0 1 1 1.06 1.06l-1.5 1.5zm14.5-15.56a.75.75 0 0 0-1.06 0l-1.5 1.5a.75.75 0 0 0 1.06 1.06l1.5-1.5a.75.75 0 0 0 0-1.06zm-1.06 15.56a.75.75 0 1 0 1.06-1.06l-1.5-1.5a.75.75 0 1 0-1.06 1.06l1.5 1.5z",fill:"currentColor"})],-1),sn=[ln];function cn(o,t){return e.openBlock(),e.createElementBlock("svg",rn,sn)}const mo=$(an,[["render",cn]]),dn={},un={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},pn=e.createElementVNode("g",{fill:"none"},[e.createElementVNode("path",{d:"M12 17a2 2 0 1 1 0 4a2 2 0 0 1 0-4zm7 0a2 2 0 1 1 0 4a2 2 0 0 1 0-4zM5 17a2 2 0 1 1 0 4a2 2 0 0 1 0-4zm7-7a2 2 0 1 1 0 4a2 2 0 0 1 0-4zm7 0a2 2 0 1 1 0 4a2 2 0 0 1 0-4zM5 10a2 2 0 1 1 0 4a2 2 0 0 1 0-4zm7-7a2 2 0 1 1 0 4a2 2 0 0 1 0-4zm7 0a2 2 0 1 1 0 4a2 2 0 0 1 0-4zM5 3a2 2 0 1 1 0 4a2 2 0 0 1 0-4z",fill:"currentColor"})],-1),mn=[pn];function fn(o,t){return e.openBlock(),e.createElementBlock("svg",un,mn)}const fo=$(dn,[["render",fn]]),hn={},gn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},wn=e.createElementVNode("g",{fill:"none"},[e.createElementVNode("path",{d:"M10 2.75a7.25 7.25 0 0 1 5.63 11.819l4.9 4.9a.75.75 0 0 1-.976 1.134l-.084-.073l-4.901-4.9A7.25 7.25 0 1 1 10 2.75zm0 1.5a5.75 5.75 0 1 0 0 11.5a5.75 5.75 0 0 0 0-11.5z",fill:"currentColor"})],-1),Nn=[wn];function vn(o,t){return e.openBlock(),e.createElementBlock("svg",gn,Nn)}const ho=$(hn,[["render",vn]]),Cn={},yn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},bn=e.createElementVNode("g",{fill:"none"},[e.createElementVNode("path",{d:"M12 4.5a7.5 7.5 0 1 0 7.419 6.392c-.067-.454.265-.892.724-.892c.37 0 .696.256.752.623A9 9 0 1 1 18 5.292V4.25a.75.75 0 0 1 1.5 0v3a.75.75 0 0 1-.75.75h-3a.75.75 0 0 1 0-1.5h1.35a7.474 7.474 0 0 0-5.1-2z",fill:"currentColor"})],-1),kn=[bn];function _n(o,t){return e.openBlock(),e.createElementBlock("svg",yn,kn)}const oe=$(Cn,[["render",_n]]),Vn={},$n={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Sn=e.createElementVNode("g",{fill:"none"},[e.createElementVNode("path",{d:"M17.75 3A3.25 3.25 0 0 1 21 6.25v5.772a6.471 6.471 0 0 0-1.5-.709V8.5h-15v9.25c0 .966.784 1.75 1.75 1.75h5.063c.173.534.412 1.037.709 1.5H6.25A3.25 3.25 0 0 1 3 17.75V6.25A3.25 3.25 0 0 1 6.25 3h11.5zm0 1.5H6.25A1.75 1.75 0 0 0 4.5 6.25V7h15v-.75a1.75 1.75 0 0 0-1.75-1.75zm5.25 13a5.5 5.5 0 1 1-11 0a5.5 5.5 0 0 1 11 0zm-5-3a.5.5 0 0 0-1 0v4.793l-1.646-1.647a.5.5 0 0 0-.708.708l2.5 2.5a.5.5 0 0 0 .708 0l2.5-2.5a.5.5 0 0 0-.708-.708L18 19.293V14.5z",fill:"currentColor"})],-1),Bn=[Sn];function In(o,t){return e.openBlock(),e.createElementBlock("svg",$n,Bn)}const ue=$(Vn,[["render",In]]),Tn={},Dn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Pn=e.createElementVNode("g",{fill:"none"},[e.createElementVNode("path",{d:"M4.5 5.75c0-.69.56-1.25 1.25-1.25h2a.75.75 0 0 0 0-1.5h-2A2.75 2.75 0 0 0 3 5.75v2a.75.75 0 0 0 1.5 0v-2zm0 12.5c0 .69.56 1.25 1.25 1.25h2a.75.75 0 0 1 0 1.5h-2A2.75 2.75 0 0 1 3 18.25v-2a.75.75 0 0 1 1.5 0v2zM18.25 4.5c.69 0 1.25.56 1.25 1.25v2a.75.75 0 0 0 1.5 0v-2A2.75 2.75 0 0 0 18.25 3h-2a.75.75 0 0 0 0 1.5h2zm1.25 13.75c0 .69-.56 1.25-1.25 1.25h-2a.75.75 0 0 0 0 1.5h2A2.75 2.75 0 0 0 21 18.25v-2a.75.75 0 0 0-1.5 0v2z",fill:"currentColor"})],-1),En=[Pn];function Mn(o,t){return e.openBlock(),e.createElementBlock("svg",Dn,En)}const xn=$(Tn,[["render",Mn]]),On={},zn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},An=e.createElementVNode("g",{fill:"none"},[e.createElementVNode("path",{d:"M12 1.75a3.25 3.25 0 0 1 3.245 3.066L15.25 5h5.25a.75.75 0 0 1 .102 1.493L20.5 6.5h-.796l-1.28 13.02a2.75 2.75 0 0 1-2.561 2.474l-.176.006H8.313a2.75 2.75 0 0 1-2.714-2.307l-.023-.174L4.295 6.5H3.5a.75.75 0 0 1-.743-.648L2.75 5.75a.75.75 0 0 1 .648-.743L3.5 5h5.25A3.25 3.25 0 0 1 12 1.75zm6.197 4.75H5.802l1.267 12.872a1.25 1.25 0 0 0 1.117 1.122l.127.006h7.374c.6 0 1.109-.425 1.225-1.002l.02-.126L18.196 6.5zM13.75 9.25a.75.75 0 0 1 .743.648L14.5 10v7a.75.75 0 0 1-1.493.102L13 17v-7a.75.75 0 0 1 .75-.75zm-3.5 0a.75.75 0 0 1 .743.648L11 10v7a.75.75 0 0 1-1.493.102L9.5 17v-7a.75.75 0 0 1 .75-.75zm1.75-6a1.75 1.75 0 0 0-1.744 1.606L10.25 5h3.5A1.75 1.75 0 0 0 12 3.25z",fill:"currentColor"})],-1),Rn=[An];function Ln(o,t){return e.openBlock(),e.createElementBlock("svg",zn,Rn)}const go=$(On,[["render",Ln]]),qn={},jn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 1024 1024"},Un=e.createElementVNode("path",{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 0 0 0 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3c7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176s176-78.8 176-176s-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112s112 50.1 112 112s-50.1 112-112 112z",fill:"currentColor"},null,-1),Fn=[Un];function Gn(o,t){return e.openBlock(),e.createElementBlock("svg",jn,Fn)}const wo=$(qn,[["render",Gn]]),Hn={},Jn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Wn=e.createElementVNode("g",{fill:"none"},[e.createElementVNode("path",{d:"M20 4.746a2.75 2.75 0 0 0-2.75-2.75H4.75A2.75 2.75 0 0 0 2 4.746v12.5a2.75 2.75 0 0 0 2.75 2.75h6.666l.105-.42c.096-.384.253-.748.463-1.08H4.75c-.69 0-1.25-.56-1.25-1.25v-12.5c0-.69.56-1.25 1.25-1.25h12.5c.69 0 1.25.56 1.25 1.25v7.113c.437-.4.956-.66 1.5-.781V4.746zm-4 9.608V6.73l-.007-.1A.744.744 0 0 0 15.25 6a.74.74 0 0 0-.75.73v8.541l.007.099c.017.125.067.24.142.337L16 14.355zm-8.507-5.71A.75.75 0 0 0 6.75 8a.748.748 0 0 0-.75.747v6.507l.007.101c.05.365.363.645.743.645c.414 0 .75-.334.75-.746V8.746l-.007-.101zm4.214 2.973a.73.73 0 0 0-.732-.62a.73.73 0 0 0-.725.733l.035 3.547l.008.099a.731.731 0 0 0 .732.62a.73.73 0 0 0 .725-.733l-.035-3.548l-.008-.098zm7.393 1.052l-5.903 5.902a2.686 2.686 0 0 0-.706 1.248l-.458 1.83a1.087 1.087 0 0 0 1.319 1.319l1.83-.458a2.685 2.685 0 0 0 1.248-.706l5.902-5.903A2.286 2.286 0 0 0 19.1 12.67z",fill:"currentColor"})],-1),Kn=[Wn];function Xn(o,t){return e.openBlock(),e.createElementBlock("svg",Jn,Kn)}const No=$(Hn,[["render",Xn]]),Qn={},Zn={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Yn=e.createElementVNode("g",{fill:"none"},[e.createElementVNode("path",{d:"M4.397 4.554l.073-.084a.75.75 0 0 1 .976-.073l.084.073L12 10.939l6.47-6.47a.75.75 0 1 1 1.06 1.061L13.061 12l6.47 6.47a.75.75 0 0 1 .072.976l-.073.084a.75.75 0 0 1-.976.073l-.084-.073L12 13.061l-6.47 6.47a.75.75 0 0 1-1.06-1.061L10.939 12l-6.47-6.47a.75.75 0 0 1-.072-.976l.073-.084l-.073.084z",fill:"currentColor"})],-1),ea=[Yn];function oa(o,t){return e.openBlock(),e.createElementBlock("svg",Zn,ea)}const te=$(Qn,[["render",oa]]),ta={},na={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},aa=e.createElementVNode("g",{fill:"none"},[e.createElementVNode("path",{d:"M22 6.5a5.5 5.5 0 1 0-11 0a5.5 5.5 0 0 0 11 0zM17 7l.001 2.504a.5.5 0 1 1-1 0V7h-2.505a.5.5 0 0 1 0-1H16V3.5a.5.5 0 0 1 1 0V6h2.503a.5.5 0 1 1 0 1h-2.502zm2.5 7v-1.732A6.518 6.518 0 0 0 21 11.19v7.56a3.25 3.25 0 0 1-3.066 3.245L17.75 22H6.25a3.25 3.25 0 0 1-3.245-3.066L3 18.75V7.25a3.25 3.25 0 0 1 3.066-3.245L6.25 4h4.248a6.451 6.451 0 0 0-.422 1.5H6.25a1.75 1.75 0 0 0-1.744 1.606L4.5 7.25V14H9a.75.75 0 0 1 .743.648l.007.102a2.25 2.25 0 0 0 4.495.154l.005-.154a.75.75 0 0 1 .648-.743L15 14h4.5zm-15 1.5v3.25a1.75 1.75 0 0 0 1.606 1.744l.144.006h11.5a1.75 1.75 0 0 0 1.744-1.607l.006-.143V15.5h-3.825a3.752 3.752 0 0 1-3.475 2.995l-.2.005a3.752 3.752 0 0 1-3.632-2.812l-.043-.188H4.5z",fill:"currentColor"})],-1),ra=[aa];function la(o,t){return e.openBlock(),e.createElementBlock("svg",na,ra)}const vo=$(ta,[["render",la]]),sa={},ca={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},ia=e.createElementVNode("g",{fill:"none"},[e.createElementVNode("path",{d:"M6.087 7.75a5.752 5.752 0 0 1 11.326 0h.087a4 4 0 0 1 3.962 4.552a6.534 6.534 0 0 0-1.597-1.364A2.501 2.501 0 0 0 17.5 9.25h-.756a.75.75 0 0 1-.75-.713a4.25 4.25 0 0 0-8.489 0a.75.75 0 0 1-.749.713H6a2.5 2.5 0 0 0 0 5h4.4a6.458 6.458 0 0 0-.357 1.5H6a4 4 0 0 1 0-8h.087zM22 16.5a5.5 5.5 0 1 0-11 0a5.5 5.5 0 0 0 11 0zm-6-3a.5.5 0 0 1 1 0v4.793l1.646-1.647a.5.5 0 0 1 .708.708l-2.5 2.5a.5.5 0 0 1-.708 0l-2.5-2.5a.5.5 0 0 1 .708-.708L16 18.293V13.5z",fill:"currentColor"})],-1),da=[ia];function ua(o,t){return e.openBlock(),e.createElementBlock("svg",ca,da)}const Co=$(sa,[["render",ua]]),$e=window.localStorage;function we(o,t){$e.setItem(o,JSON.stringify(t))}function Je(o){const t=$e.getItem(o);return t?JSON.parse(t):null}function pa(o){$e.removeItem(o)}function We(){return Date.parse(String(new Date))}const ma="local-";class fa{constructor(t=""){le(this,"namespace");le(this,"mapKey");le(this,"map");this.namespace=t,this.mapKey=ma+this.namespace,this.map=Je(this.mapKey)||{}}set(t,n,l=0){const r=this.getReallyKey(t),i={expires:l,time:We()};we(r,n),this.map[t]=i,we(this.mapKey,this.map)}getReallyKey(t){return this.namespace+"-"+t}get(t,n){const l=this.getReallyKey(t),r=this.map[t];if(r){const i=Je(l);if(r.expires>0){if(We()-r.time<=r.expires)return i===!1||i?i:n;this.delete(t)}else return i===!1||i?i:n}return n}delete(t){const n=this.getReallyKey(t);delete this.map[t],we(this.mapKey,this.map),pa(n)}deleteAll(){for(const t in this.map)this.delete(t)}}const Se=new fa("partex"),Be="/apiserver/";d.darkTheme.common.cardColor="#32323b";d.darkTheme.common.primaryColor="#b274ef";d.darkTheme.common.primaryColorHover="#b274ef";d.darkTheme.common.borderRadius="16px";d.darkTheme.common.borderRadiusSmall="8px";d.darkTheme.DataTable.tdColor="#2d2d31";const ha={common:{borderRadius:"16px",borderRadiusSmall:"8px",primaryColor:"#8e54c8",primaryColorHover:"#9b66d0",primaryColorPressed:"#8e54c8",primaryColorSuppl:"#8e54c8",infoColor:"#2080f0",infoColorHover:"#57a4fd",infoColorPressed:"#2080f0",infoColorSuppl:"#2080f0",successColor:"#5dae57",successColorHover:"#70ce69",successColorPressed:"#5dae57",successColorSuppl:"#5dae57",warningColor:"#f0973a",warningColorHover:"#ffb05d",warningColorPressed:"#f0973a",warningColorSuppl:"#f0973a",errorColor:"#e65444",errorColorHover:"#fc6c5d",errorColorPressed:"#e65444",errorColorSuppl:"#e65444",cardColor:"#fff"},Button:{textColor:"rgb(var(--font))"},Notification:{borderRadius:"16px"}},ga=d.darkTheme;function wa(){return window.screen.availWidth<=568}function j(o,t,n=3e4){if(typeof n=="string"){let l=0;const r=n.split(" ");switch(r[1]){case"Minutes":l=6e4;break;case"Hours":l=36e5;break;case"Day":l=864e5;break;case"Week":l=6048e5;break}n=Number(r[0])*l}Se.set(o,t,n)}function A(o,t){return Se.get(o,t)}const ae=o=>{Se.delete(o)},yo=(o=0)=>{const t=document.documentElement;t&&(t.scrollTop=o,setTimeout(()=>{t.scrollTop=o},100))},bo=()=>{const o=document.querySelectorAll(".partex-loading");o&&o.length>0&&o.forEach(t=>{const n=t.parentNode;n==null||n.removeChild(t)})};function pe(o,t=!1){let n=o.records;t&&(n=n.map((r,i)=>({key:i,...r})));const l=parseInt(o.size);return{query:{page:Number(o.current),pageCount:parseInt(o.pages),pageSize:l>29?l:30,itemCount:parseInt(o.total),pageSizes:[30,40,50],showQuickJumper:!0,showSizePicker:!0,pageSlot:8,prefix:()=>e.h("div",{},{default:()=>`共${o.total}条`})},records:n}}function me(o){if(!o.query)return o;const t={};return o.query.page&&(t.current=o.query.page),o.query.pageSize&&(t.size=o.query.pageSize),o.query.isGetAll&&(t.isGetAll=o.query.isGetAll),o.query.keyword&&(t.keyword=o.query.keyword),o.query.columnKey&&(t.columnKey=o.query.columnKey),o.query.order&&(t.order=o.query.order),{...o,query:t}}const U=(o,t="yyyy-MM-dd")=>{if(!o)return"";typeof o=="string"&&(o=o.replace(/年/g,"-").replace(/月/g,"-").replace(/日/g,""));let n=new Date(o);if(typeof o=="string"&&isNaN(n.getTime())&&(n=new Date(parseInt(o))),isNaN(n.getTime()))return"---";const l={"M+":n.getMonth()+1,"d+":n.getDate(),"h+":n.getHours(),"m+":n.getMinutes(),"s+":n.getSeconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(n.getFullYear()+"").substr(4-RegExp.$1.length)));for(const r in l)if(new RegExp("("+r+")").test(t)){let i=l[r];RegExp.$1.length!==1&&(i=("00"+l[r]).substr((""+l[r]).length)),t=t.replace(RegExp.$1,i)}return t},Z=(o,t="default",n,l=!1,r=!1,i)=>o?e.h(d.NButton,{size:"small",type:t,text:!0,disabled:l,loading:r,onClick:n},{default:()=>i||null,icon:()=>e.h(d.NIcon,{},{default:()=>e.h(o,{},{default:()=>null})})}):e.h(d.NButton,{size:"small",type:t,text:!0,disabled:l,loading:r,onClick:n},{default:()=>i||null}),Y=(o,t)=>e.h(d.NTooltip,{},{trigger:()=>o,default:()=>t}),Na=(o,t=!1,n=!1)=>e.h(d.NPopconfirm,{placement:"left","on-positive-click":()=>o()},{default:()=>e.h("span",{},{default:()=>I.lang==="zh-CN"?"删除后无法恢复,是否确认删除?":"Are you sure you want to delete ?"}),trigger:()=>Y(Z(go,"error",void 0,t,n),I.lang==="zh-CN"?"删除":"Delete")}),re=o=>{const t=[];return o.forEach(n=>{n.type==="detail"&&t.push(Y(Z(wo,"primary",n.onClick,n.disabled,n.loading),I.lang==="zh-CN"?"详情":"Detail")),n.type==="edit"&&t.push(Y(Z(No,"success",n.onClick,n.disabled,n.loading),I.lang==="zh-CN"?"编辑":"Edit")),n.type==="delete"&&t.push(Na(n.onClick,n.disabled,n.loading)),n.type==="custom"&&t.push(Y(Z(n.icon,n.color,n.onClick,n.disabled,n.loading,n.buttonText),n.text)),n.type==="tips"&&t.push(e.h(d.NPopconfirm,{placement:"left","on-positive-click":()=>n.onClick()},{default:()=>e.h("span",{},{default:()=>n.tips}),trigger:()=>Y(Z(n.icon,n.color,void 0,n.disabled,n.loading,n.buttonText),n.text)}))}),e.h("div",{class:"action-flex"},{default:()=>t})},va=o=>!o||Object.keys(o).length===0?"":window.btoa(encodeURI(JSON.stringify(o))),Ca=o=>!o||Object.keys(o).length===0?{}:JSON.parse(decodeURI(window.atob(o))),ya=(o,t=500)=>{const n=o;let l;const r=function(...s){l||(l=setTimeout(function(){l&&clearTimeout(l),l=void 0,n.apply(r,s)},t))};return r};function ba(o,t){o.requestFullscreen?(t&&(o.onfullscreenchange=t),o.requestFullscreen()):o.mozRequestFullScreen?(t&&(o.onmozfullscreenchange=t),o.mozRequestFullScreen()):o.webkitRequestFullscreen?(t&&(o.onwebkitfullscreenchange=t),o.webkitRequestFullscreen()):o.msRequestFullscreen&&(t&&(o.onmsfullscreenchange=t),o.msRequestFullscreen())}function ka(o,t=0){const n=["","k","m","b","t"],l=Math.floor(Math.log10(Math.abs(o))/3),r=Math.max(0,Math.min(l,n.length-1)),i=n[r];return i?(o/Math.pow(10,r*3)).toFixed(t)+i:(o/Math.pow(10,r*3)).toFixed(0)}const ko=(o,t,n="json")=>ne({url:`${Be}${o}`,method:"GET",data:t,responseType:n}),x=(o,t={},n="json",l=3e5)=>ne({url:`${Be}${o}`,method:"POST",data:t,responseType:n,timeout:l}),Ie=(o,t)=>ne({headers:{"Content-Type":"multipart/form-data"},url:`${Be}${o}`,method:"POST",data:t}),_a=o=>!!(u.kind===-1||u.kind===99||u.iot_menu_authorization.includes(o)),Va=o=>u.platform_tdm?u.kind===-1||u.kind===99||o==="home"?!0:u.tdm_menu_authorization.includes(o):!1,$a=o=>u.platform_qms?u.kind===-1||u.kind===99||o==="home"?!0:u.qms_menu_authorization.includes(o):!1,Sa=o=>u.platform_twin?(u.kind===-1||u.kind===99||o==="home",!0):!1,Ba=e.defineComponent({name:"HeaderPop",components:{NSpace:d.NSpace,NInput:d.NInput,NPopover:d.NPopover,NTooltip:d.NTooltip,NButton:d.NButton,NIcon:d.NIcon,NDataTable:d.NDataTable,IconSearch:ho,IconArrowClockwise:oe,IconArrowSquareDown:uo},setup(){const{t:o}=H.useI18n(),t=e.ref(!1),n=d.useNotification(),l=e.ref([]),r=e.ref(""),i=e.ref(!1),s=e.ref({page:1,pageCount:1,pageSize:30}),c=e.ref([{title:()=>o("Common.importer.fileName"),key:"jobName",width:300,render(h){return e.h("div",{},{default:()=>[e.h("p",{},{default:()=>h.jobName||"--"}),e.h("p",{style:{color:"rgba(var(--font), 0.6)"}},{default:()=>U(h.commitTime,"yyyy-MM-dd hh:mm:ss")})]})}},{title:()=>o("Common.importer.status"),key:"jobStatus",align:"center",width:90,render(h){let _=o("Common.processing");return h.jobStatus===1&&(_=o("Common.success")),h.jobStatus===2&&(_=o("Common.failed")),e.h("span",{},{default:()=>_})}},{title:()=>o("Common.action"),key:"action",align:"center",fixed:"right",width:90,render(h){const _=[{type:"delete",onClick:()=>{$t([h.jobId]).then(()=>{n.success({content:()=>o("Notice.success"),duration:3e3}),v()}).catch(()=>{n.error({content:()=>o("Notice.error"),duration:3e3})})}}];return h.jobStatus===2?_.unshift({type:"custom",onClick:()=>{St(h.jobId).then(()=>{n.success({content:()=>o("Notice.success"),duration:3e3}),v()}).catch(()=>{n.error({content:()=>o("Notice.error"),duration:3e3})})},icon:oe,color:"info",text:o("Common.importer.retry")}):_.unshift({type:"custom",disabled:h.jobStatus!==1,onClick:()=>{window.open(h.downloadUrl)},icon:ue,color:"success",text:o("Common.importer.btnDownload")}),re(_)}}]),p=h=>{s.value.page=h,v()},m=h=>{s.value.pageSize=h,s.value.page=1,v()},N=()=>{s.value.page=1,v()},v=()=>{i.value||(i.value=!0,Bt({jobType:"EXPORT",jobName:r.value,query:s.value}).then(h=>{s.value=h.query,l.value=h.records,i.value=!1}).catch(()=>{i.value=!1}))},f=h=>{be(h),t.value=h};return v(),e.watch(()=>I.download,h=>{t.value=h,h&&v()}),{jobName:r,loading:i,columns:c,coldata:l,query:s,popDownload:t,init:v,pageChange:p,pageSizeChange:m,doSearch:N,popDownloadUpdate:f}}}),Ia={class:"header-download"};function Ta(o,t,n,l,r,i){const s=e.resolveComponent("IconArrowSquareDown"),c=e.resolveComponent("NIcon"),p=e.resolveComponent("NButton"),m=e.resolveComponent("NInput"),N=e.resolveComponent("IconSearch"),v=e.resolveComponent("NTooltip"),f=e.resolveComponent("IconArrowClockwise"),h=e.resolveComponent("NSpace"),_=e.resolveComponent("NDataTable"),w=e.resolveComponent("NPopover");return e.openBlock(),e.createBlock(w,{trigger:"click",placement:"bottom-end",show:o.popDownload,"show-arrow":!1,"on-update:show":o.popDownloadUpdate,style:{width:"650px"}},{trigger:e.withCtx(()=>[e.createVNode(p,{text:"",style:{"margin-left":"15px"}},{icon:e.withCtx(()=>[e.createVNode(c,{class:"com-header-icon"},{default:e.withCtx(()=>[e.createVNode(s)]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(h,{justify:"end"},{default:e.withCtx(()=>[e.createElementVNode("span",Ia,e.toDisplayString(o.$t("Common.validDays")),1),e.createVNode(m,{value:o.jobName,"onUpdate:value":t[0]||(t[0]=C=>o.jobName=C),type:"text",clearable:"",placeholder:o.$t("Common.importer.fileName")},null,8,["value","placeholder"]),e.createVNode(v,{trigger:"hover"},{trigger:e.withCtx(()=>[e.createVNode(p,{loading:o.loading,class:"button-primary",onClick:o.doSearch},{icon:e.withCtx(()=>[e.createVNode(c,null,{default:e.withCtx(()=>[e.createVNode(N)]),_:1})]),_:1},8,["loading","onClick"])]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(o.$t("Common.search")),1)]),_:1}),e.createVNode(v,{trigger:"hover"},{trigger:e.withCtx(()=>[e.createVNode(p,{onClick:o.init},{icon:e.withCtx(()=>[e.createVNode(c,null,{default:e.withCtx(()=>[e.createVNode(f)]),_:1})]),_:1},8,["onClick"])]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(o.$t("Common.refresh")),1)]),_:1})]),_:1}),e.createVNode(_,{columns:o.columns,data:o.coldata,pagination:o.query,loading:o.loading,"on-update:page":o.pageChange,"on-update:page-size":o.pageSizeChange,"min-height":300,"max-height":505,class:"n-table-dark","scroll-x":"600",style:{"margin-top":"8px"},remote:""},null,8,["columns","data","pagination","loading","on-update:page","on-update:page-size"])]),_:1},8,["show","on-update:show"])}const Da=$(Ba,[["render",Ta]]),Pa=e.defineComponent({name:"HeaderPop",components:{NBadge:d.NBadge,NPopover:d.NPopover,NSpace:d.NSpace,NTooltip:d.NTooltip,NButton:d.NButton,NIcon:d.NIcon,NDataTable:d.NDataTable,NRadioGroup:d.NRadioGroup,NRadioButton:d.NRadioButton,IconAlert:so,IconClear:co,IconArrowClockwise:oe},setup(){const{t:o}=H.useI18n(),t=e.ref(0),n=e.ref(0),l=e.ref([]),r=e.ref(""),i=e.ref(!1),s=e.ref({page:1,pageCount:1,pageSize:30}),c=e.ref([{title:()=>o("Common.message.title2"),key:"messageContent",width:300,render(h){return[e.h("div",{class:h.status===1?"card-grey-txt":""},{default:()=>h.messageContent}),e.h("div",{class:"card-grey-txt"},{default:()=>U(h.createTime,"yyyy-MM-dd hh:mm:ss")})]}},{title:()=>o("Common.action"),key:"action",align:"center",fixed:"right",width:90,render(h){return h.status===0?re([{type:"custom",color:"primary",text:o("Common.message.read"),buttonText:o("Common.message.read"),onClick:()=>{Tt(h.messageId).then(()=>{f()}).catch(()=>{f()})}}]):e.h("div",{},{default:()=>`${h.updateByName} ${o("Common.message.read")}`})}}]),p=h=>{s.value.page=1,t.value=h,f()},m=()=>{_t().then(()=>{f()}).catch(()=>{f()})},N=h=>{s.value.page=h,f()},v=h=>{s.value.pageSize=h,s.value.page=1,f()},f=()=>{i.value||(i.value=!0,It({status:t.value,query:s.value}).then(h=>{n.value=h.unRead,s.value=h.data.query,l.value=h.data.records,i.value=!1}).catch(()=>{i.value=!1}))};return f(),{badge:n,radios:t,jobName:r,loading:i,columns:c,coldata:l,query:s,clearAll:m,pageChange:N,pageSizeChange:v,init:f,radiosChecked:p}}}),Ea={class:"com-title"};function Ma(o,t,n,l,r,i){const s=e.resolveComponent("IconAlert"),c=e.resolveComponent("NIcon"),p=e.resolveComponent("NButton"),m=e.resolveComponent("NBadge"),N=e.resolveComponent("NRadioButton"),v=e.resolveComponent("NRadioGroup"),f=e.resolveComponent("IconClear"),h=e.resolveComponent("NTooltip"),_=e.resolveComponent("IconArrowClockwise"),w=e.resolveComponent("NSpace"),C=e.resolveComponent("NDataTable"),S=e.resolveComponent("NPopover");return e.openBlock(),e.createBlock(S,{trigger:"click",placement:"bottom-end","show-arrow":!1,style:{width:"650px"}},{trigger:e.withCtx(()=>[e.createVNode(m,{value:o.badge,max:99},{default:e.withCtx(()=>[e.createVNode(p,{text:"",style:{"margin-left":"30px"}},{icon:e.withCtx(()=>[e.createVNode(c,{class:"com-header-icon"},{default:e.withCtx(()=>[e.createVNode(s)]),_:1})]),_:1})]),_:1},8,["value"])]),default:e.withCtx(()=>[e.createVNode(w,{justify:"space-between"},{default:e.withCtx(()=>[e.createElementVNode("div",Ea,e.toDisplayString(o.$t("Common.message.title")),1),e.createVNode(v,{value:o.radios,"onUpdate:value":t[0]||(t[0]=B=>o.radios=B),name:"radios","on-update:value":o.radiosChecked},{default:e.withCtx(()=>[e.createVNode(N,{key:"0",value:0,label:o.$t("Common.message.unRead")},null,8,["label"]),e.createVNode(N,{key:"-1",value:-1,label:o.$t("Common.message.all")},null,8,["label"]),e.createVNode(N,{key:"1",value:1,label:o.$t("Common.message.read")},null,8,["label"])]),_:1},8,["value","on-update:value"]),e.createElementVNode("div",null,[e.createVNode(h,{trigger:"hover"},{trigger:e.withCtx(()=>[e.createVNode(p,{onClick:o.clearAll},{icon:e.withCtx(()=>[e.createVNode(c,null,{default:e.withCtx(()=>[e.createVNode(f)]),_:1})]),_:1},8,["onClick"])]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(o.$t("Common.message.readAll")),1)]),_:1}),e.createVNode(h,{trigger:"hover"},{trigger:e.withCtx(()=>[e.createVNode(p,{onClick:o.init},{icon:e.withCtx(()=>[e.createVNode(c,null,{default:e.withCtx(()=>[e.createVNode(_)]),_:1})]),_:1},8,["onClick"])]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(o.$t("Common.refresh")),1)]),_:1})])]),_:1}),e.createVNode(C,{columns:o.columns,data:o.coldata,pagination:o.query,loading:o.loading,"on-update:page":o.pageChange,"on-update:page-size":o.pageSizeChange,"min-height":300,"max-height":505,class:"n-table-dark","scroll-x":"600",style:{"margin-top":"8px"},remote:""},null,8,["columns","data","pagination","loading","on-update:page","on-update:page-size"])]),_:1})}const xa=$(Pa,[["render",Ma]]),Oa=e.defineComponent({name:"OcHeader",components:{Pop:Da,Message:xa,NDropdown:d.NDropdown,NMenu:d.NMenu,NIcon:d.NIcon,NButton:d.NButton,NModal:d.NModal,NCard:d.NCard,IconWeatherSunny:mo,IconWeatherMoon:po,IconGridDots:fo,IconDismiss:te},props:{qiankun:{type:Boolean,default:!1},language:{type:Boolean,default:!1},report:{type:Boolean,default:!1},menuOptions:{required:!0,type:Array,default:()=>[]}},setup(o){const{t}=H.useI18n(),n=F.useRoute(),l=F.useRouter(),r=d.useNotification(),i=e.ref(""),s=e.ref("/iot/home"),c=e.ref(!1),p=e.ref(!1),m=e.ref(void 0),N=e.ref(10),v=e.ref([]),f=e.ref(window.screen.availWidth<1030),h=e.ref(""),_=e.ref(A("lang","zh-CN")),w=g=>{c.value=g,ke(g),j("theme",g,0)},C=()=>{window.screen.availWidth<=1300&&window.screen.availWidth>=1030?h.value="tiny-menu":window.screen.availWidth<1030?h.value="hide-menu":h.value=""},S=g=>{const L=g.split("/");s.value=`/${L[1]}/${L[2]}`,yo()},B=g=>{g.disabled||(S(g.key),l.push(g.key))},O=g=>{if(!g.disabled){if(g.children)return;S(g.key),l.push(g.key),p.value=!1}},a=g=>e.h("div",{onClick:()=>B(g)},{default:()=>g.label}),k=g=>e.h("div",{onClick:()=>O(g)},{default:()=>g.label}),P=g=>g.icon?e.h(d.NIcon,{size:24,onClick:()=>B(g)},{default:()=>g.icon&&g.icon()}):!1,E=g=>{o.qiankun?window.location.href=`https://www.partexiot.cn${g}`:l.replace(g)},y=()=>{p.value=!1},R=()=>{const g=[{label:t("Platform.iot"),key:I.platformUrl?I.platformUrl:"/iot/home"}];return u.platform_tdm&&g.push({label:t("Platform.tdm"),key:"/tdm/home"}),u.platform_qms&&g.push({label:t("Platform.qms"),key:"/qms/home"}),u.platform_twin&&g.push({label:t("Platform.twin"),key:"/twin/home"}),u.platform_maintain&&g.push({label:t("Platform.maintain"),key:"/maintain/home"}),console.log(g),g},J=()=>{const g=[{label:u.tenantName,key:"tenantName"},{label:t("Common.dropdownMenu.software"),key:"app",children:[{label:t("Common.dropdownMenu.android"),key:"android"},{label:t("Common.dropdownMenu.ios"),key:"ios"},{label:t("Common.dropdownMenu.chrome"),key:"chrome"},{label:t("Common.dropdownMenu.edge"),key:"edge"},{label:t("Common.dropdownMenu.dashboard_IoT"),key:"dashboard_IoT"},{label:t("Common.dropdownMenu.dashboard_Prt"),key:"dashboard_Prt"}]}];return o.report&&g.push({label:t("Common.dropdownMenu.report"),key:"report"}),g.push({label:t("Common.dropdownMenu.info"),key:"info"},{label:t("Common.dropdownMenu.logout"),key:"logout"}),g},W=async g=>{g==="logout"&&Ve(),g==="info"&&l.push("/custom/my"),g==="report"&&l.push("/custom/report"),g==="android"&&window.open("http://miiot.partexiot.cn/dk7u"),g==="ios"&&window.open("https://apps.apple.com/cn/app/id1587313547"),g==="chrome"&&window.open("http://partex-cloud-static.oss-cn-hangzhou.aliyuncs.com/Software/chrome_installer.exe"),g==="edge"&&window.open("http://partex-cloud-static.oss-cn-hangzhou.aliyuncs.com/Software/MicrosoftEdgeSetup.exe"),g==="dashboard_IoT"&&window.open("http://partex-cloud-static.oss-cn-hangzhou.aliyuncs.com/Software/%E9%9B%B6%E6%8D%B7%E4%BA%92%E8%81%94IoT_v1.2.0.zip"),g==="dashboard_Prt"&&window.open("http://partex-cloud-static.oss-cn-hangzhou.aliyuncs.com/Software/%E9%9B%B6%E6%8D%B7%E4%BA%92%E8%81%94%E5%8D%B0%E5%88%B7%E7%89%88_v1.2.0.zip")},G=()=>{Vt().then(()=>{r.success({content:"续订请求已发送,七个工作日内将会有专人联系",duration:3e3})}).catch(()=>{r.error({content:()=>t("Notice.error"),duration:3e3})})},K=()=>{if(u.tenantStatus===0&&u.renewalStatus===0){const g=document.getElementById("app");g&&g.classList.add("outrange"),r.info({action:()=>e.h(d.NSpace,{size:[15,15]},{default:()=>e.h(d.NButton,{class:"button-primary","on-click":()=>{G()}},{default:()=>"立即续订"})}),closable:!1,content:`您的订阅已于${U(u.endTime)}到期,如需继续使用请联系我们`,title:"到期提示"})}if(u.tenantStatus===2&&u.renewalStatus===0){let g=`您的订阅即将于${U(u.endTime)}到期,请联系管理员进行续订`,L=[e.h(d.NButton,{secondary:!0,"on-click":()=>{r.destroyAll()}},{default:()=>"了解"})];u.kind===99&&(g=`您的订阅即将于${U(u.endTime)}到期,为保证持续有效的提供服务请立即续订`,L=[e.h(d.NButton,{secondary:!0,"on-click":()=>{r.destroyAll()}},{default:()=>"稍后提示我"}),e.h(d.NButton,{class:"button-primary","on-click":()=>{G()}},{default:()=>"立即续订"})]),r.info({action:()=>e.h(d.NSpace,{size:[15,15]},{default:()=>L}),closable:!1,content:g,title:"温馨提示"})}},X=()=>{l.push(I.platformUrl)},V=()=>{_.value=_.value==="zh-CN"?"en-US":"zh-CN",ee(_.value)},b=()=>{i.value=t("Platform.iot"),n.path.indexOf("tdm")>-1&&(i.value=t("Platform.tdm")),n.path.indexOf("qms")>-1&&(i.value=t("Platform.qms")),n.path.indexOf("twin")>-1&&(i.value=t("Platform.twin")),n.path.indexOf("maintain")>-1&&(i.value=t("Platform.maintain")),yt(i.value)},T=A("theme",!1);w(T),"backdropFilter"in document.documentElement.style||"WebkitBackdropFilter"in document.documentElement.style||document.body.classList.add("not-support-backdrop");const z=()=>{f.value=window.screen.availWidth<1030,C()},M=()=>{if(u.tenantStatus===0){const g=document.body;g&&g.classList.add("outrange")}};return e.onMounted(()=>{ee(_.value),K(),S(n.path),b(),M(),v.value=R(),window.addEventListener("resize",z)}),e.onBeforeUnmount(()=>{window.removeEventListener("resize",z)}),e.watch(()=>I.lang,()=>{b()}),e.watch(()=>n.path,g=>{S(g),M()}),e.watch(()=>I.needUpdate,g=>{if(g){m.value=setInterval(()=>{N.value=N.value-1,N.value<=0&&(clearInterval(window.versionMonitor),clearInterval(m.value),m.value=void 0,L.destroy())},1e3);const L=r.create({title:"检测到系统有新版本需要更新",content:()=>`是否立即更新?更新需要重新加载页面,请确保所有项目都已经保存完毕。${N.value}秒后自动关闭`,meta:U(new Date,"yyyy-MM-dd hh:mm:ss"),onClose:()=>{clearInterval(window.versionMonitor)},action:()=>e.h(d.NSpace,{justify:"space-between"},{default:()=>[e.h(d.NButton,{quaternary:!0,onClick:()=>{clearInterval(window.versionMonitor),L.destroy()}},{default:()=>"稍后"}),e.h(d.NButton,{type:"primary",onClick:()=>{window.location.reload()}},{default:()=>"更新"})]})})}}),{userStore:u,headerStore:I,theme:c,activeMenu:s,lang:_,platformName:i,platformOption:v,availWidth:f,showMenu:p,menuType:h,changeLang:V,setDropdownMenu:J,renderMenuLabel:a,renderMenuLabel2:k,renderMenuIcon:P,indexClick:X,platformClick:E,dropdownClick:W,changeTheme:w,closeModel:y}}}),za={class:"oc-header"},Aa={class:"menu"},Ra=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},[e.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-miterlimit":"10","stroke-width":"32",d:"M80 160h352"}),e.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-miterlimit":"10","stroke-width":"32",d:"M80 256h352"}),e.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-miterlimit":"10","stroke-width":"32",d:"M80 352h352"})],-1);function La(o,t,n,l,r,i){const s=e.resolveComponent("IconGridDots"),c=e.resolveComponent("NIcon"),p=e.resolveComponent("NButton"),m=e.resolveComponent("NDropdown"),N=e.resolveComponent("NMenu"),v=e.resolveComponent("Pop"),f=e.resolveComponent("Message"),h=e.resolveComponent("IconWeatherMoon"),_=e.resolveComponent("IconWeatherSunny"),w=e.resolveComponent("IconDismiss"),C=e.resolveComponent("NCard"),S=e.resolveComponent("NModal");return e.openBlock(),e.createElementBlock("header",za,[o.platformOption.length>1?(e.openBlock(),e.createBlock(m,{key:0,trigger:"hover",placement:"bottom-start",size:"huge",options:o.platformOption,onSelect:o.platformClick},{default:e.withCtx(()=>[e.createVNode(p,{style:{padding:"0 14px 0 0"}},{icon:e.withCtx(()=>[e.createVNode(c,null,{default:e.withCtx(()=>[e.createVNode(s)]),_:1})]),_:1})]),_:1},8,["options","onSelect"])):e.createCommentVNode("",!0),e.createElementVNode("a",{href:"javascript:;",class:"logo",onClick:t[0]||(t[0]=(...B)=>o.indexClick&&o.indexClick(...B))}),e.createElementVNode("a",{href:"javascript:;",class:"platform-txt",onClick:t[1]||(t[1]=(...B)=>o.indexClick&&o.indexClick(...B))}," | "+e.toDisplayString(o.platformName),1),e.createElementVNode("div",Aa,[e.createVNode(N,{value:o.activeMenu,"onUpdate:value":t[2]||(t[2]=B=>o.activeMenu=B),mode:"horizontal",options:o.menuOptions,"render-icon":o.renderMenuIcon,"render-label":o.renderMenuLabel,class:e.normalizeClass(["header-menu",o.menuType])},null,8,["value","options","render-icon","render-label","class"]),o.availWidth?(e.openBlock(),e.createBlock(p,{key:0,onClick:t[3]||(t[3]=B=>o.showMenu=!0)},{icon:e.withCtx(()=>[e.createVNode(c,null,{default:e.withCtx(()=>[Ra]),_:1})]),_:1})):e.createCommentVNode("",!0),o.availWidth?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(v,{key:1})),o.availWidth?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(f,{key:2})),o.availWidth?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(p,{key:3,style:{"margin-left":"15px"},onClick:t[4]||(t[4]=B=>o.changeTheme(!o.theme))},{icon:e.withCtx(()=>[e.withDirectives(e.createVNode(c,{color:"#8e54c8"},{default:e.withCtx(()=>[e.createVNode(h)]),_:1},512),[[e.vShow,o.theme]]),e.withDirectives(e.createVNode(c,{color:"#f2a651"},{default:e.withCtx(()=>[e.createVNode(_)]),_:1},512),[[e.vShow,!o.theme]])]),_:1})),o.language?(e.openBlock(),e.createBlock(p,{key:4,class:"com-header-icon",onClick:o.changeLang},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.lang==="zh-CN"?"EN":"中文"),1)]),_:1},8,["onClick"])):e.createCommentVNode("",!0),e.createVNode(m,{trigger:"click",placement:"bottom-end",options:o.setDropdownMenu(),onSelect:o.dropdownClick},{default:e.withCtx(()=>[e.createVNode(p,{text:"",class:"user",title:o.userStore.name},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.userStore.name),1)]),_:1},8,["title"])]),_:1},8,["options","onSelect"])]),e.createVNode(S,{show:o.showMenu,"onUpdate:show":t[6]||(t[6]=B=>o.showMenu=B),"on-mask-click":o.closeModel},{default:e.withCtx(()=>[e.createVNode(C,{title:o.platformName,bordered:!1,class:"oc-header-modal-content"},{"header-extra":e.withCtx(()=>[e.createVNode(p,{quaternary:"",onClick:o.closeModel},{icon:e.withCtx(()=>[e.createVNode(c,null,{default:e.withCtx(()=>[e.createVNode(w)]),_:1})]),_:1},8,["onClick"])]),default:e.withCtx(()=>[e.createVNode(N,{value:o.activeMenu,"onUpdate:value":t[5]||(t[5]=B=>o.activeMenu=B),options:o.menuOptions,"render-label":o.renderMenuLabel2},null,8,["value","options","render-label"])]),_:1},8,["title"])]),_:1},8,["show","on-mask-click"])])}const _o=$(Oa,[["render",La]]),qa=e.defineComponent({name:"OcFooter",props:{version:{type:String,default:""}}}),ja={class:"footer"},Ua=e.createElementVNode("span",{style:{"font-family":"Arial, Helvetica, sans-serif"}},"©",-1),Fa=e.createElementVNode("a",{href:"https://beian.miit.gov.cn/",target:"_blank",class:"footer-record"}," 沪ICP备 18025935号-3 ",-1);function Ga(o,t,n,l,r,i){return e.openBlock(),e.createElementBlock("footer",ja,[e.createTextVNode(" Copyright "),Ua,e.createTextVNode(" 2020-2023 "+e.toDisplayString(o.$t("Common.title"))+" ",1),o.version?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode("v"+e.toDisplayString(o.version)+" ",1)],64)):e.createCommentVNode("",!0),Fa])}const Vo=$(qa,[["render",Ga]]),Ha=e.defineComponent({name:"OcBack",components:{IconChevronLeft:io,NButton:d.NButton,NIcon:d.NIcon},props:{to:{type:String,default:""}},setup(o){const t=F.useRouter();return{back:()=>{o.to?t.push(o.to):t.back()}}}});function Ja(o,t,n,l,r,i){const s=e.resolveComponent("IconChevronLeft"),c=e.resolveComponent("NIcon"),p=e.resolveComponent("NButton");return e.openBlock(),e.createBlock(p,{text:"",onClick:o.back},{icon:e.withCtx(()=>[e.createVNode(c,null,{default:e.withCtx(()=>[e.createVNode(s)]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(o.$t("Common.back")),1)]),_:1},8,["onClick"])}const $o=$(Ha,[["render",Ja]]),So=o=>{const t=new FormData;return Object.keys(o).forEach(n=>{o.query&&n==="query"?t.append("query",JSON.stringify(o.query)):t.append(n,o[n])}),Ie("api/manager/job/submit",t)},Wa=o=>new Promise((t,n)=>{const l=me(o);x("api/manager/job/page",l).then(r=>{const i=pe(r);t(i)}).catch(()=>{n()})}),Ka=(o,t={})=>ko(o,t,"blob"),Xa=e.defineComponent({name:"OcImporter",components:{IconDismiss:te,IconArrowClockwise:oe,IconMailInboxAdd:vo,IconCloudArrowDown:Co,NModal:d.NModal,NCard:d.NCard,NSpace:d.NSpace,NUpload:d.NUpload,NButton:d.NButton,NTooltip:d.NTooltip,NIcon:d.NIcon,NDataTable:d.NDataTable},props:{show:{required:!0,type:Boolean,default:!1},type:{required:!0,type:String,default:""},params:{required:!1,type:String,default:""},file:{required:!0,type:String,default:""},steam:{type:Boolean,default:!1}},emits:["update:show"],setup(o,{emit:t}){const{t:n}=H.useI18n(),l=d.useNotification(),r=e.ref(!1),i=e.ref(!1),s=e.ref({page:1,pageCount:1,pageSize:30}),c=e.ref([{title:"#",width:60,align:"center",key:"index",render(w,C){return e.h("span",{},{default:()=>C+1})}},{title:n("Common.importer.fileName"),key:"jobName",fixed:"left"},{title:n("Common.importer.status"),key:"jobStatus",width:120,render(w){let C=n("Common.processing");return w.jobStatus===1&&(C=n("Common.success")),w.jobStatus===2&&(C=n("Common.failed")),e.h("span",{},{default:()=>C})}},{title:n("Common.importer.createTime"),key:"commitTime",width:200,render(w){return e.h("div",{},{default:()=>U(w.commitTime,"yyyy-MM-dd hh:mm:ss")})}},{title:n("Common.action"),key:"action",align:"center",fixed:"right",width:120,render(w){return re([{type:"custom",disabled:w.jobStatus===0,onClick:()=>{window.open(w.downloadUrl)},icon:ue,color:"success",text:n("Common.importer.btnDownload")}])}}]),p=e.ref([]),m=()=>{t("update:show",!1)},N=w=>{s.value.page=w,h()},v=w=>{s.value.pageSize=w,s.value.page=1,h()},f=w=>new Promise((C,S)=>{w.file.file&&So({jobType:"IMPORT",jobTypeName:o.type,jobParams:o.params,file:w.file.file}).then(()=>{h(),C()}).catch(()=>{h(),S()}),S()}),h=()=>{i.value=!0,Wa({jobType:"IMPORT",jobTypeName:o.type,query:s.value}).then(w=>{i.value=!1,p.value=w.records,s.value=w.query}).catch(()=>{i.value=!1})},_=()=>{o.steam?Ka(o.file).then(w=>{const C=document.createElement("a");C.style.display="none",C.download="刀组品号导入模板.xls",C.href=URL.createObjectURL(w),document.body.appendChild(C),C.click(),URL.revokeObjectURL(C.href),document.body.removeChild(C)}).catch(()=>{l.error({content:()=>n("Notice.error"),duration:3e3})}):window.open(`${o.file}?v=${Date.now()}`)};return e.watch(()=>o.show,w=>{r.value=w,w&&(s.value={page:1,pageCount:1,pageSize:30},h())}),{modal:r,columns:c,coldata:p,query:s,loading:i,init:h,closeModel:m,pageChange:N,pageSizeChange:v,beforeUpload:f,downloadFile:_}}}),Qa={class:"header-download"};function Za(o,t,n,l,r,i){const s=e.resolveComponent("IconMailInboxAdd"),c=e.resolveComponent("NIcon"),p=e.resolveComponent("NButton"),m=e.resolveComponent("NUpload"),N=e.resolveComponent("IconCloudArrowDown"),v=e.resolveComponent("IconArrowClockwise"),f=e.resolveComponent("NTooltip"),h=e.resolveComponent("IconDismiss"),_=e.resolveComponent("NSpace"),w=e.resolveComponent("NDataTable"),C=e.resolveComponent("NCard"),S=e.resolveComponent("NModal");return e.openBlock(),e.createBlock(S,{show:o.modal,"onUpdate:show":t[0]||(t[0]=B=>o.modal=B),"on-mask-click":o.closeModel},{default:e.withCtx(()=>[e.createVNode(C,{style:{width:"900px"}},{header:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.$t("Common.importer.title"))+" ",1),e.createElementVNode("span",Qa,e.toDisplayString(o.$t("Common.validDays")),1)]),"header-extra":e.withCtx(()=>[e.createVNode(_,{justify:"end"},{default:e.withCtx(()=>[e.createVNode(m,{"on-before-upload":o.beforeUpload,accept:".xlsx,.xls","show-file-list":!1},{default:e.withCtx(()=>[e.createVNode(p,null,{icon:e.withCtx(()=>[e.createVNode(c,null,{default:e.withCtx(()=>[e.createVNode(s)]),_:1})]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(o.$t("Common.importer.file")),1)]),_:1})]),_:1},8,["on-before-upload"]),e.renderSlot(o.$slots,"default"),e.createVNode(p,{onClick:o.downloadFile},{icon:e.withCtx(()=>[e.createVNode(c,null,{default:e.withCtx(()=>[e.createVNode(N)]),_:1})]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(o.$t("Common.importer.download")),1)]),_:1},8,["onClick"]),e.createVNode(f,{trigger:"hover"},{trigger:e.withCtx(()=>[e.createVNode(p,{loading:o.loading,onClick:o.init},{icon:e.withCtx(()=>[e.createVNode(c,null,{default:e.withCtx(()=>[e.createVNode(v)]),_:1})]),_:1},8,["loading","onClick"])]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(o.$t("Common.refresh")),1)]),_:1}),e.createVNode(p,{quaternary:"",onClick:o.closeModel},{icon:e.withCtx(()=>[e.createVNode(c,null,{default:e.withCtx(()=>[e.createVNode(h)]),_:1})]),_:1},8,["onClick"])]),_:3})]),default:e.withCtx(()=>[e.createVNode(w,{columns:o.columns,data:o.coldata,pagination:o.query,loading:o.loading,"on-update:page":o.pageChange,"on-update:page-size":o.pageSizeChange,"min-height":"500","max-height":"500","scroll-x":"600",remote:""},null,8,["columns","data","pagination","loading","on-update:page","on-update:page-size"])]),_:3})]),_:3},8,["show","on-mask-click"])}const Bo=$(Xa,[["render",Za]]),Ya=e.defineComponent({name:"OcLogin",components:{NTabs:d.NTabs,NTabPane:d.NTabPane,NForm:d.NForm,NFormItem:d.NFormItem,NDropdown:d.NDropdown,NInput:d.NInput,NButton:d.NButton,NGrid:d.NGrid,NGi:d.NGi,NPopover:d.NPopover},props:{version:{required:!1,type:String,default:"效率监测"},info:{required:!1,type:Object,default:()=>({href:"",text:""})}},setup(){const{t:o}=H.useI18n(),t=e.ref(A("lang","zh-CN")),n=d.useNotification(),l=F.useRouter(),r=e.ref("1"),i=e.ref(),s=e.ref(),c=e.ref(),p=e.ref(),m=e.ref(!1),N=e.ref(!1),v=e.ref(!1),f=e.ref({phone:"",name:"",password:""}),h=e.ref({name:{required:!0,message:()=>o("Common.login.userNameMessage"),trigger:"blur"},phone:{required:!0,validator:(V,b)=>b?/^[1][3,4,5,6,7,8,9][0-9]{9}$/.test(b):!1,message:()=>o("Common.login.mobileMessage"),trigger:"blur"},password:{required:!0,message:()=>o("Common.login.passwordMessage"),trigger:"input"}}),_=e.ref([]),w=e.ref([]),C=e.ref([]),S=e.ref([]),B=()=>{const V=A("loginOption",{}),b=[];Object.keys(V).forEach(T=>{b.push({label:T,key:T})}),_.value=b,w.value=b},O=()=>{const V=A("phoneOption",{}),b=[];Object.keys(V).forEach(T=>{b.push({label:T,key:T})}),C.value=b,S.value=b},a=V=>{j("token",V,0),ie().then(b=>{n.success({content:()=>o("Notice.success"),duration:3e3}),b.kind!==1&&l.replace(I.platformUrl)}).catch(()=>{n.error({content:()=>o("Notice.error"),duration:3e3}),f.value.password="",m.value=!1})},k=()=>{var V,b;m.value||(m.value=!0,r.value==="0"?(V=s.value)==null||V.validate(T=>{T?m.value=!1:He({type:r.value,...f.value}).then(z=>{const M=A("loginOption",{});M[f.value.name]=!0,j("loginOption",M,0),a(z)}).catch(()=>{f.value.password="",m.value=!1})}):(b=i.value)==null||b.validate(T=>{T?m.value=!1:He({type:r.value,...f.value}).then(z=>{const M=A("phoneOption",{});M[f.value.name]=!0,j("phoneOption",M,0),a(z)}).catch(()=>{f.value.password="",m.value=!1})}))},P=V=>{f.value.name=V;const b=w.value.filter(T=>T.label.indexOf(V)>-1);_.value=b,b.length===0?v.value=!1:v.value=!0},E=V=>{f.value.name=V,v.value=!1,c.value.focus(),setTimeout(()=>{var b;(b=s.value)==null||b.restoreValidation()},80)},y=V=>{var b;_.value.length===0?v.value=!1:v.value=V,(b=s.value)==null||b.restoreValidation()},R=V=>{f.value.phone=V;const b=S.value.filter(T=>T.label.indexOf(V)>-1);C.value=b,b.length===0?N.value=!1:N.value=!0},J=V=>{f.value.phone=V,N.value=!1,p.value.focus(),setTimeout(()=>{var b;(b=i.value)==null||b.restoreValidation()},80)},W=V=>{var b;C.value.length===0?N.value=!1:N.value=V,(b=i.value)==null||b.restoreValidation()},G=V=>{var b,T;r.value=V,f.value={phone:"",name:"",password:""},(b=s.value)==null||b.restoreValidation(),(T=i.value)==null||T.restoreValidation()},K=V=>e.h("div",{style:{position:"relative"}},{default:()=>[e.h("div",{},{default:()=>V.label}),e.h(te,{class:"login-drop-menu",onclick:b=>{b.stopPropagation(),b.stopImmediatePropagation();const T=A("loginOption",{});delete T[V.label],j("loginOption",T,0),B();const z=f.value.name,M=w.value.filter(g=>g.label.indexOf(z)>-1);_.value=M}},{default:()=>""})]}),X=V=>e.h("div",{style:{position:"relative"}},{default:()=>[e.h("div",{},{default:()=>V.label}),e.h(te,{class:"login-drop-menu",onclick:b=>{b.stopPropagation(),b.stopImmediatePropagation();const T=A("phoneOption",{});delete T[V.label],j("phoneOption",T,0),O();const z=f.value.name,M=S.value.filter(g=>g.label.indexOf(z)>-1);C.value=M}},{default:()=>""})]});return de(),ae("token"),B(),O(),ee(t.value),{tabs:r,pwdRef:c,pwdPhoneRef:p,formRef:s,formPhoneRef:i,formValue:f,formRules:h,showPhoneDropdown:N,showNameDropdown:v,optionsName:_,optionsPhone:C,loading:m,submit:k,tabChange:G,nameChange:P,phoneChange:R,dropNameSelect:E,dropPhoneSelect:J,showDropdownNameChange:y,showDropdownPhoneChange:W,renderDropdownNameLabel:K,renderDropdownPhoneLabel:X}}}),er={class:"login"},or=e.createElementVNode("div",{class:"login-left"},[e.createElementVNode("img",{src:"https://partex-cloud-static.oss-cn-hangzhou.aliyuncs.com/login.png",alt:"logo",class:"login-img"})],-1),tr={class:"login-right"},nr=e.createElementVNode("div",{class:"login-title"},null,-1),ar={class:"login-form"},rr=e.createElementVNode("br",null,null,-1),lr=e.createElementVNode("br",null,null,-1),sr={class:"login-submit"},cr=["href"],ir=e.createElementVNode("div",{class:"google-play"},null,-1),dr=e.createElementVNode("img",{src:"https://partex-cloud-static.oss-cn-hangzhou.aliyuncs.com/android_qr.png",alt:"AndroidQr",width:"300",height:"300"},null,-1),ur=e.createElementVNode("div",{class:"app-store"},null,-1),pr=e.createElementVNode("img",{src:"https://partex-cloud-static.oss-cn-hangzhou.aliyuncs.com/ios_qr.png",alt:"iOSQr",width:"300",height:"300"},null,-1),mr={class:"login-footer"},fr=e.createElementVNode("span",{style:{"font-family":"Arial, Helvetica, sans-serif"}},"©",-1),hr=e.createElementVNode("a",{href:"https://beian.miit.gov.cn/",target:"_blank",class:"footer-record"}," 沪ICP备 18025935号-3 ",-1);function gr(o,t,n,l,r,i){const s=e.resolveComponent("NTabPane"),c=e.resolveComponent("NInput"),p=e.resolveComponent("NDropdown"),m=e.resolveComponent("NFormItem"),N=e.resolveComponent("NForm"),v=e.resolveComponent("NTabs"),f=e.resolveComponent("NButton"),h=e.resolveComponent("NPopover"),_=e.resolveComponent("NGi"),w=e.resolveComponent("NGrid");return e.openBlock(),e.createElementBlock("div",er,[or,e.createElementVNode("div",tr,[nr,e.createElementVNode("div",ar,[e.createVNode(v,{value:o.tabs,"on-update:value":o.tabChange,type:"segment","justify-content":"end",animated:""},{default:e.withCtx(()=>[e.createVNode(s,{name:o.version,disabled:""},null,8,["name"]),e.createVNode(s,{name:"1",tab:o.$t("Common.login.mobile")},{default:e.withCtx(()=>[rr,e.createVNode(N,{ref:"formPhoneRef",model:o.formValue,rules:o.formRules,"show-require-mark":!1,"label-placement":"top",onKeyup:e.withKeys(o.submit,["enter"])},{default:e.withCtx(()=>[e.createVNode(m,{label:o.$t("Common.login.mobile"),path:"phone"},{default:e.withCtx(()=>[e.createVNode(p,{show:o.showPhoneDropdown,options:o.optionsPhone,"render-label":o.renderDropdownPhoneLabel,width:"trigger",onClickoutside:t[3]||(t[3]=()=>{o.showPhoneDropdown=!1}),onSelect:o.dropPhoneSelect},{default:e.withCtx(()=>[e.createVNode(c,{value:o.formValue.phone,"onUpdate:value":t[0]||(t[0]=C=>o.formValue.phone=C),placeholder:o.$t("Common.login.mobilePlaceholder"),"on-update:value":o.phoneChange,onClick:t[1]||(t[1]=C=>o.showDropdownPhoneChange(!0)),onFocus:t[2]||(t[2]=C=>o.showDropdownPhoneChange(!0))},null,8,["value","placeholder","on-update:value"])]),_:1},8,["show","options","render-label","onSelect"])]),_:1},8,["label"]),e.createVNode(m,{label:o.$t("Common.login.password"),path:"password"},{default:e.withCtx(()=>[e.createVNode(c,{ref:"pwdPhoneRef",value:o.formValue.password,"onUpdate:value":t[4]||(t[4]=C=>o.formValue.password=C),type:"password","show-password-on":"click",placeholder:o.$t("Common.login.passwordPlaceholder"),onFocus:t[5]||(t[5]=C=>o.showDropdownPhoneChange(!1))},null,8,["value","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","rules","onKeyup"])]),_:1},8,["tab"]),e.createVNode(s,{name:"0",tab:o.$t("Common.login.userName")},{default:e.withCtx(()=>[lr,e.createVNode(N,{ref:"formRef",model:o.formValue,rules:o.formRules,"show-require-mark":!1,"label-placement":"top",onKeyup:e.withKeys(o.submit,["enter"])},{default:e.withCtx(()=>[e.createVNode(m,{label:o.$t("Common.login.userName"),path:"name"},{default:e.withCtx(()=>[e.createVNode(p,{show:o.showNameDropdown,options:o.optionsName,"render-label":o.renderDropdownNameLabel,width:"trigger",onClickoutside:t[9]||(t[9]=()=>{o.showNameDropdown=!1}),onSelect:o.dropNameSelect},{default:e.withCtx(()=>[e.createVNode(c,{value:o.formValue.name,"onUpdate:value":t[6]||(t[6]=C=>o.formValue.name=C),placeholder:o.$t("Common.login.userNamePlaceholder"),"on-update:value":o.nameChange,onClick:t[7]||(t[7]=C=>o.showDropdownNameChange(!0)),onFocus:t[8]||(t[8]=C=>o.showDropdownNameChange(!0))},null,8,["value","placeholder","on-update:value"])]),_:1},8,["show","options","render-label","onSelect"])]),_:1},8,["label"]),e.createVNode(m,{label:o.$t("Common.login.password"),path:"password"},{default:e.withCtx(()=>[e.createVNode(c,{ref:"pwdRef",value:o.formValue.password,"onUpdate:value":t[10]||(t[10]=C=>o.formValue.password=C),type:"password","show-password-on":"click",placeholder:o.$t("Common.login.passwordPlaceholder")},null,8,["value","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","rules","onKeyup"])]),_:1},8,["tab"])]),_:1},8,["value","on-update:value"]),e.createElementVNode("div",sr,[e.createVNode(f,{loading:o.loading,class:"button-primary",onClick:o.submit},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.$t("Common.login.in")),1)]),_:1},8,["loading","onClick"])]),o.info.href?(e.openBlock(),e.createElementBlock("a",{key:0,href:o.info.href,class:"login-other"},e.toDisplayString(o.info.text),9,cr)):e.createCommentVNode("",!0),e.createVNode(w,{"x-gap":"15",cols:2},{default:e.withCtx(()=>[e.createVNode(_,null,{default:e.withCtx(()=>[e.createVNode(h,{trigger:"hover",placement:"top"},{trigger:e.withCtx(()=>[ir]),default:e.withCtx(()=>[dr]),_:1})]),_:1}),e.createVNode(_,null,{default:e.withCtx(()=>[e.createVNode(h,{trigger:"hover",placement:"top"},{trigger:e.withCtx(()=>[ur]),default:e.withCtx(()=>[pr]),_:1})]),_:1})]),_:1})]),e.createElementVNode("footer",mr,[e.createTextVNode(" Copyright "),fr,e.createTextVNode(" 2020-2023 "+e.toDisplayString(o.$t("Common.title"))+" ",1),hr])])])}const Io=$(Ya,[["render",gr]]),wr=e.defineComponent({name:"OcNumberRoll",props:{value:{required:!0,type:[Number,String],default:0},duration:{type:Number,default:1e3},precision:{type:Number,default:0},format:{type:Function,default:void 0}},setup(o){const t=e.ref(!1),n=e.ref(0),l=c=>1-Math.pow(1-c,5),r=c=>o.format?o.format(c):c;function i(c,p,m=o.duration){const N=()=>{const f=performance.now(),h=Math.min(f-v,m),_=c+(p-c)*l(h/m);if(h===m){n.value=r(Number(o.value)),t.value=!1;return}const w=Number(_.toFixed(o.precision));n.value=r(w),requestAnimationFrame(N)},v=performance.now();N()}const s=(c=0,p=o.value)=>{t.value=!0,n.value=r(c),String(c)!==String(p)&&i(c,Number(p))};return e.watch(()=>o.value,(c,p)=>{s(Number(p)||0,Number(c))}),e.onMounted(()=>{s()}),{displayedValueRef:n}}});function Nr(o,t,n,l,r,i){return e.toDisplayString(o.displayedValueRef)}const Te=$(wr,[["render",Nr]]),vr=e.defineComponent({name:"OcLogo",components:{NGrid:d.NGrid,NGi:d.NGi,NDivider:d.NDivider,NumberRoll:Te},props:{text:{type:String,default:"智能效率监测平台"}},setup(){const o=e.ref(Date.now()),t=e.ref(void 0),n=l=>U(l,"yyyy-MM-dd hh:mm:ss");return e.onMounted(()=>{t.value=setInterval(()=>{o.value=Date.now()},1e3)}),e.onBeforeUnmount(()=>{clearInterval(t.value),t.value=void 0}),{time:o,numFormat:n}}}),Cr=o=>(e.pushScopeId("data-v-e71866dd"),o=o(),e.popScopeId(),o),yr=Cr(()=>e.createElementVNode("div",{class:"logo"},null,-1));function br(o,t,n,l,r,i){const s=e.resolveComponent("NGi"),c=e.resolveComponent("NDivider"),p=e.resolveComponent("NumberRoll"),m=e.resolveComponent("NGrid");return e.openBlock(),e.createBlock(m,{cols:5,class:"dashboard-logo"},{default:e.withCtx(()=>[e.createVNode(s,{span:"1",class:"flex-center-left"},{default:e.withCtx(()=>[yr]),_:1}),e.createVNode(s,{span:"3",class:"flex-center"},{default:e.withCtx(()=>[e.createVNode(c,{class:"dashboard-title-show"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.text),1)]),_:1})]),_:1}),e.createVNode(s,{span:"1",class:"flex-center-right time"},{default:e.withCtx(()=>[e.createVNode(p,{value:o.time,format:o.numFormat},null,8,["value","format"])]),_:1})]),_:1})}const To=$(vr,[["render",br],["__scopeId","data-v-e71866dd"]]),kr=o=>{const t=JSON.parse(JSON.stringify(o));return t.oldPassword=ce(t.oldPassword),t.newPassword=ce(t.newPassword),t.comfirmPassword=ce(t.comfirmPassword),x("api/auth/user/modifyPassword",t)},_r=o=>x("api/auth/user/update",o),Vr=e.defineComponent({name:"OcMy",components:{NGrid:d.NGrid,NGi:d.NGi,NForm:d.NForm,NFormItem:d.NFormItem,NInput:d.NInput,NButton:d.NButton},setup(){const{t:o}=H.useI18n(),t=d.useNotification(),n=e.ref(),l=e.ref(),r=e.ref(!1),i=e.ref({oldPassword:"",newPassword:"",comfirmPassword:""}),s=e.ref({oldPassword:{required:!0,message:()=>o("Common.my.oldPasswordMessage"),trigger:"blur"},newPassword:{required:!0,message:()=>o("Common.my.newPasswordMessage"),trigger:"blur"},comfirmPassword:{required:!0,message:()=>o("Common.my.checkPasswordMessage"),trigger:"blur"}}),c=e.ref(u),p=e.ref({email:{required:!1,trigger:"blur",validator:(v,f)=>f?/^[0-9a-zA-Z_.-]+[@][0-9a-zA-Z_.-]+([.][a-zA-Z]+){1,2}$/.test(f):!0,message:()=>o("Common.my.emailMessage")},phone:{required:!1,trigger:"blur",validator:(v,f)=>f?/^[1][3,4,5,7,8,9][0-9]{9}$/.test(f):!0,message:()=>o("Common.my.phoneMessage")}});return{formRef:l,pwdRef:n,pwdValue:i,formValue:c,pwdRules:s,formRules:p,loading:r,pwdSubmit:()=>{var v;r.value||(r.value=!0,(v=n.value)==null||v.validate(f=>{f?r.value=!1:kr(i.value).then(()=>{var h;i.value={oldPassword:"",newPassword:"",comfirmPassword:""},(h=n.value)==null||h.restoreValidation(),t.success({content:()=>o("Notice.success"),duration:3e3}),setTimeout(()=>{window.location.href="/login"},1e3)}).catch(()=>{r.value=!1})}))},formSubmit:()=>{var v;r.value||(r.value=!0,(v=l.value)==null||v.validate(f=>{f?r.value=!1:_r(c.value).then(()=>{t.success({content:()=>o("Notice.success"),duration:3e3}),r.value=!1,ie().catch(()=>null)}).catch(()=>{r.value=!1})}))}}}}),$r={class:"com-card"},Sr={class:"com-title"},Br=e.createElementVNode("br",null,null,-1),Ir={class:"text-right"},Tr={class:"com-card"},Dr={class:"com-title"},Pr=e.createElementVNode("br",null,null,-1),Er={class:"text-right"};function Mr(o,t,n,l,r,i){const s=e.resolveComponent("NInput"),c=e.resolveComponent("NFormItem"),p=e.resolveComponent("NForm"),m=e.resolveComponent("NButton"),N=e.resolveComponent("NGi"),v=e.resolveComponent("NGrid");return e.openBlock(),e.createBlock(v,{"x-gap":"15","y-gap":"15",cols:2},{default:e.withCtx(()=>[e.createVNode(N,{span:"1"},{default:e.withCtx(()=>[e.createElementVNode("div",$r,[e.createElementVNode("div",Sr,e.toDisplayString(o.$t("Common.my.title")),1),Br,e.createVNode(p,{ref:"formRef",model:o.formValue,rules:o.formRules,"label-placement":"top"},{default:e.withCtx(()=>[e.createVNode(c,{label:o.$t("Common.my.tenantCode"),path:"tenantLoginCode"},{default:e.withCtx(()=>[e.createVNode(s,{value:o.formValue.tenantLoginCode,"onUpdate:value":t[0]||(t[0]=f=>o.formValue.tenantLoginCode=f),readonly:""},null,8,["value"])]),_:1},8,["label"]),e.createVNode(c,{label:o.$t("Common.my.tenantName"),path:"tenantName"},{default:e.withCtx(()=>[e.createVNode(s,{value:o.formValue.tenantName,"onUpdate:value":t[1]||(t[1]=f=>o.formValue.tenantName=f),readonly:""},null,8,["value"])]),_:1},8,["label"]),e.createVNode(c,{label:o.$t("Common.my.name"),path:"name"},{default:e.withCtx(()=>[e.createVNode(s,{value:o.formValue.name,"onUpdate:value":t[2]||(t[2]=f=>o.formValue.name=f),readonly:""},null,8,["value"])]),_:1},8,["label"]),e.createVNode(c,{label:o.$t("Common.my.email"),path:"email"},{default:e.withCtx(()=>[e.createVNode(s,{value:o.formValue.email,"onUpdate:value":t[3]||(t[3]=f=>o.formValue.email=f),placeholder:"邮箱"},null,8,["value"])]),_:1},8,["label"]),e.createVNode(c,{label:o.$t("Common.my.realName"),path:"realName"},{default:e.withCtx(()=>[e.createVNode(s,{value:o.formValue.realName,"onUpdate:value":t[4]||(t[4]=f=>o.formValue.realName=f),placeholder:"真实姓名"},null,8,["value"])]),_:1},8,["label"]),e.createVNode(c,{label:o.$t("Common.my.phone"),path:"phone"},{default:e.withCtx(()=>[e.createVNode(s,{value:o.formValue.phone,"onUpdate:value":t[5]||(t[5]=f=>o.formValue.phone=f),placeholder:"手机"},null,8,["value"])]),_:1},8,["label"])]),_:1},8,["model","rules"]),e.createElementVNode("div",Ir,[e.createVNode(m,{loading:o.loading,class:"button-primary",onClick:o.formSubmit},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.$t("Common.my.submit")),1)]),_:1},8,["loading","onClick"])])])]),_:1}),e.createVNode(N,{span:"1"},{default:e.withCtx(()=>[e.createElementVNode("div",Tr,[e.createElementVNode("div",Dr,e.toDisplayString(o.$t("Common.my.password")),1),Pr,e.createVNode(p,{ref:"pwdRef",model:o.pwdValue,rules:o.pwdRules,"label-placement":"top"},{default:e.withCtx(()=>[e.createVNode(c,{label:o.$t("Common.my.oldPassword"),path:"oldPassword"},{default:e.withCtx(()=>[e.createVNode(s,{value:o.pwdValue.oldPassword,"onUpdate:value":t[6]||(t[6]=f=>o.pwdValue.oldPassword=f),type:"password",placeholder:o.$t("Common.my.oldPassword"),"show-password-on":"click"},null,8,["value","placeholder"])]),_:1},8,["label"]),e.createVNode(c,{label:o.$t("Common.my.newPassword"),path:"newPassword"},{default:e.withCtx(()=>[e.createVNode(s,{value:o.pwdValue.newPassword,"onUpdate:value":t[7]||(t[7]=f=>o.pwdValue.newPassword=f),type:"password",placeholder:o.$t("Common.my.newPassword"),"show-password-on":"click"},null,8,["value","placeholder"])]),_:1},8,["label"]),e.createVNode(c,{label:o.$t("Common.my.checkPassword"),path:"comfirmPassword"},{default:e.withCtx(()=>[e.createVNode(s,{value:o.pwdValue.comfirmPassword,"onUpdate:value":t[8]||(t[8]=f=>o.pwdValue.comfirmPassword=f),type:"password",placeholder:o.$t("Common.my.checkPassword"),"show-password-on":"click"},null,8,["value","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","rules"]),e.createElementVNode("div",Er,[e.createVNode(m,{loading:o.loading,class:"button-primary",onClick:o.pwdSubmit},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.$t("Common.my.submit")),1)]),_:1},8,["loading","onClick"])])])]),_:1})]),_:1})}const Do=$(Vr,[["render",Mr]]);function xr(o){return new Promise((t,n)=>{x("api/manager/factory-params/detail",{keyName:o}).then(l=>{const r=JSON.parse(l.valueJson??"[]");t(r)}).catch(()=>{n()})})}const Or=e.defineComponent({name:"OcReport",components:{NSpace:d.NSpace,NDataTable:d.NDataTable,NDatePicker:d.NDatePicker,NInputGroup:d.NInputGroup,NInputGroupLabel:d.NInputGroupLabel},setup(){const{t:o}=H.useI18n(),t=e.ref(!0),n=d.useNotification(),l=e.ref([{title:"#",width:60,align:"center",key:"index",render(p,m){return e.h("span",{},{default:()=>m+1})}},{title:"名称",key:"name"},{title:"备注",key:"content"},{title:"操作",key:"action",align:"center",fixed:"right",width:120,render(p){return re([{type:"custom",onClick:()=>{s(p.key)},icon:ue,color:"success",text:"下载"}])}}]),r=e.ref([]),i=e.ref([Date.now(),Date.now()]),s=p=>{t.value=!0,So({jobType:"EXPORT",jobTypeName:p,jobParams:JSON.stringify({startDate:i.value[0],endDate:i.value[1]})}).then(()=>{t.value=!1,n.success({content:()=>o("Notice.success"),duration:3e3}),be(!0)}).catch(()=>{t.value=!1,n.error({content:()=>o("Notice.error"),duration:3e3})})},c=p=>p>Date.now();return xr("individuation_report_download").then(p=>{r.value=p.map(m=>({key:m.key,name:m.name,content:"默认导出最近30天的数据。每个企业租户下的所有账号,每天累计最多下载10次,采用异步下载"})),t.value=!1}).catch(()=>{t.value=!1}),{columns:l,columnData:r,loading:t,range:i,isRangeDateDisabled:c}}}),zr={class:"com-card"},Ar=e.createElementVNode("br",null,null,-1);function Rr(o,t,n,l,r,i){const s=e.resolveComponent("NInputGroupLabel"),c=e.resolveComponent("NDatePicker"),p=e.resolveComponent("NInputGroup"),m=e.resolveComponent("NSpace"),N=e.resolveComponent("n-data-table");return e.openBlock(),e.createElementBlock("div",zr,[e.createVNode(m,{justify:"end"},{default:e.withCtx(()=>[e.createVNode(p,null,{default:e.withCtx(()=>[e.createVNode(s,{class:"oc-group-label"},{default:e.withCtx(()=>[e.createTextVNode("日期")]),_:1}),e.createVNode(c,{value:o.range,"onUpdate:value":t[0]||(t[0]=v=>o.range=v),type:"daterange","is-date-disabled":o.isRangeDateDisabled,style:{width:"300px"}},null,8,["value","is-date-disabled"])]),_:1})]),_:1}),Ar,e.createVNode(N,{columns:o.columns,data:o.columnData,loading:o.loading,"min-height":"calc(100vh - 180px)","max-height":"calc(100vh - 180px)"},null,8,["columns","data","loading"])])}const Po=$(Or,[["render",Rr]]),Lr=e.defineComponent({name:"OcSkeleton",components:{NGrid:d.NGrid,NGi:d.NGi,NSkeleton:d.NSkeleton},props:{cols:{type:Number,default:6},num:{type:Array,default:()=>[[12,1]]}},setup(){return{}}}),qr={class:"com-skeleton"};function jr(o,t,n,l,r,i){const s=e.resolveComponent("NSkeleton"),c=e.resolveComponent("NGi"),p=e.resolveComponent("NGrid");return e.openBlock(),e.createElementBlock("div",qr,[e.createVNode(p,{"x-gap":"15","y-gap":"15",cols:o.cols},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.num,(m,N)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`skeleton_${N}`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.num[N][0],(v,f)=>(e.openBlock(),e.createBlock(c,{key:`skeleton_${N}_${f}`,span:o.num[N][1]},{default:e.withCtx(()=>[e.createVNode(s)]),_:2},1032,["span"]))),128))],64))),128))]),_:1},8,["cols"])])}const Eo=$(Lr,[["render",jr]]),Ur=e.defineComponent({name:"Oc404",components:{NButton:d.NButton},setup(){const o=()=>{q.push(I.platformUrl)},t=e.ref();return e.onMounted(()=>{t.value=setInterval(()=>{q.push(I.platformUrl)},3e3)}),e.onBeforeUnmount(()=>{clearInterval(t.value)}),{goBack:o}}}),De=o=>(e.pushScopeId("data-v-4387c328"),o=o(),e.popScopeId(),o),Fr={class:"com-card flex-center error404",style:{flex:"1"}},Gr=De(()=>e.createElementVNode("div",{class:"miss-img"},null,-1)),Hr=De(()=>e.createElementVNode("p",{class:"miss-title"},"404 页面走丢了",-1)),Jr=De(()=>e.createElementVNode("p",{class:"miss-title2"},"Something's missing.",-1));function Wr(o,t,n,l,r,i){const s=e.resolveComponent("n-button");return e.openBlock(),e.createElementBlock("div",Fr,[Gr,Hr,Jr,e.createVNode(s,{tertiary:"",onClick:o.goBack},{default:e.withCtx(()=>[e.createTextVNode("返回首页")]),_:1},8,["onClick"])])}const Mo=$(Ur,[["render",Wr],["__scopeId","data-v-4387c328"]]),Kr=e.defineComponent({name:"Oc500",components:{NButton:d.NButton},setup(){const o=()=>{q.push(I.platformUrl)},t=e.ref();return e.onMounted(()=>{t.value=setInterval(()=>{q.push(I.platformUrl)},3e3)}),e.onBeforeUnmount(()=>{clearInterval(t.value)}),{goBack:o}}}),fe=o=>(e.pushScopeId("data-v-d1bdd42b"),o=o(),e.popScopeId(),o),Xr={class:"com-card flex-center error500",style:{flex:"1"}},Qr=fe(()=>e.createElementVNode("img",{src:"https://partex-cloud-static.oss-cn-hangzhou.aliyuncs.com//500.png",alt:"500"},null,-1)),Zr=fe(()=>e.createElementVNode("div",{class:"miss-txt"},"500",-1)),Yr=fe(()=>e.createElementVNode("p",{class:"miss-title"},"服务暂时中断,请稍后重试.",-1)),el=fe(()=>e.createElementVNode("p",{class:"miss-title2"},"Oops! No Internet connection found.",-1));function ol(o,t,n,l,r,i){const s=e.resolveComponent("NButton");return e.openBlock(),e.createElementBlock("div",Xr,[Qr,Zr,Yr,el,e.createVNode(s,{tertiary:"",onClick:o.goBack},{default:e.withCtx(()=>[e.createTextVNode("返回首页")]),_:1},8,["onClick"])])}const xo=$(Kr,[["render",ol],["__scopeId","data-v-d1bdd42b"]]),tl=e.defineComponent({name:"OcAuth",setup(){const o=F.useRoute(),t=F.useRouter(),{auth:n}=o.query;n?j("token",n,0):ae("token"),t.replace(I.platformUrl)}}),nl={class:"com-card flex-center",style:{flex:"1"}},al=e.createElementVNode("p",{class:"miss-title"},"登录中...",-1),rl=[al];function ll(o,t,n,l,r,i){return e.openBlock(),e.createElementBlock("div",nl,rl)}const Oo=$(tl,[["render",ll]]);var se=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function sl(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}function cl(o){var t=typeof o;return o!=null&&(t=="object"||t=="function")}var zo=cl,il=typeof se=="object"&&se&&se.Object===Object&&se,dl=il,ul=dl,pl=typeof self=="object"&&self&&self.Object===Object&&self,ml=ul||pl||Function("return this")(),Ao=ml,fl=Ao,hl=function(){return fl.Date.now()},gl=hl,wl=/\s/;function Nl(o){for(var t=o.length;t--&&wl.test(o.charAt(t)););return t}var vl=Nl,Cl=vl,yl=/^\s+/;function bl(o){return o&&o.slice(0,Cl(o)+1).replace(yl,"")}var kl=bl,_l=Ao,Vl=_l.Symbol,Ro=Vl,Ke=Ro,Lo=Object.prototype,$l=Lo.hasOwnProperty,Sl=Lo.toString,Q=Ke?Ke.toStringTag:void 0;function Bl(o){var t=$l.call(o,Q),n=o[Q];try{o[Q]=void 0;var l=!0}catch{}var r=Sl.call(o);return l&&(t?o[Q]=n:delete o[Q]),r}var Il=Bl,Tl=Object.prototype,Dl=Tl.toString;function Pl(o){return Dl.call(o)}var El=Pl,Xe=Ro,Ml=Il,xl=El,Ol="[object Null]",zl="[object Undefined]",Qe=Xe?Xe.toStringTag:void 0;function Al(o){return o==null?o===void 0?zl:Ol:Qe&&Qe in Object(o)?Ml(o):xl(o)}var Rl=Al;function Ll(o){return o!=null&&typeof o=="object"}var ql=Ll,jl=Rl,Ul=ql,Fl="[object Symbol]";function Gl(o){return typeof o=="symbol"||Ul(o)&&jl(o)==Fl}var Hl=Gl,Jl=kl,Ze=zo,Wl=Hl,Ye=NaN,Kl=/^[-+]0x[0-9a-f]+$/i,Xl=/^0b[01]+$/i,Ql=/^0o[0-7]+$/i,Zl=parseInt;function Yl(o){if(typeof o=="number")return o;if(Wl(o))return Ye;if(Ze(o)){var t=typeof o.valueOf=="function"?o.valueOf():o;o=Ze(t)?t+"":t}if(typeof o!="string")return o===0?o:+o;o=Jl(o);var n=Xl.test(o);return n||Ql.test(o)?Zl(o.slice(2),n?2:8):Kl.test(o)?Ye:+o}var es=Yl,os=zo,Ne=gl,eo=es,ts="Expected a function",ns=Math.max,as=Math.min;function rs(o,t,n){var l,r,i,s,c,p,m=0,N=!1,v=!1,f=!0;if(typeof o!="function")throw new TypeError(ts);t=eo(t)||0,os(n)&&(N=!!n.leading,v="maxWait"in n,i=v?ns(eo(n.maxWait)||0,t):i,f="trailing"in n?!!n.trailing:f);function h(P){var E=l,y=r;return l=r=void 0,m=P,s=o.apply(y,E),s}function _(P){return m=P,c=setTimeout(S,t),N?h(P):s}function w(P){var E=P-p,y=P-m,R=t-E;return v?as(R,i-y):R}function C(P){var E=P-p,y=P-m;return p===void 0||E>=t||E<0||v&&y>=i}function S(){var P=Ne();if(C(P))return B(P);c=setTimeout(S,w(P))}function B(P){return c=void 0,f&&l?h(P):(l=r=void 0,s)}function O(){c!==void 0&&clearTimeout(c),m=0,l=p=r=c=void 0}function a(){return c===void 0?s:B(Ne())}function k(){var P=Ne(),E=C(P);if(l=arguments,r=this,p=P,E){if(c===void 0)return _(p);if(v)return clearTimeout(c),c=setTimeout(S,t),h(p)}return c===void 0&&(c=setTimeout(S,t)),s}return k.cancel=O,k.flush=a,k}var ls=rs;const ss=sl(ls);let Pe=3840,Ee=2160;const Me=e.reactive({scale:1});function qo(o,t){Pe=o,Ee=t}function xe(){let o=1;const t=window.innerWidth,n=window.innerHeight,l=Pe,r=Ee,i=parseFloat((l/r).toFixed(5));if(parseFloat((t/n).toFixed(5))>i){const c=parseFloat((n*i/l).toFixed(5));o=c>1?1:c}else{const c=parseFloat((t/i/r).toFixed(5));o=c>1?1:c}Me.scale=o}function jo(){const o=ss(xe,200);return o(),window.addEventListener("resize",o),()=>{Pe=3840,Ee=2160,window.removeEventListener("resize",o)}}const cs={Platform:{iot:"智能效率监测平台",tdm:"智能刀具管理平台",qms:"智能质量检测平台",twin:"智能数字大屏平台",maintain:"智能设备维保平台"},Notice:{success:"操作成功",error:"操作失败,请稍后重试"},Common:{validDays:"报表文件具有七天有效期",search:"查询",refresh:"刷新",filter:"筛选",reset:"重置",success:"成功",failed:"失败",processing:"处理中",action:"操作",back:"返回",title:"零捷互联智能云平台",message:{title:"消息列表",title2:"消息",unRead:"未读",all:"全部",read:"已读",readAll:"一键已读"},login:{mobile:"手机号",mobilePlaceholder:"请输入手机号码",mobileMessage:"请输入正确的手机号码",password:"密码",passwordPlaceholder:"请输入密码",passwordMessage:"请输入密码",userName:"用户名",userNamePlaceholder:"请输入用户名",userNameMessage:"请输入正确的用户名",in:"登录"},my:{title:"我的信息",tenantCode:"租户代码",tenantName:"租户名称",name:"名称",email:"邮箱",emailMessage:"邮箱格式不正确",realName:"真实姓名",phone:"手机",phoneMessage:"手机号码格式不正确",submit:"更新",password:"修改密码",oldPassword:"旧密码",newPassword:"新密码",checkPassword:"确认新密码",oldPasswordMessage:"请填写旧密码",newPasswordMessage:"请填写新密码",checkPasswordMessage:"请填写确认新密码"},dropdownMenu:{software:"零捷软件",android:"安卓APP",ios:"iOS APP",chrome:"Chrome浏览器",edge:"Edge浏览器",dashboard_IoT:"大屏机加工版本",dashboard_Prt:"大屏印刷版本",report:"个性化报表",info:"我的信息",logout:"退出"},importer:{title:"导入",file:"导入文件",download:"下载模版",btnDownload:"下载",fileName:"文件名称",status:"状态",createTime:"创建时间",retry:"重试"}}},is={Platform:{iot:"SMART LEAN IOT PLATFORM",tdm:"SMART TOOL MANAGEMENT PLATFORM",qms:"SMART QUALITY MANAGEMENT PLATFORM",twin:"SMART DASHBOARD PLATFORM",maintain:"SMART MAINTAIN PLATFORM"},Notice:{success:"Success",error:"An error occurred, please try again later"},Common:{validDays:"Files are valid for seven days",search:"Search",refresh:"Refresh",filter:"Filter",reset:"Reset",success:"Success",failed:"Failed",processing:"Processing",action:"Action",back:"Back",title:"Partex",message:{title:"Messages",title2:"Message",unRead:"Unread",all:"All",read:"Read",readAll:"Read All"},login:{mobile:"Mobile",mobilePlaceholder:"Please Input Mobile",mobileMessage:"Mobile is not correct",password:"Password",passwordPlaceholder:"Please Input Password",passwordMessage:"Please Input Password",userName:"UserName",userNamePlaceholder:"Please Input UserName",userNameMessage:"UserName is not correct",in:"Sign in"},my:{title:"Info",tenantCode:"TenantCode",tenantName:"TenantName",name:"Name",email:"Email",emailMessage:"Email is not correct",realName:"RealName",phone:"Mobile",phoneMessage:"Mobile is not correct",submit:"Apply",password:"Change Password",oldPassword:"Current",newPassword:"New",checkPassword:"Check",oldPasswordMessage:"Please Input Current Password",newPasswordMessage:"Please Input New Password",checkPasswordMessage:"Please Check New Password"},dropdownMenu:{software:"Software",android:"Android APP",ios:"iOS APP",chrome:"Chrome",edge:"Edge",dashboard:"Dashboard",dashboard_IoT:"Dashboard_IoT",dashboard_Prt:"Dashboard_Print",report:"Reports",info:"UserInfo",logout:"Logout"},importer:{title:"Import",file:"Import File",download:"Download Template",btnDownload:"Download",fileName:"FileName",status:"Status",createTime:"CreateTime",retry:"Retry"}}},Uo=cs,Fo=is,oo=Object.freeze(Object.defineProperty({__proto__:null,Oc404:Mo,Oc500:xo,OcAuth:Oo,OcBack:$o,OcFooter:Vo,OcHeader:_o,OcImporter:Bo,OcLogin:Io,OcLogo:To,OcMy:Do,OcNumberRoll:Te,OcReport:Po,OcSearchBar:ye,OcSkeleton:Eo,OcTable:to,fnClearUser:de,fnComputedScale:xe,fnDownload:ro,fnGetUser:ie,fnListenerScale:jo,fnSetLang:ee,fnSetNormalWidthAndHeight:qo,fnSetPlatform:ao,fnSetTheme:ke,fnSetUser:_e,fnUserLogout:Ve,headerStore:I,langCN:Uo,langUS:Fo,scaleStore:Me,userStore:u},Symbol.toStringTag,{value:"Module"})),ds="1.0.0";let Go;async function Ho(){const o=await fetch(`${window.location.protocol}//${window.location.host}`,{method:"HEAD",cache:"no-cache"});return o.headers.get("etag")||o.headers.get("last-modified")}async function us(){const o=await Ho();Go!==o&&bt(!0)}async function ps(){Go=await Ho(),window.versionMonitor&&clearInterval(window.versionMonitor),window.versionMonitor=setInterval(()=>{us()},60*1e3)}function Jo({components:o=[]}={}){const t=[];function n(r,i,s){r.component(i)||r.component(i,s)}function l(r,i){if(!t.includes(r)&&(t.push(r),o.forEach(s=>{const{name:c,alias:p}=s;n(r,c,s),p&&p.forEach(m=>{n(r,m,s)})}),i)){const{versionMonitor:s=!0,enableRedirect:c=!0,local:p="zh-CN"}=i;Pt(c),Ct(p),s&&ps()}}return{version:ds,install:l}}const Wo=Jo({components:Object.keys(oo).map(o=>oo[o])}),ms=Wo.install;exports.FILE=Ie;exports.GET=ko;exports.IconAlert=so;exports.IconArrowClockwise=oe;exports.IconArrowSquareDown=uo;exports.IconCalendarArrowDown=ue;exports.IconChevronLeft=io;exports.IconClear=co;exports.IconCloudArrowDown=Co;exports.IconDelete=go;exports.IconDismiss=te;exports.IconDrafts=No;exports.IconEye=wo;exports.IconFullScreenMaximize=xn;exports.IconGridDots=fo;exports.IconMailInboxAdd=vo;exports.IconSearch=ho;exports.IconWeatherMoon=po;exports.IconWeatherSunny=mo;exports.Oc404=Mo;exports.Oc500=xo;exports.OcAuth=Oo;exports.OcBack=$o;exports.OcFooter=Vo;exports.OcHeader=_o;exports.OcImporter=Bo;exports.OcLogin=Io;exports.OcLogo=To;exports.OcMy=Do;exports.OcNumberRoll=Te;exports.OcReport=Po;exports.OcSearchBar=ye;exports.OcSkeleton=Eo;exports.OcTable=to;exports.POST=x;exports.create=Jo;exports.darkTheme=ga;exports.default=Wo;exports.fnCancelFetch=vt;exports.fnCheckDashRole=Sa;exports.fnCheckIoTRole=_a;exports.fnCheckQMSRole=$a;exports.fnCheckTDMRole=Va;exports.fnClearUser=de;exports.fnComputedScale=xe;exports.fnDecodeCursor=Ca;exports.fnDelStorage=ae;exports.fnDeleteLoad=bo;exports.fnDownload=ro;exports.fnEncodeCursor=va;exports.fnFormatTime=U;exports.fnFormatUnits=ka;exports.fnFullScreen=ba;exports.fnGetStorage=A;exports.fnGetUser=ie;exports.fnIsMobile=wa;exports.fnListenerScale=jo;exports.fnPageModel2Naive=pe;exports.fnPageNaive2Model=me;exports.fnRenderAction=re;exports.fnScrollTop=yo;exports.fnSetLang=ee;exports.fnSetNormalWidthAndHeight=qo;exports.fnSetPlatform=ao;exports.fnSetStorage=j;exports.fnSetTheme=ke;exports.fnSetUser=_e;exports.fnThrottle=ya;exports.fnUserLogout=Ve;exports.headerStore=I;exports.install=ms;exports.langCN=Uo;exports.langUS=Fo;exports.lightTheme=ha;exports.scaleStore=Me;exports.userStore=u;
|