cnhis-design-vue 3.1.41-beta.37 → 3.1.41-beta.38
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/es/components/fabric-chart/src/hooks/useBirthProcess.js +1 -1
- package/es/components/iho-table/index.d.ts +1 -0
- package/es/components/iho-table/src/IhoTable.vue.d.ts +1 -0
- package/es/components/iho-table/src/IhoTable.vue.js +1 -1
- package/es/components/iho-table/src/hooks/useTableTheme.d.ts +4 -0
- package/es/components/iho-table/src/hooks/useTableTheme.js +1 -0
- package/es/components/iho-table/style/index.css +1 -1
- package/es/components/index.css +1 -1
- package/es/components/scale-view/src/hooks/use-component.d.ts +82 -116
- package/es/components/select-label/index.d.ts +83 -169
- package/es/components/select-label/src/LabelFormContent.vue.d.ts +1 -53
- package/es/components/select-label/src/LabelFormContent.vue.js +1 -1
- package/es/components/select-label/src/SelectLabel.vue.d.ts +83 -116
- package/es/components/select-label/src/SelectLabel.vue2.js +1 -1
- package/es/components/select-label/src/components/label-classify.vue.js +1 -1
- package/es/components/select-label/style/iconfont.ttf +0 -0
- package/es/components/select-label/style/index.css +1 -1
- package/es/shared/utils/index.d.ts +1 -0
- package/es/shared/utils/index.js +1 -1
- package/package.json +2 -2
|
@@ -1,83 +1,116 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
1
2
|
import { handleLabelColor } from '../../../../es/shared/utils/vexutils';
|
|
2
3
|
declare const _default: import("vue").DefineComponent<{
|
|
3
4
|
selectedList: {
|
|
4
|
-
type:
|
|
5
|
-
required: false;
|
|
5
|
+
type: PropType<any[]>;
|
|
6
6
|
default: () => never[];
|
|
7
7
|
};
|
|
8
8
|
item: {
|
|
9
|
-
type:
|
|
10
|
-
required: false;
|
|
9
|
+
type: PropType<any>;
|
|
11
10
|
default: () => {};
|
|
12
11
|
};
|
|
13
12
|
isDetail: {
|
|
14
13
|
type: BooleanConstructor;
|
|
15
|
-
required: false;
|
|
16
14
|
default: boolean;
|
|
17
15
|
};
|
|
18
16
|
isLock: {
|
|
19
17
|
type: BooleanConstructor;
|
|
20
|
-
required: false;
|
|
21
18
|
default: boolean;
|
|
22
19
|
};
|
|
23
20
|
sourceType: {
|
|
24
21
|
type: StringConstructor;
|
|
25
|
-
required: false;
|
|
26
22
|
default: string;
|
|
27
23
|
};
|
|
24
|
+
explicit: {
|
|
25
|
+
type: BooleanConstructor;
|
|
26
|
+
default: boolean;
|
|
27
|
+
};
|
|
28
|
+
selectUsers: {
|
|
29
|
+
type: PropType<any[]>;
|
|
30
|
+
default: () => never[];
|
|
31
|
+
};
|
|
28
32
|
getLabelList: {
|
|
29
33
|
type: FunctionConstructor;
|
|
30
|
-
required: false;
|
|
31
34
|
default: () => Promise<{
|
|
32
35
|
rows: never[];
|
|
33
36
|
}>;
|
|
34
37
|
};
|
|
35
|
-
explicit: {
|
|
36
|
-
type: BooleanConstructor;
|
|
37
|
-
required: false;
|
|
38
|
-
default: boolean;
|
|
39
|
-
};
|
|
40
|
-
explicitHeiht: {
|
|
41
|
-
type: StringConstructor;
|
|
42
|
-
required: false;
|
|
43
|
-
default: string;
|
|
44
|
-
};
|
|
45
38
|
queryCommonlabels: {
|
|
46
39
|
type: FunctionConstructor;
|
|
47
|
-
required: false;
|
|
48
40
|
default: () => Promise<{
|
|
49
41
|
data: {};
|
|
50
42
|
}>;
|
|
51
43
|
};
|
|
52
44
|
deleteLabel: {
|
|
53
45
|
type: FunctionConstructor;
|
|
54
|
-
required: false;
|
|
55
46
|
default: () => Promise<{
|
|
56
47
|
status: boolean;
|
|
57
48
|
}>;
|
|
58
49
|
};
|
|
59
50
|
saveLabelItem: {
|
|
60
51
|
type: FunctionConstructor;
|
|
61
|
-
required: false;
|
|
62
52
|
default: () => Promise<{
|
|
63
53
|
status: boolean;
|
|
64
54
|
}>;
|
|
65
55
|
};
|
|
66
56
|
}, {
|
|
67
|
-
props: {
|
|
68
|
-
selectedList:
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
57
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
58
|
+
selectedList: {
|
|
59
|
+
type: PropType<any[]>;
|
|
60
|
+
default: () => never[];
|
|
61
|
+
};
|
|
62
|
+
item: {
|
|
63
|
+
type: PropType<any>;
|
|
64
|
+
default: () => {};
|
|
65
|
+
};
|
|
66
|
+
isDetail: {
|
|
67
|
+
type: BooleanConstructor;
|
|
68
|
+
default: boolean;
|
|
69
|
+
};
|
|
70
|
+
isLock: {
|
|
71
|
+
type: BooleanConstructor;
|
|
72
|
+
default: boolean;
|
|
73
|
+
};
|
|
74
|
+
sourceType: {
|
|
75
|
+
type: StringConstructor;
|
|
76
|
+
default: string;
|
|
77
|
+
};
|
|
78
|
+
explicit: {
|
|
79
|
+
type: BooleanConstructor;
|
|
80
|
+
default: boolean;
|
|
81
|
+
};
|
|
82
|
+
selectUsers: {
|
|
83
|
+
type: PropType<any[]>;
|
|
84
|
+
default: () => never[];
|
|
85
|
+
};
|
|
86
|
+
getLabelList: {
|
|
87
|
+
type: FunctionConstructor;
|
|
88
|
+
default: () => Promise<{
|
|
89
|
+
rows: never[];
|
|
90
|
+
}>;
|
|
91
|
+
};
|
|
92
|
+
queryCommonlabels: {
|
|
93
|
+
type: FunctionConstructor;
|
|
94
|
+
default: () => Promise<{
|
|
95
|
+
data: {};
|
|
96
|
+
}>;
|
|
97
|
+
};
|
|
98
|
+
deleteLabel: {
|
|
99
|
+
type: FunctionConstructor;
|
|
100
|
+
default: () => Promise<{
|
|
101
|
+
status: boolean;
|
|
102
|
+
}>;
|
|
103
|
+
};
|
|
104
|
+
saveLabelItem: {
|
|
105
|
+
type: FunctionConstructor;
|
|
106
|
+
default: () => Promise<{
|
|
107
|
+
status: boolean;
|
|
108
|
+
}>;
|
|
109
|
+
};
|
|
110
|
+
}>> & {
|
|
111
|
+
onOnChange?: ((...args: any[]) => any) | undefined;
|
|
112
|
+
}>>;
|
|
113
|
+
emit: (event: "onChange", ...args: any[]) => void;
|
|
81
114
|
labelFormContentRef: any;
|
|
82
115
|
state: {
|
|
83
116
|
labelVisible: boolean;
|
|
@@ -94,7 +127,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
94
127
|
};
|
|
95
128
|
updateCommonChecked: (value: boolean, item: any) => void;
|
|
96
129
|
item_is_edit: import("vue").ComputedRef<any>;
|
|
97
|
-
titleRender: () => JSX.Element;
|
|
98
130
|
hadleCommonlabels: (commonLabelList: any[], selectList: any[]) => void;
|
|
99
131
|
getCommonlabelsList: (type: any) => Promise<void>;
|
|
100
132
|
closeTag: (d: {
|
|
@@ -231,58 +263,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
231
263
|
anchorGetContainer: () => any;
|
|
232
264
|
handleResetOptions: () => void;
|
|
233
265
|
hanldeSetLabelItem: (id: string | number, status: boolean) => void;
|
|
234
|
-
NTabs: any;
|
|
235
|
-
NTabPane: import("vue").DefineComponent<{
|
|
236
|
-
readonly tab: import("vue").PropType<string | number | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
237
|
-
[key: string]: any;
|
|
238
|
-
}> | (() => import("vue").VNodeChild)>;
|
|
239
|
-
readonly name: {
|
|
240
|
-
readonly type: import("vue").PropType<string | number>;
|
|
241
|
-
readonly required: true;
|
|
242
|
-
};
|
|
243
|
-
readonly disabled: BooleanConstructor;
|
|
244
|
-
readonly displayDirective: {
|
|
245
|
-
readonly type: import("vue").PropType<"if" | "show" | "show:lazy">;
|
|
246
|
-
readonly default: "if";
|
|
247
|
-
};
|
|
248
|
-
readonly closable: {
|
|
249
|
-
readonly type: import("vue").PropType<boolean | undefined>;
|
|
250
|
-
readonly default: undefined;
|
|
251
|
-
};
|
|
252
|
-
readonly tabProps: import("vue").PropType<import("vue").HTMLAttributes>;
|
|
253
|
-
readonly label: import("vue").PropType<string | number | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
254
|
-
[key: string]: any;
|
|
255
|
-
}> | (() => import("vue").VNodeChild)>;
|
|
256
|
-
}, {
|
|
257
|
-
style: import("vue").Ref<string | import("vue").CSSProperties | undefined>;
|
|
258
|
-
class: import("vue").Ref<string | undefined>;
|
|
259
|
-
mergedClsPrefix: import("vue").Ref<string>;
|
|
260
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
261
|
-
readonly tab: import("vue").PropType<string | number | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
262
|
-
[key: string]: any;
|
|
263
|
-
}> | (() => import("vue").VNodeChild)>;
|
|
264
|
-
readonly name: {
|
|
265
|
-
readonly type: import("vue").PropType<string | number>;
|
|
266
|
-
readonly required: true;
|
|
267
|
-
};
|
|
268
|
-
readonly disabled: BooleanConstructor;
|
|
269
|
-
readonly displayDirective: {
|
|
270
|
-
readonly type: import("vue").PropType<"if" | "show" | "show:lazy">;
|
|
271
|
-
readonly default: "if";
|
|
272
|
-
};
|
|
273
|
-
readonly closable: {
|
|
274
|
-
readonly type: import("vue").PropType<boolean | undefined>;
|
|
275
|
-
readonly default: undefined;
|
|
276
|
-
};
|
|
277
|
-
readonly tabProps: import("vue").PropType<import("vue").HTMLAttributes>;
|
|
278
|
-
readonly label: import("vue").PropType<string | number | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
279
|
-
[key: string]: any;
|
|
280
|
-
}> | (() => import("vue").VNodeChild)>;
|
|
281
|
-
}>>, {
|
|
282
|
-
readonly disabled: boolean;
|
|
283
|
-
readonly closable: boolean | undefined;
|
|
284
|
-
readonly displayDirective: "if" | "show" | "show:lazy";
|
|
285
|
-
}>;
|
|
286
266
|
NAnchor: any;
|
|
287
267
|
NAnchorLink: import("vue").DefineComponent<{
|
|
288
268
|
readonly title: StringConstructor;
|
|
@@ -481,89 +461,76 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
481
461
|
item: any;
|
|
482
462
|
isLock: boolean;
|
|
483
463
|
sourceType: string;
|
|
484
|
-
getLabelList: Function;
|
|
485
464
|
explicit: boolean;
|
|
465
|
+
getLabelList: Function;
|
|
486
466
|
deleteLabel: Function;
|
|
487
467
|
saveLabelItem: Function;
|
|
488
468
|
}>;
|
|
489
469
|
handleLabelColor: typeof handleLabelColor;
|
|
490
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
470
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "onChange"[], "onChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
491
471
|
selectedList: {
|
|
492
|
-
type:
|
|
493
|
-
required: false;
|
|
472
|
+
type: PropType<any[]>;
|
|
494
473
|
default: () => never[];
|
|
495
474
|
};
|
|
496
475
|
item: {
|
|
497
|
-
type:
|
|
498
|
-
required: false;
|
|
476
|
+
type: PropType<any>;
|
|
499
477
|
default: () => {};
|
|
500
478
|
};
|
|
501
479
|
isDetail: {
|
|
502
480
|
type: BooleanConstructor;
|
|
503
|
-
required: false;
|
|
504
481
|
default: boolean;
|
|
505
482
|
};
|
|
506
483
|
isLock: {
|
|
507
484
|
type: BooleanConstructor;
|
|
508
|
-
required: false;
|
|
509
485
|
default: boolean;
|
|
510
486
|
};
|
|
511
487
|
sourceType: {
|
|
512
488
|
type: StringConstructor;
|
|
513
|
-
required: false;
|
|
514
489
|
default: string;
|
|
515
490
|
};
|
|
491
|
+
explicit: {
|
|
492
|
+
type: BooleanConstructor;
|
|
493
|
+
default: boolean;
|
|
494
|
+
};
|
|
495
|
+
selectUsers: {
|
|
496
|
+
type: PropType<any[]>;
|
|
497
|
+
default: () => never[];
|
|
498
|
+
};
|
|
516
499
|
getLabelList: {
|
|
517
500
|
type: FunctionConstructor;
|
|
518
|
-
required: false;
|
|
519
501
|
default: () => Promise<{
|
|
520
502
|
rows: never[];
|
|
521
503
|
}>;
|
|
522
504
|
};
|
|
523
|
-
explicit: {
|
|
524
|
-
type: BooleanConstructor;
|
|
525
|
-
required: false;
|
|
526
|
-
default: boolean;
|
|
527
|
-
};
|
|
528
|
-
explicitHeiht: {
|
|
529
|
-
type: StringConstructor;
|
|
530
|
-
required: false;
|
|
531
|
-
default: string;
|
|
532
|
-
};
|
|
533
505
|
queryCommonlabels: {
|
|
534
506
|
type: FunctionConstructor;
|
|
535
|
-
required: false;
|
|
536
507
|
default: () => Promise<{
|
|
537
508
|
data: {};
|
|
538
509
|
}>;
|
|
539
510
|
};
|
|
540
511
|
deleteLabel: {
|
|
541
512
|
type: FunctionConstructor;
|
|
542
|
-
required: false;
|
|
543
513
|
default: () => Promise<{
|
|
544
514
|
status: boolean;
|
|
545
515
|
}>;
|
|
546
516
|
};
|
|
547
517
|
saveLabelItem: {
|
|
548
518
|
type: FunctionConstructor;
|
|
549
|
-
required: false;
|
|
550
519
|
default: () => Promise<{
|
|
551
520
|
status: boolean;
|
|
552
521
|
}>;
|
|
553
522
|
};
|
|
554
523
|
}>> & {
|
|
555
524
|
onOnChange?: ((...args: any[]) => any) | undefined;
|
|
556
|
-
onScaleChange?: ((...args: any[]) => any) | undefined;
|
|
557
|
-
onVodFileList?: ((...args: any[]) => any) | undefined;
|
|
558
525
|
}, {
|
|
559
|
-
selectedList:
|
|
526
|
+
selectedList: any[];
|
|
560
527
|
item: any;
|
|
561
528
|
isDetail: boolean;
|
|
562
529
|
isLock: boolean;
|
|
563
530
|
sourceType: string;
|
|
564
|
-
getLabelList: Function;
|
|
565
531
|
explicit: boolean;
|
|
566
|
-
|
|
532
|
+
selectUsers: any[];
|
|
533
|
+
getLabelList: Function;
|
|
567
534
|
queryCommonlabels: Function;
|
|
568
535
|
deleteLabel: Function;
|
|
569
536
|
saveLabelItem: Function;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as l,reactive as t,computed as a,onMounted as i,watch as o,openBlock as s,createElementBlock as n,Fragment as d,createElementVNode as
|
|
1
|
+
import{defineComponent as e,ref as l,reactive as t,computed as a,onMounted as i,watch as o,openBlock as s,createElementBlock as n,Fragment as d,createElementVNode as c,createBlock as r,unref as m,withCtx as b,renderList as p,normalizeStyle as u,createVNode as y,toDisplayString as L,withDirectives as h,normalizeClass as f,createTextVNode as C,vShow as g,createCommentVNode as v,mergeProps as I,nextTick as w}from"vue";import{NSpace as x,NTag as S,NTooltip as k,NIcon as O,NModal as N}from"naive-ui";import{AddCircleOutline as j}from"@vicons/ionicons5";import W from"./LabelFormContent.vue.js";import{handleLabelColor as P}from"../../../shared/utils/vexutils.js";import _ from"xe-utils";const B={class:"c-select-label"},U=c("span",null,"常用",-1),A={key:2,class:"outexplicit"},E={key:0,class:"selectUser"},H=c("span",null,"已选客户:",-1),z=c("span",null,"添加标签",-1),F={class:"svg-wrap"};var V=e({__name:"SelectLabel",props:{selectedList:{type:Array,default:()=>[]},item:{type:Object,default:()=>({})},isDetail:{type:Boolean,default:!1},isLock:{type:Boolean,default:!1},sourceType:{type:String,default:""},explicit:{type:Boolean,default:!1},selectUsers:{type:Array,default:()=>[]},getLabelList:{type:Function,default:()=>Promise.resolve({rows:[]})},queryCommonlabels:{type:Function,default:()=>Promise.resolve({data:{}})},deleteLabel:{type:Function,default:()=>Promise.resolve({status:!0})},saveLabelItem:{type:Function,default:()=>Promise.resolve({status:!0})}},emits:["onChange"],setup(e,{emit:V}){const T=e,D=l(null),$=t({labelVisible:!1,editLabelItem:{},labelSelectedList:[],labelSelectedEdit:[],inited:!1,isChangeWindow:!1,modalWidth:"763px",modalHeight:"404px",maxHeight:"404px",commonLabelList:[],multipleChoiceConfig:{}});const q=a((()=>{const e=(null==T?void 0:T.item)||{};return(1==e.is_edit||e.isShow)&&!T.isDetail})),J=(e,l)=>{e.length&&e.forEach((e=>{let t=l.some((l=>l.labelId==e.labelId));e.isSelect=t}))},R=(e,l)=>{let t=$.multipleChoiceConfig,a=$.labelSelectedList||[];if(e){if(a.some((e=>e.labelId==l.labelId)))return;"2"==t[l.typeId]&&(a=a.filter((e=>e.typeId!==l.typeId))),a.push(l)}else{const e=a.findIndex((e=>e.labelId==l.labelId));-1!=e&&a.splice(e,1)}V("onChange",[...a]),$.labelSelectedList=a},K=e=>{T.isLock||(T.explicit||"init"===e||($.labelVisible=!0),X(T.item))},G=()=>{var e;T.explicit||(null==(e=D.value)||e.resetShowAdd(),$.editLabelItem.showAdd=!1,$.editLabelItem={},$.inited=!1,$.modalWidth="763px",$.modalHeight="404px",$.maxHeight="404px",$.isChangeWindow=!1,$.labelVisible=!1)},M=()=>{$.isChangeWindow=!$.isChangeWindow;let e=document.body.clientHeight;$.modalWidth="763px"===$.modalWidth?"100%":"763px",$.modalHeight="404px"===$.modalHeight?e-110+"px":"404px",$.maxHeight="auto"===$.modalHeight?"404px":"none"},Q=()=>{var e;null==(e=D.value)||e.handleLabelForm((e=>{V("onChange",[...e]),$.labelSelectedList=e,J($.commonLabelList,e),G()}))},X=async(e,l)=>{const{rows:t,results:a}=await T.getLabelList(e,{update:l}),i=t||[],o={},s=`${e.val_key}_${e.name}`,n=l?[...$.labelSelectedEdit||[]]:[...$.labelSelectedList||[]];i.forEach((e=>{e.cacheKey=s,e.isSelect=!1,o[e.typeName]?o[e.typeName].itemList.push({...e}):o[e.typeName]={itemList:[{...e}],showAdd:!1,addVal:"",typeName:e.typeName,typeId:e.typeId}})),a&&(e.labelObj=o,e.labelList=i),l&&($.labelSelectedEdit=n),$.editLabelItem=e,Y(a)},Y=e=>{if(!e)return!1;let l=Object.keys(e),t={},a=(e.typeList||[]).reduce(((e,l)=>(t[l.typeId]=l.multipleChoice,e[l.typeName]={multipleChoice:l.multipleChoice,parentColor:l.parentColor,allowCreateByPersonal:l.allowCreateByPersonal},e)),{});T.explicit&&($.multipleChoiceConfig=t),l.forEach((l=>{var t,i,o,s,n,d,c;"typeList"!==l&&("emptyTypes"!==l?_.isPlainObject(e[l])?$.editLabelItem.labelObj[l]?($.editLabelItem.labelObj[l].isNoAdd=!0,$.editLabelItem.labelObj[l].multipleChoice=null==(i=a[l])?void 0:i.multipleChoice,$.editLabelItem.labelObj[l].allowCreateByPersonal=null==(o=a[l])?void 0:o.allowCreateByPersonal,$.editLabelItem.labelObj[l].parentColor=null==(s=a[l])?void 0:s.parentColor):$.editLabelItem.labelObj[l]={addVal:"",showAdd:!1,itemList:!1,typeId:"",typeName:l,allowCreateByPersonal:null==(t=a[l])?void 0:t.allowCreateByPersonal,...a[l]||{}}:($.editLabelItem.labelObj[l].multipleChoice=null==(n=a[l])?void 0:n.multipleChoice,$.editLabelItem.labelObj[l].allowCreateByPersonal=null==(d=a[l])?void 0:d.allowCreateByPersonal,$.editLabelItem.labelObj[l].parentColor=null==(c=a[l])?void 0:c.parentColor):e[l].forEach((e=>{$.editLabelItem.labelObj[e.typeName]={addVal:"",showAdd:!1,itemList:[],typeId:e.typeId,typeName:e.typeName,allowCreateByPersonal:e.allowCreateByPersonal,...a[e.typeName]||{}}})))}))},Z=()=>{X(T.item,!0)},ee=()=>{Q()},le=(e,l)=>{T.explicit&&w((()=>{var t;null==(t=D.value)||t.hanldeSetLabelItem(e,l)}))};return i((()=>{T.explicit?K():(async e=>{const{rows:l,results:t}=await T.getLabelList(e);if(!t)return!1;let a=(t.typeList||[]).reduce(((e,l)=>(e[l.typeId]=l.multipleChoice,e)),{});$.multipleChoiceConfig=a})(T.item)})),o((()=>T.selectedList),(e=>{if(e){let l=Array.isArray(e)?e:[];$.labelSelectedList=JSON.parse(JSON.stringify(l)),J($.commonLabelList,$.labelSelectedList)}}),{immediate:!0,deep:!0}),o((()=>{var e;return null==(e=T.item)?void 0:e.label_type}),(e=>{e&&"form"==T.sourceType&&(async e=>{var l;let{data:t={}}=await T.queryCommonlabels(e)||{};if("SUCCESS"!==t.result)return;let a=(null==(l=t.map)?void 0:l.rows)||[];J(a,$.labelSelectedList),$.commonLabelList=a})(e)}),{immediate:!0,deep:!0}),(l,t)=>(s(),n(d,null,[c("div",B,[e.explicit?v("v-if",!0):(s(),r(m(x),{key:0,align:"center"},{default:b((()=>[(s(!0),n(d,null,p($.labelSelectedList,(e=>(s(),r(m(S),{bordered:!1,key:e.labelId,style:u(m(P)(e,!0)),closable:m(q),onClose:l=>(e=>{const l=$.labelSelectedList||[],t=l.findIndex((l=>l.labelId==e.labelId));-1!=t&&l.splice(t,1),V("onChange",[...l]),$.labelSelectedList=l,le(e.labelId,!1)})(e),size:"small"},{default:b((()=>[y(m(k),{placement:"top-start"},{trigger:b((()=>[c("span",null,L(e.labelName),1)])),default:b((()=>[c("span",null,L(e.labelName),1)])),_:2},1024)])),_:2},1032,["style","closable","onClose"])))),128)),e.explicit?v("v-if",!0):h((s(),n("span",{key:0,class:f(["form-add-icon form-add-icon-label",{disable:e.isLock}]),onClick:K},[y(m(O),{class:"add-icon",component:m(j)},null,8,["component"]),C(" 新增 ")],2)),[[g,m(q)]])])),_:1})),"form"==e.sourceType&&$.commonLabelList.length&&m(q)&&!e.explicit?(s(),r(m(x),{key:1,align:"center",class:"common-label"},{default:b((()=>[U,(s(!0),n(d,null,p($.commonLabelList,((e,l)=>(s(),r(m(S),{checkable:"",checked:e.isSelect,"onUpdate:checked":l=>function(e,l){l.isSelect=e,R(e,l)}(l,e),key:l,style:u(m(P)(e)),size:"small"},{default:b((()=>[y(m(k),{placement:"top-start"},{trigger:b((()=>[c("span",null,L(e.labelName),1)])),default:b((()=>[c("span",null,L(e.labelName),1)])),_:2},1024)])),_:2},1032,["checked","onUpdate:checked","style"])))),128))])),_:1})):v("v-if",!0),e.explicit&&m(q)?(s(),n("div",A,[e.selectUsers&&e.selectUsers.length>0?(s(),n("div",E,[H,(s(!0),n(d,null,p(e.selectUsers,(e=>(s(),r(m(S),{type:"info",key:e.userId},{default:b((()=>[C(L(e.name),1)])),_:2},1024)))),128)),c("span",null,L(e.selectUsers.length)+"人",1)])):v("v-if",!0),y(W,I(l.$attrs,{ref_key:"labelFormContentRef",ref:D,explicit:e.explicit,labelSelectedList:$.labelSelectedList,isChangeWindow:$.isChangeWindow,labelOptions:$.editLabelItem.labelObj,deleteLabel:e.deleteLabel,saveLabelItem:e.saveLabelItem,onUpdateLabelData:Z,onExplicitOnChange:ee}),null,16,["explicit","labelSelectedList","isChangeWindow","labelOptions","deleteLabel","saveLabelItem"])])):v("v-if",!0)]),v(" 弹窗 "),y(m(N),{preset:"dialog",class:f(["label-form-modal-wrap modal-wrap standard-modal standard-modal-white",{"modal-screen":$.isChangeWindow}]),show:$.labelVisible,"onUpdate:show":t[0]||(t[0]=e=>$.labelVisible=e),onPositiveClick:Q,onNegativeClick:G,onClose:G,"mask-closable":!1,"close-on-esc":!1,"show-icon":!1,"negative-text":"取消","positive-text":"确定",style:u({width:$.modalWidth})},{header:b((()=>[z,c("div",F,[c("i",{onClick:M,class:f(["iconfont-select-label",$.isChangeWindow?"icon-select-label-menzhenyishengzhanxitongtubiaozuixiaohua2":"icon-select-label-menzhenyishengzhanxitongtubiaozuidahua"])},null,2)])])),default:b((()=>[y(W,I(l.$attrs,{ref_key:"labelFormContentRef",ref:D,labelSelectedList:$.labelSelectedList,isChangeWindow:$.isChangeWindow,labelOptions:$.editLabelItem.labelObj,sourceType:e.sourceType,deleteLabel:e.deleteLabel,saveLabelItem:e.saveLabelItem,onUpdateLabelData:Z}),null,16,["labelSelectedList","isChangeWindow","labelOptions","sourceType","deleteLabel","saveLabelItem"])])),_:1},8,["show","class","style"])],64))}});export{V as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as l,watch as a,openBlock as s,createElementBlock as t,createCommentVNode as i,unref as d,Fragment as c,createElementVNode as n,renderList as o,createBlock as u,normalizeStyle as
|
|
1
|
+
import{defineComponent as e,ref as l,watch as a,openBlock as s,createElementBlock as t,createCommentVNode as i,unref as d,Fragment as c,createElementVNode as n,renderList as o,createBlock as u,normalizeStyle as f,normalizeClass as p,withCtx as y,createVNode as m,toDisplayString as r,withDirectives as b,withModifiers as v,vShow as h,createTextVNode as k}from"vue";import{NTag as I,NTooltip as g,NIcon as C,NButton as L,NInput as _}from"naive-ui";import{Close as A,Add as B}from"@vicons/ionicons5";import F from"../../../../_virtual/plugin-vue_export-helper.js";const P={class:"edit-content"},V={key:0,class:"label-disable-wrap"},w=[n("p",{class:"label-disable-title"},"无可选标签",-1),n("p",{class:"label-disable-desc"},"请联系管理员进行标签管理设置",-1)],N={class:"label-content"},T={key:0,class:"selfval"},x={key:1,class:"selfval"};var E=F(e({__name:"label-classify",props:{classifyItem:{default:()=>({})},handleLabelChange:{type:Function,default:()=>{}},handleLabelColor:{type:Function,default:()=>{}},handleDelLabel:{type:Function,default:()=>{}},handleAddLabel:{type:Function,default:()=>{}},hanldeBlur:{type:Function,default:()=>{}},clearaddVal:{type:Function,default:()=>{}},isEdit:{type:Boolean,default:!1},sourceType:null},setup(e){var F;const E=e;let U=l((null==(F=E.classifyItem)?void 0:F.itemList)||[]);return a((()=>E.classifyItem),(e=>{U.value=(null==e?void 0:e.itemList)||[]}),{immediate:!0,deep:!0}),(l,a)=>(s(),t("div",P,[i(" disable "),d(U)?(s(),t(c,{key:1},[i(" "),n("div",N,[(s(!0),t(c,null,o(d(U),(l=>(s(),u(d(I),{checkable:"",checked:l.isSelect,"onUpdate:checked":a=>((e,l,a)=>{l.isSelect=e,E.handleLabelChange(e,l,a)})(a,l,e.classifyItem),key:l.labelId,style:f(e.handleLabelColor(l)),class:p({"sys-label-tag":l.isPublic&&1==l.isPublic})},{default:y((()=>[m(d(g),{placement:"top-start"},{trigger:y((()=>[n("span",null,r(l.labelName),1)])),default:y((()=>[n("span",null,r(l.labelName),1)])),_:2},1024),"guage"!=e.sourceType?b((s(),u(d(C),{key:0,class:"label-close",component:d(A),onClick:v((a=>e.handleDelLabel(l,e.classifyItem)),["stop"])},null,8,["component","onClick"])),[[h,!(l.isPublic&&1==l.isPublic)]]):i("v-if",!0)])),_:2},1032,["checked","onUpdate:checked","style","class"])))),128)),1==e.classifyItem.allowCreateByPersonal?(s(),t(c,{key:0},[e.isEdit&&!e.classifyItem.isNoAdd&&"guage"!=e.sourceType?b((s(),u(d(L),{key:0,dashed:"",class:"label-add",onClick:a[0]||(a[0]=l=>e.handleAddLabel(l,e.classifyItem))},{default:y((()=>[e.classifyItem.addVal?(s(),t("span",T,r(e.classifyItem.addVal),1)):(s(),t("span",x,[m(d(C),{component:d(B)},null,8,["component"]),k("标签")]))])),_:1},512)),[[h,!e.classifyItem.showAdd]]):i("v-if",!0),i(" 是否允许新增个人标签 allowCreateByPersonal "),e.isEdit&&!e.classifyItem.isNoAdd&&"guage"!=e.sourceType?b((s(),u(d(_),{key:1,class:"label-add add-input",value:e.classifyItem.addVal,"onUpdate:value":a[2]||(a[2]=l=>e.classifyItem.addVal=l),valueModifiers:{trim:!0},onBlur:a[3]||(a[3]=l=>e.hanldeBlur(l,e.classifyItem))},{suffix:y((()=>[m(d(C),{component:d(A),onClick:a[1]||(a[1]=v((l=>e.clearaddVal(l,e.classifyItem)),["stop"]))},null,8,["component"])])),_:1},8,["value"])),[[h,e.classifyItem.showAdd]]):i("v-if",!0)],64)):i("v-if",!0)])],2112)):(s(),t("div",V,w))]))}}),[["__file","label-classify.vue"]]);export{E as default};
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.c-select-label .label-disable-wrap{align-items:center;display:flex;flex-direction:column;font-size:14px;line-height:20px;width:100%}.c-select-label .label-disable-wrap .label-disable-img{height:248px;width:320px}.c-select-label .common-label{border:1px solid rgba(0,0,0,.1);border-radius:4px;margin-top:8px!important;padding:4px 12px}.c-select-label .common-label>span{color:rgba(0,0,0,.9);margin-right:16px}.c-select-label .form-add-icon-label{align-items:center;color:#2d7aff;cursor:pointer;display:inline-flex;
|
|
1
|
+
@font-face{font-family:iconfont;src:url(iconfont.ttf) format("truetype")}.iconfont-select-label{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:iconfont!important;font-size:14px;font-style:normal}.icon-select-label-menzhenyishengzhanxitongtubiaozuixiaohua2:before{content:"\e778"}.icon-select-label-menzhenyishengzhanxitongtubiaozuidahua:before{content:"\e779"}.c-select-label .label-disable-wrap{align-items:center;display:flex;flex-direction:column;font-size:14px;line-height:20px;width:100%}.c-select-label .label-disable-wrap .label-disable-img{height:248px;width:320px}.c-select-label .common-label{border:1px solid rgba(0,0,0,.1);border-radius:4px;margin-top:8px!important;padding:4px 12px}.c-select-label .common-label>span{color:rgba(0,0,0,.9);margin-right:16px}.c-select-label .outexplicit .selectUser{align-items:center;display:flex;margin-bottom:8px}.c-select-label .outexplicit .selectUser .n-tag{border:none}.c-select-label .form-add-icon-label{align-items:center;color:#2d7aff;cursor:pointer;display:inline-flex;vertical-align:middle}.c-select-label .anticon+.anticon{margin-left:16px}.c-select-label .n-tag{border:1px solid #e0e0e6;margin:0 8px 0 0;max-width:108px}.c-select-label .n-tag .n-base-icon{color:#fff}.c-select-label .n-tag .n-tag__content{align-items:center;display:inline-block;line-height:20px;max-width:80px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.c-label-form-content{border-bottom:1px solid #e8e8e8;border-top:1px solid #e8e8e8;height:100%;width:100%}.c-label-form-content .label-wrap{display:flex;height:100%;width:100%}.c-label-form-content .label-wrap .left-label-wrap{border-right:1px solid #e8e8e8;height:404px;max-height:404px;width:140px}.c-label-form-content .label-wrap .left-label-wrap.total-left-label-wrap{height:calc(100vh - 109px);max-height:calc(100vh - 109px)}.c-label-form-content .label-wrap .left-label-wrap.explicit-label-wrap{height:auto;overflow:hidden;overflow-y:auto;width:100%}.c-label-form-content .label-wrap .left-label-wrap .n-anchor.n-anchor--block .n-anchor-link{font-size:14px;padding:10px 8px}.c-label-form-content .label-wrap .left-label-wrap .n-anchor.n-anchor--block .n-anchor-link.n-anchor-link--active{background-color:#f2f2f2}.c-label-form-content .label-wrap .right-label-wrap{flex:1;height:404px;max-height:404px;overflow-y:auto}.c-label-form-content .label-wrap .right-label-wrap.total-right-label-wrap{max-height:calc(100vh - 109px)}.c-label-form-content .label-wrap .right-label-wrap .label-add{display:inline-flex;height:30px;justify-content:center;line-height:30px;position:relative;text-align:center;top:2px;width:108px}.c-label-form-content .label-wrap .right-label-wrap .label-add .selfval{align-items:center;display:flex;justify-content:center}.c-label-form-content .label-wrap .right-label-wrap .add-input{width:108px}.c-label-form-content .label-wrap .right-label-wrap .add-input .n-input__suffix{cursor:pointer}.c-label-form-content .label-wrap .explicit-continer{border:1px solid #d5d5d5;width:100%}.c-label-form-content .edit-label-type{font-size:12px;margin-left:4px}.c-label-form-content .edit-label-content{margin-top:10px;padding:0 14px}.c-label-form-content .edit-label-content .edit-content{margin-top:8px;width:100%}.c-label-form-content .edit-label-content .edit-content .n-tag{border:1px solid #e0e0e6;margin:0 8px 8px 0;max-width:108px;text-align:center}.c-label-form-content .edit-label-content .edit-content .n-tag .n-tag__content{align-items:center;display:inline-flex}.c-label-form-content .edit-label-content .edit-content .n-tag .n-tag__content span{display:inline-block;height:100%;line-height:30px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:80px}.n-dialog__title .svg-wrap{margin:0 0 0 auto}.n-dialog__title .svg-wrap i{cursor:pointer;font-size:16px}
|
package/es/shared/utils/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useMemoize as t}from"@vueuse/core";import{isArray as e,isString as n,includes as r,isEmpty as o,negate as
|
|
1
|
+
import{useMemoize as t}from"@vueuse/core";import{isArray as e,isString as n,includes as r,isEmpty as o,negate as c,gt as u,gte as i,lt as s,lte as a,isNumber as f,isObject as x,isFunction as d}from"lodash-es";import{getCurrentInstance as E}from"vue";function l(t,n,r="children",o){function c(){throw"silence break traverse"}try{L(t).forEach((t=>{n(t,c,o),L(r).forEach((o=>{e(t[o])&&l(t[o],n,r,t)}))}))}catch(t){if("silence break traverse"===t)return;throw t}}function m(t,e,n=e.name,r){if(!n)throw new Error(`[CUI]: invalid component name for ${e}`);const{components:o={}}=t._context;o[n]||(r?r():t.component(n,e))}function p(t){if(!n(t))return;const e=t.match(/[Hms:]+/);return e?e[0]:void 0}function L(t){return Array.isArray(t)?t:[t]}function h(){if(window.isSecureContext&&window.crypto)return`key${window.crypto.randomUUID()}`;return`key${"xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){const e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)}))}`}const N=t((function(t){return t?[...t].reduce(((t,e)=>/[a-z]/.test(e)?t+8:/[A-Z]/.test(e)?t+12:/\d/.test(e)?t+9:/\./.test(e)?t+4:/[\u4e00-\u9fa5]/.test(e)?t+15:/-/.test(e)?t+4:/[()]/.test(e)?t+14:/[)(]/.test(e)?t+5:/-/.test(e)?t+10:/%/.test(e)?t+14:/‰/.test(e)?t+16:t+6),0):0})),w=Object.seal(Object.create(null));function S(t,n){return function t(n,r){return x(n)?e(n)?n.map((e=>t(e,r))):Object.entries(n).reduce(((e,[n,o])=>(r.includes(n)||(x(o)&&!d(o)?e[n]=t(o,r):e[n]=o),e)),{}):n}(t,n)}function v(t){return Object.values(t).reduce(((t,e)=>Object.assign(t,e)),{})}function y(t,e){if(!t)return t;if(e(t))return t;let n=t.parentElement;for(;n&&!e(n);)n=n.parentElement;return n}function I(t,e="px"){if(f(t))return`${t}${e}`;if(n(t))return t.endsWith(e)?t:`${t}${e}`;throw new Error(`invalid width value ${t}, it need to be a string or number!`)}function Q(t,e){return t.some((t=>e.includes(t)))}const $=t((t=>{try{return JSON.parse(t)}catch(t){return{}}}),{getKey:t=>t});function b(t,e){if(!x(t))return t;const n={...t};for(let t=0;t<e.length;t++)Reflect.deleteProperty(n,e[t]);return n}function O(t){if(!E())throw new Error(t||"can't use this hook out of setup environment")}var U=(t=>(t.EQ="EQ",t.NEQ="NEQ",t.CL="CL",t.NC="NC",t.NULL="NULL",t.NOT_NULL="NOT_NULL",t.BIG="BIG",t.BIGEQ="BIGEQ",t.LESS="LESS",t.LESSEQ="LESSEQ",t))(U||{});const C={EQ:(t,e)=>`${t}`===e,NEQ:(t,e)=>`${t}`!==e,CL:(t,o)=>!(!e(t)&&!n(t))&&r(t,o),NC:(t,o)=>!e(t)&&!n(t)||!r(t,o),NULL:o,NOT_NULL:c(o),BIG:u,BIGEQ:i,LESS:s,LESSEQ:a};function g(t,e){return(C[e.con]||(()=>!1))(t,`${e.value}`)}function B(t){const[e,n,r,o,c]=t.match(/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i)||[];if(!e)return[0,0,0];const u=(c?parseInt(c,16):255)/255;return[parseInt(n,16),parseInt(r,16),parseInt(o,16),+(f(u)?u.toFixed(2):1)]}export{w as DMZ,U as LOW_CODE_VALUE_RELATION,L as arrayed,O as checkInSetupEnv,S as deepOmit,y as findAncestor,p as generateTimeFormat,N as getStringWidth,B as hex2rgba,g as isMatchLowCodeCondition,$ as jsonParse,m as safeComponentRegister,v as separateMetaModule,b as shallowOmit,Q as targetStringIncludes,l as traverse,h as uuidGenerator,I as widthAppend};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cnhis-design-vue",
|
|
3
|
-
"version": "3.1.41-beta.
|
|
3
|
+
"version": "3.1.41-beta.38",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"module": "./es/components/index.js",
|
|
6
6
|
"main": "./es/components/index.js",
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"iOS 7",
|
|
62
62
|
"last 3 iOS versions"
|
|
63
63
|
],
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "6b0582166f3abbeef5753ff2bd58100b547fc46e"
|
|
65
65
|
}
|