@huilian/components-tms 3.5.3 → 3.6.1

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/lib/bundle.esm.js CHANGED
@@ -2168,7 +2168,9 @@ getConfig:Function,ruleFn:Function},components:{Dp:__vue_component__$e},watch:{o
2168
2168
  var script$b={props:{column:Object,setFormParams:Function,getConfig:Function,config:{type:Object,default:()=>{return{rule:{type:'date'}};}},ops:Object// 请求参数
2169
2169
  },components:{Dp:__vue_component__$e},watch:{ops:function(newVal){const{key}=this.getConfig(this.column);const ops=newVal;if(ops[key]){this.value=moment(ops[key]);}else{this.value='';}}},data(){return{trans,visible:false,value:''};},methods:{submit(){const{rule,key}=this.getConfig(this.column);const{format}=rule;if(this.value){const str=`${moment(this.value).format(format)}`;this.setFormParams({[key]:str});this.visible=false;}},reset(){this.value='';}}};/* script */const __vue_script__$b=script$b;/* template */var __vue_render__$b=function(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("span",[_c("el-popover",{attrs:{placement:"bottom",width:"400",trigger:"click","popper-class":"pointRecord"},model:{value:_vm.visible,callback:function($$v){_vm.visible=$$v;},expression:"visible"}},[_c("div",{attrs:{"data-name":_vm.column.columnPropertyName}},[_c("el-date-picker",{staticStyle:{"margin-bottom":"10px"},attrs:{type:_vm.config.rule.type,align:"right","unlink-panels":"","range-separator":_vm.trans("至"),"start-placeholder":_vm.trans("开始日期"),"end-placeholder":_vm.trans("结束日期")},model:{value:_vm.value,callback:function($$v){_vm.value=$$v;},expression:"value"}}),_vm._v(" "),_c("el-button",{attrs:{size:"mini"},on:{click:_vm.reset}},[_vm._v(_vm._s(_vm.trans("重置")))]),_vm._v(" "),_c("el-button",{attrs:{type:"primary",size:"mini"},on:{click:_vm.submit}},[_vm._v(_vm._s(_vm.trans("确定")))])],1),_vm._v(" "),_c("dp",{attrs:{slot:"reference",value:_vm.value},slot:"reference"})],1)],1);};var __vue_staticRenderFns__$b=[];__vue_render__$b._withStripped=true;/* style */const __vue_inject_styles__$b=undefined;/* scoped */const __vue_scope_id__$b=undefined;/* module identifier */const __vue_module_identifier__$b=undefined;/* functional template */const __vue_is_functional_template__$b=false;/* style inject */ /* style inject SSR */ /* style inject shadow dom */const __vue_component__$b=/*#__PURE__*/normalizeComponent({render:__vue_render__$b,staticRenderFns:__vue_staticRenderFns__$b},__vue_inject_styles__$b,__vue_script__$b,__vue_scope_id__$b,__vue_is_functional_template__$b,__vue_module_identifier__$b,false,undefined,undefined,undefined);//
2170
2170
  var script$a={props:{column:Object,setFormParams:Function,config:Object,ops:Object,// 请求参数,
2171
- getConfig:Function},components:{Dp:__vue_component__$e},watch:{ops:function(newVal){const ops=newVal;const{key}=this.getConfig(this.column);const v1=ops[key[0]],v2=ops[key[1]],v3=ops[key[2]];if(v1&&v2){this.value=[moment(v1),moment(v2)];if(key[2]){if(v3==key[3]){this.isHaveValue=true;}else{this.isHaveValue=false;}}else{this.isHaveValue=true;}}else{this.value=[];this.isHaveValue=false;}}},data(){return{trans,visible:false,pickerOptions:{shortcuts:[{text:trans('最近一周'),onClick(picker){const end=new Date();const start=new Date();start.setTime(start.getTime()-3600*1000*24*7);picker.$emit('pick',[start,end]);}},{text:trans('最近一个月'),onClick(picker){const end=new Date();const start=new Date();start.setTime(start.getTime()-3600*1000*24*30);picker.$emit('pick',[start,end]);}},{text:trans('最近三个月'),onClick(picker){const end=new Date();const start=new Date();start.setTime(start.getTime()-3600*1000*24*90);picker.$emit('pick',[start,end]);}}]},value:[],isHaveValue:false};},methods:{updateVisible(){this.visible=!this.visible;},submit(){const{key,rule}=this.getConfig(this.column);const{format,isAuto0059=false}=rule;let f1=format,f2=format;if(isAuto0059){f1='YYYY-MM-DD 00:00:00';f2='YYYY-MM-DD 23:59:59';}if(this.value.length>1){const v1=moment(this.value[0]).format(f1);const v2=moment(this.value[1]).format(f2);console.log(key);if(key[2]&&key[3]){const v3=key[3];this.setFormParams({[key[0]]:v1,[key[1]]:v2,[key[2]]:v3});}else{this.setFormParams({[key[0]]:v1,[key[1]]:v2});}}this.visible=false;},reset(){this.value=[];}}};/* script */const __vue_script__$a=script$a;/* template */var __vue_render__$a=function(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("span",[_c("el-popover",{attrs:{placement:"bottom",width:"425",trigger:"manual","popper-class":"pointRecord"},model:{value:_vm.visible,callback:function($$v){_vm.visible=$$v;},expression:"visible"}},[_c("div",{attrs:{"data-name":_vm.column.columnPropertyName}},[_c("el-date-picker",{staticStyle:{"margin-bottom":"10px"},attrs:{type:"datetimerange",align:"right","unlink-panels":"","range-separator":_vm.trans("至"),"start-placeholder":_vm.trans("开始日期"),"end-placeholder":_vm.trans("结束日期"),"picker-options":_vm.pickerOptions},model:{value:_vm.value,callback:function($$v){_vm.value=$$v;},expression:"value"}}),_vm._v(" "),_c("el-button",{attrs:{size:"mini"},on:{click:_vm.reset}},[_vm._v(_vm._s(_vm.trans("重置")))]),_vm._v(" "),_c("el-button",{attrs:{type:"primary",size:"mini"},on:{click:_vm.submit}},[_vm._v(_vm._s(_vm.trans("确定")))])],1),_vm._v(" "),_c("dp",{attrs:{slot:"reference",value:_vm.isHaveValue,visible:_vm.visible},on:{"update-visible":_vm.updateVisible},slot:"reference"})],1)],1);};var __vue_staticRenderFns__$a=[];__vue_render__$a._withStripped=true;/* style */const __vue_inject_styles__$a=undefined;/* scoped */const __vue_scope_id__$a=undefined;/* module identifier */const __vue_module_identifier__$a=undefined;/* functional template */const __vue_is_functional_template__$a=false;/* style inject */ /* style inject SSR */ /* style inject shadow dom */const __vue_component__$a=/*#__PURE__*/normalizeComponent({render:__vue_render__$a,staticRenderFns:__vue_staticRenderFns__$a},__vue_inject_styles__$a,__vue_script__$a,__vue_scope_id__$a,__vue_is_functional_template__$a,__vue_module_identifier__$a,false,undefined,undefined,undefined);//
2171
+ getConfig:Function},components:{Dp:__vue_component__$e},watch:{ops:function(newVal){const ops=newVal;const{key}=this.getConfig(this.column);const v1=ops[key[0]],v2=ops[key[1]],v3=ops[key[2]];if(v1&&v2){this.value=[moment(v1),moment(v2)];if(key[2]){if(v3==key[3]){this.isHaveValue=true;}else{this.isHaveValue=false;}}else{this.isHaveValue=true;}}else{this.value=[];this.isHaveValue=false;}}},data(){return{trans,visible:false,pickerType:'datetimerange',pickerOptions:{shortcuts:[{text:trans('最近一周'),onClick(picker){const end=new Date();const start=new Date();start.setTime(start.getTime()-3600*1000*24*7);picker.$emit('pick',[start,end]);}},{text:trans('最近一个月'),onClick(picker){const end=new Date();const start=new Date();start.setTime(start.getTime()-3600*1000*24*30);picker.$emit('pick',[start,end]);}},{text:trans('最近三个月'),onClick(picker){const end=new Date();const start=new Date();start.setTime(start.getTime()-3600*1000*24*90);picker.$emit('pick',[start,end]);}}]},value:[],isHaveValue:false};},methods:{updateVisible(){this.visible=!this.visible;},submit(){const{key,rule}=this.getConfig(this.column);const{format,isAuto0059=false}=rule;let f1=format,f2=format;if(isAuto0059){f1='YYYY-MM-DD 00:00:00';f2='YYYY-MM-DD 23:59:59';}if(this.value.length>1){const v1=moment(this.value[0]).format(f1);const v2=moment(this.value[1]).format(f2);console.log(key);if(key[2]&&key[3]){const v3=key[3];this.setFormParams({[key[0]]:v1,[key[1]]:v2,[key[2]]:v3});}else{this.setFormParams({[key[0]]:v1,[key[1]]:v2});}}this.visible=false;},reset(){this.value=[];}},mounted(){/**
2172
+ * 初始化选择器类型,默认 'datetimerange',可通过 rule.type 覆盖
2173
+ */const{rule}=this.getConfig(this.column);this.pickerType=rule&&rule.type?rule.type:'datetimerange';}};/* script */const __vue_script__$a=script$a;/* template */var __vue_render__$a=function(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("span",[_c("el-popover",{attrs:{placement:"bottom",width:"425",trigger:"manual","popper-class":"pointRecord"},model:{value:_vm.visible,callback:function($$v){_vm.visible=$$v;},expression:"visible"}},[_c("div",{attrs:{"data-name":_vm.column.columnPropertyName}},[_c("el-date-picker",{staticStyle:{"margin-bottom":"10px",width:"100%"},attrs:{type:_vm.pickerType,align:"right","unlink-panels":"","range-separator":_vm.trans("至"),"start-placeholder":_vm.trans("开始日期"),"end-placeholder":_vm.trans("结束日期"),"picker-options":_vm.pickerOptions},model:{value:_vm.value,callback:function($$v){_vm.value=$$v;},expression:"value"}}),_vm._v(" "),_c("el-button",{attrs:{size:"mini"},on:{click:_vm.reset}},[_vm._v(_vm._s(_vm.trans("重置")))]),_vm._v(" "),_c("el-button",{attrs:{type:"primary",size:"mini"},on:{click:_vm.submit}},[_vm._v(_vm._s(_vm.trans("确定")))])],1),_vm._v(" "),_c("dp",{attrs:{slot:"reference",value:_vm.isHaveValue,visible:_vm.visible},on:{"update-visible":_vm.updateVisible},slot:"reference"})],1)],1);};var __vue_staticRenderFns__$a=[];__vue_render__$a._withStripped=true;/* style */const __vue_inject_styles__$a=undefined;/* scoped */const __vue_scope_id__$a=undefined;/* module identifier */const __vue_module_identifier__$a=undefined;/* functional template */const __vue_is_functional_template__$a=false;/* style inject */ /* style inject SSR */ /* style inject shadow dom */const __vue_component__$a=/*#__PURE__*/normalizeComponent({render:__vue_render__$a,staticRenderFns:__vue_staticRenderFns__$a},__vue_inject_styles__$a,__vue_script__$a,__vue_scope_id__$a,__vue_is_functional_template__$a,__vue_module_identifier__$a,false,undefined,undefined,undefined);//
2172
2174
  var script$9={props:{setFormParams:Function,column:Object,ops:Object,// 请求参数
2173
2175
  getConfig:Function},components:{Dp:__vue_component__$e},watch:{ops:function(newVal,old){const{key}=this.getConfig(this.column);const ops=newVal;this.value=ops[key]||"";}},data(){return{trans,visible:false,value:"",ruleCorrespond:"",isHaveFn:false};},mounted(){const{ruleCorrespond,userFn}=this.getConfig(this.column);this.isHaveFn=!!userFn;this.ruleCorrespond=ruleCorrespond;},methods:{querySearch(queryString,cb){return this.ruleCorrespond(queryString,cb);},submit(){const{key}=this.getConfig(this.column);this.setFormParams({[key]:this.value});this.visible=false;},reset(){this.value="";}}};/* script */const __vue_script__$9=script$9;/* template */var __vue_render__$9=function(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("span",[_c("el-popover",{attrs:{placement:"bottom",width:"100%",trigger:"click","popper-class":"pointRecord"},model:{value:_vm.visible,callback:function($$v){_vm.visible=$$v;},expression:"visible"}},[_c("div",{attrs:{"data-name":_vm.column.columnPropertyName}},[!_vm.isHaveFn?_c("el-input",{staticStyle:{"margin-bottom":"10px"},model:{value:_vm.value,callback:function($$v){_vm.value=$$v;},expression:"value"}}):_c("el-autocomplete",{attrs:{"fetch-suggestions":_vm.querySearch,placeholder:"请输入内容"},model:{value:_vm.value,callback:function($$v){_vm.value=$$v;},expression:"value"}}),_vm._v(" "),_c("el-button",{attrs:{size:"mini"},on:{click:_vm.reset}},[_vm._v(_vm._s(_vm.trans("重置")))]),_vm._v(" "),_c("el-button",{attrs:{type:"primary",size:"mini"},on:{click:_vm.submit}},[_vm._v(_vm._s(_vm.trans("确定")))])],1),_vm._v(" "),_c("dp",{attrs:{slot:"reference",value:_vm.value},slot:"reference"})],1)],1);};var __vue_staticRenderFns__$9=[];__vue_render__$9._withStripped=true;/* style */const __vue_inject_styles__$9=undefined;/* scoped */const __vue_scope_id__$9=undefined;/* module identifier */const __vue_module_identifier__$9=undefined;/* functional template */const __vue_is_functional_template__$9=false;/* style inject */ /* style inject SSR */ /* style inject shadow dom */const __vue_component__$9=/*#__PURE__*/normalizeComponent({render:__vue_render__$9,staticRenderFns:__vue_staticRenderFns__$9},__vue_inject_styles__$9,__vue_script__$9,__vue_scope_id__$9,__vue_is_functional_template__$9,__vue_module_identifier__$9,false,undefined,undefined,undefined);//
