cnhis-design-vue 3.1.49-beta.6 → 3.1.49-beta.8
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/README.md +87 -87
- package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
- package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +1 -0
- package/es/components/bpmn-workflow/types/ModelingModule.d.ts +1 -0
- package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +1 -0
- package/es/components/expand-field/index.d.ts +1630 -0
- package/es/components/expand-field/index.js +1 -0
- package/es/components/expand-field/src/components/FormBatchOptionsModal.vue.d.ts +54 -0
- package/es/components/expand-field/src/components/FormBatchOptionsModal.vue.js +1 -0
- package/es/components/expand-field/src/components/FormBatchOptionsModal.vue2.js +1 -0
- package/es/components/expand-field/src/components/FormItemPerson.vue.d.ts +841 -0
- package/es/components/expand-field/src/components/FormItemPerson.vue.js +1 -0
- package/es/components/expand-field/src/components/FormItemPerson.vue2.js +1 -0
- package/es/components/expand-field/src/components/PersonModal.vue.d.ts +777 -0
- package/es/components/expand-field/src/components/PersonModal.vue.js +1 -0
- package/es/components/expand-field/src/components/PersonModal.vue2.js +1 -0
- package/es/components/expand-field/src/components/form.vue.d.ts +1502 -0
- package/es/components/expand-field/src/components/form.vue.js +1 -0
- package/es/components/expand-field/src/components/form.vue2.js +1 -0
- package/es/components/expand-field/src/constants/index.d.ts +3 -0
- package/es/components/expand-field/src/constants/index.js +1 -0
- package/es/components/expand-field/src/hooks/useAsyncData.d.ts +6 -0
- package/es/components/expand-field/src/hooks/useAsyncData.js +1 -0
- package/es/components/expand-field/src/index.vue.d.ts +1632 -0
- package/es/components/expand-field/src/index.vue.js +1 -0
- package/es/components/expand-field/src/index.vue2.js +1 -0
- package/es/components/expand-field/src/types/index.d.ts +1 -0
- package/es/components/expand-field/src/types/index.js +1 -0
- package/es/components/expand-field/src/utils/constant.d.ts +17 -0
- package/es/components/expand-field/src/utils/constant.js +1 -0
- package/es/components/expand-field/src/utils/index.d.ts +6 -0
- package/es/components/expand-field/src/utils/index.js +1 -0
- package/es/components/expand-field/src/utils/tool.d.ts +2 -0
- package/es/components/expand-field/src/utils/tool.js +1 -0
- package/es/components/expand-field/style/expand-field-iconfont.ttf +0 -0
- package/es/components/expand-field/style/index.css +1 -0
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useTop.js +1 -1
- package/es/components/fabric-chart/src/interface.d.ts +1 -1
- package/es/components/field-set/index.d.ts +114 -20
- package/es/components/field-set/src/FieldSet.vue.d.ts +114 -20
- package/es/components/field-set/src/FieldSet.vue2.js +1 -1
- package/es/components/field-set/src/components/Row.vue.d.ts +110 -19
- package/es/components/field-set/src/components/Row.vue2.js +1 -1
- package/es/components/field-set/src/types/index.d.ts +1 -1
- package/es/components/field-set/src/utils/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.d.ts +6 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +1 -1
- package/es/components/index.css +1 -1
- package/es/components/index.d.ts +2 -1
- package/es/components/index.js +1 -1
- package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
- package/es/components/select-label/src/LabelFormContent.vue2.js +1 -1
- package/es/components/select-person/src/SearchMultiple.vue.d.ts +0 -6
- package/es/components/select-person/src/SelectPerson.vue2.js +1 -1
- package/es/components/select-person/style/index.css +1 -1
- package/es/components/table-export-field/src/components/ExportModal.vue.d.ts +3 -0
- package/es/components/table-filter/src/hooks/useAdvanced.js +1 -1
- package/es/env.d.ts +25 -25
- package/es/shared/assets/img/failure.png.js +1 -1
- package/es/shared/assets/img/no-permission.png.js +1 -1
- package/es/shared/assets/img/nodata.png.js +1 -1
- package/es/shared/assets/img/notfound.png.js +1 -1
- package/es/shared/assets/img/qr.png.js +1 -1
- package/es/shared/assets/img/success.png.js +1 -1
- package/es/shared/assets/img/video.png.js +1 -1
- package/es/shared/assets/img/video_default_cover.png.js +1 -1
- package/es/shared/assets/img/xb_big.png.js +1 -1
- package/es/shared/assets/img/xb_small.png.js +1 -1
- package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +86 -0
- package/es/shared/hooks/useDateTime.js +1 -1
- package/es/shared/package.json.js +1 -1
- package/es/shared/utils/fabricjs/index.d.ts +6823 -0
- package/es/shared/utils/tapable/index.d.ts +139 -0
- package/package.json +2 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"./index.vue2.js";import r from"../../../_virtual/_plugin-vue_export-helper.js";var i=r(e,[["__file","index.vue"]]);export{i as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defineComponent as t,provide as e,ref as l,openBlock as a,createElementBlock as i,createElementVNode as n,createCommentVNode as o,createVNode as s,unref as d,withCtx as r,Fragment as c,renderList as u,createTextVNode as m,toDisplayString as p,createBlock as f,withModifiers as v}from"vue";import{useMessage as h,NGrid as _,NGridItem as g,NTooltip as y,NIcon as k,NPopconfirm as C,NButton as x}from"naive-ui";import{Brush as D}from"@vicons/ionicons5";import w from"./components/form.vue.js";import I from"./hooks/useAsyncData.js";import{InjectionExpandFieldApiConfig as N}from"./constants/index.js";const b={class:"tableset-expand-field"},M={class:"list"},z={class:"table-modal-list"},A={class:"list-content"},S=n("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},[n("path",{d:"M12 12h2v12h-2z",fill:"currentColor"}),n("path",{d:"M18 12h2v12h-2z",fill:"currentColor"}),n("path",{d:"M4 6v2h2v20a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8h2V6zm4 22V8h16v20z",fill:"currentColor"}),n("path",{d:"M12 2h8v2h-8z",fill:"currentColor"})],-1),j={class:"footer"};var F=t({__name:"index",props:{id:{type:String,default:""},expandFieldApiConfig:{type:Object},tableData:{type:Array,default:()=>[]},orgId:{type:String,default:""}},emits:["closeModal"],setup(t,{emit:F}){const O=t,V=h(),{deleteExtendFieldById:B}=I();e(N,O.expandFieldApiConfig);const E=[{title:"字段标题",columnName:"name",span:3},{title:"字段键名",columnName:"code",span:3},{title:"字段类型",columnName:"html_type",span:3},{title:"问号提示",columnName:"remark",span:4},{title:"创建时间",columnName:"createdDate",span:4},{title:"修改时间",columnName:"updatedDate",span:4},{title:"操作",columnName:"operator",span:3}],P=l(!1),L=l("add"),U=l({});function q(){F("closeModal")}function G(){P.value=!0,L.value="add",U.value={}}function H(){P.value=!1}return(e,l)=>(a(),i("div",b,[n("div",M,[n("div",z,[o(' <div class="list-title">\n\t\t\t\t\t<span class="list-title-item" v-for="titleItem in filedList" :key="titleItem.columnName">\n\t\t\t\t\t\t{{ titleItem.title }}\n\t\t\t\t\t</span>\n\t\t\t\t</div> '),s(d(_),{cols:24,class:"list-title"},{default:r((()=>[(a(),i(c,null,u(E,(t=>s(d(g),{span:t.span,class:"list-title-item",key:t.columnName},{default:r((()=>[m(p(t.title),1)])),_:2},1032,["span"]))),64))])),_:1}),n("div",A,[(a(!0),i(c,null,u(t.tableData,((t,e)=>(a(),f(d(_),{key:e,class:"list-content-block"},{default:r((()=>[s(d(g),{span:3,title:t.name,class:"list-content-item"},{default:r((()=>[m(p(t.name),1)])),_:2},1032,["title"]),s(d(g),{span:3,title:t.code,class:"list-content-item"},{default:r((()=>[m(p(t.code),1)])),_:2},1032,["title"]),s(d(g),{span:3,title:t.html_type,class:"list-content-item"},{default:r((()=>[m(p(t.html_type),1)])),_:2},1032,["title"]),s(d(g),{span:4,title:t.remark,class:"list-content-item"},{default:r((()=>[m(p(t.remark),1)])),_:2},1032,["title"]),s(d(g),{span:4,title:t.createdDate,class:"list-content-item"},{default:r((()=>[m(p(t.createdDate),1)])),_:2},1032,["title"]),s(d(g),{span:4,title:t.updatedDate,class:"list-content-item"},{default:r((()=>[m(p(t.updatedDate),1)])),_:2},1032,["title"]),s(d(g),{span:3,class:"list-content-item"},{default:r((()=>[s(d(y),{duration:0},{trigger:r((()=>[s(d(k),{component:d(D),onClick:v((e=>{return l=t,P.value=!0,L.value="edit",void(U.value={...l});var l}),["prevent","stop"])},null,8,["component","onClick"])])),default:r((()=>[m(" 编辑 ")])),_:2},1024),s(d(y),{duration:0},{trigger:r((()=>[s(d(C),{onPositiveClick:e=>async function(t){try{const e=await B(t,O.expandFieldApiConfig);if("SUCCESS"!==(null==e?void 0:e.result))return void V.error((null==e?void 0:e.resultMsg)||"删除失败");V.success("删除成功")}catch(t){V.error(t)}}(t)},{trigger:r((()=>[s(d(k),null,{default:r((()=>[S])),_:1})])),default:r((()=>[m(" 是否确认删除? ")])),_:2},1032,["onPositiveClick"])])),default:r((()=>[m(" 删除 ")])),_:2},1024)])),_:2},1024)])),_:2},1024)))),128))])]),n("div",j,[s(d(x),{onClick:q},{default:r((()=>[m("取消")])),_:1}),s(d(x),{type:"info",onClick:G},{default:r((()=>[m("增加字段")])),_:1})])]),s(w,{visible:P.value,formItemData:U.value,formOntype:L.value,id:t.id,orgId:t.orgId,onCancelModal:H},null,8,["visible","formItemData","formOntype","id","orgId"])]))}});export{F as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare type IExpandFieldItemType = Record<'code' | 'createdDate' | 'html_type' | 'id' | 'name' | 'remark' | 'setting' | 'updatedDate', string>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare const HtmlType: {
|
|
2
|
+
INPUT: string;
|
|
3
|
+
TEXTAREA: string;
|
|
4
|
+
DIGITAL: string;
|
|
5
|
+
DATE: string;
|
|
6
|
+
RADIO: string;
|
|
7
|
+
RADIO_BLOCK: string;
|
|
8
|
+
CHECKBOX: string;
|
|
9
|
+
CHECKBOX_BLOCK: string;
|
|
10
|
+
SELECT: string;
|
|
11
|
+
MULTI_SELECT: string;
|
|
12
|
+
CANDIDATE_COMPONENTS: string;
|
|
13
|
+
};
|
|
14
|
+
export declare const HtmlTypeList: {
|
|
15
|
+
value: string;
|
|
16
|
+
label: string;
|
|
17
|
+
}[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const l={INPUT:"INPUT",TEXTAREA:"TEXTAREA",DIGITAL:"DIGITAL",DATE:"DATE",RADIO:"RADIO",RADIO_BLOCK:"RADIO_BLOCK",CHECKBOX:"CHECKBOX",CHECKBOX_BLOCK:"CHECKBOX_BLOCK",SELECT:"SELECT",MULTI_SELECT:"MULTI_SELECT",CANDIDATE_COMPONENTS:"CANDIDATE_COMPONENTS"},E=[{value:l.INPUT,label:"文本框"},{value:l.TEXTAREA,label:"文本域"},{value:l.DIGITAL,label:"数字框"},{value:l.DATE,label:"日期"},{value:l.RADIO,label:"横向单选"},{value:l.RADIO_BLOCK,label:"纵向单选"},{value:l.CHECKBOX,label:"横向多选"},{value:l.CHECKBOX_BLOCK,label:"纵向多选"},{value:l.SELECT,label:"下拉框"},{value:l.MULTI_SELECT,label:"下拉多选框"},{value:l.CANDIDATE_COMPONENTS,label:"选人组件"}];export{l as HtmlType,E as HtmlTypeList};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare function isTextarea(current: string): boolean;
|
|
2
|
+
export declare function isNumber(current: string): boolean;
|
|
3
|
+
export declare function isDate(current: string): boolean;
|
|
4
|
+
export declare function isShowOptions(current: string): boolean;
|
|
5
|
+
export declare function isCandidate(current: string): boolean;
|
|
6
|
+
export declare function isMulti(current: string): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{HtmlType as n}from"./constant.js";function t(t){return t===n.TEXTAREA}function C(t){return t===n.DIGITAL}function r(t){return t===n.DATE}function E(t){return[n.RADIO,n.RADIO_BLOCK,n.CHECKBOX,n.CHECKBOX_BLOCK,n.SELECT,n.MULTI_SELECT].includes(t)}function u(t){return t===n.CANDIDATE_COMPONENTS}function O(t){return[n.CHECKBOX,n.CHECKBOX_BLOCK,n.MULTI_SELECT].includes(t)}export{u as isCandidate,r as isDate,O as isMulti,C as isNumber,E as isShowOptions,t as isTextarea};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function t(t){if("string"==typeof t)try{const r=JSON.parse(t);return!("object"!=typeof r||!r)}catch(t){return!1}return!1}function r(t){var r,e;return(r="Date",function(t){return"[object "+r+"]"===Object.prototype.toString.call(t)})(t)&&!isNaN((e=t,e.getTime()))}export{t as isJSON,r as isValidDate};
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@font-face{font-family:expand-field-iconfont;src:url(expand-field-iconfont.ttf?t=1689038151631) format("truetype")}.iconfont-expand-field{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:expand-field-iconfont!important;font-size:14px;font-style:normal}.icon-expand-field-help:before{content:"\e6b6"}.icon-expand-field-menzhenyishengzhanxitongtubiaoguanbi:before{content:"\e76e"}.icon-expand-field-menzhenyishengzhanxitongtubiaozuixiaohua2:before{content:"\e778"}.icon-expand-field-menzhenyishengzhanxitongtubiaozuidahua:before{content:"\e779"}.tableset-expand-field{height:100%}.tableset-expand-field .list{background:transparent;display:flex;flex-direction:column;height:100%}.tableset-expand-field .list .table-modal-list{flex:1;overflow-y:auto}.tableset-expand-field .list .table-modal-list .list-title{background-color:#f2f2f4;border:1px solid #e1dfdf;height:52px;line-height:52px}.tableset-expand-field .list .table-modal-list .list-title .list-title-item{font-weight:700;text-align:center}.tableset-expand-field .list .table-modal-list .list-content{margin:0;padding:0}.tableset-expand-field .list .table-modal-list .list-content .list-content-block{border-bottom:1px solid #e1dfdf;height:50px;line-height:50px}.tableset-expand-field .list .table-modal-list .list-content .list-content-block .list-content-item{overflow:hidden;text-align:center;text-overflow:ellipsis;white-space:nowrap}.tableset-expand-field .list .table-modal-list .list-content .list-content-block .list-content-item .n-icon{cursor:pointer;margin-right:8px}.tableset-expand-field .list .table-modal-list .list-content .list-content-block:last-child{border:none}.tableset-expand-field .list .footer{border-top:1px solid #d5d5d5;padding-top:12px}.tableset-expand-field .list .footer .n-button:first-child{margin-right:8px}.expand-field-modal-block.expand-person-modal{overflow-y:hidden}.expand-field-modal-block .n-card-header .svg-wrap .iconfont-expand-field{cursor:pointer;font-size:18px}.expand-field-modal-block .n-card-header .svg-wrap .iconfont-expand-field:last-child{margin-left:16px}.expand-field-modal-block .n-card-header .svg-wrap .n-icon{cursor:pointer}.expand-field-modal-block .n-card__content{overflow-y:auto}.expand-field-modal-block .n-card__content .options-title .iconfont-expand-field{cursor:pointer;font-size:16px;margin-left:5px}.expand-field-modal-block .n-card__content .options-title .batch-span{color:#2d7aff;cursor:pointer;margin-left:8px}.expand-field-modal-block .n-card__content .options-item{border:1px solid #ccc;border-radius:5px;padding:8px 12px;width:100%}.expand-field-modal-block .n-card__content .options-item .flex-center{align-items:center;display:flex}.expand-field-modal-block .n-card__content .options-item .flex-center .n-icon{cursor:pointer}.expand-field-modal-block .n-card__content .options-item.options-item-err{border-color:#f5222d}.expand-field-modal-block .n-card__content .date-time-button{padding:0;width:56px}.expand-field-modal-block .n-card__content .date-time-button .n-button__content{justify-content:center;position:relative;width:100%}.expand-field-modal-block .n-card__content .date-time-button .n-button__content .n-time-picker{position:absolute;width:100%}.expand-field-modal-block .n-card__content .date-time-button .n-button__content .n-time-picker .n-input{background:transparent}.expand-field-modal-block .n-card__content .date-time-button .n-button__content .n-time-picker .n-input .n-input__input-el{color:transparent;cursor:pointer}.expand-field-modal-block .n-card__content .date-time-button .n-button__content .n-time-picker .n-input .n-input__placeholder{color:transparent}.expand-field-modal-block .n-card__content .date-time-button .n-button__content .n-time-picker .n-input .n-input__suffix{display:none}.expand-field-modal-block .n-card__content .people-wrap .inner-content{border:1px solid #e0e0e6;display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.expand-field-modal-block .n-card__content .people-wrap .inner-content .tagSpanClass{display:flex;flex:1;flex-wrap:nowrap;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.expand-field-modal-block .n-card__content .people-wrap .inner-content .tagSpanClass .n-tag{margin:2px 0 0 5px}.expand-field-modal-block .n-card__content .people-wrap .inner-content .tagClearAll{align-items:center;cursor:pointer;display:flex;flex-basis:30px;justify-content:center}.expand-field-modal-block .n-card__content .validate_tip{color:#f5222d;font-size:12px;margin-top:2px}.expand-field-modal-block .flex_right{display:flex;justify-content:flex-end}.expand-field-modal-block .flex_right .n-button:first-child{margin-right:15px}.expand-field-modal-block .mgb-10{margin-bottom:10px}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{fabric as t}from"../../../../../shared/utils/fabricjs/index.js";import{drawText as e,defaultStyle as i,defaultRectStyle as n,drawTextGroup as o,drawLine as l,drawPoint as r}from"../useDraw.js";import{useGrid as s}from"../useGrid.js";import{useBirthProcessCumputedPoint as
|
|
1
|
+
import{fabric as t}from"../../../../../shared/utils/fabricjs/index.js";import{drawText as e,defaultStyle as i,defaultRectStyle as n,drawTextGroup as o,drawLine as l,drawPoint as r}from"../useDraw.js";import{useGrid as s}from"../useGrid.js";import{useBirthProcessCumputedPoint as a}from"../useCumputedPoint.js";import"vue";import{cloneDeep as f}from"lodash-es";import"date-fns";import"../temperature/useShadow.js";function c(c,d,u,m,h){const{cumputedX:p,getXValue:v}=a(d),{originX:x,endX:g,xCellWidth:L,originYXAxis:X,top:C,canvasWidth:y,borderStyle:w,treeData:S,xAxis:Y,topGridYNumber:j,topGridOriginY:b,topGridYCellHeight:k,topGridEndY:G,event:I}=d,z=new Set;function A(t,e,i){let n;const{content:o}=t.value||{};if(o){const{lineStyle:l,textStyle:s,totalStyle:a}=C.data||{},{startLine:f,centerLine:c,endLine:d}=e;n=r(o,{fontSize:12,...s,backgroundColor:"#fff",lockMovementX:!0,lockMovementY:!0});const u=M(n,e,i);n&&(n.set(u),n.origin={data:t},E(n),f&&(f.text=n),d&&(d.text=n))}return n}function M(t,e,i){const n=t.width+1,{startLine:o,centerLine:l,endLine:r}=e,s={top:i,originX:"center",originY:"center"};return l&&n<=l.width?s.left=l.x1+l.width/2:r&&n<=r.limitX.x2-r.left?(s.originX="left",s.left=r.left+1):o&&!r&&n<=o.limitX.x2-o.left?(s.originX="left",s.left=o.left+(o.isCustomIcon?5:1)):o&&n<=o.left-o.limitX.x1?(s.originX="right",s.left=o.left-(o.isCustomIcon?5:1)):l?(s.originY="top",s.left=l.x1+l.width/2,s.top=i+1,s.fontSize=10):o&&(s.originX="left",s.originY="top",s.fontSize=10,s.left=o.left,s.top=i+1),s}function $(e,{isCustomIcon:i,isContinue:n,isLeft:o}){const{x:s,y1:a,y2:f,halfY:c}=e;if(!s||s<x||s>g)return;const{lineStyle:d}=C.data||{};let u;const m={left:s,top:c};u=i?r("circle",{fill:d.stroke,...m}):n?r(">",{fill:d.stroke,...m,fontSize:18}):l([s,a,s,c],d);const h=new t.Rect({width:L,height:k,fill:"transparent",left:s-L/2,top:a}),p=new t.Group([u,h],{originX:"center",originY:"center",hasControls:!1,hasBorders:!1,objectCaching:!1,hoverCursor:"pointer",lockMovementY:!0});return p.isLeft=o,p.isCustomIcon=i,E(p),p}function E(t){I.hovered&&(t.on("mouseover",(()=>{D(t,"hover")})),t.on("mouseout",(()=>{m.show=!1}))),t.lockMovementX&&t.lockMovementY||(t.on("moving",(()=>{!function(t){t.setCoords(),t.left<t.limitX.x1&&t.set("left",t.limitX.x1);t.left>t.limitX.x2&&t.set("left",t.limitX.x2)}(t),function(t){if(t.centerLine){const e=t.isLeft?{x1:t.left}:{x2:t.left};t.centerLine.setCoords().set(e)}if(t.text){const e=M(t.text,{startLine:t.isLeft?t:t.nearLine,centerLine:t.centerLine,endLine:t.isLeft?t.nearLine:t},t.top);t.text.setCoords().set(e)}}(t),I.hovered&&D(t)})),t.on("mouseup",(e=>{if(1===e.button){!function(t){t.isLeft?(t.prevLine&&(t.prevLine.limitX.x2=t.left),t.nearLine&&(t.nearLine.limitX.x1=t.left)):(t.nextLine&&(t.nextLine.limitX.x1=t.left),t.nearLine&&(t.nearLine.limitX.x2=t.left))}(t);const e={type:"tree",...t.origin};u("change",e)}})))}function D(t,e="moving"){var i,n,o;const{data:l}=t.origin;m.point={x:t.left,y:t.top};let[r="",s=""]=l.time||[];if("moving"===e){const e=v(t.left);t.isLeft?r=e:s=e,l.time=[r,s],t.text&&(t.text.origin.data.time=[r,s])}m.list=[`开始时间 ${r}`,`结束时间 ${s}`,`流速 ${(null==(i=l.value)?void 0:i.currentSpeed)||""}`,`浓度 ${(null==(n=l.value)?void 0:n.consistence)||""}`,`总量 ${(null==(o=l.value)?void 0:o.total)||""}`],m.show=!0}s(c,{...d,gridYNumber:j,originY:b,yCellHeight:k,endY:G}),function(){var o;const{height:l,list:r,left:s,spaceValue:a}=Y;if(!l)return;const f=[],d=X+l/2;r.forEach(((t,i)=>{const n=s+i*L*a;f.push(e([n,d],{value:t.slice(11,16)}))}));const u=f.length>0?new t.Group([...f],{...i,objectCaching:!1}):null;u&&c.value.add(u);const m=new t.Rect({width:y,height:l,left:0,top:X,...n,originX:"left",originY:"top",...w}),h=e([g+(y-g)/2,d],{value:"总量",...null==(o=C.data)?void 0:o.totalStyle});c.value.add(m,h)}(),function(){var n;const r=(null==(n=null==C?void 0:C.tree)?void 0:n.textStyle)||{},s=[];!function t(i){i.forEach((i=>{var n;const{width:a,height:d,left:u,top:m,title:h=""}=i,v={value:h,...r};(null==(n=i.children)?void 0:n.length)?(v.value=h.split("").join("\n"),t(i.children)):(v.textAlign="left",function(t){if(!(null==t?void 0:t.data)||!Array.isArray(t.data))return;const{lineStyle:e,textStyle:i,totalStyle:n}=C.data||{},o=t.top,r=o+k,s=r-k/2,a={y1:o,y2:r,halfY:s},c=[],d=f(t);delete d.data,t.data.forEach(((t,i,n)=>{const{time:o,continue:r}=t,[f,u]=o,m=f&&p(f),h=u&&p(u),v=$({...a,x:m},{isCustomIcon:!h&&!r,isContinue:!1,isLeft:!0}),L=$({...a,x:h},{isCustomIcon:!1,isContinue:!!r});let X,C,y;if((v||m<x)&&(L||h>g)){X=l([v?m:x,s,L?h:g,s],e)}c.push({startLine:v,centerLine:X,endLine:L}),function(t,e,i){const{startLine:n,centerLine:o,endLine:l}=e[t],{startLine:r,endLine:s}=e[t-1]||{};if(n){n.origin=i;const t={x1:x,x2:l?l.left:g};s?(t.x1=s.left,s.limitX.x2=n.left,n.prevLine=s,s.nextLine=n):r&&(t.x1=r.left,r.limitX.x2=n.left,n.prevLine=r,r.nextLine=n),n.limitX=t,o&&(n.centerLine=o)}if(l){l.origin=i;const t={x1:n?n.left:x,x2:g};l.limitX=t,o&&(l.centerLine=o)}n&&l&&(n.nearLine=l,l.nearLine=n)}(i,c,Object.assign({},d,{data:t,index:i})),n[i-1]&&(C=A(n[i-1],c[i-1],s)),i===n.length-1&&(y=A(t,c[i],s)),X&&z.add(X),v&&z.add(v),L&&z.add(L),C&&z.add(C),y&&z.add(y)}))}(i),function(t){var i;if(!(null==t?void 0:t.total))return;const n=t.top+k/2,o=e([g+(y-g)/2,n],{value:t.total,...null==(i=C.data)?void 0:i.totalStyle});o&&c.value.add(o)}(i)),s.push(o({width:a,height:d,...w},v,{left:u,top:m},!0))}))}(S);const a=s.length>0?new t.Group([...s],{...i,objectCaching:!1}):null;a&&c.value.add(a),z.size&&c.value.add(...z)}()}export{c as useTop};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="lodash" />
|
|
1
2
|
import { SFCWithInstall } from '../../../es/shared/types';
|
|
2
3
|
export * from './src/types';
|
|
3
4
|
declare const FieldSet: SFCWithInstall<import("vue").DefineComponent<{
|
|
@@ -120,7 +121,7 @@ declare const FieldSet: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
120
121
|
isShowColumn: (column: import("../../../es/shared/types").AnyObject) => boolean;
|
|
121
122
|
initFields: () => import("../../../es/shared/types").AnyObject[];
|
|
122
123
|
handleGroup: (fields: import("../../../es/shared/types").AnyObject[]) => import("../../../es/shared/types").AnyObject[];
|
|
123
|
-
getTableFields: () => import("
|
|
124
|
+
getTableFields: () => import("lodash").Omit<never, "uuid">[];
|
|
124
125
|
handleAllCheck: (checked: boolean, field: string) => void;
|
|
125
126
|
handleCheck: ({ checked, column }: {
|
|
126
127
|
checked: boolean;
|
|
@@ -131,6 +132,8 @@ declare const FieldSet: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
131
132
|
NButton: any;
|
|
132
133
|
NCheckbox: any;
|
|
133
134
|
NPopconfirm: any;
|
|
135
|
+
NIcon: any;
|
|
136
|
+
NTooltip: any;
|
|
134
137
|
Draggable: import("vue").DefineComponent<{
|
|
135
138
|
list: {
|
|
136
139
|
type: ArrayConstructor;
|
|
@@ -206,10 +209,6 @@ declare const FieldSet: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
206
209
|
}>;
|
|
207
210
|
Row: import("vue").DefineComponent<{
|
|
208
211
|
element: {
|
|
209
|
-
type: import("vue").PropType<import("../../../es/shared/types").AnyObject>;
|
|
210
|
-
default: () => {};
|
|
211
|
-
};
|
|
212
|
-
columns: {
|
|
213
212
|
type: import("vue").PropType<Partial<{
|
|
214
213
|
[key: string]: any;
|
|
215
214
|
id: string;
|
|
@@ -227,13 +226,38 @@ declare const FieldSet: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
227
226
|
required: boolean;
|
|
228
227
|
requiredDisable: boolean;
|
|
229
228
|
hide: boolean;
|
|
230
|
-
}
|
|
229
|
+
}>>;
|
|
230
|
+
default: () => {};
|
|
231
|
+
};
|
|
232
|
+
columns: {
|
|
233
|
+
type: import("vue").PropType<import("./src/types").FieldSetColumnItem[]>;
|
|
231
234
|
default: () => never[];
|
|
232
235
|
};
|
|
233
236
|
idx: {
|
|
234
237
|
type: NumberConstructor;
|
|
235
238
|
default: number;
|
|
236
239
|
};
|
|
240
|
+
fieldList: {
|
|
241
|
+
type: import("vue").PropType<Partial<{
|
|
242
|
+
[key: string]: any;
|
|
243
|
+
id: string;
|
|
244
|
+
name: string;
|
|
245
|
+
show: boolean;
|
|
246
|
+
sort: boolean;
|
|
247
|
+
sortDirection: "NONE" | "ASC" | "DESC";
|
|
248
|
+
title: string;
|
|
249
|
+
alias: string;
|
|
250
|
+
fixedShow: boolean;
|
|
251
|
+
fixedWay: "NONE" | "LEFT" | "RIGHT";
|
|
252
|
+
columnWidth: number | null;
|
|
253
|
+
editable: boolean;
|
|
254
|
+
editableDisable: boolean;
|
|
255
|
+
required: boolean;
|
|
256
|
+
requiredDisable: boolean;
|
|
257
|
+
hide: boolean;
|
|
258
|
+
}>[]>;
|
|
259
|
+
default: () => never[];
|
|
260
|
+
};
|
|
237
261
|
}, {
|
|
238
262
|
fixedWayOptions: {
|
|
239
263
|
label: string;
|
|
@@ -245,10 +269,6 @@ declare const FieldSet: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
245
269
|
}[];
|
|
246
270
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
247
271
|
element: {
|
|
248
|
-
type: import("vue").PropType<import("../../../es/shared/types").AnyObject>;
|
|
249
|
-
default: () => {};
|
|
250
|
-
};
|
|
251
|
-
columns: {
|
|
252
272
|
type: import("vue").PropType<Partial<{
|
|
253
273
|
[key: string]: any;
|
|
254
274
|
id: string;
|
|
@@ -266,22 +286,56 @@ declare const FieldSet: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
266
286
|
required: boolean;
|
|
267
287
|
requiredDisable: boolean;
|
|
268
288
|
hide: boolean;
|
|
269
|
-
}
|
|
289
|
+
}>>;
|
|
290
|
+
default: () => {};
|
|
291
|
+
};
|
|
292
|
+
columns: {
|
|
293
|
+
type: import("vue").PropType<import("./src/types").FieldSetColumnItem[]>;
|
|
270
294
|
default: () => never[];
|
|
271
295
|
};
|
|
272
296
|
idx: {
|
|
273
297
|
type: NumberConstructor;
|
|
274
298
|
default: number;
|
|
275
299
|
};
|
|
300
|
+
fieldList: {
|
|
301
|
+
type: import("vue").PropType<Partial<{
|
|
302
|
+
[key: string]: any;
|
|
303
|
+
id: string;
|
|
304
|
+
name: string;
|
|
305
|
+
show: boolean;
|
|
306
|
+
sort: boolean;
|
|
307
|
+
sortDirection: "NONE" | "ASC" | "DESC";
|
|
308
|
+
title: string;
|
|
309
|
+
alias: string;
|
|
310
|
+
fixedShow: boolean;
|
|
311
|
+
fixedWay: "NONE" | "LEFT" | "RIGHT";
|
|
312
|
+
columnWidth: number | null;
|
|
313
|
+
editable: boolean;
|
|
314
|
+
editableDisable: boolean;
|
|
315
|
+
required: boolean;
|
|
316
|
+
requiredDisable: boolean;
|
|
317
|
+
hide: boolean;
|
|
318
|
+
}>[]>;
|
|
319
|
+
default: () => never[];
|
|
320
|
+
};
|
|
276
321
|
}>> & {
|
|
277
322
|
onUpdateChecked?: ((...args: any[]) => any) | undefined;
|
|
278
323
|
}>>;
|
|
279
324
|
emit: (event: "updateChecked", ...args: any[]) => void;
|
|
280
|
-
|
|
325
|
+
getSortPriorityOptions: () => {
|
|
326
|
+
label: string;
|
|
327
|
+
value: number;
|
|
328
|
+
}[];
|
|
329
|
+
getOptions: (column: import("../../../es/shared/types").AnyObject) => {
|
|
281
330
|
label: string;
|
|
282
331
|
value: string;
|
|
332
|
+
}[] | {
|
|
333
|
+
label: string;
|
|
334
|
+
value: number;
|
|
283
335
|
}[];
|
|
336
|
+
setDisabled: (column: import("../../../es/shared/types").AnyObject) => boolean;
|
|
284
337
|
onUpdateChecked: (checked: boolean, column: import("../../../es/shared/types").AnyObject) => void;
|
|
338
|
+
handleUpdateSelect: (value: string, column: import("../../../es/shared/types").AnyObject) => void;
|
|
285
339
|
NCheckbox: any;
|
|
286
340
|
NSelect: any;
|
|
287
341
|
NInput: any;
|
|
@@ -293,10 +347,6 @@ declare const FieldSet: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
293
347
|
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<{}>>, {}>;
|
|
294
348
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "updateChecked"[], "updateChecked", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
295
349
|
element: {
|
|
296
|
-
type: import("vue").PropType<import("../../../es/shared/types").AnyObject>;
|
|
297
|
-
default: () => {};
|
|
298
|
-
};
|
|
299
|
-
columns: {
|
|
300
350
|
type: import("vue").PropType<Partial<{
|
|
301
351
|
[key: string]: any;
|
|
302
352
|
id: string;
|
|
@@ -314,17 +364,43 @@ declare const FieldSet: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
314
364
|
required: boolean;
|
|
315
365
|
requiredDisable: boolean;
|
|
316
366
|
hide: boolean;
|
|
317
|
-
}
|
|
367
|
+
}>>;
|
|
368
|
+
default: () => {};
|
|
369
|
+
};
|
|
370
|
+
columns: {
|
|
371
|
+
type: import("vue").PropType<import("./src/types").FieldSetColumnItem[]>;
|
|
318
372
|
default: () => never[];
|
|
319
373
|
};
|
|
320
374
|
idx: {
|
|
321
375
|
type: NumberConstructor;
|
|
322
376
|
default: number;
|
|
323
377
|
};
|
|
378
|
+
fieldList: {
|
|
379
|
+
type: import("vue").PropType<Partial<{
|
|
380
|
+
[key: string]: any;
|
|
381
|
+
id: string;
|
|
382
|
+
name: string;
|
|
383
|
+
show: boolean;
|
|
384
|
+
sort: boolean;
|
|
385
|
+
sortDirection: "NONE" | "ASC" | "DESC";
|
|
386
|
+
title: string;
|
|
387
|
+
alias: string;
|
|
388
|
+
fixedShow: boolean;
|
|
389
|
+
fixedWay: "NONE" | "LEFT" | "RIGHT";
|
|
390
|
+
columnWidth: number | null;
|
|
391
|
+
editable: boolean;
|
|
392
|
+
editableDisable: boolean;
|
|
393
|
+
required: boolean;
|
|
394
|
+
requiredDisable: boolean;
|
|
395
|
+
hide: boolean;
|
|
396
|
+
}>[]>;
|
|
397
|
+
default: () => never[];
|
|
398
|
+
};
|
|
324
399
|
}>> & {
|
|
325
400
|
onUpdateChecked?: ((...args: any[]) => any) | undefined;
|
|
326
401
|
}, {
|
|
327
|
-
columns:
|
|
402
|
+
columns: import("./src/types").FieldSetColumnItem[];
|
|
403
|
+
element: Partial<{
|
|
328
404
|
[key: string]: any;
|
|
329
405
|
id: string;
|
|
330
406
|
name: string;
|
|
@@ -341,15 +417,33 @@ declare const FieldSet: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
341
417
|
required: boolean;
|
|
342
418
|
requiredDisable: boolean;
|
|
343
419
|
hide: boolean;
|
|
344
|
-
}
|
|
345
|
-
element: import("../../../es/shared/types").AnyObject;
|
|
420
|
+
}>;
|
|
346
421
|
idx: number;
|
|
422
|
+
fieldList: Partial<{
|
|
423
|
+
[key: string]: any;
|
|
424
|
+
id: string;
|
|
425
|
+
name: string;
|
|
426
|
+
show: boolean;
|
|
427
|
+
sort: boolean;
|
|
428
|
+
sortDirection: "NONE" | "ASC" | "DESC";
|
|
429
|
+
title: string;
|
|
430
|
+
alias: string;
|
|
431
|
+
fixedShow: boolean;
|
|
432
|
+
fixedWay: "NONE" | "LEFT" | "RIGHT";
|
|
433
|
+
columnWidth: number | null;
|
|
434
|
+
editable: boolean;
|
|
435
|
+
editableDisable: boolean;
|
|
436
|
+
required: boolean;
|
|
437
|
+
requiredDisable: boolean;
|
|
438
|
+
hide: boolean;
|
|
439
|
+
}>[];
|
|
347
440
|
}>;
|
|
348
441
|
isArray: {
|
|
349
442
|
(value?: any): value is any[];
|
|
350
443
|
<T>(value?: any): value is any[];
|
|
351
444
|
};
|
|
352
445
|
setStyle: typeof import("./src/utils").setStyle;
|
|
446
|
+
HelpCircleSharp: 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<{}>>, {}>;
|
|
353
447
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "save" | "reset")[], "close" | "save" | "reset", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
354
448
|
fields: {
|
|
355
449
|
type: import("vue").PropType<Partial<{
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="lodash" />
|
|
1
2
|
import { PropType } from 'vue';
|
|
2
3
|
import { setStyle, isDisable } from './utils';
|
|
3
4
|
import { FieldSetColumnName, FieldSetColumnItem } from '../../../../es/components/field-set/src/types';
|
|
@@ -122,7 +123,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
122
123
|
isShowColumn: (column: AnyObject) => boolean;
|
|
123
124
|
initFields: () => AnyObject[];
|
|
124
125
|
handleGroup: (fields: AnyObject[]) => AnyObject[];
|
|
125
|
-
getTableFields: () =>
|
|
126
|
+
getTableFields: () => import("lodash").Omit<never, "uuid">[];
|
|
126
127
|
handleAllCheck: (checked: boolean, field: string) => void;
|
|
127
128
|
handleCheck: ({ checked, column }: {
|
|
128
129
|
checked: boolean;
|
|
@@ -133,6 +134,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
133
134
|
NButton: any;
|
|
134
135
|
NCheckbox: any;
|
|
135
136
|
NPopconfirm: any;
|
|
137
|
+
NIcon: any;
|
|
138
|
+
NTooltip: any;
|
|
136
139
|
Draggable: import("vue").DefineComponent<{
|
|
137
140
|
list: {
|
|
138
141
|
type: ArrayConstructor;
|
|
@@ -208,10 +211,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
208
211
|
}>;
|
|
209
212
|
Row: import("vue").DefineComponent<{
|
|
210
213
|
element: {
|
|
211
|
-
type: PropType<AnyObject>;
|
|
212
|
-
default: () => {};
|
|
213
|
-
};
|
|
214
|
-
columns: {
|
|
215
214
|
type: PropType<Partial<{
|
|
216
215
|
[key: string]: any;
|
|
217
216
|
id: string;
|
|
@@ -229,13 +228,38 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
229
228
|
required: boolean;
|
|
230
229
|
requiredDisable: boolean;
|
|
231
230
|
hide: boolean;
|
|
232
|
-
}
|
|
231
|
+
}>>;
|
|
232
|
+
default: () => {};
|
|
233
|
+
};
|
|
234
|
+
columns: {
|
|
235
|
+
type: PropType<FieldSetColumnItem[]>;
|
|
233
236
|
default: () => never[];
|
|
234
237
|
};
|
|
235
238
|
idx: {
|
|
236
239
|
type: NumberConstructor;
|
|
237
240
|
default: number;
|
|
238
241
|
};
|
|
242
|
+
fieldList: {
|
|
243
|
+
type: PropType<Partial<{
|
|
244
|
+
[key: string]: any;
|
|
245
|
+
id: string;
|
|
246
|
+
name: string;
|
|
247
|
+
show: boolean;
|
|
248
|
+
sort: boolean;
|
|
249
|
+
sortDirection: "NONE" | "ASC" | "DESC";
|
|
250
|
+
title: string;
|
|
251
|
+
alias: string;
|
|
252
|
+
fixedShow: boolean;
|
|
253
|
+
fixedWay: "NONE" | "LEFT" | "RIGHT";
|
|
254
|
+
columnWidth: number | null;
|
|
255
|
+
editable: boolean;
|
|
256
|
+
editableDisable: boolean;
|
|
257
|
+
required: boolean;
|
|
258
|
+
requiredDisable: boolean;
|
|
259
|
+
hide: boolean;
|
|
260
|
+
}>[]>;
|
|
261
|
+
default: () => never[];
|
|
262
|
+
};
|
|
239
263
|
}, {
|
|
240
264
|
fixedWayOptions: {
|
|
241
265
|
label: string;
|
|
@@ -247,10 +271,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
247
271
|
}[];
|
|
248
272
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
249
273
|
element: {
|
|
250
|
-
type: PropType<AnyObject>;
|
|
251
|
-
default: () => {};
|
|
252
|
-
};
|
|
253
|
-
columns: {
|
|
254
274
|
type: PropType<Partial<{
|
|
255
275
|
[key: string]: any;
|
|
256
276
|
id: string;
|
|
@@ -268,22 +288,56 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
268
288
|
required: boolean;
|
|
269
289
|
requiredDisable: boolean;
|
|
270
290
|
hide: boolean;
|
|
271
|
-
}
|
|
291
|
+
}>>;
|
|
292
|
+
default: () => {};
|
|
293
|
+
};
|
|
294
|
+
columns: {
|
|
295
|
+
type: PropType<FieldSetColumnItem[]>;
|
|
272
296
|
default: () => never[];
|
|
273
297
|
};
|
|
274
298
|
idx: {
|
|
275
299
|
type: NumberConstructor;
|
|
276
300
|
default: number;
|
|
277
301
|
};
|
|
302
|
+
fieldList: {
|
|
303
|
+
type: PropType<Partial<{
|
|
304
|
+
[key: string]: any;
|
|
305
|
+
id: string;
|
|
306
|
+
name: string;
|
|
307
|
+
show: boolean;
|
|
308
|
+
sort: boolean;
|
|
309
|
+
sortDirection: "NONE" | "ASC" | "DESC";
|
|
310
|
+
title: string;
|
|
311
|
+
alias: string;
|
|
312
|
+
fixedShow: boolean;
|
|
313
|
+
fixedWay: "NONE" | "LEFT" | "RIGHT";
|
|
314
|
+
columnWidth: number | null;
|
|
315
|
+
editable: boolean;
|
|
316
|
+
editableDisable: boolean;
|
|
317
|
+
required: boolean;
|
|
318
|
+
requiredDisable: boolean;
|
|
319
|
+
hide: boolean;
|
|
320
|
+
}>[]>;
|
|
321
|
+
default: () => never[];
|
|
322
|
+
};
|
|
278
323
|
}>> & {
|
|
279
324
|
onUpdateChecked?: ((...args: any[]) => any) | undefined;
|
|
280
325
|
}>>;
|
|
281
326
|
emit: (event: "updateChecked", ...args: any[]) => void;
|
|
282
|
-
|
|
327
|
+
getSortPriorityOptions: () => {
|
|
328
|
+
label: string;
|
|
329
|
+
value: number;
|
|
330
|
+
}[];
|
|
331
|
+
getOptions: (column: AnyObject) => {
|
|
283
332
|
label: string;
|
|
284
333
|
value: string;
|
|
334
|
+
}[] | {
|
|
335
|
+
label: string;
|
|
336
|
+
value: number;
|
|
285
337
|
}[];
|
|
338
|
+
setDisabled: (column: AnyObject) => boolean;
|
|
286
339
|
onUpdateChecked: (checked: boolean, column: AnyObject) => void;
|
|
340
|
+
handleUpdateSelect: (value: string, column: AnyObject) => void;
|
|
287
341
|
NCheckbox: any;
|
|
288
342
|
NSelect: any;
|
|
289
343
|
NInput: any;
|
|
@@ -295,10 +349,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
295
349
|
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<{}>>, {}>;
|
|
296
350
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "updateChecked"[], "updateChecked", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
297
351
|
element: {
|
|
298
|
-
type: PropType<AnyObject>;
|
|
299
|
-
default: () => {};
|
|
300
|
-
};
|
|
301
|
-
columns: {
|
|
302
352
|
type: PropType<Partial<{
|
|
303
353
|
[key: string]: any;
|
|
304
354
|
id: string;
|
|
@@ -316,17 +366,43 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
316
366
|
required: boolean;
|
|
317
367
|
requiredDisable: boolean;
|
|
318
368
|
hide: boolean;
|
|
319
|
-
}
|
|
369
|
+
}>>;
|
|
370
|
+
default: () => {};
|
|
371
|
+
};
|
|
372
|
+
columns: {
|
|
373
|
+
type: PropType<FieldSetColumnItem[]>;
|
|
320
374
|
default: () => never[];
|
|
321
375
|
};
|
|
322
376
|
idx: {
|
|
323
377
|
type: NumberConstructor;
|
|
324
378
|
default: number;
|
|
325
379
|
};
|
|
380
|
+
fieldList: {
|
|
381
|
+
type: PropType<Partial<{
|
|
382
|
+
[key: string]: any;
|
|
383
|
+
id: string;
|
|
384
|
+
name: string;
|
|
385
|
+
show: boolean;
|
|
386
|
+
sort: boolean;
|
|
387
|
+
sortDirection: "NONE" | "ASC" | "DESC";
|
|
388
|
+
title: string;
|
|
389
|
+
alias: string;
|
|
390
|
+
fixedShow: boolean;
|
|
391
|
+
fixedWay: "NONE" | "LEFT" | "RIGHT";
|
|
392
|
+
columnWidth: number | null;
|
|
393
|
+
editable: boolean;
|
|
394
|
+
editableDisable: boolean;
|
|
395
|
+
required: boolean;
|
|
396
|
+
requiredDisable: boolean;
|
|
397
|
+
hide: boolean;
|
|
398
|
+
}>[]>;
|
|
399
|
+
default: () => never[];
|
|
400
|
+
};
|
|
326
401
|
}>> & {
|
|
327
402
|
onUpdateChecked?: ((...args: any[]) => any) | undefined;
|
|
328
403
|
}, {
|
|
329
|
-
columns:
|
|
404
|
+
columns: FieldSetColumnItem[];
|
|
405
|
+
element: Partial<{
|
|
330
406
|
[key: string]: any;
|
|
331
407
|
id: string;
|
|
332
408
|
name: string;
|
|
@@ -343,15 +419,33 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
343
419
|
required: boolean;
|
|
344
420
|
requiredDisable: boolean;
|
|
345
421
|
hide: boolean;
|
|
346
|
-
}
|
|
347
|
-
element: AnyObject;
|
|
422
|
+
}>;
|
|
348
423
|
idx: number;
|
|
424
|
+
fieldList: Partial<{
|
|
425
|
+
[key: string]: any;
|
|
426
|
+
id: string;
|
|
427
|
+
name: string;
|
|
428
|
+
show: boolean;
|
|
429
|
+
sort: boolean;
|
|
430
|
+
sortDirection: "NONE" | "ASC" | "DESC";
|
|
431
|
+
title: string;
|
|
432
|
+
alias: string;
|
|
433
|
+
fixedShow: boolean;
|
|
434
|
+
fixedWay: "NONE" | "LEFT" | "RIGHT";
|
|
435
|
+
columnWidth: number | null;
|
|
436
|
+
editable: boolean;
|
|
437
|
+
editableDisable: boolean;
|
|
438
|
+
required: boolean;
|
|
439
|
+
requiredDisable: boolean;
|
|
440
|
+
hide: boolean;
|
|
441
|
+
}>[];
|
|
349
442
|
}>;
|
|
350
443
|
isArray: {
|
|
351
444
|
(value?: any): value is any[];
|
|
352
445
|
<T>(value?: any): value is any[];
|
|
353
446
|
};
|
|
354
447
|
setStyle: typeof setStyle;
|
|
448
|
+
HelpCircleSharp: 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<{}>>, {}>;
|
|
355
449
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "save" | "reset")[], "close" | "save" | "reset", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
356
450
|
fields: {
|
|
357
451
|
type: PropType<Partial<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as l,computed as t,watch as i,openBlock as d,createElementBlock as o,createElementVNode as
|
|
1
|
+
import{defineComponent as e,ref as l,computed as t,watch as i,openBlock as d,createElementBlock as o,createElementVNode as s,Fragment as a,renderList as n,normalizeStyle as c,unref as r,createBlock as u,withCtx as f,createTextVNode as m,toDisplayString as h,createCommentVNode as p,createVNode as y,renderSlot as v}from"vue";import{NCheckbox as b,NTooltip as k,NIcon as x,NPopconfirm as g,NButton as A}from"naive-ui";import _ from"../../../shared/components/VueDraggable/src/vuedraggable.js";import w from"./components/Row.vue.js";import{isArray as S,cloneDeep as C,isString as W,omit as E}from"lodash-es";import{setStyle as q,getGroupTree as F,isDisable as N}from"./utils/index.js";import{uuidGenerator as R}from"../../../shared/utils/index.js";import{HelpCircleSharp as j}from"@vicons/ionicons5";const L={class:"c-field-set"},U={class:"c-field-set__table-header"},D=s("span",null,"数值越小,优先级越高",-1),P={class:"c-field-set__table-body"},V=["tabindex"],B={key:0,class:"c-field-set__table-footer"};var O=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}},emits:["save","close","reset"],setup(e,{expose:O,emit:T}){const G=e,H={sid:"id",columnName:"name",isShow:"show",isSort:"sort",isFixed:"fixedWay",colWidth:"columnWidth"},I=l([]),$=l([{title:"所有字段",type:"text",field:"title"},{title:"显示",type:"checkbox",checkedAll:!1,disabledAll:!1,field:"show"},{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"}]),z=t((()=>I.value.flat())),J=()=>{T("save",{tableFields:X()})},K=()=>{T("close")};function M(){I.value=Q(),Z(),T("reset")}function Q(){const e=C(G.fields).map((e=>({...e,uuid:R()})));return Object.keys(H).forEach((l=>{e.forEach((e=>{"old"==G.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[H[l]]=1==e[l]:e[H[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)}))})),function(e){if(G.groupSetting){return F(G.groupSetting,e).reduce(((t,i)=>{const d=W(i)?e.find((e=>e.name===i)):l(i.children);return d&&t.push(d),t}),[])}return e;function l(t){const i=[];return t.forEach((t=>{if(t.children)i.push(...l(t.children));else{const l=e.find((e=>e.name===t));l&&i.push(l)}})),i}}(e)}const X=()=>{let e=[];return e="old"==G.type?z.value.map(((e,l)=>({id:e.id,field:e.name,visible:e.show,sequence:l,sortable:e.sort,title:e.alias,fixed:e.fixedWay,minWidth:e.columnWidth,bold:e.bold,sortDirection:e.sortDirection,...G.isEdit?{required:e.required,editable:e.editable}:{}}))):z.value,e.map((e=>E(e,["uuid"])))};function Y({checked:e,column:l}){const t=!e||ee(l.field);l.checkedAll=!t}function Z(){var e,l;(null==(e=G.showColumnNames)?void 0:e.length)&&($.value=$.value.filter((e=>{var l,t;return"title"===e.field||(null==(t=null==(l=G.showColumnNames)?void 0:l.includes)?void 0:t.call(l,e.field))}))),(null==(l=G.customColumns)?void 0:l.length)&&$.value.push(...G.customColumns),G.showSeq&&$.value.splice(1,0,{title:"排序",type:"text",field:"seq"}),$.value.forEach((e=>{if(function(e){const l=["editable","required"].includes(e.field);return l&&G.isEdit||!l}(e)&&(e.isShow=!0),"checkbox"===e.type){const l=I.value.flat().every((l=>!Reflect.has(l,e.field)));e.checkedAll=!ee(e.field)&&!l}}))}function ee(e){return I.value.flat().some((l=>!N(l,e)&&!l[e]&&"0001"!=l.id))}return i([()=>G.fields,()=>{var e;return null==(e=G.showColumnNames)?void 0:e.length}],(([e,l])=>{e.length>0&&(I.value=Q(),Z())}),{immediate:!0,deep:!0}),O({getTableFields:X}),(l,t)=>(d(),o("div",L,[s("div",U,[(d(!0),o(a,null,n($.value,((e,l)=>(d(),o(a,{key:l},[e.isShow?(d(),o("span",{key:0,class:"table-cell",style:c(r(q)(e))},["checkbox"===e.type?(d(),u(r(b),{key:0,checked:e.checkedAll,"onUpdate:checked":[l=>e.checkedAll=l,l=>{return t=l,i=e.field,void z.value.forEach((e=>{N(e,i)||(e[i]=t)}));var t,i}],disabled:e.disabledAll},{default:f((()=>[m(h(e.title),1)])),_:2},1032,["checked","onUpdate:checked","disabled"])):p("v-if",!0),m(" "+h("checkbox"!==e.type?e.title:"")+" ",1),"sortPriority"===e.field?(d(),u(r(k),{key:1,trigger:"hover"},{trigger:f((()=>[y(r(x),{component:r(j),style:{top:"2px"}},null,8,["component"])])),default:f((()=>[D])),_:1})):p("v-if",!0)],4)):p("v-if",!0)],64)))),128))]),s("div",P,[y(r(_),{modelValue:I.value,"onUpdate:modelValue":t[0]||(t[0]=e=>I.value=e),animation:"150","item-key":"id",draggable:".item"},{item:f((({element:e,index:l})=>[e.hide?p("v-if",!0):(d(),o("div",{key:0,class:"item",tabindex:l},[r(S)(e)?(d(!0),o(a,{key:0},n(e,((e,t)=>(d(),u(w,{key:t,element:e,columns:$.value,idx:l+1,fieldList:r(z),onUpdateChecked:Y},null,8,["element","columns","idx","fieldList"])))),128)):(d(),u(w,{key:1,element:e,columns:$.value,idx:l+1,fieldList:r(z),onUpdateChecked:Y},null,8,["element","columns","idx","fieldList"]))],8,V))])),_:1},8,["modelValue"])]),e.footerFlag?(d(),o("div",B,[p(" 底部按钮插槽 "),v(l.$slots,"footer",{},(()=>[y(r(g),{onPositiveClick:M},{trigger:f((()=>[y(r(A),{style:{"margin-right":"8px"}},{default:f((()=>[m("恢复默认设置")])),_:1})])),default:f((()=>[m(" 确认要恢复系统默认设置吗? ")])),_:1}),y(r(A),{style:{"margin-right":"8px"},onClick:K},{default:f((()=>[m("取消")])),_:1}),y(r(A),{type:"primary",onClick:J},{default:f((()=>[m("保存")])),_:1})]))])):p("v-if",!0)]))}});export{O as default};
|