cnhis-design-vue 3.2.6-beta.2 → 3.2.6-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- import{fabric as e}from"../../../../../shared/utils/fabricjs/index.js";import{defaultStyle as t}from"../useDraw.js";import"date-fns";import{last as i}from"lodash-es";import"../useEvent.js";import"vue";import"./useShadow.js";import"@vueuse/shared";import"naive-ui";import"@vueuse/core";function n(n,o,l,r,s){const{left:u,other:h,vitalSignsOriginY:a,xCellWidth:f,yCellHeight:c,endX:g}=o;let v=0;function p(i,o,r){const s=[];String(i.value).split("").forEach(((n,o)=>{const l=new e.Text(n,{left:0,top:c*o,originX:"center",...t,objectCaching:!1,...i.style||{}});v=(c-(l.height||0))/2,s.push(l)}));const u=new e.Rect({left:0,top:0,width:f,height:c*s.length,fill:"transparent",originX:"center",...t}),{eventHighlight:a=!1}=h||{},g={originX:"center",left:o,top:r+v,baseTop:(i.baseTop||0)*c,trueLeft:o,trueHeight:s.length*c,objectCaching:!1,hoverCursor:"pointer",highlightObject:u,originData:i,selectable:!1,evented:a},p=new e.Group([u,...s],g);return function(e){const{highlightColor:t="#ffff00"}=h||{};e.on("mouseover",(()=>{e.highlightObject.set("fill",t),n.value.requestRenderAll()})),e.on("mouseout",(()=>{e.highlightObject.set("fill","transparent"),n.value.requestRenderAll()})),e.on("mousedown",(function(){l("eventClick",e.originData)}))}(p),n.value.add(p),p}!function(){var e,t;if(!(null==h?void 0:h.list))return!1;const n=[],o=[];h.list.forEach(((e,t)=>{const i=0===t?"vertical":e.align||"vertical",n=r(e.time,!0);if(n>g)return;const l=o.find((e=>e.left==n));if(l)l[i].push(e);else{const t={left:n,vertical:[],horizontal:[]};t[i].push(e),o.push(t)}}));const l=null==(t=null==(e=u.yScaleValue)?void 0:e.find((e=>"temperature"===e.type)))?void 0:t.list,v=(null==l?void 0:l.length)?s("temperature",l,35):0,d=e=>e.fixed&&v&&String(e.value).length;o.forEach((e=>{let t=a.originY,o=e.left;e.vertical.forEach(((l,r)=>{var s,u;if(d(l))return void n.push(p(l,o,v));const h=(l.baseTop||0)*c,g=(null==(s=i(n))?void 0:s.left)||0;0===r&&e.left<=g&&(o=g+f);if(n.filter((e=>e.trueLeft===o)).length){const e=String(l.value).length*c,r=(null==(u=i(n))?void 0:u.trueHeight)||0;t+=r,t+e+h>a.endY&&(t=a.originY,o+=f)}t+=h,String(l.value).length&&n.push(p(l,o,t))})),e.horizontal.forEach(((t,l)=>{var r;if(d(t))return void n.push(p(t,o,v));const s=a.originY+(t.baseTop||0)*c,u=(null==(r=i(n))?void 0:r.left)||0;e.left<=u&&(o=u+f),String(t.value).length&&n.push(p(t,o,s))}))}))}()}export{n as useOther};
1
+ import{fabric as e}from"../../../../../shared/utils/fabricjs/index.js";import{defaultStyle as t}from"../useDraw.js";import"date-fns";import{last as i}from"lodash-es";import"../useEvent.js";import"vue";import"./useShadow.js";import"@vueuse/shared";import"naive-ui";import"@vueuse/core";function n(n,l,o,r,s){const{left:u,other:h,vitalSignsOriginY:a,xCellWidth:c,yCellHeight:f,endX:g}=l;let p=0;function v(i,l,r){const s=[];String(i.value).split("").forEach(((n,l)=>{const o=new e.Text(n,{left:0,top:f*l,originX:"center",...t,objectCaching:!1,...i.style||{}});p=(f-(o.height||0))/2,s.push(o)}));const u=new e.Rect({left:0,top:0,width:c,height:f*s.length,fill:"transparent",originX:"center",...t}),{eventHighlight:a=!1}=h||{},g={originX:"center",left:l,top:r+p,baseTop:(i.baseTop||0)*f,trueLeft:l,trueHeight:s.length*f,objectCaching:!1,hoverCursor:"pointer",highlightObject:u,originData:i,selectable:!1,evented:a},v=new e.Group([u,...s],g);return function(e){const{highlightColor:t="#ffff00"}=h||{};e.on("mouseover",(()=>{e.highlightObject.set("fill",t),n.value.requestRenderAll()})),e.on("mouseout",(()=>{e.highlightObject.set("fill","transparent"),n.value.requestRenderAll()})),e.on("mousedown",(function(){o("eventClick",e.originData)}))}(v),n.value.add(v),v}!function(){var e,t;if(!(null==h?void 0:h.list))return!1;const n=[],l=[];h.list.forEach(((e,t)=>{const i=0===t?"vertical":e.align||"vertical",n=r(e.time,!0);if(n>g)return;const o=l.find((e=>e.left==n));if(o)o[i].push(e);else{const t={left:n,vertical:[],horizontal:[]};t[i].push(e),l.push(t)}}));const o=null==(t=null==(e=u.yScaleValue)?void 0:e.find((e=>"temperature"===e.type)))?void 0:t.list,p=(null==o?void 0:o.length)?s("temperature",o,35):0,d=e=>e.fixed&&p&&String(e.value).length;l.forEach((e=>{let t=a.originY,l=e.left;e.vertical.forEach(((o,r)=>{var s,u;const h=(o.baseTop||0)*f,g=(null==(s=i(n))?void 0:s.left)||0;0===r&&e.left<=g&&(l=g+c);if(n.filter((e=>e.trueLeft===l)).length){const e=String(o.value).length*f,r=(null==(u=i(n))?void 0:u.trueHeight)||0;t+=r,t+e+h>a.endY&&(t=a.originY,l+=c)}t+=h,String(o.value).length&&n.push(v(o,l,t)),d(o)&&n.push(v(o,l,p))})),e.horizontal.forEach(((t,o)=>{var r;const s=a.originY+(t.baseTop||0)*f,u=(null==(r=i(n))?void 0:r.left)||0;e.left<=u&&(l=u+c),String(t.value).length&&n.push(v(t,l,s)),d(t)&&n.push(v(t,l,p))}))}))}()}export{n as useOther};
@@ -466,9 +466,9 @@ declare const _default: import("vue").DefineComponent<{
466
466
  hide: boolean;
467
467
  }>;
468
468
  draggable: boolean;
469
- isHighlightRow: boolean;
470
469
  idx: number;
471
470
  isHighlight: boolean;
471
+ isHighlightRow: boolean;
472
472
  isFieldSet: boolean;
473
473
  fieldDescribeMode: "column" | "tooltip";
474
474
  }>;
@@ -488,9 +488,9 @@ declare const _default: import("vue").DefineComponent<{
488
488
  hide: boolean;
489
489
  }>;
490
490
  draggable: boolean;
491
- isHighlightRow: boolean;
492
491
  idx: number;
493
492
  isHighlight: boolean;
493
+ isHighlightRow: boolean;
494
494
  isFieldSet: boolean;
495
495
  fieldDescribeMode: "column" | "tooltip";
496
496
  }>;
@@ -612,9 +612,9 @@ declare const _default: import("vue").DefineComponent<{
612
612
  hide: boolean;
613
613
  }>;
614
614
  draggable: boolean;
615
- isHighlightRow: boolean;
616
615
  idx: number;
617
616
  isHighlight: boolean;
617
+ isHighlightRow: boolean;
618
618
  isFieldSet: boolean;
619
619
  fieldDescribeMode: "column" | "tooltip";
620
620
  }>;
@@ -317,9 +317,9 @@ declare const _default: import("vue").DefineComponent<{
317
317
  hide: boolean;
318
318
  }>;
319
319
  draggable: boolean;
320
- isHighlightRow: boolean;
321
320
  idx: number;
322
321
  isHighlight: boolean;
322
+ isHighlightRow: boolean;
323
323
  isFieldSet: boolean;
324
324
  fieldDescribeMode: "column" | "tooltip";
325
325
  }>;
