yahee-components 0.0.25 → 0.0.26
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as oe, toRefs as re, ref as u, openBlock as i, createBlock as h, unref as e, withCtx as t, createElementVNode as C, createVNode as o, withKeys as se, createSlots as ne, createElementBlock as
|
|
1
|
+
import { defineComponent as oe, toRefs as re, ref as u, openBlock as i, createBlock as h, unref as e, withCtx as t, createElementVNode as C, createVNode as o, withKeys as se, createSlots as ne, createElementBlock as T, Fragment as _, renderList as O, createTextVNode as S, toDisplayString as v, createCommentVNode as I } from "vue";
|
|
2
2
|
import y from "../_virtual/lodash.js";
|
|
3
3
|
import { ElConfigProvider as ue, ElInput as K, ElIcon as ie, ElSelect as G, ElOption as U, ElCheckbox as ce, ElLink as de, ElDialog as pe, ElButton as L, ElForm as me, ElRow as E, ElFormItem as R } from "element-plus";
|
|
4
4
|
import "element-plus/theme-chalk/src/base.scss";
|
|
@@ -58,14 +58,14 @@ const ve = { class: "yahee-complex-search" }, ye = { class: "search-type-checkbo
|
|
|
58
58
|
}, B = () => {
|
|
59
59
|
f.value = !1;
|
|
60
60
|
}, Z = () => {
|
|
61
|
-
m.value || (delete r.value.
|
|
61
|
+
m.value || (delete r.value.putSearch, p("filterChangeGrandson", r.value));
|
|
62
62
|
}, $ = () => r.value, k = () => {
|
|
63
63
|
c.value ? le() : p("filterChangeGrandson", $());
|
|
64
64
|
}, ee = (d, l) => {
|
|
65
65
|
const a = { ...d };
|
|
66
66
|
return y.map(x.value, (n) => n.key).includes(l.filterKey) ? x.value.forEach((n) => delete a[n.key]) : delete a[l.filterKey], a;
|
|
67
67
|
};
|
|
68
|
-
function
|
|
68
|
+
function P(d) {
|
|
69
69
|
y.forEach(d, (l) => {
|
|
70
70
|
ee(r.value, l);
|
|
71
71
|
const { checkedValues: a, filterKey: n } = l;
|
|
@@ -73,19 +73,19 @@ const ve = { class: "yahee-complex-search" }, ye = { class: "search-type-checkbo
|
|
|
73
73
|
}), p("filterChangeGrandson", r.value);
|
|
74
74
|
}
|
|
75
75
|
const le = () => {
|
|
76
|
-
m.value ?
|
|
76
|
+
m.value ? P([
|
|
77
77
|
{
|
|
78
|
-
filterKey: "
|
|
78
|
+
filterKey: "putSearch",
|
|
79
79
|
checkedValues: c.value
|
|
80
80
|
}
|
|
81
81
|
]) : p("filterChangeGrandson", {
|
|
82
|
-
|
|
82
|
+
putSearch: c.value
|
|
83
83
|
});
|
|
84
84
|
}, ae = () => {
|
|
85
85
|
q.value(g.value, c.value);
|
|
86
86
|
}, te = () => {
|
|
87
87
|
F.value.validate((d) => {
|
|
88
|
-
d && (V.value = !0, m.value ?
|
|
88
|
+
d && (V.value = !0, m.value ? P([
|
|
89
89
|
{
|
|
90
90
|
filterKey: "putSearch",
|
|
91
91
|
checkedValues: s.value.searchContent
|
|
@@ -136,7 +136,7 @@ const ve = { class: "yahee-complex-search" }, ye = { class: "search-type-checkbo
|
|
|
136
136
|
class: "custom-select"
|
|
137
137
|
}, {
|
|
138
138
|
default: t(() => [
|
|
139
|
-
(i(!0), _
|
|
139
|
+
(i(!0), T(_, null, O(e(w), (a) => (i(), h(e(U), {
|
|
140
140
|
key: a.label,
|
|
141
141
|
label: a.label,
|
|
142
142
|
value: a.value
|
|
@@ -226,7 +226,7 @@ const ve = { class: "yahee-complex-search" }, ye = { class: "search-type-checkbo
|
|
|
226
226
|
class: "custom-select"
|
|
227
227
|
}, {
|
|
228
228
|
default: t(() => [
|
|
229
|
-
(i(!0), _
|
|
229
|
+
(i(!0), T(_, null, O(e(w), (a) => (i(), h(e(U), {
|
|
230
230
|
key: a.label,
|
|
231
231
|
label: a.label,
|
|
232
232
|
value: a.value
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),f=require("../_virtual/lodash.js"),a=require("element-plus");require("element-plus/theme-chalk/src/base.scss");require("element-plus/theme-chalk/src/input.scss");require("element-plus/theme-chalk/src/checkbox.scss");require("element-plus/theme-chalk/src/tag.scss");require("element-plus/theme-chalk/src/option.scss");require("element-plus/theme-chalk/src/option-group.scss");require("element-plus/theme-chalk/src/scrollbar.scss");require("element-plus/theme-chalk/src/popper.scss");require("element-plus/theme-chalk/src/select.scss");require("element-plus/theme-chalk/src/dialog.scss");require("element-plus/theme-chalk/src/overlay.scss");require("element-plus/theme-chalk/src/form.scss");require("element-plus/theme-chalk/src/form-item.scss");require("element-plus/theme-chalk/src/row.scss");require("element-plus/theme-chalk/src/button.scss");require("element-plus/theme-chalk/src/link.scss");require("element-plus/theme-chalk/src/config-provider.scss");const U=require("@element-plus/icons-vue"),W=require("../packages/components/node_modules/element-plus/es/locale/lang/zh-cn.js"),z={class:"yahee-complex-search"},H={class:"search-type-checkbox"},A={class:"dialog-footer"},X=e.defineComponent({name:"YaheeComplexSearch",__name:"complex-search",props:{dealSearch:{type:Function,default:f.noop},pasteFormat:{type:Function,default:f.noop},defaultSearch:{default:""},options:{default:()=>[]},placeholderText:{default:""},showPatchSearch:{type:Boolean,default:!1},showWithinFilterCheckbox:{type:Boolean,default:!1},specialOptions:{default:()=>[]},normalOptions:{default:()=>[]},showSelect:{type:Boolean,default:!1},searchItem:{default:()=>({})}},emits:["filterChangeGrandson"],setup(x,{emit:k}){const g=W,c=k,E=x,{dealSearch:N,defaultSearch:q,pasteFormat:v,options:C,showPatchSearch:B,specialOptions:V,showWithinFilterCheckbox:b,placeholderText:F,normalOptions:T,showSelect:
|
|
1
|
+
"use strict";const e=require("vue"),f=require("../_virtual/lodash.js"),a=require("element-plus");require("element-plus/theme-chalk/src/base.scss");require("element-plus/theme-chalk/src/input.scss");require("element-plus/theme-chalk/src/checkbox.scss");require("element-plus/theme-chalk/src/tag.scss");require("element-plus/theme-chalk/src/option.scss");require("element-plus/theme-chalk/src/option-group.scss");require("element-plus/theme-chalk/src/scrollbar.scss");require("element-plus/theme-chalk/src/popper.scss");require("element-plus/theme-chalk/src/select.scss");require("element-plus/theme-chalk/src/dialog.scss");require("element-plus/theme-chalk/src/overlay.scss");require("element-plus/theme-chalk/src/form.scss");require("element-plus/theme-chalk/src/form-item.scss");require("element-plus/theme-chalk/src/row.scss");require("element-plus/theme-chalk/src/button.scss");require("element-plus/theme-chalk/src/link.scss");require("element-plus/theme-chalk/src/config-provider.scss");const U=require("@element-plus/icons-vue"),W=require("../packages/components/node_modules/element-plus/es/locale/lang/zh-cn.js"),z={class:"yahee-complex-search"},H={class:"search-type-checkbox"},A={class:"dialog-footer"},X=e.defineComponent({name:"YaheeComplexSearch",__name:"complex-search",props:{dealSearch:{type:Function,default:f.noop},pasteFormat:{type:Function,default:f.noop},defaultSearch:{default:""},options:{default:()=>[]},placeholderText:{default:""},showPatchSearch:{type:Boolean,default:!1},showWithinFilterCheckbox:{type:Boolean,default:!1},specialOptions:{default:()=>[]},normalOptions:{default:()=>[]},showSelect:{type:Boolean,default:!1},searchItem:{default:()=>({})}},emits:["filterChangeGrandson"],setup(x,{emit:k}){const g=W,c=k,E=x,{dealSearch:N,defaultSearch:q,pasteFormat:v,options:C,showPatchSearch:B,specialOptions:V,showWithinFilterCheckbox:b,placeholderText:F,normalOptions:T,showSelect:P,searchItem:r}=e.toRefs(E),h=e.ref(q.value),u=e.ref(""),i=e.ref(!1),p=e.ref(!1),d=e.ref(!1),y=e.ref(null),o=e.ref({searchType:"WHOLE_SEARCH",searchContent:""}),I={selectedSearchType:[{required:!0,message:"请输入查询类型",trigger:"blur"}],searchContent:[{required:!0,message:"请输入查询内容",trigger:"blur"}]},O=()=>{d.value=!0},w=()=>{d.value=!1},_=()=>{i.value||(delete r.value.putSearch,c("filterChangeGrandson",r.value))},D=()=>r.value,m=()=>{u.value?R():c("filterChangeGrandson",D())},K=(s,t)=>{const l={...s};return f.map(V.value,n=>n.key).includes(t.filterKey)?V.value.forEach(n=>delete l[n.key]):delete l[t.filterKey],l};function S(s){f.forEach(s,t=>{K(r.value,t);const{checkedValues:l,filterKey:n}=t;f.isEmpty(l)||(T.value.includes(n)?r.value[n]=l[0]:r.value[n]=l)}),c("filterChangeGrandson",r.value)}const R=()=>{i.value?S([{filterKey:"putSearch",checkedValues:u.value}]):c("filterChangeGrandson",{putSearch:u.value})},G=()=>{N.value(h.value,u.value)},L=()=>{y.value.validate(s=>{s&&(p.value=!0,i.value?S([{filterKey:"putSearch",checkedValues:o.value.searchContent}]):c("filterChangeGrandson",{putSearch:o.value.searchContent}),d.value=!1,p.value=!1)})};return(s,t)=>(e.openBlock(),e.createBlock(e.unref(a.ElConfigProvider),{locale:e.unref(g)},{default:e.withCtx(()=>[e.createElementVNode("div",z,[e.createVNode(e.unref(a.ElInput),{modelValue:u.value,"onUpdate:modelValue":t[1]||(t[1]=l=>u.value=l),placeholder:e.unref(F),class:"input-with-select",clearable:"",maxlength:"30",onChange:m,onKeyup:e.withKeys(m,["enter"]),onPaste:e.unref(v),onClear:G},e.createSlots({append:e.withCtx(()=>[e.createVNode(e.unref(a.ElIcon),{size:"12",color:"#3366cc",style:{cursor:"pointer"},class:"icon-cusor",onClick:m},{default:e.withCtx(()=>[e.createVNode(e.unref(U.Search))]),_:1})]),_:2},[e.unref(P)?{name:"prepend",fn:e.withCtx(()=>[e.createVNode(e.unref(a.ElSelect),{modelValue:h.value,"onUpdate:modelValue":t[0]||(t[0]=l=>h.value=l),size:"small",class:"custom-select"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(C),l=>(e.openBlock(),e.createBlock(e.unref(a.ElOption),{key:l.label,label:l.label,value:l.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),key:"0"}:void 0]),1032,["modelValue","placeholder","onPaste"]),e.createElementVNode("div",H,[e.unref(b)?(e.openBlock(),e.createBlock(e.unref(a.ElCheckbox),{key:0,modelValue:i.value,"onUpdate:modelValue":t[2]||(t[2]=l=>i.value=l),onChange:_},{default:e.withCtx(()=>t[6]||(t[6]=[e.createTextVNode(e.toDisplayString("在筛选条件内查询"))])),_:1},8,["modelValue"])):e.createCommentVNode("",!0),e.unref(B)?(e.openBlock(),e.createBlock(e.unref(a.ElLink),{key:1,type:"primary",onClick:O},{default:e.withCtx(()=>t[7]||(t[7]=[e.createTextVNode(e.toDisplayString("批量查询"))])),_:1})):e.createCommentVNode("",!0)])]),e.createVNode(e.unref(a.ElDialog),{modelValue:d.value,"onUpdate:modelValue":t[5]||(t[5]=l=>d.value=l),title:"批量查询",width:"30%","before-close":w,"append-to-body":!0,draggable:""},{footer:e.withCtx(()=>[e.createElementVNode("div",A,[e.createVNode(e.unref(a.ElButton),{type:"primary",loading:p.value,onClick:L},{default:e.withCtx(()=>t[9]||(t[9]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1},8,["loading"]),e.createVNode(e.unref(a.ElButton),{onClick:w},{default:e.withCtx(()=>t[10]||(t[10]=[e.createTextVNode(e.toDisplayString("关闭"))])),_:1})])]),default:e.withCtx(()=>[e.createVNode(e.unref(a.ElForm),{ref_key:"batchSearchFormRef",ref:y,model:o.value,rules:I},{default:e.withCtx(()=>[e.createVNode(e.unref(a.ElRow),{class:"row-class"},{default:e.withCtx(()=>t[8]||(t[8]=[e.createElementVNode("span",null,e.toDisplayString("综合搜索"),-1)])),_:1}),e.createVNode(e.unref(a.ElRow),{class:"row-class"},{default:e.withCtx(()=>[e.createVNode(e.unref(a.ElFormItem),{prop:"searchType"},{default:e.withCtx(()=>[e.createVNode(e.unref(a.ElSelect),{modelValue:o.value.searchType,"onUpdate:modelValue":t[3]||(t[3]=l=>o.value.searchType=l),size:"small",class:"custom-select"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(C),l=>(e.openBlock(),e.createBlock(e.unref(a.ElOption),{key:l.label,label:l.label,value:l.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),e.createVNode(e.unref(a.ElRow),{class:"row-class"},{default:e.withCtx(()=>[e.createVNode(e.unref(a.ElFormItem),{prop:"searchContent",style:{width:"100%"}},{default:e.withCtx(()=>[e.createVNode(e.unref(a.ElInput),{modelValue:o.value.searchContent,"onUpdate:modelValue":t[4]||(t[4]=l=>o.value.searchContent=l),placeholder:"请输入批量查询内容,从EXCEL复制可自动替换为`,`",type:"textarea",rows:5,onPaste:e.unref(v)},null,8,["modelValue","onPaste"])]),_:1})]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"])]),_:1},8,["locale"]))}});module.exports=X;
|