|
@ -23,11 +23,12 @@ |
|
|
v-if="!hide ? true : false" |
|
|
v-if="!hide ? true : false" |
|
|
> |
|
|
> |
|
|
<!-- 输入框 onkeyup: 正则表达式,用于前端输入校验工作--> |
|
|
<!-- 输入框 onkeyup: 正则表达式,用于前端输入校验工作--> |
|
|
|
|
|
<!-- :onkeyup="item.onkeyup" --> |
|
|
<el-input |
|
|
<el-input |
|
|
v-if="item.type === 'input'" |
|
|
v-if="item.type === 'input'" |
|
|
v-model="searchData[item.prop]" |
|
|
v-model="searchData[item.prop]" |
|
|
:maxlength="item.maxlength" |
|
|
:maxlength="item.maxlength" |
|
|
:onkeyup="item.onkeyup" |
|
|
:onkeyup="itemOnKeyUp(item,searchData[item.prop])" |
|
|
clearable |
|
|
clearable |
|
|
:disabled="Boolean(item.disabled)" |
|
|
:disabled="Boolean(item.disabled)" |
|
|
:placeholder="item.placeholder || '请输入' + item.label" |
|
|
:placeholder="item.placeholder || '请输入' + item.label" |
|
@ -422,6 +423,7 @@ import currenUpload from "@/components/currenUpload"; |
|
|
import currenUploadList from "@/components/currenUploadList"; |
|
|
import currenUploadList from "@/components/currenUploadList"; |
|
|
import currenUploadPictureCard from "@/components/currenUploadPictureCard"; |
|
|
import currenUploadPictureCard from "@/components/currenUploadPictureCard"; |
|
|
import filterSelect from "@/components/filterSelect" |
|
|
import filterSelect from "@/components/filterSelect" |
|
|
|
|
|
import { getMatchRegConformValue } from "@/utils/index" |
|
|
export default { |
|
|
export default { |
|
|
name: "currenForm", |
|
|
name: "currenForm", |
|
|
components: { |
|
|
components: { |
|
@ -574,6 +576,16 @@ export default { |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
// type=input情况下,框实时校验 |
|
|
|
|
|
itemOnKeyUp(item,value){ |
|
|
|
|
|
if(item.onkeyup){ |
|
|
|
|
|
return item.onkeyup() |
|
|
|
|
|
}else{ |
|
|
|
|
|
if(value && item.validType){ |
|
|
|
|
|
this.searchData[item.prop]=getMatchRegConformValue(item.validType,value,item.pointNumberFixed) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
// 数字类型input框onkeyup最大最小值处理 |
|
|
// 数字类型input框onkeyup最大最小值处理 |
|
|
typeNumberOnkeyup(item,value){ |
|
|
typeNumberOnkeyup(item,value){ |
|
|
if(value){ |
|
|
if(value){ |
|
|