@@ -965,7 +965,7 @@ declare const InfoHeader: SFCWithInstall<import("vue").DefineComponent<{
965
965
  displayContent: import("vue").ComputedRef<string>;
966
966
  InfoEllipsis: import("vue").DefineComponent<{
967
967
  content: {
968
- type: StringConstructor;
968
+ type: (NumberConstructor | StringConstructor)[];
969
969
  default: string;
970
970
  };
971
971
  tip: {
@@ -980,7 +980,7 @@ declare const InfoHeader: SFCWithInstall<import("vue").DefineComponent<{
980
980
  NTooltip: any;
981
981
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
982
982
  content: {
983
- type: StringConstructor;
983
+ type: (NumberConstructor | StringConstructor)[];
984
984
  default: string;
985
985
  };
986
986
  tip: {
@@ -991,7 +991,7 @@ declare const InfoHeader: SFCWithInstall<import("vue").DefineComponent<{
991
991
  default: () => {};
992
992
  };
993
993
  }>>, {
994
- content: string;
994
+ content: string | number;
995
995
  contentStyle: import("vue").CSSProperties;
996
996
  }>;
997
997
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
@@ -1018,7 +1018,7 @@ declare const InfoHeader: SFCWithInstall<import("vue").DefineComponent<{
1018
1018
  }>;
1019
1019
  InfoEllipsis: import("vue").DefineComponent<{
1020
1020
  content: {
1021
- type: StringConstructor;
1021
+ type: (NumberConstructor | StringConstructor)[];
1022
1022
  default: string;
1023
1023
  };
1024
1024
  tip: {
@@ -1033,7 +1033,7 @@ declare const InfoHeader: SFCWithInstall<import("vue").DefineComponent<{
1033
1033
  NTooltip: any;
1034
1034
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
1035
1035
  content: {
1036
- type: StringConstructor;
1036
+ type: (NumberConstructor | StringConstructor)[];
1037
1037
  default: string;
1038
1038
  };
1039
1039
  tip: {
@@ -1044,7 +1044,7 @@ declare const InfoHeader: SFCWithInstall<import("vue").DefineComponent<{
1044
1044
  default: () => {};
1045
1045
  };
1046
1046
  }>>, {
1047
- content: string;
1047
+ content: string | number;
1048
1048
  contentStyle: import("vue").CSSProperties;
1049
1049
  }>;
1050
1050
  SlotRender: import("vue").DefineComponent<{
@@ -960,7 +960,7 @@ declare const _default: import("vue").DefineComponent<{
960
960
  displayContent: import("vue").ComputedRef<string>;
961
961
  InfoEllipsis: import("vue").DefineComponent<{
962
962
  content: {
963
- type: StringConstructor;
963
+ type: (NumberConstructor | StringConstructor)[];
964
964
  default: string;
965
965
  };
966
966
  tip: {
@@ -975,7 +975,7 @@ declare const _default: import("vue").DefineComponent<{
975
975
  NTooltip: any;
976
976
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
977
977
  content: {
978
- type: StringConstructor;
978
+ type: (NumberConstructor | StringConstructor)[];
979
979
  default: string;
980
980
  };
981
981
  tip: {
@@ -986,7 +986,7 @@ declare const _default: import("vue").DefineComponent<{
986
986
  default: () => {};
987
987
  };
988
988
  }>>, {
989
- content: string;
989
+ content: string | number;
990
990
  contentStyle: import("vue").CSSProperties;
991
991
  }>;
992
992
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
@@ -1013,7 +1013,7 @@ declare const _default: import("vue").DefineComponent<{
1013
1013
  }>;
1014
1014
  InfoEllipsis: import("vue").DefineComponent<{
1015
1015
  content: {
1016
- type: StringConstructor;
1016
+ type: (NumberConstructor | StringConstructor)[];
1017
1017
  default: string;
1018
1018
  };
1019
1019
  tip: {
@@ -1028,7 +1028,7 @@ declare const _default: import("vue").DefineComponent<{
1028
1028
  NTooltip: any;
1029
1029
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
1030
1030
  content: {
1031
- type: StringConstructor;
1031
+ type: (NumberConstructor | StringConstructor)[];
1032
1032
  default: string;
1033
1033
  };
1034
1034
  tip: {
@@ -1039,7 +1039,7 @@ declare const _default: import("vue").DefineComponent<{
1039
1039
  default: () => {};
1040
1040
  };
1041
1041
  }>>, {
1042
- content: string;
1042
+ content: string | number;
1043
1043
  contentStyle: import("vue").CSSProperties;
1044
1044
  }>;
1045
1045
  SlotRender: import("vue").DefineComponent<{
@@ -312,7 +312,7 @@ declare const _default: import("vue").DefineComponent<{
312
312
  displayContent: import("vue").ComputedRef<string>;
313
313
  InfoEllipsis: import("vue").DefineComponent<{
314
314
  content: {
315
- type: StringConstructor;
315
+ type: (NumberConstructor | StringConstructor)[];
316
316
  default: string;
317
317
  };
318
318
  tip: {
@@ -327,7 +327,7 @@ declare const _default: import("vue").DefineComponent<{
327
327
  NTooltip: any;
328
328
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
329
329
  content: {
330
- type: StringConstructor;
330
+ type: (NumberConstructor | StringConstructor)[];
331
331
  default: string;
332
332
  };
333
333
  tip: {
@@ -338,7 +338,7 @@ declare const _default: import("vue").DefineComponent<{
338
338
  default: () => {};
339
339
  };
340
340
  }>>, {
341
- content: string;
341
+ content: string | number;
342
342
  contentStyle: import("vue").CSSProperties;
343
343
  }>;
344
344
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
@@ -365,7 +365,7 @@ declare const _default: import("vue").DefineComponent<{
365
365
  }>;
366
366
  InfoEllipsis: import("vue").DefineComponent<{
367
367
  content: {
368
- type: StringConstructor;
368
+ type: (NumberConstructor | StringConstructor)[];
369
369
  default: string;
370
370
  };
371
371
  tip: {
@@ -380,7 +380,7 @@ declare const _default: import("vue").DefineComponent<{
380
380
  NTooltip: any;
381
381
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
382
382
  content: {
383
- type: StringConstructor;
383
+ type: (NumberConstructor | StringConstructor)[];
384
384
  default: string;
385
385
  };
386
386
  tip: {
@@ -391,7 +391,7 @@ declare const _default: import("vue").DefineComponent<{
391
391
  default: () => {};
392
392
  };
393
393
  }>>, {
394
- content: string;
394
+ content: string | number;
395
395
  contentStyle: import("vue").CSSProperties;
396
396
  }>;
397
397
  SlotRender: import("vue").DefineComponent<{
@@ -386,7 +386,7 @@ declare const _default: import("vue").DefineComponent<{
386
386
  displayContent: import("vue").ComputedRef<string>;
387
387
  InfoEllipsis: import("vue").DefineComponent<{
388
388
  content: {
389
- type: StringConstructor;
389
+ type: (NumberConstructor | StringConstructor)[];
390
390
  default: string;
391
391
  };
392
392
  tip: {
@@ -401,7 +401,7 @@ declare const _default: import("vue").DefineComponent<{
401
401
  NTooltip: any;
402
402
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
403
403
  content: {
404
- type: StringConstructor;
404
+ type: (NumberConstructor | StringConstructor)[];
405
405
  default: string;
406
406
  };
407
407
  tip: {
@@ -412,7 +412,7 @@ declare const _default: import("vue").DefineComponent<{
412
412
  default: () => {};
413
413
  };
414
414
  }>>, {
415
- content: string;
415
+ content: string | number;
416
416
  contentStyle: import("vue").CSSProperties;
417
417
  }>;
418
418
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
@@ -439,7 +439,7 @@ declare const _default: import("vue").DefineComponent<{
439
439
  }>;
440
440
  InfoEllipsis: import("vue").DefineComponent<{
441
441
  content: {
442
- type: StringConstructor;
442
+ type: (NumberConstructor | StringConstructor)[];
443
443
  default: string;
444
444
  };
445
445
  tip: {
@@ -454,7 +454,7 @@ declare const _default: import("vue").DefineComponent<{
454
454
  NTooltip: any;
455
455
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
456
456
  content: {
457
- type: StringConstructor;
457
+ type: (NumberConstructor | StringConstructor)[];
458
458
  default: string;
459
459
  };
460
460
  tip: {
@@ -465,7 +465,7 @@ declare const _default: import("vue").DefineComponent<{
465
465
  default: () => {};
466
466
  };
467
467
  }>>, {
468
- content: string;
468
+ content: string | number;
469
469
  contentStyle: import("vue").CSSProperties;
470
470
  }>;
471
471
  SlotRender: import("vue").DefineComponent<{
@@ -45,7 +45,7 @@ declare const _default: import("vue").DefineComponent<{
45
45
  displayContent: import("vue").ComputedRef<string>;
46
46
  InfoEllipsis: import("vue").DefineComponent<{
47
47
  content: {
48
- type: StringConstructor;
48
+ type: (NumberConstructor | StringConstructor)[];
49
49
  default: string;
50
50
  };
51
51
  tip: {
@@ -60,7 +60,7 @@ declare const _default: import("vue").DefineComponent<{
60
60
  NTooltip: any;
61
61
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
62
62
  content: {
63
- type: StringConstructor;
63
+ type: (NumberConstructor | StringConstructor)[];
64
64
  default: string;
65
65
  };
66
66
  tip: {
@@ -71,7 +71,7 @@ declare const _default: import("vue").DefineComponent<{
71
71
  default: () => {};
72
72
  };
73
73
  }>>, {
74
- content: string;
74
+ content: string | number;
75
75
  contentStyle: CSSProperties;
76
76
  }>;
77
77
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
@@ -1,7 +1,7 @@
1
1
  import { CSSProperties, PropType } from 'vue';
2
2
  declare const _default: import("vue").DefineComponent<{
3
3
  content: {
4
- type: StringConstructor;
4
+ type: (NumberConstructor | StringConstructor)[];
5
5
  default: string;
6
6
  };
7
7
  tip: {
@@ -16,7 +16,7 @@ declare const _default: import("vue").DefineComponent<{
16
16
  NTooltip: any;
17
17
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
18
18
  content: {
19
- type: StringConstructor;
19
+ type: (NumberConstructor | StringConstructor)[];
20
20
  default: string;
21
21
  };
22
22
  tip: {
@@ -27,7 +27,7 @@ declare const _default: import("vue").DefineComponent<{
27
27
  default: () => {};
28
28
  };
29
29
  }>>, {
30
- content: string;
30
+ content: string | number;
31
31
  contentStyle: CSSProperties;
32
32
  }>;
33
33
  export default _default;
@@ -1 +1 @@
1
- import{defineComponent as t,openBlock as e,createBlock as o,unref as i,withCtx as l,createElementVNode as p,createVNode as n,normalizeStyle as a,createTextVNode as r,toDisplayString as s}from"vue";import{NTooltip as d,NEllipsis as u}from"naive-ui";var f=t({__name:"InfoEllipsis",props:{content:{type:String,default:""},tip:{type:String},contentStyle:{type:Object,default:()=>({})}},setup:t=>(f,c)=>(e(),o(i(d),{disabled:!t.tip},{trigger:l((()=>[p("section",null,[n(i(u),{style:a(t.contentStyle),tooltip:{placement:t.tip?"bottom":"top"}},{default:l((()=>[r(s(t.content||"-"),1)])),_:1},8,["style","tooltip"])])])),default:l((()=>[r(" "+s(t.tip),1)])),_:1},8,["disabled"]))});export{f as default};
1
+ import{defineComponent as t,openBlock as e,createBlock as l,unref as o,withCtx as i,createElementVNode as n,createVNode as p,normalizeStyle as r,createTextVNode as a,toDisplayString as u}from"vue";import{NTooltip as s,NEllipsis as d}from"naive-ui";var f=t({__name:"InfoEllipsis",props:{content:{type:[String,Number],default:""},tip:{type:String},contentStyle:{type:Object,default:()=>({})}},setup:t=>(f,m)=>(e(),l(o(s),{disabled:!t.tip},{trigger:i((()=>[n("section",null,[p(o(d),{style:r(t.contentStyle),tooltip:{placement:t.tip?"bottom":"top"}},{default:i((()=>{var e;return[a(u(null!=(e=t.content)?e:"-"),1)]})),_:1},8,["style","tooltip"])])])),default:i((()=>[a(" "+u(t.tip),1)])),_:1},8,["disabled"]))});export{f as default};
@@ -458,7 +458,7 @@ declare const _default: import("vue").DefineComponent<{
458
458
  displayContent: import("vue").ComputedRef<string>;
459
459
  InfoEllipsis: import("vue").DefineComponent<{
460
460
  content: {
461
- type: StringConstructor;
461
+ type: (NumberConstructor | StringConstructor)[];
462
462
  default: string;
463
463
  };
464
464
  tip: {
@@ -473,7 +473,7 @@ declare const _default: import("vue").DefineComponent<{
473
473
  NTooltip: any;
474
474
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
475
475
  content: {
476
- type: StringConstructor;
476
+ type: (NumberConstructor | StringConstructor)[];
477
477
  default: string;
478
478
  };
479
479
  tip: {
@@ -484,7 +484,7 @@ declare const _default: import("vue").DefineComponent<{
484
484
  default: () => {};
485
485
  };
486
486
  }>>, {
487
- content: string;
487
+ content: string | number;
488
488
  contentStyle: import("vue").CSSProperties;
489
489
  }>;
490
490
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
@@ -511,7 +511,7 @@ declare const _default: import("vue").DefineComponent<{
511
511
  }>;
512
512
  InfoEllipsis: import("vue").DefineComponent<{
513
513
  content: {
514
- type: StringConstructor;
514
+ type: (NumberConstructor | StringConstructor)[];
515
515
  default: string;
516
516
  };
517
517
  tip: {
@@ -526,7 +526,7 @@ declare const _default: import("vue").DefineComponent<{
526
526
  NTooltip: any;
527
527
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
528
528
  content: {
529
- type: StringConstructor;
529
+ type: (NumberConstructor | StringConstructor)[];
530
530
  default: string;
531
531
  };
532
532
  tip: {
@@ -537,7 +537,7 @@ declare const _default: import("vue").DefineComponent<{
537
537
  default: () => {};
538
538
  };
539
539
  }>>, {
540
- content: string;
540
+ content: string | number;
541
541
  contentStyle: import("vue").CSSProperties;
542
542
  }>;
543
543
  SlotRender: import("vue").DefineComponent<{
@@ -101,6 +101,14 @@ declare const CScaleView: SFCWithInstall<import("vue").DefineComponent<{
101
101
  extrasmall: number;
102
102
  };
103
103
  };
104
+ hasExtendBtn: {
105
+ type: BooleanConstructor;
106
+ default: boolean;
107
+ };
108
+ printingHideBtn: {
109
+ type: BooleanConstructor;
110
+ default: boolean;
111
+ };
104
112
  }, {
105
113
  ScaleViewState: {
106
114
  other: string;
@@ -236,6 +244,14 @@ declare const CScaleView: SFCWithInstall<import("vue").DefineComponent<{
236
244
  extrasmall: number;
237
245
  };
238
246
  };
247
+ hasExtendBtn: {
248
+ type: BooleanConstructor;
249
+ default: boolean;
250
+ };
251
+ printingHideBtn: {
252
+ type: BooleanConstructor;
253
+ default: boolean;
254
+ };
239
255
  }>> & {
240
256
  onOnCloseSetting?: ((...args: any[]) => any) | undefined;
241
257
  onSubmitNoRequest?: ((...args: any[]) => any) | undefined;
@@ -818,6 +834,14 @@ declare const CScaleView: SFCWithInstall<import("vue").DefineComponent<{
818
834
  extrasmall: number;
819
835
  };
820
836
  };
837
+ hasExtendBtn: {
838
+ type: BooleanConstructor;
839
+ default: boolean;
840
+ };
841
+ printingHideBtn: {
842
+ type: BooleanConstructor;
843
+ default: boolean;
844
+ };
821
845
  }>> & {
822
846
  onOnCloseSetting?: ((...args: any[]) => any) | undefined;
823
847
  onSubmitNoRequest?: ((...args: any[]) => any) | undefined;
@@ -846,6 +870,8 @@ declare const CScaleView: SFCWithInstall<import("vue").DefineComponent<{
846
870
  ak: string;
847
871
  getChunkUploadConfig: Function;
848
872
  fontSizeObj: Record<string, any>;
873
+ hasExtendBtn: boolean;
874
+ printingHideBtn: boolean;
849
875
  }>>;
850
876
  declare const CRadio: SFCWithInstall<import("vue").DefineComponent<{
851
877
  form: {
@@ -99,6 +99,14 @@ declare const _default: import("vue").DefineComponent<{
99
99
  extrasmall: number;
100
100
  };
101
101
  };
102
+ hasExtendBtn: {
103
+ type: BooleanConstructor;
104
+ default: boolean;
105
+ };
106
+ printingHideBtn: {
107
+ type: BooleanConstructor;
108
+ default: boolean;
109
+ };
102
110
  }, {
103
111
  ScaleViewState: {
104
112
  other: string;
@@ -234,6 +242,14 @@ declare const _default: import("vue").DefineComponent<{
234
242
  extrasmall: number;
235
243
  };
236
244
  };
245
+ hasExtendBtn: {
246
+ type: BooleanConstructor;
247
+ default: boolean;
248
+ };
249
+ printingHideBtn: {
250
+ type: BooleanConstructor;
251
+ default: boolean;
252
+ };
237
253
  }>> & {
238
254
  onOnCloseSetting?: ((...args: any[]) => any) | undefined;
239
255
  onSubmitNoRequest?: ((...args: any[]) => any) | undefined;
@@ -816,6 +832,14 @@ declare const _default: import("vue").DefineComponent<{
816
832
  extrasmall: number;
817
833
  };
818
834
  };
835
+ hasExtendBtn: {
836
+ type: BooleanConstructor;
837
+ default: boolean;
838
+ };
839
+ printingHideBtn: {
840
+ type: BooleanConstructor;
841
+ default: boolean;
842
+ };
819
843
  }>> & {
820
844
  onOnCloseSetting?: ((...args: any[]) => any) | undefined;
821
845
  onSubmitNoRequest?: ((...args: any[]) => any) | undefined;
@@ -844,5 +868,7 @@ declare const _default: import("vue").DefineComponent<{
844
868
  ak: string;
845
869
  getChunkUploadConfig: Function;
846
870
  fontSizeObj: Record<string, any>;
871
+ hasExtendBtn: boolean;
872
+ printingHideBtn: boolean;
847
873
  }>;
848
874
  export default _default;
@@ -1 +1 @@
1
- import{defineComponent as e,reactive as o,ref as t,watch as a,nextTick as n,openBlock as s,createElementBlock as i,normalizeClass as l,unref as r,createCommentVNode as m,Fragment as c,createBlock as u,mergeProps as d,createElementVNode as p,normalizeStyle as v,createVNode as f,withCtx as g,renderList as h,toDisplayString as k,createTextVNode as y,resolveDynamicComponent as w}from"vue";import S from"./hooks/use-noData.js";import{ScaleViewProps as b}from"./hooks/scaleview-props.js";import{getScaleViewState as C}from"./hooks/scaleview-state.js";import{ScaleViewComputed as D}from"./hooks/scaleview-computed.js";import{ScaleViewInit as E}from"./hooks/scaleview-init.js";import{ScaleViewSubmit as j}from"./hooks/scaleview-submit.js";import{ScaleViewMethods as _}from"./hooks/scaleview-methods.js";import{handleQueryParams as x,isCollection as P}from"./utils/judge-types.js";import{useEvent as q}from"./hooks/use-event.js";import"xe-utils";import"moment";import F from"../../../shared/utils/vexutilsExpand.js";import L from"./components/NoData.vue.js";import N from"./components/EvaluateCountdown.vue.js";import R from"./components/EvaluatePage.vue.js";import T from"./components/AnswerParse.vue.js";import A from"./components/ScaleScore.js";import M from"./components/DescribeContent.vue.js";import{NForm as O,NFormItem as I,NButton as J}from"naive-ui";const V=["innerHTML"],G={key:0,class:"required-text"},W={key:1,class:"evalute-label"},B=["onClick"],H=p("i",{class:"scale-view-iconfont icon-scale-view-dengpao"},null,-1),Q={key:1,class:"footer"};var z=e({__name:"ScaleView",props:b,emits:["onCloseSetting","submitNoRequest","onSubmit","startWriteScale"],setup(e,{expose:b,emit:z}){const K=e,{ScaleViewState:U}=C(),X=o(U),Y=t(null),Z=t(null),{noDataState:$,setNoData:ee,resetNodata:oe}=S(),te=x(),{showEvatip:ae,isFormBoldOpen:ne,scaleStyle:se,handlePageClass:ie,isShowItem:le,handleShowQuestionNumber:re,hasScore:me,isPreviewScale:ce,showEvaluateEntry:ue,showEvaluateCoundownPage:de,showSaveBtn:pe,showEvaluateLabel:ve,showAnswerParse:fe,propsConfig:ge,evaluatePageProps:he,evaluateCountdownProps:ke,isEvaluetaResSituation:ye,disableEdit:we,desStart:Se,desEnd:be,desContent:Ce}=D(K,X,{query:te}),{initForm:De}=E(K,X,z,{query:te}),{submitMethod:Ee,onSubmitData:je,onSubmitForm:_e,handleScoreJson:xe}=j(K,X,z,{query:te,formRef:Z,countdownDom:Y}),{nextLogicEvent:Pe,handleDynamicDataRelation:qe}=q(K,X),{scaleChange:Fe,labelChange:Le,vodFileList:Ne,writeGuage:Re,closeEvaluateCountdown:Te,showEvaTipModal:Ae}=_(K,X,z,{nextLogicEvent:Pe,handleDynamicDataRelation:qe,isPreviewScale:ce,submitMethod:Ee,isEvaluetaResSituation:ye,handleScoreJson:xe,disableEdit:we});(()=>{let{id:e}=te;e&&(X.shareId=e)})();const Me=e=>{try{oe(),De(e)}catch(e){console.log(e,"--error"),X.spinning=!1,X.hasFrontAddress=!1,ee(!0,null==e?void 0:e.resultMsg,null==e?void 0:e.result)}};a((()=>K.ids),((e,o)=>{o?e.guage_id&&e.guage_id!=o.guage_id&&Me(e):e.guage_id&&Me(e)}),{immediate:!0}),a((()=>K.guageData),(e=>{if(!e||!Object.keys(e||{}).length)return;X.form={},X.formArray=[];const o=JSON.parse(JSON.stringify(e));n((()=>{De(o)}))}),{immediate:!0});const Oe=F.debounce(je,300),Ie=()=>{z("onCloseSetting")};return b({getScaleData:()=>({...X}),onSubmitForm:_e,cancel:Ie}),(e,o)=>(s(),i("div",{class:l(["c-scale-view-block",{"c-scale-view-block-hasfooter":r(pe)}])},[m(' <template v-if="state.spinning">\r\n <n-spin :show="state.spinning" description="加载中"></n-spin>\r\n </template> '),X.spinning||X.hasFrontAddress?m("v-if",!0):(s(),i(c,{key:0},[r($).noData?(s(),u(L,{key:0,noDataImg:r($).noDataImg,noDataTip:r($).noDataTip},null,8,["noDataImg","noDataTip"])):(s(),i(c,{key:1},[r(ue)?(s(),u(R,d({key:0},r(he),{onWriteGuage:r(Re)}),null,16,["onWriteGuage"])):(s(),i(c,{key:1},[r(de)?(s(),u(N,d({key:0,ref_key:"countdownDom",ref:Y},r(ke),{onCloseEvaluateCountdown:r(Te)}),null,16,["onCloseEvaluateCountdown"])):m("v-if",!0),p("div",{class:l(["scale-container",{"scale-container-nopadding":r(ie),"scale-container-hasfooter":r(pe)}]),style:v(r(se))},[r(me)?(s(),u(r(A),{key:0,config:X.config,maxScore:X.maxScore},null,8,["config","maxScore"])):m("v-if",!0),r(Se)?(s(),u(M,{key:1,content:r(Ce)},null,8,["content"])):m("v-if",!0),f(r(O),{ref_key:"formRef",ref:Z,model:X.form,rules:X.rules,"require-mark-placement":"left",class:"main"},{default:g((()=>[(s(!0),i(c,null,h(X.formArray,((e,o)=>(s(),i(c,{key:(e.id||e.seq)+o},[r(le)(e)?(s(),u(r(I),{key:0,path:e.val_key,"show-label":!r(P)(e.type),class:"c-scle-form-item"},{label:g((()=>[p("span",{class:l({"scale-label-required":r(ne)(e)}),innerHTML:r(re)(e)},null,10,V),r(ne)(e)?(s(),i("span",G,"(必填)")):m("v-if",!0),r(ve)(e)?(s(),i("span",W,k(r(ve)(e)),1)):m("v-if",!0),r(ae)(e)?(s(),i("span",{key:2,class:"evalute-tip",onClick:o=>r(Ae)(e)},[H,y(" 查看提示 ")],8,B)):m("v-if",!0)])),default:g((()=>[(s(),u(w(e.renderCom),d(r(ge)(e,o),{key:(e.id||e.seq)+o,onScaleChange:r(Fe),onOnChange:o=>r(Le)(o,e),onVodFileList:r(Ne)}),null,16,["onScaleChange","onOnChange","onVodFileList"])),r(fe)(e)?(s(),u(T,{key:0,item:e},null,8,["item"])):m("v-if",!0)])),_:2},1032,["path","show-label"])):m("v-if",!0)],64)))),128))])),_:1},8,["model","rules"]),r(be)?(s(),u(M,{key:2,content:r(Ce)},null,8,["content"])):m("v-if",!0)],6),r(pe)?(s(),i("div",Q,[m(" 分享的链接 隐藏取消按钮 "),"guage"!==K.sourceType?(s(),u(r(J),{key:0,onClick:Ie},{default:g((()=>[y("取消")])),_:1})):m("v-if",!0),K.isLock?m("v-if",!0):(s(),u(r(J),{key:1,onClick:r(Oe),disabled:X.banSubmit,type:"primary"},{default:g((()=>[y(" 保存 ")])),_:1},8,["onClick","disabled"]))])):m("v-if",!0)],64))],64))],64))],2))}});export{z as default};
1
+ import{defineComponent as e,reactive as o,ref as t,watch as a,nextTick as n,openBlock as s,createElementBlock as i,normalizeClass as l,unref as r,createCommentVNode as m,Fragment as c,createBlock as u,mergeProps as d,createElementVNode as p,normalizeStyle as v,createVNode as f,withCtx as g,renderList as h,toDisplayString as k,createTextVNode as y,resolveDynamicComponent as w,renderSlot as S}from"vue";import b from"./hooks/use-noData.js";import{ScaleViewProps as C}from"./hooks/scaleview-props.js";import{getScaleViewState as D}from"./hooks/scaleview-state.js";import{ScaleViewComputed as E}from"./hooks/scaleview-computed.js";import{ScaleViewInit as j}from"./hooks/scaleview-init.js";import{ScaleViewSubmit as _}from"./hooks/scaleview-submit.js";import{ScaleViewMethods as x}from"./hooks/scaleview-methods.js";import{handleQueryParams as P,isCollection as q}from"./utils/judge-types.js";import{useEvent as F}from"./hooks/use-event.js";import"xe-utils";import"moment";import L from"../../../shared/utils/vexutilsExpand.js";import N from"./components/NoData.vue.js";import R from"./components/EvaluateCountdown.vue.js";import T from"./components/EvaluatePage.vue.js";import A from"./components/AnswerParse.vue.js";import M from"./components/ScaleScore.js";import O from"./components/DescribeContent.vue.js";import{NForm as I,NFormItem as J,NButton as V}from"naive-ui";const B=["innerHTML"],G={key:0,class:"required-text"},W={key:1,class:"evalute-label"},H=["onClick"],Q=p("i",{class:"scale-view-iconfont icon-scale-view-dengpao"},null,-1),$={key:1,class:"footer"};var z=e({__name:"ScaleView",props:C,emits:["onCloseSetting","submitNoRequest","onSubmit","startWriteScale"],setup(e,{expose:C,emit:z}){const K=e,{ScaleViewState:U}=D(),X=o(U),Y=t(null),Z=t(null),{noDataState:ee,setNoData:oe,resetNodata:te}=b(),ae=P(),{showEvatip:ne,isFormBoldOpen:se,scaleStyle:ie,handlePageClass:le,isShowItem:re,handleShowQuestionNumber:me,hasScore:ce,isPreviewScale:ue,showEvaluateEntry:de,showEvaluateCoundownPage:pe,showSaveBtn:ve,showEvaluateLabel:fe,showAnswerParse:ge,propsConfig:he,evaluatePageProps:ke,evaluateCountdownProps:ye,isEvaluetaResSituation:we,disableEdit:Se,desStart:be,desEnd:Ce,desContent:De}=E(K,X,{query:ae}),{initForm:Ee}=j(K,X,z,{query:ae}),{submitMethod:je,onSubmitData:_e,onSubmitForm:xe,handleScoreJson:Pe}=_(K,X,z,{query:ae,formRef:Z,countdownDom:Y}),{nextLogicEvent:qe,handleDynamicDataRelation:Fe}=F(K,X),{scaleChange:Le,labelChange:Ne,vodFileList:Re,writeGuage:Te,closeEvaluateCountdown:Ae,showEvaTipModal:Me}=x(K,X,z,{nextLogicEvent:qe,handleDynamicDataRelation:Fe,isPreviewScale:ue,submitMethod:je,isEvaluetaResSituation:we,handleScoreJson:Pe,disableEdit:Se});(()=>{let{id:e}=ae;e&&(X.shareId=e)})();const Oe=e=>{try{te(),Ee(e)}catch(e){console.log(e,"--error"),X.spinning=!1,X.hasFrontAddress=!1,oe(!0,null==e?void 0:e.resultMsg,null==e?void 0:e.result)}};a((()=>K.ids),((e,o)=>{o?e.guage_id&&e.guage_id!=o.guage_id&&Oe(e):e.guage_id&&Oe(e)}),{immediate:!0}),a((()=>K.guageData),(e=>{if(!e||!Object.keys(e||{}).length)return;X.form={},X.formArray=[];const o=JSON.parse(JSON.stringify(e));n((()=>{Ee(o)}))}),{immediate:!0});const Ie=L.debounce(_e,300),Je=()=>{z("onCloseSetting")};return C({getScaleData:()=>({...X}),onSubmitForm:xe,cancel:Je}),(e,o)=>(s(),i("div",{class:l(["c-scale-view-block",{"c-scale-view-block-hasfooter":r(ve)}])},[m(' <template v-if="state.spinning">\r\n <n-spin :show="state.spinning" description="加载中"></n-spin>\r\n </template> '),X.spinning||X.hasFrontAddress?m("v-if",!0):(s(),i(c,{key:0},[r(ee).noData?(s(),u(N,{key:0,noDataImg:r(ee).noDataImg,noDataTip:r(ee).noDataTip},null,8,["noDataImg","noDataTip"])):(s(),i(c,{key:1},[r(de)?(s(),u(T,d({key:0},r(ke),{onWriteGuage:r(Te)}),null,16,["onWriteGuage"])):(s(),i(c,{key:1},[r(pe)?(s(),u(R,d({key:0,ref_key:"countdownDom",ref:Y},r(ye),{onCloseEvaluateCountdown:r(Ae)}),null,16,["onCloseEvaluateCountdown"])):m("v-if",!0),p("div",{class:l(["scale-container",{"scale-container-nopadding":r(le),"scale-container-hasfooter":r(ve)}]),style:v(r(ie))},[r(ce)?(s(),u(r(M),{key:0,config:X.config,maxScore:X.maxScore},null,8,["config","maxScore"])):m("v-if",!0),r(be)?(s(),u(O,{key:1,content:r(De)},null,8,["content"])):m("v-if",!0),f(r(I),{ref_key:"formRef",ref:Z,model:X.form,rules:X.rules,"require-mark-placement":"left",class:"main"},{default:g((()=>[(s(!0),i(c,null,h(X.formArray,((e,o)=>(s(),i(c,{key:(e.id||e.seq)+o},[r(re)(e)?(s(),u(r(J),{key:0,path:e.val_key,"show-label":!r(q)(e.type),class:"c-scle-form-item"},{label:g((()=>[p("span",{class:l({"scale-label-required":r(se)(e)}),innerHTML:r(me)(e)},null,10,B),r(se)(e)?(s(),i("span",G,"(必填)")):m("v-if",!0),r(fe)(e)?(s(),i("span",W,k(r(fe)(e)),1)):m("v-if",!0),r(ne)(e)?(s(),i("span",{key:2,class:"evalute-tip",onClick:o=>r(Me)(e)},[Q,y(" 查看提示 ")],8,H)):m("v-if",!0)])),default:g((()=>[(s(),u(w(e.renderCom),d(r(he)(e,o),{key:(e.id||e.seq)+o,onScaleChange:r(Le),onOnChange:o=>r(Ne)(o,e),onVodFileList:r(Re)}),null,16,["onScaleChange","onOnChange","onVodFileList"])),r(ge)(e)?(s(),u(A,{key:0,item:e},null,8,["item"])):m("v-if",!0)])),_:2},1032,["path","show-label"])):m("v-if",!0)],64)))),128))])),_:1},8,["model","rules"]),r(Ce)?(s(),u(O,{key:2,content:r(De)},null,8,["content"])):m("v-if",!0)],6),r(ve)?(s(),i("div",$,[m(" 分享的链接 隐藏取消按钮 "),"guage"!==K.sourceType?(s(),u(r(V),{key:0,onClick:Je},{default:g((()=>[y("取消")])),_:1})):m("v-if",!0),K.isLock?m("v-if",!0):(s(),u(r(V),{key:1,onClick:r(Ie),disabled:X.banSubmit,type:"primary"},{default:g((()=>[y(" 保存 ")])),_:1},8,["onClick","disabled"])),S(e.$slots,"extendBtn")])):m("v-if",!0)],64))],64))],64))],2))}});export{z as default};
@@ -1 +1 @@
1
- import{computed as e}from"vue";import{isEvaluation as t}from"../utils/judge-types.js";import"xe-utils";import a from"moment";import i from"../../../../shared/utils/vexutilsExpand.js";import{componentMapStr as n}from"./use-component.js";const o=(o,l,r)=>{const{query:s}=r,u=(new Date).getTime(),v=e((()=>{var e,t;return null==(t=null==(e=l.originConfig)?void 0:e.otherSetting)?void 0:t.desLocation})),d=e((()=>{var e,t;return null==(t=null==(e=l.originConfig)?void 0:e.otherSetting)?void 0:t.desContent})),c=e((()=>"start"===v.value&&!!d.value)),m=e((()=>"end"===v.value&&!!d.value)),p=e((()=>{var e;return s.importId||(null==(e=o.params)?void 0:e.importId)})),g=e((()=>1==(null==s?void 0:s.formBoldOpen))),f=e((()=>e=>{var a;return!p.value&&(!!t(e.type)&&(1==(null==s?void 0:s.evatip)||1==(null==(a=o.params)?void 0:a.evatip)))})),h=e((()=>{var e;return(null==(e=l.config)?void 0:e.evaluateResultSetting)||{}})),S=e((()=>{const{evaluateTime:e}=h.value;return+e})),C=e((()=>{var e;return null==(e=h.value)?void 0:e.evaluateStartTime})),E=e((()=>{const e=new Date(C.value);return!!i.isValidDate(e)&&e})),O=e((()=>{const{evaluetaResSituation:e}=h.value||{};return e})),L=e((()=>{const{evaluateZeroTip:e}=h.value||{};return e})),w=e((()=>{if(!C.value||!S.value)return!1;if(!E.value)return!1;const e=a(C.value).add(S.value,"minutes").valueOf();return u>=e})),y=e((()=>{const e=E.value;if(!e)return!1;const t=a(e).valueOf();return u<t})),b=e((()=>e=>{const t=e.required;return o.styleSetting&&Object.keys(o.styleSetting).length&&"formBoldOpen"in o.styleSetting?t&&o.styleSetting.formBoldOpen:t&&g.value})),R=e((()=>{let e=l.fontSize;if(!e||"S"===e)return;e={L:"large",M:"medium",XS:"extrasmall"}[e];const t=e&&(null==o?void 0:o.fontSizeObj[e])||1,a=Math.floor(100/t*1e4)/1e4;return{width:`${a}%`,height:`${a}%`,transform:`scale(${t})`}})),A=e((()=>!("customList"==o.type&&!o.noBtn)&&!(!o.noBtn&&!o.hideBtn))),T=e((()=>e=>ee(e))),k=e((()=>e=>{var a;const{type:i}=e||{},n=!1===(null==(a=l.config)?void 0:a.autoQuestionNumber)?e.showTitle:`${e.softcode}、${e.showTitle}`;if(!t(i))return n;const o=ae(e);return o||L.value?`${n}&nbsp;<span style="color:#2d7aff;" class="score-i">${o}</span>`:n})),B=e((()=>{const{config:e}=l;return!p.value&&(!(!e||!Object.keys(e).length)&&"totalScore"in e)})),j=e((()=>{var e;return(null==(e=o.ids)?void 0:e.guage_id)&&o.noBtn})),_=e((()=>{const e=o.params||{};if(!("skipCover"in e))return!1;return e.skipCover&&!y.value&&!w.value})),U=e((()=>p.value||j.value||l.isFinished||o.noBtn||o.hideBtn)),F=e((()=>l.showEvaluatePage&&l.showEvaluateSettingWrap&&!U.value&&!_.value)),P=e((()=>!B.value&&!F.value&&l.showEvaluateCountdownWrap&&!U.value)),D=e((()=>{const{evaluateResultSetting:e={}}=l.config;return(Object.values(e).filter((e=>{if(e)return!0}))||[]).length})),x=e((()=>l.paramsEvaluate&&Object.keys(l.paramsEvaluate).length)),V=e((()=>{const e=window.location.search||window.location.hash;if(!e)return;const t=["evaname","evadesc","evast","evadur","evaan","evasit","evaztip"].find((t=>e.includes(t)));return l.paramsEvaluate||t})),$=e((()=>{var e;return 1==s.isEdit||1==(null==(e=o.params)?void 0:e.isEdit)||p.value})),I=e((()=>1==l.isFinished&&$.value)),N=e((()=>D.value||V.value?!o.noBtn&&!o.hideBtn&&(!l.isFinished||$.value):!o.noBtn&&!o.hideBtn)),K=e((()=>D.value||V.value?!!o.hideBtn||!!o.isLock||l.isFinished&&!$.value:!!o.hideBtn||!!o.isLock)),M=e((()=>e=>({EVALUATE_RADIO_BLOCK:"单选",EVALUATE_CHECKBOX_BLOCK:"多选"}[e.type]))),q=e((()=>e=>{var t;if(I.value)return!1;const{evaluateAnswer:n,checkAnswerMode:o,evaluateStartTime:r,evaluateTime:s}=(null==(t=l.config)?void 0:t.evaluateResultSetting)||{},u=(null==e?void 0:e.scoreConfigs)||0,v=n&&l.isFinished&&["EVALUATE_RADIO_BLOCK","EVALUATE_CHECKBOX_BLOCK","EVALUATE_SELECT","EVALUATE_INPUT"].includes(e.type)&&u;if(!r||!s||o&&1==o)return v;if(!i.isValidDate(new Date(r)))return v;const d=a(r).add(s,"minutes").diff(a(),"seconds",!0);return v&&d<=0})),J=e((()=>"customList"===o.type?"保存":"提交")),z=e((()=>({getSelectOptions:o.getSelectOptions,getSearchOptions:o.getSearchOptions,openType:o.openType}))),X=e((()=>({getCascadeOptions:o.getCascadeOptions}))),H=e((()=>({uploadPictureUrl:o.uploadPictureUrl,uploadFileUrl:o.uploadFileUrl}))),Q=e((()=>({ak:o.ak}))),W=e((()=>({source:"guage",getChunkUploadConfig:o.getChunkUploadConfig}))),Z=e((()=>({selectedList:l.labelSelectedList,selectedListObj:l.labelSelectedListObj,getLabelList:o.getLabelList,deleteLabel:o.deleteLabel,saveLabelItem:o.saveLabelItem,sourceType:o.sourceType}))),G={RSelectCom:z.value,RCascaderCom:X.value,RUploadCom:H.value,RMapCom:Q.value,RVodChunkUploadCom:W.value},Y=e((()=>(e,t)=>{var a;const i=n[e.type],o=G[i]||{},r={form:l.form,item:e,index:t,isLock:K.value,...o};return"RVodChunkUploadCom"===i&&Object.assign(r,{formData:e,limitNum:(null==(a=e.setting)?void 0:a.limitPic)||1,defFileList:l.form[e.val_key]}),"RMapCom"===i&&Object.assign(r,{locationProp:l.form[e.val_key]}),"CSelectLabelCom"===i&&(Object.assign(r,{...Z.value}),delete r.form,delete r.index),r})),ee=(e,t)=>{if(e.hide)return!1;const{form:a={},formArray:n=[]}=l;let o={};if(t){let t=e.setting;if(e.setting&&i.isJSON(e.setting)&&(t=JSON.parse(e.setting)),o=i.isString(t.callbackCondition)?JSON.parse(t.callbackCondition):t.callbackCondition,!o||!o.condition||!o.condition.length)return!0}else o=i.isString(e.relationLogic)?JSON.parse(e.relationLogic):e.relationLogic;if(!o||!Object.keys(o).length)return!0;const{relation_logic_is:r,condition:s,relation_logic:u}=o;if(r){const t=s.map((e=>{const t=n.filter((t=>t.seq==e.subject_seq))[0],o=te(t);return i.isArray(a[o])?a[o].some((t=>e.value.includes(t))):e.value.includes(a[o])}));e.isShow="OR"==u?t.some((e=>e)):"AND"==u?t.every((e=>e)):t[0]}return e.isShow},te=e=>e.databaseTitle||e.title,ae=e=>{const{maxScore:t=0,minScore:a=0,scoreType:i}=e.scoreConfigs||{};return"eachOptionScore"===i&&a<0?`(${a}-${t}分)`:t||L.value?`(${t}分)`:void 0},ie=e((()=>{var e;return{formArray:l.formArray,evaluateResultConfig:(null==(e=l.config)?void 0:e.evaluateResultConfig)||{},evaluateResultSetting:h.value,isFinished:l.isFinished,maxScore:l.maxScore,skipCover:_.value}})),ne=e((()=>{var e;return{formArray:l.formArray,evaluateResultConfig:(null==(e=l.config)?void 0:e.evaluateResultConfig)||{},evaluateResultSetting:h.value,form:l.form,isFinished:l.isFinished,currentTime:l.currentTime,showEvaluateCountdown:l.showEvaluateCountdown,isEvaluetaResSituation:O.value,evaResultObj:l.evaResultObj}}));return{showEvatip:f,isFormBoldOpen:b,scaleStyle:R,handlePageClass:A,isShowItem:T,handleShowQuestionNumber:k,hasScore:B,isPreviewScale:j,showEvaluateEntry:F,showEvaluateCoundownPage:P,hasEvaluateResultSetting:D,hasparamsEvaluate:x,hasDefault:V,showSaveBtn:N,componentDisable:K,showEvaluateLabel:M,showAnswerParse:q,tipMsg:J,propsConfig:Y,showEvent:ee,formKey:te,evaluatePageProps:ie,evaluateCountdownProps:ne,skipCover:_,scaleEdit:I,isEvaluetaResSituation:O,disableEdit:U,isImportScale:p,desStart:c,desEnd:m,desContent:d}};export{o as ScaleViewComputed};
1
+ import{computed as e}from"vue";import{isEvaluation as t}from"../utils/judge-types.js";import"xe-utils";import a from"moment";import n from"../../../../shared/utils/vexutilsExpand.js";import{componentMapStr as i}from"./use-component.js";const o=(o,l,r)=>{const{query:s}=r,u=(new Date).getTime(),v=e((()=>{var e,t;return null==(t=null==(e=l.originConfig)?void 0:e.otherSetting)?void 0:t.desLocation})),d=e((()=>{var e,t;return null==(t=null==(e=l.originConfig)?void 0:e.otherSetting)?void 0:t.desContent})),c=e((()=>"start"===v.value&&!!d.value)),m=e((()=>"end"===v.value&&!!d.value)),p=e((()=>{var e;return s.importId||(null==(e=o.params)?void 0:e.importId)})),g=e((()=>1==(null==s?void 0:s.formBoldOpen))),f=e((()=>e=>{var a;return!p.value&&(!!t(e.type)&&(1==(null==s?void 0:s.evatip)||1==(null==(a=o.params)?void 0:a.evatip)))})),h=e((()=>{var e;return(null==(e=l.config)?void 0:e.evaluateResultSetting)||{}})),S=e((()=>{const{evaluateTime:e}=h.value;return+e})),C=e((()=>{var e;return null==(e=h.value)?void 0:e.evaluateStartTime})),E=e((()=>{const e=new Date(C.value);return!!n.isValidDate(e)&&e})),O=e((()=>{const{evaluetaResSituation:e}=h.value||{};return e})),L=e((()=>{const{evaluateZeroTip:e}=h.value||{};return e})),w=e((()=>{if(!C.value||!S.value)return!1;if(!E.value)return!1;const e=a(C.value).add(S.value,"minutes").valueOf();return u>=e})),y=e((()=>{const e=E.value;if(!e)return!1;const t=a(e).valueOf();return u<t})),b=e((()=>e=>{const t=e.required;return o.styleSetting&&Object.keys(o.styleSetting).length&&"formBoldOpen"in o.styleSetting?t&&o.styleSetting.formBoldOpen:t&&g.value})),B=e((()=>{let e=l.fontSize;if(!e||"S"===e)return;e={L:"large",M:"medium",XS:"extrasmall"}[e];const t=e&&(null==o?void 0:o.fontSizeObj[e])||1,a=Math.floor(100/t*1e4)/1e4;return{width:`${a}%`,height:`${a}%`,transform:`scale(${t})`}})),R=e((()=>!("customList"==o.type&&!o.noBtn)&&!(!o.noBtn&&!o.hideBtn))),A=e((()=>e=>ee(e))),T=e((()=>e=>{var a;const{type:n}=e||{},i=!1===(null==(a=l.config)?void 0:a.autoQuestionNumber)?e.showTitle:`${e.softcode}、${e.showTitle}`;if(!t(n))return i;const o=ae(e);return o||L.value?`${i}&nbsp;<span style="color:#2d7aff;" class="score-i">${o}</span>`:i})),k=e((()=>{const{config:e}=l;return!p.value&&(!(!e||!Object.keys(e).length)&&"totalScore"in e)})),j=e((()=>{var e;return(null==(e=o.ids)?void 0:e.guage_id)&&o.noBtn})),_=e((()=>{const e=o.params||{};if(!("skipCover"in e))return!1;return e.skipCover&&!y.value&&!w.value})),U=e((()=>p.value||j.value||l.isFinished||o.noBtn||o.hideBtn)),F=e((()=>l.showEvaluatePage&&l.showEvaluateSettingWrap&&!U.value&&!_.value)),P=e((()=>!k.value&&!F.value&&l.showEvaluateCountdownWrap&&!U.value)),x=e((()=>{const{evaluateResultSetting:e={}}=l.config;return(Object.values(e).filter((e=>{if(e)return!0}))||[]).length})),D=e((()=>l.paramsEvaluate&&Object.keys(l.paramsEvaluate).length)),V=e((()=>{const e=window.location.search||window.location.hash;if(!e)return;const t=["evaname","evadesc","evast","evadur","evaan","evasit","evaztip"].find((t=>e.includes(t)));return l.paramsEvaluate||t})),$=e((()=>{var e;return 1==s.isEdit||1==(null==(e=o.params)?void 0:e.isEdit)||p.value})),I=e((()=>1==l.isFinished&&$.value)),N=e((()=>o.hasExtendBtn?!o.printingHideBtn:x.value||V.value?!o.noBtn&&!o.hideBtn&&(!l.isFinished||$.value):!o.noBtn&&!o.hideBtn)),K=e((()=>x.value||V.value?!!o.hideBtn||!!o.isLock||l.isFinished&&!$.value:!!o.hideBtn||!!o.isLock)),M=e((()=>e=>({EVALUATE_RADIO_BLOCK:"单选",EVALUATE_CHECKBOX_BLOCK:"多选"}[e.type]))),q=e((()=>e=>{var t;if(I.value)return!1;const{evaluateAnswer:i,checkAnswerMode:o,evaluateStartTime:r,evaluateTime:s}=(null==(t=l.config)?void 0:t.evaluateResultSetting)||{},u=(null==e?void 0:e.scoreConfigs)||0,v=i&&l.isFinished&&["EVALUATE_RADIO_BLOCK","EVALUATE_CHECKBOX_BLOCK","EVALUATE_SELECT","EVALUATE_INPUT"].includes(e.type)&&u;if(!r||!s||o&&1==o)return v;if(!n.isValidDate(new Date(r)))return v;const d=a(r).add(s,"minutes").diff(a(),"seconds",!0);return v&&d<=0})),J=e((()=>"customList"===o.type?"保存":"提交")),z=e((()=>({getSelectOptions:o.getSelectOptions,getSearchOptions:o.getSearchOptions,openType:o.openType}))),H=e((()=>({getCascadeOptions:o.getCascadeOptions}))),X=e((()=>({uploadPictureUrl:o.uploadPictureUrl,uploadFileUrl:o.uploadFileUrl}))),Q=e((()=>({ak:o.ak}))),W=e((()=>({source:"guage",getChunkUploadConfig:o.getChunkUploadConfig}))),Z=e((()=>({selectedList:l.labelSelectedList,selectedListObj:l.labelSelectedListObj,getLabelList:o.getLabelList,deleteLabel:o.deleteLabel,saveLabelItem:o.saveLabelItem,sourceType:o.sourceType}))),G={RSelectCom:z.value,RCascaderCom:H.value,RUploadCom:X.value,RMapCom:Q.value,RVodChunkUploadCom:W.value},Y=e((()=>(e,t)=>{var a;const n=i[e.type],o=G[n]||{},r={form:l.form,item:e,index:t,isLock:K.value,...o};return"RVodChunkUploadCom"===n&&Object.assign(r,{formData:e,limitNum:(null==(a=e.setting)?void 0:a.limitPic)||1,defFileList:l.form[e.val_key]}),"RMapCom"===n&&Object.assign(r,{locationProp:l.form[e.val_key]}),"CSelectLabelCom"===n&&(Object.assign(r,{...Z.value}),delete r.form,delete r.index),r})),ee=(e,t)=>{if(e.hide)return!1;const{form:a={},formArray:i=[]}=l;let o={};if(t){let t=e.setting;if(e.setting&&n.isJSON(e.setting)&&(t=JSON.parse(e.setting)),o=n.isString(t.callbackCondition)?JSON.parse(t.callbackCondition):t.callbackCondition,!o||!o.condition||!o.condition.length)return!0}else o=n.isString(e.relationLogic)?JSON.parse(e.relationLogic):e.relationLogic;if(!o||!Object.keys(o).length)return!0;const{relation_logic_is:r,condition:s,relation_logic:u}=o;if(r){const t=s.map((e=>{const t=i.filter((t=>t.seq==e.subject_seq))[0],o=te(t);return n.isArray(a[o])?a[o].some((t=>e.value.includes(t))):e.value.includes(a[o])}));e.isShow="OR"==u?t.some((e=>e)):"AND"==u?t.every((e=>e)):t[0]}return e.isShow},te=e=>e.databaseTitle||e.title,ae=e=>{const{maxScore:t=0,minScore:a=0,scoreType:n}=e.scoreConfigs||{};return"eachOptionScore"===n&&a<0?`(${a}-${t}分)`:t||L.value?`(${t}分)`:void 0},ne=e((()=>{var e;return{formArray:l.formArray,evaluateResultConfig:(null==(e=l.config)?void 0:e.evaluateResultConfig)||{},evaluateResultSetting:h.value,isFinished:l.isFinished,maxScore:l.maxScore,skipCover:_.value}})),ie=e((()=>{var e;return{formArray:l.formArray,evaluateResultConfig:(null==(e=l.config)?void 0:e.evaluateResultConfig)||{},evaluateResultSetting:h.value,form:l.form,isFinished:l.isFinished,currentTime:l.currentTime,showEvaluateCountdown:l.showEvaluateCountdown,isEvaluetaResSituation:O.value,evaResultObj:l.evaResultObj}}));return{showEvatip:f,isFormBoldOpen:b,scaleStyle:B,handlePageClass:R,isShowItem:A,handleShowQuestionNumber:T,hasScore:k,isPreviewScale:j,showEvaluateEntry:F,showEvaluateCoundownPage:P,hasEvaluateResultSetting:x,hasparamsEvaluate:D,hasDefault:V,showSaveBtn:N,componentDisable:K,showEvaluateLabel:M,showAnswerParse:q,tipMsg:J,propsConfig:Y,showEvent:ee,formKey:te,evaluatePageProps:ne,evaluateCountdownProps:ie,skipCover:_,scaleEdit:I,isEvaluetaResSituation:O,disableEdit:U,isImportScale:p,desStart:c,desEnd:m,desContent:d}};export{o as ScaleViewComputed};
@@ -99,4 +99,12 @@ export declare const ScaleViewProps: {
99
99
  extrasmall: number;
100
100
  };
101
101
  };
102
+ hasExtendBtn: {
103
+ type: BooleanConstructor;
104
+ default: boolean;
105
+ };
106
+ printingHideBtn: {
107
+ type: BooleanConstructor;
108
+ default: boolean;
109
+ };
102
110
  };
@@ -1 +1 @@
1
- const e={guageData:{type:Object,default:()=>({})},styleSetting:{type:Object,default:()=>({})},ids:{type:Object,default:()=>({guage_id:"",db_id:void 0})},params:{default:()=>({}),type:Object},noBtn:{type:[Boolean,String,Number],default:!1},hideBtn:{type:[Boolean,String,Number],default:!1},isLock:{type:[Boolean,String,Number],default:!1},type:{type:String,default:""},openType:{type:String,default:""},scaleApiConfig:{type:Object,default:()=>({})},getSelectOptions:{type:Function,default:()=>Promise.resolve([])},getSearchOptions:{type:Function,default:()=>Promise.resolve([])},getCascadeOptions:{type:Function,default:()=>Promise.resolve([])},getLabelList:{type:Function,default:()=>Promise.resolve([])},deleteLabel:{type:Function,default:()=>Promise.resolve({status:!0})},saveLabelItem:{type:Function,default:()=>Promise.resolve({status:!0})},uploadPictureUrl:{type:String,default:""},uploadFileUrl:{type:String,default:""},ak:{type:String,default:"KP3BZ-OAC3W-PY6RY-OJ6DV-JYKN3-H6F72"},sourceType:{type:String,default:""},getChunkUploadConfig:{type:Function,default:()=>Promise.resolve({})},fontSizeObj:{type:Object,default:()=>({large:1.25,medium:1.1,small:1,extrasmall:.9})}};export{e as ScaleViewProps};
1
+ const e={guageData:{type:Object,default:()=>({})},styleSetting:{type:Object,default:()=>({})},ids:{type:Object,default:()=>({guage_id:"",db_id:void 0})},params:{default:()=>({}),type:Object},noBtn:{type:[Boolean,String,Number],default:!1},hideBtn:{type:[Boolean,String,Number],default:!1},isLock:{type:[Boolean,String,Number],default:!1},type:{type:String,default:""},openType:{type:String,default:""},scaleApiConfig:{type:Object,default:()=>({})},getSelectOptions:{type:Function,default:()=>Promise.resolve([])},getSearchOptions:{type:Function,default:()=>Promise.resolve([])},getCascadeOptions:{type:Function,default:()=>Promise.resolve([])},getLabelList:{type:Function,default:()=>Promise.resolve([])},deleteLabel:{type:Function,default:()=>Promise.resolve({status:!0})},saveLabelItem:{type:Function,default:()=>Promise.resolve({status:!0})},uploadPictureUrl:{type:String,default:""},uploadFileUrl:{type:String,default:""},ak:{type:String,default:"KP3BZ-OAC3W-PY6RY-OJ6DV-JYKN3-H6F72"},sourceType:{type:String,default:""},getChunkUploadConfig:{type:Function,default:()=>Promise.resolve({})},fontSizeObj:{type:Object,default:()=>({large:1.25,medium:1.1,small:1,extrasmall:.9})},hasExtendBtn:{type:Boolean,default:!1},printingHideBtn:{type:Boolean,default:!1}};export{e as ScaleViewProps};
@@ -1 +1 @@
1
- var e="@cnhis-design-vue/shared",i="3.2.6-beta.2",s="index.ts",n={"naive-ui":"^2.30.0",vue:"^3.2.0"},a={"@vicons/ionicons5":"^0.12.0","lodash-es":"^4.17.21",moment:"^2.29.1","video.js":"^7.19.2","videojs-contrib-hls":"^5.15.0",viewerjs:"^1.10.5","xe-utils":"^3.5.4"},d={name:e,version:"3.2.6-beta.2",private:!0,main:"index.ts",peerDependencies:n,dependencies:a};export{d as default,a as dependencies,s as main,e as name,n as peerDependencies,i as version};
1
+ var e="@cnhis-design-vue/shared",i="3.2.6-beta.4",s="index.ts",n={"naive-ui":"^2.30.0",vue:"^3.2.0"},a={"@vicons/ionicons5":"^0.12.0","lodash-es":"^4.17.21",moment:"^2.29.1","video.js":"^7.19.2","videojs-contrib-hls":"^5.15.0",viewerjs:"^1.10.5","xe-utils":"^3.5.4"},d={name:e,version:"3.2.6-beta.4",private:!0,main:"index.ts",peerDependencies:n,dependencies:a};export{d as default,a as dependencies,s as main,e as name,n as peerDependencies,i as version};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cnhis-design-vue",
3
- "version": "3.2.6-beta.2",
3
+ "version": "3.2.6-beta.4",
4
4
  "license": "ISC",
5
5
  "module": "./es/components/index.js",
6
6
  "main": "./es/components/index.js",
@@ -72,5 +72,5 @@
72
72
  "iOS 7",
73
73
  "last 3 iOS versions"
74
74
  ],
75
- "gitHead": "8ff3e251ba4a5a702fbfbc279e4de4a88a13549d"
75
+ "gitHead": "d1e1b1b914325f2aac0a267ae7afa4d0f28dbf35"
76
76
  }