cnhis-design-vue 3.2.9-beta.1 → 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.
- package/es/components/base-search/index.d.ts +6 -2
- package/es/components/base-search/src/index.vue.d.ts +6 -2
- package/es/components/classification/index.d.ts +3 -1
- package/es/components/classification/src/components/search-filter/index.vue.d.ts +2 -0
- package/es/components/classification/src/components/set-classification/index.vue.d.ts +2 -0
- package/es/components/classification/src/components/table-modal/index.vue.d.ts +0 -3
- package/es/components/classification/src/index.vue.d.ts +3 -1
- package/es/components/field-set/src/FieldColor.vue.d.ts +1 -1
- package/es/components/field-set/src/components/edit-dialog.vue.d.ts +1 -1
- package/es/components/iho-chat/src/components/ChatFile.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatMain.vue2.js +1 -1
- package/es/components/iho-chat/src/components/PersonProfile.vue2.js +1 -1
- package/es/components/quick-search/index.d.ts +6 -2
- package/es/components/quick-search/src/index.vue.d.ts +6 -2
- package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
- package/es/components/table-filter/src/components/bi-filter/ValueCfg.vue.d.ts +1 -0
- package/es/components/table-filter/src/components/bi-filter/index.vue.d.ts +1 -0
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +1 -0
- package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +1 -0
- package/es/components/table-filter/src/components/render-widget/components/SelectTree.vue.d.ts +51 -0
- package/es/components/table-filter/src/components/render-widget/components/SelectTree.vue.js +1 -0
- package/es/components/table-filter/src/components/render-widget/components/SelectTree.vue2.js +1 -0
- package/es/components/table-filter/src/components/render-widget/components/index.d.ts +49 -1
- package/es/components/table-filter/src/components/render-widget/components/index.js +1 -1
- package/es/components/table-filter/src/components/render-widget/index.vue.js +1 -1
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +65 -0
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.js +1 -1
- package/es/components/table-filter/src/hooks/useAdvanced.d.ts +6 -2
- package/es/components/table-filter/src/hooks/useAdvanced.js +1 -1
- package/es/components/table-filter/src/types/enums.d.ts +1 -0
- package/es/components/table-filter/src/types/enums.js +1 -1
- package/es/components/table-filter/src/types/index.d.ts +1 -0
- package/es/env.d.ts +25 -25
- package/es/shared/package.json.js +1 -1
- 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: {
|
@@ -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: {
|
@@ -552,7 +552,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
552
552
|
formRef: import("vue").Ref<any>;
|
553
553
|
conditionRef: import("vue").Ref<any>;
|
554
554
|
filterVisible: import("vue").Ref<boolean>;
|
555
|
-
title: import("vue").ComputedRef<"
|
555
|
+
title: import("vue").ComputedRef<"新增" | "修改" | "过滤条件">;
|
556
556
|
model: {
|
557
557
|
name: string;
|
558
558
|
color: string;
|
@@ -44,7 +44,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
44
44
|
formRef: import("vue").Ref<any>;
|
45
45
|
conditionRef: import("vue").Ref<any>;
|
46
46
|
filterVisible: import("vue").Ref<boolean>;
|
47
|
-
title: import("vue").ComputedRef<"
|
47
|
+
title: import("vue").ComputedRef<"新增" | "修改" | "过滤条件">;
|
48
48
|
model: {
|
49
49
|
name: string;
|
50
50
|
color: string;
|
@@ -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">\
|
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">\
|
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
|
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">\
|
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: {
|
package/es/components/table-filter/src/components/render-widget/components/SelectTree.vue.d.ts
ADDED
@@ -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
|
-
|
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"))),
|
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
|
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
|
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:
|
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};
|
@@ -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};
|
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.
|
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.
|
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": "
|
75
|
+
"gitHead": "b2f295897ce7f961a079e38ebcdd6f1a3ed37aeb"
|
76
76
|
}
|