cnhis-design-vue 3.1.44-release.3 → 3.1.44-release.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +87 -87
- package/es/components/base-search/index.d.ts +1 -0
- package/es/components/base-search/src/index.vue.d.ts +1 -0
- package/es/components/base-search/style/index.css +1 -1
- 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/classification/index.d.ts +2 -0
- package/es/components/classification/src/components/search-filter/index.vue.d.ts +2 -0
- package/es/components/classification/src/components/set-classification/index.vue.d.ts +2 -0
- package/es/components/classification/src/index.vue.d.ts +2 -0
- package/es/components/fabric-chart/src/utils/index.d.ts +6823 -0
- package/es/components/iho-select-label/index.d.ts +5 -0
- package/es/components/iho-select-label/src/SelectLabel.vue.d.ts +5 -0
- package/es/components/iho-select-label/src/SelectLabel.vue.js +1 -1
- package/es/components/iho-select-label/src/components/label-classify.vue.js +1 -1
- package/es/components/iho-select-label/style/index.css +1 -1
- package/es/components/iho-table/index.d.ts +2 -0
- package/es/components/iho-table/src/IhoTable.vue.d.ts +2 -0
- package/es/components/iho-table/src/IhoTable.vue.js +1 -1
- package/es/components/iho-table/src/plugins/defaultConfigPlugin/index.js +1 -1
- package/es/components/iho-table/src/types/index.d.ts +2 -0
- package/es/components/index.css +1 -1
- package/es/components/quick-search/index.d.ts +1 -0
- package/es/components/quick-search/src/index.vue.d.ts +1 -0
- package/es/components/quick-search/style/index.css +1 -1
- package/es/components/scale-view/src/ScaleView.vue.js +1 -1
- package/es/components/select-label/src/LabelFormContent.vue.js +1 -1
- package/es/components/select-person/src/SearchMultiple.vue.d.ts +0 -6
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +2 -0
- package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +2 -0
- package/es/components/table-filter/src/components/render-widget/components/Label.vue.d.ts +70 -0
- package/es/components/table-filter/src/components/render-widget/components/Label.vue.js +1 -0
- package/es/components/table-filter/src/components/render-widget/components/SelectLabel.vue.d.ts +56 -0
- package/es/components/table-filter/src/components/render-widget/components/SelectLabel.vue.js +1 -0
- package/es/components/table-filter/src/components/render-widget/components/index.d.ts +3 -1
- package/es/components/table-filter/src/components/render-widget/components/index.js +1 -1
- package/es/components/table-filter/src/components/render-widget/index.vue.js +1 -1
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +145 -0
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.js +1 -1
- package/es/components/table-filter/src/directive/resize.d.ts +4 -0
- package/es/components/table-filter/src/directive/resize.js +1 -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/tool/resizeSensor.d.ts +16 -0
- package/es/components/table-filter/src/tool/resizeSensor.js +1 -0
- package/es/components/table-filter/src/types/enums.d.ts +2 -0
- package/es/components/table-filter/src/types/enums.js +1 -1
- package/es/components/table-filter/src/types/index.d.ts +14 -0
- package/es/env.d.ts +25 -25
- package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +86 -0
- package/es/shared/package.json.js +1 -1
- package/es/shared/utils/tapable/index.d.ts +139 -0
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
.classification-modal-block .n-card-header .svg-wrap .iconfont-table-filter{cursor:pointer;font-size:18px}.classification-modal-block .n-card-header .svg-wrap .iconfont-table-filter:last-child{margin-left:16px}.classification-modal-block .n-card-header .svg-wrap .n-icon{cursor:pointer}.classification-modal-block .n-card__content{overflow-y:auto}.classification-modal-block .n-card__content .table-modal-list .list-title{background-color:#f2f2f4;border:1px solid #e1dfdf;display:flex;height:52px;line-height:52px}.classification-modal-block .n-card__content .table-modal-list .list-title .list-title-item{font-weight:700;width:25%}.classification-modal-block .n-card__content .table-modal-list .list-content{padding:0}.classification-modal-block .n-card__content .table-modal-list .list-content li{display:flex;height:52px;line-height:52px}.classification-modal-block .n-card__content .table-modal-list .list-content li .list-content-item{align-items:center;display:flex;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap;width:25%}.classification-modal-block .n-card__content .table-modal-list .list-content li .list-content-item .n-icon{cursor:pointer;margin-right:8px}.classification-modal-block .n-card__content .table-modal-list .list-content li.checked,.classification-modal-block .n-card__content .table-modal-list .list-content li.checked .text{background-color:#f2f2f2}.classification-modal-block .n-card__content .table-modal-list .list-content li .text{background-color:#fff;display:inline-block;padding:0 10px;position:relative}.classification-modal-block .n-card__content .table-modal-list .list-content li .list-content-line{position:relative;text-align:center;width:75%}.classification-modal-block .n-card__content .table-modal-list .list-content li .list-content-line:before{border:1px solid #e8e8e8;content:"";left:0;margin-top:20px;position:absolute;width:100%}.classification-modal-block .n-card__content .table-modal-list .list-title-item{margin-left:-1px;padding:0 10px}.classification-modal-block .n-card__content .table-modal-list .list-content-item{border-bottom:1px solid #e1dfdf;margin-left:-1px;margin-top:-1px;padding:0 10px}.classification-modal-block .n-card__content .table-modal-list .list-content-item .ant-switch{height:16px;min-width:28px;width:28px}.classification-modal-block .n-card__content .table-modal-list .list-content-item .ant-switch:after{height:12px;width:12px}.classification-modal-block .n-card__content .table-modal-list .list-content-radio,.classification-modal-block .n-card__content .table-modal-list .list-content-switch{text-align:center}.classification-modal-block .n-card__content .table-modal-list .anticon+.anticon{margin-left:8px}.classification-modal-block .n-card__content .class-filter-content .item-name{display:flex;height:32px;line-height:32px;margin-bottom:10px}.classification-modal-block .n-card__content .class-filter-content .item-name .label{text-align:right;width:120px}.classification-modal-block .n-card__content .class-filter-content .item-name .addAction{align-items:center;cursor:pointer;display:flex}.classification-modal-block .n-card__content .class-filter-content .item-name .blue{color:#2d7aff;margin-right:8px}.classification-modal-block .n-card__content .class-filter-content .n-form-item-label{width:120px}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content{align-items:center;display:flex;flex-wrap:wrap;line-height:32px}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .label{display:inline-block;height:32px;line-height:32px;margin-bottom:10px;text-align:right;width:120px}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .ant-btn-dashed{border-color:#a6a6a6;color:#a6a6a6}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag{margin-bottom:10px;margin-right:10px;position:relative}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag .anticon-close{color:#2d7aff;cursor:pointer;line-height:36px;position:absolute;right:5px;top:2px}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag .s-content{align-items:center;background-color:rgba(45,122,255,.1);border:1px solid #2d7aff;border-radius:3px;box-sizing:border-box;color:#2d7aff;cursor:pointer;display:flex;justify-content:center;opacity:1;padding:0 10px;width:100px}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag .s-content span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag.edit-tag-select .ant-input-disabled,.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag.edit-tag-select .s-content{background-color:#2d7aff;color:#fff}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag.edit-tag-select .anticon-close{color:#fff}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .ant-btn{margin-bottom:10px}.classification-modal-block .n-card__content .class-filter-content .select-item-list{border-top:1px solid #e6e6e6;margin-bottom:6px;margin-top:16px;padding-top:12px}.classification-modal-block .n-card__content .class-filter-content .select-item-list li{align-items:center;display:flex;list-style:none;margin-bottom:10px}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .index-span{display:inline-block;width:30px}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .form-item{margin-right:10px;width:120px}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .form-item.n-date-picker{width:auto}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .value-cfg_wrapper{display:flex;flex-wrap:wrap}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .value-cfg_wrapper .form-item{margin-right:10px}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .delete-item-icon{color:red;cursor:pointer;font-size:18px}.classification-modal-block .n-card__footer{padding-top:10px}.classification-modal-block .n-card__footer .flex_between{display:flex;justify-content:space-between}.classification-modal-block .n-card__footer .flex_right{display:flex;justify-content:right}.classification-modal-block .n-card__footer .n-button{margin-left:8px}.render-widget-input-number-group{align-items:center;display:flex}.render-widget-input-number-group .divider{text-align:center;width:24px}.n-base-select-option__content{width:100%}.n-base-select-option__content .select-widget-dynamic-option{display:flex;flex-wrap:nowrap;width:100%}.n-base-select-option__content .select-widget-dynamic-option .select-widget-dynamic-item{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.render-widget-date-range{align-items:center;display:flex;flex-wrap:nowrap;width:100%}.render-widget-date-range .radio-date-group{border:1px solid #d9d9d9;display:flex;min-width:720px}.render-widget-date-range .radio-date-group .radio-date-item{border-left:1px solid #d9d9d9;cursor:pointer;height:30px;line-height:30px;padding:0 8px}.render-widget-date-range .radio-date-group .radio-date-item:first-child{border:none}.render-widget-date-range .radio-date-group .radio-date-item.radio-date-item-active{background:#3e65cf;border-color:#3e65cf;color:#fff}.render-widget-date-range .select-date-left{margin-left:16px}.render-widget-date-range .select-date-right{margin-right:16px}.render-widget-date-range .date-detail-range{display:flex;flex-wrap:nowrap}.render-widget-date-range .date-detail-range .divider{text-align:center;width:10px}.quick-search-block .quick-item{margin-bottom:10px;min-width:32px;width:20%}.quick-search-block .quick-item .quick-row{
|
|
1
|
+
.classification-modal-block .n-card-header .svg-wrap .iconfont-table-filter{cursor:pointer;font-size:18px}.classification-modal-block .n-card-header .svg-wrap .iconfont-table-filter:last-child{margin-left:16px}.classification-modal-block .n-card-header .svg-wrap .n-icon{cursor:pointer}.classification-modal-block .n-card__content{overflow-y:auto}.classification-modal-block .n-card__content .table-modal-list .list-title{background-color:#f2f2f4;border:1px solid #e1dfdf;display:flex;height:52px;line-height:52px}.classification-modal-block .n-card__content .table-modal-list .list-title .list-title-item{font-weight:700;width:25%}.classification-modal-block .n-card__content .table-modal-list .list-content{padding:0}.classification-modal-block .n-card__content .table-modal-list .list-content li{display:flex;height:52px;line-height:52px}.classification-modal-block .n-card__content .table-modal-list .list-content li .list-content-item{align-items:center;display:flex;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap;width:25%}.classification-modal-block .n-card__content .table-modal-list .list-content li .list-content-item .n-icon{cursor:pointer;margin-right:8px}.classification-modal-block .n-card__content .table-modal-list .list-content li.checked,.classification-modal-block .n-card__content .table-modal-list .list-content li.checked .text{background-color:#f2f2f2}.classification-modal-block .n-card__content .table-modal-list .list-content li .text{background-color:#fff;display:inline-block;padding:0 10px;position:relative}.classification-modal-block .n-card__content .table-modal-list .list-content li .list-content-line{position:relative;text-align:center;width:75%}.classification-modal-block .n-card__content .table-modal-list .list-content li .list-content-line:before{border:1px solid #e8e8e8;content:"";left:0;margin-top:20px;position:absolute;width:100%}.classification-modal-block .n-card__content .table-modal-list .list-title-item{margin-left:-1px;padding:0 10px}.classification-modal-block .n-card__content .table-modal-list .list-content-item{border-bottom:1px solid #e1dfdf;margin-left:-1px;margin-top:-1px;padding:0 10px}.classification-modal-block .n-card__content .table-modal-list .list-content-item .ant-switch{height:16px;min-width:28px;width:28px}.classification-modal-block .n-card__content .table-modal-list .list-content-item .ant-switch:after{height:12px;width:12px}.classification-modal-block .n-card__content .table-modal-list .list-content-radio,.classification-modal-block .n-card__content .table-modal-list .list-content-switch{text-align:center}.classification-modal-block .n-card__content .table-modal-list .anticon+.anticon{margin-left:8px}.classification-modal-block .n-card__content .class-filter-content .item-name{display:flex;height:32px;line-height:32px;margin-bottom:10px}.classification-modal-block .n-card__content .class-filter-content .item-name .label{text-align:right;width:120px}.classification-modal-block .n-card__content .class-filter-content .item-name .addAction{align-items:center;cursor:pointer;display:flex}.classification-modal-block .n-card__content .class-filter-content .item-name .blue{color:#2d7aff;margin-right:8px}.classification-modal-block .n-card__content .class-filter-content .n-form-item-label{width:120px}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content{align-items:center;display:flex;flex-wrap:wrap;line-height:32px}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .label{display:inline-block;height:32px;line-height:32px;margin-bottom:10px;text-align:right;width:120px}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .ant-btn-dashed{border-color:#a6a6a6;color:#a6a6a6}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag{margin-bottom:10px;margin-right:10px;position:relative}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag .anticon-close{color:#2d7aff;cursor:pointer;line-height:36px;position:absolute;right:5px;top:2px}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag .s-content{align-items:center;background-color:rgba(45,122,255,.1);border:1px solid #2d7aff;border-radius:3px;box-sizing:border-box;color:#2d7aff;cursor:pointer;display:flex;justify-content:center;opacity:1;padding:0 10px;width:100px}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag .s-content span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag.edit-tag-select .ant-input-disabled,.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag.edit-tag-select .s-content{background-color:#2d7aff;color:#fff}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .edit-tag.edit-tag-select .anticon-close{color:#fff}.classification-modal-block .n-card__content .class-filter-content .quickSearch-content .ant-btn{margin-bottom:10px}.classification-modal-block .n-card__content .class-filter-content .select-item-list{border-top:1px solid #e6e6e6;margin-bottom:6px;margin-top:16px;padding-top:12px}.classification-modal-block .n-card__content .class-filter-content .select-item-list li{align-items:center;display:flex;list-style:none;margin-bottom:10px}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .index-span{display:inline-block;width:30px}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .form-item{margin-right:10px;width:120px}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .form-item.n-date-picker{width:auto}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .value-cfg_wrapper{display:flex;flex-wrap:wrap}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .value-cfg_wrapper .form-item{margin-right:10px}.classification-modal-block .n-card__content .class-filter-content .select-item-list li .delete-item-icon{color:red;cursor:pointer;font-size:18px}.classification-modal-block .n-card__footer{padding-top:10px}.classification-modal-block .n-card__footer .flex_between{display:flex;justify-content:space-between}.classification-modal-block .n-card__footer .flex_right{display:flex;justify-content:right}.classification-modal-block .n-card__footer .n-button{margin-left:8px}.render-widget-input-number-group{align-items:center;display:flex}.render-widget-input-number-group .divider{text-align:center;width:24px}.n-base-select-option__content{width:100%}.n-base-select-option__content .select-widget-dynamic-option{display:flex;flex-wrap:nowrap;width:100%}.n-base-select-option__content .select-widget-dynamic-option .select-widget-dynamic-item{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.render-widget-date-range{align-items:center;display:flex;flex-wrap:nowrap;width:100%}.render-widget-date-range .radio-date-group{border:1px solid #d9d9d9;display:flex;min-width:720px}.render-widget-date-range .radio-date-group .radio-date-item{border-left:1px solid #d9d9d9;cursor:pointer;height:30px;line-height:30px;padding:0 8px}.render-widget-date-range .radio-date-group .radio-date-item:first-child{border:none}.render-widget-date-range .radio-date-group .radio-date-item.radio-date-item-active{background:#3e65cf;border-color:#3e65cf;color:#fff}.render-widget-date-range .select-date-left{margin-left:16px}.render-widget-date-range .select-date-right{margin-right:16px}.render-widget-date-range .date-detail-range{display:flex;flex-wrap:nowrap}.render-widget-date-range .date-detail-range .divider{text-align:center;width:10px}.label-attr-filter-container .edit-f-label{font-size:14px;line-height:32px;padding-left:0}.label-attr-filter-container .edit-f-content.label-select-height{flex:none;height:74px;overflow:hidden}.label-attr-filter-container .edit-f-content .label-f-content{display:flex;flex-wrap:wrap}.label-attr-filter-container .edit-f-content .label-f-content .n-tag{border:1px solid #e0e0e6;height:32px;margin:0 8px 8px 0;max-width:108px;text-align:center}.label-attr-filter-container .edit-f-content .label-f-content .n-tag .n-tag__content{align-items:center;display:inline-flex}.label-attr-filter-container .edit-f-content .label-f-content .n-tag .n-tag__content span{display:inline-block;height:100%;line-height:30px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:80px}.label-attr-filter-container .label-f-unfold-btn{margin:8px 0}.label-attr-filter-container .label-f-unfold-btn .operate-btn{align-items:center;cursor:pointer;display:flex}.label-attr-filter-container .label-f-unfold-btn .operate-btn .n-icon{margin-left:6px}.quick-search-block .quick-item{margin-bottom:10px;min-width:32px;width:20%}.quick-search-block .quick-item .quick-row{display:flex}.quick-search-block .quick-item .quick-row .quick-item-title{box-sizing:border-box;flex-basis:134px;line-height:32px;min-width:130px;overflow:hidden;padding-left:4px;padding-right:4px;text-align:right;text-overflow:ellipsis;white-space:nowrap}.quick-search-block .quick-item .quick-row .quick-item-col{align-items:center;display:flex;padding:0 4px;width:calc(100% - 134px)}.quick-search-block .quick-item .quick-row .quick-item-title-default{width:25%}.quick-search-block .quick-item .quick-row .quick-item-col-default{width:75%}.quick-search-block.quick-search-table .quick-item{display:inline-block}.quick-search-block.quick-search-table .quick-item.quick-block{display:block;width:100%}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,reactive as t,ref as a,watch as o,nextTick as i,openBlock as l,createElementBlock as n,createCommentVNode as s,Fragment as r,unref as u,createBlock as c,mergeProps as p,createElementVNode as d,normalizeClass as m,normalizeStyle as v,createVNode as f,withCtx as g,renderList as y,toDisplayString as b,createTextVNode as k,resolveDynamicComponent as C,h as S}from"vue";import h from"./hooks/use-noData.js";import{getScaleViewState as w}from"./hooks/scaleview-state.js";import{ScaleViewComputed as E}from"./hooks/scaleview-computed.js";import{ScaleViewInit as _}from"./hooks/scaleview-init.js";import{ScaleViewSubmit as A}from"./hooks/scaleview-submit.js";import{handleQueryParams as O,isCollection as j,isEvaluation as T}from"./utils/judge-types.js";import{useEvent as L}from"./hooks/use-event.js";import P from"./components/NoData.vue.js";import D from"./components/EvaluateCountdown.vue.js";import F from"./components/EvaluatePage.vue.js";import B from"./components/AnswerParse.vue.js";import N from"./components/ScaleScore.js";import{useDialog as x,useMessage as I,NForm as q,NFormItem as M,NButton as R}from"naive-ui";import K from"../../../_virtual/plugin-vue_export-helper.js";const V={class:"c-scale-view-block"},H=["innerHTML"],U={key:0,class:"required-text"},W={key:1,class:"evalute-label"},J=["onClick"],Y=d("i",{class:"scale-view-iconfont icon-scale-view-dengpao"},null,-1),X={key:1,class:"footer"};var G=K(e({__name:"ScaleView",props:{guageData:{type:Object,default:()=>({})},styleSetting:{type:Object,default:()=>({})},ids:{type:Object,default:()=>({guage_id:"",db_id:void 0})},params:{default:()=>({}),type:Object},noBtn:{type:[Boolean,String,Number],default:!1},hideBtn:{type:[Boolean,String,Number],default:!1},isLock:{type:[Boolean,String,Number],default:!1},type:{type:String,default:""},openType:{type:String,default:""},scaleApiConfig:{type:Object,default:()=>({})},getSelectOptions:{type:Function,default:()=>Promise.resolve([])},getSearchOptions:{type:Function,default:()=>Promise.resolve([])},getCascadeOptions:{type:Function,default:()=>Promise.resolve([])},getLabelList:{type:Function,default:()=>Promise.resolve([])},deleteLabel:{type:Function,default:()=>Promise.resolve({status:!0})},saveLabelItem:{type:Function,default:()=>Promise.resolve({status:!0})},uploadPictureUrl:{type:String,default:""},uploadFileUrl:{type:String,default:""},ak:{type:String,default:"KP3BZ-OAC3W-PY6RY-OJ6DV-JYKN3-H6F72"},sourceType:{type:String,default:""},getChunkUploadConfig:{type:Function,default:()=>Promise.resolve({})}},emits:["onCloseSetting","submitNoRequest","onSubmit","startWriteScale"],setup(e,{expose:K,emit:G}){const Q=e,{ScaleViewState:Z}=w(),$=t(Z),z=x(),ee=I(),te=a(null),ae=a(null),{noDataState:oe,setNoData:ie,resetNodata:le}=h(),ne=O(),{showEvatip:se,isFormBoldOpen:re,scaleStyle:ue,handlePageClass:ce,isShowItem:pe,handleShowQuestionNumber:de,hasScore:me,isPreviewScale:ve,showEvaluateEntry:fe,showEvaluateCoundownPage:ge,showSaveBtn:ye,showEvaluateLabel:be,showAnswerParse:ke,propsConfig:Ce,evaluatePageProps:Se,evaluateCountdownProps:he,skipCover:we,scaleEdit:Ee}=E(Q,$,{query:ne}),{initForm:_e}=_(Q,$,G,{query:ne}),{submitMethod:Ae}=A(Q,$,G,{query:ne}),{nextLogicEvent:Oe,handleDynamicDataRelation:je}=L(Q,$);(()=>{let{id:e}=ne;e&&($.shareId=e)})();const Te=e=>{try{le(),_e(e)}catch(e){console.log(e,"--error"),$.spinning=!1,$.hasFrontAddress=!1,ie(!0,null==e?void 0:e.resultMsg,null==e?void 0:e.result)}};o((()=>Q.ids),((e,t)=>{t?e.guage_id&&e.guage_id!=t.guage_id&&Te(e):e.guage_id&&Te(e)}),{immediate:!0}),o((()=>Q.guageData),(e=>{if(!e||!Object.keys(e||{}).length)return;$.form={},$.formArray=[];const t=JSON.parse(JSON.stringify(e));i((()=>{_e(t)}))}),{immediate:!0});const Le=e=>{$.showEvaluateSettingWrap=!1,$.showEvaluateCountdown=!!e,G("startWriteScale")},Pe=()=>{console.log("----closeEvaluateCountdown"),$.showEvaluateCountdown=!1,ve.value||($.banSubmit=!0,Ae(),z.warning({title:"温馨提示",content:"测评时间到了,结束测评!",maskClosable:!1,positiveText:"确定",onPositiveClick:()=>({})}))},De=e=>{z.warning({title:"提示",content:()=>S("div",{class:"evatip-container"},[S("span","答案解析:"),S("p",e)]),class:"c-evatip-dialog-wrap",showIcon:!1,positiveText:"确定",negativeText:"关闭",maskClosable:!1,onPositiveClick(){},onNegativeClick(){}})},Fe=(e,t,a)=>{console.log(e,"--val");let{choiceObj:o,isSetObj:i}=a||{};switch(t.type.includes("SELECT")||($.form[t.val_key]=e),t.type){case"SELECT":case"EVALUATE_SELECT":{let{value:a,list:o=[]}=e;$.form[t.val_key]=a,Oe(e,t,$.formArray),je(o,t,$.formArray)}break;case"RADIO_BLOCK":case"CHECKBOX_BLOCK":i&&($.choiceComObj[t.val_key]=o),Oe(e,t,$.formArray);break;case"EVALUATE_RADIO_BLOCK":case"EVALUATE_CHECKBOX_BLOCK":Oe(e,t,$.formArray);break;case"DATE":case"TIME":case"DATETIME":case"SEARCH_CASCADE":$.submitForm[t.val_key]=e}},Be=(e,t)=>{console.log(t),$.form[t.val_key]=e},Ne=e=>{if(!e||!e.length)return{labelStr:"",labels:[]};const t=e||[],a=[],o=[];return t.forEach((e=>{o.push(e),a.push(e.labelName)})),$.labelSelectedList=t,{labelStr:a.join(","),labels:o}},xe=()=>{var e;if(!$.formArray.find((e=>T(e.type))))return void Ie("确认要提交吗?");let{evaluateResultSetting:t}=$.config;if(!t||!Object.keys(t).length&&!fe.value||Ee.value)return void Ie("确认要结束测评吗?");if("formIframe"==Q.openType&&fe.value)return void G("submitNoRequest");let a="确定要提前结束测评吗?";if(ge.value&&(null==(e=te.value)?void 0:e.getCountdownObj)){const e=te.value.getCountdownObj(),{setAnswered:t,totalLen:o}=e;t<o?a="存在未作答的题目,确定要提前结束测评吗?":!(null==$?void 0:$.showEvaluateCountdown)&&(a="确认要结束测评吗?")}Ie(a)},Ie=e=>{z.warning({title:"温馨提示",content:()=>S("div",{style:{paddingLeft:"30px"}},e),positiveText:"确定",negativeText:"取消",maskClosable:!1,closable:!1,positiveButtonProps:{type:"primary"},onPositiveClick:async()=>{const e=await qe();G("onSubmit",e)},onNegativeClick(){}})},qe=()=>new Promise(((e,t)=>{var a;null==(a=ae.value)||a.validate((t=>{var a;if(t){console.log(t);let o=(null==(a=t[0])?void 0:a[0])||{},i=o.field,l=o.message,n=$.formArray.find((e=>e.databaseTitle===i));return n&&(i=n.title),ee.error(i+l),e(!1),!1}{const t=Ae();e(t)}}))})),Me=()=>{G("onCloseSetting")};return K({getScaleData:()=>({...$}),onSubmitForm:qe,cancel:Me}),(e,t)=>(l(),n("div",V,[s(' <template v-if="state.spinning">\
|
|
1
|
+
import{defineComponent as e,reactive as t,ref as a,watch as o,nextTick as i,openBlock as l,createElementBlock as n,createCommentVNode as s,Fragment as r,unref as u,createBlock as c,mergeProps as p,createElementVNode as d,normalizeClass as m,normalizeStyle as v,createVNode as f,withCtx as g,renderList as y,toDisplayString as b,createTextVNode as k,resolveDynamicComponent as C,h as S}from"vue";import h from"./hooks/use-noData.js";import{getScaleViewState as w}from"./hooks/scaleview-state.js";import{ScaleViewComputed as E}from"./hooks/scaleview-computed.js";import{ScaleViewInit as _}from"./hooks/scaleview-init.js";import{ScaleViewSubmit as A}from"./hooks/scaleview-submit.js";import{handleQueryParams as O,isCollection as j,isEvaluation as T}from"./utils/judge-types.js";import{useEvent as L}from"./hooks/use-event.js";import P from"./components/NoData.vue.js";import D from"./components/EvaluateCountdown.vue.js";import F from"./components/EvaluatePage.vue.js";import B from"./components/AnswerParse.vue.js";import N from"./components/ScaleScore.js";import{useDialog as x,useMessage as I,NForm as q,NFormItem as M,NButton as R}from"naive-ui";import K from"../../../_virtual/plugin-vue_export-helper.js";const V={class:"c-scale-view-block"},H=["innerHTML"],U={key:0,class:"required-text"},W={key:1,class:"evalute-label"},J=["onClick"],Y=d("i",{class:"scale-view-iconfont icon-scale-view-dengpao"},null,-1),X={key:1,class:"footer"};var G=K(e({__name:"ScaleView",props:{guageData:{type:Object,default:()=>({})},styleSetting:{type:Object,default:()=>({})},ids:{type:Object,default:()=>({guage_id:"",db_id:void 0})},params:{default:()=>({}),type:Object},noBtn:{type:[Boolean,String,Number],default:!1},hideBtn:{type:[Boolean,String,Number],default:!1},isLock:{type:[Boolean,String,Number],default:!1},type:{type:String,default:""},openType:{type:String,default:""},scaleApiConfig:{type:Object,default:()=>({})},getSelectOptions:{type:Function,default:()=>Promise.resolve([])},getSearchOptions:{type:Function,default:()=>Promise.resolve([])},getCascadeOptions:{type:Function,default:()=>Promise.resolve([])},getLabelList:{type:Function,default:()=>Promise.resolve([])},deleteLabel:{type:Function,default:()=>Promise.resolve({status:!0})},saveLabelItem:{type:Function,default:()=>Promise.resolve({status:!0})},uploadPictureUrl:{type:String,default:""},uploadFileUrl:{type:String,default:""},ak:{type:String,default:"KP3BZ-OAC3W-PY6RY-OJ6DV-JYKN3-H6F72"},sourceType:{type:String,default:""},getChunkUploadConfig:{type:Function,default:()=>Promise.resolve({})}},emits:["onCloseSetting","submitNoRequest","onSubmit","startWriteScale"],setup(e,{expose:K,emit:G}){const Q=e,{ScaleViewState:Z}=w(),$=t(Z),z=x(),ee=I(),te=a(null),ae=a(null),{noDataState:oe,setNoData:ie,resetNodata:le}=h(),ne=O(),{showEvatip:se,isFormBoldOpen:re,scaleStyle:ue,handlePageClass:ce,isShowItem:pe,handleShowQuestionNumber:de,hasScore:me,isPreviewScale:ve,showEvaluateEntry:fe,showEvaluateCoundownPage:ge,showSaveBtn:ye,showEvaluateLabel:be,showAnswerParse:ke,propsConfig:Ce,evaluatePageProps:Se,evaluateCountdownProps:he,skipCover:we,scaleEdit:Ee}=E(Q,$,{query:ne}),{initForm:_e}=_(Q,$,G,{query:ne}),{submitMethod:Ae}=A(Q,$,G,{query:ne}),{nextLogicEvent:Oe,handleDynamicDataRelation:je}=L(Q,$);(()=>{let{id:e}=ne;e&&($.shareId=e)})();const Te=e=>{try{le(),_e(e)}catch(e){console.log(e,"--error"),$.spinning=!1,$.hasFrontAddress=!1,ie(!0,null==e?void 0:e.resultMsg,null==e?void 0:e.result)}};o((()=>Q.ids),((e,t)=>{t?e.guage_id&&e.guage_id!=t.guage_id&&Te(e):e.guage_id&&Te(e)}),{immediate:!0}),o((()=>Q.guageData),(e=>{if(!e||!Object.keys(e||{}).length)return;$.form={},$.formArray=[];const t=JSON.parse(JSON.stringify(e));i((()=>{_e(t)}))}),{immediate:!0});const Le=e=>{$.showEvaluateSettingWrap=!1,$.showEvaluateCountdown=!!e,G("startWriteScale")},Pe=()=>{console.log("----closeEvaluateCountdown"),$.showEvaluateCountdown=!1,ve.value||($.banSubmit=!0,Ae(),z.warning({title:"温馨提示",content:"测评时间到了,结束测评!",maskClosable:!1,positiveText:"确定",onPositiveClick:()=>({})}))},De=e=>{z.warning({title:"提示",content:()=>S("div",{class:"evatip-container"},[S("span","答案解析:"),S("p",e)]),class:"c-evatip-dialog-wrap",showIcon:!1,positiveText:"确定",negativeText:"关闭",maskClosable:!1,onPositiveClick(){},onNegativeClick(){}})},Fe=(e,t,a)=>{console.log(e,"--val");let{choiceObj:o,isSetObj:i}=a||{};switch(t.type.includes("SELECT")||($.form[t.val_key]=e),t.type){case"SELECT":case"EVALUATE_SELECT":{let{value:a,list:o=[]}=e;$.form[t.val_key]=a,Oe(e,t,$.formArray),je(o,t,$.formArray)}break;case"RADIO_BLOCK":case"CHECKBOX_BLOCK":i&&($.choiceComObj[t.val_key]=o),Oe(e,t,$.formArray);break;case"EVALUATE_RADIO_BLOCK":case"EVALUATE_CHECKBOX_BLOCK":Oe(e,t,$.formArray);break;case"DATE":case"TIME":case"DATETIME":case"SEARCH_CASCADE":$.submitForm[t.val_key]=e}},Be=(e,t)=>{console.log(t),$.form[t.val_key]=e},Ne=e=>{if(!e||!e.length)return{labelStr:"",labels:[]};const t=e||[],a=[],o=[];return t.forEach((e=>{o.push(e),a.push(e.labelName)})),$.labelSelectedList=t,{labelStr:a.join(","),labels:o}},xe=()=>{var e;if(!$.formArray.find((e=>T(e.type))))return void Ie("确认要提交吗?");let{evaluateResultSetting:t}=$.config;if(!t||!Object.keys(t).length&&!fe.value||Ee.value)return void Ie("确认要结束测评吗?");if("formIframe"==Q.openType&&fe.value)return void G("submitNoRequest");let a="确定要提前结束测评吗?";if(ge.value&&(null==(e=te.value)?void 0:e.getCountdownObj)){const e=te.value.getCountdownObj(),{setAnswered:t,totalLen:o}=e;t<o?a="存在未作答的题目,确定要提前结束测评吗?":!(null==$?void 0:$.showEvaluateCountdown)&&(a="确认要结束测评吗?")}Ie(a)},Ie=e=>{z.warning({title:"温馨提示",content:()=>S("div",{style:{paddingLeft:"30px"}},e),positiveText:"确定",negativeText:"取消",maskClosable:!1,closable:!1,positiveButtonProps:{type:"primary"},onPositiveClick:async()=>{const e=await qe();G("onSubmit",e)},onNegativeClick(){}})},qe=()=>new Promise(((e,t)=>{var a;null==(a=ae.value)||a.validate((t=>{var a;if(t){console.log(t);let o=(null==(a=t[0])?void 0:a[0])||{},i=o.field,l=o.message,n=$.formArray.find((e=>e.databaseTitle===i));return n&&(i=n.title),ee.error(i+l),e(!1),!1}{const t=Ae();e(t)}}))})),Me=()=>{G("onCloseSetting")};return K({getScaleData:()=>({...$}),onSubmitForm:qe,cancel:Me}),(e,t)=>(l(),n("div",V,[s(' <template v-if="state.spinning">\n <n-spin :show="state.spinning" description="加载中"></n-spin>\n </template> '),$.spinning||$.hasFrontAddress?s("v-if",!0):(l(),n(r,{key:0},[u(oe).noData?(l(),c(P,{key:0,noDataImg:u(oe).noDataImg,noDataTip:u(oe).noDataTip},null,8,["noDataImg","noDataTip"])):(l(),n(r,{key:1},[u(fe)&&!u(we)?(l(),c(F,p({key:0},u(Se),{onWriteGuage:Le}),null,16)):(l(),n(r,{key:1},[u(ge)?(l(),c(D,p({key:0,ref_key:"countdownDom",ref:te},u(he),{onCloseEvaluateCountdown:Pe}),null,16)):s("v-if",!0),d("div",{class:m(["scale-container",{"scale-container-nopadding":u(ce),"scale-container-hasfooter":u(ye)}]),style:v(u(ue))},[u(me)?(l(),c(u(N),{key:0,config:$.config,maxScore:$.maxScore},null,8,["config","maxScore"])):s("v-if",!0),f(u(q),{ref_key:"formRef",ref:ae,model:$.form,rules:$.rules,"require-mark-placement":"left",class:"main"},{default:g((()=>[(l(!0),n(r,null,y($.formArray,((e,t)=>(l(),n(r,{key:(e.id||e.seq)+t},[u(pe)(e)?(l(),c(u(M),{key:0,path:e.val_key,"show-label":!u(j)(e.type),class:"c-scle-form-item"},{label:g((()=>[d("span",{class:m({"scale-label-required":u(re)(e)}),innerHTML:u(de)(e)},null,10,H),u(re)(e)?(l(),n("span",U,"(必填)")):s("v-if",!0),u(be)(e)?(l(),n("span",W,b(u(be)(e)),1)):s("v-if",!0),u(se)(e)?(l(),n("span",{key:2,class:"evalute-tip",onClick:t=>(async e=>{var t;if($.evatipMap[e.id])return void De($.evatipMap[e.id]);let a="getSubjectAnswer";const o=(null==(t=Q.scaleApiConfig)?void 0:t[a])||null;if(!o||"function"!=typeof o)return void ee.error(`${a} Is not a function`);let i=await o(e.id);i&&($.evatipMap[e.id]||($.evatipMap[e.id]=i,De(i)))})(e)},[Y,k(" 查看提示 ")],8,J)):s("v-if",!0)])),default:g((()=>[(l(),c(C(e.renderCom),p(u(Ce)(e,t),{key:(e.id||e.seq)+t,onScaleChange:Fe,onOnChange:t=>((e,t)=>{$.form[t.val_key]=Ne(e)})(t,e),onVodFileList:Be}),null,16,["onOnChange"])),u(ke)(e)?(l(),c(B,{key:0,item:e},null,8,["item"])):s("v-if",!0)])),_:2},1032,["path","show-label"])):s("v-if",!0)],64)))),128))])),_:1},8,["model","rules"])],6),u(ye)?(l(),n("div",X,[s(" 分享的链接 隐藏取消按钮 "),"guage"!==Q.sourceType?(l(),c(u(R),{key:0,onClick:Me},{default:g((()=>[k("取消")])),_:1})):s("v-if",!0),Q.isLock?s("v-if",!0):(l(),c(u(R),{key:1,onClick:xe,disabled:$.banSubmit,type:"primary"},{default:g((()=>[k("保存")])),_:1},8,["disabled"]))])):s("v-if",!0)],64))],64))],64))]))}}),[["__file","ScaleView.vue"]]);export{G as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as t,ref as e,reactive as l,computed as a,watch as i,openBlock as n,createElementBlock as s,unref as
|
|
1
|
+
import{defineComponent as t,ref as e,reactive as l,computed as a,watch as i,openBlock as n,createElementBlock as s,unref as d,createCommentVNode as o,withDirectives as r,createElementVNode as c,normalizeClass as b,createVNode as u,withCtx as p,Fragment as f,renderList as h,createBlock as y,createTextVNode as v,toDisplayString as m,vShow as g,nextTick as C}from"vue";import{useMessage as L,NAnchor as I,NAnchorLink as S}from"naive-ui";import E from"./components/label-classify.vue.js";import{handleLabelColor as w}from"../../../shared/utils/vexutils.js";import x from"../../../_virtual/plugin-vue_export-helper.js";import A from"../../../shared/utils/vexutilsExpand.js";const O={key:0,class:"label-disable-wrap"},j=[c("p",{class:"label-disable-title"},"无可选标签",-1),c("p",{class:"label-disable-desc"},"请联系管理员进行标签管理设置",-1)],K={style:{height:"100%"}},k={class:"label-wrap"},T=["id"],_={class:"edit-label-type"};var B=x(t({__name:"LabelFormContent",props:{item:{default:()=>({})},isEdit:{type:Boolean,default:!0},isLock:{type:Boolean,default:!1},labelSelectedList:null,isChangeWindow:{type:Boolean},getLabelList:{type:Function,default:()=>Promise.resolve({rows:[]})},deleteLabel:{type:Function,default:()=>Promise.resolve({status:!0})},saveLabelItem:{type:Function,default:()=>Promise.resolve({status:!0})},labelOptions:null,sourceType:{default:""},explicit:{type:Boolean,default:!1}},emits:["explicitOnChange","change","updateLabelData"],setup(t,{expose:x,emit:B}){const D=t,F=L(),V=e(null),P=l({editLabelItem:{},inited:!1,labelSelectedEdit:[],labelAnchorKey:"",cacheAnchorKey:"",labelConfig:{}});let N=e(0);const W=a((()=>{if(!P.inited)return!1;let t=P.labelConfig;return!t||Object.keys(t).every((e=>!t[e].itemList))})),$=a((()=>{let t=[].concat(...P.labelSelectedEdit,...D.labelSelectedList);return J(t,"labelId")})),q=a((()=>{const t=$.value||[];return Array.isArray(t)?t.map((t=>t.labelId)):[]})),J=(t,e)=>{let l={};return t.reduce(((t,a)=>(!l[a[e]]&&(l[a[e]]=t.push(a)),t)),[])},R=()=>{if(P.labelSelectedEdit=$.value,"object"==typeof P.labelConfig){Object.keys(P.labelConfig||{}).forEach((t=>{var e;let l=(null==(e=P.labelConfig[t])?void 0:e.itemList)||[];l.length&&l.forEach((t=>{q.value.includes(t.labelId)&&(t.isSelect=!0)}))}))}},z=(t,e)=>{if(!t)return;let l=Object.keys(t)||[];if(!l.length)return;let a=t[l[0]].curKey;if(e&&"string"==typeof e){let[i]=e.split("~"),n=l.find((e=>t[e]&&t[e].curKey&&t[e].curKey.includes(i)));n&&(a=t[n].curKey)}a&&Y(a)},G=(t,e)=>{e.showAdd=!0;const l=t.target.nextElementSibling;C((()=>{var t;null==(t=null==l?void 0:l.firstChild)||t.focus()}))},H=(t,e)=>{setTimeout((()=>{e.addVal?Q(e):e.showAdd=!1}),150)},M=(t,e)=>{e.addVal="",e.showAdd=!1},Q=async t=>{var e;if(!!t.itemList.filter((t=>!(t.isPublic&&1==t.isPublic))).find((e=>e.labelName===t.addVal)))return F.error("标签名称重复!"),!1;let l="";l=(null==(e=t.itemList)?void 0:e.length)?t.itemList[0].parentColor||t.parentColor||"":(null==t?void 0:t.parentColor)||"";const a={type:t.typeId,name:t.addVal,parentColor:l},{status:i}=await D.saveLabelItem(a,t);i&&(F.success("添加成功!"),B("updateLabelData"),t.showAdd=!1)},U=(t,e,l,a)=>{var i;const n=l.itemList,s=l.multipleChoice;let d=(null==(i=P.labelSelectedEdit)?void 0:i.length)&&A.clone(P.labelSelectedEdit,!0)||[];if(t){if(d.some((t=>t.labelId==e.labelId)))return;if(2==s){const{typeId:t,labelId:l}=e;d=d.filter((e=>e.typeId!==t)),n.forEach((t=>{t.labelId!==l&&(t.isSelect=!1)}))}d.push(e)}else{const t=d.findIndex((t=>t.labelId==e.labelId));-1!=t&&d.splice(t,1)}P.labelSelectedEdit=[...d],N.value++,D.explicit&&B("explicitOnChange",[...P.labelSelectedEdit])},X=async t=>{const{status:e}=await D.deleteLabel(t,D.item);if(e){F.success("删除成功!");for(const e in P.labelConfig){const l=P.labelConfig[e].itemList.findIndex((e=>e.labelId==t.labelId));-1!=l&&P.labelConfig[e].itemList.splice(l,1)}const e=P.labelSelectedEdit||[],l=D.labelSelectedList||[];if(e&&e.length){const l=e.findIndex((e=>e.labelId==t.labelId));-1!=l&&e.splice(l,1)}if(l&&l.length){const e=l.findIndex((e=>e.labelId==t.labelId));-1!=e&&l.splice(e,1),B("change",[...l],D.item)}B("updateLabelData")}else F.warning("删除失败")},Y=t=>{t&&setTimeout((()=>{let e,l="#"+t;e=V.value.querySelector("a[href='"+l+"']"),e&&e.click(),P.labelAnchorKey=t}),32)},Z=t=>{t.preventDefault()},tt=t=>{if(!t)return;let e=t.slice(1);P.cacheAnchorKey=e},et=()=>{var t;return null==(t=V.value)?void 0:t.querySelector(".right-label-wrap")};return i((()=>D.labelOptions),(t=>{t&&(()=>{var t;if(D.isLock)return;const e=JSON.parse(JSON.stringify(D.labelOptions));for(let l in e){let a=(null==(t=e[l])?void 0:t.typeId)||"";Object.assign(e[l],{curKey:`${l}_${a}}`})}P.labelConfig=e,C((()=>{let t;R(),D.explicit&&P.inited&&(t=P.labelAnchorKey),z(P.labelConfig,t),P.inited=!0}))})()}),{immediate:!0,deep:!0}),x({resetShowAdd:()=>{let{labelObj:t}=P.editLabelItem;if(t&&Object.keys(t).length)for(let e in t){let l=t[e];Object.assign(l,{showAdd:!1})}},handleLabelForm:t=>{t([...P.labelSelectedEdit||[]])},handleResetOptions:()=>{},hanldeSetLabelItem:(t,e)=>{if("object"==typeof P.labelConfig){Object.keys(P.labelConfig||{}).forEach((l=>{var a;let i=(null==(a=P.labelConfig[l])?void 0:a.itemList)||[];i.length&&i.forEach((l=>{t==l.labelId&&(l.isSelect=e)}))}))}if(!1===e&&Array.isArray(P.labelSelectedEdit)){const e=P.labelSelectedEdit.findIndex((e=>e.labelId==t));-1!=e&&P.labelSelectedEdit.splice(e,1)}}}),(e,l)=>(n(),s("div",{class:"c-label-form-content",ref_key:"labelFormContent",ref:V},[d(W)?(n(),s("div",O,j)):o("v-if",!0),r(c("div",K,[c("div",k,[o(" 表单内嵌打开标签组件的样式 "),o(' <div v-if="explicit" class="explicit-continer">\n\t\t\t\t\t<n-tabs :value="state.labelAnchorKey" type="card" @change="labelAnchorTabsOnChange" tab-position="top">\n\t\t\t\t\t\t<template v-for="(v, i) in state.labelConfig">\n\t\t\t\t\t\t\t<n-tab-pane :name="v.curKey">\n\t\t\t\t\t\t\t\t<span slot="tab">\n\t\t\t\t\t\t\t\t\t{{ i }}\n\t\t\t\t\t\t\t\t\t<span class="edit-label-type">({{ v.multipleChoice == 2 ? \'单\' : \'多\' }}选)</span>\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t<div class="explicit-label-wrap left-label-wrap">\n\t\t\t\t\t\t\t\t\t<div class="edit-label-content">\n\t\t\t\t\t\t\t\t\t\t<labelClassify\n\t\t\t\t\t\t\t\t\t\t\t:classifyItem="v"\n\t\t\t\t\t\t\t\t\t\t\t:handleLabelChange="handleLabelChange"\n\t\t\t\t\t\t\t\t\t\t\t:handleLabelColor="handleLabelColor"\n\t\t\t\t\t\t\t\t\t\t\t:handleDelLabel="handleDelLabel"\n\t\t\t\t\t\t\t\t\t\t\t:hanldeBlur="hanldeBlur"\n\t\t\t\t\t\t\t\t\t\t\t:handleAddLabel="handleAddLabel"\n\t\t\t\t\t\t\t\t\t\t\t:clearaddVal="clearaddVal"\n\t\t\t\t\t\t\t\t\t\t\t:isEdit="isEdit"\n\t\t\t\t\t\t\t\t\t\t\t:sourceType="sourceType"\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</n-tab-pane>\n\t\t\t\t\t\t</template>\n\t\t\t\t\t</n-tabs>\n\t\t\t\t</div> '),o("\n\t\t\t\t\t普通标签样式\n\t\t\t\t\tv-else\n\t\t\t\t\texplicit\n\t\t\t\t "),c("div",{class:b(["left-label-wrap",{"total-left-label-wrap":t.isChangeWindow}])},[u(d(I),{"offset-target":et,type:"block",onClick:Z,onChange:tt},{default:p((()=>[(n(!0),s(f,null,h(P.labelConfig,((t,e)=>(n(),y(d(S),{href:`#${t.curKey}`,title:String(e)},null,8,["href","title"])))),256))])),_:1})],2),o(' v-if="!explicit" '),c("div",{class:b(["right-label-wrap",{"total-right-label-wrap":t.isChangeWindow}])},[(n(!0),s(f,null,h(P.labelConfig,((e,l)=>(n(),s("div",{key:l,class:"edit-label-content"},[c("div",{class:"edit-label",id:e.curKey},[v(m(l)+" ",1),c("span",_,"("+m(2==e.multipleChoice?"单":"多")+"选)",1)],8,T),u(E,{classifyItem:e,handleLabelChange:U,handleLabelColor:d(w),handleDelLabel:X,hanldeBlur:H,handleAddLabel:G,clearaddVal:M,isEdit:t.isEdit,sourceType:t.sourceType},null,8,["classifyItem","handleLabelColor","isEdit","sourceType"])])))),128))],2)])],512),[[g,!d(W)]])],512))}}),[["__file","LabelFormContent.vue"]]);export{B as default};
|
|
@@ -95,12 +95,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
95
95
|
};
|
|
96
96
|
readonly 'onUpdate:value': PropType<import("naive-ui/es/_utils").MaybeArray<(value: (string | number)[], meta: {
|
|
97
97
|
actionType: "check" | "uncheck";
|
|
98
|
-
/**
|
|
99
|
-
* 取消勾选树节点
|
|
100
|
-
* baseKeys:基准值
|
|
101
|
-
* currentTree:当前树节点
|
|
102
|
-
* value:树节点的key值
|
|
103
|
-
*/
|
|
104
98
|
value: string | number;
|
|
105
99
|
}) => void>>;
|
|
106
100
|
readonly onUpdateValue: PropType<import("naive-ui/es/_utils").MaybeArray<(value: (string | number)[], meta: {
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { IFilterCategoryLabelItemType, IhoFilterTabLabelItemType, ISearchType } from '../../../../../../../es/components/table-filter/src/types';
|
|
3
|
+
declare const _default: import("vue").DefineComponent<{
|
|
4
|
+
componentCfg: {
|
|
5
|
+
type: PropType<ISearchType>;
|
|
6
|
+
};
|
|
7
|
+
value: {
|
|
8
|
+
type: StringConstructor;
|
|
9
|
+
default: string;
|
|
10
|
+
};
|
|
11
|
+
filterApiConfig: {
|
|
12
|
+
type: ObjectConstructor;
|
|
13
|
+
};
|
|
14
|
+
}, {
|
|
15
|
+
handleGetConfigApi: (params: any, key: string, config: {} | undefined, filterApiConfigVal: any) => Promise<any>;
|
|
16
|
+
baseActiveColor: string;
|
|
17
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
18
|
+
componentCfg: {
|
|
19
|
+
type: PropType<ISearchType>;
|
|
20
|
+
};
|
|
21
|
+
value: {
|
|
22
|
+
type: StringConstructor;
|
|
23
|
+
default: string;
|
|
24
|
+
};
|
|
25
|
+
filterApiConfig: {
|
|
26
|
+
type: ObjectConstructor;
|
|
27
|
+
};
|
|
28
|
+
}>> & {
|
|
29
|
+
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
30
|
+
}>>;
|
|
31
|
+
emit: (event: "update:value", ...args: any[]) => void;
|
|
32
|
+
selectedList: import("vue").Ref<string[]>;
|
|
33
|
+
tagList: import("vue").Ref<never[]>;
|
|
34
|
+
categoryList: import("vue").ComputedRef<IFilterCategoryLabelItemType[]>;
|
|
35
|
+
onResize: (el: HTMLElement, categoryItem: IFilterCategoryLabelItemType) => void;
|
|
36
|
+
handleLabelUpfold: (categoryItem: IFilterCategoryLabelItemType) => void;
|
|
37
|
+
formatStyle: (item: IhoFilterTabLabelItemType) => {
|
|
38
|
+
background: string;
|
|
39
|
+
borderColor: string;
|
|
40
|
+
} | {
|
|
41
|
+
background?: undefined;
|
|
42
|
+
borderColor?: undefined;
|
|
43
|
+
};
|
|
44
|
+
handleLabelChange: (isSelect: boolean, item: IhoFilterTabLabelItemType) => void;
|
|
45
|
+
initTagList: () => Promise<void>;
|
|
46
|
+
NTag: any;
|
|
47
|
+
NTooltip: any;
|
|
48
|
+
NIcon: any;
|
|
49
|
+
ChevronUpCircleOutline: 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<{}>>, {}>;
|
|
50
|
+
ChevronDownCircleOutline: 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<{}>>, {}>;
|
|
51
|
+
vResize: {
|
|
52
|
+
mounted(el: any, binding: any): void;
|
|
53
|
+
};
|
|
54
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
55
|
+
componentCfg: {
|
|
56
|
+
type: PropType<ISearchType>;
|
|
57
|
+
};
|
|
58
|
+
value: {
|
|
59
|
+
type: StringConstructor;
|
|
60
|
+
default: string;
|
|
61
|
+
};
|
|
62
|
+
filterApiConfig: {
|
|
63
|
+
type: ObjectConstructor;
|
|
64
|
+
};
|
|
65
|
+
}>> & {
|
|
66
|
+
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
67
|
+
}, {
|
|
68
|
+
value: string;
|
|
69
|
+
}>;
|
|
70
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defineComponent as e,ref as l,watch as t,computed as o,openBlock as s,createElementBlock as a,Fragment as i,renderList as n,unref as c,createElementVNode as r,toDisplayString as p,normalizeClass as u,withDirectives as d,createBlock as f,normalizeStyle as m,withCtx as b,createVNode as v,withModifiers as h,createCommentVNode as g}from"vue";import{NTag as y,NTooltip as k,NIcon as S}from"naive-ui";import{ChevronUpCircleOutline as C,ChevronDownCircleOutline as w}from"@vicons/ionicons5";import x from"../../../directive/resize.js";import _ from"../../../hooks/useMixins.js";import{isString as L}from"lodash-es";import U from"../../../../../../_virtual/plugin-vue_export-helper.js";const j={class:"label-attr-filter-container"},B={class:"edit-f-label"},T={class:"label-f-content"},z={key:0,class:"label-f-unfold-btn"},A=["onClick"],I=r("span",null,"收起",-1),O=r("span",null,"展开",-1);var q=U(e({__name:"Label",props:{componentCfg:{type:Object},value:{type:String,default:""},filterApiConfig:{type:Object}},emits:["update:value"],setup(e,{emit:U}){const q=e,{handleGetConfigApi:G}=_(),H="rgb(85, 133, 245)",M=l([]),N=l([]);t((()=>q.value),(e=>{const l=e&&L(e)?e.split("|#|"):[];M.value=l}),{immediate:!0});const D=o((()=>N.value&&N.value.length>0?N.value.map((e=>(e.labelList.map((e=>{e.isSelect=M.value.includes(e.labelShowText)})),e))):[])),E=e=>e.isSelect?{background:e.backgroundColor||H,borderColor:e.backgroundColor||H}:{};return(async()=>{try{const{widgetCfg:e={}}=q.componentCfg,{classifyStr:l=""}=e;let t=await G({classifyStr:l},"requestListByClassify",{},q.filterApiConfig);if(t){const{data:e}=t,{list:l=[]}=e;N.value=l}}catch(e){console.log(e)}})(),(e,l)=>(s(),a("div",j,[(s(!0),a(i,null,n(c(D),(e=>(s(),a("div",{class:"edit-labels-content",key:e.classifyId},[r("span",B,p(e.classifyName)+":",1),r("div",{class:u(["edit-f-content",{"label-select-height":!e.isUnfold&&e.labelList&&e.isShowBtn}])},[d((s(),a("div",T,[(s(!0),a(i,null,n(e.labelList,(e=>(s(),f(c(y),{checkable:"",key:e.labelCode,checked:e.isSelect,"onUpdate:checked":l=>((e,l)=>{if(l.isSelect=e,e)M.value.push(l.labelShowText);else{const e=M.value.findIndex((e=>e===l.labelShowText));e>-1&&M.value.splice(e,1)}U("update:value",M.value.join("|#|"))})(l,e),style:m(E(e))},{default:b((()=>[v(c(k),{placement:"top-start",duration:0},{trigger:b((()=>[r("span",null,p(e.labelShowText),1)])),default:b((()=>[r("span",null,p(e.labelShowText),1)])),_:2},1024)])),_:2},1032,["checked","onUpdate:checked","style"])))),128))])),[[c(x),l=>((e,l)=>{let t=e.offsetHeight||0;t&&(t>80?l.isShowBtn=!0:(l.isShowBtn=!1,l.isUnfold=!1))})(l,e)]])],2),e.labelList&&e.isShowBtn?(s(),a("div",z,[r("span",{class:"operate-btn",onClick:h((l=>(e=>{e.isUnfold=!e.isUnfold})(e)),["stop"])},[e.isUnfold?(s(),a(i,{key:0},[I,v(c(S),{component:c(C),size:"16"},null,8,["component"])],64)):(s(),a(i,{key:1},[O,v(c(S),{component:c(w),size:"16"},null,8,["component"])],64))],8,A)])):g("v-if",!0)])))),128))]))}}),[["__file","Label.vue"]]);export{q as default};
|
package/es/components/table-filter/src/components/render-widget/components/SelectLabel.vue.d.ts
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { SelectOption } from 'naive-ui';
|
|
3
|
+
import { ISearchType } from '../../../../../../../es/components/table-filter/src/types';
|
|
4
|
+
declare const _default: import("vue").DefineComponent<{
|
|
5
|
+
componentCfg: {
|
|
6
|
+
type: PropType<ISearchType>;
|
|
7
|
+
};
|
|
8
|
+
value: {
|
|
9
|
+
type: StringConstructor;
|
|
10
|
+
default: string;
|
|
11
|
+
};
|
|
12
|
+
filterApiConfig: {
|
|
13
|
+
type: ObjectConstructor;
|
|
14
|
+
};
|
|
15
|
+
}, {
|
|
16
|
+
handleGetConfigApi: (params: any, key: string, config: {} | undefined, filterApiConfigVal: any) => Promise<any>;
|
|
17
|
+
$attrs: {
|
|
18
|
+
[x: string]: unknown;
|
|
19
|
+
};
|
|
20
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
21
|
+
componentCfg: {
|
|
22
|
+
type: PropType<ISearchType>;
|
|
23
|
+
};
|
|
24
|
+
value: {
|
|
25
|
+
type: StringConstructor;
|
|
26
|
+
default: string;
|
|
27
|
+
};
|
|
28
|
+
filterApiConfig: {
|
|
29
|
+
type: ObjectConstructor;
|
|
30
|
+
};
|
|
31
|
+
}>> & {
|
|
32
|
+
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
33
|
+
}>>;
|
|
34
|
+
emit: (event: "update:value", ...args: any[]) => void;
|
|
35
|
+
tagList: import("vue").Ref<never[]>;
|
|
36
|
+
valueCp: import("vue").WritableComputedRef<string[]>;
|
|
37
|
+
optionList: import("vue").ComputedRef<SelectOption[]>;
|
|
38
|
+
initTagList: () => Promise<void>;
|
|
39
|
+
NSelect: any;
|
|
40
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
41
|
+
componentCfg: {
|
|
42
|
+
type: PropType<ISearchType>;
|
|
43
|
+
};
|
|
44
|
+
value: {
|
|
45
|
+
type: StringConstructor;
|
|
46
|
+
default: string;
|
|
47
|
+
};
|
|
48
|
+
filterApiConfig: {
|
|
49
|
+
type: ObjectConstructor;
|
|
50
|
+
};
|
|
51
|
+
}>> & {
|
|
52
|
+
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
53
|
+
}, {
|
|
54
|
+
value: string;
|
|
55
|
+
}>;
|
|
56
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defineComponent as e,useAttrs as t,ref as l,computed as a,openBlock as o,createBlock as i,unref as u,mergeProps as s,isRef as n}from"vue";import{NSelect as r}from"naive-ui";import p from"../../../hooks/useMixins.js";import f from"../../../../../../_virtual/plugin-vue_export-helper.js";var v=f(e({__name:"SelectLabel",props:{componentCfg:{type:Object},value:{type:String,default:""},filterApiConfig:{type:Object}},emits:["update:value"],setup(e,{emit:f}){const v=e,{handleGetConfigApi:c}=p(),h=t(),m=l([]),g=a({set(e){const t=e?e.join("|#|"):e;f("update:value",t)},get:()=>v.value?v.value.split("|#|"):[]}),b=a((()=>{if(m.value&&m.value.length>0){let e=[],t=[];return m.value.forEach((l=>{l.labelList.forEach((l=>{e.includes(l.labelShowText)||(e.push(l.labelShowText),t.push({label:l.labelShowText,value:l.labelShowText}))}))})),t}return[]}));return(async()=>{try{const{widgetCfg:e={}}=v.componentCfg,{classifyStr:t=""}=e;let l=await c({classifyStr:t},"requestListByClassify",{},v.filterApiConfig);if(l){const{data:e}=l,{list:t=[]}=e;m.value=t}}catch(e){console.log(e)}})(),(e,t)=>(o(),i(u(r),s(u(h),{value:u(g),"onUpdate:value":t[0]||(t[0]=e=>n(g)?g.value=e:null),options:u(b)}),null,16,["value","options"]))}}),[["__file","SelectLabel.vue"]]);export{v as default};
|
|
@@ -3,4 +3,6 @@ import InputNumberGroup from './InputNumberGroup.vue';
|
|
|
3
3
|
import Date from './Date.vue';
|
|
4
4
|
import DateRangeInner from './DateRangeInner.vue';
|
|
5
5
|
import DateRangeOut from './DateRangeOut.vue';
|
|
6
|
-
|
|
6
|
+
import Label from './Label.vue';
|
|
7
|
+
import SelectLabel from './SelectLabel.vue';
|
|
8
|
+
export { CheckboxGroup, InputNumberGroup, Date, DateRangeInner, DateRangeOut, Label, SelectLabel };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{default as CheckboxGroup}from"./CheckboxGroup.vue.js";export{default as InputNumberGroup}from"./InputNumberGroup.vue.js";export{default as Date}from"./Date.vue.js";export{default as DateRangeInner}from"./DateRangeInner.vue.js";export{default as DateRangeOut}from"./DateRangeOut.vue.js";
|
|
1
|
+
export{default as CheckboxGroup}from"./CheckboxGroup.vue.js";export{default as InputNumberGroup}from"./InputNumberGroup.vue.js";export{default as Date}from"./Date.vue.js";export{default as DateRangeInner}from"./DateRangeInner.vue.js";export{default as DateRangeOut}from"./DateRangeOut.vue.js";export{default as Label}from"./Label.vue.js";export{default as SelectLabel}from"./SelectLabel.vue.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,h as t}from"vue";import{WidgetTypeEnums as i}from"../../types/enums.js";import{WidgetCfgMaps as n}from"./widgetCfgMaps.js";import r from"../../../../../_virtual/plugin-vue_export-helper.js";const a=[i.DATE,i.DATE_TIME,i.CHECKBOX_GROUP];var l=r(e({props:{cfg:{type:Object,required:!0},modelValue:{type:[Array,String,Number]},filterApiConfig:{type:Object}},emits:["update:modelValue","outFilterChange","changeInit"],computed:{valueCp(){return this.cfg.value}},data:()=>({initialProps:{}}),methods:{search(){this.$emit("outFilterChange")},getEleWidth(e){const{widgetType:t,widgetCfg:n,filterExplicit:r}=e;if(a.includes(t))return;const l=i.SELECT
|
|
1
|
+
import{defineComponent as e,h as t}from"vue";import{WidgetTypeEnums as i}from"../../types/enums.js";import{WidgetCfgMaps as n}from"./widgetCfgMaps.js";import r from"../../../../../_virtual/plugin-vue_export-helper.js";const a=[i.DATE,i.DATE_TIME,i.CHECKBOX_GROUP];var l=r(e({props:{cfg:{type:Object,required:!0},modelValue:{type:[Array,String,Number]},filterApiConfig:{type:Object}},emits:["update:modelValue","outFilterChange","changeInit"],computed:{valueCp(){return this.cfg.value}},data:()=>({initialProps:{}}),methods:{search(){this.$emit("outFilterChange")},getEleWidth(e){const{widgetType:t,widgetCfg:n,filterExplicit:r}=e;if(a.includes(t))return;const l=i.SELECT!==t&&i.SELECTLABEL!==t||!n.multiple?"100%":"200px";return{width:0===r?"100%":e.advanceColWidth?`${e.advanceColWidth}px`:l}},initComponentProps(e){const{_frontId:t,widgetType:i,alias:r,title:a,placeholder:l,widgetCfg:o,filterExplicit:s}=e,{props:p,handlerProps:h}=n.get(i);let d={...p};h&&(d=h(d,{...o,title:r||a,_frontId:t,filterExplicit:s})),l&&(d.placeholder=l),this.initialProps=d,d.value&&(this.valueCp=d.value)},generateWidget(e){const{widgetType:i}=e;if(!n.has(i))return null;const{value:r}=e,{component:a,style:l,eventsBySearch:o=[]}=n.get(i),s={...this.initialProps,value:r,componentCfg:e,filterApiConfig:this.filterApiConfig},p=o.reduce(((e,t)=>{const{name:i,handler:n}=t;let r=this.search;return n&&(r=e=>{n(e,this.search,s)}),{...e,[`on${i}`]:r}}),{});return t(a,{...l,...s,style:this.getEleWidth(e),value:this.valueCp,"onUpdate:value":e=>this.handleUpdate(e),onChangeInitState:(...e)=>this.handleChangeInitState(...e),...p})},handleUpdate(e){this.$emit("update:modelValue",e)},handleChangeInitState(e,t){this.$emit("changeInit",e,t)}},created(){this.initComponentProps(this.cfg)},render(){return this.generateWidget(this.cfg)}}),[["__file","index.vue"]]);export{l as default};
|
|
@@ -637,4 +637,149 @@ export declare const WidgetCfgMaps: Map<string, {
|
|
|
637
637
|
handlerProps(props: any, { valueList, multiple }?: any): any;
|
|
638
638
|
setDefaultValue: (defaultValue: any) => any;
|
|
639
639
|
eventsBySearch?: undefined;
|
|
640
|
+
} | {
|
|
641
|
+
component: import("vue").DefineComponent<{
|
|
642
|
+
componentCfg: {
|
|
643
|
+
type: import("vue").PropType<import("../../../../../../es/components/table-filter/src/types").ISearchType>;
|
|
644
|
+
};
|
|
645
|
+
value: {
|
|
646
|
+
type: StringConstructor;
|
|
647
|
+
default: string;
|
|
648
|
+
};
|
|
649
|
+
filterApiConfig: {
|
|
650
|
+
type: ObjectConstructor;
|
|
651
|
+
};
|
|
652
|
+
}, {
|
|
653
|
+
handleGetConfigApi: (params: any, key: string, config: {} | undefined, filterApiConfigVal: any) => Promise<any>;
|
|
654
|
+
baseActiveColor: string;
|
|
655
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
656
|
+
componentCfg: {
|
|
657
|
+
type: import("vue").PropType<import("../../../../../../es/components/table-filter/src/types").ISearchType>;
|
|
658
|
+
};
|
|
659
|
+
value: {
|
|
660
|
+
type: StringConstructor;
|
|
661
|
+
default: string;
|
|
662
|
+
};
|
|
663
|
+
filterApiConfig: {
|
|
664
|
+
type: ObjectConstructor;
|
|
665
|
+
};
|
|
666
|
+
}>> & {
|
|
667
|
+
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
668
|
+
}>>;
|
|
669
|
+
emit: (event: "update:value", ...args: any[]) => void;
|
|
670
|
+
selectedList: import("vue").Ref<string[]>;
|
|
671
|
+
tagList: import("vue").Ref<never[]>;
|
|
672
|
+
categoryList: import("vue").ComputedRef<import("../../../../../../es/components/table-filter/src/types").IFilterCategoryLabelItemType[]>;
|
|
673
|
+
onResize: (el: HTMLElement, categoryItem: import("../../../../../../es/components/table-filter/src/types").IFilterCategoryLabelItemType) => void;
|
|
674
|
+
handleLabelUpfold: (categoryItem: import("../../../../../../es/components/table-filter/src/types").IFilterCategoryLabelItemType) => void;
|
|
675
|
+
formatStyle: (item: import("../../../../../../es/components/table-filter/src/types").IhoFilterTabLabelItemType) => {
|
|
676
|
+
background: string;
|
|
677
|
+
borderColor: string;
|
|
678
|
+
} | {
|
|
679
|
+
background?: undefined;
|
|
680
|
+
borderColor?: undefined;
|
|
681
|
+
};
|
|
682
|
+
handleLabelChange: (isSelect: boolean, item: import("../../../../../../es/components/table-filter/src/types").IhoFilterTabLabelItemType) => void;
|
|
683
|
+
initTagList: () => Promise<void>;
|
|
684
|
+
NTag: any;
|
|
685
|
+
NTooltip: any;
|
|
686
|
+
NIcon: any;
|
|
687
|
+
ChevronUpCircleOutline: 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<{}>>, {}>;
|
|
688
|
+
ChevronDownCircleOutline: 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<{}>>, {}>;
|
|
689
|
+
vResize: {
|
|
690
|
+
mounted(el: any, binding: any): void;
|
|
691
|
+
};
|
|
692
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
693
|
+
componentCfg: {
|
|
694
|
+
type: import("vue").PropType<import("../../../../../../es/components/table-filter/src/types").ISearchType>;
|
|
695
|
+
};
|
|
696
|
+
value: {
|
|
697
|
+
type: StringConstructor;
|
|
698
|
+
default: string;
|
|
699
|
+
};
|
|
700
|
+
filterApiConfig: {
|
|
701
|
+
type: ObjectConstructor;
|
|
702
|
+
};
|
|
703
|
+
}>> & {
|
|
704
|
+
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
705
|
+
}, {
|
|
706
|
+
value: string;
|
|
707
|
+
}>;
|
|
708
|
+
props: {
|
|
709
|
+
clearable?: undefined;
|
|
710
|
+
filterable?: undefined;
|
|
711
|
+
multiple?: undefined;
|
|
712
|
+
maxTagCount?: undefined;
|
|
713
|
+
type?: undefined;
|
|
714
|
+
valueFormat?: undefined;
|
|
715
|
+
};
|
|
716
|
+
handlerProps(props: any): any;
|
|
717
|
+
setDefaultValue(defaultValue: any): any;
|
|
718
|
+
eventsBySearch?: undefined;
|
|
719
|
+
style?: undefined;
|
|
720
|
+
} | {
|
|
721
|
+
component: import("vue").DefineComponent<{
|
|
722
|
+
componentCfg: {
|
|
723
|
+
type: import("vue").PropType<import("../../../../../../es/components/table-filter/src/types").ISearchType>;
|
|
724
|
+
};
|
|
725
|
+
value: {
|
|
726
|
+
type: StringConstructor;
|
|
727
|
+
default: string;
|
|
728
|
+
};
|
|
729
|
+
filterApiConfig: {
|
|
730
|
+
type: ObjectConstructor;
|
|
731
|
+
};
|
|
732
|
+
}, {
|
|
733
|
+
handleGetConfigApi: (params: any, key: string, config: {} | undefined, filterApiConfigVal: any) => Promise<any>;
|
|
734
|
+
$attrs: {
|
|
735
|
+
[x: string]: unknown;
|
|
736
|
+
};
|
|
737
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
738
|
+
componentCfg: {
|
|
739
|
+
type: import("vue").PropType<import("../../../../../../es/components/table-filter/src/types").ISearchType>;
|
|
740
|
+
};
|
|
741
|
+
value: {
|
|
742
|
+
type: StringConstructor;
|
|
743
|
+
default: string;
|
|
744
|
+
};
|
|
745
|
+
filterApiConfig: {
|
|
746
|
+
type: ObjectConstructor;
|
|
747
|
+
};
|
|
748
|
+
}>> & {
|
|
749
|
+
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
750
|
+
}>>;
|
|
751
|
+
emit: (event: "update:value", ...args: any[]) => void;
|
|
752
|
+
tagList: import("vue").Ref<never[]>;
|
|
753
|
+
valueCp: import("vue").WritableComputedRef<string[]>;
|
|
754
|
+
optionList: import("vue").ComputedRef<import("naive-ui").SelectOption[]>;
|
|
755
|
+
initTagList: () => Promise<void>;
|
|
756
|
+
NSelect: any;
|
|
757
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
758
|
+
componentCfg: {
|
|
759
|
+
type: import("vue").PropType<import("../../../../../../es/components/table-filter/src/types").ISearchType>;
|
|
760
|
+
};
|
|
761
|
+
value: {
|
|
762
|
+
type: StringConstructor;
|
|
763
|
+
default: string;
|
|
764
|
+
};
|
|
765
|
+
filterApiConfig: {
|
|
766
|
+
type: ObjectConstructor;
|
|
767
|
+
};
|
|
768
|
+
}>> & {
|
|
769
|
+
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
770
|
+
}, {
|
|
771
|
+
value: string;
|
|
772
|
+
}>;
|
|
773
|
+
props: {
|
|
774
|
+
clearable: boolean;
|
|
775
|
+
filterable: boolean;
|
|
776
|
+
multiple: boolean;
|
|
777
|
+
maxTagCount: string;
|
|
778
|
+
type?: undefined;
|
|
779
|
+
valueFormat?: undefined;
|
|
780
|
+
};
|
|
781
|
+
handlerProps(props: any, data?: any): any;
|
|
782
|
+
setDefaultValue(defaultValue: any): any;
|
|
783
|
+
eventsBySearch?: undefined;
|
|
784
|
+
style?: undefined;
|
|
640
785
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{WidgetTypeEnums as e}from"../../types/enums.js";import{DatePresetValEnums as t,DateRangeOutDefEnums as l}from"./enums.js";import{NInputNumber as r,NInput as a}from"naive-ui";import o from"./components/CheckboxGroup.vue.js";import n from"./components/InputNumberGroup.vue.js";import p from"./components/Date.vue.js";import s from"./components/DateRangeInner.vue.js";import i from"./components/DateRangeOut.vue.js";import m from"./components/Select.vue.js";import{presetValToTimestamp as
|
|
1
|
+
import{WidgetTypeEnums as e}from"../../types/enums.js";import{DatePresetValEnums as t,DateRangeOutDefEnums as l}from"./enums.js";import{NInputNumber as r,NInput as a}from"naive-ui";import o from"./components/CheckboxGroup.vue.js";import n from"./components/InputNumberGroup.vue.js";import p from"./components/Date.vue.js";import s from"./components/DateRangeInner.vue.js";import i from"./components/DateRangeOut.vue.js";import m from"./components/Label.vue.js";import u from"./components/SelectLabel.vue.js";import c from"./components/Select.vue.js";import{presetValToTimestamp as d,presetValToDateRangestr as y}from"./helpers/presetValToTimestamp.js";const f=e=>null==e?null:e,h=new Map([[e.INPUT_NUMBER,{component:r,props:{clearable:!0},eventsBySearch:[{name:"keydown",handler(e,t){"Enter"===e.key&&t()}}],handlerProps:(e,{title:t}={})=>({...e,placeholder:`输入${t}`}),setDefaultValue:f}],[e.INPUTNUMBER_RANGE,{component:n,props:{clearable:!0},eventsBySearch:[{name:"keydown",handler(e,t){"Enter"===e.key&&t()}}],handlerProps:(e,{title:t,filterExplicit:l}={})=>({...e,startPlaceholder:1===l?`起始${t}`:"最小值",endPlaceholder:1===l?`截止${t}`:"最大值"}),setDefaultValue:f}],[e.INPUT,{component:a,props:{clearable:!0},eventsBySearch:[{name:"keydown",handler(e,t){"Enter"===e.key&&t()}}],handlerProps:(e,{title:t}={})=>({...e,placeholder:`搜索${t}`}),setDefaultValue:f}],[e.SELECT,{component:c,props:{clearable:!0,filterable:!0,multiple:!1,maxTagCount:"responsive"},eventsBySearch:[{name:"change",handler(e,t,l){const{multiple:r}=l;r&&t()}}],handlerProps(e,t={}){const{valueList:l,multiple:r,title:a,manualMapping:o,dynamicOptionInfo:n,defaultValue:p,defValueUnit:s,_frontId:i,isInit:m}=t,u={...e,placeholder:`请选择${a}`,manualMapping:o,dynamicOptionInfo:n,valueList:l,defValue:p,defValueUnit:s,_frontId:i,isInit:m};return r&&(u.multiple=!0),u},setDefaultValue:f}],[e.DATE,{component:p,props:{type:"date",clearable:!0,valueFormat:"yyyy-MM-dd"},handlerProps(e,t={}){const{title:l}=t;return{...e,placeholder:`请选择${l}`}},setDefaultValue:(e,l)=>l&&l!==t.CUSTOM?d(l,"YYYY-MM-DD"):e}],[e.DATE_RANGE_INNER,{component:s,props:{type:"date",clearable:!0,valueFormat:"yyyy-MM-dd"},handlerProps(e,t={}){const{title:l,filterExplicit:r}=t;return{...e,filterExplicit:r,startPlaceholder:`起始${l}`,endPlaceholder:`截止${l}`}},setDefaultValue:f}],[e.DATE_RANGE_OUT,{component:i,props:{type:"daterange",clearable:!0,valueFormat:"yyyy-MM-dd"},handlerProps(e,t={}){const{title:l,filterExplicit:r}=t;return{...e,filterExplicit:r,startPlaceholder:`起始${l}`,endPlaceholder:`截止${l}`}},setDefaultValue:(e,t)=>t&&t!==l.CUSTOM?y(t,"YYYY-MM-DD"):e}],[e.DATE_TIME,{component:p,props:{type:"datetime",clearable:!0,valueFormat:"yyyy-MM-dd HH:mm:ss"},handlerProps(e,t={}){const{title:l}=t;return{...e,placeholder:`请选择${l}`}},setDefaultValue:(e,l)=>l&&l!==t.CUSTOM?d(l,"YYYY-MM-DD HH:mm:ss"):e}],[e.DATETIME_RANGE_INNER,{component:s,props:{type:"datetime",clearable:!0,valueFormat:"yyyy-MM-dd HH:mm:ss"},handlerProps(e,t={}){const{title:l,filterExplicit:r}=t;return{...e,filterExplicit:r,startPlaceholder:`起始${l}`,endPlaceholder:`截止${l}`}},setDefaultValue:f}],[e.DATETIME_RANGE_OUT,{component:i,props:{type:"datetimerange",clearable:!0,valueFormat:"yyyy-MM-dd HH:mm:ss"},handlerProps(e,t={}){const{title:l,filterExplicit:r}=t;return{...e,filterExplicit:r,startPlaceholder:`起始${l}`,endPlaceholder:`截止${l}`}},setDefaultValue:(e,l)=>l&&l!==t.CUSTOM?y(l,"YYYY-MM-DD HH:mm:ss"):e}],[e.CHECKBOX_GROUP,{component:o,props:{},style:{"line-height":"32px"},handlerProps(e,{valueList:t,multiple:l}={}){const r={...e,multiple:l};return Array.isArray(t)&&(r.options=t.map((({value:e,label:t})=>({value:e,label:t})))),r},setDefaultValue:f}],[e.LABEL,{component:m,props:{},handlerProps:e=>({...e}),setDefaultValue:e=>e&&Array.isArray(e)?e.join("|#|"):e}],[e.SELECTLABEL,{component:u,props:{clearable:!0,filterable:!0,multiple:!1,maxTagCount:"responsive"},handlerProps(e,t={}){const{multiple:l,title:r}=t,a={...e,placeholder:`请选择${r}`};return l&&(a.multiple=!0),a},setDefaultValue:e=>e&&Array.isArray(e)?e.join("|#|"):e}]]);export{h as WidgetCfgMaps};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import o from"../tool/resizeSensor.js";import{useDebounceFn as e}from"@vueuse/core";const r={mounted(r,t){const s=t.value,m=e(s,10);new o(r,m)}};export{r as default};
|
|
@@ -18,6 +18,7 @@ export default function useAdvanced(): {
|
|
|
18
18
|
multiple: boolean;
|
|
19
19
|
manualMapping: boolean | null | undefined;
|
|
20
20
|
dynamicOptionInfo: import("../../../../../es/components/table-filter/src/types").dynamicOptionInfoType | {} | undefined;
|
|
21
|
+
classifyStr: string | undefined;
|
|
21
22
|
};
|
|
22
23
|
rangeFilter: boolean | undefined;
|
|
23
24
|
title: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{WidgetOptionEnums as e,WidgetTypeEnums as t}from"../types/enums.js";import{presetValToTimestamp as i}from"../components/render-widget/helpers/presetValToTimestamp.js";import{DatePresetValEnums as n}from"../components/render-widget/enums.js";const l={[e.RADIO]:"0",[e.MULTIPLE]:"1",[e.ALL]:"0",[e.SELECT_TIME]:"1",[e.PAST_TIME]:"2",[e.FUTURE_TIME]:"3"};function a(){return{transformData:function(i){return i.map((i=>{var n,a;const{optionInfo:o={list:[],manualMapping:!0,dynamicOptionInfo:{}},type:u,defaultValue:r,optionType:s,filterExplicit:
|
|
1
|
+
import{WidgetOptionEnums as e,WidgetTypeEnums as t}from"../types/enums.js";import{presetValToTimestamp as i}from"../components/render-widget/helpers/presetValToTimestamp.js";import{DatePresetValEnums as n}from"../components/render-widget/enums.js";const l={[e.RADIO]:"0",[e.MULTIPLE]:"1",[e.ALL]:"0",[e.SELECT_TIME]:"1",[e.PAST_TIME]:"2",[e.FUTURE_TIME]:"3"};function a(){return{transformData:function(i){return i.map((i=>{var n,a;const{optionInfo:o={list:[],manualMapping:!0,dynamicOptionInfo:{}},type:u,defaultValue:r,optionType:s,filterExplicit:E,rangeFilter:p}=i,d={},T={title:(c=i).title,alias:c.customTitle,isShowSearch:c.isShowSearch?1:0,filterExplicit:c.filterExplicit?1:0,explicitRequired:c.explicitRequired?1:0,advanceOptionSetting:c.optionType?l[c.optionType]:"",placeholder:c.remark,advanceColWidth:c.width};var c;let f,m,v=u;E?(f=u===t.SELECT&&s===e.MULTIPLE?null==r?void 0:r.valueList:null==(n=null==r?void 0:r.valueList)?void 0:n[0],m=null==r?void 0:r.unit,u===t.LABEL&&(v="SELECTLABEL",f=null==r?void 0:r.valueList)):u===t.SELECT&&(null==o?void 0:o.list)&&(null==o?void 0:o.list.length)<10&&(v="CHECKBOX_GROUP"),p&&(u===t.INPUT_NUMBER&&(v="INPUTNUMBER_RANGE"),u===t.DATE&&(v=E?"DATE_RANGE_OUT":"DATE_RANGE_INNER"),u===t.DATE_TIME&&(v=E?"DATETIME_RANGE_OUT":"DATETIME_RANGE_INNER"));const g={isRender:!0,isInit:!1,widgetType:v,valueList:null==(a=null==o?void 0:o.list)?void 0:a.map((({name:e,value:t})=>({value:t,label:e}))),defaultValue:f,defValueUnit:m,multiple:s===e.MULTIPLE||v===t.SELECTLABEL,manualMapping:null==o?void 0:o.manualMapping,dynamicOptionInfo:null==o?void 0:o.dynamicOptionInfo,classifyStr:null==r?void 0:r.classifyStr};return{...T,fieldType:i.dataType,columnName:i.name,settingObj:d,setting:JSON.stringify(d),widgetCfg:g,rangeFilter:p}}))},getCacheDef:function(e,i){const{widgetType:n,widgetCfg:l}=e;return n!==t.SELECT&&n!==t.CHECKBOX_GROUP||!l.multiple?i[0]:i},transformClassifyChild:function(e){const t={};return e&&e.length>0&&e.forEach((e=>{const l=e.field_key,a=e.value&&e.value.length>1?e.value:e.value.toString();if(t[l]=a,e.unit&&e.unit!==n.CUSTOM){const n=i(e.unit,"YYYY-MM-DD HH:mm:ss");t[l]=n}})),t},transformParams:function(e){const i={},n=[t.SELECT];return e&&e.length>0&&e.forEach((e=>{const t=e.field_key,l=n.includes(e.widgetType)||e.value&&e.value.length>1?e.value:e.value.toString();i[t]=l})),i}}}export{a as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{WidgetCfgMaps as e}from"../components/render-widget/widgetCfgMaps.js";import{DatePresetValEnums as n,DateRangeOutDefEnums as t}from"../components/render-widget/enums.js";import{WidgetTypeEnums as r}from"../types/enums.js";const i=[r.CHECKBOX_GROUP,r.DATE_RANGE_INNER,r.DATETIME_RANGE_INNER];function u(){function u(e){var n;return null==(n=e.widgetCfg)?void 0:n.isRender}function o(n){const{widgetType:t,defaultValue:r,defValueUnit:i}=n.widgetCfg||{},u=e.get(t);let o;if(u){const{setDefaultValue:e}=u;e&&(o=e(r,i))}return o}return{isRender:u,getDefValByRenderWidget:o,initRenderWidgetCfg:function(e){const n=u(e);if(!n)return n;const{widgetType:t}=e.widgetCfg||{};return e._frontId||(e._frontId="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{const n=16*Math.random()|0;return("x"===e?n:3&n|8).toString(16)}))),e.isRender=n,e.widgetType=t,e.con="EQ",i.includes(t)&&(e._isBlock=!0),e.value=o(e),n},getRenderSearchConObj:function(e){if(!u(e))return null;const{columnName:i,con:o,value:d,widgetType:l}=e;let s=null;const f=[r.DATE,r.DATE_TIME],x=[r.DATE_RANGE_OUT,r.DATE_RANGE_INNER,r.DATETIME_RANGE_OUT,r.DATETIME_RANGE_INNER];f.includes(l)&&(s=n.CUSTOM),x.includes(l)&&(s=t.CUSTOM);const a=Array.isArray(d)?d:d?[d]:[];return{widgetType:l,field_key:i,con:o,value:a.length>0?a:null,unit:s}},getDefValByRenderConObj:function(e,n){if(!u(n))return null;const{widgetType:t,multiple:i}=n.widgetCfg||{},{value:o}=e;return t!==r.SELECT&&t!==r.CHECKBOX_GROUP||!i?Array.isArray(o)?o[0]:o:Array.isArray(o)?o:o?[o]:[]},isExistDefValByRenderWidget:function(e){const{defaultValue:n,defValueUnit:t}=e.widgetCfg||{};return!(!n&&!t)},resetRenderWidgetValue:function(e){const n=u(e);return n?(e.value=null,n):n}}}export{u as default};
|
|
1
|
+
import{WidgetCfgMaps as e}from"../components/render-widget/widgetCfgMaps.js";import{DatePresetValEnums as n,DateRangeOutDefEnums as t}from"../components/render-widget/enums.js";import{WidgetTypeEnums as r}from"../types/enums.js";const i=[r.CHECKBOX_GROUP,r.DATE_RANGE_INNER,r.DATETIME_RANGE_INNER,r.LABEL];function u(){function u(e){var n;return null==(n=e.widgetCfg)?void 0:n.isRender}function o(n){const{widgetType:t,defaultValue:r,defValueUnit:i}=n.widgetCfg||{},u=e.get(t);let o;if(u){const{setDefaultValue:e}=u;e&&(o=e(r,i))}return o}return{isRender:u,getDefValByRenderWidget:o,initRenderWidgetCfg:function(e){const n=u(e);if(!n)return n;const{widgetType:t}=e.widgetCfg||{};return e._frontId||(e._frontId="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{const n=16*Math.random()|0;return("x"===e?n:3&n|8).toString(16)}))),e.isRender=n,e.widgetType=t,e.con="EQ",i.includes(t)&&(e._isBlock=!0),e.value=o(e),n},getRenderSearchConObj:function(e){if(!u(e))return null;const{columnName:i,con:o,value:d,widgetType:l}=e;let s=null;const f=[r.DATE,r.DATE_TIME],x=[r.DATE_RANGE_OUT,r.DATE_RANGE_INNER,r.DATETIME_RANGE_OUT,r.DATETIME_RANGE_INNER];f.includes(l)&&(s=n.CUSTOM),x.includes(l)&&(s=t.CUSTOM);const a=Array.isArray(d)?d:d?[d]:[];return{widgetType:l,field_key:i,con:o,value:a.length>0?a:null,unit:s}},getDefValByRenderConObj:function(e,n){if(!u(n))return null;const{widgetType:t,multiple:i}=n.widgetCfg||{},{value:o}=e;return t!==r.SELECT&&t!==r.CHECKBOX_GROUP||!i?Array.isArray(o)?o[0]:o:Array.isArray(o)?o:o?[o]:[]},isExistDefValByRenderWidget:function(e){const{defaultValue:n,defValueUnit:t}=e.widgetCfg||{};return!(!n&&!t)},resetRenderWidgetValue:function(e){const n=u(e);return n?(e.value=null,n):n}}}export{u as default};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Class for dimension change detection.
|
|
3
|
+
*
|
|
4
|
+
* @param {Element|Element[]} element
|
|
5
|
+
* @param {Function} callback
|
|
6
|
+
*
|
|
7
|
+
* @constructor
|
|
8
|
+
*/
|
|
9
|
+
declare class ResizeSensor {
|
|
10
|
+
_isCollectionTyped: boolean;
|
|
11
|
+
_element: any;
|
|
12
|
+
constructor(element: any, callback: any);
|
|
13
|
+
static detach(element: any): void;
|
|
14
|
+
detach(): void;
|
|
15
|
+
}
|
|
16
|
+
export default ResizeSensor;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=window.requestAnimationFrame||function(e){return window.setTimeout(e,20)};class t{constructor(e){let t;this.q=[],this.add=function(e){this.q.push(e)},this.call=function(){for(t=0;t<this.q.length;t++)this.q[t].call(this,e)}}}function s(s,i){if(s.resizedAttached){if(s.resizedAttached)return void s.resizedAttached.add(i)}else s.resizedAttached=new t(s),s.resizedAttached.add(i);s.resizeSensor=document.createElement("div"),s.resizeSensor.className="resize-sensor";const o="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden; opacity: 0;direction: ltr;",n="position: absolute; left: 0; top: 0; transition: 0s;";s.resizeSensor.style.cssText=o,s.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="'+o+'"><div style="'+n+'"></div></div><div class="resize-sensor-shrink" style="'+o+'"><div style="'+n+' width: 200%; height: 200%"></div></div>',s.appendChild(s.resizeSensor),"static"==function(e,t){return e.currentStyle?e.currentStyle[t]:window.getComputedStyle?window.getComputedStyle(e,null).getPropertyValue(t):e.style[t]}(s,"position")&&(s.style.position="relative");const l=s.resizeSensor.childNodes[0],r=l.childNodes[0],d=s.resizeSensor.childNodes[1],c=function(){r.style.width="100000px",r.style.height="100000px",l.scrollLeft=1e5,l.scrollTop=1e5,d.scrollLeft=1e5,d.scrollTop=1e5};c();let h=!1;const a=function(){s.resizedAttached&&(h&&(s.resizedAttached.call(),h=!1),e(a))};let u,f,p,z;e(a);const y=function(){(p=s.offsetWidth)==u&&(z=s.offsetHeight)==f||(h=!0,u=p,f=z),c()},v=function(e,t,s){e.attachEvent?e.attachEvent("on"+t,s):e.addEventListener(t,s)};v(l,"scroll",y),v(d,"scroll",y)}class i{constructor(e,t){const i=Object.prototype.toString.call(e);if(this._isCollectionTyped="[object Array]"===i||"[object NodeList]"===i||"[object HTMLCollection]"===i,this._element=e,this._isCollectionTyped)for(let i=0;i<e.length;i++)s(e[i],t);else s(e,t)}static detach(e){e.resizeSensor&&(e.removeChild(e.resizeSensor),delete e.resizeSensor,delete e.resizedAttached)}detach(){const e=this._isCollectionTyped,t=this._element;if(e)for(let e=0;e<t.length;e++)i.detach(t[e]);else i.detach(t)}}export{i as default};
|