general-basic-form 1.0.35 → 1.0.36
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/dist/index.js +59 -12
- package/dist/index.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -14,9 +14,9 @@ function u(r, e, n, t, s, o, p, d) {
|
|
|
14
14
|
} : s), l)
|
|
15
15
|
if (a.functional) {
|
|
16
16
|
a._injectStyles = l;
|
|
17
|
-
var
|
|
18
|
-
a.render = function(
|
|
19
|
-
return l.call(f), _
|
|
17
|
+
var h = a.render;
|
|
18
|
+
a.render = function(_, f) {
|
|
19
|
+
return l.call(f), h(_, f);
|
|
20
20
|
};
|
|
21
21
|
} else {
|
|
22
22
|
var c = a.beforeCreate;
|
|
@@ -27,7 +27,7 @@ function u(r, e, n, t, s, o, p, d) {
|
|
|
27
27
|
options: a
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
|
-
const
|
|
30
|
+
const m = {
|
|
31
31
|
props: {
|
|
32
32
|
verificationSetting: {
|
|
33
33
|
type: Object,
|
|
@@ -75,12 +75,12 @@ const y = {
|
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
};
|
|
78
|
-
var
|
|
78
|
+
var y = function() {
|
|
79
79
|
var e = this, n = e._self._c;
|
|
80
80
|
return n("el-button", { on: { click: e.buttonClick } }, [e._v(e._s(e.buttonType ? e.defaultText : e.buttonText + "s"))]);
|
|
81
81
|
}, g = [], b = /* @__PURE__ */ u(
|
|
82
|
-
y,
|
|
83
82
|
m,
|
|
83
|
+
y,
|
|
84
84
|
g,
|
|
85
85
|
!1,
|
|
86
86
|
null,
|
|
@@ -182,6 +182,10 @@ const k = {
|
|
|
182
182
|
"start-placeholder": "开始日期",
|
|
183
183
|
"end-placeholder": "结束日期",
|
|
184
184
|
type: "daterange"
|
|
185
|
+
},
|
|
186
|
+
attrs: {
|
|
187
|
+
inline: !0,
|
|
188
|
+
"label-position": "left"
|
|
185
189
|
}
|
|
186
190
|
};
|
|
187
191
|
},
|
|
@@ -218,6 +222,16 @@ const k = {
|
|
|
218
222
|
},
|
|
219
223
|
deep: !0
|
|
220
224
|
},
|
|
225
|
+
$attrs: {
|
|
226
|
+
handler(r) {
|
|
227
|
+
this.attrs = {
|
|
228
|
+
...this.attrs,
|
|
229
|
+
...r
|
|
230
|
+
};
|
|
231
|
+
},
|
|
232
|
+
immediate: !0,
|
|
233
|
+
deep: !0
|
|
234
|
+
},
|
|
221
235
|
loading(r) {
|
|
222
236
|
this.formLoading !== r && (this.formLoading = r);
|
|
223
237
|
},
|
|
@@ -290,7 +304,7 @@ const k = {
|
|
|
290
304
|
};
|
|
291
305
|
var S = function() {
|
|
292
306
|
var e = this, n = e._self._c;
|
|
293
|
-
return n("el-form", e._b({ directives: [{ name: "show", rawName: "v-show", value: e.showSearch, expression: "showSearch" }], ref: "queryFormRef", attrs: { model: e.queryParams,
|
|
307
|
+
return n("el-form", e._b({ directives: [{ name: "show", rawName: "v-show", value: e.showSearch, expression: "showSearch" }], ref: "queryFormRef", attrs: { model: e.queryParams, "label-width": e.labelWidth } }, "el-form", e.attrs, !1), [e._l(e.formItem, function(t) {
|
|
294
308
|
return n("el-form-item", { key: t.prop, attrs: { label: t.label, prop: t.prop, rules: e.getItemRules(t) } }, [t.type === "input" ? n("el-input", e._b({ attrs: { size: e.size }, nativeOn: { keydown: function(s) {
|
|
295
309
|
return !s.type.indexOf("key") && e._k(s.keyCode, "enter", 13, s.key, "Enter") ? null : e.getList.apply(null, arguments);
|
|
296
310
|
} }, scopedSlots: e._u([e._l(t.template, function(s, o) {
|
|
@@ -325,7 +339,7 @@ var S = function() {
|
|
|
325
339
|
x,
|
|
326
340
|
!1,
|
|
327
341
|
null,
|
|
328
|
-
"
|
|
342
|
+
"7fc8eb2b",
|
|
329
343
|
null,
|
|
330
344
|
null
|
|
331
345
|
);
|
|
@@ -363,9 +377,22 @@ const C = {
|
|
|
363
377
|
data() {
|
|
364
378
|
var r, e;
|
|
365
379
|
return {
|
|
366
|
-
keyWord: ((e = (r = this.$route) == null ? void 0 : r.query) == null ? void 0 : e.keyWord) || ""
|
|
380
|
+
keyWord: ((e = (r = this.$route) == null ? void 0 : r.query) == null ? void 0 : e.keyWord) || "",
|
|
381
|
+
attrs: {}
|
|
367
382
|
};
|
|
368
383
|
},
|
|
384
|
+
watch: {
|
|
385
|
+
$attrs: {
|
|
386
|
+
handler(r) {
|
|
387
|
+
this.attrs = {
|
|
388
|
+
...this.attrs,
|
|
389
|
+
...r
|
|
390
|
+
};
|
|
391
|
+
},
|
|
392
|
+
immediate: !0,
|
|
393
|
+
deep: !0
|
|
394
|
+
}
|
|
395
|
+
},
|
|
369
396
|
methods: {
|
|
370
397
|
search() {
|
|
371
398
|
const r = { path: this.routePath, query: { ...this.query, keyWord: this.keyWord } };
|
|
@@ -383,14 +410,14 @@ var $ = function() {
|
|
|
383
410
|
return !t.type.indexOf("key") && e._k(t.keyCode, "enter", 13, t.key, "Enter") ? null : e.search.apply(null, arguments);
|
|
384
411
|
} }, model: { value: e.keyWord, callback: function(t) {
|
|
385
412
|
e.keyWord = t;
|
|
386
|
-
}, expression: "keyWord" } }, "el-input", e
|
|
413
|
+
}, expression: "keyWord" } }, "el-input", e.attrs, !1), [n("svg", { staticClass: "el-input__icon", attrs: { slot: "prefix", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" }, slot: "prefix" }, [n("path", { attrs: { d: "M9.51033 10.2186C8.69189 10.8814 7.64943 11.2784 6.51424 11.2784C3.88302 11.2784 1.75 9.14541 1.75 6.51421C1.75 3.88301 3.88302 1.75 6.51424 1.75C9.14545 1.75 11.2785 3.88301 11.2785 6.51421C11.2785 7.64942 10.8814 8.69189 10.2186 9.51034L13.75 13.0417L13.0417 13.75L9.51033 10.2186ZM10.2768 6.51421C10.2768 4.43623 8.59224 2.75168 6.51424 2.75168C4.43623 2.75168 2.75168 4.43623 2.75168 6.51421C2.75168 8.59219 4.43623 10.2767 6.51424 10.2767C8.59224 10.2767 10.2768 8.59219 10.2768 6.51421Z", fill: "#959A9F" } })])])], 1);
|
|
387
414
|
}, w = [], T = /* @__PURE__ */ u(
|
|
388
415
|
C,
|
|
389
416
|
$,
|
|
390
417
|
w,
|
|
391
418
|
!1,
|
|
392
419
|
null,
|
|
393
|
-
"
|
|
420
|
+
"ef706e31",
|
|
394
421
|
null,
|
|
395
422
|
null
|
|
396
423
|
);
|
|
@@ -416,6 +443,14 @@ const z = T.exports, I = {
|
|
|
416
443
|
components: {
|
|
417
444
|
DescriptionsColumn: I
|
|
418
445
|
},
|
|
446
|
+
data() {
|
|
447
|
+
return {
|
|
448
|
+
attrs: {
|
|
449
|
+
border: !0,
|
|
450
|
+
class: "v-descriptions"
|
|
451
|
+
}
|
|
452
|
+
};
|
|
453
|
+
},
|
|
419
454
|
props: {
|
|
420
455
|
formItem: {
|
|
421
456
|
// 定义表单的数据
|
|
@@ -428,11 +463,23 @@ const z = T.exports, I = {
|
|
|
428
463
|
default: () => {
|
|
429
464
|
}
|
|
430
465
|
}
|
|
466
|
+
},
|
|
467
|
+
watch: {
|
|
468
|
+
$attrs: {
|
|
469
|
+
handler(r) {
|
|
470
|
+
this.attrs = {
|
|
471
|
+
...this.attrs,
|
|
472
|
+
...r
|
|
473
|
+
};
|
|
474
|
+
},
|
|
475
|
+
immediate: !0,
|
|
476
|
+
deep: !0
|
|
477
|
+
}
|
|
431
478
|
}
|
|
432
479
|
};
|
|
433
480
|
var B = function() {
|
|
434
481
|
var e = this, n = e._self._c;
|
|
435
|
-
return n("el-descriptions", e._b({
|
|
482
|
+
return n("el-descriptions", e._b({}, "el-descriptions", e.attrs, !1), e._l(e.formItem, function(t, s) {
|
|
436
483
|
return n("el-descriptions-item", e._b({ key: t.prop, attrs: { label: t.label } }, "el-descriptions-item", t.descriptionsItemProps, !1), [t.render ? n("DescriptionsColumn", { attrs: { column: t, formData: e.formData } }) : n("span", [e._v(e._s(e.formData[t.prop]))])], 1);
|
|
437
484
|
}), 1);
|
|
438
485
|
}, D = [], R = /* @__PURE__ */ u(
|
package/dist/index.umd.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(l,p){typeof exports=="object"&&typeof module<"u"?p(exports):typeof define=="function"&&define.amd?define(["exports"],p):(l=typeof globalThis<"u"?globalThis:l||self,p(l.Index={}))})(this,function(l){"use strict";const p="";function c(r,e,n,t,s,o,f,W){var a=typeof r=="function"?r.options:r;e&&(a.render=e,a.staticRenderFns=n,a._compiled=!0),t&&(a.functional=!0),o&&(a._scopeId="data-v-"+o);var u;if(f?(u=function(i){i=i||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!i&&typeof __VUE_SSR_CONTEXT__<"u"&&(i=__VUE_SSR_CONTEXT__),s&&s.call(this,i),i&&i._registeredComponents&&i._registeredComponents.add(f)},a._ssrRegister=u):s&&(u=W?function(){s.call(this,(a.functional?this.parent:this).$root.$options.shadowRoot)}:s),u)if(a.functional){a._injectStyles=u;var V=a.render;a.render=function(U,h){return u.call(h),V(U,h)}}else{var d=a.beforeCreate;a.beforeCreate=d?[].concat(d,u):[u]}return{exports:r,options:a}}const _={props:{verificationSetting:{type:Object,default:()=>{}},getSmscode:{type:Function,default:()=>{}}},data(){return{defaultText:this.verificationSetting.defaultText||"获取验证码",buttonText:this.verificationSetting.defaultText||"获取验证码",restTime:this.verificationSetting.restTime||60,timer:null}},computed:{buttonType(){return this.buttonText===this.defaultText}},destroyed(){this.reset()},methods:{reset(){this.timer&&(clearInterval(this.timer),this.timer=null,this.buttonText=this.defaultText)},async buttonClick(){if(this.buttonText===this.defaultText)if(this.buttonText=this.restTime,this.timer=setInterval(()=>{if(Number(this.buttonText)<=0||!this.buttonText){this.reset();return}else this.buttonText=Number(this.buttonText)-1},1e3),this.getSmscode)await this.getSmscode()===!1&&this.reset();else return}}};var y=function(){var e=this,n=e._self._c;return n("el-button",{on:{click:e.buttonClick}},[e._v(e._s(e.buttonType?e.defaultText:e.buttonText+"s"))])},m=[],g=c(_,y,m,!1,null,null,null,null);const b=g.exports,j="",v={name:"GeneralBasicForm",components:{InputArchive:r=>{const{templateEle:e}=r;return e()},VerificationButton:b},props:{showSearch:{type:Boolean,default:!0},loading:{type:Boolean,default:!1},formOnly:{type:Boolean,default:!1},getList:{type:Function,default:()=>{}},afterReset:{type:Function,default:()=>{}},formItem:{type:Array,default:[]},size:{type:String,default:""},labelWidth:{type:String,default:"90px"},noUrlParameters:{type:Boolean,default:()=>!1},formData:{type:Object,default:()=>{}},noInputBlank:{type:Boolean,default:()=>!1}},data(){var r;return{queryParams:{...this.noUrlParameters?{}:(r=this.$route)==null?void 0:r.query},formLoading:this.loading||!1,selectSetting:{placeholder:"请选择",filterable:!0,clearable:!0,style:"width: 200px"},inputSetting:{placeholder:"请输入",style:"width: 200px",clearable:!0},datePackerSetting:{style:"width: 227px","start-placeholder":"开始日期","end-placeholder":"结束日期",type:"daterange"}}},watch:{formData:{handler(r,e){JSON.stringify(r)!==JSON.stringify(e)&&(this.queryParams={...this.noUrlParameters?{}:this.queryParams,...r})},immediate:!0},queryParams:{handler(r){this.$emit("update:formData",r)},deep:!0},loading(r){this.formLoading!==r&&(this.formLoading=r)},formLoading(r){this.loading!==r&&this.$emit("update:loading",r)}},methods:{handleQuery(){var n;const r={page:1,limit:10},e={...(n=this.$route)==null?void 0:n.query,...this.queryParams,...r};this.noUrlParameters||this.$router.push({query:{...e}}),this.getList({...e})},async resetQuery(){var e;this.$refs.queryFormRef.resetFields();const r={page:1};this.noUrlParameters||await this.$router.push({query:{...r}}),this.queryParams={...this.noUrlParameters?{}:(e=this.$route)==null?void 0:e.query},this.afterReset(),this.handleQuery()},currentInputComponent(){return"input-archive"},getItemRules(r){const{type:e,rules:n=[]}=r,t=[...n];return this.noInputBlank&&e==="input"&&t.push({pattern:this.trimRegex,message:"请输入(不能仅输入空格)",trigger:"blur"}),t},getInputSetting(r){const{inputSetting:e,setting:n}=r;return{...this.inputSetting,...e,...n}},getSelectSetting(r){const{selectSetting:e,setting:n}=r;return{...this.selectSetting,...e,...n}},getDatePackerSetting(r){const{datePackerSetting:e,setting:n}=r;return{...this.datePackerSetting,...e,...n}}}};var k=function(){var e=this,n=e._self._c;return n("el-form",e._b({directives:[{name:"show",rawName:"v-show",value:e.showSearch,expression:"showSearch"}],ref:"queryFormRef",attrs:{model:e.queryParams,inline:"","label-position":"left","label-width":e.labelWidth}},"el-form",e.$attrs,!1),[e._l(e.formItem,function(t){return n("el-form-item",{key:t.prop,attrs:{label:t.label,prop:t.prop,rules:e.getItemRules(t)}},[t.type==="input"?n("el-input",e._b({attrs:{size:e.size},nativeOn:{keydown:function(s){return!s.type.indexOf("key")&&e._k(s.keyCode,"enter",13,s.key,"Enter")?null:e.getList.apply(null,arguments)}},scopedSlots:e._u([e._l(t.template,function(s,o){return{key:o,fn:function(){return[s?n(e.currentInputComponent(),{key:o,tag:"component",attrs:{templateEle:s}}):e._e()]},proxy:!0}})],null,!0),model:{value:e.queryParams[t.prop],callback:function(s){e.$set(e.queryParams,t.prop,s)},expression:"queryParams[item.prop]"}},"el-input",e.getInputSetting(t),!1)):t.type==="input-mobile-verification"?n("el-input",e._b({attrs:{size:e.size},nativeOn:{keydown:function(s){return!s.type.indexOf("key")&&e._k(s.keyCode,"enter",13,s.key,"Enter")?null:e.getList.apply(null,arguments)}},scopedSlots:e._u([e._l(t.template,function(s,o){return{key:o,fn:function(){return[s?n(e.currentInputComponent(),{key:o,tag:"component",attrs:{templateEle:s}}):e._e()]},proxy:!0}})],null,!0),model:{value:e.queryParams[t.prop],callback:function(s){e.$set(e.queryParams,t.prop,s)},expression:"queryParams[item.prop]"}},"el-input",e.getInputSetting(t),!1),[n("template",{slot:"append"},[n("verification-button",{attrs:{verificationSetting:t.verificationSetting,getSmscode:t.getSmscode}})],1)],2):t.type==="select"?n("el-select",e._b({attrs:{filterable:"",size:e.size},model:{value:e.queryParams[t.prop],callback:function(s){e.$set(e.queryParams,t.prop,s)},expression:"queryParams[item.prop]"}},"el-select",e.getSelectSetting(t),!1),e._l(t.option||[],function(s){return n("el-option",{key:s.value,attrs:{label:s.label,value:s.value}})}),1):t.type==="cascader"?n("el-cascader",e._b({attrs:{filterable:"",size:e.size,options:t.options||[]},model:{value:e.queryParams[t.prop],callback:function(s){e.$set(e.queryParams,t.prop,s)},expression:"queryParams[item.prop]"}},"el-cascader",e.getSelectSetting(t),!1)):t.type==="date-picker"?n("el-date-picker",e._b({attrs:{size:e.size},model:{value:e.queryParams[t.prop],callback:function(s){e.$set(e.queryParams,t.prop,s)},expression:"queryParams[item.prop]"}},"el-date-picker",e.getDatePackerSetting(t),!1)):e._e(),t.type==="input-number"?n("el-input-number",e._b({attrs:{size:e.size},model:{value:e.queryParams[t.prop],callback:function(s){e.$set(e.queryParams,t.prop,s)},expression:"queryParams[item.prop]"}},"el-input-number",e.getInputSetting(t),!1)):e._e()],1)}),e._t("default"),e.formOnly?e._e():n("el-form-item",[n("el-button",{attrs:{type:"primary",icon:"el-icon-search",size:e.size,loading:e.formLoading},on:{click:e.handleQuery}},[e._v("查询")]),n("el-button",{attrs:{icon:"el-icon-refresh",size:e.size},on:{click:e.resetQuery}},[e._v("重置")])],1),e._t("behind-the-button")],2)},S=[],x=c(v,k,S,!1,null,"eb469405",null,null);const P=x.exports,N="",q={components:{},props:{query:{type:Object,default:()=>({prefCode:sessionStorage.getItem("prefCode")})},routePath:{type:String,default:()=>"/search/searchDetail"},inputstyle:{type:Object,default:()=>({width:"1280px"})},openHref:{type:Boolean,default:()=>!1},size:{type:String,default:()=>"medium"}},data(){var r,e;return{keyWord:((e=(r=this.$route)==null?void 0:r.query)==null?void 0:e.keyWord)||""}},methods:{search(){const r={path:this.routePath,query:{...this.query,keyWord:this.keyWord}};if(this.openHref){const e=this.$router.resolve(r);window.open(e.href,"_blank")}else this.$router.push(r)}}};var C=function(){var e=this,n=e._self._c;return n("div",{staticClass:"search-box"},[n("el-input",e._b({style:{...e.inputstyle},attrs:{size:e.size},nativeOn:{keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.search.apply(null,arguments)}},model:{value:e.keyWord,callback:function(t){e.keyWord=t},expression:"keyWord"}},"el-input",e.$attrs,!1),[n("svg",{staticClass:"el-input__icon",attrs:{slot:"prefix",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},slot:"prefix"},[n("path",{attrs:{d:"M9.51033 10.2186C8.69189 10.8814 7.64943 11.2784 6.51424 11.2784C3.88302 11.2784 1.75 9.14541 1.75 6.51421C1.75 3.88301 3.88302 1.75 6.51424 1.75C9.14545 1.75 11.2785 3.88301 11.2785 6.51421C11.2785 7.64942 10.8814 8.69189 10.2186 9.51034L13.75 13.0417L13.0417 13.75L9.51033 10.2186ZM10.2768 6.51421C10.2768 4.43623 8.59224 2.75168 6.51424 2.75168C4.43623 2.75168 2.75168 4.43623 2.75168 6.51421C2.75168 8.59219 4.43623 10.2767 6.51424 10.2767C8.59224 10.2767 10.2768 8.59219 10.2768 6.51421Z",fill:"#959A9F"}})])])],1)},$=[],T=c(q,C,$,!1,null,"f4757253",null,null);const w=T.exports,z={name:"Descriptions",components:{DescriptionsColumn:{functional:!0,props:{column:{default:{render:()=>{}},type:Object},formData:{default:{},type:Object}},render(r,e){const{props:n}=e,{column:t,formData:s}=n;return t.render(s)}}},props:{formItem:{type:Array,default:[]},formData:{type:Object,default:()=>{}}}};var I=function(){var e=this,n=e._self._c;return n("el-descriptions",e._b({staticClass:"v-descriptions",attrs:{border:""}},"el-descriptions",e.$attrs,!1),e._l(e.formItem,function(t,s){return n("el-descriptions-item",e._b({key:t.prop,attrs:{label:t.label}},"el-descriptions-item",t.descriptionsItemProps,!1),[t.render?n("DescriptionsColumn",{attrs:{column:t,formData:e.formData}}):n("span",[e._v(e._s(e.formData[t.prop]))])],1)}),1)},B=[],D=c(z,I,B,!1,null,null,null,null);const O=D.exports,F=P,R=w,L=O;l.VDescriptions=L,l.VGeneralBasicForm=F,l.VSearchBox=R,Object.defineProperty(l,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
(function(l,p){typeof exports=="object"&&typeof module<"u"?p(exports):typeof define=="function"&&define.amd?define(["exports"],p):(l=typeof globalThis<"u"?globalThis:l||self,p(l.Index={}))})(this,function(l){"use strict";const p="";function c(r,e,n,t,s,i,f,W){var a=typeof r=="function"?r.options:r;e&&(a.render=e,a.staticRenderFns=n,a._compiled=!0),t&&(a.functional=!0),i&&(a._scopeId="data-v-"+i);var u;if(f?(u=function(o){o=o||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!o&&typeof __VUE_SSR_CONTEXT__<"u"&&(o=__VUE_SSR_CONTEXT__),s&&s.call(this,o),o&&o._registeredComponents&&o._registeredComponents.add(f)},a._ssrRegister=u):s&&(u=W?function(){s.call(this,(a.functional?this.parent:this).$root.$options.shadowRoot)}:s),u)if(a.functional){a._injectStyles=u;var V=a.render;a.render=function(U,h){return u.call(h),V(U,h)}}else{var d=a.beforeCreate;a.beforeCreate=d?[].concat(d,u):[u]}return{exports:r,options:a}}const m={props:{verificationSetting:{type:Object,default:()=>{}},getSmscode:{type:Function,default:()=>{}}},data(){return{defaultText:this.verificationSetting.defaultText||"获取验证码",buttonText:this.verificationSetting.defaultText||"获取验证码",restTime:this.verificationSetting.restTime||60,timer:null}},computed:{buttonType(){return this.buttonText===this.defaultText}},destroyed(){this.reset()},methods:{reset(){this.timer&&(clearInterval(this.timer),this.timer=null,this.buttonText=this.defaultText)},async buttonClick(){if(this.buttonText===this.defaultText)if(this.buttonText=this.restTime,this.timer=setInterval(()=>{if(Number(this.buttonText)<=0||!this.buttonText){this.reset();return}else this.buttonText=Number(this.buttonText)-1},1e3),this.getSmscode)await this.getSmscode()===!1&&this.reset();else return}}};var _=function(){var e=this,n=e._self._c;return n("el-button",{on:{click:e.buttonClick}},[e._v(e._s(e.buttonType?e.defaultText:e.buttonText+"s"))])},y=[],g=c(m,_,y,!1,null,null,null,null);const b=g.exports,j="",v={name:"GeneralBasicForm",components:{InputArchive:r=>{const{templateEle:e}=r;return e()},VerificationButton:b},props:{showSearch:{type:Boolean,default:!0},loading:{type:Boolean,default:!1},formOnly:{type:Boolean,default:!1},getList:{type:Function,default:()=>{}},afterReset:{type:Function,default:()=>{}},formItem:{type:Array,default:[]},size:{type:String,default:""},labelWidth:{type:String,default:"90px"},noUrlParameters:{type:Boolean,default:()=>!1},formData:{type:Object,default:()=>{}},noInputBlank:{type:Boolean,default:()=>!1}},data(){var r;return{queryParams:{...this.noUrlParameters?{}:(r=this.$route)==null?void 0:r.query},formLoading:this.loading||!1,selectSetting:{placeholder:"请选择",filterable:!0,clearable:!0,style:"width: 200px"},inputSetting:{placeholder:"请输入",style:"width: 200px",clearable:!0},datePackerSetting:{style:"width: 227px","start-placeholder":"开始日期","end-placeholder":"结束日期",type:"daterange"},attrs:{inline:!0,"label-position":"left"}}},watch:{formData:{handler(r,e){JSON.stringify(r)!==JSON.stringify(e)&&(this.queryParams={...this.noUrlParameters?{}:this.queryParams,...r})},immediate:!0},queryParams:{handler(r){this.$emit("update:formData",r)},deep:!0},$attrs:{handler(r){this.attrs={...this.attrs,...r}},immediate:!0,deep:!0},loading(r){this.formLoading!==r&&(this.formLoading=r)},formLoading(r){this.loading!==r&&this.$emit("update:loading",r)}},methods:{handleQuery(){var n;const r={page:1,limit:10},e={...(n=this.$route)==null?void 0:n.query,...this.queryParams,...r};this.noUrlParameters||this.$router.push({query:{...e}}),this.getList({...e})},async resetQuery(){var e;this.$refs.queryFormRef.resetFields();const r={page:1};this.noUrlParameters||await this.$router.push({query:{...r}}),this.queryParams={...this.noUrlParameters?{}:(e=this.$route)==null?void 0:e.query},this.afterReset(),this.handleQuery()},currentInputComponent(){return"input-archive"},getItemRules(r){const{type:e,rules:n=[]}=r,t=[...n];return this.noInputBlank&&e==="input"&&t.push({pattern:this.trimRegex,message:"请输入(不能仅输入空格)",trigger:"blur"}),t},getInputSetting(r){const{inputSetting:e,setting:n}=r;return{...this.inputSetting,...e,...n}},getSelectSetting(r){const{selectSetting:e,setting:n}=r;return{...this.selectSetting,...e,...n}},getDatePackerSetting(r){const{datePackerSetting:e,setting:n}=r;return{...this.datePackerSetting,...e,...n}}}};var k=function(){var e=this,n=e._self._c;return n("el-form",e._b({directives:[{name:"show",rawName:"v-show",value:e.showSearch,expression:"showSearch"}],ref:"queryFormRef",attrs:{model:e.queryParams,"label-width":e.labelWidth}},"el-form",e.attrs,!1),[e._l(e.formItem,function(t){return n("el-form-item",{key:t.prop,attrs:{label:t.label,prop:t.prop,rules:e.getItemRules(t)}},[t.type==="input"?n("el-input",e._b({attrs:{size:e.size},nativeOn:{keydown:function(s){return!s.type.indexOf("key")&&e._k(s.keyCode,"enter",13,s.key,"Enter")?null:e.getList.apply(null,arguments)}},scopedSlots:e._u([e._l(t.template,function(s,i){return{key:i,fn:function(){return[s?n(e.currentInputComponent(),{key:i,tag:"component",attrs:{templateEle:s}}):e._e()]},proxy:!0}})],null,!0),model:{value:e.queryParams[t.prop],callback:function(s){e.$set(e.queryParams,t.prop,s)},expression:"queryParams[item.prop]"}},"el-input",e.getInputSetting(t),!1)):t.type==="input-mobile-verification"?n("el-input",e._b({attrs:{size:e.size},nativeOn:{keydown:function(s){return!s.type.indexOf("key")&&e._k(s.keyCode,"enter",13,s.key,"Enter")?null:e.getList.apply(null,arguments)}},scopedSlots:e._u([e._l(t.template,function(s,i){return{key:i,fn:function(){return[s?n(e.currentInputComponent(),{key:i,tag:"component",attrs:{templateEle:s}}):e._e()]},proxy:!0}})],null,!0),model:{value:e.queryParams[t.prop],callback:function(s){e.$set(e.queryParams,t.prop,s)},expression:"queryParams[item.prop]"}},"el-input",e.getInputSetting(t),!1),[n("template",{slot:"append"},[n("verification-button",{attrs:{verificationSetting:t.verificationSetting,getSmscode:t.getSmscode}})],1)],2):t.type==="select"?n("el-select",e._b({attrs:{filterable:"",size:e.size},model:{value:e.queryParams[t.prop],callback:function(s){e.$set(e.queryParams,t.prop,s)},expression:"queryParams[item.prop]"}},"el-select",e.getSelectSetting(t),!1),e._l(t.option||[],function(s){return n("el-option",{key:s.value,attrs:{label:s.label,value:s.value}})}),1):t.type==="cascader"?n("el-cascader",e._b({attrs:{filterable:"",size:e.size,options:t.options||[]},model:{value:e.queryParams[t.prop],callback:function(s){e.$set(e.queryParams,t.prop,s)},expression:"queryParams[item.prop]"}},"el-cascader",e.getSelectSetting(t),!1)):t.type==="date-picker"?n("el-date-picker",e._b({attrs:{size:e.size},model:{value:e.queryParams[t.prop],callback:function(s){e.$set(e.queryParams,t.prop,s)},expression:"queryParams[item.prop]"}},"el-date-picker",e.getDatePackerSetting(t),!1)):e._e(),t.type==="input-number"?n("el-input-number",e._b({attrs:{size:e.size},model:{value:e.queryParams[t.prop],callback:function(s){e.$set(e.queryParams,t.prop,s)},expression:"queryParams[item.prop]"}},"el-input-number",e.getInputSetting(t),!1)):e._e()],1)}),e._t("default"),e.formOnly?e._e():n("el-form-item",[n("el-button",{attrs:{type:"primary",icon:"el-icon-search",size:e.size,loading:e.formLoading},on:{click:e.handleQuery}},[e._v("查询")]),n("el-button",{attrs:{icon:"el-icon-refresh",size:e.size},on:{click:e.resetQuery}},[e._v("重置")])],1),e._t("behind-the-button")],2)},S=[],x=c(v,k,S,!1,null,"7fc8eb2b",null,null);const P=x.exports,N="",q={components:{},props:{query:{type:Object,default:()=>({prefCode:sessionStorage.getItem("prefCode")})},routePath:{type:String,default:()=>"/search/searchDetail"},inputstyle:{type:Object,default:()=>({width:"1280px"})},openHref:{type:Boolean,default:()=>!1},size:{type:String,default:()=>"medium"}},data(){var r,e;return{keyWord:((e=(r=this.$route)==null?void 0:r.query)==null?void 0:e.keyWord)||"",attrs:{}}},watch:{$attrs:{handler(r){this.attrs={...this.attrs,...r}},immediate:!0,deep:!0}},methods:{search(){const r={path:this.routePath,query:{...this.query,keyWord:this.keyWord}};if(this.openHref){const e=this.$router.resolve(r);window.open(e.href,"_blank")}else this.$router.push(r)}}};var C=function(){var e=this,n=e._self._c;return n("div",{staticClass:"search-box"},[n("el-input",e._b({style:{...e.inputstyle},attrs:{size:e.size},nativeOn:{keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.search.apply(null,arguments)}},model:{value:e.keyWord,callback:function(t){e.keyWord=t},expression:"keyWord"}},"el-input",e.attrs,!1),[n("svg",{staticClass:"el-input__icon",attrs:{slot:"prefix",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},slot:"prefix"},[n("path",{attrs:{d:"M9.51033 10.2186C8.69189 10.8814 7.64943 11.2784 6.51424 11.2784C3.88302 11.2784 1.75 9.14541 1.75 6.51421C1.75 3.88301 3.88302 1.75 6.51424 1.75C9.14545 1.75 11.2785 3.88301 11.2785 6.51421C11.2785 7.64942 10.8814 8.69189 10.2186 9.51034L13.75 13.0417L13.0417 13.75L9.51033 10.2186ZM10.2768 6.51421C10.2768 4.43623 8.59224 2.75168 6.51424 2.75168C4.43623 2.75168 2.75168 4.43623 2.75168 6.51421C2.75168 8.59219 4.43623 10.2767 6.51424 10.2767C8.59224 10.2767 10.2768 8.59219 10.2768 6.51421Z",fill:"#959A9F"}})])])],1)},$=[],w=c(q,C,$,!1,null,"ef706e31",null,null);const T=w.exports,z={name:"Descriptions",components:{DescriptionsColumn:{functional:!0,props:{column:{default:{render:()=>{}},type:Object},formData:{default:{},type:Object}},render(r,e){const{props:n}=e,{column:t,formData:s}=n;return t.render(s)}}},data(){return{attrs:{border:!0,class:"v-descriptions"}}},props:{formItem:{type:Array,default:[]},formData:{type:Object,default:()=>{}}},watch:{$attrs:{handler(r){this.attrs={...this.attrs,...r}},immediate:!0,deep:!0}}};var I=function(){var e=this,n=e._self._c;return n("el-descriptions",e._b({},"el-descriptions",e.attrs,!1),e._l(e.formItem,function(t,s){return n("el-descriptions-item",e._b({key:t.prop,attrs:{label:t.label}},"el-descriptions-item",t.descriptionsItemProps,!1),[t.render?n("DescriptionsColumn",{attrs:{column:t,formData:e.formData}}):n("span",[e._v(e._s(e.formData[t.prop]))])],1)}),1)},B=[],D=c(z,I,B,!1,null,null,null,null);const O=D.exports,F=P,R=T,L=O;l.VDescriptions=L,l.VGeneralBasicForm=F,l.VSearchBox=R,Object.defineProperty(l,Symbol.toStringTag,{value:"Module"})});
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@charset "UTF-8";.search-box[data-v-
|
|
1
|
+
@charset "UTF-8";.search-box[data-v-ef706e31]{position:absolute;left:50%;top:0;transform:translate(-50%) translateY(-50%)}.search-box[data-v-ef706e31] .el-input{font-size:16px;font-weight:400;line-height:24px}.search-box[data-v-ef706e31] .el-input svg{width:32px;height:100%}.search-box[data-v-ef706e31] .el-input .el-input__prefix{left:24px;font-size:32px}.search-box[data-v-ef706e31] .el-input .el-input__suffix{right:24px;font-size:32px}.search-box[data-v-ef706e31] .el-input .el-input__icon{line-height:60px}.search-box[data-v-ef706e31] .el-input .el-input__inner{padding:14px 24px 14px 72px;height:60px;border-radius:37px;background:#FFF;box-shadow:0 0 8px #2b2e3105,0 6px 8px #2b2e3114;border-color:#fff}.search-box[data-v-ef706e31] .el-input .el-input__inner::placeholder{color:#959a9f}.search-box[data-v-ef706e31] .el-input .el-input__inner:hover{border:1px solid #00B5F2}
|