2174
2176
  //
@@ -2200,9 +2202,11 @@ getConfig:Function},components:{Dp:__vue_component__$e,Scope:__vue_component__$7
2200
2202
  */function getLabel(searchKey,columnCode,value){const data=load();const bucket=data[columnCode]&&data[columnCode][searchKey]||{};return bucket[value];}var cache={setLabel,getLabel,mergeFromList};//
2201
2203
  var script$5={props:{config:Object,setFormParams:Function,column:Object,ops:Object,// 请求参数
2202
2204
  getConfig:Function},components:{Dp:__vue_component__$e},watch:{ops:function(newVal,old){const key=this.key;const ops=newVal;if(ops[key]){this.value=ops[key].split(',');// 约定 基本上check类型的值都是、分割的字符串
2203
- }else{this.value=[];}}},mounted(){let{key,ruleCorrespond,rule,columnCode}=this.getConfig(this.column);this.key=key;this.columnCode=columnCode;if(rule.limit){this.limit=rule.limit;}this.ruleCorrespond=ruleCorrespond;},data(){return{trans,visible:false,limit:50,asyncList:[],value:[],ruleCorrespond:'',key:'',columnCode:''};},methods:{fnClick(res){this.ruleCorrespond(res);},/**
2205
+ }else{this.value=[];}}},mounted(){let{key,ruleCorrespond,rule,columnCode}=this.getConfig(this.column);this.key=key;this.columnCode=columnCode;if(rule.limit){this.limit=rule.limit;}this.ruleCorrespond=ruleCorrespond;},data(){return{trans,visible:false,limit:50,asyncList:[],value:[],ruleCorrespond:'',key:'',columnCode:'',optionCache:{}};},methods:{/**
2206
+ * 远程检索触发前记录当前选项,用于在列表刷新后仍可获取旧项的 label
2207
+ */fnClick(res){if(Array.isArray(this.asyncList)){this.asyncList.forEach(i=>{const v=i.schemeValue!==undefined?i.schemeValue:i.value;const l=i.schemeLabel!==undefined?i.schemeLabel:i.label;if(v!==undefined&&l!==undefined){this.optionCache[v]=l;}});}this.ruleCorrespond(res);},/**
2204
2208
  * 提交选中值,并缓存 value→label 映射用于后续标签展示
2205
- */submit(){const key=this.key;try{cache.mergeFromList(key,this.columnCode,this.asyncList);if(Array.isArray(this.value)){this.value.forEach(v=>{const find=Array.isArray(this.asyncList)?this.asyncList.find(i=>i.schemeValue===v||i.value===v):null;const l=find?find.schemeLabel||find.label:undefined;if(l!==undefined){cache.setLabel(key,this.columnCode,v,l);}});}}catch(e){}this.setFormParams({[key]:this.value.join(',')});this.visible=false;},reset(){this.value=[];}}};/* script */const __vue_script__$5=script$5;/* template */var __vue_render__$5=function(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("span",[_c("el-popover",{attrs:{placement:"bottom",width:"100%",trigger:"click","popper-class":"pointRecord"},model:{value:_vm.visible,callback:function($$v){_vm.visible=$$v;},expression:"visible"}},[_c("div",{attrs:{"data-name":_vm.column.columnPropertyName}},[_c("el-select",{staticStyle:{width:"100%","margin-bottom":"10px"},attrs:{filterable:"",clearable:"",remote:"",multiple:"","multiple-limit":_vm.limit,"reserve-keyword":"",placeholder:_vm.trans("请选择"),"remote-method":_vm.fnClick},on:{focus:function($event){return _vm.fnClick("");}},model:{value:_vm.value,callback:function($$v){_vm.value=$$v;},expression:"value"}},_vm._l(_vm.asyncList,function(item){return _c("el-option",{key:""+item.schemeKey,attrs:{label:""+item.schemeLabel,value:item.schemeValue}});}),1),_vm._v(" "),_c("el-button",{attrs:{size:"mini"},on:{click:_vm.reset}},[_vm._v(_vm._s(_vm.trans("重置")))]),_vm._v(" "),_c("el-button",{attrs:{type:"primary",size:"mini"},on:{click:_vm.submit}},[_vm._v(_vm._s(_vm.trans("确定")))])],1),_vm._v(" "),_c("dp",{attrs:{slot:"reference",value:_vm.value},slot:"reference"})],1)],1);};var __vue_staticRenderFns__$5=[];__vue_render__$5._withStripped=true;/* style */const __vue_inject_styles__$5=undefined;/* scoped */const __vue_scope_id__$5=undefined;/* module identifier */const __vue_module_identifier__$5=undefined;/* functional template */const __vue_is_functional_template__$5=false;/* style inject */ /* style inject SSR */ /* style inject shadow dom */const __vue_component__$5=/*#__PURE__*/normalizeComponent({render:__vue_render__$5,staticRenderFns:__vue_staticRenderFns__$5},__vue_inject_styles__$5,__vue_script__$5,__vue_scope_id__$5,__vue_is_functional_template__$5,__vue_module_identifier__$5,false,undefined,undefined,undefined);//
2209
+ */submit(){const key=this.key;try{cache.mergeFromList(key,this.columnCode,this.asyncList);if(Array.isArray(this.value)){this.value.forEach(v=>{const find=Array.isArray(this.asyncList)?this.asyncList.find(i=>i.schemeValue===v||i.value===v):null;const l=find?find.schemeLabel||find.label:this.optionCache[v];if(l!==undefined){cache.setLabel(key,this.columnCode,v,l);}});}}catch(e){}this.setFormParams({[key]:this.value.join(',')});this.visible=false;},reset(){this.value=[];}}};/* script */const __vue_script__$5=script$5;/* template */var __vue_render__$5=function(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("span",[_c("el-popover",{attrs:{placement:"bottom",width:"100%",trigger:"click","popper-class":"pointRecord"},model:{value:_vm.visible,callback:function($$v){_vm.visible=$$v;},expression:"visible"}},[_c("div",{attrs:{"data-name":_vm.column.columnPropertyName}},[_c("el-select",{staticStyle:{width:"100%","margin-bottom":"10px"},attrs:{filterable:"",clearable:"",remote:"",multiple:"","multiple-limit":_vm.limit,"reserve-keyword":"",placeholder:_vm.trans("请选择"),"remote-method":_vm.fnClick},on:{focus:function($event){return _vm.fnClick("");}},model:{value:_vm.value,callback:function($$v){_vm.value=$$v;},expression:"value"}},_vm._l(_vm.asyncList,function(item){return _c("el-option",{key:item.schemeValue||item.value||item.schemeKey,attrs:{label:item.schemeLabel||item.label,value:item.schemeValue||item.value}});}),1),_vm._v(" "),_c("el-button",{attrs:{size:"mini"},on:{click:_vm.reset}},[_vm._v(_vm._s(_vm.trans("重置")))]),_vm._v(" "),_c("el-button",{attrs:{type:"primary",size:"mini"},on:{click:_vm.submit}},[_vm._v(_vm._s(_vm.trans("确定")))])],1),_vm._v(" "),_c("dp",{attrs:{slot:"reference",value:_vm.value},slot:"reference"})],1)],1);};var __vue_staticRenderFns__$5=[];__vue_render__$5._withStripped=true;/* style */const __vue_inject_styles__$5=undefined;/* scoped */const __vue_scope_id__$5=undefined;/* module identifier */const __vue_module_identifier__$5=undefined;/* functional template */const __vue_is_functional_template__$5=false;/* style inject */ /* style inject SSR */ /* style inject shadow dom */const __vue_component__$5=/*#__PURE__*/normalizeComponent({render:__vue_render__$5,staticRenderFns:__vue_staticRenderFns__$5},__vue_inject_styles__$5,__vue_script__$5,__vue_scope_id__$5,__vue_is_functional_template__$5,__vue_module_identifier__$5,false,undefined,undefined,undefined);//
2206
2210
  var script$4={name:"cascader",props:{config:Object,setFormParams:Function,column:Object,ops:Object,// 请求参数
2207
2211
  getConfig:Function},components:{Dp:__vue_component__$e},watch:{ops:function(newVal,old){const key=this.key;const ops=newVal;if(ops[key]){this.value=ops[key].split(",");// 约定 基本上check类型的值都是、分割的字符串
2208
2212
  }else{this.value=[];}},visible:{deep:true,handler(value){if(this.ruleFn&&value){let{option}=this.getConfig(this.column);this.list=option;}}}},mounted(){let{key,option,rule}=this.getConfig(this.column);this.option=option;this.key=key;this.componentOriginProps={...this.componentOriginProps,...rule.componentOriginProps};if(rule.configProps){this.configProps={...this.configProps,...rule.configProps};}},data(){return{trans,visible:false,limit:50,option:[],value:"",ruleCorrespond:"",key:"",multiple:false,componentOriginProps:{label:"a",value:"b",multiple:true,expandTrigger:"hover"},configProps:{filterable:true}};},methods:{fnClick(res){this.ruleCorrespond(res);},submit(){const key=this.key;this.setFormParams({[key]:this.value.join(",")});this.visible=false;},reset(){this.value=[];}}};/* script */const __vue_script__$4=script$4;/* template */var __vue_render__$4=function(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("span",[_c("el-popover",{attrs:{placement:"bottom",width:"100%",trigger:"click","popper-class":"pointRecord"},model:{value:_vm.visible,callback:function($$v){_vm.visible=$$v;},expression:"visible"}},[_c("div",{attrs:{"data-name":_vm.column.columnPropertyName}},[_c("el-cascader",_vm._b({staticStyle:{width:"300px"},attrs:{clearable:"",placeholder:_vm.trans("请选择"),options:_vm.option,props:_vm.componentOriginProps},model:{value:_vm.value,callback:function($$v){_vm.value=$$v;},expression:"value"}},"el-cascader",_vm.configProps,false)),_vm._v(" "),_c("el-button",{staticClass:"popBtn",attrs:{size:"mini"},on:{click:_vm.reset}},[_vm._v(_vm._s(_vm.trans("重置")))]),_vm._v(" "),_c("el-button",{staticClass:"popBtn",attrs:{type:"primary",size:"mini"},on:{click:_vm.submit}},[_vm._v(_vm._s(_vm.trans("确定")))])],1),_vm._v(" "),_c("dp",{attrs:{slot:"reference",value:_vm.value},slot:"reference"})],1)],1);};var __vue_staticRenderFns__$4=[];__vue_render__$4._withStripped=true;/* style */const __vue_inject_styles__$4=function(inject){if(!inject)return;inject("data-v-118f5d90_0",{source:".popBtn[data-v-118f5d90] {\n vertical-align: bottom;\n margin-left: 5px;\n}\n\n/*# sourceMappingURL=Cascader.vue.map */",map:{"version":3,"sources":["/Users/chenlei/HLcode/test/components/FormTableScheme/component/ColHeader/Cascader.vue","Cascader.vue"],"names":[],"mappings":"AAqHA;EACA,sBAAA;EACA,gBAAA;ACpHA;;AAEA,uCAAuC","file":"Cascader.vue","sourcesContent":["<template>\n <span>\n <el-popover\n placement=\"bottom\"\n width=\"100%\"\n trigger=\"click\"\n v-model=\"visible\"\n popper-class=\"pointRecord\"\n >\n <div :data-name=\"column.columnPropertyName\">\n <el-cascader\n style=\"width: 300px\"\n v-model=\"value\"\n clearable\n :placeholder=\"trans('请选择')\"\n :options=\"option\"\n :props=\"componentOriginProps\"\n v-bind=\"configProps\"\n >\n </el-cascader>\n <el-button class=\"popBtn\" size=\"mini\" @click=\"reset\">{{\n trans(\"重置\")\n }}</el-button>\n <el-button class=\"popBtn\" type=\"primary\" size=\"mini\" @click=\"submit\">{{\n trans(\"确定\")\n }}</el-button>\n </div>\n <dp :value=\"value\" slot=\"reference\" />\n </el-popover>\n </span>\n</template>\n<script>\nimport Dp from \"./dp.vue\";\nimport trans from \"../../../lang/trans\";\n\nexport default {\n name: \"cascader\",\n props: {\n config: Object,\n setFormParams: Function,\n column: Object,\n ops: Object, // 请求参数\n getConfig: Function,\n },\n components: { Dp },\n watch: {\n ops: function (newVal, old) {\n const key = this.key;\n const ops = newVal;\n if (ops[key]) {\n this.value = ops[key].split(\",\"); // 约定 基本上check类型的值都是、分割的字符串\n } else {\n this.value = [];\n }\n },\n visible: {\n deep: true,\n handler(value) {\n if (this.ruleFn && value) {\n let { option } = this.getConfig(this.column);\n this.list = option;\n }\n },\n },\n },\n mounted() {\n let { key, option, rule } = this.getConfig(this.column);\n this.option = option;\n this.key = key;\n this.componentOriginProps = {\n ...this.componentOriginProps,\n ...rule.componentOriginProps,\n };\n if (rule.configProps) {\n this.configProps = {\n ...this.configProps,\n ...rule.configProps,\n };\n }\n },\n data() {\n return {\n trans,\n visible: false,\n limit: 50,\n option: [],\n value: \"\",\n ruleCorrespond: \"\",\n key: \"\",\n multiple: false,\n componentOriginProps: {\n label: \"a\",\n value: \"b\",\n multiple: true,\n expandTrigger: \"hover\",\n },\n configProps: {\n filterable: true,\n },\n };\n },\n methods: {\n fnClick(res) {\n this.ruleCorrespond(res);\n },\n submit() {\n const key = this.key;\n this.setFormParams({ [key]: this.value.join(\",\") });\n this.visible = false;\n },\n reset() {\n this.value = [];\n },\n },\n};\n</script>\n<style lang=\"scss\" scoped>\n.popBtn {\n vertical-align: bottom;\n margin-left: 5px;\n}\n</style>",".popBtn {\n vertical-align: bottom;\n margin-left: 5px;\n}\n\n/*# sourceMappingURL=Cascader.vue.map */"]},media:undefined});};/* scoped */const __vue_scope_id__$4="data-v-118f5d90";/* module identifier */const __vue_module_identifier__$4=undefined;/* functional template */const __vue_is_functional_template__$4=false;/* style inject SSR */ /* style inject shadow dom */const __vue_component__$4=/*#__PURE__*/normalizeComponent({render:__vue_render__$4,staticRenderFns:__vue_staticRenderFns__$4},__vue_inject_styles__$4,__vue_script__$4,__vue_scope_id__$4,__vue_is_functional_template__$4,__vue_module_identifier__$4,false,createInjector,undefined,undefined);var has$1=Object.prototype.hasOwnProperty;var hexTable=function(){var array=[];for(var i=0;i<256;++i){array.push('%'+((i<16?'0':'')+i.toString(16)).toUpperCase());}return array;}();var compactQueue=function compactQueue(queue){var obj;while(queue.length){var item=queue.pop();obj=item.obj[item.prop];if(Array.isArray(obj)){var compacted=[];for(var j=0;j<obj.length;++j){if(typeof obj[j]!=='undefined'){compacted.push(obj[j]);}}item.obj[item.prop]=compacted;}}return obj;};var arrayToObject=function arrayToObject(source,options){var obj=options&&options.plainObjects?Object.create(null):{};for(var i=0;i<source.length;++i){if(typeof source[i]!=='undefined'){obj[i]=source[i];}}return obj;};var merge=function merge(target,source,options){if(!source){return target;}if(typeof source!=='object'){if(Array.isArray(target)){target.push(source);}else if(target&&typeof target==='object'){if(options&&(options.plainObjects||options.allowPrototypes)||!has$1.call(Object.prototype,source)){target[source]=true;}}else{return[target,source];}return target;}if(!target||typeof target!=='object'){return[target].concat(source);}var mergeTarget=target;if(Array.isArray(target)&&!Array.isArray(source)){mergeTarget=arrayToObject(target,options);}if(Array.isArray(target)&&Array.isArray(source)){source.forEach(function(item,i){if(has$1.call(target,i)){var targetItem=target[i];if(targetItem&&typeof targetItem==='object'&&item&&typeof item==='object'){target[i]=merge(targetItem,item,options);}else{target.push(item);}}else{target[i]=item;}});return target;}return Object.keys(source).reduce(function(acc,key){var value=source[key];if(has$1.call(acc,key)){acc[key]=merge(acc[key],value,options);}else{acc[key]=value;}return acc;},mergeTarget);};var assign=function assignSingleSource(target,source){return Object.keys(source).reduce(function(acc,key){acc[key]=source[key];return acc;},target);};var decode$2=function(str){try{return decodeURIComponent(str.replace(/\+/g,' '));}catch(e){return str;}};var encode=function encode(str){// This code was originally written by Brian White (mscdex) for the io.js core querystring library.
@@ -2706,4 +2710,4 @@ for(let key in this.formData){if(this.formData[key]!==""){formData.append(key,th
2706
2710
  // fileType: failFileType,
2707
2711
  // };
2708
2712
  const searchParams=new URLSearchParams();searchParams.append("fileCode",fileCode);searchParams.append("fileType",failFileType);for(let key in this.errorParams){if(this.errorParams[key]||this.errorParams[key]==0){searchParams.append(key,this.errorParams[key]);}}// 加密
2709
- let headers={"Content-Type":"application/x-www-form-urlencoded"};const urlApi="/gateway/huilianApi/errorcs/exportErrorFile";if(window.HLEncryption){headers=window.HLEncryption.setRequestHeaders({url:urlApi,headers:headers});}const response=await fetch(urlApi,{method:"post",headers:headers,body:searchParams.toString()});if(!response.ok){throw new Error(`下载请求失败: ${response.statusText}`);}const blob=await response.blob();const name=response.headers.get("content-disposition").split("filename=")[1];const url=window.URL.createObjectURL(blob);const a=document.createElement("a");a.href=url;a.download=decodeURIComponent(name);document.body.appendChild(a);a.click();document.body.removeChild(a);window.URL.revokeObjectURL(url);}else{this.$message({message:"无文件可下载",type:"warning"});}}}};/* script */const __vue_script__=script;/* template */var __vue_render__=function(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("span",{staticClass:"StandardImportComponents",staticStyle:{display:"inline-block"}},[_c("el-button",{attrs:{type:_vm.btnType},on:{click:_vm.openDialog}},[_vm._v(_vm._s(_vm.btnText))]),_vm._v(" "),_c("el-dialog",{attrs:{title:_vm.dialogTitle,visible:_vm.dialogVisible,width:"600px","close-on-click-modal":false,"close-on-press-escape":false,"before-close":_vm.handleClose,"append-to-body":""},on:{"update:visible":function($event){_vm.dialogVisible=$event;}}},[_c("div",[_vm._t("content-header")],2),_vm._v(" "),_c("div",{staticStyle:{position:"relative"}},[_c("el-upload",{ref:"importFile",attrs:{action:_vm.importApi,"file-list":_vm.fileList,accept:"."+_vm.fileType,"before-upload":_vm.beforeUploadForm,data:_vm.formData,limit:1,"on-change":_vm.handleChange,"on-remove":_vm.handleRemove,"on-success":_vm.handleSuccess,"on-error":_vm.handleError,"auto-upload":false,"http-request":_vm.customHttpRequest}},[_c("el-button",{attrs:{slot:"trigger",size:"small",type:"primary"},slot:"trigger"},[_vm._v("选取文件")]),_vm._v(" "),_c("div",{staticClass:"el-upload__tip",attrs:{slot:"tip"},slot:"tip"},[_vm._v("\n "+_vm._s(_vm.fileTypeComputer)+"\n ")])],1),_vm._v(" "),_c("div",{staticStyle:{position:"absolute",top:"0",left:"100px"}},[_c("el-button",{attrs:{type:"text"},on:{click:_vm.getTemp}},[_vm._v(" 模板下载 ")])],1),_vm._v(" "),_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.detailData.successCount||_vm.detailData.failCount,expression:"detailData.successCount || detailData.failCount"}],staticClass:"mt-10",staticStyle:{"font-size":"12px","font-weight":"400",color:"#999999"}},[_vm._v("\n 导入结果(仅展示最后一次上传结果):\n "),_c("span",{staticStyle:{color:"#333333"}},[_vm._v("\n 成功"+_vm._s(_vm.detailData.successCount||0)+"条,失败"+_vm._s(_vm.detailData.failCount||0)+"条\n ")]),_vm._v("\n  \n "),_c("a",{directives:[{name:"show",rawName:"v-show",value:_vm.failFileType&&_vm.detailData.failCount,expression:"failFileType && detailData.failCount"}],staticStyle:{color:"#599ebf"},attrs:{href:"javascript:void(0)"},on:{click:function($event){return _vm.downloadFile(_vm.fileCode,_vm.failFileType);}}},[_vm._v("\n 下载失败信息\n ")])])],1),_vm._v(" "),_c("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[_c("el-button",{on:{click:_vm.handleClose}},[_vm._v(" 取 消 ")]),_vm._v(" "),_c("el-button",{attrs:{type:"primary",loading:_vm.isSubmitLoading},on:{click:_vm.query}},[_vm._v("\n 确 定\n ")])],1)])],1);};var __vue_staticRenderFns__=[];__vue_render__._withStripped=true;/* style */const __vue_inject_styles__=undefined;/* scoped */const __vue_scope_id__=undefined;/* module identifier */const __vue_module_identifier__=undefined;/* functional template */const __vue_is_functional_template__=false;/* style inject */ /* style inject SSR */ /* style inject shadow dom */const __vue_component__=/*#__PURE__*/normalizeComponent({render:__vue_render__,staticRenderFns:__vue_staticRenderFns__},__vue_inject_styles__,__vue_script__,__vue_scope_id__,__vue_is_functional_template__,__vue_module_identifier__,false,undefined,undefined,undefined);__vue_component__.install=function(Vue){Vue.component(__vue_component__.name,__vue_component__);};var version="3.5.3";const components=[__vue_component__$j,__vue_component__$i,__vue_component__$h,__vue_component__$g,__vue_component__$3,__vue_component__$2,__vue_component__$1,__vue_component__];const install=function(Vue){components.forEach(component=>{Vue.component(component.name,component);});};if(typeof window!=="undefined"&&window.Vue){install(window.Vue);}var index={version,install};export{__vue_component__$1 as ExportList,__vue_component__$3 as FormTableScheme,__vue_component__$i as HelloVue,__vue_component__$2 as HtmlToImg,__vue_component__$j as MyButton,__vue_component__$g as ShowFile,__vue_component__ as StandardImport,__vue_component__$h as UploadFile,index as default,install};
2713
+ let headers={"Content-Type":"application/x-www-form-urlencoded"};const urlApi="/gateway/huilianApi/errorcs/exportErrorFile";if(window.HLEncryption){headers=window.HLEncryption.setRequestHeaders({url:urlApi,headers:headers});}const response=await fetch(urlApi,{method:"post",headers:headers,body:searchParams.toString()});if(!response.ok){throw new Error(`下载请求失败: ${response.statusText}`);}const blob=await response.blob();const name=response.headers.get("content-disposition").split("filename=")[1];const url=window.URL.createObjectURL(blob);const a=document.createElement("a");a.href=url;a.download=decodeURIComponent(name);document.body.appendChild(a);a.click();document.body.removeChild(a);window.URL.revokeObjectURL(url);}else{this.$message({message:"无文件可下载",type:"warning"});}}}};/* script */const __vue_script__=script;/* template */var __vue_render__=function(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c("span",{staticClass:"StandardImportComponents",staticStyle:{display:"inline-block"}},[_c("el-button",{attrs:{type:_vm.btnType},on:{click:_vm.openDialog}},[_vm._v(_vm._s(_vm.btnText))]),_vm._v(" "),_c("el-dialog",{attrs:{title:_vm.dialogTitle,visible:_vm.dialogVisible,width:"600px","close-on-click-modal":false,"close-on-press-escape":false,"before-close":_vm.handleClose,"append-to-body":""},on:{"update:visible":function($event){_vm.dialogVisible=$event;}}},[_c("div",[_vm._t("content-header")],2),_vm._v(" "),_c("div",{staticStyle:{position:"relative"}},[_c("el-upload",{ref:"importFile",attrs:{action:_vm.importApi,"file-list":_vm.fileList,accept:"."+_vm.fileType,"before-upload":_vm.beforeUploadForm,data:_vm.formData,limit:1,"on-change":_vm.handleChange,"on-remove":_vm.handleRemove,"on-success":_vm.handleSuccess,"on-error":_vm.handleError,"auto-upload":false,"http-request":_vm.customHttpRequest}},[_c("el-button",{attrs:{slot:"trigger",size:"small",type:"primary"},slot:"trigger"},[_vm._v("选取文件")]),_vm._v(" "),_c("div",{staticClass:"el-upload__tip",attrs:{slot:"tip"},slot:"tip"},[_vm._v("\n "+_vm._s(_vm.fileTypeComputer)+"\n ")])],1),_vm._v(" "),_c("div",{staticStyle:{position:"absolute",top:"0",left:"100px"}},[_c("el-button",{attrs:{type:"text"},on:{click:_vm.getTemp}},[_vm._v(" 模板下载 ")])],1),_vm._v(" "),_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.detailData.successCount||_vm.detailData.failCount,expression:"detailData.successCount || detailData.failCount"}],staticClass:"mt-10",staticStyle:{"font-size":"12px","font-weight":"400",color:"#999999"}},[_vm._v("\n 导入结果(仅展示最后一次上传结果):\n "),_c("span",{staticStyle:{color:"#333333"}},[_vm._v("\n 成功"+_vm._s(_vm.detailData.successCount||0)+"条,失败"+_vm._s(_vm.detailData.failCount||0)+"条\n ")]),_vm._v("\n  \n "),_c("a",{directives:[{name:"show",rawName:"v-show",value:_vm.failFileType&&_vm.detailData.failCount,expression:"failFileType && detailData.failCount"}],staticStyle:{color:"#599ebf"},attrs:{href:"javascript:void(0)"},on:{click:function($event){return _vm.downloadFile(_vm.fileCode,_vm.failFileType);}}},[_vm._v("\n 下载失败信息\n ")])])],1),_vm._v(" "),_c("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[_c("el-button",{on:{click:_vm.handleClose}},[_vm._v(" 取 消 ")]),_vm._v(" "),_c("el-button",{attrs:{type:"primary",loading:_vm.isSubmitLoading},on:{click:_vm.query}},[_vm._v("\n 确 定\n ")])],1)])],1);};var __vue_staticRenderFns__=[];__vue_render__._withStripped=true;/* style */const __vue_inject_styles__=undefined;/* scoped */const __vue_scope_id__=undefined;/* module identifier */const __vue_module_identifier__=undefined;/* functional template */const __vue_is_functional_template__=false;/* style inject */ /* style inject SSR */ /* style inject shadow dom */const __vue_component__=/*#__PURE__*/normalizeComponent({render:__vue_render__,staticRenderFns:__vue_staticRenderFns__},__vue_inject_styles__,__vue_script__,__vue_scope_id__,__vue_is_functional_template__,__vue_module_identifier__,false,undefined,undefined,undefined);__vue_component__.install=function(Vue){Vue.component(__vue_component__.name,__vue_component__);};var version="3.6.1";const components=[__vue_component__$j,__vue_component__$i,__vue_component__$h,__vue_component__$g,__vue_component__$3,__vue_component__$2,__vue_component__$1,__vue_component__];const install=function(Vue){components.forEach(component=>{Vue.component(component.name,component);});};if(typeof window!=="undefined"&&window.Vue){install(window.Vue);}var index={version,install};export{__vue_component__$1 as ExportList,__vue_component__$3 as FormTableScheme,__vue_component__$i as HelloVue,__vue_component__$2 as HtmlToImg,__vue_component__$j as MyButton,__vue_component__$g as ShowFile,__vue_component__ as StandardImport,__vue_component__$h as UploadFile,index as default,install};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@huilian/components-tms",
3
- "version": "3.5.3",
3
+ "version": "3.6.1",
4
4
  "scripts": {
5
5
  "dev": "npx rollup -wc rollup.config.dev.js",
6
6
  "build": "npx rollup -c rollup.config.js && npm run build:types",