cnhis-design-vue 3.2.9-beta.8 → 3.2.9-release.3
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/ai-chat/src/components/ChatMain.js +1 -1
- package/es/components/base-search/index.d.ts +2 -0
- package/es/components/base-search/src/index.vue.d.ts +2 -0
- package/es/components/button-print/index.d.ts +30 -13
- package/es/components/button-print/src/ButtonPrint.vue.d.ts +30 -13
- package/es/components/button-print/src/ButtonPrint.vue2.js +1 -1
- package/es/components/button-print/src/components/NewPrintComponent.vue.d.ts +9 -4
- package/es/components/button-print/src/components/NewPrintComponent.vue2.js +1 -1
- package/es/components/button-print/src/components/OldPrintComponent.vue.d.ts +9 -4
- package/es/components/button-print/src/components/OldPrintComponent.vue2.js +1 -1
- package/es/components/button-print/src/utils/print.d.ts +8 -6
- package/es/components/button-print/src/utils/print.js +1 -1
- package/es/components/classification/index.d.ts +87 -0
- package/es/components/classification/src/components/search-filter/index.vue.d.ts +87 -0
- package/es/components/classification/src/components/set-classification/index.vue.d.ts +87 -0
- package/es/components/classification/src/components/table-modal/index.vue.d.ts +3 -0
- package/es/components/classification/src/index.vue.d.ts +87 -0
- package/es/components/date-picker/index.d.ts +29 -0
- package/es/components/date-picker/src/DatePicker.vue.d.ts +30 -1
- package/es/components/date-picker/src/DatePicker.vue2.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useLeft.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useOther.js +1 -1
- package/es/components/field-set/index.d.ts +8 -1
- package/es/components/field-set/src/FieldColor.vue.d.ts +89 -6
- package/es/components/field-set/src/FieldColor.vue2.js +1 -1
- package/es/components/field-set/src/FieldFilter.vue.d.ts +31 -6
- package/es/components/field-set/src/FieldFilter.vue2.js +1 -1
- package/es/components/field-set/src/FieldSet.vue.d.ts +73 -30
- package/es/components/field-set/src/FieldSet.vue2.js +1 -1
- package/es/components/field-set/src/Index.vue.d.ts +8 -1
- package/es/components/field-set/src/Index.vue2.js +1 -1
- package/es/components/field-set/src/TableStyle.vue2.js +1 -1
- package/es/components/field-set/src/components/condition.vue.d.ts +29 -0
- package/es/components/field-set/src/components/edit-dialog.vue.d.ts +58 -0
- package/es/components/field-set/src/components/edit-filter.vue.d.ts +29 -0
- package/es/components/field-set/src/components/table-row.vue.d.ts +28 -1
- package/es/components/field-set/src/components/table-row.vue2.js +1 -1
- package/es/components/field-set/src/types/index.d.ts +4 -3
- package/es/components/field-set/src/utils/index.js +1 -1
- package/es/components/field-set/style/index.css +1 -1
- package/es/components/form-render/src/components/renderer/select.d.ts +2 -1
- package/es/components/form-render/src/components/renderer/select.js +1 -1
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
- package/es/components/iho-chat/index.d.ts +316 -6
- package/es/components/iho-chat/src/Index.vue.d.ts +316 -6
- package/es/components/iho-chat/src/Index.vue2.js +1 -1
- package/es/components/iho-chat/src/api/index.js +1 -1
- package/es/components/iho-chat/src/components/ChatAdd.vue.d.ts +5 -0
- package/es/components/iho-chat/src/components/ChatAdd.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatFile.vue.d.ts +121 -1
- package/es/components/iho-chat/src/components/ChatFile.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatFooter.vue.d.ts +6 -0
- package/es/components/iho-chat/src/components/ChatFooter.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatHeader.vue.d.ts +160 -2
- package/es/components/iho-chat/src/components/ChatMain.vue.d.ts +122 -0
- package/es/components/iho-chat/src/components/ChatMain.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatRecord.vue.d.ts +29 -0
- package/es/components/iho-chat/src/components/ChatRecord.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatSet.vue.d.ts +6 -1
- package/es/components/iho-chat/src/components/ChatSet.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ContextMenu.js +1 -1
- package/es/components/iho-chat/src/components/MultipleVideo.vue.d.ts +5 -0
- package/es/components/iho-chat/src/components/PersonProfile.vue2.js +1 -1
- package/es/components/iho-chat/src/components/SiderList.vue.d.ts +1 -3
- package/es/components/iho-chat/src/components/SiderList.vue2.js +1 -1
- package/es/components/iho-chat/src/constants/index.d.ts +2 -1
- package/es/components/iho-chat/src/constants/index.js +1 -1
- package/es/components/iho-chat/src/hooks/useSearchUserList.js +1 -1
- package/es/components/iho-chat/src/hooks/useSession.js +1 -1
- package/es/components/iho-chat/src/hooks/useState.d.ts +6 -0
- package/es/components/iho-chat/src/hooks/useState.js +1 -1
- package/es/components/iho-chat/src/types/index.d.ts +3 -1
- package/es/components/iho-chat/src/types/index.js +1 -1
- package/es/components/iho-chat/src/utils/chatSock.js +1 -1
- package/es/components/iho-chat/style/index.css +1 -1
- package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/filter.vue.d.ts +29 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +29 -0
- package/es/components/iho-table/src/plugins/verticalTablePlugin/src/hooks/index.js +1 -1
- package/es/components/iho-table/src/plugins/verticalTablePlugin/src/hooks/useRowHeight.d.ts +2 -0
- package/es/components/iho-table/src/plugins/verticalTablePlugin/src/hooks/useRowHeight.js +1 -0
- package/es/components/iho-table/src/types/index.d.ts +3 -0
- package/es/components/iho-table/style/index.css +1 -1
- package/es/components/index.css +1 -1
- package/es/components/quick-search/index.d.ts +3 -0
- package/es/components/quick-search/src/index.vue.d.ts +3 -0
- package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
- package/es/components/table-filter/src/components/bi-filter/ValueCfg.vue.d.ts +29 -0
- package/es/components/table-filter/src/components/bi-filter/components/Date.vue.d.ts +29 -0
- package/es/components/table-filter/src/components/bi-filter/components/index.d.ts +29 -0
- package/es/components/table-filter/src/components/bi-filter/index.vue.d.ts +29 -0
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +58 -0
- package/es/components/table-filter/src/components/classify-filter/components/Date.vue.d.ts +29 -0
- package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue.d.ts +29 -0
- package/es/components/table-filter/src/components/classify-filter/components/index.d.ts +58 -0
- package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +58 -0
- package/es/components/table-filter/src/components/render-widget/components/DateInner.vue.d.ts +29 -0
- package/es/components/table-filter/src/components/render-widget/components/DateOut.vue.d.ts +29 -0
- package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue.d.ts +29 -0
- package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue.d.ts +29 -0
- package/es/components/table-filter/src/components/render-widget/components/index.d.ts +116 -0
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +116 -0
- package/es/components/table-filter/src/hooks/useAdvanced.d.ts +1 -0
- package/es/components/table-filter/src/hooks/useAdvanced.js +1 -1
- package/es/components/table-filter/src/hooks/useRenderWidget.js +1 -1
- package/es/components/table-filter/src/types/index.d.ts +2 -0
- package/es/components/vod-chunk-upload/src/chunk-upload-new.vue2.js +1 -1
- package/es/env.d.ts +25 -25
- package/es/shared/package.json.js +1 -1
- package/es/shared/utils/index.d.ts +1 -0
- package/es/shared/utils/index.js +1 -1
- package/package.json +2 -2
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,
|
1
|
+
import{defineComponent as e,ref as l,computed as i,reactive as t,toRef 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 h,createElementVNode as f,Fragment as p,renderList as m,normalizeStyle as y,withCtx as v,createTextVNode as b,toDisplayString as g,createVNode as x,normalizeClass as k,mergeProps as w,renderSlot as S}from"vue";import{NInput as C,NCheckbox as _,NTooltip as A,NIcon as W,NPopconfirm as E,NButton as H}from"naive-ui";import D from"../../../shared/components/VueDraggable/src/vuedraggable.js";import F from"./components/table-row.vue.js";import{isArray as M,cloneDeep as P,isString as R,omit as N}from"lodash-es";import{isDisable as j,setStyle as B,isDraggableItem as V,isDraggable as O,getGroupTree as q}from"./utils/index.js";import{uuidGenerator as I}from"../../../shared/utils/index.js";import{HelpCircleSharp as K}from"@vicons/ionicons5";const U={class:"main-wrapper"},T={class:"main-wrapper__table-header"},L=f("span",null,"数值越小,优先级越高",-1),G=["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},hideExpressionConfig:{type:Object},primaryKey:{type:String,default:"id"},titleRender:{type:Function}},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"},Y=l(Date.now()),Z=l(""),ee=l(),le=l(),ie=l([]),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:"checkbox",isHeadCheckHide:!0,field:"isSearch",hide:!0},{title:"求和",type:"checkbox",isHeadCheckHide:!0,field:"isSum",hide:!0},{title:"平均值",type:"checkbox",isHeadCheckHide:!0,field:"isAvg",hide:!0},{title:"脱敏配置",type:"select",field:"hideExpression",hide:!0}],oe=l([]),de=i((()=>{var e;return(null==(e=le.value)?void 0:e.scrollWidth)?le.value.scrollWidth+"px":"auto"})),ae=i((()=>ie.value.flat())),re=i((()=>ae.value.some((e=>e.feildDescribe)))),se=t({columns:oe,data:ae,onUpdateChecked:function({checked:e,column:l}){const i=!e||ve(l.field);l.checkedAll=!i},draggable:Q.rowDraggable,isFieldSet:!0,fieldDescribeMode:Q.fieldDescribeMode,developMode:Q.developMode,columnWidthProps:Q.columnWidthProps,hideExpressionOption:o(Q.hideExpressionConfig||{option:[]},"option"),primaryKey:o(Q,"primaryKey"),titleRender:Q.titleRender}),ne={keyword:Z.value,idx:0,startIdx:0},ue=()=>{J("save")},ce=()=>{J("close")};function he(){ie.value=fe(),ye(),Y.value=Date.now(),J("reset")}function fe(){const e=P(Q.fields).map((e=>({...e,uuid:I()})));return Object.keys(X).forEach((l=>{e.forEach((e=>{var i;"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=!!O(e),M(null==(i=e.relation)?void 0:i.fieldList)&&e.relation.fieldList.forEach((e=>{1==e.isSearch&&(e.checked=!0)}))}))})),function(e){if(Q.groupSetting){return q(Q.groupSetting,e).reduce(((i,t)=>{const o=R(t)?e.find((e=>e.name===t)):l(t.children);return o&&i.push(o),i}),[])}return e;function l(i){const t=[];return i.forEach((i=>{if(i.children)t.push(...l(i.children));else{const l=e.find((e=>e.name===i));l&&t.push(l)}})),t}}(e)}function pe(){const e=ne.keyword!==Z.value;let l=Z.value?ae.value.findIndex(((l,i)=>{var t;if(null==(t=l.title)?void 0:t.includes(Z.value))return!!e||i>ne.idx})):0;-1!==l||e||(l=ne.startIdx),ee.value.scrollTop=52*l,Object.assign(ne,{keyword:Z.value,idx:l},e?{startIdx:l}:{})}function me(e){var l;return!!Z.value&&(null==(l=e.title)?void 0:l.includes(Z.value))}function ye(){var e,l;oe.value=P(te),(null==(e=Q.showColumnNames)?void 0:e.length)&&(oe.value=te.filter((e=>{var l,i;return"title"===e.field||(null==(i=null==(l=Q.showColumnNames)?void 0:l.includes)?void 0:i.call(l,e.field))}))),(null==(l=Q.customColumns)?void 0:l.length)&&oe.value.push(...Q.customColumns),"column"===Q.fieldDescribeMode&&re.value&&oe.value.push({title:"字段描述",type:"text",field:"feildDescribe"}),Q.showSeq&&oe.value.splice(1,0,{title:"排序",type:"text",field:"seq"}),oe.value.forEach((e=>{if(e.isShow=function(e){var l,i;if(!(null==(l=Q.showColumnNames)?void 0:l.length))return!(["editable","required"].includes(e.field)&&!Q.isEdit||"sortPriority"===e.field&&!Q.showSortPriority||"isShowHeaderFilter"===e.field&&!Q.showHeadFilter||"hideExpression"===e.field&&!(null==(i=Q.hideExpressionConfig)?void 0:i.show)||e.hide);return!0}(e),"checkbox"===e.type){const l=ie.value.flat().every((l=>!Reflect.has(l,e.field)));e.checkedAll=!ve(e.field)&&!l}}))}function ve(e){return ie.value.flat().some((l=>!j(l,e)&&!l[e]&&"0001"!=l.id))}function be(e){return!!V(e.relatedContext.element)}return d([()=>Q.fields,()=>{var e;return null==(e=Q.showColumnNames)?void 0:e.length}],(([e,l])=>{e.length>0&&(ie.value=fe(),ye())}),{immediate:!0,deep:!0}),z({getTableFields:function(){let e=[];return e="old"==Q.type?ae.value.map(((e,l)=>N({...e,field:e.name,visible:e.show,sequence:l,sortable:e.sort,title:e.alias,fixed:e.fixedWay,minWidth:e.columnWidth},["name","show","sort","alias","fixedWay","columnWidth"]))):ae.value,e.map((e=>N(e,["uuid"])))}}),(l,i)=>(a(),r("div",U,[e.showSearch?(a(),s(n(C),{key:0,class:"main-wrapper__search-wrapper",value:Z.value,"onUpdate:value":i[0]||(i[0]=e=>Z.value=e),valueModifiers:{trim:!0},placeholder:"请输入字段标题",onKeydown:u(c(pe,["prevent"]),["enter"])},null,8,["value","onKeydown"])):h("v-if",!0),f("div",{class:"main-wrapper__table",ref_key:"tableRef",ref:le},[f("div",T,[(a(!0),r(p,null,m(oe.value,((l,i)=>(a(),r(p,{key:i},[l.isShow?(a(),r("span",{key:0,class:"table-cell",style:y(n(B)(l,i,e.columnWidthProps))},[f("span",null,["checkbox"!==l.type||l.isHeadCheckHide?(a(),r(p,{key:1},[b(g(l.title),1)],64)):(a(),s(n(_),{key:0,checked:l.checkedAll,"onUpdate:checked":[e=>l.checkedAll=e,e=>{return i=e,t=l.field,void ae.value.forEach((e=>{j(e,t)||(e[t]=i)}));var i,t}],disabled:l.disabledAll},{default:v((()=>[b(g(l.title),1)])),_:2},1032,["checked","onUpdate:checked","disabled"])),"sortPriority"===l.field?(a(),s(n(A),{key:2,trigger:"hover"},{trigger:v((()=>[x(n(W),{component:n(K),style:{top:"2px"}},null,8,["component"])])),default:v((()=>[L])),_:1})):h("v-if",!0)])],4)):h("v-if",!0)],64)))),128))]),f("div",{class:"main-wrapper__table-body",ref_key:"tableBodyRef",ref:ee},[(a(),s(n(D),{modelValue:ie.value,"onUpdate:modelValue":i[1]||(i[1]=e=>ie.value=e),animation:"150","item-key":"id",filter:".disabled",draggable:".item",move:be,disabled:!e.rowDraggable,key:Y.value},{item:v((({element:e,index:l})=>[e.hide?h("v-if",!0):(a(),r("div",{key:0,class:k(["item",n(V)(e)?"":"disabled"]),tabindex:l,style:y({width:n(de)})},[n(M)(e)?(a(!0),r(p,{key:0},m(e,((e,i)=>(a(),s(F,w(se,{key:i,element:e,idx:l+1,"is-highlight":me(e)}),null,16,["element","idx","is-highlight"])))),128)):(a(),s(F,w({key:1},se,{element:e,idx:l+1,"is-highlight":me(e)}),null,16,["element","idx","is-highlight"]))],14,G))])),_:1},8,["modelValue","disabled"]))],512)],512),e.footerFlag?(a(),r("div",$,[h(" 底部按钮插槽 "),S(l.$slots,"footer",{},(()=>[x(n(E),{onPositiveClick:he},{trigger:v((()=>[x(n(H),{style:{"margin-right":"8px"}},{default:v((()=>[b("恢复默认设置")])),_:1})])),default:v((()=>[b(" 确认要恢复系统默认设置吗? ")])),_:1}),x(n(H),{style:{"margin-right":"8px"},onClick:ce},{default:v((()=>[b("取消")])),_:1}),x(n(H),{type:"primary",onClick:ue},{default:v((()=>[b("保存")])),_:1})]))])):h("v-if",!0)]))}});export{z as default};
|
@@ -61,8 +61,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
61
61
|
}>>;
|
62
62
|
emit: (event: "save", ...args: any[]) => void;
|
63
63
|
setRefs: AnyObject;
|
64
|
+
fieldSetRef: import("vue").Ref<any>;
|
64
65
|
primaryColor: import("vue").Ref<string>;
|
65
|
-
|
66
|
+
fieldSetHeight: import("vue").Ref<number>;
|
67
|
+
dataLength: import("vue").ComputedRef<number>;
|
68
|
+
style: import("vue").ComputedRef<{
|
69
|
+
'--row-height': string;
|
70
|
+
'--primary-color': string;
|
71
|
+
'--main-height': any;
|
72
|
+
}>;
|
66
73
|
tabList: import("vue").ComputedRef<{
|
67
74
|
name: FieldSetTab;
|
68
75
|
tab: string;
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,useAttrs as l,provide as t,reactive as i,ref as
|
1
|
+
import{defineComponent as e,useAttrs as l,provide as t,reactive as i,ref as r,computed as a,unref as o,openBlock as s,createElementBlock as d,normalizeStyle as n,createBlock as f,withCtx as u,Fragment as m,renderList as h,resolveDynamicComponent as v,mergeProps as b,createSlots as p,renderSlot as y,createCommentVNode as g,h as F}from"vue";import{useThemeVars as c,NTabs as w,NTabPane as L}from"naive-ui";import C from"./FieldSet.vue.js";import T from"./FieldColor.vue.js";import S from"./TableStyle.vue.js";import _ from"./FieldFilter.vue.js";import{InjectionFieldList as k,InjectionQueryWordbookData as x}from"./constants/index.js";import{useElementSize as $}from"@vueuse/core";import{isArray as j}from"lodash-es";var R=e({__name:"Index",props:{showTabNames:{type:Array,default:()=>["field"]},fieldColorList:{type:Array,default:()=>[]},highlightRowColorList:{type:Array,default:()=>[]},fieldList:{type:Object},queryWordbookData:{type:Function},fieldFilterList:{type:Array,default:()=>[]}},emits:["save"],setup(e,{expose:R,emit:A}){const N=e,q=l();t(k,N.fieldList),t(x,N.queryWordbookData);const D=i({}),W=r(),H=r(c().value.primaryColor),{height:I}=$(W),O=a((()=>{const e=N.showTabNames[0];return"field"===e?j(q.fields)?q.fields.length:0:"fieldFilter"===e?j(N.fieldFilterList)?N.fieldFilterList.length:0:1})),z=a((()=>{var e;const l="showSearch"in q&&!1!==q.showSearch||"show-search"in q&&!1!==q["show-search"]?"52px":"auto";let t=(null==(e=q.style)?void 0:e.height)||"100%";if(B.value.length>1){t=`calc(${"100%"===t&&(null==I?void 0:I.value)?I.value+"px":t} - 54px)`}return{"--row-height":l,"--primary-color":H.value,"--main-height":t}})),B=a((()=>[{name:"field",tab:"字段设置",render:()=>F(C)},{name:"fieldColor",tab:"字段颜色",render:()=>F(T,{isFieldColor:!0,defaultList:N.fieldColorList})},{name:"highlightRow",tab:"高亮行",render:()=>F(T,{isFieldColor:!1,defaultList:N.highlightRowColorList})},{name:"tableStyle",tab:"表格样式",render:()=>F(S)},{name:"fieldFilter",tab:"高级筛选",render:()=>F(_,{defaultList:N.fieldFilterList})}].filter((e=>N.showTabNames.includes(e.name)))));function E(){var e,l,t,i,r;A("save",{tableFields:null==(e=D.field)?void 0:e.getTableFields(),tableFieldColors:null==(l=D.fieldColor)?void 0:l.getTableFields(),tableHighlightRows:null==(t=D.highlightRow)?void 0:t.getTableFields(),tableStyle:null==(i=D.tableStyle)?void 0:i.getTableFields(),tableFilters:null==(r=D.fieldFilter)?void 0:r.getTableFields()})}function G(e,l){D[l]=e}return R({getTableFields:function(e){var l;return null==(l=D[e||"field"])?void 0:l.getTableFields()}}),(e,l)=>o(O)>0?(s(),d("div",{key:0,class:"c-field-set",style:n(o(z)),ref_key:"fieldSetRef",ref:W},[o(B).length>1?(s(),f(o(w),{key:0,type:"line",naimated:""},{default:u((()=>[(s(!0),d(m,null,h(o(B),(l=>(s(),f(o(L),{key:l.name,name:l.name,tab:l.tab,"display-directive":"show"},{default:u((()=>[(s(),f(v(l.render()),b(e.$attrs,{ref_for:!0,ref:e=>G(e,l.name),onSave:E}),p({_:2},[h(e.$slots,((l,t)=>({name:t,fn:u((()=>[y(e.$slots,t)]))})))]),1040))])),_:2},1032,["name","tab"])))),128))])),_:3})):(s(),f(v(o(B)[0].render()),b({key:1},e.$attrs,{ref:e=>G(e,o(B)[0].name),onSave:E}),p({_:2},[h(e.$slots,((l,t)=>({name:t,fn:u((()=>[y(e.$slots,t)]))})))]),1040))],4)):g("v-if",!0)}});export{R as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,ref as t,reactive as r,watch as l,openBlock as s,createElementBlock as a,createElementVNode as i,createVNode as o,unref as n,Fragment as p,renderList as d,toDisplayString as m,normalizeClass as b,withDirectives as c,vShow as u,withCtx as v,createTextVNode as f}from"vue";import{NSwitch as g,NIcon as y,NButton as _}from"naive-ui";import{CheckmarkCircle as C}from"@vicons/ionicons5";import h from"../../../shared/assets/img/table_style_1.png.js";import j from"../../../shared/assets/img/table_style_2.png.js";import k from"../../../shared/assets/img/table_style_3.png.js";import x from"../../../shared/assets/img/table_style_4.png.js";const S={class:"main-wrapper"},w={class:"set-item"},z=i("span",{style:{"margin-right":"20px"}},"开启斑马线",-1),T={class:"set-item table-item"},F=["onClickCapture"],O={class:"table-bg"},U=["src"],q={class:"table-style__desc"},A={class:"circle"},B={class:"main-wrapper__table-footer"};var D=e({__name:"TableStyle",props:{tableStyleConfig:{type:Object,default:()=>({stripe:!1,border:!0})}},emits:["save","close"],setup(e,{expose:D,emit:E}){const G=e,H=t([{title:"样式一",label:"无列分割线",border:!1},{title:"样式二",label:"列分割线",border:!0}]),I=r(G.tableStyleConfig);function J(){E("close")}function K(){E("save")}return l((()=>G.tableStyleConfig),(e=>{const{stripe:t=!1,border:r=!0}=e;I.stripe=t,I.border=r}),{immediate:!0,deep:!0}),D({getTableFields:function(){return I}}),(e,t)=>(s(),a("div",S,[i("div",w,[z,o(n(g),{value:I.stripe,"onUpdate:value":t[0]||(t[0]=e=>I.stripe=e),size:"small"},null,8,["value"])]),i("div",T,[(s(!0),a(p,null,d(H.value,((e,t)=>{return s(),a(p,{key:t},[i("h4",null,m(e.title),1),i("div",{class:b(["table-style",{active:e.border===I.border}]),onClickCapture:()=>{return t=e.border,void(I.border=t);var t}},[i("div",O,[i("img",{src:(r=e.border,I.stripe?r?h:k:r?j:x),alt:""},null,8,U)]),i("div",q,[c(o(n(y),{size:20,component:n(C)},null,8,["component"]),[[u,e.border===I.border]]),c(i("i",A,null,512),[[u,e.border!==I.border]]),i("span",null,m(e.label),1)])],42,F)],64);var r})),128))]),i("div",B,[o(n(_),{style:{"margin-right":"8px"},onClick:J},{default:v((()=>[f("取消")])),_:1}),o(n(_),{type:"primary",onClick:K},{default:v((()=>[f("保存")])),_:1})])]))}});export{D as default};
|
1
|
+
import{defineComponent as e,ref as t,reactive as r,watch as l,openBlock as s,createElementBlock as a,createElementVNode as i,createVNode as o,unref as n,Fragment as p,renderList as d,toDisplayString as m,normalizeClass as b,withDirectives as c,vShow as u,withCtx as v,createTextVNode as f}from"vue";import{NSwitch as g,NIcon as y,NButton as _}from"naive-ui";import{CheckmarkCircle as C}from"@vicons/ionicons5";import h from"../../../shared/assets/img/table_style_1.png.js";import j from"../../../shared/assets/img/table_style_2.png.js";import k from"../../../shared/assets/img/table_style_3.png.js";import x from"../../../shared/assets/img/table_style_4.png.js";const S={class:"main-wrapper",style:{"overflow-y":"auto"}},w={class:"set-item"},z=i("span",{style:{"margin-right":"20px"}},"开启斑马线",-1),T={class:"set-item table-item"},F=["onClickCapture"],O={class:"table-bg"},U=["src"],q={class:"table-style__desc"},A={class:"circle"},B={class:"main-wrapper__table-footer"};var D=e({__name:"TableStyle",props:{tableStyleConfig:{type:Object,default:()=>({stripe:!1,border:!0})}},emits:["save","close"],setup(e,{expose:D,emit:E}){const G=e,H=t([{title:"样式一",label:"无列分割线",border:!1},{title:"样式二",label:"列分割线",border:!0}]),I=r(G.tableStyleConfig);function J(){E("close")}function K(){E("save")}return l((()=>G.tableStyleConfig),(e=>{const{stripe:t=!1,border:r=!0}=e;I.stripe=t,I.border=r}),{immediate:!0,deep:!0}),D({getTableFields:function(){return I}}),(e,t)=>(s(),a("div",S,[i("div",w,[z,o(n(g),{value:I.stripe,"onUpdate:value":t[0]||(t[0]=e=>I.stripe=e),size:"small"},null,8,["value"])]),i("div",T,[(s(!0),a(p,null,d(H.value,((e,t)=>{return s(),a(p,{key:t},[i("h4",null,m(e.title),1),i("div",{class:b(["table-style",{active:e.border===I.border}]),onClickCapture:()=>{return t=e.border,void(I.border=t);var t}},[i("div",O,[i("img",{src:(r=e.border,I.stripe?r?h:k:r?j:x),alt:""},null,8,U)]),i("div",q,[c(o(n(y),{size:20,component:n(C)},null,8,["component"]),[[u,e.border===I.border]]),c(i("i",A,null,512),[[u,e.border!==I.border]]),i("span",null,m(e.label),1)])],42,F)],64);var r})),128))]),i("div",B,[o(n(_),{style:{"margin-right":"8px"},onClick:J},{default:v((()=>[f("取消")])),_:1}),o(n(_),{type:"primary",onClick:K},{default:v((()=>[f("保存")])),_:1})])]))}});export{D as default};
|
@@ -106,6 +106,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
106
106
|
type: PropType<string | false | HTMLElement>;
|
107
107
|
default: string;
|
108
108
|
};
|
109
|
+
holidays: {
|
110
|
+
type: PropType<Date[]>;
|
111
|
+
default: () => never[];
|
112
|
+
};
|
113
|
+
type: {
|
114
|
+
type: StringConstructor;
|
115
|
+
default: string;
|
116
|
+
};
|
109
117
|
}, {
|
110
118
|
attrs: {
|
111
119
|
[x: string]: unknown;
|
@@ -130,6 +138,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
130
138
|
type: PropType<string | false | HTMLElement>;
|
131
139
|
default: string;
|
132
140
|
};
|
141
|
+
holidays: {
|
142
|
+
type: PropType<Date[]>;
|
143
|
+
default: () => never[];
|
144
|
+
};
|
145
|
+
type: {
|
146
|
+
type: StringConstructor;
|
147
|
+
default: string;
|
148
|
+
};
|
133
149
|
}>> & {
|
134
150
|
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
135
151
|
}>>;
|
@@ -146,6 +162,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
146
162
|
blur: () => any;
|
147
163
|
handleConfirm: (target: HTMLInputElement) => void;
|
148
164
|
onUpdateShow: (show: boolean) => Promise<void>;
|
165
|
+
watchers: import("../../../../shared/types").AnyFn[];
|
166
|
+
stopWatcher: () => void;
|
167
|
+
setHoliday: (show: boolean) => Promise<void>;
|
149
168
|
onConfirm: (...args: any[]) => Promise<void>;
|
150
169
|
isAllowedInvalidValue: (value: (string | [string, string]) | null | undefined) => boolean | "" | undefined;
|
151
170
|
setShortcutValue: (type: "month" | "week") => Promise<void>;
|
@@ -170,11 +189,21 @@ declare const _default: import("vue").DefineComponent<{
|
|
170
189
|
type: PropType<string | false | HTMLElement>;
|
171
190
|
default: string;
|
172
191
|
};
|
192
|
+
holidays: {
|
193
|
+
type: PropType<Date[]>;
|
194
|
+
default: () => never[];
|
195
|
+
};
|
196
|
+
type: {
|
197
|
+
type: StringConstructor;
|
198
|
+
default: string;
|
199
|
+
};
|
173
200
|
}>> & {
|
174
201
|
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
175
202
|
}, {
|
203
|
+
type: string;
|
176
204
|
updateUnchangedValue: boolean;
|
177
205
|
to: string | false | HTMLElement;
|
206
|
+
holidays: Date[];
|
178
207
|
}>>;
|
179
208
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
180
209
|
data: {
|
@@ -246,6 +246,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
246
246
|
type: PropType<string | false | HTMLElement>;
|
247
247
|
default: string;
|
248
248
|
};
|
249
|
+
holidays: {
|
250
|
+
type: PropType<Date[]>;
|
251
|
+
default: () => never[];
|
252
|
+
};
|
253
|
+
type: {
|
254
|
+
type: StringConstructor;
|
255
|
+
default: string;
|
256
|
+
};
|
249
257
|
}, {
|
250
258
|
attrs: {
|
251
259
|
[x: string]: unknown;
|
@@ -270,6 +278,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
270
278
|
type: PropType<string | false | HTMLElement>;
|
271
279
|
default: string;
|
272
280
|
};
|
281
|
+
holidays: {
|
282
|
+
type: PropType<Date[]>;
|
283
|
+
default: () => never[];
|
284
|
+
};
|
285
|
+
type: {
|
286
|
+
type: StringConstructor;
|
287
|
+
default: string;
|
288
|
+
};
|
273
289
|
}>> & {
|
274
290
|
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
275
291
|
}>>;
|
@@ -286,6 +302,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
286
302
|
blur: () => any;
|
287
303
|
handleConfirm: (target: HTMLInputElement) => void;
|
288
304
|
onUpdateShow: (show: boolean) => Promise<void>;
|
305
|
+
watchers: import("../../../../shared/types").AnyFn[];
|
306
|
+
stopWatcher: () => void;
|
307
|
+
setHoliday: (show: boolean) => Promise<void>;
|
289
308
|
onConfirm: (...args: any[]) => Promise<void>;
|
290
309
|
isAllowedInvalidValue: (value: (string | [string, string]) | null | undefined) => boolean | "" | undefined;
|
291
310
|
setShortcutValue: (type: "month" | "week") => Promise<void>;
|
@@ -310,11 +329,21 @@ declare const _default: import("vue").DefineComponent<{
|
|
310
329
|
type: PropType<string | false | HTMLElement>;
|
311
330
|
default: string;
|
312
331
|
};
|
332
|
+
holidays: {
|
333
|
+
type: PropType<Date[]>;
|
334
|
+
default: () => never[];
|
335
|
+
};
|
336
|
+
type: {
|
337
|
+
type: StringConstructor;
|
338
|
+
default: string;
|
339
|
+
};
|
313
340
|
}>> & {
|
314
341
|
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
315
342
|
}, {
|
343
|
+
type: string;
|
316
344
|
updateUnchangedValue: boolean;
|
317
345
|
to: string | false | HTMLElement;
|
346
|
+
holidays: Date[];
|
318
347
|
}>>;
|
319
348
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
320
349
|
data: {
|
@@ -528,6 +557,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
528
557
|
type: PropType<string | false | HTMLElement>;
|
529
558
|
default: string;
|
530
559
|
};
|
560
|
+
holidays: {
|
561
|
+
type: PropType<Date[]>;
|
562
|
+
default: () => never[];
|
563
|
+
};
|
564
|
+
type: {
|
565
|
+
type: StringConstructor;
|
566
|
+
default: string;
|
567
|
+
};
|
531
568
|
}, {
|
532
569
|
attrs: {
|
533
570
|
[x: string]: unknown;
|
@@ -552,6 +589,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
552
589
|
type: PropType<string | false | HTMLElement>;
|
553
590
|
default: string;
|
554
591
|
};
|
592
|
+
holidays: {
|
593
|
+
type: PropType<Date[]>;
|
594
|
+
default: () => never[];
|
595
|
+
};
|
596
|
+
type: {
|
597
|
+
type: StringConstructor;
|
598
|
+
default: string;
|
599
|
+
};
|
555
600
|
}>> & {
|
556
601
|
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
557
602
|
}>>;
|
@@ -568,6 +613,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
568
613
|
blur: () => any;
|
569
614
|
handleConfirm: (target: HTMLInputElement) => void;
|
570
615
|
onUpdateShow: (show: boolean) => Promise<void>;
|
616
|
+
watchers: import("../../../../shared/types").AnyFn[];
|
617
|
+
stopWatcher: () => void;
|
618
|
+
setHoliday: (show: boolean) => Promise<void>;
|
571
619
|
onConfirm: (...args: any[]) => Promise<void>;
|
572
620
|
isAllowedInvalidValue: (value: (string | [string, string]) | null | undefined) => boolean | "" | undefined;
|
573
621
|
setShortcutValue: (type: "month" | "week") => Promise<void>;
|
@@ -592,11 +640,21 @@ declare const _default: import("vue").DefineComponent<{
|
|
592
640
|
type: PropType<string | false | HTMLElement>;
|
593
641
|
default: string;
|
594
642
|
};
|
643
|
+
holidays: {
|
644
|
+
type: PropType<Date[]>;
|
645
|
+
default: () => never[];
|
646
|
+
};
|
647
|
+
type: {
|
648
|
+
type: StringConstructor;
|
649
|
+
default: string;
|
650
|
+
};
|
595
651
|
}>> & {
|
596
652
|
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
597
653
|
}, {
|
654
|
+
type: string;
|
598
655
|
updateUnchangedValue: boolean;
|
599
656
|
to: string | false | HTMLElement;
|
657
|
+
holidays: Date[];
|
600
658
|
}>>;
|
601
659
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
602
660
|
data: {
|
@@ -204,6 +204,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
204
204
|
type: PropType<string | false | HTMLElement>;
|
205
205
|
default: string;
|
206
206
|
};
|
207
|
+
holidays: {
|
208
|
+
type: PropType<Date[]>;
|
209
|
+
default: () => never[];
|
210
|
+
};
|
211
|
+
type: {
|
212
|
+
type: StringConstructor;
|
213
|
+
default: string;
|
214
|
+
};
|
207
215
|
}, {
|
208
216
|
attrs: {
|
209
217
|
[x: string]: unknown;
|
@@ -228,6 +236,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
228
236
|
type: PropType<string | false | HTMLElement>;
|
229
237
|
default: string;
|
230
238
|
};
|
239
|
+
holidays: {
|
240
|
+
type: PropType<Date[]>;
|
241
|
+
default: () => never[];
|
242
|
+
};
|
243
|
+
type: {
|
244
|
+
type: StringConstructor;
|
245
|
+
default: string;
|
246
|
+
};
|
231
247
|
}>> & {
|
232
248
|
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
233
249
|
}>>;
|
@@ -244,6 +260,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
244
260
|
blur: () => any;
|
245
261
|
handleConfirm: (target: HTMLInputElement) => void;
|
246
262
|
onUpdateShow: (show: boolean) => Promise<void>;
|
263
|
+
watchers: import("../../../../shared/types").AnyFn[];
|
264
|
+
stopWatcher: () => void;
|
265
|
+
setHoliday: (show: boolean) => Promise<void>;
|
247
266
|
onConfirm: (...args: any[]) => Promise<void>;
|
248
267
|
isAllowedInvalidValue: (value: (string | [string, string]) | null | undefined) => boolean | "" | undefined;
|
249
268
|
setShortcutValue: (type: "month" | "week") => Promise<void>;
|
@@ -268,11 +287,21 @@ declare const _default: import("vue").DefineComponent<{
|
|
268
287
|
type: PropType<string | false | HTMLElement>;
|
269
288
|
default: string;
|
270
289
|
};
|
290
|
+
holidays: {
|
291
|
+
type: PropType<Date[]>;
|
292
|
+
default: () => never[];
|
293
|
+
};
|
294
|
+
type: {
|
295
|
+
type: StringConstructor;
|
296
|
+
default: string;
|
297
|
+
};
|
271
298
|
}>> & {
|
272
299
|
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
273
300
|
}, {
|
301
|
+
type: string;
|
274
302
|
updateUnchangedValue: boolean;
|
275
303
|
to: string | false | HTMLElement;
|
304
|
+
holidays: Date[];
|
276
305
|
}>>;
|
277
306
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
278
307
|
data: {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { PropType, CSSProperties } from 'vue';
|
1
|
+
import { PropType, CSSProperties, VNodeChild } from 'vue';
|
2
2
|
import { AnyObject } from '../../../../shared/types';
|
3
3
|
import { FieldSetColumnItem } from '../../../../components/field-set';
|
4
4
|
import { setStyle, setColorInfo } from '../utils';
|
@@ -86,6 +86,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
86
86
|
type: PropType<AnyObject[]>;
|
87
87
|
default: () => never[];
|
88
88
|
};
|
89
|
+
primaryKey: {
|
90
|
+
type: StringConstructor;
|
91
|
+
default: string;
|
92
|
+
};
|
93
|
+
titleRender: {
|
94
|
+
type: PropType<(row: AnyObject) => VNodeChild>;
|
95
|
+
};
|
89
96
|
}, {
|
90
97
|
fixedWayOptions: {
|
91
98
|
label: string;
|
@@ -184,6 +191,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
184
191
|
type: PropType<AnyObject[]>;
|
185
192
|
default: () => never[];
|
186
193
|
};
|
194
|
+
primaryKey: {
|
195
|
+
type: StringConstructor;
|
196
|
+
default: string;
|
197
|
+
};
|
198
|
+
titleRender: {
|
199
|
+
type: PropType<(row: AnyObject) => VNodeChild>;
|
200
|
+
};
|
187
201
|
}>> & {
|
188
202
|
onUpdateChecked?: ((...args: any[]) => any) | undefined;
|
189
203
|
onEdit?: ((...args: any[]) => any) | undefined;
|
@@ -197,10 +211,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
197
211
|
isMultiple: (field: string) => boolean;
|
198
212
|
isRender: (field: string) => boolean;
|
199
213
|
isShow: (field: string) => any;
|
214
|
+
showRelation: (field: string) => boolean;
|
200
215
|
getSortPriorityOptions: () => {
|
201
216
|
label: string;
|
202
217
|
value: number;
|
203
218
|
}[];
|
219
|
+
getSelectText: (field: string) => "密码无需设置" | "主键不可设置" | "不支持脱敏设置" | undefined;
|
204
220
|
selectProps: (field: string) => {
|
205
221
|
valueField: string;
|
206
222
|
labelField: string;
|
@@ -218,12 +234,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
218
234
|
NIcon: any;
|
219
235
|
NColorPicker: any;
|
220
236
|
NPopconfirm: any;
|
237
|
+
NPopover: any;
|
238
|
+
NSpace: any;
|
221
239
|
setStyle: typeof setStyle;
|
222
240
|
setColorInfo: typeof setColorInfo;
|
223
241
|
ReorderTwoOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
224
242
|
TrashOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
225
243
|
CreateOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
226
244
|
HelpCircleOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
245
|
+
CaretDownOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
227
246
|
isFunction: (value: any) => value is (...args: any[]) => any;
|
228
247
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("edit" | "updateChecked")[], "edit" | "updateChecked", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
229
248
|
element: {
|
@@ -309,6 +328,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
309
328
|
type: PropType<AnyObject[]>;
|
310
329
|
default: () => never[];
|
311
330
|
};
|
331
|
+
primaryKey: {
|
332
|
+
type: StringConstructor;
|
333
|
+
default: string;
|
334
|
+
};
|
335
|
+
titleRender: {
|
336
|
+
type: PropType<(row: AnyObject) => VNodeChild>;
|
337
|
+
};
|
312
338
|
}>> & {
|
313
339
|
onUpdateChecked?: ((...args: any[]) => any) | undefined;
|
314
340
|
onEdit?: ((...args: any[]) => any) | undefined;
|
@@ -331,6 +357,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
331
357
|
requiredDisable: boolean;
|
332
358
|
hide: boolean;
|
333
359
|
}>[];
|
360
|
+
primaryKey: string;
|
334
361
|
index: number;
|
335
362
|
columns: FieldSetColumnItem[];
|
336
363
|
element: Partial<{
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,openBlock as
|
1
|
+
import{defineComponent as e,openBlock as t,createElementBlock as l,Fragment as i,renderList as n,normalizeStyle as r,unref as a,createBlock as o,withCtx as d,createVNode as u,createCommentVNode as s,createElementVNode as c,toDisplayString as f,resolveDynamicComponent as p,normalizeClass as m,withDirectives as v,vShow as y,mergeProps as h,createTextVNode as g}from"vue";import{NTooltip as b,NIcon as k,NCheckbox as x,NPopover as E,NSpace as S,NSelect as D,NColorPicker as w,NInput as T,NInputNumber as O,NPopconfirm as R}from"naive-ui";import{setStyle as M,setColorInfo as N,isShowExplicitRequired as U,isDisable as P}from"../utils/index.js";import{ReorderTwoOutline as _,HelpCircleOutline as j,CaretDownOutline as A,CreateOutline as C,TrashOutline as F}from"@vicons/ionicons5";import{isFunction as L,isArray as H,range as I}from"lodash-es";import{COLOR_MAP as B}from"../constants/index.js";import{WIDGET_TYPE as V,SELECT_MAP as W,WIDGET_MAP as q,SELECT_TYPE as K,SELECT_DEFAULT_MAP as $,DATE_MAP as z,DATETIME_MAP as G}from"../constants/filter.js";const J={class:"row"},Q=["title"],X=c("span",null,"拖拽调整顺序",-1),Y={key:0};var Z=e({__name:"table-row",props:{element:{type:Object,default:()=>({})},columns:{type:Array,default:()=>[]},idx:{type:Number,default:1},data:{type:Array,default:()=>[]},isHighlight:{type:Boolean},index:{type:Number,default:0},isHighlightRow:{type:Boolean,default:!1},draggable:{type:Boolean,default:!0},isFieldSet:{type:Boolean,default:!1},fieldDescribeMode:{type:String,default:"tooltip"},developMode:{type:Boolean},columnWidthProps:{type:Object},hideExpressionOption:{type:Array,default:()=>[]},primaryKey:{type:String,default:"id"},titleRender:{type:Function}},emits:["updateChecked","edit"],setup(e,{emit:Z}){const ee=e,te=[{label:"不固定",value:"NONE"},{label:"左固定",value:"LEFT"},{label:"右固定",value:"RIGHT"}],le=[{label:"不排序",value:"NONE"},{label:"升序",value:"ASC"},{label:"降序",value:"DESC"}],ie=[{label:"字体",value:"font"},{label:"背景",value:"background"}],ne=Object.entries(B).map((([e])=>e));function re(){ee.data.splice(ee.index,1)}function ae(){Z("edit",ee.element)}function oe(){var e;return ee.element.feildDescribe||(null==(e=ee.element.settingObj)?void 0:e.fieldDescDev)}function de(e){return"seq"===e?ee.idx:"optionType"===e?ee.element[e]&&ee.element.type===V.SELECT?W[ee.element[e]]:"":"type"===e?q[ee.element[e]]:ee.element[e]}function ue(e){if("defaultValue"===e){const{optionType:e}=ee.element;return e===K.SELECT_MULTIPLE}return!1}function se(e){if("0001"==ee.element.id&&"fixedWay"!=e)return!1;const{isConfiguredHeaderFilter:t}=ee.element;return"isShowHeaderFilter"===e?!!t:!(["explicitRequired","defaultValue"].includes(e)&&![V.DATE,V.DATETIME,V.SELECT].includes(ee.element.type)||["editable"].includes(e)&&ee.element[`${e}Hide`])}function ce(e){return["explicitRequired","defaultValue"].includes(e)?U(ee.element):!["isSum","isAvg"].includes(e)||"NUMBER"===ee.element.fieldType}function fe(e){const{relation:t}=ee.element;return"isSearch"===e&&H(null==t?void 0:t.fieldList)&&t.fieldList.length>0}function pe(e){if("hideExpression"===e)return"PASSWORD"===ee.element.attrType?"密码无需设置":ee.element.name===ee.primaryKey||ee.element.columnName===ee.primaryKey?"主键不可设置":ee.element.disableDesensitization||ee.element[`${e}Disabled`]?"不支持脱敏设置":void 0}function me(e){const t={valueField:"value",labelField:"label"};return"hideExpression"===e&&(t.valueField="ruleId",t.labelField="name"),t}function ve(e){var t;switch(e.field){case"fixedWay":return te;case"sortDirection":return le;case"sortPriority":return function(){const e=I(1,ee.data.length+1).map((e=>({label:e.toString(),value:e}))),t=ee.data.filter((e=>!!e.sortPriority&&e.uuid!==ee.element.uuid)).map((e=>e.sortPriority));return e.filter((e=>!t.includes(e.value)))}();case"colorScope":return ie;case"hideExpression":return null==(t=ee.hideExpressionOption)?void 0:t.map((e=>({...e,ruleId:`ruleId#${e.code}`})));case"defaultValue":{const{type:e,optionInfo:t}=ee.element;return e===V.SELECT?H(null==t?void 0:t.list)&&t.list.length>0?t.list.map((e=>({...e,label:e.name}))):Object.entries($).map((([e,t])=>({value:e,label:t}))):e===V.DATE?Object.entries(z).map((([e,t])=>({value:e,label:t}))):e===V.DATETIME?Object.entries(G).map((([e,t])=>({value:e,label:t}))):[]}default:return[]}}function ye(e){var t;if(1==ee.element.defaultMark||"color"===e.type&&ee.isHighlightRow)return!0;if("checkbox"===e.type){if("show"===e.field&&e.fieldShowMaxValue)return!ee.element[e.field]&&(null==(t=ee.data.filter((t=>t[e.field])))?void 0:t.length)===e.fieldShowMaxValue;if(["isSearch","isSum","isAvg"].includes(e.field)){if(Reflect.has(ee.element,"isMerge"))return 1==ee.element.isMerge;if("isSearch"===e.field&&Reflect.has(ee.element,"notParticipatingSearch"))return 1==ee.element.notParticipatingSearch}return P(ee.element,e.field)}if("sortPriority"===e.field){const{sortDirection:e}=ee.element;return!e||"NONE"===e}return P(ee.element,e.field)}function he(e){return["title","result"].includes(e.field)&&ee.element.style||{}}return(U,P)=>(t(),l("div",J,[(t(!0),l(i,null,n(e.columns,((U,H)=>{return t(),l(i,{key:H},[U.isShow?(t(),l("span",{key:0,class:"table-cell",title:e.element[U.field],style:r(a(M)(U,H,e.columnWidthProps))},["text"===U.type?(t(),l(i,{key:0},[0===H?(t(),l(i,{key:0},[!e.isFieldSet||e.draggable&&e.isFieldSet?(t(),o(a(b),{key:0,trigger:"hover"},{trigger:d((()=>[u(a(k),{style:{"margin-right":"5px",top:"2px"},component:a(_)},null,8,["component"])])),default:d((()=>[X])),_:1})):s("v-if",!0),(I=U.field,"title"===I&&("tooltip"===ee.fieldDescribeMode&&ee.element.feildDescribe||ee.developMode&&(null==(B=ee.element.settingObj)?void 0:B.fieldDescDev))?(t(),o(a(b),{key:1,trigger:"hover"},{trigger:d((()=>[u(a(k),{style:{"margin-right":"5px",top:"2px"},component:a(j)},null,8,["component"])])),default:d((()=>[c("span",null,f(oe()),1)])),_:1})):s("v-if",!0)),a(L)(e.titleRender)?(t(),o(p((()=>e.titleRender(e.element))),{key:2})):s("v-if",!0)],64)):s("v-if",!0),0===H&&a(L)(e.titleRender)?s("v-if",!0):(t(),l("span",{key:1,class:m([e.isHighlight&&"title"===U.field?"highlight":""]),style:r(he(U))},f(de(U.field)),7))],64)):s("v-if",!0),"checkbox"===U.type&&se(U.field)?(t(),l(i,{key:1},[v(u(a(x),{disabled:ye(U),checked:e.element[U.field],"onUpdate:checked":[t=>e.element[U.field]=t,e=>function(e,t){Z("updateChecked",{checked:e,column:t})}(e,U)]},null,8,["disabled","checked","onUpdate:checked"]),[[y,ce(U.field)]]),fe(U.field)?(t(),o(a(E),{key:0,placement:"right-start","show-arrow":!1},{trigger:d((()=>[u(a(k),{style:{"margin-left":"5px",top:"2px"},component:a(A)},null,8,["component"])])),default:d((()=>[c("div",null,[c("span",null,f(e.element.relation.tableName),1),u(a(S),{"wrap-item":!1,vertical:""},{default:d((()=>[(t(!0),l(i,null,n(e.element.relation.fieldList,(e=>v((t(),o(a(x),{key:e.id,checked:e.checked,"onUpdate:checked":t=>e.checked=t,label:e.title},null,8,["checked","onUpdate:checked","label"])),[[y,"0001"!==e.sid]]))),128))])),_:1})])])),_:1})):s("v-if",!0)],64)):s("v-if",!0),"select"===U.type&&se(U.field)?(t(),l(i,{key:2},[pe(U.field)?(t(),l("span",Y,f(pe(U.field)),1)):v((t(),o(a(D),h({key:1},me(U.field),{clearable:"",multiple:ue(U.field),disabled:ye(U),value:e.element[U.field],"onUpdate:value":[t=>e.element[U.field]=t,e=>function(e,t){"sortDirection"!==t.field||"NONE"!==e&&e||(ee.element.sortPriority=null),"colorScope"===t.field&&N(ee.element)}(e,U)],options:ve(U)}),null,16,["multiple","disabled","value","onUpdate:value","options"])),[[y,ce(U.field)]])],64)):s("v-if",!0),"color"===U.type?(t(),o(a(w),{key:3,class:"c-field-set__color-picker",clearable:"",disabled:ye(U),value:e.element[U.field],"onUpdate:value":[t=>e.element[U.field]=t,P[0]||(P[0]=t=>a(N)(e.element))],"show-preview":"",modes:["hex"],swatches:a(ne)},null,8,["disabled","value","onUpdate:value","swatches"])):s("v-if",!0),"input"===U.type?v((t(),o(a(T),{key:4,value:e.element[U.field],"onUpdate:value":t=>e.element[U.field]=t,clearable:""},null,8,["value","onUpdate:value"])),[[y,"0001"!=e.element.id]]):s("v-if",!0),"inputNumber"===U.type?(t(),o(a(O),{key:5,value:e.element[U.field],"onUpdate:value":t=>e.element[U.field]=t},null,8,["value","onUpdate:value"])):s("v-if",!0),"custom"===U.type&&a(L)(U.contentRender)?(t(),o(p((()=>U.contentRender(U,e.element))),{key:6})):s("v-if",!0),"custom"===U.type&&"opt"===U.field&&1!=e.element.defaultMark?(t(),l(i,{key:7},[u(a(b),{trigger:"hover"},{trigger:d((()=>[u(a(k),{component:a(C),onClick:ae},null,8,["component"])])),default:d((()=>[g(" 编辑 ")])),_:1}),u(a(R),{onPositiveClick:re},{trigger:d((()=>[u(a(b),{trigger:"hover"},{trigger:d((()=>[u(a(k),{component:a(F)},null,8,["component"])])),default:d((()=>[g(" 删除 ")])),_:1})])),default:d((()=>[g(" 是否确认删除? ")])),_:1})],64)):s("v-if",!0)],12,Q)):s("v-if",!0)],64);var I,B})),128))]))}});export{Z as default};
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { AnyObject } from '../../../../shared/types';
|
2
|
-
import {
|
2
|
+
import { VNodeChild } from 'vue';
|
3
3
|
export type FieldSetItem = Partial<{
|
4
4
|
id: string;
|
5
5
|
name: string;
|
@@ -18,7 +18,7 @@ export type FieldSetItem = Partial<{
|
|
18
18
|
hide: boolean;
|
19
19
|
[key: string]: any;
|
20
20
|
}>;
|
21
|
-
export type FieldSetColumnName = 'show' | 'editable' | 'required' | 'sort' | 'bold' | 'sortDirection' | 'sortPriority' | 'fixedWay' | 'alias' | 'columnWidth' | 'hideExpression';
|
21
|
+
export type FieldSetColumnName = 'show' | 'editable' | 'required' | 'sort' | 'bold' | 'sortDirection' | 'sortPriority' | 'fixedWay' | 'alias' | 'columnWidth' | 'hideExpression' | 'isSearch' | 'isSum' | 'isAvg';
|
22
22
|
export type FieldSetColumnItem = {
|
23
23
|
title: string;
|
24
24
|
type: 'text' | 'checkbox' | 'select' | 'input' | 'inputNumber' | 'color' | 'custom';
|
@@ -27,7 +27,8 @@ export type FieldSetColumnItem = {
|
|
27
27
|
disabledAll?: boolean;
|
28
28
|
isHeadCheckHide?: boolean;
|
29
29
|
isShow?: boolean;
|
30
|
-
contentRender?: (column: AnyObject, row: AnyObject) =>
|
30
|
+
contentRender?: (column: AnyObject, row: AnyObject) => VNodeChild;
|
31
|
+
hide?: boolean;
|
31
32
|
[key: string]: any;
|
32
33
|
};
|
33
34
|
export type FieldSetTab = 'field' | 'fieldColor' | 'highlightRow' | 'tableStyle' | 'fieldFilter';
|
@@ -1 +1 @@
|
|
1
|
-
import{isArray as e,isObject as t}from"lodash-es";import{IhoTableRowGroupSequence as
|
1
|
+
import{isArray as e,isObject as t}from"lodash-es";import{IhoTableRowGroupSequence as i}from"../../../iho-table/src/constants/index.js";import{COLOR_MAP as n}from"../constants/index.js";import{WIDGET_TYPE as o}from"../constants/filter.js";function r(e,t,i){let n=90;const o={};switch(e.type){case"text":0===t&&["title","name"].includes(e.field)&&(n=120,Object.assign(o,{overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"})),"seq"===e.field&&(n=40);break;case"checkbox":n=60;break;case"select":n=80;break;case"input":n=100}if(i){const t=Object.keys(i);t.length>0&&t.includes(e.field)&&i[e.field]&&(n=i[e.field])}return Object.assign(o,{flex:`1 0 ${n}px`,minWidth:`${n}px`}),o}function s(e,t){return["editable","required","show","sortDirection","fixedWay","isSearch","isSum","isAvg"].includes(t)&&(e[`${t}Disable`]||e[`${t}Disabled`])||["sort"].includes(t)&&(1==e.notParticipatingSort||e.sortDisabled)}function c(n,o,r=(e=>e.name)){const s=o.map((e=>r(e)));return i.some((i=>{const o=n[i];if(!e(o))return!0;o.forEach((i=>{if(!e(i.list)||!i.list.length)return;const n=[];let o=null;i.list.forEach(((e,r)=>{const c=function(e,i,n){return i.findIndex((i=>i!==n&&(t(i)?i.fieldName:i)===e))}(e,s,o);~c&&(n.push(s[c]),0===r?s.splice(c,1,o={fieldName:i.title,children:n}):s.splice(c,1))}))}))})),s}function l(e){return void 0===e.draggable||e.draggable}function a(t){return e(t)?!t.some((e=>!e.draggable)):t.draggable}function f(e){e.style="font"===e.colorScope?{color:e.color}:{background:e.color,color:"#fff"},e.result=n[e.color]}function d(e){const{isShowSearch:t,filterExplicit:i,type:n}=e;return t&&i&&[o.DATE,o.DATETIME,o.SELECT].includes(n)}export{c as getGroupTree,s as isDisable,l as isDraggable,a as isDraggableItem,d as isShowExplicitRequired,f as setColorInfo,r as setStyle};
|
@@ -1 +1 @@
|
|
1
|
-
.c-field-set{height:100%;width:100%}.c-field-set__color-picker .n-color-picker-trigger__value{display:none}.c-field-set .main-wrapper{display:flex;flex-flow:column nowrap;height:
|
1
|
+
.c-field-set{height:100%;width:100%}.c-field-set__color-picker .n-color-picker-trigger__value{display:none}.c-field-set .main-wrapper{box-sizing:border-box;display:flex;flex-flow:column nowrap;height:var(--main-height)!important;width:100%}.c-field-set .main-wrapper__search-wrapper.n-input{margin-bottom:12px;width:50%}.c-field-set .main-wrapper .item{background:#fff}.c-field-set .main-wrapper .item:active{background:#f2f2f2;box-shadow:0 0 10px 0 #d5d5d5}.c-field-set .main-wrapper .item:focus{background-color:#f2f2f2}.c-field-set .main-wrapper .item.disabled{cursor:not-allowed}.c-field-set .main-wrapper .item .row{align-items:center;border-bottom:1px solid #e8e8e8;display:flex;height:var(--row-height);padding:8px 0}.c-field-set .main-wrapper .table-cell{word-wrap:break-word;box-sizing:border-box;color:inherit;display:inline-block;padding:0 5px}.c-field-set .main-wrapper .table-cell .highlight{background-color:var(--primary-color);color:#fff}.c-field-set .main-wrapper .table-cell .c-field-set__color-picker{display:block}.c-field-set .main-wrapper__table{box-sizing:border-box;display:flex;flex:1;flex-flow:column nowrap;min-height:0;overflow:auto;width:100%}.c-field-set .main-wrapper__table-header{align-items:center;background:#f2f2f4;border:1px solid #f2f2f2;display:flex;flex:0 0 52px;position:sticky;top:0;z-index:1}.c-field-set .main-wrapper__table-header .n-checkbox.n-checkbox--disabled .n-checkbox__label{color:var(--n-text-color)}.c-field-set .main-wrapper__table-header .table-cell{align-items:center;background:#f2f2f4;display:flex;height:100%}.c-field-set .main-wrapper__table-body{flex:1}.c-field-set .main-wrapper__table-footer{border-top:1px solid #d5d5d5;padding:12px 0}.c-field-set .main-wrapper .set-item{padding:10px 0}.c-field-set .main-wrapper .set-item.table-item{border-top:1px solid #e8e8e8;width:50%}.c-field-set .main-wrapper .set-item.table-item h4{font-size:16px;font-weight:400;margin-bottom:12px}.c-field-set .main-wrapper .set-item.table-item .table-style{background:#e5e5e5;border:2px solid #cfcfcf;border-radius:4px;cursor:pointer;margin-bottom:10px;padding:20px 0 0}.c-field-set .main-wrapper .set-item.table-item .table-style .table-bg{background:#fff;border-radius:5px;margin:0 20px 20px;padding:10px}.c-field-set .main-wrapper .set-item.table-item .table-style .table-bg img{width:100%}.c-field-set .main-wrapper .set-item.table-item .table-style__desc{align-items:center;background:#fff;display:flex;padding:10px}.c-field-set .main-wrapper .set-item.table-item .table-style__desc .n-icon{color:var(--c-primary-color);font-size:20px}.c-field-set .main-wrapper .set-item.table-item .table-style__desc .circle{border:1px solid #d5d5d5;border-radius:50%;display:inline-block;height:18px;width:18px}.c-field-set .main-wrapper .set-item.table-item .table-style__desc span{margin-left:5px}.c-field-set .main-wrapper .set-item.table-item .table-style.active{background:#e2ebfa;border:2px solid var(--c-primary-color)}.c-field-set__color-block{display:inline-block;margin-left:20px;position:relative}.c-field-set__color-block:before{background-color:var(--color);border-radius:2px;content:"";height:14px;left:-20px;position:absolute;top:3px;width:14px}.c-field-set__space{width:100%}.c-field-set__space>div:first-child{width:80%}.c-field-set__space .filter-btn{color:var(--c-primary-color);cursor:pointer}.c-field-set__condition .opt-btn{cursor:pointer;display:inline-flex}.c-field-set__condition .condition-wrapper__item{align-items:center;display:flex;margin-top:10px}.c-field-set__condition .condition-wrapper__item .item-index{margin-right:10px}.c-field-set__condition .condition-wrapper__item>.n-date-picker,.c-field-set__condition .condition-wrapper__item>.n-input,.c-field-set__condition .condition-wrapper__item>.n-input-number,.c-field-set__condition .condition-wrapper__item>.n-select{margin-right:10px;width:20%}.c-field-set__condition .sql-expression-wrapper{margin-top:10px}
|
@@ -113,7 +113,7 @@ export declare const SELECT: import("vue").DefineComponent<{
|
|
113
113
|
type: BooleanConstructor;
|
114
114
|
};
|
115
115
|
wordSplitFilter: {};
|
116
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:value" | "postRecommend")[], "update:value" | "postRecommend", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
116
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:value" | "postRecommend" | "patternChange")[], "update:value" | "postRecommend" | "patternChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
117
117
|
value: {
|
118
118
|
type: PropType<ArrayAble<string | number> | null>;
|
119
119
|
};
|
@@ -226,6 +226,7 @@ export declare const SELECT: import("vue").DefineComponent<{
|
|
226
226
|
}>> & {
|
227
227
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
228
228
|
onPostRecommend?: ((...args: any[]) => any) | undefined;
|
229
|
+
onPatternChange?: ((...args: any[]) => any) | undefined;
|
229
230
|
}, {
|
230
231
|
options: AnyObject[];
|
231
232
|
multiple: boolean;
|