@huilian/components-tms 3.1.4 → 3.1.6
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 +10 -10
- package/package.json +1 -1
package/lib/bundle.esm.js
CHANGED
|
@@ -2112,16 +2112,16 @@ this.inResize=false;this.$nextTick(t=>{this.inResize=true;});}}};/* script */con
|
|
|
2112
2112
|
var script$b={name:'dp',props:{value:String|Array|Object|Boolean,visible:{type:Boolean,default:false}},methods:{updateMsg(newVal){this.$emit('update-visible',newVal);}},computed:{computeStyle(){const type=Object.prototype.toString.call(this.value);let res=true;switch(type){case'[object Array]':this.value[0]==this.value[1];const errValues=[null,undefined,''];res=this.value.length==0||errValues.includes(this.value[0])&&errValues.includes(this.value[1]);break;case'[object Object]':res=Object.keys(this.value).length==0;break;case'[object String]':res=this.value.length==0;break;case'[object Number]':res=false;break;case'[object Boolean]':res=!this.value;break;}return{color:!res?'#10c2b0':'#ccc'};}}};/* 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("svg",{staticClass:"icon",style:_vm.computeStyle,attrs:{"aria-hidden":"true"},on:{click:_vm.updateMsg}},[_c("use",{attrs:{"xlink:href":"#fontFamily-a-web20_liebiaoshaixuan"}})]);};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);//
|
|
2113
2113
|
var script$a={props:{setFormParams:Function,column:Object,ops:Object,// 请求参数
|
|
2114
2114
|
getConfig:Function,ruleFn:Function},components:{Dp:__vue_component__$b},watch:{ops:function(newVal,old){const{key}=this.getConfig(this.column);const ops=newVal;if(ops[key]){this.value=ops[key].split(',');// 约定 基本上check类型的值都是,分割的字符串
|
|
2115
|
-
}else{this.value=[];}},visible:{deep:true,handler(value){if(this.ruleFn&&value){let{option}=this.getConfig(this.column);this.list=option;}}}},data(){return{trans,list:[],visible:false,value:[]};},mounted(){let{option}=this.getConfig(this.column);this.list=option;},methods:{submit(){const{key}=this.getConfig(this.column);this.setFormParams({[key]:this.value.join(',')});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:"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",{attrs:{multiple:"",filterable:"",placeholder:_vm.trans("请选择")},model:{value:_vm.value,callback:function($$v){_vm.value=$$v;},expression:"value"}},_vm._l(_vm.list,function(item){return _c("el-option",{key:item.label,attrs:{label:item.label,value:item.value}});}),1),_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:"
|
|
2115
|
+
}else{this.value=[];}},visible:{deep:true,handler(value){if(this.ruleFn&&value){let{option}=this.getConfig(this.column);this.list=option;}}}},data(){return{trans,list:[],visible:false,value:[]};},mounted(){let{option}=this.getConfig(this.column);this.list=option;},methods:{submit(){const{key}=this.getConfig(this.column);this.setFormParams({[key]:this.value.join(',')});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:"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",{attrs:{multiple:"",filterable:"",placeholder:_vm.trans("请选择")},model:{value:_vm.value,callback:function($$v){_vm.value=$$v;},expression:"value"}},_vm._l(_vm.list,function(item){return _c("el-option",{key:item.label,attrs:{label:item.label,value:item.value}});}),1),_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__$a=[];__vue_render__$a._withStripped=true;/* style */const __vue_inject_styles__$a=function(inject){if(!inject)return;inject("data-v-0d553a70_0",{source:".popBtn[data-v-0d553a70] {\n vertical-align: bottom;\n margin-left: 5px;\n}\n.checkbox[data-v-0d553a70] {\n max-height: 150px;\n overflow-y: auto;\n}\n.checkbox .el-checkbox[data-v-0d553a70] {\n display: block;\n}\n\n/*# sourceMappingURL=Check.vue.map */",map:{"version":3,"sources":["/Users/chenlei/HLcode/test/components/FormTableScheme/component/ColHeader/Check.vue","Check.vue"],"names":[],"mappings":"AAwEA;EACA,sBAAA;EACA,gBAAA;ACvEA;AD0EA;EACA,iBAAA;EACA,gBAAA;ACvEA;ADyEA;EACA,cAAA;ACvEA;;AAEA,oCAAoC","file":"Check.vue","sourcesContent":["<template>\n <span>\n <el-popover placement=\"bottom\" width=\"100%\" trigger=\"click\" v-model=\"visible\" popper-class=\"pointRecord\">\n <div :data-name=\"column.columnPropertyName\">\n <el-select multiple v-model=\"value\" filterable :placeholder=\"trans('请选择')\">\n <el-option v-for=\"item in list\" :label=\"item.label\" :key=\"item.label\" :value=\"item.value\"></el-option>\n </el-select>\n <el-button class=\"popBtn\" size=\"mini\" @click=\"reset\">{{ trans('重置') }}</el-button>\n <el-button class=\"popBtn\" type=\"primary\" size=\"mini\" @click=\"submit\">{{ trans('确定') }}</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 props: {\n setFormParams: Function,\n column: Object,\n ops: Object, // 请求参数\n getConfig: Function,\n ruleFn: Function,\n },\n components: { Dp },\n watch: {\n ops: function (newVal, old) {\n const { key } = this.getConfig(this.column);\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 data() {\n return {\n trans,\n list: [],\n visible: false,\n value: [],\n }\n },\n mounted() {\n let { option } = this.getConfig(this.column);\n this.list = option\n },\n methods: {\n submit() {\n const { key } = this.getConfig(this.column);\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\n.checkbox {\n max-height: 150px;\n overflow-y: auto;\n\n .el-checkbox {\n display: block;\n }\n}\n</style>",".popBtn {\n vertical-align: bottom;\n margin-left: 5px;\n}\n\n.checkbox {\n max-height: 150px;\n overflow-y: auto;\n}\n.checkbox .el-checkbox {\n display: block;\n}\n\n/*# sourceMappingURL=Check.vue.map */"]},media:undefined});};/* scoped */const __vue_scope_id__$a="data-v-0d553a70";/* module identifier */const __vue_module_identifier__$a=undefined;/* functional template */const __vue_is_functional_template__$a=false;/* 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,createInjector,undefined,undefined);//
|
|
2116
2116
|
var script$9={props:{setFormParams:Function,column:Object,ops:Object,// 请求参数
|
|
2117
2117
|
getConfig:Function,ruleFn:Function},components:{Dp:__vue_component__$b},watch:{ops:function(newVal,old){const{key}=this.getConfig(this.column);const ops=newVal;if(ops[key]){this.value=ops[key]||'';// 约定 基本上check类型的值都是,分割的字符串
|
|
2118
|
-
}else{this.value='';}},visible:{deep:true,handler(value){if(this.ruleFn&&value){let{option}=this.getConfig(this.column);this.list=option;}}}},data(){return{trans,visible:false,value:'',list:[]};},mounted(){let{option}=this.getConfig(this.column);this.list=option;},methods:{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}},[_c("el-select",{attrs:{filterable:"",placeholder:_vm.trans("请选择")},model:{value:_vm.value,callback:function($$v){_vm.value=$$v;},expression:"value"}},_vm._l(_vm.list,function(item){return _c("el-option",{key:item.label,attrs:{label:item.label,value:item.value}});}),1),_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:"
|
|
2118
|
+
}else{this.value='';}},visible:{deep:true,handler(value){if(this.ruleFn&&value){let{option}=this.getConfig(this.column);this.list=option;}}}},data(){return{trans,visible:false,value:'',list:[]};},mounted(){let{option}=this.getConfig(this.column);this.list=option;},methods:{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}},[_c("el-select",{attrs:{filterable:"",placeholder:_vm.trans("请选择")},model:{value:_vm.value,callback:function($$v){_vm.value=$$v;},expression:"value"}},_vm._l(_vm.list,function(item){return _c("el-option",{key:item.label,attrs:{label:item.label,value:item.value}});}),1),_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__$9=[];__vue_render__$9._withStripped=true;/* style */const __vue_inject_styles__$9=function(inject){if(!inject)return;inject("data-v-90e9dae8_0",{source:".popBtn[data-v-90e9dae8] {\n vertical-align: bottom;\n margin-left: 5px;\n}\n.radiobox[data-v-90e9dae8] {\n max-height: 150px;\n display: block;\n overflow-y: auto;\n}\n.radiobox .el-radio[data-v-90e9dae8] {\n display: block;\n}\n.radiobox .el-radio__input[data-v-90e9dae8] {\n margin-right: 10px;\n}\n\n/*# sourceMappingURL=Radio.vue.map */",map:{"version":3,"sources":["/Users/chenlei/HLcode/test/components/FormTableScheme/component/ColHeader/Radio.vue","Radio.vue"],"names":[],"mappings":"AAyEA;EACA,sBAAA;EACA,gBAAA;ACxEA;AD2EA;EACA,iBAAA;EACA,cAAA;EACA,gBAAA;ACxEA;AD0EA;EACA,cAAA;ACxEA;AD2EA;EACA,kBAAA;ACzEA;;AAEA,oCAAoC","file":"Radio.vue","sourcesContent":["<template>\n <span>\n <el-popover placement=\"bottom\" width=\"100%\" trigger=\"click\" v-model=\"visible\" popper-class=\"pointRecord\">\n <div :data-name=\"column.columnPropertyName\">\n <el-select v-model=\"value\" filterable :placeholder=\"trans('请选择')\">\n <el-option v-for=\"item in list\" :label=\"item.label\" :key=\"item.label\"\n :value=\"item.value\"></el-option>\n </el-select>\n <el-button class=\"popBtn\" size=\"mini\" @click=\"reset\">{{ trans('重置') }}</el-button>\n <el-button class=\"popBtn\" type=\"primary\" size=\"mini\" @click=\"submit\">{{ trans('确定') }}</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 props: {\n setFormParams: Function,\n column: Object,\n ops: Object, // 请求参数\n getConfig: Function,\n ruleFn: Function,\n },\n components: { Dp },\n watch: {\n ops: function (newVal, old) {\n const { key } = this.getConfig(this.column);\n const ops = newVal;\n if (ops[key]) {\n this.value = ops[key] || '' // 约定 基本上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 data() {\n return {\n trans,\n visible: false,\n value: '',\n list:[]\n }\n },\n mounted() {\n let { option } = this.getConfig(this.column);\n this.list = option\n },\n methods: {\n submit() {\n const { key } = this.getConfig(this.column);\n this.setFormParams({ [key]: this.value })\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\n.radiobox {\n max-height: 150px;\n display: block;\n overflow-y: auto;\n\n .el-radio {\n display: block;\n }\n\n .el-radio__input {\n margin-right: 10px;\n }\n}\n</style>",".popBtn {\n vertical-align: bottom;\n margin-left: 5px;\n}\n\n.radiobox {\n max-height: 150px;\n display: block;\n overflow-y: auto;\n}\n.radiobox .el-radio {\n display: block;\n}\n.radiobox .el-radio__input {\n margin-right: 10px;\n}\n\n/*# sourceMappingURL=Radio.vue.map */"]},media:undefined});};/* scoped */const __vue_scope_id__$9="data-v-90e9dae8";/* module identifier */const __vue_module_identifier__$9=undefined;/* functional template */const __vue_is_functional_template__$9=false;/* 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,createInjector,undefined,undefined);//
|
|
2119
2119
|
var script$8={props:{column:Object,setFormParams:Function,getConfig:Function,config:{type:Object,default:()=>{return{rule:{type:'date'}};}},ops:Object// 请求参数
|
|
2120
|
-
},components:{Dp:__vue_component__$b},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__$8=script$8;/* template */var __vue_render__$8=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:"
|
|
2120
|
+
},components:{Dp:__vue_component__$b},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__$8=script$8;/* template */var __vue_render__$8=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__$8=[];__vue_render__$8._withStripped=true;/* style */const __vue_inject_styles__$8=undefined;/* scoped */const __vue_scope_id__$8=undefined;/* module identifier */const __vue_module_identifier__$8=undefined;/* functional template */const __vue_is_functional_template__$8=false;/* style inject */ /* style inject SSR */ /* style inject shadow dom */const __vue_component__$8=/*#__PURE__*/normalizeComponent({render:__vue_render__$8,staticRenderFns:__vue_staticRenderFns__$8},__vue_inject_styles__$8,__vue_script__$8,__vue_scope_id__$8,__vue_is_functional_template__$8,__vue_module_identifier__$8,false,undefined,undefined,undefined);//
|
|
2121
2121
|
var script$7={props:{column:Object,setFormParams:Function,config:Object,ops:Object,// 请求参数,
|
|
2122
|
-
getConfig:Function},components:{Dp:__vue_component__$b},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]){console.log(key[2]);console.log(v3);console.log(key[3]);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__$7=script$7;/* template */var __vue_render__$7=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:"
|
|
2122
|
+
getConfig:Function},components:{Dp:__vue_component__$b},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]){console.log(key[2]);console.log(v3);console.log(key[3]);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__$7=script$7;/* template */var __vue_render__$7=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__$7=[];__vue_render__$7._withStripped=true;/* style */const __vue_inject_styles__$7=undefined;/* scoped */const __vue_scope_id__$7=undefined;/* module identifier */const __vue_module_identifier__$7=undefined;/* functional template */const __vue_is_functional_template__$7=false;/* style inject */ /* style inject SSR */ /* style inject shadow dom */const __vue_component__$7=/*#__PURE__*/normalizeComponent({render:__vue_render__$7,staticRenderFns:__vue_staticRenderFns__$7},__vue_inject_styles__$7,__vue_script__$7,__vue_scope_id__$7,__vue_is_functional_template__$7,__vue_module_identifier__$7,false,undefined,undefined,undefined);//
|
|
2123
2123
|
var script$6={props:{setFormParams:Function,column:Object,ops:Object,// 请求参数
|
|
2124
|
-
getConfig:Function},components:{Dp:__vue_component__$b},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__$6=script$6;/* template */var __vue_render__$6=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:"
|
|
2124
|
+
getConfig:Function},components:{Dp:__vue_component__$b},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__$6=script$6;/* template */var __vue_render__$6=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__$6=[];__vue_render__$6._withStripped=true;/* style */const __vue_inject_styles__$6=undefined;/* scoped */const __vue_scope_id__$6=undefined;/* module identifier */const __vue_module_identifier__$6=undefined;/* functional template */const __vue_is_functional_template__$6=false;/* style inject */ /* style inject SSR */ /* style inject shadow dom */const __vue_component__$6=/*#__PURE__*/normalizeComponent({render:__vue_render__$6,staticRenderFns:__vue_staticRenderFns__$6},__vue_inject_styles__$6,__vue_script__$6,__vue_scope_id__$6,__vue_is_functional_template__$6,__vue_module_identifier__$6,false,undefined,undefined,undefined);//
|
|
2125
2125
|
//
|
|
2126
2126
|
//
|
|
2127
2127
|
//
|
|
@@ -2139,10 +2139,10 @@ var script$5={props:{content:String}};/* script */const __vue_script__$5=script$
|
|
|
2139
2139
|
//
|
|
2140
2140
|
var script$4={props:{value:{default:['',''],type:Array}},data(){return{value1:this.value[0],value2:this.value[1]};},watch:{value:{handler(){this.value1=this.value[0];this.value2=this.value[1];}}},methods:{notice(v,type){const{value1,value2}=this;this.$emit('update:value',[value1,value2]);}}};/* 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-input-number",{staticStyle:{"margin-bottom":"10px",width:"45%"},on:{change:_vm.notice},model:{value:_vm.value1,callback:function($$v){_vm.value1=$$v;},expression:"value1"}}),_vm._v("\n -\n "),_c("el-input-number",{staticStyle:{"margin-bottom":"10px",width:"45%"},on:{change:_vm.notice},model:{value:_vm.value2,callback:function($$v){_vm.value2=$$v;},expression:"value2"}})],1);};var __vue_staticRenderFns__$4=[];__vue_render__$4._withStripped=true;/* style */const __vue_inject_styles__$4=undefined;/* scoped */const __vue_scope_id__$4=undefined;/* module identifier */const __vue_module_identifier__$4=undefined;/* functional template */const __vue_is_functional_template__$4=false;/* style inject */ /* 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,undefined,undefined,undefined);//
|
|
2141
2141
|
var script$3={props:{config:Object,setFormParams:Function,column:Object,ops:Object,// 请求参数
|
|
2142
|
-
getConfig:Function},components:{Dp:__vue_component__$b,Scope:__vue_component__$4},watch:{ops:function(newVal,old){const{key}=this.getConfig(this.column);const ops=newVal;this.value=[ops[key[0]],ops[key[1]]]||['',''];}},data(){return{trans,visible:false,value:['','']};},methods:{submit(){const{key}=this.getConfig(this.column);this.setFormParams({[key[0]]:this.value[0],[key[1]]:this.value[1]});this.visible=false;},reset(){this.value=['',''];}}};/* script */const __vue_script__$3=script$3;/* template */var __vue_render__$3=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("scope",{attrs:{value:_vm.value},on:{"update:value":function($event){_vm.value=$event;}}}),_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:"
|
|
2142
|
+
getConfig:Function},components:{Dp:__vue_component__$b,Scope:__vue_component__$4},watch:{ops:function(newVal,old){const{key}=this.getConfig(this.column);const ops=newVal;this.value=[ops[key[0]],ops[key[1]]]||['',''];}},data(){return{trans,visible:false,value:['','']};},methods:{submit(){const{key}=this.getConfig(this.column);this.setFormParams({[key[0]]:this.value[0],[key[1]]:this.value[1]});this.visible=false;},reset(){this.value=['',''];}}};/* script */const __vue_script__$3=script$3;/* template */var __vue_render__$3=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("scope",{attrs:{value:_vm.value},on:{"update:value":function($event){_vm.value=$event;}}}),_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__$3=[];__vue_render__$3._withStripped=true;/* style */const __vue_inject_styles__$3=undefined;/* scoped */const __vue_scope_id__$3=undefined;/* module identifier */const __vue_module_identifier__$3=undefined;/* functional template */const __vue_is_functional_template__$3=false;/* style inject */ /* style inject SSR */ /* style inject shadow dom */const __vue_component__$3=/*#__PURE__*/normalizeComponent({render:__vue_render__$3,staticRenderFns:__vue_staticRenderFns__$3},__vue_inject_styles__$3,__vue_script__$3,__vue_scope_id__$3,__vue_is_functional_template__$3,__vue_module_identifier__$3,false,undefined,undefined,undefined);//
|
|
2143
2143
|
var script$2={props:{config:Object,setFormParams:Function,column:Object,ops:Object,// 请求参数
|
|
2144
2144
|
getConfig:Function},components:{Dp:__vue_component__$b},watch:{ops:function(newVal,old){const key=this.key;const ops=newVal;if(ops[key]){this.value=ops[key].split(',');// 约定 基本上check类型的值都是、分割的字符串
|
|
2145
|
-
}else{this.value=[];}}},mounted(){let{key,ruleCorrespond}=this.getConfig(this.column);this.key=key;this.ruleCorrespond=ruleCorrespond;},data(){return{trans,visible:false,limit:50,asyncList:[],value:'',ruleCorrespond:'',key:''};},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__$2=script$2;/* template */var __vue_render__$2=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:"
|
|
2145
|
+
}else{this.value=[];}}},mounted(){let{key,ruleCorrespond}=this.getConfig(this.column);this.key=key;this.ruleCorrespond=ruleCorrespond;},data(){return{trans,visible:false,limit:50,asyncList:[],value:'',ruleCorrespond:'',key:''};},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__$2=script$2;/* template */var __vue_render__$2=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__$2=[];__vue_render__$2._withStripped=true;/* style */const __vue_inject_styles__$2=undefined;/* scoped */const __vue_scope_id__$2=undefined;/* module identifier */const __vue_module_identifier__$2=undefined;/* functional template */const __vue_is_functional_template__$2=false;/* style inject */ /* style inject SSR */ /* style inject shadow dom */const __vue_component__$2=/*#__PURE__*/normalizeComponent({render:__vue_render__$2,staticRenderFns:__vue_staticRenderFns__$2},__vue_inject_styles__$2,__vue_script__$2,__vue_scope_id__$2,__vue_is_functional_template__$2,__vue_module_identifier__$2,false,undefined,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.
|
|
2146
2146
|
// It has been adapted here for stricter adherence to RFC 3986
|
|
2147
2147
|
if(str.length===0){return str;}var string=typeof str==='string'?str:String(str);var out='';for(var i=0;i<string.length;++i){var c=string.charCodeAt(i);if(c===0x2D// -
|
|
2148
2148
|
||c===0x2E// .
|
|
@@ -2191,8 +2191,8 @@ option=[];let arr=Object.keys(tableConfig[initData]);option=arr.map(i=>{return{l
|
|
|
2191
2191
|
}if(!['selectsp','inputsp'].includes(type)){// selectsp inputsp 特殊处理
|
|
2192
2192
|
option=ruleCorrespond(option);}return{option,key,columnProperty,columnPropertyName,type,rule,ruleCorrespond,userFn:ruleFn[columnProperty]};};const formatTable={'check':{valueToStr:(val,{option})=>{const str=val.map(i=>{const s=option.find(r=>r.value===i);if(s&&s.label){return s.label;}return val;});return str;},formToValue:val=>{return val.split(',');}},'radio':{valueToStr:(val,{option})=>{const str=option.find(r=>r.value===val);if(str&&str.label){return str.label;}return val;},formToValue:val=>{return val;}},'inputsp':{valueToStr:val=>{return val;},formToValue:val=>{return val;}},'selectsp':{valueToStr:val=>{return val;},formToValue:val=>{return val.split(',');}},'date':{valueToStr:(val,{rule})=>{const{format}=rule;return`${moment(val).format(format)}`;},formToValue:val=>{return moment(val);}},'dateRange':{valueToStr:(val,{rule})=>{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';}let v1=val[0]?moment(val[0]).format(f1):'';let v2=val[1]?moment(val[1]).format(f2):'';const str=`${v1}${trans('至')}${v2}`;return str;},formToValue:(val,keys)=>{return[val[keys[0]],val[keys[1]]];}},'inputScope':{valueToStr:val=>{const v1=val[0];const v2=val[1];const str=`${v1}${trans('至')}${v2}`;return str;},formToValue:(val,keys)=>{return[val[keys[0]],val[keys[1]]];}}};const formToValue=(formValues,columnsShow,callbackFn,ruleFn)=>{const tagNeedCols={};for(let key in formValues){// 过滤不相关key
|
|
2193
2193
|
const filterKey=['pageSize','skipCount','keywords'];if(!filterKey.includes(key)){// 找到在columns里对照searchKey的rule,方便form转换value
|
|
2194
|
-
let searchKey='';const haveSearchCol=columnsShow.filter(i=>i.queryConfig);const findRes=haveSearchCol.find(i=>{let ruleType='';const{columnProperty,queryConfig:{type,rule}}=i;searchKey=columnProperty;ruleType=Object.prototype.toString.call(rule);if(ruleType!=='[object Array]'){searchKey=rule.searchKey||columnProperty;}// dateRange 数据比较特殊 searchKey = [xxStart,xxEnd]
|
|
2195
|
-
if(type==='dateRange'
|
|
2194
|
+
let searchKey='';const haveSearchCol=columnsShow.filter(i=>i.queryConfig);const findRes=haveSearchCol.find(i=>{let ruleType='';const{columnProperty,queryConfig:{type,rule}}=i;searchKey=columnProperty;ruleType=Object.prototype.toString.call(rule);if(ruleType!=='[object Array]'){searchKey=rule.searchKey||columnProperty;}if(type==='date'||type==='inputScope'){return searchKey.includes(key);}// dateRange 数据比较特殊 searchKey = [xxStart,xxEnd]
|
|
2195
|
+
if(type==='dateRange'&&searchKey.length>2){let findIndex=searchKey.findIndex(i=>i.includes(formValues[key]));if(findIndex==3){return true;}}else if(type==='dateRange'){return searchKey.includes(key);}return searchKey===key;});// 找到对应请求key 进行画tag处理
|
|
2196
2196
|
if(findRes&&findRes.isQuery){let config=getOptions(findRes,ruleFn);let{type,columnPropertyName}=config;// let { columnPropertyName, columnProperty, queryConfig: { type, rule } } = findRes;
|
|
2197
2197
|
// let ruleType = Object.prototype.toString.call(rule)
|
|
2198
2198
|
// let newRule = ruleType !== '[object Array]' ? rule.option : rule
|
|
@@ -2566,4 +2566,4 @@ var myUrl=URL.createObjectURL(myBlob);// 创建a标签,下载图片
|
|
|
2566
2566
|
this.downImg(myUrl);},//base64 转 blob
|
|
2567
2567
|
dataURLtoBlob(dataurl){var arr=dataurl.split(',');var mime=arr[0].match(/:(.*?);/)[1];var bstr=atob(arr[1]),n=bstr.length,u8arr=new Uint8Array(n);while(n--){u8arr[n]=bstr.charCodeAt(n);}return new Blob([u8arr],{type:mime});},//下载图片 filename是图片名称
|
|
2568
2568
|
downImg(url){// 创建a标签 并设置其相关属性,最后触发其点击事件
|
|
2569
|
-
let a=document.createElement("a");let clickEvent=document.createEvent("MouseEvents");a.setAttribute("href",url);a.setAttribute("download",this.fileName);a.setAttribute("target",'_blank');clickEvent.initEvent('click',true,true);a.dispatchEvent(clickEvent);}}};/* 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("div",{staticClass:"HtmlToImg"},[_c("div",{staticStyle:{position:"absolute",top:"-3000px"}},[_vm._t("default")],2)]);};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.1.
|
|
2569
|
+
let a=document.createElement("a");let clickEvent=document.createEvent("MouseEvents");a.setAttribute("href",url);a.setAttribute("download",this.fileName);a.setAttribute("target",'_blank');clickEvent.initEvent('click',true,true);a.dispatchEvent(clickEvent);}}};/* 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("div",{staticClass:"HtmlToImg"},[_c("div",{staticStyle:{position:"absolute",top:"-3000px"}},[_vm._t("default")],2)]);};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.1.5";const components=[__vue_component__$g,__vue_component__$f,__vue_component__$e,__vue_component__$d,__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 FormTableScheme,__vue_component__$f as HelloVue,__vue_component__ as HtmlToImg,__vue_component__$g as MyButton,__vue_component__$d as ShowFile,__vue_component__$e as UploadFile,index as default,install};
|