cnhis-design-vue 3.2.7-beta.1 → 3.2.7-beta.10
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/classification/index.d.ts +39 -0
- package/es/components/classification/src/components/search-filter/index.vue.d.ts +39 -0
- package/es/components/classification/src/components/search-filter/index.vue2.js +1 -1
- package/es/components/classification/src/components/set-classification/index.vue.d.ts +39 -0
- package/es/components/classification/src/components/table-modal/index.vue.d.ts +3 -0
- package/es/components/classification/src/components/table-modal/index.vue2.js +1 -1
- package/es/components/classification/src/index.vue.d.ts +39 -0
- package/es/components/date-picker/index.d.ts +13 -0
- package/es/components/date-picker/src/DatePicker.vue.d.ts +13 -0
- package/es/components/date-picker/src/DatePicker.vue2.js +1 -1
- package/es/components/fabric-chart/src/constants/index.d.ts +3 -1
- package/es/components/fabric-chart/src/constants/index.js +1 -1
- package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.js +1 -1
- package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcessChart.d.ts +8 -3
- package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcessChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogramChart.d.ts +9 -6
- package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogramChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/newBirthProcess/useNewBirthProcess.js +1 -1
- package/es/components/fabric-chart/src/hooks/newBirthProcess/useNewBirthProcessChart.d.ts +0 -2
- package/es/components/fabric-chart/src/hooks/newBirthProcess/useNewBirthProcessChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.d.ts +8 -3
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useLeft.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.d.ts +8 -3
- package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/useScaleColumn.d.ts +1 -1
- package/es/components/fabric-chart/src/hooks/useScaleColumn.js +1 -1
- package/es/components/fabric-chart/src/interface.d.ts +11 -1
- package/es/components/field-set/src/FieldColor.vue.d.ts +26 -0
- package/es/components/field-set/src/components/condition.vue.d.ts +13 -0
- package/es/components/field-set/src/components/edit-dialog.vue.d.ts +26 -0
- package/es/components/field-set/src/components/edit-filter.vue.d.ts +13 -0
- package/es/components/form-config/index.d.ts +3 -3
- package/es/components/form-config/src/FormConfig.vue.d.ts +3 -3
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +3 -3
- package/es/components/form-render/src/components/renderer/combination/tableCombination.js +1 -1
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
- package/es/components/form-render/src/hooks/useFormValidator.js +1 -1
- package/es/components/form-render/src/types/fieldItem.d.ts +2 -1
- package/es/components/form-render/src/utils/schema.d.ts +1 -1
- package/es/components/form-render/src/utils/schema.js +1 -1
- package/es/components/iho-chat/index.d.ts +160 -45
- package/es/components/iho-chat/src/Index.vue.d.ts +160 -45
- package/es/components/iho-chat/src/Index.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatAdd.vue.d.ts +25 -10
- package/es/components/iho-chat/src/components/ChatAdd.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatFooter.vue.d.ts +29 -10
- package/es/components/iho-chat/src/components/ChatFooter.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatHeader.vue.d.ts +39 -11
- package/es/components/iho-chat/src/components/ChatHeader.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatMain.vue.d.ts +21 -5
- package/es/components/iho-chat/src/components/ChatMain.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatRecord.vue.d.ts +13 -0
- package/es/components/iho-chat/src/components/ChatRecord.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ContextMenu.d.ts +15 -2
- package/es/components/iho-chat/src/components/ContextMenu.js +1 -1
- package/es/components/iho-chat/src/components/MultipleVideo.vue.d.ts +25 -10
- package/es/components/iho-chat/src/components/MultipleVideo.vue2.js +1 -1
- package/es/components/iho-chat/src/components/Video.vue2.js +1 -1
- package/es/components/iho-chat/src/hooks/useScrollLoading.d.ts +1 -1
- package/es/components/iho-chat/src/hooks/useScrollLoading.js +1 -1
- package/es/components/iho-chat/src/hooks/useState.js +1 -1
- package/es/components/iho-chat/style/index.css +1 -1
- package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/filter.vue.d.ts +13 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +13 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.d.ts +20 -2
- package/es/components/index.css +1 -1
- package/es/components/quick-search/src/index.vue2.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/shortcut-setter/index.d.ts +1 -1
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +1 -1
- package/es/components/table-export-field/src/components/ExportModal.vue2.js +1 -1
- package/es/components/table-export-field/src/components/SaveProjectModal.vue2.js +1 -1
- package/es/components/table-filter/src/components/bi-filter/ValueCfg.vue.d.ts +13 -0
- package/es/components/table-filter/src/components/bi-filter/components/Date.vue.d.ts +13 -0
- package/es/components/table-filter/src/components/bi-filter/components/index.d.ts +13 -0
- package/es/components/table-filter/src/components/bi-filter/index.vue.d.ts +13 -0
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +26 -0
- package/es/components/table-filter/src/components/classify-filter/components/Date.vue.d.ts +13 -0
- package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue.d.ts +13 -0
- package/es/components/table-filter/src/components/classify-filter/components/SelectDynamic.vue2.js +1 -1
- package/es/components/table-filter/src/components/classify-filter/components/index.d.ts +26 -0
- package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +26 -0
- package/es/components/table-filter/src/components/render-widget/components/DateInner.vue.d.ts +13 -0
- package/es/components/table-filter/src/components/render-widget/components/DateOut.vue.d.ts +13 -0
- package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue.d.ts +13 -0
- package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue.d.ts +13 -0
- package/es/components/table-filter/src/components/render-widget/components/Select.vue2.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/SelectDynamic.vue2.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/SelectDynamicOption/index.vue2.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/index.d.ts +52 -0
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +52 -0
- package/es/components/time-picker/index.d.ts +20 -2
- package/es/components/time-picker/src/TimePicker.vue.d.ts +21 -2
- package/es/components/time-picker/src/TimePicker.vue2.js +1 -1
- package/es/env.d.ts +25 -25
- package/es/shared/assets/img/defaultCover/10review_successful.png.js +1 -1
- package/es/shared/assets/img/defaultCover/11review_fail.png.js +1 -1
- package/es/shared/assets/img/defaultCover/12no_setting.png.js +1 -1
- package/es/shared/assets/img/defaultCover/13no_menu_setting.png.js +1 -1
- package/es/shared/assets/img/defaultCover/14no_call_setting.png.js +1 -1
- package/es/shared/assets/img/defaultCover/15no_use_tag.png.js +1 -1
- package/es/shared/assets/img/defaultCover/16no_table_data.png.js +1 -1
- package/es/shared/assets/img/defaultCover/1location.png.js +1 -1
- package/es/shared/assets/img/defaultCover/2notfound.png.js +1 -1
- package/es/shared/assets/img/defaultCover/3loading.png.js +1 -1
- package/es/shared/assets/img/defaultCover/4no_permission.png.js +1 -1
- package/es/shared/assets/img/defaultCover/5no_data.png.js +1 -1
- package/es/shared/assets/img/defaultCover/6no_network.png.js +1 -1
- package/es/shared/assets/img/defaultCover/7no_doctor.png.js +1 -1
- package/es/shared/assets/img/defaultCover/8system_error.png.js +1 -1
- package/es/shared/assets/img/defaultCover/9system_upgrade.png.js +1 -1
- 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/table_style_2.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/package.json.js +1 -1
- package/es/shared/utils/business.js +1 -1
- package/package.json +2 -2
- package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
- package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +0 -1
- package/es/components/bpmn-workflow/types/ModelingModule.d.ts +0 -1
- package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +0 -1
- package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +0 -86
- package/es/shared/utils/fabricjs/index.d.ts +0 -6823
- package/es/shared/utils/tapable/index.d.ts +0 -139
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,ref as l,provide as a,computed as t,watch as i,onMounted as n,openBlock as o,createElementBlock as r,createElementVNode as u,Fragment as s,renderList as c,unref as d,normalizeClass as f,createCommentVNode as v,createVNode as m,withCtx as p,createTextVNode as h,toDisplayString as g,createBlock as k,withDirectives as b,vShow as y,isRef as C}from"vue";import{useMessage as _,NPopover as A,NModal as S,NCard as x,NIcon as F,NButton as q,NForm as w,NFormItem as j,NInput as I}from"naive-ui";import{CloseOutline as R,AddOutline as U}from"@vicons/ionicons5";import E from"../../table-filter/src/hooks/useMixins.js";import N from"../../table-filter/src/hooks/useRenderWidget.js";import O from"../../table-filter/src/hooks/useAdvanced.js";import P from"../../table-filter/src/components/render-widget/index.vue.js";import"moment/locale/zh-cn";import{cloneDeep as V}from"lodash-es";import{InjectionFilterApiConfig as z,InjectionFilterSearchConfig as D}from"../../table-filter/src/constants/index.js";const L={class:"quick-search-block quick-search-table"},T={class:"quick-row"},B={class:"quick-item-title"},Q={class:"quick-item-col"},M={class:"svg-wrap"},W={class:"flex_right"},G={class:"class-filter-content"},J={class:"quickSearch-content"},H=u("span",{class:"label"},"父类名称:",-1),K=["onDblclick","onClick"],X={class:"s-content"};var Y=e({__name:"index",props:{searchFieldList:{type:Array,default:()=>[]},quickSearchConfig:{type:Array,default:()=>[]},tableId:{type:String,default:""},filterApiConfig:{type:Object}},emits:["getFilterParam","onFilterSearch","clearQuickSearchConfig"],setup(e,{expose:Y,emit:Z}){const $=e,ee={classname:{required:!0,message:"请输入分类名称",trigger:["input","blur"]}},le=_(),{handleGetConfigApi:ae,outQuickSearchFn:te}=E(),{getRenderSearchConObj:ie,resetRenderWidgetValue:ne,isRender:oe}=N(),{transformData:re,getCacheDef:ue,transformParams:se}=O(),ce=l(null),de=l({classname:""});let fe=l(!1),ve=l([]),me=l([]),pe=l(!1),he=l("");const ge=l(),ke=l(),be=l([]);a(z,$.filterApiConfig),a(D,ve);let ye=t((()=>!!me.value.length&&me.value.some((e=>e.isAdd)))),Ce=t((()=>(e,l="name")=>e.alias||e[l]));function _e(){return function(e){if(!Array.isArray(e))return[];let l=[];for(let a=0;a<e.length;a++){let t=e[a];const i=ie(t);!l.find((e=>e.field_key===i.field_key))&&i&&l.push(i)}return l.filter((e=>e.value))}(ve.value)||[]}function Ae(){var e;null==(e=ce.value)||e.validate((e=>{var l;if(e)return;let a=_e();a.length||(a=[]);let t=null==(l=me.value.filter((e=>e.selected))[0])?void 0:l.value;!async function(e){var l;try{if(!await ae(e,"requestSaveTableCondiTion",{},$.filterApiConfig))return;fe.value=!1,null==(l=ce.value)||l.restoreValidation(),de.value.classname="",me.value=[],we()}catch(e){console.log(e)}}({tableId:$.tableId||"",setting:JSON.stringify({displayCategory:t,name:de.value.classname,conObj:a.map((e=>(e.unit&&(e.value=[]),e)))}),conditionList:"[]"})}))}function Se(e){setTimeout((()=>{ke.value&&ke.value.focus()}),100),pe.value=!0}function xe(){pe.value=!1,he.value&&(me.value.forEach((e=>e.selected=!1)),me.value.push({disabled:!0,value:he.value,selected:!0,isAdd:!0}),he.value="")}function Fe(e){!function(e){me.value.splice(e,1)}(e)}function qe(){fe.value=!1}function we(){je(ve.value),Z("clearQuickSearchConfig")}function je(e){Array.isArray(e)&&(e.forEach((e=>{ne(e)})),te.handlerInitSearchItem(ve.value))}return i((()=>$.searchFieldList),(e=>{e&&e.length>0&&function(){let e=V(re($.searchFieldList,{_filterApiConfig:$.filterApiConfig})).filter((e=>1==e.isShowSearch&&1!=e.filterExplicit))||[];ve.value=e||[],te.handlerInitSearchItem(ve.value)}()}),{immediate:!0,deep:!0}),i((()=>ve),(()=>{const e=_e()||[],l=se(e);Z("getFilterParam",e,l),be.value.forEach((e=>e(l)))}),{deep:!0}),n((()=>{const e=$.quickSearchConfig;if(e&&e.length>0)return l=e,void ve.value.forEach((e=>{var a,t;if(oe(e)){const i=l.find((l=>l.field_key===e.columnName));i&&(null==(a=i.value)?void 0:a.length)>0&&(e.value=ue(e,i.value),e.unit=null!=(t=i.unit)?t:"")}}));var l;je(ve.value)})),Y({openSaveToCalss:function(){let e=_e();e&&(e.length>0?fe.value=!0:le.warning("请设置搜索条件"))},clearData:we,onFilterSearch:function(){let e=_e()||[];const l=se(e);return Z("onFilterSearch",e,l,!1),ve.value},getFilterParams:function(){const e=_e()||[];return se(e)},setFilterParams:function(e){const l=e?Object.keys(e):[];l.length>0&&ve.value.forEach((a=>{var t;if(oe(a)&&l.includes(a.columnName)){const l=e[a.columnName];a.value=Array.isArray(l)&&!1===(null==(t=a.widgetCfg)?void 0:t.multiple)?l[0]:l}}))},getOriginalConfig:function(){return $.searchFieldList},onFilterChange:function(e){be.value.push(e)}}),(e,l)=>(o(),r("div",null,[u("div",L,[(o(!0),r(s,null,c(d(ve),(e=>(o(),r("div",{class:f(["quick-item",{"quick-block":e._isBlock}]),key:e.sid||e.columnName},[u("div",T,[v(" title "),u("div",B,[m(d(A),{trigger:"hover"},{trigger:p((()=>[h(g(d(Ce)(e,"title")),1)])),default:p((()=>[u("span",null,g(d(Ce)(e,"title")),1)])),_:2},1024)]),v(" content "),u("div",Q,[v(" 直接渲染组件 "),e.isRender?(o(),k(P,{key:0,cfg:e,modelValue:e.value,"onUpdate:modelValue":l=>e.value=l,unit:e.unit,"onUpdate:unit":l=>e.unit=l},null,8,["cfg","modelValue","onUpdate:modelValue","unit","onUpdate:unit"])):v("v-if",!0)])])],2)))),128))]),v(" 保存到分类的弹窗 "),m(d(S),{show:d(fe),maskClosable:!1,"positive-text":"确认","negative-text":"取消",onPositiveClick:Ae,onNegativeClick:qe,class:"classification-modal-block"},{default:p((()=>[m(d(x),{title:"设置筛选分类",style:{width:"520px"},bordered:!1,size:"huge",role:"dialog","aria-modal":"true"},{"header-extra":p((()=>[u("div",M,[m(d(F),{component:d(R),size:"24",onClick:qe},null,8,["component"])])])),footer:p((()=>[u("div",W,[m(d(q),{onClick:qe},{default:p((()=>[h("取消")])),_:1}),m(d(q),{type:"info",onClick:Ae},{default:p((()=>[h("确认")])),_:1})])])),default:p((()=>[u("div",G,[m(d(w),{ref_key:"formRef",ref:ce,"label-placement":"left",rules:ee,model:de.value},{default:p((()=>[m(d(j),{label:"筛选集名称",path:"classname"},{default:p((()=>[m(d(I),{value:de.value.classname,"onUpdate:value":l[0]||(l[0]=e=>de.value.classname=e),placeholder:"请输入分类名称",clearable:""},null,8,["value"])])),_:1})])),_:1},8,["model"]),u("div",J,[H,(o(!0),r(s,null,c(d(me),((e,l)=>(o(),r("div",{class:"parent-name",key:l,onDblclick:l=>function(e){e.disabled=!1,setTimeout((()=>{ge.value.length>0&&ge.value[0].focus()}),100)}(e),onClick:a=>function(e,l){e.disabled&&(me.value.forEach(((e,a)=>{a!==l&&(e.selected=!1)})),e.selected=!e.selected)}(e,l)},[e.disabled?(o(),r("div",{key:0,class:f(["edit-tag",{"edit-tag-select":e.selected&&e.disabled}])},[u("div",X,g(e.value),1),m(d(F),{component:d(R),class:"anticon-close",size:"20",onClick:e=>Fe(l)},null,8,["component","onClick"])],2)):(o(),k(d(I),{key:1,ref_for:!0,ref_key:"parentInputRef",ref:ge,class:"parent-input",style:{width:"100px"},value:e.value,"onUpdate:value":l=>e.value=l,disabled:e.disabled,onBlur:()=>e.disabled=!0,maxlength:20},null,8,["value","onUpdate:value","disabled","onBlur"]))],40,K)))),128)),d(ye)?v("v-if",!0):(o(),r(s,{key:0},[b(m(d(q),{dashed:"",icon:"plus",class:"ant-btn",onClick:Se},{default:p((()=>[m(d(F),{component:d(U),size:"20"},null,8,["component"]),h("添加分类 ")])),_:1},512),[[y,!d(pe)]]),b(m(d(I),{ref_key:"parentInputAddRef",ref:ke,class:"parent-input",style:{width:"100px"},value:d(he),"onUpdate:value":l[1]||(l[1]=e=>C(he)?he.value=e:he=e),valueModifiers:{trim:!0},onBlur:xe,maxlength:20},null,8,["value"]),[[y,d(pe)]])],64))])])])),_:1})])),_:1},8,["show"])]))}});export{Y as default};
|
1
|
+
import{defineComponent as e,ref as l,provide as a,computed as t,watch as i,onMounted as n,openBlock as o,createElementBlock as r,createElementVNode as u,Fragment as s,renderList as c,unref as d,normalizeClass as f,createCommentVNode as v,createVNode as m,withCtx as p,createTextVNode as h,toDisplayString as g,createBlock as k,withDirectives as b,vShow as y,isRef as C}from"vue";import{useMessage as _,NPopover as A,NModal as S,NCard as x,NIcon as F,NButton as q,NForm as w,NFormItem as j,NInput as I}from"naive-ui";import{CloseOutline as R,AddOutline as U}from"@vicons/ionicons5";import E from"../../table-filter/src/hooks/useMixins.js";import N from"../../table-filter/src/hooks/useRenderWidget.js";import O from"../../table-filter/src/hooks/useAdvanced.js";import P from"../../table-filter/src/components/render-widget/index.vue.js";import"moment/locale/zh-cn";import{cloneDeep as V}from"lodash-es";import{InjectionFilterApiConfig as z,InjectionFilterSearchConfig as D}from"../../table-filter/src/constants/index.js";const L={class:"quick-search-block quick-search-table"},T={class:"quick-row"},B={class:"quick-item-title"},Q={class:"quick-item-col"},M={class:"svg-wrap"},W={class:"flex_right"},G={class:"class-filter-content"},J={class:"quickSearch-content"},H=u("span",{class:"label"},"父类名称:",-1),K=["onDblclick","onClick"],X={class:"s-content"};var Y=e({__name:"index",props:{searchFieldList:{type:Array,default:()=>[]},quickSearchConfig:{type:Array,default:()=>[]},tableId:{type:String,default:""},filterApiConfig:{type:Object}},emits:["getFilterParam","onFilterSearch","clearQuickSearchConfig"],setup(e,{expose:Y,emit:Z}){const $=e,ee={classname:{required:!0,message:"请输入分类名称",trigger:["input","blur"]}},le=_(),{handleGetConfigApi:ae,outQuickSearchFn:te}=E(),{getRenderSearchConObj:ie,resetRenderWidgetValue:ne,isRender:oe}=N(),{transformData:re,getCacheDef:ue,transformParams:se}=O(),ce=l(null),de=l({classname:""});let fe=l(!1),ve=l([]),me=l([]),pe=l(!1),he=l("");const ge=l(),ke=l(),be=l([]);a(z,$.filterApiConfig),a(D,ve);let ye=t((()=>!!me.value.length&&me.value.some((e=>e.isAdd)))),Ce=t((()=>(e,l="name")=>e.alias||e[l]));function _e(){return function(e){if(!Array.isArray(e))return[];let l=[];for(let a=0;a<e.length;a++){let t=e[a];const i=ie(t);!l.find((e=>e.field_key===i.field_key))&&i&&l.push(i)}return l.filter((e=>e.value))}(ve.value)||[]}function Ae(){var e;null==(e=ce.value)||e.validate((e=>{var l;if(e)return;let a=_e();a.length||(a=[]);let t=null==(l=me.value.filter((e=>e.selected))[0])?void 0:l.value;!async function(e){var l;try{if(!await ae(e,"requestSaveTableCondiTion",{},$.filterApiConfig))return;fe.value=!1,null==(l=ce.value)||l.restoreValidation(),de.value.classname="",me.value=[],we()}catch(e){console.log(e)}}({tableId:$.tableId||"",setting:JSON.stringify({displayCategory:t,name:de.value.classname,conObj:a.map((e=>(e.unit&&(e.value=[]),e)))}),conditionList:"[]"})}))}function Se(e){setTimeout((()=>{ke.value&&ke.value.focus()}),100),pe.value=!0}function xe(){pe.value=!1,he.value&&(me.value.forEach((e=>e.selected=!1)),me.value.push({disabled:!0,value:he.value,selected:!0,isAdd:!0}),he.value="")}function Fe(e){!function(e){me.value.splice(e,1)}(e)}function qe(){fe.value=!1}function we(){je(ve.value),Z("clearQuickSearchConfig")}function je(e){Array.isArray(e)&&(e.forEach((e=>{ne(e)})),te.handlerInitSearchItem(ve.value))}return i((()=>$.searchFieldList),(e=>{e&&e.length>0&&function(){let e=V(re($.searchFieldList,{_filterApiConfig:$.filterApiConfig})).filter((e=>1==e.isShowSearch&&1!=e.filterExplicit))||[];ve.value=e||[],te.handlerInitSearchItem(ve.value)}()}),{immediate:!0,deep:!0}),i((()=>ve),(()=>{const e=_e()||[],l=se(e);Z("getFilterParam",e,l),be.value.forEach((e=>e(l)))}),{deep:!0}),n((()=>{const e=$.quickSearchConfig;if(e&&e.length>0)return l=e,void ve.value.forEach((e=>{var a,t;if(oe(e)){const i=l.find((l=>l.field_key===e.columnName));i&&(null==(a=i.value)?void 0:a.length)>0&&(e.value=ue(e,i.value),e.unit=null!=(t=i.unit)?t:"")}}));var l;je(ve.value)})),Y({openSaveToCalss:function(){let e=_e();e&&(e.length>0?fe.value=!0:le.warning("请设置搜索条件"))},clearData:we,onFilterSearch:function(){let e=_e()||[];const l=se(e);return Z("onFilterSearch",e,l,!1),ve.value},getFilterParams:function(){const e=_e()||[];return se(e)},setFilterParams:function(e){const l=e?Object.keys(e):[];l.length>0&&ve.value.forEach((a=>{var t;if(oe(a)&&l.includes(a.columnName)){const l=e[a.columnName];a.value=Array.isArray(l)&&!1===(null==(t=a.widgetCfg)?void 0:t.multiple)?l[0]:l}}))},getOriginalConfig:function(){return $.searchFieldList},onFilterChange:function(e){be.value.push(e)}}),(e,l)=>(o(),r("div",null,[u("div",L,[(o(!0),r(s,null,c(d(ve),(e=>(o(),r("div",{class:f(["quick-item",{"quick-block":e._isBlock}]),key:e.sid||e.columnName},[u("div",T,[v(" title "),u("div",B,[m(d(A),{trigger:"hover"},{trigger:p((()=>[h(g(d(Ce)(e,"title")),1)])),default:p((()=>[u("span",null,g(d(Ce)(e,"title")),1)])),_:2},1024)]),v(" content "),u("div",Q,[v(" 直接渲染组件 "),e.isRender?(o(),k(P,{key:0,cfg:e,modelValue:e.value,"onUpdate:modelValue":l=>e.value=l,unit:e.unit,"onUpdate:unit":l=>e.unit=l},null,8,["cfg","modelValue","onUpdate:modelValue","unit","onUpdate:unit"])):v("v-if",!0)])])],2)))),128))]),v(" 保存到分类的弹窗 "),m(d(S),{show:d(fe),maskClosable:!1,to:"body","positive-text":"确认","negative-text":"取消",onPositiveClick:Ae,onNegativeClick:qe,class:"classification-modal-block"},{default:p((()=>[m(d(x),{title:"设置筛选分类",style:{width:"520px"},bordered:!1,size:"huge",role:"dialog","aria-modal":"true"},{"header-extra":p((()=>[u("div",M,[m(d(F),{component:d(R),size:"24",onClick:qe},null,8,["component"])])])),footer:p((()=>[u("div",W,[m(d(q),{onClick:qe},{default:p((()=>[h("取消")])),_:1}),m(d(q),{type:"info",onClick:Ae},{default:p((()=>[h("确认")])),_:1})])])),default:p((()=>[u("div",G,[m(d(w),{ref_key:"formRef",ref:ce,"label-placement":"left",rules:ee,model:de.value},{default:p((()=>[m(d(j),{label:"筛选集名称",path:"classname"},{default:p((()=>[m(d(I),{value:de.value.classname,"onUpdate:value":l[0]||(l[0]=e=>de.value.classname=e),placeholder:"请输入分类名称",clearable:""},null,8,["value"])])),_:1})])),_:1},8,["model"]),u("div",J,[H,(o(!0),r(s,null,c(d(me),((e,l)=>(o(),r("div",{class:"parent-name",key:l,onDblclick:l=>function(e){e.disabled=!1,setTimeout((()=>{ge.value.length>0&&ge.value[0].focus()}),100)}(e),onClick:a=>function(e,l){e.disabled&&(me.value.forEach(((e,a)=>{a!==l&&(e.selected=!1)})),e.selected=!e.selected)}(e,l)},[e.disabled?(o(),r("div",{key:0,class:f(["edit-tag",{"edit-tag-select":e.selected&&e.disabled}])},[u("div",X,g(e.value),1),m(d(F),{component:d(R),class:"anticon-close",size:"20",onClick:e=>Fe(l)},null,8,["component","onClick"])],2)):(o(),k(d(I),{key:1,ref_for:!0,ref_key:"parentInputRef",ref:ge,class:"parent-input",style:{width:"100px"},value:e.value,"onUpdate:value":l=>e.value=l,disabled:e.disabled,onBlur:()=>e.disabled=!0,maxlength:20},null,8,["value","onUpdate:value","disabled","onBlur"]))],40,K)))),128)),d(ye)?v("v-if",!0):(o(),r(s,{key:0},[b(m(d(q),{dashed:"",icon:"plus",class:"ant-btn",onClick:Se},{default:p((()=>[m(d(F),{component:d(U),size:"20"},null,8,["component"]),h("添加分类 ")])),_:1},512),[[y,!d(pe)]]),b(m(d(I),{ref_key:"parentInputAddRef",ref:ke,class:"parent-input",style:{width:"100px"},value:d(he),"onUpdate:value":l[1]||(l[1]=e=>C(he)?he.value=e:he=e),valueModifiers:{trim:!0},onBlur:xe,maxlength:20},null,8,["value"]),[[y,d(pe)]])],64))])])])),_:1})])),_:1},8,["show"])]))}});export{Y as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,reactive as o,ref as t,watch as a,nextTick as n,openBlock as s,createElementBlock as i,normalizeClass as l,unref as r,createCommentVNode as m,Fragment as c,createBlock as u,mergeProps as d,createElementVNode as p,normalizeStyle as v,createVNode as f,withCtx as g,renderList as h,toDisplayString as k,createTextVNode as y,resolveDynamicComponent as w,renderSlot as S}from"vue";import b from"./hooks/use-noData.js";import{ScaleViewProps as C}from"./hooks/scaleview-props.js";import{getScaleViewState as D}from"./hooks/scaleview-state.js";import{ScaleViewComputed as E}from"./hooks/scaleview-computed.js";import{ScaleViewInit as j}from"./hooks/scaleview-init.js";import{ScaleViewSubmit as _}from"./hooks/scaleview-submit.js";import{ScaleViewMethods as x}from"./hooks/scaleview-methods.js";import{handleQueryParams as F,isCollection as P}from"./utils/judge-types.js";import{useEvent as q}from"./hooks/use-event.js";import"xe-utils";import"moment";import L from"../../../shared/utils/vexutilsExpand.js";import N from"./components/NoData.vue.js";import R from"./components/EvaluateCountdown.vue.js";import A from"./components/EvaluatePage.vue.js";import M from"./components/AnswerParse.vue.js";import O from"./components/ScaleScore.js";import T from"./components/DescribeContent.vue.js";import{NForm as I,NFormItem as B,NButton as J}from"naive-ui";const V=["innerHTML"],G={key:0,class:"required-text"},W={key:1,class:"evalute-label"},H=["onClick"],Q=p("i",{class:"scale-view-iconfont icon-scale-view-dengpao"},null,-1),$={key:1,class:"footer"};var z=e({__name:"ScaleView",props:C,emits:["onCloseSetting","submitNoRequest","onSubmit","startWriteScale"],setup(e,{expose:C,emit:z}){const K=e,{ScaleViewState:U}=D(),X=o(U),Y=t(null),Z=t(null),{noDataState:ee,setNoData:oe,resetNodata:te}=b(),ae=F(),{showEvatip:ne,isFormBoldOpen:se,scaleStyle:ie,handlePageClass:le,isShowItem:re,handleShowQuestionNumber:me,hasScore:ce,isPreviewScale:ue,showEvaluateEntry:de,showEvaluateCoundownPage:pe,showScaleFooter:ve,isCancelBtn:fe,isSaveBtn:ge,showEvaluateLabel:he,showAnswerParse:ke,propsConfig:ye,evaluatePageProps:we,evaluateCountdownProps:Se,isEvaluetaResSituation:be,disableEdit:Ce,desStart:De,desEnd:Ee,desContent:je}=E(K,X,{query:ae}),{initForm:_e}=j(K,X,z,{query:ae}),{submitMethod:xe,onSubmitData:Fe,onSubmitForm:Pe,handleScoreJson:qe}=_(K,X,z,{query:ae,formRef:Z,countdownDom:Y}),{nextLogicEvent:Le,handleDynamicDataRelation:Ne}=q(K,X),{scaleChange:Re,labelChange:Ae,vodFileList:Me,writeGuage:Oe,closeEvaluateCountdown:Te,showEvaTipModal:Ie}=x(K,X,z,{nextLogicEvent:Le,handleDynamicDataRelation:Ne,isPreviewScale:ue,submitMethod:xe,isEvaluetaResSituation:be,handleScoreJson:qe,disableEdit:Ce});(()=>{let{id:e}=ae;e&&(X.shareId=e)})();const Be=e=>{try{te(),_e(e)}catch(e){console.log(e,"--error"),X.spinning=!1,X.hasFrontAddress=!1,oe(!0,null==e?void 0:e.resultMsg,null==e?void 0:e.result)}};a((()=>K.ids),((e,o)=>{o?e.guage_id&&e.guage_id!=o.guage_id&&Be(e):e.guage_id&&Be(e)}),{immediate:!0}),a((()=>K.guageData),(e=>{if(!e||!Object.keys(e||{}).length)return;X.form={},X.formArray=[];const o=JSON.parse(JSON.stringify(e));n((()=>{_e(o)}))}),{immediate:!0});const Je=L.debounce(Fe,300),Ve=()=>{z("onCloseSetting")};return C({getScaleData:()=>({...X}),onSubmitForm:Pe,cancel:Ve}),(e,o)=>(s(),i("div",{class:l(["c-scale-view-block",{"c-scale-view-block-hasfooter":r(ve)}])},[m(' <template v-if="state.spinning">\n <n-spin :show="state.spinning" description="加载中"></n-spin>\n </template> '),X.spinning||X.hasFrontAddress?m("v-if",!0):(s(),i(c,{key:0},[r(ee).noData?(s(),u(N,{key:0,noDataImg:r(ee).noDataImg,noDataTip:r(ee).noDataTip},null,8,["noDataImg","noDataTip"])):(s(),i(c,{key:1},[r(de)?(s(),u(A,d({key:0},r(we),{onWriteGuage:r(Oe)}),null,16,["onWriteGuage"])):(s(),i(c,{key:1},[r(pe)?(s(),u(R,d({key:0,ref_key:"countdownDom",ref:Y},r(Se),{onCloseEvaluateCountdown:r(Te)}),null,16,["onCloseEvaluateCountdown"])):m("v-if",!0),p("div",{class:l(["scale-container",{"scale-container-nopadding":r(le),"scale-container-hasfooter":r(ve)}]),style:v(r(ie))},[r(ce)?(s(),u(r(O),{key:0,config:X.config,maxScore:X.maxScore},null,8,["config","maxScore"])):m("v-if",!0),r(De)?(s(),u(T,{key:1,content:r(je)},null,8,["content"])):m("v-if",!0),f(r(I),{ref_key:"formRef",ref:Z,model:X.form,rules:X.rules,"require-mark-placement":"left",class:"main"},{default:g((()=>[(s(!0),i(c,null,h(X.formArray,((e,o)=>(s(),i(c,{key:(e.id||e.seq)+o},[r(re)(e)?(s(),u(r(B),{key:0,path:e.val_key,"show-label":!r(P)(e.type),class:"c-scle-form-item"},{label:g((()=>[p("span",{class:l({"scale-label-required":r(se)(e)}),innerHTML:r(me)(e)},null,10,V),r(se)(e)?(s(),i("span",G,"(必填)")):m("v-if",!0),r(he)(e)?(s(),i("span",W,k(r(he)(e)),1)):m("v-if",!0),r(ne)(e)?(s(),i("span",{key:2,class:"evalute-tip",onClick:o=>r(Ie)(e)},[Q,y(" 查看提示 ")],8,H)):m("v-if",!0)])),default:g((()=>[(s(),u(w(e.renderCom),d(r(ye)(e,o),{key:(e.id||e.seq)+o,onScaleChange:r(Re),onOnChange:o=>r(Ae)(o,e),onVodFileList:r(Me)}),null,16,["onScaleChange","onOnChange","onVodFileList"])),r(ke)(e)?(s(),u(M,{key:0,item:e},null,8,["item"])):m("v-if",!0)])),_:2},1032,["path","show-label"])):m("v-if",!0)],64)))),128))])),_:1},8,["model","rules"]),r(Ee)?(s(),u(T,{key:2,content:r(je)},null,8,["content"])):m("v-if",!0)],6),r(ve)?(s(),i("div",$,[m(" 分享的链接 隐藏取消按钮 "),r(fe)?(s(),u(r(J),{key:0,onClick:Ve},{default:g((()=>[y("取消")])),_:1})):m("v-if",!0),r(ge)?(s(),u(r(J),{key:1,onClick:r(Je),disabled:X.banSubmit,type:"primary"},{default:g((()=>[y(" 保存 ")])),_:1},8,["onClick","disabled"])):m("v-if",!0),S(e.$slots,"extendBtn")])):m("v-if",!0)],64))],64))],64))],2))}});export{z as default};
|
1
|
+
import{defineComponent as e,reactive as o,ref as t,watch as a,nextTick as n,openBlock as s,createElementBlock as i,normalizeClass as l,unref as r,createCommentVNode as m,Fragment as c,createBlock as u,mergeProps as d,createElementVNode as p,normalizeStyle as v,createVNode as f,withCtx as g,renderList as h,toDisplayString as k,createTextVNode as y,resolveDynamicComponent as w,renderSlot as S}from"vue";import b from"./hooks/use-noData.js";import{ScaleViewProps as C}from"./hooks/scaleview-props.js";import{getScaleViewState as D}from"./hooks/scaleview-state.js";import{ScaleViewComputed as E}from"./hooks/scaleview-computed.js";import{ScaleViewInit as j}from"./hooks/scaleview-init.js";import{ScaleViewSubmit as _}from"./hooks/scaleview-submit.js";import{ScaleViewMethods as x}from"./hooks/scaleview-methods.js";import{handleQueryParams as F,isCollection as P}from"./utils/judge-types.js";import{useEvent as q}from"./hooks/use-event.js";import"xe-utils";import"moment";import L from"../../../shared/utils/vexutilsExpand.js";import N from"./components/NoData.vue.js";import R from"./components/EvaluateCountdown.vue.js";import A from"./components/EvaluatePage.vue.js";import M from"./components/AnswerParse.vue.js";import O from"./components/ScaleScore.js";import T from"./components/DescribeContent.vue.js";import{NForm as I,NFormItem as B,NButton as J}from"naive-ui";const V=["innerHTML"],G={key:0,class:"required-text"},W={key:1,class:"evalute-label"},H=["onClick"],Q=p("i",{class:"scale-view-iconfont icon-scale-view-dengpao"},null,-1),$={key:1,class:"footer"};var z=e({__name:"ScaleView",props:C,emits:["onCloseSetting","submitNoRequest","onSubmit","startWriteScale"],setup(e,{expose:C,emit:z}){const K=e,{ScaleViewState:U}=D(),X=o(U),Y=t(null),Z=t(null),{noDataState:ee,setNoData:oe,resetNodata:te}=b(),ae=F(),{showEvatip:ne,isFormBoldOpen:se,scaleStyle:ie,handlePageClass:le,isShowItem:re,handleShowQuestionNumber:me,hasScore:ce,isPreviewScale:ue,showEvaluateEntry:de,showEvaluateCoundownPage:pe,showScaleFooter:ve,isCancelBtn:fe,isSaveBtn:ge,showEvaluateLabel:he,showAnswerParse:ke,propsConfig:ye,evaluatePageProps:we,evaluateCountdownProps:Se,isEvaluetaResSituation:be,disableEdit:Ce,desStart:De,desEnd:Ee,desContent:je}=E(K,X,{query:ae}),{initForm:_e}=j(K,X,z,{query:ae}),{submitMethod:xe,onSubmitData:Fe,onSubmitForm:Pe,handleScoreJson:qe}=_(K,X,z,{query:ae,formRef:Z,countdownDom:Y}),{nextLogicEvent:Le,handleDynamicDataRelation:Ne}=q(K,X),{scaleChange:Re,labelChange:Ae,vodFileList:Me,writeGuage:Oe,closeEvaluateCountdown:Te,showEvaTipModal:Ie}=x(K,X,z,{nextLogicEvent:Le,handleDynamicDataRelation:Ne,isPreviewScale:ue,submitMethod:xe,isEvaluetaResSituation:be,handleScoreJson:qe,disableEdit:Ce});(()=>{let{id:e}=ae;e&&(X.shareId=e)})();const Be=e=>{try{te(),_e(e)}catch(e){console.log(e,"--error"),X.spinning=!1,X.hasFrontAddress=!1,oe(!0,null==e?void 0:e.resultMsg,null==e?void 0:e.result)}};a((()=>K.ids),((e,o)=>{o?e.guage_id&&e.guage_id!=o.guage_id&&Be(e):e.guage_id&&Be(e)}),{immediate:!0}),a((()=>K.guageData),(e=>{if(!e||!Object.keys(e||{}).length)return;X.form={},X.formArray=[];const o=JSON.parse(JSON.stringify(e));n((()=>{_e(o)}))}),{immediate:!0});const Je=L.debounce(Fe,300),Ve=()=>{z("onCloseSetting")};return C({getScaleData:()=>({...X}),onSubmitForm:Pe,cancel:Ve}),(e,o)=>(s(),i("div",{class:l(["c-scale-view-block",{"c-scale-view-block-hasfooter":r(ve)}])},[m(' <template v-if="state.spinning">\r\n <n-spin :show="state.spinning" description="加载中"></n-spin>\r\n </template> '),X.spinning||X.hasFrontAddress?m("v-if",!0):(s(),i(c,{key:0},[r(ee).noData?(s(),u(N,{key:0,noDataImg:r(ee).noDataImg,noDataTip:r(ee).noDataTip},null,8,["noDataImg","noDataTip"])):(s(),i(c,{key:1},[r(de)?(s(),u(A,d({key:0},r(we),{onWriteGuage:r(Oe)}),null,16,["onWriteGuage"])):(s(),i(c,{key:1},[r(pe)?(s(),u(R,d({key:0,ref_key:"countdownDom",ref:Y},r(Se),{onCloseEvaluateCountdown:r(Te)}),null,16,["onCloseEvaluateCountdown"])):m("v-if",!0),p("div",{class:l(["scale-container",{"scale-container-nopadding":r(le),"scale-container-hasfooter":r(ve)}]),style:v(r(ie))},[r(ce)?(s(),u(r(O),{key:0,config:X.config,maxScore:X.maxScore},null,8,["config","maxScore"])):m("v-if",!0),r(De)?(s(),u(T,{key:1,content:r(je)},null,8,["content"])):m("v-if",!0),f(r(I),{ref_key:"formRef",ref:Z,model:X.form,rules:X.rules,"require-mark-placement":"left",class:"main"},{default:g((()=>[(s(!0),i(c,null,h(X.formArray,((e,o)=>(s(),i(c,{key:(e.id||e.seq)+o},[r(re)(e)?(s(),u(r(B),{key:0,path:e.val_key,"show-label":!r(P)(e.type),class:"c-scle-form-item"},{label:g((()=>[p("span",{class:l({"scale-label-required":r(se)(e)}),innerHTML:r(me)(e)},null,10,V),r(se)(e)?(s(),i("span",G,"(必填)")):m("v-if",!0),r(he)(e)?(s(),i("span",W,k(r(he)(e)),1)):m("v-if",!0),r(ne)(e)?(s(),i("span",{key:2,class:"evalute-tip",onClick:o=>r(Ie)(e)},[Q,y(" 查看提示 ")],8,H)):m("v-if",!0)])),default:g((()=>[(s(),u(w(e.renderCom),d(r(ye)(e,o),{key:(e.id||e.seq)+o,onScaleChange:r(Re),onOnChange:o=>r(Ae)(o,e),onVodFileList:r(Me)}),null,16,["onScaleChange","onOnChange","onVodFileList"])),r(ke)(e)?(s(),u(M,{key:0,item:e},null,8,["item"])):m("v-if",!0)])),_:2},1032,["path","show-label"])):m("v-if",!0)],64)))),128))])),_:1},8,["model","rules"]),r(Ee)?(s(),u(T,{key:2,content:r(je)},null,8,["content"])):m("v-if",!0)],6),r(ve)?(s(),i("div",$,[m(" 分享的链接 隐藏取消按钮 "),r(fe)?(s(),u(r(J),{key:0,onClick:Ve},{default:g((()=>[y("取消")])),_:1})):m("v-if",!0),r(ge)?(s(),u(r(J),{key:1,onClick:r(Je),disabled:X.banSubmit,type:"primary"},{default:g((()=>[y(" 保存 ")])),_:1},8,["onClick","disabled"])):m("v-if",!0),S(e.$slots,"extendBtn")])):m("v-if",!0)],64))],64))],64))],2))}});export{z as default};
|
@@ -1 +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 r,createCommentVNode as d,withDirectives as o,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"../../../shared/utils/vexutilsExpand.js";const A={key:0,class:"label-disable-wrap"},O=[c("p",{class:"label-disable-title"},"无可选标签",-1),c("p",{class:"label-disable-desc"},"请联系管理员进行标签管理设置",-1)],K={style:{height:"100%"}},j={class:"label-wrap"},k=["id"],T={class:"edit-label-type"};var B=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:B,emit:D}){const V=t,F=L(),P=e(null),_=l({editLabelItem:{},inited:!1,labelSelectedEdit:[],labelAnchorKey:"",cacheAnchorKey:"",labelConfig:{}});let N=e(0);const W=a((()=>{if(!_.inited)return!1;let t=_.labelConfig;return!t||Object.keys(t).every((e=>!t[e].itemList))})),$=a((()=>{let t=[].concat(..._.labelSelectedEdit,...V.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(_.labelSelectedEdit=$.value,"object"==typeof _.labelConfig){Object.keys(_.labelConfig||{}).forEach((t=>{var e;let l=(null==(e=_.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 V.saveLabelItem(a,t);i&&(F.success("添加成功!"),D("updateLabelData"),t.showAdd=!1)},U=(t,e,l,a)=>{var i;const n=l.itemList,s=l.multipleChoice;let r=(null==(i=_.labelSelectedEdit)?void 0:i.length)&&x.clone(_.labelSelectedEdit,!0)||[];if(t){if(r.some((t=>t.labelId==e.labelId)))return;if(2==s){const{typeId:t,labelId:l}=e;r=r.filter((e=>e.typeId!==t)),n.forEach((t=>{t.labelId!==l&&(t.isSelect=!1)}))}r.push(e)}else{const t=r.findIndex((t=>t.labelId==e.labelId));-1!=t&&r.splice(t,1)}_.labelSelectedEdit=[...r],N.value++,V.explicit&&D("explicitOnChange",[..._.labelSelectedEdit])},X=async t=>{const{status:e}=await V.deleteLabel(t,V.item);if(e){F.success("删除成功!");for(const e in _.labelConfig){const l=_.labelConfig[e].itemList.findIndex((e=>e.labelId==t.labelId));-1!=l&&_.labelConfig[e].itemList.splice(l,1)}const e=_.labelSelectedEdit||[],l=V.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),D("change",[...l],V.item)}D("updateLabelData")}else F.warning("删除失败")},Y=t=>{t&&setTimeout((()=>{let e,l="#"+t;e=P.value.querySelector("a[href='"+l+"']"),e&&e.click(),_.labelAnchorKey=t}),32)},Z=t=>{t.preventDefault()},tt=t=>{if(!t)return;let e=t.slice(1);_.cacheAnchorKey=e},et=()=>{var t;return null==(t=P.value)?void 0:t.querySelector(".right-label-wrap")};return i((()=>V.labelOptions),(t=>{t&&(()=>{var t;if(V.isLock)return;const e=JSON.parse(JSON.stringify(V.labelOptions));for(let l in e){let a=(null==(t=e[l])?void 0:t.typeId)||"";Object.assign(e[l],{curKey:`${l}_${a}}`})}_.labelConfig=e,C((()=>{let t;R(),V.explicit&&_.inited&&(t=_.labelAnchorKey),z(_.labelConfig,t),_.inited=!0}))})()}),{immediate:!0,deep:!0}),B({resetShowAdd:()=>{let{labelObj:t}=_.editLabelItem;if(t&&Object.keys(t).length)for(let e in t){let l=t[e];Object.assign(l,{showAdd:!1})}},handleLabelForm:t=>{t([..._.labelSelectedEdit||[]])},handleResetOptions:()=>{},hanldeSetLabelItem:(t,e)=>{if("object"==typeof _.labelConfig){Object.keys(_.labelConfig||{}).forEach((l=>{var a;let i=(null==(a=_.labelConfig[l])?void 0:a.itemList)||[];i.length&&i.forEach((l=>{t==l.labelId&&(l.isSelect=e)}))}))}if(!1===e&&Array.isArray(_.labelSelectedEdit)){const e=_.labelSelectedEdit.findIndex((e=>e.labelId==t));-1!=e&&_.labelSelectedEdit.splice(e,1)}}}),(e,l)=>(n(),s("div",{class:"c-label-form-content",ref_key:"labelFormContent",ref:P},[r(W)?(n(),s("div",A,O)):d("v-if",!0),o(c("div",K,[c("div",j,[d(" 表单内嵌打开标签组件的样式 "),d(' <div v-if="explicit" class="explicit-continer">\r\n\t\t\t\t\t<n-tabs :value="state.labelAnchorKey" type="card" @change="labelAnchorTabsOnChange" tab-position="top">\r\n\t\t\t\t\t\t<template v-for="(v, i) in state.labelConfig">\r\n\t\t\t\t\t\t\t<n-tab-pane :name="v.curKey">\r\n\t\t\t\t\t\t\t\t<span slot="tab">\r\n\t\t\t\t\t\t\t\t\t{{ i }}\r\n\t\t\t\t\t\t\t\t\t<span class="edit-label-type">({{ v.multipleChoice == 2 ? \'单\' : \'多\' }}选)</span>\r\n\t\t\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t\t\t<div class="explicit-label-wrap left-label-wrap">\r\n\t\t\t\t\t\t\t\t\t<div class="edit-label-content">\r\n\t\t\t\t\t\t\t\t\t\t<labelClassify\r\n\t\t\t\t\t\t\t\t\t\t\t:classifyItem="v"\r\n\t\t\t\t\t\t\t\t\t\t\t:handleLabelChange="handleLabelChange"\r\n\t\t\t\t\t\t\t\t\t\t\t:handleLabelColor="handleLabelColor"\r\n\t\t\t\t\t\t\t\t\t\t\t:handleDelLabel="handleDelLabel"\r\n\t\t\t\t\t\t\t\t\t\t\t:hanldeBlur="hanldeBlur"\r\n\t\t\t\t\t\t\t\t\t\t\t:handleAddLabel="handleAddLabel"\r\n\t\t\t\t\t\t\t\t\t\t\t:clearaddVal="clearaddVal"\r\n\t\t\t\t\t\t\t\t\t\t\t:isEdit="isEdit"\r\n\t\t\t\t\t\t\t\t\t\t\t:sourceType="sourceType"\r\n\t\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</n-tab-pane>\r\n\t\t\t\t\t\t</template>\r\n\t\t\t\t\t</n-tabs>\r\n\t\t\t\t</div> '),d("\r\n\t\t\t\t\t普通标签样式\r\n\t\t\t\t\tv-else\r\n\t\t\t\t\texplicit\r\n\t\t\t\t "),c("div",{class:b(["left-label-wrap",{"total-left-label-wrap":t.isChangeWindow}])},[u(r(I),{"offset-target":et,type:"block",onClick:Z,onChange:tt},{default:p((()=>[(n(!0),s(f,null,h(_.labelConfig,((t,e)=>(n(),y(r(S),{href:`#${t.curKey}`,title:String(e)},null,8,["href","title"])))),256))])),_:1})],2),d(' v-if="!explicit" '),c("div",{class:b(["right-label-wrap",{"total-right-label-wrap":t.isChangeWindow}])},[(n(!0),s(f,null,h(_.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",T,"("+m(2==e.multipleChoice?"单":"多")+"选)",1)],8,k),u(E,{classifyItem:e,handleLabelChange:U,handleLabelColor:r(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,!r(W)]])],512))}});export{B as default};
|
@@ -219,7 +219,7 @@ declare const ShortcutSetter: SFCWithInstall<import("vue").DefineComponent<{
|
|
219
219
|
wrapperStyle?: Record<string, string> | undefined;
|
220
220
|
childFieldStrategy?: "checked" | "all" | undefined;
|
221
221
|
childWidthMode?: "inner" | "outer" | undefined;
|
222
|
-
validator?: ((value: unknown, fieldItem: import("..").FieldItem) => string | void) | undefined;
|
222
|
+
validator?: ((value: unknown, fieldItem: import("..").FieldItem, field: import("@formily/core").Field<any, any, any, any>) => string | void) | undefined;
|
223
223
|
reactions?: {
|
224
224
|
[x: string]: any;
|
225
225
|
dependencies?: string[] | undefined;
|
@@ -222,7 +222,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
222
222
|
wrapperStyle?: Record<string, string> | undefined;
|
223
223
|
childFieldStrategy?: "checked" | "all" | undefined;
|
224
224
|
childWidthMode?: "inner" | "outer" | undefined;
|
225
|
-
validator?: ((value: unknown, fieldItem: FieldItem) => string | void) | undefined;
|
225
|
+
validator?: ((value: unknown, fieldItem: FieldItem, field: import("@formily/core").Field<any, any, any, any>) => string | void) | undefined;
|
226
226
|
reactions?: {
|
227
227
|
[x: string]: any;
|
228
228
|
dependencies?: string[] | undefined;
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,ref as l,inject as t,computed as a,watch as i,openBlock as o,createBlock as n,unref as s,normalizeClass as d,withCtx as r,createVNode as u,normalizeStyle as c,createElementVNode as m,createTextVNode as h,renderSlot as p,isRef as f,toDisplayString as v,h as g}from"vue";import{useMessage as b,NModal as x,NCard as w,NButton as L,NCheckbox as y,NSelect as F,NCheckboxGroup as k,NPopover as I,NPopconfirm as A,NIcon as N}from"naive-ui";import{Trash as C}from"@vicons/ionicons5";import{InjectionExportApiConfig as _}from"../constants/index.js";import P from"../../../../shared/components/VueDraggable/src/vuedraggable.js";import S from"../hooks/useAsyncData.js";import{dragFieldCheckList as z}from"../tool.js";import{cloneDeep as E}from"lodash-es";const j={class:"svg-wrap"},H={class:"flex_right"},O=m("div",{class:"tip"},"提示:支持拖动调整字段顺序,字段导出顺序为从左到右,从上到下。",-1),$={class:"flex_between"},T=["title"];var U=e({__name:"ExportModal",props:{visible:{type:Boolean,default:!1},tableListId:{type:String,default:""},curProgram:{type:Object,default:()=>({})},programOptions:{type:Array,default:()=>[]},downLoadFieldList:{type:Array,default:()=>[]},showAllFieldList:{type:Array,default:()=>[]}},emits:["cancelModal","updateCurProgram","updateFieldCheckList","updateShowAllFieldList"],setup(e,{emit:U}){const K=e,M="default",D="860px",B="496px",V={class:"select-export-popover"},q=b(),{deleteTableListExportScheme:G,exportTableListScheme:J}=S(),Q=l(!1),R=l(D),W=l({maxHeight:B,height:B}),X=l(!1),Y=l(!0),Z=l([]),ee=t(_),le=a((()=>K.curProgram.schemeId));function te(){U("updateShowAllFieldList",K.showAllFieldList)}function ae({option:e}){return g("span",e.schemeName)}function ie(e){const l=[g(I,{trigger:"hover",duration:0},{default:()=>e.schemeName,trigger:()=>g("span",{class:"content"},e.schemeName)})],t=[g(A,{placement:"top-start",positiveText:"确认",negativeText:"取消",onPositiveClick:()=>function(e){const{schemeId:l}=K.curProgram;if(l===e.schemeId)return q.warning("当前正在使用该方案,请先切换其他方案再删除");!async function(e){if(!K.tableListId)return q.warning("请传入列表id");try{await G({id:K.tableListId,schemeId:e},ee)&&q.success("删除成功")}catch(e){q.error(`获取导出方案数据请求失败:${e}`)}}(e.schemeId)}(e)},{trigger:()=>g(N,{onclick:oe},{default:()=>g(C)}),default:()=>"确定删除该导出方案吗?"})],a=e.schemeId===M?[l]:[l,t];return g("div",{class:"flex-between"},a)}function oe(e){e.stopPropagation()}function ne(e){U("updateCurProgram",e)}function se(){!async function(){if(!K.tableListId)return q.warning("请传入列表id");if(Z.value.length<1)return q.warning("请至少勾选一个字段");try{const{schemeId:e}=K.curProgram,l=K.programOptions.find((l=>l.schemeId===e)),t={fieldKeys:z(K.showAllFieldList,Z.value),lastUsedSchemeName:l?l.schemeName:"",schemeId:l?l.schemeId:"",schemeName:l?l.schemeName:"",tableListId:K.tableListId};await J(t,ee)&&(q.success("导出成功"),re())}catch(e){q.error(`获取导出方案数据请求失败:${e}`)}}()}function de(e){var l,t,a;Y.value=!1,Z.value=e?(null==(l=K.showAllFieldList)?void 0:l.map((e=>e.columnName)))||[]:(null==(a=null==(t=K.showAllFieldList)?void 0:t.filter((e=>e.fixedExport)))?void 0:a.map((e=>e.columnName)))||[]}function re(){U("cancelModal"),R.value=D,W.value={height:B,maxHeight:B},Q.value=!1}function ue(){Q.value=!Q.value;let e=document.body.clientHeight;R.value===D?(R.value="100%",W.value.maxHeight=`${e}px`,W.value.height=`${e}px`):(R.value=D,W.value.maxHeight=B,W.value.height=B)}return i((()=>Z.value),(e=>{K.showAllFieldList.length>0&&(Y.value=e.length>0&&e.length<K.showAllFieldList.length,X.value=e.length===K.showAllFieldList.length,U("updateFieldCheckList",e))}),{immediate:!0}),i((()=>K.curProgram),(e=>{e&&function(e){const l=K.programOptions.find((l=>l.schemeId===e));if(l){let t=[];const a=K.downLoadFieldList.filter((e=>e.fixedExport)).map((e=>e.columnName)),i=l.fieldKeys.filter((e=>!a.includes(e)));if(Z.value=[...i,...a],e===M){const e=E(K.downLoadFieldList);return void U("updateShowAllFieldList",e)}Z.value.forEach((e=>{const l=K.downLoadFieldList.find((l=>l.columnName===e));l&&t.push(l)}));const o=K.downLoadFieldList.filter((e=>!Z.value.includes(e.columnName))),n=[...t,...o];U("updateShowAllFieldList",n)}}(e.schemeId)}),{immediate:!0}),(l,t)=>(o(),n(s(x),{class:d(["table-export-field-modal",{"modal-screen":Q.value}]),show:e.visible,maskClosable:!1,width:R.value,bodyStyle:W.value,closable:!1,centered:"",onPositiveClick:se,onNegativeClick:re},{default:r((()=>[u(s(w),{style:c({width:R.value,...W.value}),title:"选择导出字段",bordered:!1,size:"huge",role:"dialog","aria-modal":"true"},{"header-extra":r((()=>[m("div",j,[m("i",{onClick:ue,class:d(["iconfont-table-export-field",Q.value?"icon-table-export-field-menzhenyishengzhanxitongtubiaozuixiaohua2":"icon-table-export-field-menzhenyishengzhanxitongtubiaozuidahua"])},null,2),m("i",{onClick:re,class:"iconfont-table-export-field icon-table-export-field-menzhenyishengzhanxitongtubiaoguanbi"})])])),footer:r((()=>[m("div",H,[u(s(L),{onClick:re},{default:r((()=>[h("取消")])),_:1}),p(l.$slots,"add"),u(s(L),{type:"info",onClick:se},{default:r((()=>[h("导出")])),_:1})])])),default:r((()=>[O,m("header",$,[u(s(y),{checked:X.value,"onUpdate:checked":[t[0]||(t[0]=e=>X.value=e),de],indeterminate:Y.value},{default:r((()=>[h(" 全选 ")])),_:1},8,["checked","indeterminate"]),u(s(F),{style:{width:"200px"},value:s(le),"onUpdate:value":[t[1]||(t[1]=e=>f(le)?le.value=e:null),ne],filterable:"","label-field":"schemeName","value-field":"schemeId","show-checkmark":!1,"render-label":ie,"render-tag":ae,"menu-props":V,options:e.programOptions},null,8,["value","options"])]),u(s(k),{value:Z.value,"onUpdate:value":t[2]||(t[2]=e=>Z.value=e)},{default:r((()=>[u(s(P),{class:"draggable-checkbox-list",list:e.showAllFieldList,animation:"300",itemKey:"columnName",onEnd:te},{item:r((({element:e})=>{var l;return[u(s(y),{disabled:e.fixedExport,class:d(Z.value.includes(e.columnName)?"":"checkbox-disabled"),value:e.columnName,label:null!=(l=e.alias)?l:e.title},{default:r((()=>{var l,t;return[m("span",{title:null!=(l=e.alias)?l:e.title},v(null!=(t=e.alias)?t:e.title),9,T)]})),_:2},1032,["disabled","class","value","label"])]})),_:1},8,["list"])])),_:1},8,["value"])])),_:3},8,["style"])])),_:3},8,["class","show","width","bodyStyle"]))}});export{U as default};
|
1
|
+
import{defineComponent as e,ref as l,inject as t,computed as a,watch as i,openBlock as o,createBlock as n,unref as s,normalizeClass as d,withCtx as r,createVNode as u,normalizeStyle as c,createElementVNode as m,createTextVNode as h,renderSlot as p,isRef as f,toDisplayString as v,h as g}from"vue";import{useMessage as b,NModal as x,NCard as w,NButton as L,NCheckbox as y,NSelect as F,NCheckboxGroup as k,NPopover as I,NPopconfirm as A,NIcon as N}from"naive-ui";import{Trash as C}from"@vicons/ionicons5";import{InjectionExportApiConfig as _}from"../constants/index.js";import P from"../../../../shared/components/VueDraggable/src/vuedraggable.js";import S from"../hooks/useAsyncData.js";import{dragFieldCheckList as z}from"../tool.js";import{cloneDeep as E}from"lodash-es";const j={class:"svg-wrap"},H={class:"flex_right"},O=m("div",{class:"tip"},"提示:支持拖动调整字段顺序,字段导出顺序为从左到右,从上到下。",-1),$={class:"flex_between"},T=["title"];var U=e({__name:"ExportModal",props:{visible:{type:Boolean,default:!1},tableListId:{type:String,default:""},curProgram:{type:Object,default:()=>({})},programOptions:{type:Array,default:()=>[]},downLoadFieldList:{type:Array,default:()=>[]},showAllFieldList:{type:Array,default:()=>[]}},emits:["cancelModal","updateCurProgram","updateFieldCheckList","updateShowAllFieldList"],setup(e,{emit:U}){const K=e,M="default",D="860px",B="496px",V={class:"select-export-popover"},q=b(),{deleteTableListExportScheme:G,exportTableListScheme:J}=S(),Q=l(!1),R=l(D),W=l({maxHeight:B,height:B}),X=l(!1),Y=l(!0),Z=l([]),ee=t(_),le=a((()=>K.curProgram.schemeId));function te(){U("updateShowAllFieldList",K.showAllFieldList)}function ae({option:e}){return g("span",e.schemeName)}function ie(e){const l=[g(I,{trigger:"hover",duration:0},{default:()=>e.schemeName,trigger:()=>g("span",{class:"content"},e.schemeName)})],t=[g(A,{placement:"top-start",positiveText:"确认",negativeText:"取消",onPositiveClick:()=>function(e){const{schemeId:l}=K.curProgram;if(l===e.schemeId)return q.warning("当前正在使用该方案,请先切换其他方案再删除");!async function(e){if(!K.tableListId)return q.warning("请传入列表id");try{await G({id:K.tableListId,schemeId:e},ee)&&q.success("删除成功")}catch(e){q.error(`获取导出方案数据请求失败:${e}`)}}(e.schemeId)}(e)},{trigger:()=>g(N,{onclick:oe},{default:()=>g(C)}),default:()=>"确定删除该导出方案吗?"})],a=e.schemeId===M?[l]:[l,t];return g("div",{class:"flex-between"},a)}function oe(e){e.stopPropagation()}function ne(e){U("updateCurProgram",e)}function se(){!async function(){if(!K.tableListId)return q.warning("请传入列表id");if(Z.value.length<1)return q.warning("请至少勾选一个字段");try{const{schemeId:e}=K.curProgram,l=K.programOptions.find((l=>l.schemeId===e)),t={fieldKeys:z(K.showAllFieldList,Z.value),lastUsedSchemeName:l?l.schemeName:"",schemeId:l?l.schemeId:"",schemeName:l?l.schemeName:"",tableListId:K.tableListId};await J(t,ee)&&(q.success("导出成功"),re())}catch(e){q.error(`获取导出方案数据请求失败:${e}`)}}()}function de(e){var l,t,a;Y.value=!1,Z.value=e?(null==(l=K.showAllFieldList)?void 0:l.map((e=>e.columnName)))||[]:(null==(a=null==(t=K.showAllFieldList)?void 0:t.filter((e=>e.fixedExport)))?void 0:a.map((e=>e.columnName)))||[]}function re(){U("cancelModal"),R.value=D,W.value={height:B,maxHeight:B},Q.value=!1}function ue(){Q.value=!Q.value;let e=document.body.clientHeight;R.value===D?(R.value="100%",W.value.maxHeight=`${e}px`,W.value.height=`${e}px`):(R.value=D,W.value.maxHeight=B,W.value.height=B)}return i((()=>Z.value),(e=>{K.showAllFieldList.length>0&&(Y.value=e.length>0&&e.length<K.showAllFieldList.length,X.value=e.length===K.showAllFieldList.length,U("updateFieldCheckList",e))}),{immediate:!0}),i((()=>K.curProgram),(e=>{e&&function(e){const l=K.programOptions.find((l=>l.schemeId===e));if(l){let t=[];const a=K.downLoadFieldList.filter((e=>e.fixedExport)).map((e=>e.columnName)),i=l.fieldKeys.filter((e=>!a.includes(e)));if(Z.value=[...i,...a],e===M){const e=E(K.downLoadFieldList);return void U("updateShowAllFieldList",e)}Z.value.forEach((e=>{const l=K.downLoadFieldList.find((l=>l.columnName===e));l&&t.push(l)}));const o=K.downLoadFieldList.filter((e=>!Z.value.includes(e.columnName))),n=[...t,...o];U("updateShowAllFieldList",n)}}(e.schemeId)}),{immediate:!0}),(l,t)=>(o(),n(s(x),{class:d(["table-export-field-modal",{"modal-screen":Q.value}]),show:e.visible,maskClosable:!1,width:R.value,bodyStyle:W.value,closable:!1,to:"body",centered:"",onPositiveClick:se,onNegativeClick:re},{default:r((()=>[u(s(w),{style:c({width:R.value,...W.value}),title:"选择导出字段",bordered:!1,size:"huge",role:"dialog","aria-modal":"true"},{"header-extra":r((()=>[m("div",j,[m("i",{onClick:ue,class:d(["iconfont-table-export-field",Q.value?"icon-table-export-field-menzhenyishengzhanxitongtubiaozuixiaohua2":"icon-table-export-field-menzhenyishengzhanxitongtubiaozuidahua"])},null,2),m("i",{onClick:re,class:"iconfont-table-export-field icon-table-export-field-menzhenyishengzhanxitongtubiaoguanbi"})])])),footer:r((()=>[m("div",H,[u(s(L),{onClick:re},{default:r((()=>[h("取消")])),_:1}),p(l.$slots,"add"),u(s(L),{type:"info",onClick:se},{default:r((()=>[h("导出")])),_:1})])])),default:r((()=>[O,m("header",$,[u(s(y),{checked:X.value,"onUpdate:checked":[t[0]||(t[0]=e=>X.value=e),de],indeterminate:Y.value},{default:r((()=>[h(" 全选 ")])),_:1},8,["checked","indeterminate"]),u(s(F),{style:{width:"200px"},value:s(le),"onUpdate:value":[t[1]||(t[1]=e=>f(le)?le.value=e:null),ne],filterable:"","label-field":"schemeName","value-field":"schemeId","show-checkmark":!1,"render-label":ie,"render-tag":ae,"menu-props":V,options:e.programOptions},null,8,["value","options"])]),u(s(k),{value:Z.value,"onUpdate:value":t[2]||(t[2]=e=>Z.value=e)},{default:r((()=>[u(s(P),{class:"draggable-checkbox-list",list:e.showAllFieldList,animation:"300",itemKey:"columnName",onEnd:te},{item:r((({element:e})=>{var l;return[u(s(y),{disabled:e.fixedExport,class:d(Z.value.includes(e.columnName)?"":"checkbox-disabled"),value:e.columnName,label:null!=(l=e.alias)?l:e.title},{default:r((()=>{var l,t;return[m("span",{title:null!=(l=e.alias)?l:e.title},v(null!=(t=e.alias)?t:e.title),9,T)]})),_:2},1032,["disabled","class","value","label"])]})),_:1},8,["list"])])),_:1},8,["value"])])),_:3},8,["style"])])),_:3},8,["class","show","width","bodyStyle"]))}});export{U as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,ref as a,reactive as t,inject as l,watch as o,openBlock as r,createBlock as i,unref as s,withCtx as c,createVNode as u,createElementVNode as m,createTextVNode as d,createElementBlock as n,Fragment as p,renderList as v,toDisplayString as f}from"vue";import{useMessage as h,NModal as j,NCard as g,NIcon as b,NButton as
|
1
|
+
import{defineComponent as e,ref as a,reactive as t,inject as l,watch as o,openBlock as r,createBlock as i,unref as s,withCtx as c,createVNode as u,createElementVNode as m,createTextVNode as d,createElementBlock as n,Fragment as p,renderList as v,toDisplayString as f}from"vue";import{useMessage as h,NModal as j,NCard as g,NIcon as b,NButton as y,NRadioGroup as N,NRadio as P,NForm as _,NFormItem as x,NInput as k}from"naive-ui";import{CloseOutline as w}from"@vicons/ionicons5";import{InjectionExportApiConfig as I}from"../constants/index.js";import S from"../hooks/useAsyncData.js";import{dragFieldCheckList as C}from"../tool.js";import{cloneDeep as L}from"lodash-es";const A={class:"svg-wrap"},M={class:"flex_right"},O={class:"save-project-content"};var U=e({__name:"SaveProjectModal",props:{visible:{type:Boolean,default:!1},tableListId:{type:String,default:""},programOptions:{type:Array,default:()=>[]},curProgram:{type:Object,default:()=>({})},showAllFieldList:{type:Array,default:()=>[]}},emits:["cancelSaveModal"],setup(e,{emit:U}){const z=e,F=h(),{saveTableListExportScheme:K}=S(),q={projectName:{required:!0,message:"请输入方案名称",trigger:["input","blur"]}},B=[{value:"updateProject",label:"更新方案"},{value:"addProject",label:"新增方案"}],D=a(null),E=t({projectName:""}),R=a(),T=a([]),$=l(I);function G(e){R.value=e}function H(){var e;null==(e=D.value)||e.validate((async e=>{if(e)return;if(function(){const e=E.projectName.trim();let a=[];if("addProject"===R.value&&(a=z.programOptions.map((e=>e.schemeName))),"updateProject"===R.value){const{schemeName:e}=z.curProgram;a=z.programOptions.filter((a=>a.schemeName!==e)).map((e=>e.schemeName))}return!!a.includes(e)&&(F.warning(`已存在${e}的方案名称`),!0)}())return;const a=function(){const e=E.projectName.trim(),{fieldKeys:a,schemeId:t}=z.curProgram;let l={fieldKeys:C(z.showAllFieldList,a),lastUsedSchemeName:e,schemeId:"",schemeName:e,tableListId:z.tableListId};return"updateProject"===R.value&&(l.schemeId=t),l}();await K(a,$)&&(F.success("保存并导出成功"),U("cancelSaveModal"))}))}function J(){U("cancelSaveModal")}return o((()=>z.curProgram),(async e=>{if("default"===e.schemeId)T.value=B.filter((e=>"addProject"===e.value)),R.value="addProject",E.projectName="";else T.value=L(B),R.value="updateProject",E.projectName=e.schemeName}),{immediate:!0,deep:!0}),(a,t)=>(r(),i(s(j),{class:"table-export-field-modal",to:"body",show:e.visible,maskClosable:!1,"positive-text":"确认","negative-text":"取消",onPositiveClick:H,onNegativeClick:J},{default:c((()=>[u(s(g),{title:"导出并存为方案",style:{width:"520px"},bordered:!1,size:"huge",role:"dialog","aria-modal":"true"},{"header-extra":c((()=>[m("div",A,[u(s(b),{component:s(w),size:"24",onClick:J},null,8,["component"])])])),footer:c((()=>[m("div",M,[u(s(y),{onClick:J},{default:c((()=>[d("取消")])),_:1}),u(s(y),{type:"info",onClick:H},{default:c((()=>[d("确认")])),_:1})])])),default:c((()=>[m("div",O,[u(s(N),{value:R.value,"onUpdate:value":[t[0]||(t[0]=e=>R.value=e),G],name:"radiogroup"},{default:c((()=>[(r(!0),n(p,null,v(T.value,(e=>(r(),i(s(P),{key:e.value,value:e.value},{default:c((()=>[d(f(e.label),1)])),_:2},1032,["value"])))),128))])),_:1},8,["value"]),u(s(_),{ref_key:"formRef",ref:D,"label-placement":"left",rules:q,model:E},{default:c((()=>[u(s(x),{label:"方案名称",path:"projectName"},{default:c((()=>[u(s(k),{value:E.projectName,"onUpdate:value":t[1]||(t[1]=e=>E.projectName=e),placeholder:"请输入方案名称",clearable:"",maxlength:"100"},null,8,["value"])])),_:1})])),_:1},8,["model"])])])),_:1})])),_:1},8,["show"]))}});export{U as default};
|
@@ -84,6 +84,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
84
84
|
allowedInvalidValue: {
|
85
85
|
type: StringConstructor;
|
86
86
|
};
|
87
|
+
to: {
|
88
|
+
type: import("vue").PropType<string | false | HTMLElement>;
|
89
|
+
default: string;
|
90
|
+
};
|
87
91
|
}, {
|
88
92
|
attrs: {
|
89
93
|
[x: string]: unknown;
|
@@ -104,6 +108,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
104
108
|
allowedInvalidValue: {
|
105
109
|
type: StringConstructor;
|
106
110
|
};
|
111
|
+
to: {
|
112
|
+
type: import("vue").PropType<string | false | HTMLElement>;
|
113
|
+
default: string;
|
114
|
+
};
|
107
115
|
}>> & {
|
108
116
|
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
109
117
|
}>>;
|
@@ -140,10 +148,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
140
148
|
allowedInvalidValue: {
|
141
149
|
type: StringConstructor;
|
142
150
|
};
|
151
|
+
to: {
|
152
|
+
type: import("vue").PropType<string | false | HTMLElement>;
|
153
|
+
default: string;
|
154
|
+
};
|
143
155
|
}>> & {
|
144
156
|
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
145
157
|
}, {
|
146
158
|
updateUnchangedValue: boolean;
|
159
|
+
to: string | false | HTMLElement;
|
147
160
|
}>>;
|
148
161
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
149
162
|
componentCfg: {
|
@@ -47,6 +47,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
47
47
|
allowedInvalidValue: {
|
48
48
|
type: StringConstructor;
|
49
49
|
};
|
50
|
+
to: {
|
51
|
+
type: import("vue").PropType<string | false | HTMLElement>;
|
52
|
+
default: string;
|
53
|
+
};
|
50
54
|
}, {
|
51
55
|
attrs: {
|
52
56
|
[x: string]: unknown;
|
@@ -67,6 +71,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
67
71
|
allowedInvalidValue: {
|
68
72
|
type: StringConstructor;
|
69
73
|
};
|
74
|
+
to: {
|
75
|
+
type: import("vue").PropType<string | false | HTMLElement>;
|
76
|
+
default: string;
|
77
|
+
};
|
70
78
|
}>> & {
|
71
79
|
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
72
80
|
}>>;
|
@@ -103,10 +111,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
103
111
|
allowedInvalidValue: {
|
104
112
|
type: StringConstructor;
|
105
113
|
};
|
114
|
+
to: {
|
115
|
+
type: import("vue").PropType<string | false | HTMLElement>;
|
116
|
+
default: string;
|
117
|
+
};
|
106
118
|
}>> & {
|
107
119
|
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
108
120
|
}, {
|
109
121
|
updateUnchangedValue: boolean;
|
122
|
+
to: string | false | HTMLElement;
|
110
123
|
}>>;
|
111
124
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
112
125
|
componentCfg: {
|
@@ -47,6 +47,10 @@ declare const Date: import("vue").DefineComponent<{
|
|
47
47
|
allowedInvalidValue: {
|
48
48
|
type: StringConstructor;
|
49
49
|
};
|
50
|
+
to: {
|
51
|
+
type: import("vue").PropType<string | false | HTMLElement>;
|
52
|
+
default: string;
|
53
|
+
};
|
50
54
|
}, {
|
51
55
|
attrs: {
|
52
56
|
[x: string]: unknown;
|
@@ -67,6 +71,10 @@ declare const Date: import("vue").DefineComponent<{
|
|
67
71
|
allowedInvalidValue: {
|
68
72
|
type: StringConstructor;
|
69
73
|
};
|
74
|
+
to: {
|
75
|
+
type: import("vue").PropType<string | false | HTMLElement>;
|
76
|
+
default: string;
|
77
|
+
};
|
70
78
|
}>> & {
|
71
79
|
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
72
80
|
}>>;
|
@@ -103,10 +111,15 @@ declare const Date: import("vue").DefineComponent<{
|
|
103
111
|
allowedInvalidValue: {
|
104
112
|
type: StringConstructor;
|
105
113
|
};
|
114
|
+
to: {
|
115
|
+
type: import("vue").PropType<string | false | HTMLElement>;
|
116
|
+
default: string;
|
117
|
+
};
|
106
118
|
}>> & {
|
107
119
|
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
108
120
|
}, {
|
109
121
|
updateUnchangedValue: boolean;
|
122
|
+
to: string | false | HTMLElement;
|
110
123
|
}>>;
|
111
124
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
112
125
|
componentCfg: {
|
@@ -202,6 +202,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
202
202
|
allowedInvalidValue: {
|
203
203
|
type: StringConstructor;
|
204
204
|
};
|
205
|
+
to: {
|
206
|
+
type: PropType<string | false | HTMLElement>;
|
207
|
+
default: string;
|
208
|
+
};
|
205
209
|
}, {
|
206
210
|
attrs: {
|
207
211
|
[x: string]: unknown;
|
@@ -222,6 +226,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
222
226
|
allowedInvalidValue: {
|
223
227
|
type: StringConstructor;
|
224
228
|
};
|
229
|
+
to: {
|
230
|
+
type: PropType<string | false | HTMLElement>;
|
231
|
+
default: string;
|
232
|
+
};
|
225
233
|
}>> & {
|
226
234
|
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
227
235
|
}>>;
|
@@ -258,10 +266,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
258
266
|
allowedInvalidValue: {
|
259
267
|
type: StringConstructor;
|
260
268
|
};
|
269
|
+
to: {
|
270
|
+
type: PropType<string | false | HTMLElement>;
|
271
|
+
default: string;
|
272
|
+
};
|
261
273
|
}>> & {
|
262
274
|
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
263
275
|
}, {
|
264
276
|
updateUnchangedValue: boolean;
|
277
|
+
to: string | false | HTMLElement;
|
265
278
|
}>>;
|
266
279
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
267
280
|
componentCfg: {
|
@@ -111,6 +111,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
111
111
|
allowedInvalidValue: {
|
112
112
|
type: StringConstructor;
|
113
113
|
};
|
114
|
+
to: {
|
115
|
+
type: import("vue").PropType<string | false | HTMLElement>;
|
116
|
+
default: string;
|
117
|
+
};
|
114
118
|
}, {
|
115
119
|
attrs: {
|
116
120
|
[x: string]: unknown;
|
@@ -131,6 +135,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
131
135
|
allowedInvalidValue: {
|
132
136
|
type: StringConstructor;
|
133
137
|
};
|
138
|
+
to: {
|
139
|
+
type: import("vue").PropType<string | false | HTMLElement>;
|
140
|
+
default: string;
|
141
|
+
};
|
134
142
|
}>> & {
|
135
143
|
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
136
144
|
}>>;
|
@@ -167,10 +175,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
167
175
|
allowedInvalidValue: {
|
168
176
|
type: StringConstructor;
|
169
177
|
};
|
178
|
+
to: {
|
179
|
+
type: import("vue").PropType<string | false | HTMLElement>;
|
180
|
+
default: string;
|
181
|
+
};
|
170
182
|
}>> & {
|
171
183
|
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
172
184
|
}, {
|
173
185
|
updateUnchangedValue: boolean;
|
186
|
+
to: string | false | HTMLElement;
|
174
187
|
}>>;
|
175
188
|
NSelect: any;
|
176
189
|
WidgetValEnums: {
|
@@ -744,6 +757,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
744
757
|
allowedInvalidValue: {
|
745
758
|
type: StringConstructor;
|
746
759
|
};
|
760
|
+
to: {
|
761
|
+
type: import("vue").PropType<string | false | HTMLElement>;
|
762
|
+
default: string;
|
763
|
+
};
|
747
764
|
}, {
|
748
765
|
attrs: {
|
749
766
|
[x: string]: unknown;
|
@@ -764,6 +781,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
764
781
|
allowedInvalidValue: {
|
765
782
|
type: StringConstructor;
|
766
783
|
};
|
784
|
+
to: {
|
785
|
+
type: import("vue").PropType<string | false | HTMLElement>;
|
786
|
+
default: string;
|
787
|
+
};
|
767
788
|
}>> & {
|
768
789
|
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
769
790
|
}>>;
|
@@ -800,10 +821,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
800
821
|
allowedInvalidValue: {
|
801
822
|
type: StringConstructor;
|
802
823
|
};
|
824
|
+
to: {
|
825
|
+
type: import("vue").PropType<string | false | HTMLElement>;
|
826
|
+
default: string;
|
827
|
+
};
|
803
828
|
}>> & {
|
804
829
|
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
805
830
|
}, {
|
806
831
|
updateUnchangedValue: boolean;
|
832
|
+
to: string | false | HTMLElement;
|
807
833
|
}>>;
|
808
834
|
WidgetValEnums: {
|
809
835
|
CUSTOM: string;
|
@@ -68,6 +68,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
68
68
|
allowedInvalidValue: {
|
69
69
|
type: StringConstructor;
|
70
70
|
};
|
71
|
+
to: {
|
72
|
+
type: import("vue").PropType<string | false | HTMLElement>;
|
73
|
+
default: string;
|
74
|
+
};
|
71
75
|
}, {
|
72
76
|
attrs: {
|
73
77
|
[x: string]: unknown;
|
@@ -88,6 +92,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
88
92
|
allowedInvalidValue: {
|
89
93
|
type: StringConstructor;
|
90
94
|
};
|
95
|
+
to: {
|
96
|
+
type: import("vue").PropType<string | false | HTMLElement>;
|
97
|
+
default: string;
|
98
|
+
};
|
91
99
|
}>> & {
|
92
100
|
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
93
101
|
}>>;
|
@@ -124,10 +132,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
124
132
|
allowedInvalidValue: {
|
125
133
|
type: StringConstructor;
|
126
134
|
};
|
135
|
+
to: {
|
136
|
+
type: import("vue").PropType<string | false | HTMLElement>;
|
137
|
+
default: string;
|
138
|
+
};
|
127
139
|
}>> & {
|
128
140
|
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
129
141
|
}, {
|
130
142
|
updateUnchangedValue: boolean;
|
143
|
+
to: string | false | HTMLElement;
|
131
144
|
}>>;
|
132
145
|
NSelect: any;
|
133
146
|
WidgetValEnums: {
|
package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue.d.ts
CHANGED
@@ -82,6 +82,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
82
82
|
allowedInvalidValue: {
|
83
83
|
type: StringConstructor;
|
84
84
|
};
|
85
|
+
to: {
|
86
|
+
type: PropType<string | false | HTMLElement>;
|
87
|
+
default: string;
|
88
|
+
};
|
85
89
|
}, {
|
86
90
|
attrs: {
|
87
91
|
[x: string]: unknown;
|
@@ -102,6 +106,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
102
106
|
allowedInvalidValue: {
|
103
107
|
type: StringConstructor;
|
104
108
|
};
|
109
|
+
to: {
|
110
|
+
type: PropType<string | false | HTMLElement>;
|
111
|
+
default: string;
|
112
|
+
};
|
105
113
|
}>> & {
|
106
114
|
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
107
115
|
}>>;
|
@@ -138,10 +146,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
138
146
|
allowedInvalidValue: {
|
139
147
|
type: StringConstructor;
|
140
148
|
};
|
149
|
+
to: {
|
150
|
+
type: PropType<string | false | HTMLElement>;
|
151
|
+
default: string;
|
152
|
+
};
|
141
153
|
}>> & {
|
142
154
|
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
143
155
|
}, {
|
144
156
|
updateUnchangedValue: boolean;
|
157
|
+
to: string | false | HTMLElement;
|
145
158
|
}>>;
|
146
159
|
WidgetValEnums: {
|
147
160
|
CUSTOM: string;
|
package/es/components/table-filter/src/components/classify-filter/components/SelectDynamic.vue2.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,ref as a,inject as l,computed as t,openBlock as n,createBlock as u,unref as o,isRef as i,withModifiers as r,withCtx as s,createVNode as c,h as d}from"vue";import{useMessage as v,NSelect as p,NTag as m}from"naive-ui";import{WidgetOptionEnums as f,WidgetValEnums as y}from"../../../types/enums.js";import{useDebounceFn as g}from"@vueuse/core";import h from"../../../hooks/useAsyncData.js";import{InjectionFilterApiConfig as V,InjectionClassifyFilterList as
|
1
|
+
import{defineComponent as e,ref as a,inject as l,computed as t,openBlock as n,createBlock as u,unref as o,isRef as i,withModifiers as r,withCtx as s,createVNode as c,h as d}from"vue";import{useMessage as v,NSelect as p,NTag as m}from"naive-ui";import{WidgetOptionEnums as f,WidgetValEnums as y}from"../../../types/enums.js";import{useDebounceFn as g}from"@vueuse/core";import h from"../../../hooks/useAsyncData.js";import{InjectionFilterApiConfig as V,InjectionClassifyFilterList as b}from"../../../constants/index.js";import{judgmentVariable as w}from"../../render-widget/helpers/setDefaultValue.js";import O from"../../render-widget/components/SelectDynamicOption/index.vue.js";import{isEqual as S}from"lodash-es";var k=e({__name:"SelectDynamic",props:{paramCfg:{type:Object,default:null},modelValue:{type:[Array,String,Number],default:null}},emits:["update:modelValue"],setup(e,{emit:k}){const L=e,P=v(),{getDynamicSelectData:j}=h(),C=a(!1),A=l(V),x=l(b),D=a(0),I={class:"select-dynamic-popover"},K=a(1),T=a(),E=a([]),U=a(),_=t((()=>{var e;return null==(e=L.paramCfg)?void 0:e.optionSetting})),M=t((()=>_.value===f.MULTIPLE)),N=t((()=>{const{dynamicOptionInfo:e={}}=L.paramCfg.optionInfo;return e})),$=t((()=>D.value>0&&K.value>=D.value)),F=t((()=>{var e;if(Array.isArray(L.modelValue)&&L.modelValue.length>0){const e=L.modelValue;if(H(e),!M.value&&1==e.length){const a=E.value.find((a=>a.value===e[0]));return JSON.stringify(a)}return E.value.filter((a=>e.includes(a.value)))}return H([]),null!=(e=L.modelValue)?e:null})),J=t((()=>{if(Object.keys(N.value).length>0){const{defaultParams:e=[]}=N.value;return!w(e)}return!0}));function H(e){E.value.forEach((a=>{a.actived=!1,Array.isArray(e)&&e.includes(a.value)&&(a.actived=!0)}))}function W(e){var a;const{defaultValue:l}=L.paramCfg._rawData;(null==(a=null==l?void 0:l.linkageFieldKeys)?void 0:a.length)>0&&l.linkageFieldKeys.forEach((e=>{const a=x.value.find((a=>a.key===e));a&&a.value&&(a.value=a.presetVal=null)})),S(L.modelValue,e)||k("update:modelValue",e)}async function q(e){K.value=e,await z(U.value,K.value)}async function z(e,a){try{if(Object.keys(N.value).length>0){const{autograph:l,dataSourceId:t,dataSourceType:n,filterKeys:u,defaultParams:o=[],showKeys:i,valueKey:r}=N.value;let s={wordbookId:t,autograph:l,wordbookType:n,fieldKeys:u,page:a};u.length>0&&(s[u[0]]=e),C.value=!0;if(w(o)){const e=o.map((e=>e.value)).filter((e=>e.includes("${")));e.map((e=>e.match(/\$\{(.+?)\}/)[1])).forEach((e=>{const a=x.value.find((a=>a.key===e));a&&a.value&&a.value!==y.WHOLE&&(s[e]=a.value)}))}let c=await j(s,A);if(c){const{fieldList:e=[],rows:a=[],total:l=0}=c.map,t=a.map((e=>({...e,label:e[i[0]],value:e[r]})));return T.value=null!=e?e:[],E.value=null!=t?t:[],D.value=l,t}}}catch(e){P.error(`异步数据源下拉框数据请求失败:${e}`),console.log(e)}finally{C.value=!1}}const B=g((async e=>{await async function(e){U.value=e.trim(),K.value=1,await z(U.value,K.value)}(e)}),300);async function G(){Object.keys(N.value).length>0&&A&&await z("",K.value)}async function Q(){k("update:modelValue",null),await G()}function R(e){e&&G()}function X({option:e,handleClose:a}){if(M.value){const l=e.value;return d(m,{style:{padding:"0 8px"},closable:!0,onClose:e=>{if(e.stopPropagation(),a(),Array.isArray(L.modelValue)&&L.modelValue.length>0){const e=L.modelValue,a=e.indexOf(l.value);if(a>-1){const l=e.splice(0,a);k("update:modelValue",l.length>0?l:null)}}}},{default:()=>d("div",l.label)})}const l=e.value?JSON.parse(e.value):{label:""};return d("div",l.label)}return J.value&&G(),(e,a)=>(n(),u(o(p),{id:"select-dynamic-popover",style:{width:"200px"},value:o(F),"onUpdate:value":a[0]||(a[0]=e=>i(F)?F.value=e:null),remote:"",clearable:"",filterable:"",to:"body",maxTagCount:"responsive",loading:C.value,multiple:o(M),menuProps:I,"render-tag":X,onSearch:o(B),onClear:Q,"onUpdate:show":R,onClick:a[1]||(a[1]=r((()=>{}),["stop"]))},{empty:s((()=>[c(O,{dynamicOptionInfo:o(N),fieldTitleList:T.value,optionList:E.value,isMultiple:o(M),curPage:K.value,isLastPage:o($),onUpdateSelect:W,onUpdatePage:q},null,8,["dynamicOptionInfo","fieldTitleList","optionList","isMultiple","curPage","isLastPage"])])),_:1},8,["value","loading","multiple","onSearch"]))}});export{k as default};
|
@@ -68,6 +68,10 @@ declare const Date: import("vue").DefineComponent<{
|
|
68
68
|
allowedInvalidValue: {
|
69
69
|
type: StringConstructor;
|
70
70
|
};
|
71
|
+
to: {
|
72
|
+
type: import("vue").PropType<string | false | HTMLElement>;
|
73
|
+
default: string;
|
74
|
+
};
|
71
75
|
}, {
|
72
76
|
attrs: {
|
73
77
|
[x: string]: unknown;
|
@@ -88,6 +92,10 @@ declare const Date: import("vue").DefineComponent<{
|
|
88
92
|
allowedInvalidValue: {
|
89
93
|
type: StringConstructor;
|
90
94
|
};
|
95
|
+
to: {
|
96
|
+
type: import("vue").PropType<string | false | HTMLElement>;
|
97
|
+
default: string;
|
98
|
+
};
|
91
99
|
}>> & {
|
92
100
|
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
93
101
|
}>>;
|
@@ -124,10 +132,15 @@ declare const Date: import("vue").DefineComponent<{
|
|
124
132
|
allowedInvalidValue: {
|
125
133
|
type: StringConstructor;
|
126
134
|
};
|
135
|
+
to: {
|
136
|
+
type: import("vue").PropType<string | false | HTMLElement>;
|
137
|
+
default: string;
|
138
|
+
};
|
127
139
|
}>> & {
|
128
140
|
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
129
141
|
}, {
|
130
142
|
updateUnchangedValue: boolean;
|
143
|
+
to: string | false | HTMLElement;
|
131
144
|
}>>;
|
132
145
|
NSelect: any;
|
133
146
|
WidgetValEnums: {
|
@@ -701,6 +714,10 @@ declare const DateRange: import("vue").DefineComponent<{
|
|
701
714
|
allowedInvalidValue: {
|
702
715
|
type: StringConstructor;
|
703
716
|
};
|
717
|
+
to: {
|
718
|
+
type: import("vue").PropType<string | false | HTMLElement>;
|
719
|
+
default: string;
|
720
|
+
};
|
704
721
|
}, {
|
705
722
|
attrs: {
|
706
723
|
[x: string]: unknown;
|
@@ -721,6 +738,10 @@ declare const DateRange: import("vue").DefineComponent<{
|
|
721
738
|
allowedInvalidValue: {
|
722
739
|
type: StringConstructor;
|
723
740
|
};
|
741
|
+
to: {
|
742
|
+
type: import("vue").PropType<string | false | HTMLElement>;
|
743
|
+
default: string;
|
744
|
+
};
|
724
745
|
}>> & {
|
725
746
|
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
726
747
|
}>>;
|
@@ -757,10 +778,15 @@ declare const DateRange: import("vue").DefineComponent<{
|
|
757
778
|
allowedInvalidValue: {
|
758
779
|
type: StringConstructor;
|
759
780
|
};
|
781
|
+
to: {
|
782
|
+
type: import("vue").PropType<string | false | HTMLElement>;
|
783
|
+
default: string;
|
784
|
+
};
|
760
785
|
}>> & {
|
761
786
|
"onUpdate:formatted-value"?: ((...args: any[]) => any) | undefined;
|
762
787
|
}, {
|
763
788
|
updateUnchangedValue: boolean;
|
789
|
+
to: string | false | HTMLElement;
|
764
790
|
}>>;
|
765
791
|
WidgetValEnums: {
|
766
792
|
CUSTOM: string;
|