cnhis-design-vue 3.2.9-beta.0 → 3.2.9-beta.2

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.
Files changed (34) hide show
  1. package/es/components/base-search/index.d.ts +6 -2
  2. package/es/components/base-search/src/index.vue.d.ts +6 -2
  3. package/es/components/classification/index.d.ts +3 -1
  4. package/es/components/classification/src/components/search-filter/index.vue.d.ts +2 -0
  5. package/es/components/classification/src/components/set-classification/index.vue.d.ts +2 -0
  6. package/es/components/classification/src/components/table-modal/index.vue.d.ts +0 -3
  7. package/es/components/classification/src/index.vue.d.ts +3 -1
  8. package/es/components/field-set/src/FieldSet.vue2.js +1 -1
  9. package/es/components/iho-chat/src/components/ChatFile.vue2.js +1 -1
  10. package/es/components/iho-chat/src/components/ChatMain.vue2.js +1 -1
  11. package/es/components/iho-chat/src/components/PersonProfile.vue2.js +1 -1
  12. package/es/components/quick-search/index.d.ts +6 -2
  13. package/es/components/quick-search/src/index.vue.d.ts +6 -2
  14. package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
  15. package/es/components/table-filter/src/components/bi-filter/ValueCfg.vue.d.ts +1 -0
  16. package/es/components/table-filter/src/components/bi-filter/index.vue.d.ts +1 -0
  17. package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +1 -0
  18. package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +1 -0
  19. package/es/components/table-filter/src/components/render-widget/components/SelectTree.vue.d.ts +51 -0
  20. package/es/components/table-filter/src/components/render-widget/components/SelectTree.vue.js +1 -0
  21. package/es/components/table-filter/src/components/render-widget/components/SelectTree.vue2.js +1 -0
  22. package/es/components/table-filter/src/components/render-widget/components/index.d.ts +49 -1
  23. package/es/components/table-filter/src/components/render-widget/components/index.js +1 -1
  24. package/es/components/table-filter/src/components/render-widget/index.vue.js +1 -1
  25. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +65 -0
  26. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.js +1 -1
  27. package/es/components/table-filter/src/hooks/useAdvanced.d.ts +6 -2
  28. package/es/components/table-filter/src/hooks/useAdvanced.js +1 -1
  29. package/es/components/table-filter/src/types/enums.d.ts +1 -0
  30. package/es/components/table-filter/src/types/enums.js +1 -1
  31. package/es/components/table-filter/src/types/index.d.ts +1 -0
  32. package/es/env.d.ts +25 -25
  33. package/es/shared/package.json.js +1 -1
  34. package/package.json +2 -2
@@ -44,6 +44,9 @@ declare const CBaseSearch: SFCWithInstall<import("vue").DefineComponent<{
44
44
  widgetType: string | null;
45
45
  originType: string | null;
46
46
  valueList: {
47
+ name: string;
48
+ value: any;
49
+ }[] | {
47
50
  value: any;
48
51
  label: any;
49
52
  }[] | undefined;
@@ -58,6 +61,7 @@ declare const CBaseSearch: SFCWithInstall<import("vue").DefineComponent<{
58
61
  linkageFieldKeys: string[];
59
62
  };
60
63
  rangeFilter: boolean | undefined;
64
+ componentProps: any;
61
65
  unit: any;
62
66
  isAccurateSearchVal: boolean;
63
67
  _extendData: import("..").IExtendConfigurationType;
@@ -71,7 +75,7 @@ declare const CBaseSearch: SFCWithInstall<import("vue").DefineComponent<{
71
75
  advanceColWidth: number | null | undefined;
72
76
  accurateSearch: any;
73
77
  }[];
74
- transformParams: (paramsList: any[]) => {};
78
+ transformParams: (paramsList: any[]) => any;
75
79
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
76
80
  showSettings: {
77
81
  type: import("vue").PropType<import("..").IsettingsType>;
@@ -160,7 +164,7 @@ declare const CBaseSearch: SFCWithInstall<import("vue").DefineComponent<{
160
164
  onFilterSearch: (obj: import("..").ISearchParamsType[], transResult: object, isOutFilter?: boolean, config?: {}) => void;
161
165
  handleReset: () => void;
162
166
  resetFunc: (arr: import("..").ISearchType[]) => void;
163
- getFilterParams: () => {};
167
+ getFilterParams: () => any;
164
168
  setFilterParams: (params?: any) => void;
165
169
  getOriginalConfig: () => import("..").IApiServerType[];
166
170
  onFilterChange: (fn: any) => void;
@@ -45,6 +45,9 @@ declare const _default: import("vue").DefineComponent<{
45
45
  widgetType: string | null;
46
46
  originType: string | null;
47
47
  valueList: {
48
+ name: string;
49
+ value: any;
50
+ }[] | {
48
51
  value: any;
49
52
  label: any;
50
53
  }[] | undefined;
@@ -59,6 +62,7 @@ declare const _default: import("vue").DefineComponent<{
59
62
  linkageFieldKeys: string[];
60
63
  };
61
64
  rangeFilter: boolean | undefined;
65
+ componentProps: any;
62
66
  unit: any;
63
67
  isAccurateSearchVal: boolean;
64
68
  _extendData: import("../../../components/table-filter/src/types").IExtendConfigurationType;
@@ -72,7 +76,7 @@ declare const _default: import("vue").DefineComponent<{
72
76
  advanceColWidth: number | null | undefined;
73
77
  accurateSearch: any;
74
78
  }[];
75
- transformParams: (paramsList: any[]) => {};
79
+ transformParams: (paramsList: any[]) => any;
76
80
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
77
81
  showSettings: {
78
82
  type: PropType<IsettingsType>;
@@ -161,7 +165,7 @@ declare const _default: import("vue").DefineComponent<{
161
165
  onFilterSearch: (obj: ISearchParamsType[], transResult: object, isOutFilter?: boolean, config?: {}) => void;
162
166
  handleReset: () => void;
163
167
  resetFunc: (arr: ISearchType[]) => void;
164
- getFilterParams: () => {};
168
+ getFilterParams: () => any;
165
169
  setFilterParams: (params?: any) => void;
166
170
  getOriginalConfig: () => IApiServerType[];
167
171
  onFilterChange: (fn: any) => void;
@@ -57,7 +57,7 @@ declare const CClassification: SFCWithInstall<import("vue").DefineComponent<{
57
57
  };
58
58
  }, {
59
59
  handleGetConfigApi: (params: any, key: string, config: {} | undefined, filterApiConfigVal: any) => Promise<any>;
60
- transformClassifyChild: (conObjList: any, searchFieldList: any[]) => {};
60
+ transformClassifyChild: (conObjList: any, searchFieldList: any[]) => any;
61
61
  attrs: any;
62
62
  $message: import("naive-ui").MessageApi;
63
63
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
@@ -1680,6 +1680,7 @@ declare const CClassification: SFCWithInstall<import("vue").DefineComponent<{
1680
1680
  LABEL: string;
1681
1681
  SELECTLABEL: string;
1682
1682
  SELECTDYNAMIC: string;
1683
+ SELECTTREE: string;
1683
1684
  };
1684
1685
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "update:isAccurate" | "update:presetVal")[], "update:modelValue" | "update:isAccurate" | "update:presetVal", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
1685
1686
  paramCfg: {
@@ -2179,6 +2180,7 @@ declare const CClassification: SFCWithInstall<import("vue").DefineComponent<{
2179
2180
  LABEL: string;
2180
2181
  SELECTLABEL: string;
2181
2182
  SELECTDYNAMIC: string;
2183
+ SELECTTREE: string;
2182
2184
  };
2183
2185
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "update:modelValues")[], "update:modelValue" | "update:modelValues", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
2184
2186
  paramCfg: {
@@ -1144,6 +1144,7 @@ declare const _default: import("vue").DefineComponent<{
1144
1144
  LABEL: string;
1145
1145
  SELECTLABEL: string;
1146
1146
  SELECTDYNAMIC: string;
1147
+ SELECTTREE: string;
1147
1148
  };
1148
1149
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "update:isAccurate" | "update:presetVal")[], "update:modelValue" | "update:isAccurate" | "update:presetVal", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
1149
1150
  paramCfg: {
@@ -1643,6 +1644,7 @@ declare const _default: import("vue").DefineComponent<{
1643
1644
  LABEL: string;
1644
1645
  SELECTLABEL: string;
1645
1646
  SELECTDYNAMIC: string;
1647
+ SELECTTREE: string;
1646
1648
  };
1647
1649
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "update:modelValues")[], "update:modelValue" | "update:modelValues", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
1648
1650
  paramCfg: {
@@ -1438,6 +1438,7 @@ declare const _default: import("vue").DefineComponent<{
1438
1438
  LABEL: string;
1439
1439
  SELECTLABEL: string;
1440
1440
  SELECTDYNAMIC: string;
1441
+ SELECTTREE: string;
1441
1442
  };
1442
1443
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "update:isAccurate" | "update:presetVal")[], "update:modelValue" | "update:isAccurate" | "update:presetVal", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
1443
1444
  paramCfg: {
@@ -1937,6 +1938,7 @@ declare const _default: import("vue").DefineComponent<{
1937
1938
  LABEL: string;
1938
1939
  SELECTLABEL: string;
1939
1940
  SELECTDYNAMIC: string;
1941
+ SELECTTREE: string;
1940
1942
  };
1941
1943
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "update:modelValues")[], "update:modelValue" | "update:modelValues", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
1942
1944
  paramCfg: {
@@ -175,9 +175,6 @@ declare const _default: import("vue").DefineComponent<{
175
175
  modelValue: unknown[];
176
176
  componentData: Record<string, any>;
177
177
  } & {
178
- /**
179
- * 改变弹窗大小
180
- */
181
178
  itemKey?: string | Function | undefined;
182
179
  }>, {
183
180
  move: Function;
@@ -59,7 +59,7 @@ declare const _default: import("vue").DefineComponent<{
59
59
  };
60
60
  }, {
61
61
  handleGetConfigApi: (params: any, key: string, config: {} | undefined, filterApiConfigVal: any) => Promise<any>;
62
- transformClassifyChild: (conObjList: any, searchFieldList: any[]) => {};
62
+ transformClassifyChild: (conObjList: any, searchFieldList: any[]) => any;
63
63
  attrs: any;
64
64
  $message: import("naive-ui").MessageApi;
65
65
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
@@ -1682,6 +1682,7 @@ declare const _default: import("vue").DefineComponent<{
1682
1682
  LABEL: string;
1683
1683
  SELECTLABEL: string;
1684
1684
  SELECTDYNAMIC: string;
1685
+ SELECTTREE: string;
1685
1686
  };
1686
1687
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "update:isAccurate" | "update:presetVal")[], "update:modelValue" | "update:isAccurate" | "update:presetVal", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
1687
1688
  paramCfg: {
@@ -2181,6 +2182,7 @@ declare const _default: import("vue").DefineComponent<{
2181
2182
  LABEL: string;
2182
2183
  SELECTLABEL: string;
2183
2184
  SELECTDYNAMIC: string;
2185
+ SELECTTREE: string;
2184
2186
  };
2185
2187
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "update:modelValues")[], "update:modelValue" | "update:modelValues", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
2186
2188
  paramCfg: {
@@ -1 +1 @@
1
- import{defineComponent as e,useAttrs as l,ref as t,computed as i,reactive as o,watch as d,openBlock as a,createElementBlock as r,createBlock as s,unref as n,withKeys as u,withModifiers as c,createCommentVNode as f,createElementVNode as p,Fragment as h,renderList as m,normalizeStyle as y,withCtx as v,createTextVNode as b,toDisplayString as x,createVNode as g,normalizeClass as k,mergeProps as w,renderSlot as S}from"vue";import{NInput as A,NCheckbox as _,NTooltip as E,NIcon as D,NPopconfirm as W,NButton as C}from"naive-ui";import P from"../../../shared/components/VueDraggable/src/vuedraggable.js";import F from"./components/table-row.vue.js";import{isArray as M,cloneDeep as H,isString as B,omit as N}from"lodash-es";import{isDisable as j,setStyle as q,isDraggableItem as O,isDraggable as V,getGroupTree as R}from"./utils/index.js";import{uuidGenerator as I}from"../../../shared/utils/index.js";import{HelpCircleSharp as U}from"@vicons/ionicons5";const T={class:"main-wrapper"},K={class:"main-wrapper__table-header"},G=p("span",null,"数值越小,优先级越高",-1),L=["tabindex"],$={key:1,class:"main-wrapper__table-footer"};var z=e({__name:"FieldSet",props:{fields:{type:Array,default:()=>[]},footerFlag:{type:Boolean,default:!0},type:{type:String,default:"old"},isEdit:{type:Boolean,default:!1},showColumnNames:{type:Array},groupSetting:{type:Object},customColumns:{type:Array,default:()=>[]},showSeq:{type:Boolean,default:!1},showSearch:{type:Boolean,default:!1},showSortPriority:{type:Boolean,default:!1},showHeadFilter:{type:Boolean,default:!1},fieldShowMaxValue:{type:Number},rowDraggable:{type:Boolean,default:!0},fieldDescribeMode:{type:String,default:"tooltip"},developMode:{type:Boolean},columnWidthProps:{type:Object},showHideExpression:{type:Boolean},hideExpressionOption:{type:Array,default:()=>[]}},emits:["save","close","reset"],setup(e,{expose:z,emit:J}){const Q=e,X={sid:"id",columnName:"name",isShow:"show",isSort:"sort",isFixed:"fixedWay",colWidth:"columnWidth"};l();const Y=t(Date.now()),Z=t(""),ee=t(),le=t([]),te=[{title:"所有字段",type:"text",field:"title"},{title:"显示",type:"checkbox",checkedAll:!1,disabledAll:!!Q.fieldShowMaxValue,field:"show",fieldShowMaxValue:Q.fieldShowMaxValue},{title:"编辑",type:"checkbox",checkedAll:!1,disabledAll:!1,field:"editable"},{title:"必填",type:"checkbox",checkedAll:!1,disabledAll:!1,field:"required"},{title:"排序",type:"checkbox",checkedAll:!1,disabledAll:!1,field:"sort"},{title:"加粗",type:"checkbox",checkedAll:!1,disabledAll:!1,field:"bold"},{title:"默认排序",type:"select",field:"sortDirection"},{title:"排序优先级",type:"select",field:"sortPriority"},{title:"固定",type:"select",field:"fixedWay"},{title:"自定义标题",type:"input",field:"alias"},{title:"列宽",type:"inputNumber",field:"columnWidth"},{title:"表头筛选",type:"checkbox",isHeadCheckHide:!0,field:"isShowHeaderFilter"},{title:"脱敏配置",type:"select",field:"hideExpression"}],ie=t([]),oe=i((()=>le.value.flat())),de=i((()=>oe.value.some((e=>e.feildDescribe)))),ae=o({columns:ie,data:oe,onUpdateChecked:function({checked:e,column:l}){const t=!e||me(l.field);l.checkedAll=!t},draggable:Q.rowDraggable,isFieldSet:!0,fieldDescribeMode:Q.fieldDescribeMode,developMode:Q.developMode,columnWidthProps:Q.columnWidthProps,hideExpressionOption:Q.hideExpressionOption}),re={keyword:Z.value,idx:0,startIdx:0},se=()=>{J("save")},ne=()=>{J("close")};function ue(){le.value=ce(),he(),Y.value=Date.now(),J("reset")}function ce(){const e=H(Q.fields).map((e=>({...e,uuid:I()})));return Object.keys(X).forEach((l=>{e.forEach((e=>{"old"==Q.type&&Reflect.has(e,l)&&("isFixed"==l?e.fixedWay=1==e[l]?"LEFT":2==e[l]?"RIGHT":"NONE":["isShow","isSort"].includes(l)&&"boolean"!=typeof l?e[X[l]]=1==e[l]:e[X[l]]=e[l],Reflect.deleteProperty(e,l)),e.columnWidth=+e.columnWidth||null,Reflect.has(e,"alias")||(e.alias=""),Reflect.has(e,"bold")||(e.bold=!1),e.draggable=!!V(e)}))})),function(e){if(Q.groupSetting){return R(Q.groupSetting,e).reduce(((t,i)=>{const o=B(i)?e.find((e=>e.name===i)):l(i.children);return o&&t.push(o),t}),[])}return e;function l(t){const i=[];return t.forEach((t=>{if(t.children)i.push(...l(t.children));else{const l=e.find((e=>e.name===t));l&&i.push(l)}})),i}}(e)}function fe(){const e=re.keyword!==Z.value;let l=Z.value?oe.value.findIndex(((l,t)=>{var i;if(null==(i=l.title)?void 0:i.includes(Z.value))return!!e||t>re.idx})):0;-1!==l||e||(l=re.startIdx),ee.value.scrollTop=52*l,Object.assign(re,{keyword:Z.value,idx:l},e?{startIdx:l}:{})}function pe(e){var l;return!!Z.value&&(null==(l=e.title)?void 0:l.includes(Z.value))}function he(){var e,l;ie.value=H(te),(null==(e=Q.showColumnNames)?void 0:e.length)&&(ie.value=te.filter((e=>{var l,t;return"title"===e.field||(null==(t=null==(l=Q.showColumnNames)?void 0:l.includes)?void 0:t.call(l,e.field))}))),(null==(l=Q.customColumns)?void 0:l.length)&&ie.value.push(...Q.customColumns),"column"===Q.fieldDescribeMode&&de.value&&ie.value.push({title:"字段描述",type:"text",field:"feildDescribe"}),Q.showSeq&&ie.value.splice(1,0,{title:"排序",type:"text",field:"seq"}),ie.value.forEach((e=>{if(e.isShow=function(e){return!(["editable","required"].includes(e.field)&&!Q.isEdit||"sortPriority"===e.field&&!Q.showSortPriority||"isShowHeaderFilter"===e.field&&!Q.showHeadFilter||"hideExpression"===e.field&&!Q.showHideExpression)}(e),"checkbox"===e.type){const l=le.value.flat().every((l=>!Reflect.has(l,e.field)));e.checkedAll=!me(e.field)&&!l}}))}function me(e){return le.value.flat().some((l=>!j(l,e)&&!l[e]&&"0001"!=l.id))}function ye(e){return!!O(e.relatedContext.element)}return d([()=>Q.fields,()=>{var e;return null==(e=Q.showColumnNames)?void 0:e.length}],(([e,l])=>{e.length>0&&(le.value=ce(),he())}),{immediate:!0,deep:!0}),z({getTableFields:function(){let e=[];return e="old"==Q.type?oe.value.map(((e,l)=>({id:e.id,field:e.name,visible:e.show,sequence:l,sortable:e.sort,title:e.alias,fixed:e.fixedWay,minWidth:e.columnWidth,bold:e.bold,sortDirection:e.sortDirection,sortPriority:e.sortPriority,...Q.isEdit?{required:e.required,editable:e.editable}:{}}))):oe.value,e.map((e=>N(e,["uuid"])))}}),(l,t)=>(a(),r("div",T,[e.showSearch?(a(),s(n(A),{key:0,class:"main-wrapper__search-wrapper",value:Z.value,"onUpdate:value":t[0]||(t[0]=e=>Z.value=e),valueModifiers:{trim:!0},placeholder:"请输入字段标题",onKeydown:u(c(fe,["prevent"]),["enter"])},null,8,["value","onKeydown"])):f("v-if",!0),p("div",K,[(a(!0),r(h,null,m(ie.value,((l,t)=>(a(),r(h,{key:t},[l.isShow?(a(),r("span",{key:0,class:"table-cell",style:y(n(q)(l,t,e.columnWidthProps))},["checkbox"!==l.type||l.isHeadCheckHide?(a(),r(h,{key:1},[b(x(l.title),1)],64)):(a(),s(n(_),{key:0,checked:l.checkedAll,"onUpdate:checked":[e=>l.checkedAll=e,e=>{return t=e,i=l.field,void oe.value.forEach((e=>{j(e,i)||(e[i]=t)}));var t,i}],disabled:l.disabledAll},{default:v((()=>[b(x(l.title),1)])),_:2},1032,["checked","onUpdate:checked","disabled"])),"sortPriority"===l.field?(a(),s(n(E),{key:2,trigger:"hover"},{trigger:v((()=>[g(n(D),{component:n(U),style:{top:"2px"}},null,8,["component"])])),default:v((()=>[G])),_:1})):f("v-if",!0)],4)):f("v-if",!0)],64)))),128))]),p("div",{class:"main-wrapper__table-body",ref_key:"tableBodyRef",ref:ee},[(a(),s(n(P),{modelValue:le.value,"onUpdate:modelValue":t[1]||(t[1]=e=>le.value=e),animation:"150","item-key":"id",filter:".disabled",draggable:".item",move:ye,disabled:!e.rowDraggable,key:Y.value},{item:v((({element:e,index:l})=>[e.hide?f("v-if",!0):(a(),r("div",{key:0,class:k(["item",n(O)(e)?"":"disabled"]),tabindex:l},[n(M)(e)?(a(!0),r(h,{key:0},m(e,((e,t)=>(a(),s(F,w(ae,{key:t,element:e,idx:l+1,"is-highlight":pe(e)}),null,16,["element","idx","is-highlight"])))),128)):(a(),s(F,w({key:1},ae,{element:e,idx:l+1,"is-highlight":pe(e)}),null,16,["element","idx","is-highlight"]))],10,L))])),_:1},8,["modelValue","disabled"]))],512),e.footerFlag?(a(),r("div",$,[f(" 底部按钮插槽 "),S(l.$slots,"footer",{},(()=>[g(n(W),{onPositiveClick:ue},{trigger:v((()=>[g(n(C),{style:{"margin-right":"8px"}},{default:v((()=>[b("恢复默认设置")])),_:1})])),default:v((()=>[b(" 确认要恢复系统默认设置吗? ")])),_:1}),g(n(C),{style:{"margin-right":"8px"},onClick:ne},{default:v((()=>[b("取消")])),_:1}),g(n(C),{type:"primary",onClick:se},{default:v((()=>[b("保存")])),_:1})]))])):f("v-if",!0)]))}});export{z as default};
1
+ import{defineComponent as e,useAttrs as l,ref as t,computed as i,reactive as o,toRef as d,watch as a,openBlock as r,createElementBlock as s,createBlock as n,unref as u,withKeys as c,withModifiers as f,createCommentVNode as p,createElementVNode as h,Fragment as m,renderList as y,normalizeStyle as v,withCtx as b,createTextVNode as x,toDisplayString as g,createVNode as k,normalizeClass as w,mergeProps as S,renderSlot as A}from"vue";import{NInput as _,NCheckbox as E,NTooltip as D,NIcon as W,NPopconfirm as C,NButton as P}from"naive-ui";import F from"../../../shared/components/VueDraggable/src/vuedraggable.js";import M from"./components/table-row.vue.js";import{isArray as H,cloneDeep as B,isString as N,omit as j}from"lodash-es";import{isDisable as q,setStyle as O,isDraggableItem as V,isDraggable as R,getGroupTree as I}from"./utils/index.js";import{uuidGenerator as U}from"../../../shared/utils/index.js";import{HelpCircleSharp as T}from"@vicons/ionicons5";const K={class:"main-wrapper"},G={class:"main-wrapper__table-header"},L=h("span",null,"数值越小,优先级越高",-1),$=["tabindex"],z={key:1,class:"main-wrapper__table-footer"};var J=e({__name:"FieldSet",props:{fields:{type:Array,default:()=>[]},footerFlag:{type:Boolean,default:!0},type:{type:String,default:"old"},isEdit:{type:Boolean,default:!1},showColumnNames:{type:Array},groupSetting:{type:Object},customColumns:{type:Array,default:()=>[]},showSeq:{type:Boolean,default:!1},showSearch:{type:Boolean,default:!1},showSortPriority:{type:Boolean,default:!1},showHeadFilter:{type:Boolean,default:!1},fieldShowMaxValue:{type:Number},rowDraggable:{type:Boolean,default:!0},fieldDescribeMode:{type:String,default:"tooltip"},developMode:{type:Boolean},columnWidthProps:{type:Object},showHideExpression:{type:Boolean},hideExpressionOption:{type:Array,default:()=>[]}},emits:["save","close","reset"],setup(e,{expose:J,emit:Q}){const X=e,Y={sid:"id",columnName:"name",isShow:"show",isSort:"sort",isFixed:"fixedWay",colWidth:"columnWidth"};l();const Z=t(Date.now()),ee=t(""),le=t(),te=t([]),ie=[{title:"所有字段",type:"text",field:"title"},{title:"显示",type:"checkbox",checkedAll:!1,disabledAll:!!X.fieldShowMaxValue,field:"show",fieldShowMaxValue:X.fieldShowMaxValue},{title:"编辑",type:"checkbox",checkedAll:!1,disabledAll:!1,field:"editable"},{title:"必填",type:"checkbox",checkedAll:!1,disabledAll:!1,field:"required"},{title:"排序",type:"checkbox",checkedAll:!1,disabledAll:!1,field:"sort"},{title:"加粗",type:"checkbox",checkedAll:!1,disabledAll:!1,field:"bold"},{title:"默认排序",type:"select",field:"sortDirection"},{title:"排序优先级",type:"select",field:"sortPriority"},{title:"固定",type:"select",field:"fixedWay"},{title:"自定义标题",type:"input",field:"alias"},{title:"列宽",type:"inputNumber",field:"columnWidth"},{title:"表头筛选",type:"checkbox",isHeadCheckHide:!0,field:"isShowHeaderFilter"},{title:"脱敏配置",type:"select",field:"hideExpression"}],oe=t([]),de=i((()=>te.value.flat())),ae=i((()=>de.value.some((e=>e.feildDescribe)))),re=o({columns:oe,data:de,onUpdateChecked:function({checked:e,column:l}){const t=!e||ye(l.field);l.checkedAll=!t},draggable:X.rowDraggable,isFieldSet:!0,fieldDescribeMode:X.fieldDescribeMode,developMode:X.developMode,columnWidthProps:X.columnWidthProps,hideExpressionOption:d(X,"hideExpressionOption")}),se={keyword:ee.value,idx:0,startIdx:0},ne=()=>{Q("save")},ue=()=>{Q("close")};function ce(){te.value=fe(),me(),Z.value=Date.now(),Q("reset")}function fe(){const e=B(X.fields).map((e=>({...e,uuid:U()})));return Object.keys(Y).forEach((l=>{e.forEach((e=>{"old"==X.type&&Reflect.has(e,l)&&("isFixed"==l?e.fixedWay=1==e[l]?"LEFT":2==e[l]?"RIGHT":"NONE":["isShow","isSort"].includes(l)&&"boolean"!=typeof l?e[Y[l]]=1==e[l]:e[Y[l]]=e[l],Reflect.deleteProperty(e,l)),e.columnWidth=+e.columnWidth||null,Reflect.has(e,"alias")||(e.alias=""),Reflect.has(e,"bold")||(e.bold=!1),e.draggable=!!R(e)}))})),function(e){if(X.groupSetting){return I(X.groupSetting,e).reduce(((t,i)=>{const o=N(i)?e.find((e=>e.name===i)):l(i.children);return o&&t.push(o),t}),[])}return e;function l(t){const i=[];return t.forEach((t=>{if(t.children)i.push(...l(t.children));else{const l=e.find((e=>e.name===t));l&&i.push(l)}})),i}}(e)}function pe(){const e=se.keyword!==ee.value;let l=ee.value?de.value.findIndex(((l,t)=>{var i;if(null==(i=l.title)?void 0:i.includes(ee.value))return!!e||t>se.idx})):0;-1!==l||e||(l=se.startIdx),le.value.scrollTop=52*l,Object.assign(se,{keyword:ee.value,idx:l},e?{startIdx:l}:{})}function he(e){var l;return!!ee.value&&(null==(l=e.title)?void 0:l.includes(ee.value))}function me(){var e,l;oe.value=B(ie),(null==(e=X.showColumnNames)?void 0:e.length)&&(oe.value=ie.filter((e=>{var l,t;return"title"===e.field||(null==(t=null==(l=X.showColumnNames)?void 0:l.includes)?void 0:t.call(l,e.field))}))),(null==(l=X.customColumns)?void 0:l.length)&&oe.value.push(...X.customColumns),"column"===X.fieldDescribeMode&&ae.value&&oe.value.push({title:"字段描述",type:"text",field:"feildDescribe"}),X.showSeq&&oe.value.splice(1,0,{title:"排序",type:"text",field:"seq"}),oe.value.forEach((e=>{if(e.isShow=function(e){return!(["editable","required"].includes(e.field)&&!X.isEdit||"sortPriority"===e.field&&!X.showSortPriority||"isShowHeaderFilter"===e.field&&!X.showHeadFilter||"hideExpression"===e.field&&!X.showHideExpression)}(e),"checkbox"===e.type){const l=te.value.flat().every((l=>!Reflect.has(l,e.field)));e.checkedAll=!ye(e.field)&&!l}}))}function ye(e){return te.value.flat().some((l=>!q(l,e)&&!l[e]&&"0001"!=l.id))}function ve(e){return!!V(e.relatedContext.element)}return a([()=>X.fields,()=>{var e;return null==(e=X.showColumnNames)?void 0:e.length}],(([e,l])=>{e.length>0&&(te.value=fe(),me())}),{immediate:!0,deep:!0}),J({getTableFields:function(){let e=[];return e="old"==X.type?de.value.map(((e,l)=>({id:e.id,field:e.name,visible:e.show,sequence:l,sortable:e.sort,title:e.alias,fixed:e.fixedWay,minWidth:e.columnWidth,bold:e.bold,sortDirection:e.sortDirection,sortPriority:e.sortPriority,...X.isEdit?{required:e.required,editable:e.editable}:{}}))):de.value,e.map((e=>j(e,["uuid"])))}}),(l,t)=>(r(),s("div",K,[e.showSearch?(r(),n(u(_),{key:0,class:"main-wrapper__search-wrapper",value:ee.value,"onUpdate:value":t[0]||(t[0]=e=>ee.value=e),valueModifiers:{trim:!0},placeholder:"请输入字段标题",onKeydown:c(f(pe,["prevent"]),["enter"])},null,8,["value","onKeydown"])):p("v-if",!0),h("div",G,[(r(!0),s(m,null,y(oe.value,((l,t)=>(r(),s(m,{key:t},[l.isShow?(r(),s("span",{key:0,class:"table-cell",style:v(u(O)(l,t,e.columnWidthProps))},["checkbox"!==l.type||l.isHeadCheckHide?(r(),s(m,{key:1},[x(g(l.title),1)],64)):(r(),n(u(E),{key:0,checked:l.checkedAll,"onUpdate:checked":[e=>l.checkedAll=e,e=>{return t=e,i=l.field,void de.value.forEach((e=>{q(e,i)||(e[i]=t)}));var t,i}],disabled:l.disabledAll},{default:b((()=>[x(g(l.title),1)])),_:2},1032,["checked","onUpdate:checked","disabled"])),"sortPriority"===l.field?(r(),n(u(D),{key:2,trigger:"hover"},{trigger:b((()=>[k(u(W),{component:u(T),style:{top:"2px"}},null,8,["component"])])),default:b((()=>[L])),_:1})):p("v-if",!0)],4)):p("v-if",!0)],64)))),128))]),h("div",{class:"main-wrapper__table-body",ref_key:"tableBodyRef",ref:le},[(r(),n(u(F),{modelValue:te.value,"onUpdate:modelValue":t[1]||(t[1]=e=>te.value=e),animation:"150","item-key":"id",filter:".disabled",draggable:".item",move:ve,disabled:!e.rowDraggable,key:Z.value},{item:b((({element:e,index:l})=>[e.hide?p("v-if",!0):(r(),s("div",{key:0,class:w(["item",u(V)(e)?"":"disabled"]),tabindex:l},[u(H)(e)?(r(!0),s(m,{key:0},y(e,((e,t)=>(r(),n(M,S(re,{key:t,element:e,idx:l+1,"is-highlight":he(e)}),null,16,["element","idx","is-highlight"])))),128)):(r(),n(M,S({key:1},re,{element:e,idx:l+1,"is-highlight":he(e)}),null,16,["element","idx","is-highlight"]))],10,$))])),_:1},8,["modelValue","disabled"]))],512),e.footerFlag?(r(),s("div",z,[p(" 底部按钮插槽 "),A(l.$slots,"footer",{},(()=>[k(u(C),{onPositiveClick:ce},{trigger:b((()=>[k(u(P),{style:{"margin-right":"8px"}},{default:b((()=>[x("恢复默认设置")])),_:1})])),default:b((()=>[x(" 确认要恢复系统默认设置吗? ")])),_:1}),k(u(P),{style:{"margin-right":"8px"},onClick:ue},{default:b((()=>[x("取消")])),_:1}),k(u(P),{type:"primary",onClick:ne},{default:b((()=>[x("保存")])),_:1})]))])):p("v-if",!0)]))}});export{J as default};
@@ -1 +1 @@
1
- import{defineComponent as e,ref as t,computed as o,watch as a,openBlock as s,createBlock as i,unref as n,withCtx as r,withDirectives as l,createElementVNode as c,createVNode as m,createElementBlock as p,Fragment as d,renderList as u,toDisplayString as f,vShow as h,normalizeStyle as y,createCommentVNode as g,createTextVNode as v}from"vue";import{NModal as w,NImageGroup as b,NImage as k,NInput as M,NIcon as T,NTooltip as _}from"naive-ui";import{SearchOutline as I,DownloadOutline as S}from"@vicons/ionicons5";import{searchChatRecordApi as x}from"../api/index.js";import{useTheme as j}from"../../../../shared/hooks/useTheme.js";import{useDebounceFn as A}from"@vueuse/core";import{format as H,isSameWeek as D,isSameMonth as C}from"date-fns";import{last as O}from"lodash-es";import"@vue/shared";import"../../../../shared/utils/index.js";import"@vueuse/shared";import"../../../../shared/hooks/selectHooks/useSearchContent.js";import{useScrollLoading as z}from"../../../../shared/hooks/useScrollLoading.js";import{useState as L}from"../hooks/useState.js";import{getFileSize as U,downloadFile as E}from"../utils/index.js";import"trtc-sdk-v5";const $={class:"label"},F={class:"image-box"},P={class:"file-type"},R={class:"text"},B={class:"name"},G={class:"detail"},N={class:"opt-box"};var q=e({__name:"ChatFile",props:{type:{type:String,default:"image"},visible:{type:Boolean}},setup(e){const q=e,J=j(),{state:K}=L(),Q=t([]),V=t([]),W=t(),X=t(),Y=t(),Z=A(oe,500),ee={page:0,hasMore:!0,lastSendTime:H(new Date,"yyyy-MM-dd HH:mm:ss")};async function te(){var e;try{if(!ee.hasMore)return;ee.page++;const t=await x({orgId:K.orgId,keyword:Y.value,endTime:"",startTime:"",lastSendTime:ee.lastSendTime,memberIdSet:[],page:ee.page,recordType:"image"===q.type?"IMAGE":"FILE",receiver:K.currentSessionItem.receiver,userId:K.userInfo.id});Array.isArray(t)&&0!==t.length&&Array.isArray(t[0].recordList)||(ee.hasMore=!1,console.log("接口返回不是一个数组,或者没有更多消息了"));let o=t||[];if(Array.isArray(t)&&t.length>0&&(o=t[0].recordList),ee.lastSendTime=null==(e=O(o))?void 0:e.sendTime,"image"===q.type){const e=function(e){const t={};e.forEach((e=>{const o=new Date(e.sendTime);let a=H(o,"yyyy年MM月");D(o,new Date)?a="本周":C(o,new Date)&&(a="本月"),t[a]||(t[a]=[]),t[a].push(e.content.msg)}));return Object.entries(t).map((([e,t])=>({label:e,list:t})))}(o);Q.value=ee.page>1?Q.value.concat(e):e}else{const e=o.map((e=>new Promise((async t=>{const o=await U(e.content.fileUrl);t({...e,size:o})})))),t=await Promise.all(e);V.value=ee.page>1?V.value.concat(t):t}}catch(e){console.log(e)}}function oe(){Object.assign(ee,{page:0,hasMore:!0,lastSendTime:H(new Date,"yyyy-MM-dd HH:mm:ss")}),te()}z(W,(()=>{te()})),z(X,(()=>{te()}));const ae=o((()=>"image"===q.type?"聊天图片":"聊天文件"));function se(e){const{size:t,sendTime:o,senderName:a}=e;return`${t} · ${H(new Date(o),"yyyy/MM/dd HH:mm")} ${a}`}function ie(e){var t;const o=(null==(t=e.content)?void 0:t.msg)||"",a=o.lastIndexOf(".");if(-1!==a){return o.charAt(a+1).toUpperCase()}return"?"}return a((()=>q.visible),(e=>{e?oe():Y.value=""})),(t,o)=>(s(),i(n(w),{preset:"dialog",title:n(ae),"show-icon":!1,"auto-focus":!1,class:"iho-chat-dialog"},{default:r((()=>[l(c("div",{class:"iho-chat-dialog__content iho-chat-image-wrapper",ref_key:"imageRef",ref:W},[m(n(b),{"show-toolbar-tooltip":""},{default:r((()=>[(s(!0),p(d,null,u(Q.value,(e=>(s(),p("div",{class:"image-item",key:e.label},[c("span",$,f(e.label),1),c("div",F,[(s(!0),p(d,null,u(e.list,(e=>(s(),i(n(k),{key:e,width:"80",height:"80",src:e},null,8,["src"])))),128))])])))),128))])),_:1})],512),[[h,"image"===e.type]]),l(c("div",{class:"iho-chat-dialog__content iho-chat-file-wrapper",style:y(n(J))},[m(n(M),{clearable:"",placeholder:"搜索文件",value:Y.value,"onUpdate:value":o[0]||(o[0]=e=>Y.value=e),valueModifiers:{trim:!0},onInput:n(Z)},{prefix:r((()=>[m(n(T),{component:n(I)},null,8,["component"])])),_:1},8,["value","onInput"]),c("div",{class:"file-list-box",ref_key:"fileRef",ref:X},[(s(!0),p(d,null,u(V.value,((e,t)=>(s(),p("div",{class:"file-item",key:t},[c("span",P,f(ie(e)),1),c("div",R,[c("span",B,f(e.content.msg),1),c("span",G,f(se(e)),1)]),c("div",N,[g(' <n-tooltip :show-arrow="false">\r\n\t\t\t\t\t\t\t<template #trigger>\r\n\t\t\t\t\t\t\t\t<n-icon :size="16" :component="OpenOutline" />\r\n\t\t\t\t\t\t\t</template>\r\n\t\t\t\t\t\t\t转发\r\n\t\t\t\t\t\t</n-tooltip> '),m(n(_),{"show-arrow":!1},{trigger:r((()=>[m(n(T),{size:16,component:n(S),onClick:()=>n(E)(e.content.fileUr,e.content.msg)},null,8,["component","onClick"])])),default:r((()=>[v(" 下载 ")])),_:2},1024)])])))),128))],512)],4),[[h,"image"!==e.type]])])),_:1},8,["title"]))}});export{q as default};
1
+ import{defineComponent as e,ref as t,computed as o,watch as a,openBlock as s,createBlock as i,unref as n,withCtx as r,withDirectives as l,createElementVNode as c,createVNode as m,createElementBlock as p,Fragment as d,renderList as u,toDisplayString as f,vShow as h,normalizeStyle as y,createCommentVNode as g,createTextVNode as v}from"vue";import{NModal as w,NImageGroup as b,NImage as k,NInput as M,NIcon as T,NTooltip as _}from"naive-ui";import{SearchOutline as I,DownloadOutline as S}from"@vicons/ionicons5";import{searchChatRecordApi as x}from"../api/index.js";import{useTheme as j}from"../../../../shared/hooks/useTheme.js";import{useDebounceFn as A}from"@vueuse/core";import{format as H,isSameWeek as D,isSameMonth as C}from"date-fns";import{last as O}from"lodash-es";import"@vue/shared";import"../../../../shared/utils/index.js";import"@vueuse/shared";import"../../../../shared/hooks/selectHooks/useSearchContent.js";import{useScrollLoading as z}from"../../../../shared/hooks/useScrollLoading.js";import{useState as L}from"../hooks/useState.js";import{getFileSize as U,downloadFile as E}from"../utils/index.js";import"trtc-sdk-v5";const $={class:"label"},F={class:"image-box"},P={class:"file-type"},R={class:"text"},B={class:"name"},G={class:"detail"},N={class:"opt-box"};var q=e({__name:"ChatFile",props:{type:{type:String,default:"image"},visible:{type:Boolean}},setup(e){const q=e,J=j(),{state:K}=L(),Q=t([]),V=t([]),W=t(),X=t(),Y=t(),Z=A(oe,500),ee={page:0,hasMore:!0,lastSendTime:H(new Date,"yyyy-MM-dd HH:mm:ss")};async function te(){var e;try{if(!ee.hasMore)return;ee.page++;const t=await x({orgId:K.orgId,keyword:Y.value,endTime:"",startTime:"",lastSendTime:ee.lastSendTime,memberIdSet:[],page:ee.page,recordType:"image"===q.type?"IMAGE":"FILE",receiver:K.currentSessionItem.receiver,userId:K.userInfo.id});Array.isArray(t)&&0!==t.length&&Array.isArray(t[0].recordList)||(ee.hasMore=!1,console.log("接口返回不是一个数组,或者没有更多消息了"));let o=t||[];if(Array.isArray(t)&&t.length>0&&(o=t[0].recordList),ee.lastSendTime=null==(e=O(o))?void 0:e.sendTime,"image"===q.type){const e=function(e){const t={};e.forEach((e=>{const o=new Date(e.sendTime);let a=H(o,"yyyy年MM月");D(o,new Date)?a="本周":C(o,new Date)&&(a="本月"),t[a]||(t[a]=[]),t[a].push(e.content.msg)}));return Object.entries(t).map((([e,t])=>({label:e,list:t})))}(o);Q.value=ee.page>1?Q.value.concat(e):e}else{const e=o.map((e=>new Promise((async t=>{const o=await U(e.content.fileUrl);t({...e,size:o})})))),t=await Promise.all(e);V.value=ee.page>1?V.value.concat(t):t}}catch(e){console.log(e)}}function oe(){Object.assign(ee,{page:0,hasMore:!0,lastSendTime:H(new Date,"yyyy-MM-dd HH:mm:ss")}),te()}z(W,(()=>{te()})),z(X,(()=>{te()}));const ae=o((()=>"image"===q.type?"聊天图片":"聊天文件"));function se(e){const{size:t,sendTime:o,senderName:a}=e;return`${t} · ${H(new Date(o),"yyyy/MM/dd HH:mm")} ${a}`}function ie(e){var t;const o=(null==(t=e.content)?void 0:t.msg)||"",a=o.lastIndexOf(".");if(-1!==a){return o.charAt(a+1).toUpperCase()}return"?"}return a((()=>q.visible),(e=>{e?oe():Y.value=""})),(t,o)=>(s(),i(n(w),{preset:"dialog",title:n(ae),"show-icon":!1,"auto-focus":!1,class:"iho-chat-dialog"},{default:r((()=>[l(c("div",{class:"iho-chat-dialog__content iho-chat-image-wrapper",ref_key:"imageRef",ref:W},[m(n(b),{"show-toolbar-tooltip":""},{default:r((()=>[(s(!0),p(d,null,u(Q.value,(e=>(s(),p("div",{class:"image-item",key:e.label},[c("span",$,f(e.label),1),c("div",F,[(s(!0),p(d,null,u(e.list,(e=>(s(),i(n(k),{key:e,width:"80",height:"80",src:e},null,8,["src"])))),128))])])))),128))])),_:1})],512),[[h,"image"===e.type]]),l(c("div",{class:"iho-chat-dialog__content iho-chat-file-wrapper",style:y(n(J))},[m(n(M),{clearable:"",placeholder:"搜索文件",value:Y.value,"onUpdate:value":o[0]||(o[0]=e=>Y.value=e),valueModifiers:{trim:!0},onInput:n(Z)},{prefix:r((()=>[m(n(T),{component:n(I)},null,8,["component"])])),_:1},8,["value","onInput"]),c("div",{class:"file-list-box",ref_key:"fileRef",ref:X},[(s(!0),p(d,null,u(V.value,((e,t)=>(s(),p("div",{class:"file-item",key:t},[c("span",P,f(ie(e)),1),c("div",R,[c("span",B,f(e.content.msg),1),c("span",G,f(se(e)),1)]),c("div",N,[g(' <n-tooltip :show-arrow="false">\n\t\t\t\t\t\t\t<template #trigger>\n\t\t\t\t\t\t\t\t<n-icon :size="16" :component="OpenOutline" />\n\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\t转发\n\t\t\t\t\t\t</n-tooltip> '),m(n(_),{"show-arrow":!1},{trigger:r((()=>[m(n(T),{size:16,component:n(S),onClick:()=>n(E)(e.content.fileUr,e.content.msg)},null,8,["component","onClick"])])),default:r((()=>[v(" 下载 ")])),_:2},1024)])])))),128))],512)],4),[[h,"image"!==e.type]])])),_:1},8,["title"]))}});export{q as default};
@@ -1 +1 @@
1
- import{defineComponent as e,ref as t,computed as n,watch as s,openBlock as o,createElementBlock as i,normalizeClass as r,unref as a,normalizeStyle as c,createVNode as l,withCtx as u,Fragment as m,renderList as p,toDisplayString as d,createCommentVNode as g,createBlock as f,createElementVNode as v,withModifiers as y,nextTick as h}from"vue";import{NImageGroup as T,NAvatar as M,NImage as k,NIcon as _,NSpace as x,NButtonGroup as w,NButton as I,NTooltip as S}from"naive-ui";import{format as C}from"date-fns";import{getHistoryRecordApi as j,readMessageApi as L}from"../api/index.js";import{useState as E}from"../hooks/useState.js";import{useSession as b}from"../hooks/useSession.js";import{MESSAGE_TYPE as z}from"../constants/index.js";import"trtc-sdk-v5";import{isAudioOrVideoMessage as A,simplifyMessage as H,getAVTime as O,downloadFile as D}from"../utils/index.js";import{first as R,last as N}from"lodash-es";import P from"./PersonProfile.vue.js";import q from"./MessageTemplate.vue.js";import{emojis as B}from"../utils/emoji.js";import J from"./ContextMenu.js";import"../../../../shared/utils/index.js";import"@vueuse/core";import"@vue/shared";import"@vueuse/shared";import"../../../../shared/hooks/selectHooks/useSearchContent.js";import{CallOutline as U,VideocamOutline as F,DocumentSharp as G,ChatbubbleEllipsesOutline as K,EllipsisHorizontal as X,ArrowDownSharp as Y}from"@vicons/ionicons5";import{useScrollLoading as $}from"../../../../shared/hooks/useScrollLoading.js";const Q={key:0,class:"time"},V={key:2,class:"message-box"},W={key:0,class:"content-box"},Z={class:"name-box"},ee=["data-time"],te=["onContextmenu"],ne={key:0,class:"reference-content"},se=["innerHTML"],oe=["src"],ie=["innerHTML"],re=["innerHTML"],ae={style:{"margin-left":"8px"}},ce={class:"size"};var le=e({__name:"ChatMain",setup(e){const le=t(),{state:ue,setMsgList:me}=E(),{setCurrentSessionItem:pe,isGroupChat:de}=b(ue),ge=t(),fe=t(!1),ve=t({left:0,top:0}),ye=t(),he={page:0,hasMore:!0,lastSendTime:C(new Date,"yyyy-MM-dd HH:mm:ss")},Te=n((()=>({"--c-tip-top":de.value?"1px":"-20px","--c-tip-gap":de.value?"10px":"0px"})));function Me({nodes:e}){var t,n;const{_ctx:s}=null==(t=e.download)?void 0:t.children,o=s?null==(n=null==s?void 0:s.proxy)?void 0:n.previewSrc:"";return[e.prev,e.next,e.rotateCounterclockwise,e.rotateClockwise,e.resizeToOriginalSize,e.zoomOut,e.zoomIn,l(S,null,{trigger:()=>l(_,{style:"cursor: pointer",color:"rgba(255, 255, 255, 0.75",size:24,component:Y,onClick:()=>o&&D(o,"img")},null),default:()=>"下载"}),e.close]}async function ke(){try{if(!he.hasMore)return;he.page++;const e=await j({sessionKey:ue.currentSessionItem.sessionKey,page:he.page,lastSendTime:he.lastSendTime});if(!Array.isArray(e)||0===e.length)return he.hasMore=!1,console.log("接口返回不是一个数组,或者没有更多消息了");const t=R(e).id;he.lastSendTime=N(e).sendTime,me(he.page>1?[...e,...ue.msgList]:e),1===he.page&&ue.currentSessionItem.unreadNum&&(await L({chatType:ue.currentSessionItem.chatType,messageIdSet:[t],receiver:ue.userInfo.id,sender:ue.currentSessionItem.receiver}),pe({unreadNum:0}))}catch(e){console.log(e)}}async function _e(e,t){ye.value=t,async function(e){var t,n,s,o,i,r;fe.value=!0,await h();const{clientX:a,clientY:c}=e,{width:l=0,height:u=0,left:m=0,top:p=0}=(null==(t=le.value)?void 0:t.getBoundingClientRect())||{},d=null!=(o=null==(s=null==(n=ge.value)?void 0:n.$el)?void 0:s.getBoundingClientRect().height)?o:220,g=null!=(r=null==(i=le.value)?void 0:i.scrollTop)?r:0,f=5,v={};a<=m+l/2?v.left=a-m+f+"px":v.right=m+l-a-f+"px";c-p<d/2?v.top=g+f+"px":p+u-c<=d/2?v.bottom=Math.abs(g)+f+"px":v.top=g+c-p-d/2+"px";ve.value=v}(e)}function xe(e){const{chatMessageType:t,messageTemplate:n}=e.content;return t!==z.TEMPLATE||!!n}function we(e){const{chatMessageType:t,msg:n=""}=e.content;if(t===z.BLEND){const e=n.match(/<img[^>]*>/gi);return!e||!e.length}return t&&[z.TEXT,z.EMOJI].includes(t)}function Ie(e){const{chatMessageType:t,msg:n=""}=e.content,s=n.match(/<img[^>]*>/gi);return t===z.BLEND&&s&&s.length}function Se(e,t){var n,s;const{chatMessageType:o,messageTemplate:i}=e.content;if(o===z.TEMPLATE)return"system"===t?2==(null==(n=null==i?void 0:i.setting)?void 0:n.style.id):2!=(null==(s=null==i?void 0:i.setting)?void 0:s.style.id)}function Ce(e){var t,n;const{chatMessageType:s,messageTemplate:o}=e;return s===z.TEMPLATE&&3==(null==(n=null==(t=null==o?void 0:o.setting)?void 0:t.style)?void 0:n.id)}function je(e,t){var n;const s=new Date(e.sendTime).getTime(),o=null==(n=ue.msgList[t+1])?void 0:n.sendTime;if(o){return s-new Date(o).getTime()>3e5}return!0}function Le(e){ue.currentReferenceMsg=e,ue.currentReferenceMsg.content.referenceContent=null,Object.assign(ue.currentReferenceMsg,{chatType:ue.currentSessionItem.chatType,receiver:ue.currentSessionItem.receiver,receiverAvatar:ue.currentSessionItem.avatar,receiverName:ue.currentSessionItem.name})}function Ee(e,t){"reply"===e&&Le(t)}return $(le,(()=>{ke()}),"top",(()=>{fe.value=!1})),s((()=>ue.id),(e=>{e&&(ue.currentReferenceMsg=null,Object.assign(he,{page:0,hasMore:!0,lastSendTime:C(new Date,"yyyy-MM-dd HH:mm:ss")}),ke())}),{immediate:!0}),s((()=>ue.isAppendMsg),(e=>{e&&(me([...ue.msgList,ue.currentMsg]),async function(){var e,t,n;await h();const s=null!=(t=null==(e=le.value)?void 0:e.scrollHeight)?t:0;null==(n=le.value)||n.scrollTo({top:s,behavior:"auto"})}(),ue.isAppendMsg=!1)}),{immediate:!0}),(e,t)=>(o(),i("div",{class:r(["chat-main",{"home-bg":!a(ue).id}]),ref_key:"chatMainRef",ref:le,style:c(a(Te))},[l(a(T),{"show-toolbar-tooltip":"","render-toolbar":Me},{default:u((()=>[(o(!0),i(m,null,p(a(ue).msgList,((e,t)=>(o(),i(m,{key:e.id},[xe(e)?(o(),i("div",{key:0,class:r(["message-item",{"message-item--mine":e.sender==a(ue).userInfo.id}])},[je(e,t)?(o(),i("p",Q,d(e.__sendTime),1)):g("v-if",!0),Se(e,"system")?(o(),f(q,{key:1,data:e},null,8,["data"])):(o(),i("div",V,[l(P,{"user-id":e.sender,placement:e.sender==a(ue).userInfo.id?"left":"right"},{trigger:u((()=>[l(a(M),{round:"",size:38,src:e.senderAvatar},null,8,["src"])])),_:2},1032,["user-id","placement"]),e.content?(o(),i("div",W,[v("div",Z,[v("span",{class:"name","data-time":e.__time},d(a(de)?e.senderName:""),9,ee)]),v("div",{class:r(["content",{emoji:e.content.chatMessageType===a(z).EMOJI,template:e.content.chatMessageType===a(z).TEMPLATE,"template--3":Ce(e.content),"audio-video":a(A)(e.content),file:e.content.chatMessageType===a(z).FILE}]),onContextmenu:y((t=>_e(t,e.id)),["prevent"])},[we(e)?(o(),i(m,{key:0},[e.content.referenceContent?(o(),i("div",ne,[v("span",null,d(e.content.referenceContent.senderName)+":",1),v("pre",{innerHTML:a(H)(e.content.referenceContent.content)},null,8,se)])):g("v-if",!0),e.content.chatMessageType===a(z).EMOJI?(o(),i("img",{key:1,class:r([e.content.referenceContent?"emoji--min":"emoji--big"]),src:a(B).findEmoji(e.__content)},null,10,oe)):(o(),i("pre",{key:2,innerHTML:e.__content},null,8,ie))],64)):g("v-if",!0),Ie(e)?(o(),i("pre",{key:1,innerHTML:e.__content},null,8,re)):g("v-if",!0),Se(e,"template")?(o(),f(q,{key:2,data:e},null,8,["data"])):g("v-if",!0),e.content.chatMessageType===a(z).IMAGE?(o(),f(a(k),{key:3,width:"240",src:e.__content},null,8,["src"])):g("v-if",!0),a(A)(e.content)?(o(),i(m,{key:4},[l(a(_),{class:r({"is-audio":e.content.chatMessageType===a(z).AUDIO}),component:e.content.chatMessageType===a(z).AUDIO?a(U):a(F)},null,8,["class","component"]),v("span",ae,d(a(O)(e.__content)),1)],64)):g("v-if",!0),e.content.chatMessageType===a(z).FILE?(o(),f(a(x),{key:5,"wrap-item":!1},{default:u((()=>[l(a(_),{class:"icon-file",size:"40",component:a(G)},null,8,["component"]),l(a(x),{"wrap-item":!1,vertical:"",justify:"space-between",style:{"row-gap":"0"}},{default:u((()=>[v("span",null,d(e.__content),1),v("span",ce,d(e.__size),1)])),_:2},1024)])),_:2},1024)):g("v-if",!0),l(a(w),{class:"quick-menu"},{default:u((()=>[a(A)(e.content)?g("v-if",!0):(o(),i(m,{key:0},[g(' <n-button quaternary size="tiny">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<template #icon>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<i class="chat--iconfont chat--icon-face" />\r\n\t\t\t\t\t\t\t\t\t\t\t\t</template>\r\n\t\t\t\t\t\t\t\t\t\t\t</n-button> '),l(a(I),{quaternary:"",size:"tiny",onClick:()=>Le(e)},{icon:u((()=>[l(a(_),{size:"17",component:a(K)},null,8,["component"])])),_:2},1032,["onClick"])],64)),l(a(I),{quaternary:"",size:"tiny",onClick:t=>_e(t,e.id)},{icon:u((()=>[l(a(_),{size:"14",component:a(X)},null,8,["component"])])),_:2},1032,["onClick"])])),_:2},1024)],42,te)])):g("v-if",!0)]))],2)):g("v-if",!0)],64)))),128))])),_:1}),l(a(J),{ref_key:"contextmenuRef",ref:ge,show:fe.value,"onUpdate:show":t[0]||(t[0]=e=>fe.value=e),position:ve.value,"msg-id":ye.value,onSelect:Ee},null,8,["show","position","msg-id"])],6))}});export{le as default};
1
+ import{defineComponent as e,ref as t,computed as n,watch as s,openBlock as o,createElementBlock as i,normalizeClass as r,unref as a,normalizeStyle as c,createVNode as l,withCtx as u,Fragment as m,renderList as p,toDisplayString as d,createCommentVNode as g,createBlock as f,createElementVNode as v,withModifiers as y,nextTick as h}from"vue";import{NImageGroup as T,NAvatar as M,NImage as k,NIcon as _,NSpace as x,NButtonGroup as w,NButton as I,NTooltip as S}from"naive-ui";import{format as C}from"date-fns";import{getHistoryRecordApi as j,readMessageApi as L}from"../api/index.js";import{useState as E}from"../hooks/useState.js";import{useSession as b}from"../hooks/useSession.js";import{MESSAGE_TYPE as z}from"../constants/index.js";import"trtc-sdk-v5";import{isAudioOrVideoMessage as A,simplifyMessage as H,getAVTime as O,downloadFile as D}from"../utils/index.js";import{first as R,last as N}from"lodash-es";import P from"./PersonProfile.vue.js";import q from"./MessageTemplate.vue.js";import{emojis as B}from"../utils/emoji.js";import J from"./ContextMenu.js";import"../../../../shared/utils/index.js";import"@vueuse/core";import"@vue/shared";import"@vueuse/shared";import"../../../../shared/hooks/selectHooks/useSearchContent.js";import{CallOutline as U,VideocamOutline as F,DocumentSharp as G,ChatbubbleEllipsesOutline as K,EllipsisHorizontal as X,ArrowDownSharp as Y}from"@vicons/ionicons5";import{useScrollLoading as $}from"../../../../shared/hooks/useScrollLoading.js";const Q={key:0,class:"time"},V={key:2,class:"message-box"},W={key:0,class:"content-box"},Z={class:"name-box"},ee=["data-time"],te=["onContextmenu"],ne={key:0,class:"reference-content"},se=["innerHTML"],oe=["src"],ie=["innerHTML"],re=["innerHTML"],ae={style:{"margin-left":"8px"}},ce={class:"size"};var le=e({__name:"ChatMain",setup(e){const le=t(),{state:ue,setMsgList:me}=E(),{setCurrentSessionItem:pe,isGroupChat:de}=b(ue),ge=t(),fe=t(!1),ve=t({left:0,top:0}),ye=t(),he={page:0,hasMore:!0,lastSendTime:C(new Date,"yyyy-MM-dd HH:mm:ss")},Te=n((()=>({"--c-tip-top":de.value?"1px":"-20px","--c-tip-gap":de.value?"10px":"0px"})));function Me({nodes:e}){var t,n;const{_ctx:s}=null==(t=e.download)?void 0:t.children,o=s?null==(n=null==s?void 0:s.proxy)?void 0:n.previewSrc:"";return[e.prev,e.next,e.rotateCounterclockwise,e.rotateClockwise,e.resizeToOriginalSize,e.zoomOut,e.zoomIn,l(S,null,{trigger:()=>l(_,{style:"cursor: pointer",color:"rgba(255, 255, 255, 0.75",size:24,component:Y,onClick:()=>o&&D(o,"img")},null),default:()=>"下载"}),e.close]}async function ke(){try{if(!he.hasMore)return;he.page++;const e=await j({sessionKey:ue.currentSessionItem.sessionKey,page:he.page,lastSendTime:he.lastSendTime});if(!Array.isArray(e)||0===e.length)return he.hasMore=!1,console.log("接口返回不是一个数组,或者没有更多消息了");const t=R(e).id;he.lastSendTime=N(e).sendTime,me(he.page>1?[...e,...ue.msgList]:e),1===he.page&&ue.currentSessionItem.unreadNum&&(await L({chatType:ue.currentSessionItem.chatType,messageIdSet:[t],receiver:ue.userInfo.id,sender:ue.currentSessionItem.receiver}),pe({unreadNum:0}))}catch(e){console.log(e)}}async function _e(e,t){ye.value=t,async function(e){var t,n,s,o,i,r;fe.value=!0,await h();const{clientX:a,clientY:c}=e,{width:l=0,height:u=0,left:m=0,top:p=0}=(null==(t=le.value)?void 0:t.getBoundingClientRect())||{},d=null!=(o=null==(s=null==(n=ge.value)?void 0:n.$el)?void 0:s.getBoundingClientRect().height)?o:220,g=null!=(r=null==(i=le.value)?void 0:i.scrollTop)?r:0,f=5,v={};a<=m+l/2?v.left=a-m+f+"px":v.right=m+l-a-f+"px";c-p<d/2?v.top=g+f+"px":p+u-c<=d/2?v.bottom=Math.abs(g)+f+"px":v.top=g+c-p-d/2+"px";ve.value=v}(e)}function xe(e){const{chatMessageType:t,messageTemplate:n}=e.content;return t!==z.TEMPLATE||!!n}function we(e){const{chatMessageType:t,msg:n=""}=e.content;if(t===z.BLEND){const e=n.match(/<img[^>]*>/gi);return!e||!e.length}return t&&[z.TEXT,z.EMOJI].includes(t)}function Ie(e){const{chatMessageType:t,msg:n=""}=e.content,s=n.match(/<img[^>]*>/gi);return t===z.BLEND&&s&&s.length}function Se(e,t){var n,s;const{chatMessageType:o,messageTemplate:i}=e.content;if(o===z.TEMPLATE)return"system"===t?2==(null==(n=null==i?void 0:i.setting)?void 0:n.style.id):2!=(null==(s=null==i?void 0:i.setting)?void 0:s.style.id)}function Ce(e){var t,n;const{chatMessageType:s,messageTemplate:o}=e;return s===z.TEMPLATE&&3==(null==(n=null==(t=null==o?void 0:o.setting)?void 0:t.style)?void 0:n.id)}function je(e,t){var n;const s=new Date(e.sendTime).getTime(),o=null==(n=ue.msgList[t+1])?void 0:n.sendTime;if(o){return s-new Date(o).getTime()>3e5}return!0}function Le(e){ue.currentReferenceMsg=e,ue.currentReferenceMsg.content.referenceContent=null,Object.assign(ue.currentReferenceMsg,{chatType:ue.currentSessionItem.chatType,receiver:ue.currentSessionItem.receiver,receiverAvatar:ue.currentSessionItem.avatar,receiverName:ue.currentSessionItem.name})}function Ee(e,t){"reply"===e&&Le(t)}return $(le,(()=>{ke()}),"top",(()=>{fe.value=!1})),s((()=>ue.id),(e=>{e&&(ue.currentReferenceMsg=null,Object.assign(he,{page:0,hasMore:!0,lastSendTime:C(new Date,"yyyy-MM-dd HH:mm:ss")}),ke())}),{immediate:!0}),s((()=>ue.isAppendMsg),(e=>{e&&(me([...ue.msgList,ue.currentMsg]),async function(){var e,t,n;await h();const s=null!=(t=null==(e=le.value)?void 0:e.scrollHeight)?t:0;null==(n=le.value)||n.scrollTo({top:s,behavior:"auto"})}(),ue.isAppendMsg=!1)}),{immediate:!0}),(e,t)=>(o(),i("div",{class:r(["chat-main",{"home-bg":!a(ue).id}]),ref_key:"chatMainRef",ref:le,style:c(a(Te))},[l(a(T),{"show-toolbar-tooltip":"","render-toolbar":Me},{default:u((()=>[(o(!0),i(m,null,p(a(ue).msgList,((e,t)=>(o(),i(m,{key:e.id},[xe(e)?(o(),i("div",{key:0,class:r(["message-item",{"message-item--mine":e.sender==a(ue).userInfo.id}])},[je(e,t)?(o(),i("p",Q,d(e.__sendTime),1)):g("v-if",!0),Se(e,"system")?(o(),f(q,{key:1,data:e},null,8,["data"])):(o(),i("div",V,[l(P,{"user-id":e.sender,placement:e.sender==a(ue).userInfo.id?"left":"right"},{trigger:u((()=>[l(a(M),{round:"",size:38,src:e.senderAvatar},null,8,["src"])])),_:2},1032,["user-id","placement"]),e.content?(o(),i("div",W,[v("div",Z,[v("span",{class:"name","data-time":e.__time},d(a(de)?e.senderName:""),9,ee)]),v("div",{class:r(["content",{emoji:e.content.chatMessageType===a(z).EMOJI,template:e.content.chatMessageType===a(z).TEMPLATE,"template--3":Ce(e.content),"audio-video":a(A)(e.content),file:e.content.chatMessageType===a(z).FILE}]),onContextmenu:y((t=>_e(t,e.id)),["prevent"])},[we(e)?(o(),i(m,{key:0},[e.content.referenceContent?(o(),i("div",ne,[v("span",null,d(e.content.referenceContent.senderName)+":",1),v("pre",{innerHTML:a(H)(e.content.referenceContent.content)},null,8,se)])):g("v-if",!0),e.content.chatMessageType===a(z).EMOJI?(o(),i("img",{key:1,class:r([e.content.referenceContent?"emoji--min":"emoji--big"]),src:a(B).findEmoji(e.__content)},null,10,oe)):(o(),i("pre",{key:2,innerHTML:e.__content},null,8,ie))],64)):g("v-if",!0),Ie(e)?(o(),i("pre",{key:1,innerHTML:e.__content},null,8,re)):g("v-if",!0),Se(e,"template")?(o(),f(q,{key:2,data:e},null,8,["data"])):g("v-if",!0),e.content.chatMessageType===a(z).IMAGE?(o(),f(a(k),{key:3,width:"240",src:e.__content},null,8,["src"])):g("v-if",!0),a(A)(e.content)?(o(),i(m,{key:4},[l(a(_),{class:r({"is-audio":e.content.chatMessageType===a(z).AUDIO}),component:e.content.chatMessageType===a(z).AUDIO?a(U):a(F)},null,8,["class","component"]),v("span",ae,d(a(O)(e.__content)),1)],64)):g("v-if",!0),e.content.chatMessageType===a(z).FILE?(o(),f(a(x),{key:5,"wrap-item":!1},{default:u((()=>[l(a(_),{class:"icon-file",size:"40",component:a(G)},null,8,["component"]),l(a(x),{"wrap-item":!1,vertical:"",justify:"space-between",style:{"row-gap":"0"}},{default:u((()=>[v("span",null,d(e.__content),1),v("span",ce,d(e.__size),1)])),_:2},1024)])),_:2},1024)):g("v-if",!0),l(a(w),{class:"quick-menu"},{default:u((()=>[a(A)(e.content)?g("v-if",!0):(o(),i(m,{key:0},[g(' <n-button quaternary size="tiny">\n\t\t\t\t\t\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<i class="chat--iconfont chat--icon-face" />\n\t\t\t\t\t\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\t\t\t\t\t</n-button> '),l(a(I),{quaternary:"",size:"tiny",onClick:()=>Le(e)},{icon:u((()=>[l(a(_),{size:"17",component:a(K)},null,8,["component"])])),_:2},1032,["onClick"])],64)),l(a(I),{quaternary:"",size:"tiny",onClick:t=>_e(t,e.id)},{icon:u((()=>[l(a(_),{size:"14",component:a(X)},null,8,["component"])])),_:2},1032,["onClick"])])),_:2},1024)],42,te)])):g("v-if",!0)]))],2)):g("v-if",!0)],64)))),128))])),_:1}),l(a(J),{ref_key:"contextmenuRef",ref:ge,show:fe.value,"onUpdate:show":t[0]||(t[0]=e=>fe.value=e),position:ve.value,"msg-id":ye.value,onSelect:Ee},null,8,["show","position","msg-id"])],6))}});export{le as default};
@@ -1 +1 @@
1
- import{defineComponent as t,ref as e,reactive as a,computed as l,openBlock as n,createBlock as o,unref as r,withCtx as s,renderSlot as i,createElementBlock as c,Fragment as u,withDirectives as d,createElementVNode as p,createVNode as m,createCommentVNode as v,toDisplayString as f,createTextVNode as g,renderList as k,vShow as y}from"vue";import{NPopover as h,NAvatar as b,NButton as w,NIcon as C}from"naive-ui";import{ChatbubbleEllipses as _,EyeOffOutline as j,EyeOutline as I,Close as z}from"@vicons/ionicons5";import{useState as x}from"../hooks/useState.js";import{useSession as N}from"../hooks/useSession.js";import"trtc-sdk-v5";import"date-fns";import"lodash-es";import"../utils/emoji.js";import"../../../../shared/utils/index.js";import{openSessionApi as S,getUserDetailApi as $}from"../api/index.js";const D={class:"person-profile-main"},P={class:"left"},T={class:"profile"},q={class:"profile__text"},B={class:"right"},E={class:"right__content"},O={class:"label"},U={class:"content"};var A=t({__name:"PersonProfile",props:{userId:{type:String,required:!0},disabled:{type:Boolean,default:!1}},emits:["close"],setup(t,{emit:A}){const F=t,{state:G}=x(),{openSession:H}=N(G),J=e(!1),K=e(!1),L=e(!1),M=a({}),Q=[{label:"机构",value:"",key:"orgName"},{label:"姓名",value:"",key:"name"},{label:"归属科室",value:"",key:"deptName"},{label:"业务科室",value:"",key:"businessDeptNames"},{label:"手机号",value:"",key:"phone"},{label:"岗位",value:"",key:"post"},{label:"工号",value:"",key:"jobId"},{label:"性别",value:"",key:"orgName"}],R=l((()=>(M.id&&Q.forEach((t=>{const{key:e}=t;t.value=M[e]})),Q)));async function V(){J.value=!1;const t=await S({chatType:G.currentSessionItem.chatType,receiver:F.userId,sender:G.userInfo.id});H(t),A("close")}async function W(t){if(!t)return;const e=await $({userId:F.userId});(null==e?void 0:e.id)?Object.assign(M,e):M.id=""}function X(t){const{key:e,value:a}=t;return"phone"!==e||L.value?a:(a||"").replace(/(\d{3})\d{4}(\d{4})/,"$1****$2")}return(e,a)=>(n(),o(r(h),{raw:"",class:"person-profile-wrapper",show:J.value,"onUpdate:show":[a[3]||(a[3]=t=>J.value=t),W],trigger:t.disabled?"manual":"click","show-arrow":!1,shift:""},{trigger:s((()=>[i(e.$slots,"trigger")])),default:s((()=>[M.id?(n(),c(u,{key:0},[d(p("div",D,[p("div",P,[p("div",T,[m(r(b),{src:M.avatar,bordered:"",round:"",size:100,onClickCapture:a[0]||(a[0]=t=>K.value=!0)},null,8,["src"]),v(' <n-upload abstract accept="image/*" @change="onChange">\r\n\t\t\t\t\t\t\t<n-upload-trigger #="{ handleClick }" abstract>\r\n\t\t\t\t\t\t\t\t<n-button\r\n\t\t\t\t\t\t\t\t\tcircle\r\n\t\t\t\t\t\t\t\t\tsecondary\r\n\t\t\t\t\t\t\t\t\tclass="edit-avatar"\r\n\t\t\t\t\t\t\t\t\tv-show="userDetail.id === state.userInfo.id"\r\n\t\t\t\t\t\t\t\t\t@click="handleClick"\r\n\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t\t<template #icon>\r\n\t\t\t\t\t\t\t\t\t\t<n-icon size="16" color="#666666" :component="Camera" />\r\n\t\t\t\t\t\t\t\t\t</template>\r\n\t\t\t\t\t\t\t\t</n-button>\r\n\t\t\t\t\t\t\t</n-upload-trigger>\r\n\t\t\t\t\t\t</n-upload> '),p("div",q,[p("h4",null,f(M.name),1),p("p",null,f(M.orgName),1)]),m(r(w),{strong:"",secondary:"",onClick:V},{default:s((()=>[m(r(C),{size:"13",color:"#666666",component:r(_),style:{"margin-right":"6px"}},null,8,["component"]),g(" 发消息 ")])),_:1})])]),p("div",B,[p("div",E,[(n(!0),c(u,null,k(r(R),((t,e)=>(n(),c("div",{class:"info-item",key:e},[p("span",O,f(t.label),1),p("div",U,[p("span",null,f(X(t)),1),"phone"===t.key&&X(t)?(n(),o(r(C),{key:0,size:"16",color:"#666666",component:L.value?r(j):r(I),style:{"margin-left":"10px"},onClick:a[1]||(a[1]=t=>L.value=!L.value)},null,8,["component"])):v("v-if",!0)])])))),128))])])],512),[[y,!K.value]]),d(p("div",{class:"large-avatar",onClick:a[2]||(a[2]=t=>K.value=!1)},[m(r(w),{circle:"",size:"small",secondary:""},{icon:s((()=>[m(r(C),{size:24,component:r(z),color:"#fff"},null,8,["component"])])),_:1}),m(r(b),{size:310,round:"",src:M.avatar},null,8,["src"])],512),[[y,K.value]])],64)):v("v-if",!0)])),_:3},8,["show","trigger"]))}});export{A as default};
1
+ import{defineComponent as t,ref as e,reactive as a,computed as l,openBlock as n,createBlock as o,unref as s,withCtx as r,renderSlot as i,createElementBlock as c,Fragment as u,withDirectives as d,createElementVNode as p,createVNode as m,createCommentVNode as v,toDisplayString as f,createTextVNode as g,renderList as k,vShow as y}from"vue";import{NPopover as h,NAvatar as b,NButton as w,NIcon as C}from"naive-ui";import{ChatbubbleEllipses as _,EyeOffOutline as j,EyeOutline as I,Close as z}from"@vicons/ionicons5";import{useState as x}from"../hooks/useState.js";import{useSession as N}from"../hooks/useSession.js";import"trtc-sdk-v5";import"date-fns";import"lodash-es";import"../utils/emoji.js";import"../../../../shared/utils/index.js";import{openSessionApi as S,getUserDetailApi as $}from"../api/index.js";const D={class:"person-profile-main"},P={class:"left"},T={class:"profile"},q={class:"profile__text"},B={class:"right"},E={class:"right__content"},O={class:"label"},U={class:"content"};var A=t({__name:"PersonProfile",props:{userId:{type:String,required:!0},disabled:{type:Boolean,default:!1}},emits:["close"],setup(t,{emit:A}){const F=t,{state:G}=x(),{openSession:H}=N(G),J=e(!1),K=e(!1),L=e(!1),M=a({}),Q=[{label:"机构",value:"",key:"orgName"},{label:"姓名",value:"",key:"name"},{label:"归属科室",value:"",key:"deptName"},{label:"业务科室",value:"",key:"businessDeptNames"},{label:"手机号",value:"",key:"phone"},{label:"岗位",value:"",key:"post"},{label:"工号",value:"",key:"jobId"},{label:"性别",value:"",key:"orgName"}],R=l((()=>(M.id&&Q.forEach((t=>{const{key:e}=t;t.value=M[e]})),Q)));async function V(){J.value=!1;const t=await S({chatType:G.currentSessionItem.chatType,receiver:F.userId,sender:G.userInfo.id});H(t),A("close")}async function W(t){if(!t)return;const e=await $({userId:F.userId});(null==e?void 0:e.id)?Object.assign(M,e):M.id=""}function X(t){const{key:e,value:a}=t;return"phone"!==e||L.value?a:(a||"").replace(/(\d{3})\d{4}(\d{4})/,"$1****$2")}return(e,a)=>(n(),o(s(h),{raw:"",class:"person-profile-wrapper",show:J.value,"onUpdate:show":[a[3]||(a[3]=t=>J.value=t),W],trigger:t.disabled?"manual":"click","show-arrow":!1,shift:""},{trigger:r((()=>[i(e.$slots,"trigger")])),default:r((()=>[M.id?(n(),c(u,{key:0},[d(p("div",D,[p("div",P,[p("div",T,[m(s(b),{src:M.avatar,bordered:"",round:"",size:100,onClickCapture:a[0]||(a[0]=t=>K.value=!0)},null,8,["src"]),v(' <n-upload abstract accept="image/*" @change="onChange">\n\t\t\t\t\t\t\t<n-upload-trigger #="{ handleClick }" abstract>\n\t\t\t\t\t\t\t\t<n-button\n\t\t\t\t\t\t\t\t\tcircle\n\t\t\t\t\t\t\t\t\tsecondary\n\t\t\t\t\t\t\t\t\tclass="edit-avatar"\n\t\t\t\t\t\t\t\t\tv-show="userDetail.id === state.userInfo.id"\n\t\t\t\t\t\t\t\t\t@click="handleClick"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t\t\t<n-icon size="16" color="#666666" :component="Camera" />\n\t\t\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\t\t</n-button>\n\t\t\t\t\t\t\t</n-upload-trigger>\n\t\t\t\t\t\t</n-upload> '),p("div",q,[p("h4",null,f(M.name),1),p("p",null,f(M.orgName),1)]),m(s(w),{strong:"",secondary:"",onClick:V},{default:r((()=>[m(s(C),{size:"13",color:"#666666",component:s(_),style:{"margin-right":"6px"}},null,8,["component"]),g(" 发消息 ")])),_:1})])]),p("div",B,[p("div",E,[(n(!0),c(u,null,k(s(R),((t,e)=>(n(),c("div",{class:"info-item",key:e},[p("span",O,f(t.label),1),p("div",U,[p("span",null,f(X(t)),1),"phone"===t.key&&X(t)?(n(),o(s(C),{key:0,size:"16",color:"#666666",component:L.value?s(j):s(I),style:{"margin-left":"10px"},onClick:a[1]||(a[1]=t=>L.value=!L.value)},null,8,["component"])):v("v-if",!0)])])))),128))])])],512),[[y,!K.value]]),d(p("div",{class:"large-avatar",onClick:a[2]||(a[2]=t=>K.value=!1)},[m(s(w),{circle:"",size:"small",secondary:""},{icon:r((()=>[m(s(C),{size:24,component:s(z),color:"#fff"},null,8,["component"])])),_:1}),m(s(b),{size:310,round:"",src:M.avatar},null,8,["src"])],512),[[y,K.value]])],64)):v("v-if",!0)])),_:3},8,["show","trigger"]))}});export{A as default};
@@ -41,6 +41,9 @@ declare const CQuickSearch: SFCWithInstall<import("vue").DefineComponent<{
41
41
  widgetType: string | null;
42
42
  originType: string | null;
43
43
  valueList: {
44
+ name: string;
45
+ value: any;
46
+ }[] | {
44
47
  value: any;
45
48
  label: any;
46
49
  }[] | undefined;
@@ -55,6 +58,7 @@ declare const CQuickSearch: SFCWithInstall<import("vue").DefineComponent<{
55
58
  linkageFieldKeys: string[];
56
59
  };
57
60
  rangeFilter: boolean | undefined;
61
+ componentProps: any;
58
62
  unit: any;
59
63
  isAccurateSearchVal: boolean;
60
64
  _extendData: import("..").IExtendConfigurationType;
@@ -69,7 +73,7 @@ declare const CQuickSearch: SFCWithInstall<import("vue").DefineComponent<{
69
73
  accurateSearch: any;
70
74
  }[];
71
75
  getCacheDef: (item: import("..").ISearchType, cacheList: string[]) => string | string[];
72
- transformParams: (paramsList: any[]) => {};
76
+ transformParams: (paramsList: any[]) => any;
73
77
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
74
78
  searchFieldList: {
75
79
  type: import("vue").PropType<import("..").IApiServerType[]>;
@@ -187,7 +191,7 @@ declare const CQuickSearch: SFCWithInstall<import("vue").DefineComponent<{
187
191
  clearData: () => void;
188
192
  handlerReset: (arr: import("..").ISearchType[]) => void;
189
193
  setDefaultCon: (widgetArr: import("..").ISearchParamsType[]) => void;
190
- getFilterParams: () => {};
194
+ getFilterParams: () => any;
191
195
  setFilterParams: (params?: any) => void;
192
196
  getOriginalConfig: () => import("..").IApiServerType[];
193
197
  onFilterChange: (fn: any) => void;
@@ -43,6 +43,9 @@ declare const _default: import("vue").DefineComponent<{
43
43
  widgetType: string | null;
44
44
  originType: string | null;
45
45
  valueList: {
46
+ name: string;
47
+ value: any;
48
+ }[] | {
46
49
  value: any;
47
50
  label: any;
48
51
  }[] | undefined;
@@ -57,6 +60,7 @@ declare const _default: import("vue").DefineComponent<{
57
60
  linkageFieldKeys: string[];
58
61
  };
59
62
  rangeFilter: boolean | undefined;
63
+ componentProps: any;
60
64
  unit: any;
61
65
  isAccurateSearchVal: boolean;
62
66
  _extendData: import("../../../components/table-filter/src/types").IExtendConfigurationType;
@@ -71,7 +75,7 @@ declare const _default: import("vue").DefineComponent<{
71
75
  accurateSearch: any;
72
76
  }[];
73
77
  getCacheDef: (item: ISearchType, cacheList: string[]) => string | string[];
74
- transformParams: (paramsList: any[]) => {};
78
+ transformParams: (paramsList: any[]) => any;
75
79
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
76
80
  searchFieldList: {
77
81
  type: PropType<IApiServerType[]>;
@@ -189,7 +193,7 @@ declare const _default: import("vue").DefineComponent<{
189
193
  clearData: () => void;
190
194
  handlerReset: (arr: ISearchType[]) => void;
191
195
  setDefaultCon: (widgetArr: ISearchParamsType[]) => void;
192
- getFilterParams: () => {};
196
+ getFilterParams: () => any;
193
197
  setFilterParams: (params?: any) => void;
194
198
  getOriginalConfig: () => IApiServerType[];
195
199
  onFilterChange: (fn: any) => void;
@@ -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 f,createVNode as v,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 F,isCollection as P}from"./utils/judge-types.js";import{useEvent as q}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 A from"./components/EvaluatePage.vue.js";import M from"./components/AnswerParse.vue.js";import O from"./components/ScaleScore.js";import T from"./components/DescribeContent.vue.js";import{NForm as V,NFormItem as I,NButton as B}from"naive-ui";const J=["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),ee=t(null),{noDataState:oe,setNoData:te,resetNodata:ae}=b(),ne=F(),{showEvatip:se,isFormBoldOpen:ie,scaleStyle:le,handlePageClass:re,isShowItem:me,handleShowQuestionNumber:ce,hasScore:ue,isPreviewScale:de,showEvaluateEntry:pe,showEvaluateCoundownPage:fe,showScaleFooter:ve,isCancelBtn:ge,isSaveBtn:he,showEvaluateLabel:ke,showAnswerParse:ye,propsConfig:we,evaluatePageProps:Se,evaluateCountdownProps:be,isEvaluetaResSituation:Ce,disableEdit:De,desStart:Ee,desEnd:je,desContent:_e}=E(K,X,{query:ne,scaleViewDom:Y}),{initForm:xe}=j(K,X,z,{query:ne}),{submitMethod:Fe,onSubmitData:Pe,onSubmitForm:qe,handleScoreJson:Le}=_(K,X,z,{query:ne,formRef:ee,countdownDom:Z}),{nextLogicEvent:Ne,handleDynamicDataRelation:Re}=q(K,X),{scaleChange:Ae,labelChange:Me,vodFileList:Oe,writeGuage:Te,closeEvaluateCountdown:Ve,showEvaTipModal:Ie}=x(K,X,z,{nextLogicEvent:Ne,handleDynamicDataRelation:Re,isPreviewScale:de,submitMethod:Fe,isEvaluetaResSituation:Ce,handleScoreJson:Le,disableEdit:De});(()=>{let{id:e}=ne;e&&(X.shareId=e)})();const Be=e=>{try{ae(),xe(e)}catch(e){console.log(e,"--error"),X.spinning=!1,X.hasFrontAddress=!1,te(!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&&Be(e):e.guage_id&&Be(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((()=>{xe(o)}))}),{immediate:!0});const Je=L.debounce(Pe,300),Ge=()=>{z("onCloseSetting")};return C({getScaleData:()=>({...X}),onSubmitForm:qe,cancel:Ge}),(e,o)=>(s(),i("div",{class:l(["c-scale-view-block",{"c-scale-view-block-hasfooter":r(ve)}]),ref_key:"scaleViewDom",ref:Y},[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(oe).noData?(s(),u(N,{key:0,noDataImg:r(oe).noDataImg,noDataTip:r(oe).noDataTip},null,8,["noDataImg","noDataTip"])):(s(),i(c,{key:1},[r(pe)?(s(),u(A,d({key:0},r(Se),{onWriteGuage:r(Te)}),null,16,["onWriteGuage"])):(s(),i(c,{key:1},[r(fe)?(s(),u(R,d({key:0,ref_key:"countdownDom",ref:Z},r(be),{onCloseEvaluateCountdown:r(Ve)}),null,16,["onCloseEvaluateCountdown"])):m("v-if",!0),p("div",{class:l(["scale-container",{"scale-container-nopadding":r(re),"scale-container-hasfooter":r(ve)}]),style:f(r(le))},[r(ue)?(s(),u(r(O),{key:0,config:X.config,maxScore:X.maxScore},null,8,["config","maxScore"])):m("v-if",!0),r(Ee)?(s(),u(T,{key:1,content:r(_e)},null,8,["content"])):m("v-if",!0),v(r(V),{ref_key:"formRef",ref:ee,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(me)(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(ie)(e)}),innerHTML:r(ce)(e)},null,10,J),r(ie)(e)?(s(),i("span",G,"(必填)")):m("v-if",!0),r(ke)(e)?(s(),i("span",W,k(r(ke)(e)),1)):m("v-if",!0),r(se)(e)?(s(),i("span",{key:2,class:"evalute-tip",onClick:o=>r(Ie)(e)},[Q,y(" 查看提示 ")],8,H)):m("v-if",!0)])),default:g((()=>[(s(),u(w(e.renderCom),d(r(we)(e,o),{key:(e.id||e.seq)+o,onScaleChange:r(Ae),onOnChange:o=>r(Me)(o,e),onVodFileList:r(Oe)}),null,16,["onScaleChange","onOnChange","onVodFileList"])),r(ye)(e)?(s(),u(M,{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(je)?(s(),u(T,{key:2,content:r(_e)},null,8,["content"])):m("v-if",!0)],6),r(ve)?(s(),i("div",$,[m(" 分享的链接 隐藏取消按钮 "),r(ge)?(s(),u(r(B),{key:0,onClick:Ge},{default:g((()=>[y("取消")])),_:1})):m("v-if",!0),r(he)?(s(),u(r(B),{key:1,onClick:r(Je),disabled:X.banSubmit,type:"primary"},{default:g((()=>[y(" 保存 ")])),_:1},8,["onClick","disabled"])):m("v-if",!0),S(e.$slots,"extendBtn")])):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 f,createVNode as v,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 F,isCollection as P}from"./utils/judge-types.js";import{useEvent as q}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 A from"./components/EvaluatePage.vue.js";import M from"./components/AnswerParse.vue.js";import O from"./components/ScaleScore.js";import T from"./components/DescribeContent.vue.js";import{NForm as V,NFormItem as I,NButton as B}from"naive-ui";const J=["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),ee=t(null),{noDataState:oe,setNoData:te,resetNodata:ae}=b(),ne=F(),{showEvatip:se,isFormBoldOpen:ie,scaleStyle:le,handlePageClass:re,isShowItem:me,handleShowQuestionNumber:ce,hasScore:ue,isPreviewScale:de,showEvaluateEntry:pe,showEvaluateCoundownPage:fe,showScaleFooter:ve,isCancelBtn:ge,isSaveBtn:he,showEvaluateLabel:ke,showAnswerParse:ye,propsConfig:we,evaluatePageProps:Se,evaluateCountdownProps:be,isEvaluetaResSituation:Ce,disableEdit:De,desStart:Ee,desEnd:je,desContent:_e}=E(K,X,{query:ne,scaleViewDom:Y}),{initForm:xe}=j(K,X,z,{query:ne}),{submitMethod:Fe,onSubmitData:Pe,onSubmitForm:qe,handleScoreJson:Le}=_(K,X,z,{query:ne,formRef:ee,countdownDom:Z}),{nextLogicEvent:Ne,handleDynamicDataRelation:Re}=q(K,X),{scaleChange:Ae,labelChange:Me,vodFileList:Oe,writeGuage:Te,closeEvaluateCountdown:Ve,showEvaTipModal:Ie}=x(K,X,z,{nextLogicEvent:Ne,handleDynamicDataRelation:Re,isPreviewScale:de,submitMethod:Fe,isEvaluetaResSituation:Ce,handleScoreJson:Le,disableEdit:De});(()=>{let{id:e}=ne;e&&(X.shareId=e)})();const Be=e=>{try{ae(),xe(e)}catch(e){console.log(e,"--error"),X.spinning=!1,X.hasFrontAddress=!1,te(!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&&Be(e):e.guage_id&&Be(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((()=>{xe(o)}))}),{immediate:!0});const Je=L.debounce(Pe,300),Ge=()=>{z("onCloseSetting")};return C({getScaleData:()=>({...X}),onSubmitForm:qe,cancel:Ge}),(e,o)=>(s(),i("div",{class:l(["c-scale-view-block",{"c-scale-view-block-hasfooter":r(ve)}]),ref_key:"scaleViewDom",ref:Y},[m(' <template v-if="state.spinning">\n <n-spin :show="state.spinning" description="加载中"></n-spin>\n </template> '),X.spinning||X.hasFrontAddress?m("v-if",!0):(s(),i(c,{key:0},[r(oe).noData?(s(),u(N,{key:0,noDataImg:r(oe).noDataImg,noDataTip:r(oe).noDataTip},null,8,["noDataImg","noDataTip"])):(s(),i(c,{key:1},[r(pe)?(s(),u(A,d({key:0},r(Se),{onWriteGuage:r(Te)}),null,16,["onWriteGuage"])):(s(),i(c,{key:1},[r(fe)?(s(),u(R,d({key:0,ref_key:"countdownDom",ref:Z},r(be),{onCloseEvaluateCountdown:r(Ve)}),null,16,["onCloseEvaluateCountdown"])):m("v-if",!0),p("div",{class:l(["scale-container",{"scale-container-nopadding":r(re),"scale-container-hasfooter":r(ve)}]),style:f(r(le))},[r(ue)?(s(),u(r(O),{key:0,config:X.config,maxScore:X.maxScore},null,8,["config","maxScore"])):m("v-if",!0),r(Ee)?(s(),u(T,{key:1,content:r(_e)},null,8,["content"])):m("v-if",!0),v(r(V),{ref_key:"formRef",ref:ee,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(me)(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(ie)(e)}),innerHTML:r(ce)(e)},null,10,J),r(ie)(e)?(s(),i("span",G,"(必填)")):m("v-if",!0),r(ke)(e)?(s(),i("span",W,k(r(ke)(e)),1)):m("v-if",!0),r(se)(e)?(s(),i("span",{key:2,class:"evalute-tip",onClick:o=>r(Ie)(e)},[Q,y(" 查看提示 ")],8,H)):m("v-if",!0)])),default:g((()=>[(s(),u(w(e.renderCom),d(r(we)(e,o),{key:(e.id||e.seq)+o,onScaleChange:r(Ae),onOnChange:o=>r(Me)(o,e),onVodFileList:r(Oe)}),null,16,["onScaleChange","onOnChange","onVodFileList"])),r(ye)(e)?(s(),u(M,{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(je)?(s(),u(T,{key:2,content:r(_e)},null,8,["content"])):m("v-if",!0)],6),r(ve)?(s(),i("div",$,[m(" 分享的链接 隐藏取消按钮 "),r(ge)?(s(),u(r(B),{key:0,onClick:Ge},{default:g((()=>[y("取消")])),_:1})):m("v-if",!0),r(he)?(s(),u(r(B),{key:1,onClick:r(Je),disabled:X.banSubmit,type:"primary"},{default:g((()=>[y(" 保存 ")])),_:1},8,["onClick","disabled"])):m("v-if",!0),S(e.$slots,"extendBtn")])):m("v-if",!0)],64))],64))],64))],2))}});export{z as default};
@@ -310,6 +310,7 @@ declare const _default: import("vue").DefineComponent<{
310
310
  LABEL: string;
311
311
  SELECTLABEL: string;
312
312
  SELECTDYNAMIC: string;
313
+ SELECTTREE: string;
313
314
  };
314
315
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "update:modelValues")[], "update:modelValue" | "update:modelValues", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
315
316
  paramCfg: {
@@ -428,6 +428,7 @@ declare const _default: import("vue").DefineComponent<{
428
428
  LABEL: string;
429
429
  SELECTLABEL: string;
430
430
  SELECTDYNAMIC: string;
431
+ SELECTTREE: string;
431
432
  };
432
433
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "update:modelValues")[], "update:modelValue" | "update:modelValues", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
433
434
  paramCfg: {
@@ -962,6 +962,7 @@ declare const _default: import("vue").DefineComponent<{
962
962
  LABEL: string;
963
963
  SELECTLABEL: string;
964
964
  SELECTDYNAMIC: string;
965
+ SELECTTREE: string;
965
966
  };
966
967
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "update:isAccurate" | "update:presetVal")[], "update:modelValue" | "update:isAccurate" | "update:presetVal", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
967
968
  paramCfg: {
@@ -1086,6 +1086,7 @@ declare const _default: import("vue").DefineComponent<{
1086
1086
  LABEL: string;
1087
1087
  SELECTLABEL: string;
1088
1088
  SELECTDYNAMIC: string;
1089
+ SELECTTREE: string;
1089
1090
  };
1090
1091
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "update:isAccurate" | "update:presetVal")[], "update:modelValue" | "update:isAccurate" | "update:presetVal", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
1091
1092
  paramCfg: {
@@ -0,0 +1,51 @@
1
+ import { PropType } from 'vue';
2
+ import { AnyObject } from '../../../../../../shared/types';
3
+ declare const _default: import("vue").DefineComponent<{
4
+ componentCfg: {
5
+ type: PropType<AnyObject>;
6
+ };
7
+ value: {
8
+ type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
9
+ };
10
+ isAccurateSearchVal: {
11
+ type: BooleanConstructor;
12
+ default: boolean;
13
+ };
14
+ }, {
15
+ $attrs: any;
16
+ props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
17
+ componentCfg: {
18
+ type: PropType<AnyObject>;
19
+ };
20
+ value: {
21
+ type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
22
+ };
23
+ isAccurateSearchVal: {
24
+ type: BooleanConstructor;
25
+ default: boolean;
26
+ };
27
+ }>> & {
28
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
29
+ }>>;
30
+ emit: (event: "update:value", ...args: any[]) => void;
31
+ isMultiple: import("vue").ComputedRef<any>;
32
+ valueCp: import("vue").WritableComputedRef<any>;
33
+ options: import("vue").ComputedRef<any>;
34
+ NTreeSelect: any;
35
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
36
+ componentCfg: {
37
+ type: PropType<AnyObject>;
38
+ };
39
+ value: {
40
+ type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
41
+ };
42
+ isAccurateSearchVal: {
43
+ type: BooleanConstructor;
44
+ default: boolean;
45
+ };
46
+ }>> & {
47
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
48
+ }, {
49
+ isAccurateSearchVal: boolean;
50
+ }>;
51
+ export default _default;
@@ -0,0 +1 @@
1
+ import e from"./SelectTree.vue2.js";import r from"../../../../../../_virtual/_plugin-vue_export-helper.js";var t=r(e,[["__file","SelectTree.vue"]]);export{t as default};
@@ -0,0 +1 @@
1
+ import{defineComponent as e,useAttrs as t,computed as a,openBlock as u,createBlock as l,unref as o,mergeProps as n,isRef as r}from"vue";import{NTreeSelect as p}from"naive-ui";var i=e({__name:"SelectTree",props:{componentCfg:{type:Object},value:{type:[Array,String,Number]},isAccurateSearchVal:{type:Boolean,default:!1}},emits:["update:value"],setup(e,{emit:i}){const s=e,v=t();a((()=>v.multiple));const m=a({set(e){i("update:value",e)},get:()=>s.value}),c=a((()=>{const{widgetCfg:e}=s.componentCfg,{valueList:t=[]}=e;return t}));return(e,t)=>(u(),l(o(p),n(o(v),{options:o(c),value:o(m),"onUpdate:value":t[0]||(t[0]=e=>r(m)?m.value=e:null)}),null,16,["options","value"]))}});export{i as default};
@@ -1523,4 +1523,52 @@ declare const InputCustom: import("vue").DefineComponent<{
1523
1523
  value: string;
1524
1524
  isAccurateSearchVal: boolean;
1525
1525
  }>;
1526
- export { CheckboxGroup, InputNumberGroup, DateInner, DateOut, DateRangeInner, DateRangeOut, LabelInner, LabelOut, Select, SelectDynamic, InputCustom };
1526
+ declare const SelectTree: import("vue").DefineComponent<{
1527
+ componentCfg: {
1528
+ type: import("vue").PropType<import("../../../../../../shared/types").AnyObject>;
1529
+ };
1530
+ value: {
1531
+ type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
1532
+ };
1533
+ isAccurateSearchVal: {
1534
+ type: BooleanConstructor;
1535
+ default: boolean;
1536
+ };
1537
+ }, {
1538
+ $attrs: any;
1539
+ props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
1540
+ componentCfg: {
1541
+ type: import("vue").PropType<import("../../../../../../shared/types").AnyObject>;
1542
+ };
1543
+ value: {
1544
+ type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
1545
+ };
1546
+ isAccurateSearchVal: {
1547
+ type: BooleanConstructor;
1548
+ default: boolean;
1549
+ };
1550
+ }>> & {
1551
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
1552
+ }>>;
1553
+ emit: (event: "update:value", ...args: any[]) => void;
1554
+ isMultiple: import("vue").ComputedRef<any>;
1555
+ valueCp: import("vue").WritableComputedRef<any>;
1556
+ options: import("vue").ComputedRef<any>;
1557
+ NTreeSelect: any;
1558
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
1559
+ componentCfg: {
1560
+ type: import("vue").PropType<import("../../../../../../shared/types").AnyObject>;
1561
+ };
1562
+ value: {
1563
+ type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
1564
+ };
1565
+ isAccurateSearchVal: {
1566
+ type: BooleanConstructor;
1567
+ default: boolean;
1568
+ };
1569
+ }>> & {
1570
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
1571
+ }, {
1572
+ isAccurateSearchVal: boolean;
1573
+ }>;
1574
+ export { CheckboxGroup, InputNumberGroup, DateInner, DateOut, DateRangeInner, DateRangeOut, LabelInner, LabelOut, Select, SelectDynamic, InputCustom, SelectTree };
@@ -1 +1 @@
1
- import{defineAsyncComponent as e}from"vue";const t=e((()=>import("./CheckboxGroup.vue.js"))),u=e((()=>import("./InputNumberGroup.vue.js"))),r=e((()=>import("./DateInner.vue.js"))),o=e((()=>import("./DateOut.vue.js"))),p=e((()=>import("./DateRangeInner.vue.js"))),m=e((()=>import("./DateRangeOut.vue.js"))),i=e((()=>import("./LabelInner.vue.js"))),s=e((()=>import("./LabelOut.vue.js"))),n=e((()=>import("./Select.vue.js"))),v=e((()=>import("./SelectDynamic.vue.js"))),j=e((()=>import("./InputCustom.vue.js")));export{t as CheckboxGroup,r as DateInner,o as DateOut,p as DateRangeInner,m as DateRangeOut,j as InputCustom,u as InputNumberGroup,i as LabelInner,s as LabelOut,n as Select,v as SelectDynamic};
1
+ import{defineAsyncComponent as e}from"vue";const t=e((()=>import("./CheckboxGroup.vue.js"))),r=e((()=>import("./InputNumberGroup.vue.js"))),u=e((()=>import("./DateInner.vue.js"))),o=e((()=>import("./DateOut.vue.js"))),p=e((()=>import("./DateRangeInner.vue.js"))),m=e((()=>import("./DateRangeOut.vue.js"))),i=e((()=>import("./LabelInner.vue.js"))),s=e((()=>import("./LabelOut.vue.js"))),v=e((()=>import("./Select.vue.js"))),j=e((()=>import("./SelectDynamic.vue.js"))),n=e((()=>import("./InputCustom.vue.js"))),a=e((()=>import("./SelectTree.vue.js")));export{t as CheckboxGroup,u as DateInner,o as DateOut,p as DateRangeInner,m as DateRangeOut,n as InputCustom,r as InputNumberGroup,i as LabelInner,s as LabelOut,v as Select,j as SelectDynamic,a as SelectTree};
@@ -1 +1 @@
1
- import{defineComponent as e,h as t}from"vue";import{WidgetTypeEnums as i}from"../../types/enums.js";import{WidgetCfgMaps as a}from"./widgetCfgMaps.js";import r from"../../../../../_virtual/_plugin-vue_export-helper.js";const l=[i.DATE,i.DATE_TIME,i.CHECKBOX_GROUP];var s=r(e({props:{cfg:{type:Object,required:!0},modelValue:{type:[Array,String,Number]}},emits:["update:modelValue","update:unit","update:isAccurate","outFilterChange"],computed:{valueCp(){return this.cfg.widgetType==i.INPUT_NUMBER&&this.cfg.value?Number(this.cfg.value):this.cfg.value},unit(){return this.cfg.unit},isAccurateSearchVal(){return this.cfg.isAccurateSearchVal}},data:()=>({initialProps:{}}),methods:{search(){this.$emit("outFilterChange")},getEleWidth(e){const{widgetType:t,widgetCfg:a,filterExplicit:r}=e;if(l.includes(t))return;const s=i.SELECT!==t&&i.SELECTLABEL!==t&&i.SELECTDYNAMIC!==t||!a.multiple?"100%":"200px";return{width:0===r?"100%":e.advanceColWidth?`${e.advanceColWidth}px`:s}},initComponentProps(e){const{widgetType:t,alias:i,title:r,placeholder:l,widgetCfg:s,accurateSearch:n,filterExplicit:u}=e,{props:c,handlerProps:h}=a.get(t);let p={...c,accurateSearch:n,filterExplicit:u};h&&(p=h(p,{...s,title:i||r})),l&&(p.placeholder=l),this.initialProps=p,p.value&&(this.valueCp=p.value)},generateWidget(e){const{widgetType:i}=e;if(!a.has(i))return null;const{value:r}=e,{component:l,style:s,eventsBySearch:n=[]}=a.get(i),u={...this.initialProps,value:r,componentCfg:e},c=n.reduce(((e,t)=>{const{name:i,handler:a}=t;let r=this.search;return a&&(r=e=>{a(e,this.search,u)}),{...e,[`on${i}`]:r}}),{});return t(l,{...s,...u,style:this.getEleWidth(e),value:this.valueCp,unit:this.unit,isAccurateSearchVal:this.isAccurateSearchVal,"onUpdate:value":e=>this.handleUpdate(e),"onUpdate:unit":e=>this.handleUpdateUnit(e),"onUpdate:isAccurate":e=>this.handleUpdateAccurateSearch(e),...c})},handleUpdate(e){this.$emit("update:modelValue",e)},handleUpdateUnit(e){this.$emit("update:unit",e)},handleUpdateAccurateSearch(e){this.$emit("update:isAccurate",e)}},created(){this.initComponentProps(this.cfg)},render(){return this.generateWidget(this.cfg)}}),[["__file","index.vue"]]);export{s as default};
1
+ import{defineComponent as e,h as t}from"vue";import{WidgetTypeEnums as i}from"../../types/enums.js";import{WidgetCfgMaps as a}from"./widgetCfgMaps.js";import r from"../../../../../_virtual/_plugin-vue_export-helper.js";const n=[i.DATE,i.DATE_TIME,i.CHECKBOX_GROUP];var s=r(e({props:{cfg:{type:Object,required:!0},modelValue:{type:[Array,String,Number]}},emits:["update:modelValue","update:unit","update:isAccurate","outFilterChange"],computed:{valueCp(){return this.cfg.widgetType==i.INPUT_NUMBER&&this.cfg.value?Number(this.cfg.value):this.cfg.value},unit(){return this.cfg.unit},isAccurateSearchVal(){return this.cfg.isAccurateSearchVal}},data:()=>({initialProps:{}}),methods:{search(){this.$emit("outFilterChange")},getEleWidth(e){const{widgetType:t,widgetCfg:a,filterExplicit:r}=e;if(n.includes(t))return;const s=i.SELECT!==t&&i.SELECTLABEL!==t&&i.SELECTDYNAMIC!==t&&i.SELECTTREE!==t||!a.multiple?"100%":"200px";return{width:0===r?"100%":e.advanceColWidth?`${e.advanceColWidth}px`:s}},initComponentProps(e){const{widgetType:t,alias:i,title:r,placeholder:n,widgetCfg:s,accurateSearch:l,filterExplicit:c,componentProps:u={}}=e,{props:p,handlerProps:h}=a.get(t);let d={...p,accurateSearch:l,filterExplicit:c,...u};h&&(d=h(d,{...s,title:i||r})),n&&(d.placeholder=n),this.initialProps=d,d.value&&(this.valueCp=d.value)},generateWidget(e){const{widgetType:i}=e;if(!a.has(i))return null;const{value:r}=e,{component:n,style:s,eventsBySearch:l=[]}=a.get(i),c={...this.initialProps,value:r,componentCfg:e},u=l.reduce(((e,t)=>{const{name:i,handler:a}=t;let r=this.search;return a&&(r=e=>{a(e,this.search,c)}),{...e,[`on${i}`]:r}}),{});return t(n,{...s,...c,style:this.getEleWidth(e),value:this.valueCp,unit:this.unit,isAccurateSearchVal:this.isAccurateSearchVal,"onUpdate:value":e=>this.handleUpdate(e),"onUpdate:unit":e=>this.handleUpdateUnit(e),"onUpdate:isAccurate":e=>this.handleUpdateAccurateSearch(e),...u})},handleUpdate(e){this.$emit("update:modelValue",e)},handleUpdateUnit(e){this.$emit("update:unit",e)},handleUpdateAccurateSearch(e){this.$emit("update:isAccurate",e)}},created(){this.initComponentProps(this.cfg)},render(){return this.generateWidget(this.cfg)}}),[["__file","index.vue"]]);export{s as default};
@@ -1637,4 +1637,69 @@ export declare const WidgetCfgMaps: Map<string, {
1637
1637
  setDefaultValue(defaultValue: any): any;
1638
1638
  eventsBySearch?: undefined;
1639
1639
  style?: undefined;
1640
+ } | {
1641
+ component: import("vue").DefineComponent<{
1642
+ componentCfg: {
1643
+ type: import("vue").PropType<import("../../../../../shared/types").AnyObject>;
1644
+ };
1645
+ value: {
1646
+ type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
1647
+ };
1648
+ isAccurateSearchVal: {
1649
+ type: BooleanConstructor;
1650
+ default: boolean;
1651
+ };
1652
+ }, {
1653
+ $attrs: any;
1654
+ props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
1655
+ componentCfg: {
1656
+ type: import("vue").PropType<import("../../../../../shared/types").AnyObject>;
1657
+ };
1658
+ value: {
1659
+ type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
1660
+ };
1661
+ isAccurateSearchVal: {
1662
+ type: BooleanConstructor;
1663
+ default: boolean;
1664
+ };
1665
+ }>> & {
1666
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
1667
+ }>>;
1668
+ emit: (event: "update:value", ...args: any[]) => void;
1669
+ isMultiple: import("vue").ComputedRef<any>;
1670
+ valueCp: import("vue").WritableComputedRef<any>;
1671
+ options: import("vue").ComputedRef<any>;
1672
+ NTreeSelect: any;
1673
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
1674
+ componentCfg: {
1675
+ type: import("vue").PropType<import("../../../../../shared/types").AnyObject>;
1676
+ };
1677
+ value: {
1678
+ type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
1679
+ };
1680
+ isAccurateSearchVal: {
1681
+ type: BooleanConstructor;
1682
+ default: boolean;
1683
+ };
1684
+ }>> & {
1685
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
1686
+ }, {
1687
+ isAccurateSearchVal: boolean;
1688
+ }>;
1689
+ props: {
1690
+ clearable: boolean;
1691
+ filterable: boolean;
1692
+ multiple: boolean;
1693
+ maxTagCount: string;
1694
+ allowInput?: undefined;
1695
+ type?: undefined;
1696
+ valueFormat?: undefined;
1697
+ };
1698
+ eventsBySearch: {
1699
+ name: string;
1700
+ handler(e: KeyboardEvent, search: funcVoid, props: any): void;
1701
+ }[];
1702
+ handlerProps(props: any, { multiple, title }?: any): any;
1703
+ setDefaultValue(defaultValue: any): any;
1704
+ style?: undefined;
1640
1705
  }>;
@@ -1 +1 @@
1
- import{WidgetTypeEnums as e,WidgetValEnums as l}from"../../types/enums.js";import{DatePresetValEnums as t,DateRangeOutDefEnums as r}from"./enums.js";import{NInputNumber as a}from"naive-ui";import{InputNumberGroup as o,InputCustom as n,Select as p,SelectDynamic as s,DateInner as i,DateOut as u,DateRangeInner as c,DateRangeOut as m,CheckboxGroup as d,LabelInner as y,LabelOut as h}from"./components/index.js";import{presetValToTimestamp as E,formatDateRangeInfo as f}from"./helpers/presetValToTimestamp.js";import{setSelectDynamicValue as M}from"./helpers/setDefaultValue.js";const D=e=>null==e?null:e,T=new Map([[e.INPUT_NUMBER,{component:a,props:{clearable:!0},eventsBySearch:[{name:"keydown",handler(e,l){"Enter"===e.key&&l()}}],handlerProps:(e,{title:l}={})=>({...e,placeholder:`输入${l}`}),setDefaultValue:D}],[e.INPUTNUMBER_RANGE,{component:o,props:{clearable:!0},eventsBySearch:[{name:"keydown",handler(e,l){"Enter"===e.key&&l()}}],handlerProps:(e,{title:l,filterExplicit:t}={})=>({...e,startPlaceholder:1===t?`起始${l}`:"最小值",endPlaceholder:1===t?`截止${l}`:"最大值"}),setDefaultValue:D}],[e.INPUT,{component:n,props:{clearable:!0,allowInput:e=>!e.startsWith(" ")&&!e.endsWith(" ")},eventsBySearch:[{name:"keydown",handler(e,l){"Enter"===e.key&&l()}}],handlerProps:(e,{title:l}={})=>({...e,placeholder:`搜索${l}`}),setDefaultValue:D}],[e.SELECT,{component:p,props:{clearable:!0,filterable:!0,multiple:!1,maxTagCount:"responsive"},eventsBySearch:[{name:"change",handler(e,l,t){const{multiple:r}=t;r&&l()}}],handlerProps(e,{multiple:l,title:t}={}){const r={...e,placeholder:`请选择${t}`};return l&&(r.multiple=!0),r},setDefaultValue:(e,t,r)=>t&&"boolean"==typeof(null==r?void 0:r.multiple)?r.multiple?[l.WHOLE]:l.WHOLE:e}],[e.SELECTDYNAMIC,{component:s,props:{clearable:!0,filterable:!0,multiple:!1,maxTagCount:"responsive"},eventsBySearch:[{name:"change",handler(e,l,t){const{multiple:r}=t;r&&l()}}],handlerProps(e,l={}){const{multiple:t,title:r}=l,a={...e,placeholder:`请选择${r}`};return t&&(a.multiple=!0),a},setDefaultValue:async(e,l,t)=>l&&(null==t?void 0:t._cfg)?await M(null==t?void 0:t._cfg):e}],[e.DATE,{component:i,props:{type:"date",clearable:!0,valueFormat:"yyyy-MM-dd"},handlerProps(e,l={}){const{title:t}=l;return{...e,placeholder:`请选择${t}`}},setDefaultValue:D}],[e.DATE_OUT,{component:u,props:{type:"date",clearable:!0,valueFormat:"yyyy-MM-dd"},handlerProps(e,l={}){const{title:t}=l;return{...e,placeholder:`请选择${t}`}},setDefaultValue:(e,l)=>l&&l!==t.CUSTOM?E(l,"YYYY-MM-DD"):e}],[e.DATE_RANGE_INNER,{component:c,props:{type:"date",clearable:!0,valueFormat:"yyyy-MM-dd"},handlerProps(e,l={}){const{title:t,filterExplicit:r}=l;return{...e,filterExplicit:r,startPlaceholder:`起始${t}`,endPlaceholder:`截止${t}`}},setDefaultValue:D}],[e.DATE_RANGE_OUT,{component:m,props:{type:"daterange",clearable:!0,valueFormat:"yyyy-MM-dd"},handlerProps(e,l={}){const{title:t,filterExplicit:r}=l;return{...e,filterExplicit:r,startPlaceholder:`起始${t}`,endPlaceholder:`截止${t}`}},setDefaultValue:(e,l,t)=>l&&l!==r.CUSTOM&&(null==t?void 0:t.optSetting)?f(l,"YYYY-MM-DD",t.optSetting):e}],[e.DATE_TIME,{component:i,props:{type:"datetime",clearable:!0,valueFormat:"yyyy-MM-dd HH:mm:ss"},handlerProps(e,l={}){const{title:t}=l;return{...e,placeholder:`请选择${t}`}},setDefaultValue:D}],[e.DATETIME_OUT,{component:u,props:{type:"datetime",clearable:!0,valueFormat:"yyyy-MM-dd HH:mm:ss"},handlerProps(e,l={}){const{title:t}=l;return{...e,placeholder:`请选择${t}`}},setDefaultValue:(e,l)=>l&&l!==t.CUSTOM?E(l,"YYYY-MM-DD HH:mm:ss"):e}],[e.DATETIME_RANGE_INNER,{component:c,props:{type:"datetime",clearable:!0,valueFormat:"yyyy-MM-dd HH:mm:ss"},handlerProps(e,l={}){const{title:t,filterExplicit:r}=l;return{...e,filterExplicit:r,startPlaceholder:`起始${t}`,endPlaceholder:`截止${t}`}},setDefaultValue:D}],[e.DATETIME_RANGE_OUT,{component:m,props:{type:"datetimerange",clearable:!0,valueFormat:"yyyy-MM-dd HH:mm:ss"},handlerProps(e,l={}){const{title:t,filterExplicit:r}=l;return{...e,filterExplicit:r,startPlaceholder:`起始${t}`,endPlaceholder:`截止${t}`}},setDefaultValue:(e,l,r)=>l&&l!==t.CUSTOM&&(null==r?void 0:r.optSetting)?f(l,"YYYY-MM-DD HH:mm:ss",r.optSetting):e}],[e.CHECKBOX_GROUP,{component:d,props:{},style:{"line-height":"32px"},handlerProps(e,{valueList:l,multiple:t}={}){const r={...e,multiple:t};return Array.isArray(l)&&(r.options=l.map((({value:e,label:l})=>({value:e,label:l})))),r},setDefaultValue:D}],[e.LABEL,{component:y,props:{},handlerProps:e=>({...e}),setDefaultValue:e=>e&&Array.isArray(e)?e.join("|#|"):e}],[e.SELECTLABEL,{component:h,props:{clearable:!0,filterable:!0,multiple:!1,maxTagCount:"responsive"},handlerProps(e,l={}){const{multiple:t,title:r}=l,a={...e,placeholder:`请选择${r}`};return t&&(a.multiple=!0),a},setDefaultValue:e=>e&&Array.isArray(e)?e.join("|#|"):e}]]);export{T as WidgetCfgMaps};
1
+ import{WidgetTypeEnums as e,WidgetValEnums as l}from"../../types/enums.js";import{DatePresetValEnums as t,DateRangeOutDefEnums as a}from"./enums.js";import{NInputNumber as r}from"naive-ui";import{InputNumberGroup as o,InputCustom as n,Select as p,SelectDynamic as s,DateInner as i,DateOut as u,DateRangeInner as c,DateRangeOut as m,CheckboxGroup as d,LabelInner as y,LabelOut as h,SelectTree as E}from"./components/index.js";import{presetValToTimestamp as f,formatDateRangeInfo as M}from"./helpers/presetValToTimestamp.js";import{setSelectDynamicValue as D}from"./helpers/setDefaultValue.js";const T=e=>null==e?null:e,P=new Map([[e.INPUT_NUMBER,{component:r,props:{clearable:!0},eventsBySearch:[{name:"keydown",handler(e,l){"Enter"===e.key&&l()}}],handlerProps:(e,{title:l}={})=>({...e,placeholder:`输入${l}`}),setDefaultValue:T}],[e.INPUTNUMBER_RANGE,{component:o,props:{clearable:!0},eventsBySearch:[{name:"keydown",handler(e,l){"Enter"===e.key&&l()}}],handlerProps:(e,{title:l,filterExplicit:t}={})=>({...e,startPlaceholder:1===t?`起始${l}`:"最小值",endPlaceholder:1===t?`截止${l}`:"最大值"}),setDefaultValue:T}],[e.INPUT,{component:n,props:{clearable:!0,allowInput:e=>!e.startsWith(" ")&&!e.endsWith(" ")},eventsBySearch:[{name:"keydown",handler(e,l){"Enter"===e.key&&l()}}],handlerProps:(e,{title:l}={})=>({...e,placeholder:`搜索${l}`}),setDefaultValue:T}],[e.SELECT,{component:p,props:{clearable:!0,filterable:!0,multiple:!1,maxTagCount:"responsive"},eventsBySearch:[{name:"change",handler(e,l,t){const{multiple:a}=t;a&&l()}}],handlerProps(e,{multiple:l,title:t}={}){const a={...e,placeholder:`请选择${t}`};return l&&(a.multiple=!0),a},setDefaultValue:(e,t,a)=>t&&"boolean"==typeof(null==a?void 0:a.multiple)?a.multiple?[l.WHOLE]:l.WHOLE:e}],[e.SELECTDYNAMIC,{component:s,props:{clearable:!0,filterable:!0,multiple:!1,maxTagCount:"responsive"},eventsBySearch:[{name:"change",handler(e,l,t){const{multiple:a}=t;a&&l()}}],handlerProps(e,l={}){const{multiple:t,title:a}=l,r={...e,placeholder:`请选择${a}`};return t&&(r.multiple=!0),r},setDefaultValue:async(e,l,t)=>l&&(null==t?void 0:t._cfg)?await D(null==t?void 0:t._cfg):e}],[e.DATE,{component:i,props:{type:"date",clearable:!0,valueFormat:"yyyy-MM-dd"},handlerProps(e,l={}){const{title:t}=l;return{...e,placeholder:`请选择${t}`}},setDefaultValue:T}],[e.DATE_OUT,{component:u,props:{type:"date",clearable:!0,valueFormat:"yyyy-MM-dd"},handlerProps(e,l={}){const{title:t}=l;return{...e,placeholder:`请选择${t}`}},setDefaultValue:(e,l)=>l&&l!==t.CUSTOM?f(l,"YYYY-MM-DD"):e}],[e.DATE_RANGE_INNER,{component:c,props:{type:"date",clearable:!0,valueFormat:"yyyy-MM-dd"},handlerProps(e,l={}){const{title:t,filterExplicit:a}=l;return{...e,filterExplicit:a,startPlaceholder:`起始${t}`,endPlaceholder:`截止${t}`}},setDefaultValue:T}],[e.DATE_RANGE_OUT,{component:m,props:{type:"daterange",clearable:!0,valueFormat:"yyyy-MM-dd"},handlerProps(e,l={}){const{title:t,filterExplicit:a}=l;return{...e,filterExplicit:a,startPlaceholder:`起始${t}`,endPlaceholder:`截止${t}`}},setDefaultValue:(e,l,t)=>l&&l!==a.CUSTOM&&(null==t?void 0:t.optSetting)?M(l,"YYYY-MM-DD",t.optSetting):e}],[e.DATE_TIME,{component:i,props:{type:"datetime",clearable:!0,valueFormat:"yyyy-MM-dd HH:mm:ss"},handlerProps(e,l={}){const{title:t}=l;return{...e,placeholder:`请选择${t}`}},setDefaultValue:T}],[e.DATETIME_OUT,{component:u,props:{type:"datetime",clearable:!0,valueFormat:"yyyy-MM-dd HH:mm:ss"},handlerProps(e,l={}){const{title:t}=l;return{...e,placeholder:`请选择${t}`}},setDefaultValue:(e,l)=>l&&l!==t.CUSTOM?f(l,"YYYY-MM-DD HH:mm:ss"):e}],[e.DATETIME_RANGE_INNER,{component:c,props:{type:"datetime",clearable:!0,valueFormat:"yyyy-MM-dd HH:mm:ss"},handlerProps(e,l={}){const{title:t,filterExplicit:a}=l;return{...e,filterExplicit:a,startPlaceholder:`起始${t}`,endPlaceholder:`截止${t}`}},setDefaultValue:T}],[e.DATETIME_RANGE_OUT,{component:m,props:{type:"datetimerange",clearable:!0,valueFormat:"yyyy-MM-dd HH:mm:ss"},handlerProps(e,l={}){const{title:t,filterExplicit:a}=l;return{...e,filterExplicit:a,startPlaceholder:`起始${t}`,endPlaceholder:`截止${t}`}},setDefaultValue:(e,l,a)=>l&&l!==t.CUSTOM&&(null==a?void 0:a.optSetting)?M(l,"YYYY-MM-DD HH:mm:ss",a.optSetting):e}],[e.CHECKBOX_GROUP,{component:d,props:{},style:{"line-height":"32px"},handlerProps(e,{valueList:l,multiple:t}={}){const a={...e,multiple:t};return Array.isArray(l)&&(a.options=l.map((({value:e,label:l})=>({value:e,label:l})))),a},setDefaultValue:T}],[e.LABEL,{component:y,props:{},handlerProps:e=>({...e}),setDefaultValue:e=>e&&Array.isArray(e)?e.join("|#|"):e}],[e.SELECTLABEL,{component:h,props:{clearable:!0,filterable:!0,multiple:!1,maxTagCount:"responsive"},handlerProps(e,l={}){const{multiple:t,title:a}=l,r={...e,placeholder:`请选择${a}`};return t&&(r.multiple=!0),r},setDefaultValue:e=>e&&Array.isArray(e)?e.join("|#|"):e}],[e.SELECTTREE,{component:E,props:{clearable:!0,filterable:!0,multiple:!1,maxTagCount:"responsive"},eventsBySearch:[{name:"change",handler(e,l,t){const{multiple:a}=t;a&&l()}}],handlerProps(e,{multiple:l,title:t}={}){const a={...e,placeholder:`请选择${t}`};return l&&(a.multiple=!0),a},setDefaultValue:e=>e}]]);export{P as WidgetCfgMaps};
@@ -10,6 +10,9 @@ export default function useAdvanced(): {
10
10
  widgetType: string | null;
11
11
  originType: string | null;
12
12
  valueList: {
13
+ name: string;
14
+ value: any;
15
+ }[] | {
13
16
  value: any;
14
17
  label: any;
15
18
  }[] | undefined;
@@ -24,6 +27,7 @@ export default function useAdvanced(): {
24
27
  linkageFieldKeys: string[];
25
28
  };
26
29
  rangeFilter: boolean | undefined;
30
+ componentProps: any;
27
31
  unit: any;
28
32
  isAccurateSearchVal: boolean;
29
33
  _extendData: IExtendConfigurationType;
@@ -38,6 +42,6 @@ export default function useAdvanced(): {
38
42
  accurateSearch: any;
39
43
  }[];
40
44
  getCacheDef: (item: ISearchType, cacheList: string[]) => string | string[];
41
- transformClassifyChild: (conObjList: any, searchFieldList: any[]) => {};
42
- transformParams: (paramsList: any[]) => {};
45
+ transformClassifyChild: (conObjList: any, searchFieldList: any[]) => any;
46
+ transformParams: (paramsList: any[]) => any;
43
47
  };
@@ -1 +1 @@
1
- import{WidgetOptionEnums as e,WidgetTypeEnums as i,selectModeEnums as t,WidgetValEnums as n}from"../types/enums.js";import{isString as l}from"lodash-es";import{formatDateRangeInfo as a,presetValToTimestamp as o}from"../components/render-widget/helpers/presetValToTimestamp.js";import{DatePresetValEnums as r}from"../components/render-widget/enums.js";const u={[e.RADIO]:"0",[e.MULTIPLE]:"1",[e.ALL]:"0",[e.SELECT_TIME]:"1",[e.PAST_TIME]:"2",[e.FUTURE_TIME]:"3"};function E(){return{transformData:function(n,l){return n.map((n=>{var a,o,r;const{optionInfo:E={list:[],manualMapping:!0,dynamicOptionInfo:{},showWholeOption:!1,showMode:"DROPDOWN"},type:s,defaultValue:c,optionType:p,filterExplicit:T,rangeFilter:d}=n,m={},f={title:(v=n).title,alias:v.customTitle,isShowSearch:v.isShowSearch?1:0,filterExplicit:v.filterExplicit?1:0,explicitRequired:v.explicitRequired?1:0,advanceOptionSetting:v.optionType?u[v.optionType]:"",placeholder:v.remark,advanceColWidth:v.width,accurateSearch:v.accurateSearch?v.accurateSearch:{}};var v;let g,h,y=s;T?(g=s===i.SELECT&&p===e.MULTIPLE?null==c?void 0:c.valueList:null==(a=null==c?void 0:c.valueList)?void 0:a[0],h=null==c?void 0:c.unit,s===i.LABEL&&(y="SELECTLABEL",g=null==c?void 0:c.valueList),s===i.DATE&&(y="DATE_OUT"),s===i.DATE_TIME&&(y="DATETIME_OUT"),s===i.SELECT&&(null==E?void 0:E.manualMapping)&&(null==E?void 0:E.showMode)==t.TILE&&(y="CHECKBOX_GROUP")):s===i.SELECT&&(null==E?void 0:E.list)&&(null==E?void 0:E.list.length)<10&&(y="CHECKBOX_GROUP"),d&&(s===i.INPUT_NUMBER&&(y="INPUTNUMBER_RANGE"),s===i.DATE&&(y=T?"DATE_RANGE_OUT":"DATE_RANGE_INNER"),s===i.DATE_TIME&&(y=T?"DATETIME_RANGE_OUT":"DATETIME_RANGE_INNER")),s===i.SELECT&&!1===(null==E?void 0:E.manualMapping)&&(y=i.SELECTDYNAMIC);const A={isRender:!0,widgetType:y,originType:s,valueList:null==(o=null==E?void 0:E.list)?void 0:o.map((({name:e,value:i})=>({value:i,label:e}))),defaultValue:g,defValueUnit:h,optionSetting:p,multiple:p===e.MULTIPLE||y===i.SELECTLABEL,manualMapping:null==E?void 0:E.manualMapping,showWholeOption:null==E?void 0:E.showWholeOption,dynamicOptionInfo:null==E?void 0:E.dynamicOptionInfo,classifyStr:null==c?void 0:c.classifyStr,linkageFieldKeys:null!=(r=null==c?void 0:c.linkageFieldKeys)?r:[]};return{...f,fieldType:n.dataType,columnName:n.name,settingObj:m,setting:JSON.stringify(m),widgetCfg:A,rangeFilter:d,unit:null!=h?h:"",isAccurateSearchVal:!1,_extendData:null!=l?l:{}}}))},getCacheDef:function(e,t){const{widgetType:n,widgetCfg:l}=e;return[i.SELECT,i.CHECKBOX_GROUP,i.SELECTDYNAMIC].includes(n)&&l.multiple?t:t[0]},transformClassifyChild:function(e,t){const n={};return e&&e.length>0&&e.forEach((e=>{const l=e.field_key;n[l]="";const u=t.find((e=>e.name===l));if(u){if(e.value){const t=Array.isArray(e.value)&&u.type===i.SELECT?e.value:e.value.toString();n[l]=t}if(e.unit&&e.unit!==r.CUSTOM){let t="";u.type===i.DATE&&(t=u.rangeFilter?a(e.unit,"YYYY-MM-DD",u.optionType):o(e.unit,"YYYY-MM-DD")),u.type===i.DATE_TIME&&(t=u.rangeFilter?a(e.unit,"YYYY-MM-DD HH:mm:ss",u.optionType):o(e.unit,"YYYY-MM-DD HH:mm:ss")),n[l]=t}}})),n},transformParams:function(e){const t={},a=[i.SELECT,i.SELECTDYNAMIC,i.CHECKBOX_GROUP];return e&&e.length>0&&e.forEach((e=>{let i="";const o=e.field_key;e.value&&(i=a.includes(e.widgetType)||e.value&&e.value.length>1?e.value.map((e=>l(e)&&e.includes("&")?e.split("&")[1]:e)):e.value.toString()),Array.isArray(i)&&i.length>0&&i.includes(n.WHOLE)||(Object.keys(e).includes("isAccurateSearch")&&(t[e.accurateSearchKey]=e.isAccurateSearch?1:0),t[o]=i)})),t}}}export{E as default};
1
+ import{WidgetOptionEnums as e,WidgetTypeEnums as i,selectModeEnums as t,WidgetValEnums as n}from"../types/enums.js";import{isString as l}from"lodash-es";import{formatDateRangeInfo as a,presetValToTimestamp as o}from"../components/render-widget/helpers/presetValToTimestamp.js";import{DatePresetValEnums as r}from"../components/render-widget/enums.js";const u={[e.RADIO]:"0",[e.MULTIPLE]:"1",[e.ALL]:"0",[e.SELECT_TIME]:"1",[e.PAST_TIME]:"2",[e.FUTURE_TIME]:"3"};function E(){return{transformData:function(n,l){return n.map((n=>{var a,o,r;const{optionInfo:E={list:[],manualMapping:!0,dynamicOptionInfo:{},showWholeOption:!1,showMode:"DROPDOWN"},type:s,defaultValue:T,optionType:c,filterExplicit:p,rangeFilter:d,componentProps:m}=n,f={},v={title:(L=n).title,alias:L.customTitle,isShowSearch:L.isShowSearch?1:0,filterExplicit:L.filterExplicit?1:0,explicitRequired:L.explicitRequired?1:0,advanceOptionSetting:L.optionType?u[L.optionType]:"",placeholder:L.remark,advanceColWidth:L.width,accurateSearch:L.accurateSearch?L.accurateSearch:{}};var L;let S,g,C=s;p?(S=s!==i.SELECT&&s!==i.SELECTTREE||c!==e.MULTIPLE?null==(a=null==T?void 0:T.valueList)?void 0:a[0]:null==T?void 0:T.valueList,g=null==T?void 0:T.unit,s===i.LABEL&&(C="SELECTLABEL",S=null==T?void 0:T.valueList),s===i.DATE&&(C="DATE_OUT"),s===i.DATE_TIME&&(C="DATETIME_OUT"),s===i.SELECT&&(null==E?void 0:E.manualMapping)&&(null==E?void 0:E.showMode)==t.TILE&&(C="CHECKBOX_GROUP")):s===i.SELECT&&(null==E?void 0:E.list)&&(null==E?void 0:E.list.length)<10&&(C="CHECKBOX_GROUP"),d&&(s===i.INPUT_NUMBER&&(C="INPUTNUMBER_RANGE"),s===i.DATE&&(C=p?"DATE_RANGE_OUT":"DATE_RANGE_INNER"),s===i.DATE_TIME&&(C=p?"DATETIME_RANGE_OUT":"DATETIME_RANGE_INNER")),s===i.SELECT&&!1===(null==E?void 0:E.manualMapping)&&(C=i.SELECTDYNAMIC);const h={isRender:!0,widgetType:C,originType:s,valueList:s===i.SELECTTREE?null==E?void 0:E.list:null==(o=null==E?void 0:E.list)?void 0:o.map((({name:e,value:i})=>({value:i,label:e}))),defaultValue:S,defValueUnit:g,optionSetting:c,multiple:c===e.MULTIPLE||C===i.SELECTLABEL,manualMapping:null==E?void 0:E.manualMapping,showWholeOption:null==E?void 0:E.showWholeOption,dynamicOptionInfo:null==E?void 0:E.dynamicOptionInfo,classifyStr:null==T?void 0:T.classifyStr,linkageFieldKeys:null!=(r=null==T?void 0:T.linkageFieldKeys)?r:[]};return{...v,fieldType:n.dataType,columnName:n.name,settingObj:f,setting:JSON.stringify(f),widgetCfg:h,rangeFilter:d,componentProps:m,unit:null!=g?g:"",isAccurateSearchVal:!1,_extendData:null!=l?l:{}}}))},getCacheDef:function(e,t){const{widgetType:n,widgetCfg:l}=e;return[i.SELECT,i.CHECKBOX_GROUP,i.SELECTDYNAMIC].includes(n)&&l.multiple?t:t[0]},transformClassifyChild:function(e,t){const n={};return e&&e.length>0&&e.forEach((e=>{const l=e.field_key;n[l]="";const u=t.find((e=>e.name===l));if(u){if(e.value){const t=Array.isArray(e.value)&&u.type===i.SELECT?e.value:e.value.toString();n[l]=t}if(e.unit&&e.unit!==r.CUSTOM){let t="";u.type===i.DATE&&(t=u.rangeFilter?a(e.unit,"YYYY-MM-DD",u.optionType):o(e.unit,"YYYY-MM-DD")),u.type===i.DATE_TIME&&(t=u.rangeFilter?a(e.unit,"YYYY-MM-DD HH:mm:ss",u.optionType):o(e.unit,"YYYY-MM-DD HH:mm:ss")),n[l]=t}}})),n},transformParams:function(e){const t={},a=[i.SELECT,i.SELECTDYNAMIC,i.CHECKBOX_GROUP,i.SELECTTREE];return e&&e.length>0&&e.forEach((e=>{let i="";const o=e.field_key;e.value&&(i=a.includes(e.widgetType)||e.value&&e.value.length>1?e.value.map((e=>l(e)&&e.includes("&")?e.split("&")[1]:e)):e.value.toString()),Array.isArray(i)&&i.length>0&&i.includes(n.WHOLE)||(Object.keys(e).includes("isAccurateSearch")&&(t[e.accurateSearchKey]=e.isAccurateSearch?1:0),t[o]=i)})),t}}}export{E as default};
@@ -35,6 +35,7 @@ export declare const WidgetTypeEnums: {
35
35
  LABEL: string;
36
36
  SELECTLABEL: string;
37
37
  SELECTDYNAMIC: string;
38
+ SELECTTREE: string;
38
39
  };
39
40
  export declare const WidgetOptionEnums: {
40
41
  RADIO: string;
@@ -1 +1 @@
1
- const E={TEXT:"TEXT",NUMBER:"NUMBER",DATE:"DATE",DATE_TIME:"DATETIME",TIME:"TIME",BOOLEAN:"BOOLEAN"},T={SQL:"SQL",API:"API"},A={DROPDOWN:"DROPDOWN",TILE:"TILE"},_={MANUAL:"manual",DICT:"dict"},R={INPUT_NUMBER:"NUMBER",INPUT:"TEXT",SELECT:"SELECT",DATE:"DATE",DATE_OUT:"DATE_OUT",DATE_TIME:"DATETIME",DATETIME_OUT:"DATETIME_OUT",CHECKBOX_GROUP:"CHECKBOX_GROUP",INPUTNUMBER_RANGE:"INPUTNUMBER_RANGE",DATE_RANGE_OUT:"DATE_RANGE_OUT",DATE_RANGE_INNER:"DATE_RANGE_INNER",DATETIME_RANGE_OUT:"DATETIME_RANGE_OUT",DATETIME_RANGE_INNER:"DATETIME_RANGE_INNER",LABEL:"LABEL",SELECTLABEL:"SELECTLABEL",SELECTDYNAMIC:"SELECTDYNAMIC"},N={RADIO:"SELECT_SINGLE",MULTIPLE:"SELECT_MULTIPLE",ALL:"DATETIME_WHOLE",SELECT_TIME:"DATETIME_SELECT",PAST_TIME:"DATETIME_PAST",FUTURE_TIME:"DATETIME_FUTURE"},O={CUSTOM:"CUSTOM",FIRST_VAL:"FIRST",WHOLE:"WHOLE",NOW:"NOW",TODAY:"TODAY",TODAY_START:"TODAY_START",TODAY_END:"TODAY_END",TOMORROW:"TOMORROW",TOMORROW_START:"TOMORROW_START",TOMORROW_END:"TOMORROW_END",YESTERDAY:"YESTERDAY",YESTERDAY_START:"YESTERDAY_START",YESTERDAY_END:"YESTERDAY_END",THIS_WEEK:"THIS_WEEK",WEEK_START:"THIS_WEEK_START",WEEK_END:"THIS_WEEK_END",NEXT_WEEK:"NEXT_WEEK",LAST_WEEK:"LAST_WEEK",THIS_MONTH:"THIS_MONTH",MONTH_START:"THIS_MONTH_START",MONTH_END:"THIS_MONTH_END",NEXT_MONTH:"NEXT_MONTH",LAST_MONTH:"LAST_MONTH",THIS_QUARTER:"THIS_QUARTER",NEXT_QUARTER:"NEXT_QUARTER",LAST_QUARTER:"LAST_QUARTER",THIS_YEAR:"THIS_YEAR",NEXT_YEAR:"NEXT_YEAR",LAST_YEAR:"LAST_YEAR"},S={NULL:"NULL",EQUAL:"EQ"};export{S as ConditionEnums,T as DataTypeEnums,E as FieldTypeEnums,_ as MappingMethodEnums,N as WidgetOptionEnums,R as WidgetTypeEnums,O as WidgetValEnums,A as selectModeEnums};
1
+ const E={TEXT:"TEXT",NUMBER:"NUMBER",DATE:"DATE",DATE_TIME:"DATETIME",TIME:"TIME",BOOLEAN:"BOOLEAN"},T={SQL:"SQL",API:"API"},A={DROPDOWN:"DROPDOWN",TILE:"TILE"},_={MANUAL:"manual",DICT:"dict"},R={INPUT_NUMBER:"NUMBER",INPUT:"TEXT",SELECT:"SELECT",DATE:"DATE",DATE_OUT:"DATE_OUT",DATE_TIME:"DATETIME",DATETIME_OUT:"DATETIME_OUT",CHECKBOX_GROUP:"CHECKBOX_GROUP",INPUTNUMBER_RANGE:"INPUTNUMBER_RANGE",DATE_RANGE_OUT:"DATE_RANGE_OUT",DATE_RANGE_INNER:"DATE_RANGE_INNER",DATETIME_RANGE_OUT:"DATETIME_RANGE_OUT",DATETIME_RANGE_INNER:"DATETIME_RANGE_INNER",LABEL:"LABEL",SELECTLABEL:"SELECTLABEL",SELECTDYNAMIC:"SELECTDYNAMIC",SELECTTREE:"SELECTTREE"},N={RADIO:"SELECT_SINGLE",MULTIPLE:"SELECT_MULTIPLE",ALL:"DATETIME_WHOLE",SELECT_TIME:"DATETIME_SELECT",PAST_TIME:"DATETIME_PAST",FUTURE_TIME:"DATETIME_FUTURE"},O={CUSTOM:"CUSTOM",FIRST_VAL:"FIRST",WHOLE:"WHOLE",NOW:"NOW",TODAY:"TODAY",TODAY_START:"TODAY_START",TODAY_END:"TODAY_END",TOMORROW:"TOMORROW",TOMORROW_START:"TOMORROW_START",TOMORROW_END:"TOMORROW_END",YESTERDAY:"YESTERDAY",YESTERDAY_START:"YESTERDAY_START",YESTERDAY_END:"YESTERDAY_END",THIS_WEEK:"THIS_WEEK",WEEK_START:"THIS_WEEK_START",WEEK_END:"THIS_WEEK_END",NEXT_WEEK:"NEXT_WEEK",LAST_WEEK:"LAST_WEEK",THIS_MONTH:"THIS_MONTH",MONTH_START:"THIS_MONTH_START",MONTH_END:"THIS_MONTH_END",NEXT_MONTH:"NEXT_MONTH",LAST_MONTH:"LAST_MONTH",THIS_QUARTER:"THIS_QUARTER",NEXT_QUARTER:"NEXT_QUARTER",LAST_QUARTER:"LAST_QUARTER",THIS_YEAR:"THIS_YEAR",NEXT_YEAR:"NEXT_YEAR",LAST_YEAR:"LAST_YEAR"},S={NULL:"NULL",EQUAL:"EQ"};export{S as ConditionEnums,T as DataTypeEnums,E as FieldTypeEnums,_ as MappingMethodEnums,N as WidgetOptionEnums,R as WidgetTypeEnums,O as WidgetValEnums,A as selectModeEnums};
@@ -143,6 +143,7 @@ export type IApiServerType = {
143
143
  remark?: string;
144
144
  keyword?: boolean;
145
145
  accurateSearch?: any;
146
+ componentProps?: any;
146
147
  };
147
148
  export type dynamicOptionInfoType = {
148
149
  filterKeys: string[];
package/es/env.d.ts CHANGED
@@ -1,25 +1,25 @@
1
- /// <reference types="vite/client" />
2
-
3
- interface ImportMetaEnv {
4
- readonly VITE_APP_TYPE: string;
5
- // 更多环境变量...
6
- }
7
-
8
- interface ImportMeta {
9
- readonly env: ImportMetaEnv;
10
- }
11
-
12
- declare module '*.vue' {
13
- // @ts-ignore
14
- import type { App, defineComponent } from 'vue';
15
- // // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
16
- // // const component: DefineComponent<{}, {}, any>
17
- const component: ReturnType<typeof defineComponent> & {
18
- install(app: App): void;
19
- };
20
- // @ts-ignore
21
- export default component;
22
- }
23
-
24
- declare module '*.js';
25
-
1
+ /// <reference types="vite/client" />
2
+
3
+ interface ImportMetaEnv {
4
+ readonly VITE_APP_TYPE: string;
5
+ // 更多环境变量...
6
+ }
7
+
8
+ interface ImportMeta {
9
+ readonly env: ImportMetaEnv;
10
+ }
11
+
12
+ declare module '*.vue' {
13
+ // @ts-ignore
14
+ import type { App, defineComponent } from 'vue';
15
+ // // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
16
+ // // const component: DefineComponent<{}, {}, any>
17
+ const component: ReturnType<typeof defineComponent> & {
18
+ install(app: App): void;
19
+ };
20
+ // @ts-ignore
21
+ export default component;
22
+ }
23
+
24
+ declare module '*.js';
25
+
@@ -1 +1 @@
1
- var e="@cnhis-design-vue/shared",i="3.2.9-beta.0",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.9-beta.0",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.9-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.9-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};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cnhis-design-vue",
3
- "version": "3.2.9-beta.0",
3
+ "version": "3.2.9-beta.2",
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": "eedf3c673aa59975f30fbf69f385a351cb6857e9"
75
+ "gitHead": "b2f295897ce7f961a079e38ebcdd6f1a3ed37aeb"
76
76
  }