sk_fems_ui commit
This commit is contained in:
72
components/common/input/InputCommGrpCd.vue
Normal file
72
components/common/input/InputCommGrpCd.vue
Normal file
@ -0,0 +1,72 @@
|
||||
<template>
|
||||
<v-row class="search-box" align="center" no-gutters>
|
||||
<v-col v-if="label" :cols="labelCols">
|
||||
<label for="" class="search-box-label">
|
||||
<v-icon x-small color="primary" class="mr-1">mdi-record-circle</v-icon>
|
||||
{{ label }}
|
||||
</label>
|
||||
</v-col>
|
||||
<v-col :cols="label ? textCols : ''">
|
||||
<v-text-field v-model="InputValue" class="v-input__custom"></v-text-field>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState, mapMutations } from 'vuex';
|
||||
export default {
|
||||
props: {
|
||||
parentPrgmId: {
|
||||
type: String,
|
||||
require: true,
|
||||
},
|
||||
diffModel: {
|
||||
type: String,
|
||||
require: false,
|
||||
},
|
||||
labelCols: {
|
||||
type: Number,
|
||||
require: false,
|
||||
default: 4,
|
||||
},
|
||||
textCols: {
|
||||
type: Number,
|
||||
require: false,
|
||||
default: 7,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
label: '그룹코드',
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
searchParam: state => state.pageData,
|
||||
menuData: 'menuData',
|
||||
}),
|
||||
InputValue: {
|
||||
get() {
|
||||
if (!this.diffModel) {
|
||||
return this.searchParam[this.parentPrgmId].commGrpCd;
|
||||
} else {
|
||||
return this.searchParam[this.parentPrgmId][this.diffModel];
|
||||
}
|
||||
},
|
||||
set(value) {
|
||||
if (!this.diffModel) {
|
||||
return this.setPageData({ commGrpCd: value });
|
||||
} else {
|
||||
return this.setPageData({ [this.diffModel]: value });
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
created() {},
|
||||
methods: {
|
||||
...mapMutations({ setPageData: 'setPageData' }),
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style></style>
|
72
components/common/input/InputCommGrpCdNm.vue
Normal file
72
components/common/input/InputCommGrpCdNm.vue
Normal file
@ -0,0 +1,72 @@
|
||||
<template>
|
||||
<v-row class="search-box" align="center" no-gutters>
|
||||
<v-col v-if="label" :cols="labelCols">
|
||||
<label for="" class="search-box-label">
|
||||
<v-icon x-small color="primary" class="mr-1">mdi-record-circle</v-icon>
|
||||
{{ label }}
|
||||
</label>
|
||||
</v-col>
|
||||
<v-col :cols="label ? textCols : ''">
|
||||
<v-text-field v-model="InputValue" class="v-input__custom"></v-text-field>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState, mapMutations } from 'vuex';
|
||||
export default {
|
||||
props: {
|
||||
parentPrgmId: {
|
||||
type: String,
|
||||
require: true,
|
||||
},
|
||||
diffModel: {
|
||||
type: String,
|
||||
require: false,
|
||||
},
|
||||
labelCols: {
|
||||
type: Number,
|
||||
require: false,
|
||||
default: 4,
|
||||
},
|
||||
textCols: {
|
||||
type: Number,
|
||||
require: false,
|
||||
default: 7,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
label: '그룹코드명',
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
searchParam: state => state.pageData,
|
||||
menuData: 'menuData',
|
||||
}),
|
||||
InputValue: {
|
||||
get() {
|
||||
if (!this.diffModel) {
|
||||
return this.searchParam[this.parentPrgmId].commGrpCdNm;
|
||||
} else {
|
||||
return this.searchParam[this.parentPrgmId][this.diffModel];
|
||||
}
|
||||
},
|
||||
set(value) {
|
||||
if (!this.diffModel) {
|
||||
return this.setPageData({ commGrpCdNm: value });
|
||||
} else {
|
||||
return this.setPageData({ [this.diffModel]: value });
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
created() {},
|
||||
methods: {
|
||||
...mapMutations({ setPageData: 'setPageData' }),
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style></style>
|
99
components/common/input/InputNumber.vue
Normal file
99
components/common/input/InputNumber.vue
Normal file
@ -0,0 +1,99 @@
|
||||
<template>
|
||||
<v-row class="search-box" align="center" no-gutters>
|
||||
<v-col v-if="label" :cols="labelCols">
|
||||
<label for="" class="search-box-label">
|
||||
<v-icon x-small color="primary" class="mr-1">mdi-record-circle</v-icon>
|
||||
{{ label }}
|
||||
</label>
|
||||
</v-col>
|
||||
<v-col :cols="label ? textCols : ''">
|
||||
<v-text-field
|
||||
v-model="textValue"
|
||||
class="v-input__custom"
|
||||
:disabled="disabled"
|
||||
outlined
|
||||
:hide-details="true"
|
||||
@keyup="modifyValue"
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState, mapMutations } from 'vuex';
|
||||
import Utility from '~/plugins/utility';
|
||||
export default {
|
||||
props: {
|
||||
parentPrgmId: {
|
||||
type: String,
|
||||
require: true,
|
||||
},
|
||||
diffModel: {
|
||||
type: String,
|
||||
require: false,
|
||||
},
|
||||
label: {
|
||||
type: String,
|
||||
require: true,
|
||||
},
|
||||
valueNm: {
|
||||
type: String,
|
||||
require: true,
|
||||
},
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
require: false,
|
||||
default: false,
|
||||
},
|
||||
labelCols: {
|
||||
type: Number,
|
||||
require: false,
|
||||
default: 4,
|
||||
},
|
||||
textCols: {
|
||||
type: Number,
|
||||
require: false,
|
||||
default: 7,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
textValue: null,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
searchParam: state => state.pageData,
|
||||
menuData: 'menuData',
|
||||
}),
|
||||
getValue() {
|
||||
return this.searchParam[this.parentPrgmId][this.valueNm];
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
getValue() {
|
||||
this.textValue = this.validateNumber(this.getValue);
|
||||
},
|
||||
},
|
||||
created() {},
|
||||
methods: {
|
||||
...mapMutations({ setPageData: 'setPageData' }),
|
||||
modifyValue(e) {
|
||||
let val = e.target.value.replace(/\B(?=(\d{3})+(?!\d))/g, ',');
|
||||
this.textValue = this.validateNumber(val);
|
||||
if (!this.diffModel) {
|
||||
this.setPageData({ [this.valueNm]: val });
|
||||
}
|
||||
},
|
||||
validateNumber(value) {
|
||||
let returnVal = String(value).replaceAll(',', '');
|
||||
returnVal = Utility.setFormatInt(returnVal);
|
||||
if (returnVal == 'NaN') returnVal = null;
|
||||
|
||||
return returnVal;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style></style>
|
82
components/common/input/InputRmrk.vue
Normal file
82
components/common/input/InputRmrk.vue
Normal file
@ -0,0 +1,82 @@
|
||||
<template>
|
||||
<v-row class="search-box" align="center" no-gutters>
|
||||
<v-col v-if="label" :cols="labelCols">
|
||||
<label for="" class="search-box-label">
|
||||
<v-icon x-small color="primary" class="mr-1">mdi-record-circle</v-icon>
|
||||
{{ label }}
|
||||
</label>
|
||||
</v-col>
|
||||
<v-col :cols="label ? textCols : ''">
|
||||
<v-textarea
|
||||
v-model="InputValue"
|
||||
class="v-input__custom"
|
||||
:disabled="disabled"
|
||||
></v-textarea>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState, mapMutations } from 'vuex';
|
||||
export default {
|
||||
props: {
|
||||
parentPrgmId: {
|
||||
type: String,
|
||||
require: true,
|
||||
},
|
||||
diffModel: {
|
||||
type: String,
|
||||
require: false,
|
||||
},
|
||||
label: {
|
||||
type: String,
|
||||
require: true,
|
||||
default: '비고',
|
||||
},
|
||||
valueNm: {
|
||||
type: String,
|
||||
require: true,
|
||||
},
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
require: false,
|
||||
default: false,
|
||||
},
|
||||
labelCols: {
|
||||
type: Number,
|
||||
require: false,
|
||||
default: 4,
|
||||
},
|
||||
textCols: {
|
||||
type: Number,
|
||||
require: false,
|
||||
default: 7,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
searchParam: state => state.pageData,
|
||||
menuData: 'menuData',
|
||||
}),
|
||||
InputValue: {
|
||||
get() {
|
||||
return this.searchParam[this.parentPrgmId][this.valueNm];
|
||||
},
|
||||
set(value) {
|
||||
if (!this.diffModel) {
|
||||
return this.setPageData({ [this.valueNm]: value });
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
created() {},
|
||||
methods: {
|
||||
...mapMutations({ setPageData: 'setPageData' }),
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style></style>
|
138
components/common/input/InputText.vue
Normal file
138
components/common/input/InputText.vue
Normal file
@ -0,0 +1,138 @@
|
||||
<template>
|
||||
<v-row class="search-box" align="center" no-gutters>
|
||||
<v-col v-if="label" :cols="labelCols">
|
||||
<label for="" class="search-box-label">
|
||||
<v-icon v-if="iconShow" x-small :color="required ? '#fb8200' : 'primary'" class="mr-1"
|
||||
>mdi-record-circle</v-icon
|
||||
>
|
||||
{{ label }}
|
||||
</label>
|
||||
</v-col>
|
||||
<v-col :cols="label ? textCols : ''">
|
||||
<v-text-field
|
||||
v-model="InputValue"
|
||||
class="v-input__custom"
|
||||
:disabled="disabled"
|
||||
:readonly="readonly"
|
||||
outlined
|
||||
:hide-details="true"
|
||||
@keyup.enter="search"
|
||||
@keydown="keydownEvent"
|
||||
@keyup="keyupEvent"
|
||||
:placeholder="placeholder"
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState, mapMutations } from 'vuex';
|
||||
export default {
|
||||
props: {
|
||||
parentPrgmId: {
|
||||
type: String,
|
||||
require: true,
|
||||
},
|
||||
diffModel: {
|
||||
type: String,
|
||||
require: false,
|
||||
},
|
||||
label: {
|
||||
type: String,
|
||||
require: true,
|
||||
},
|
||||
valueNm: {
|
||||
type: String,
|
||||
require: true,
|
||||
},
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
require: false,
|
||||
default: false,
|
||||
},
|
||||
readonly: {
|
||||
type: Boolean,
|
||||
require: false,
|
||||
default: false,
|
||||
},
|
||||
labelCols: {
|
||||
type: Number,
|
||||
require: false,
|
||||
default: 4,
|
||||
},
|
||||
textCols: {
|
||||
type: Number,
|
||||
require: false,
|
||||
default: 7,
|
||||
},
|
||||
searchOption: {
|
||||
type: Boolean,
|
||||
require: false,
|
||||
},
|
||||
required: {
|
||||
type: Boolean,
|
||||
require: false,
|
||||
default: false,
|
||||
},
|
||||
iconShow:{
|
||||
type:Boolean,
|
||||
require:false,
|
||||
default:true
|
||||
},
|
||||
replaceList:{
|
||||
type:Array,
|
||||
require:false,
|
||||
default:null
|
||||
},
|
||||
placeholder:{
|
||||
type:String,
|
||||
require:false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
searchParam: state => state.pageData,
|
||||
menuData: 'menuData',
|
||||
}),
|
||||
InputValue: {
|
||||
get() {
|
||||
return this.searchParam[this.parentPrgmId][this.valueNm];
|
||||
},
|
||||
set(value) {
|
||||
if (!this.diffModel) {
|
||||
if(this.replaceList){
|
||||
for(var i=0; i<this.replaceList; i++){
|
||||
value.replaceAll(this.replaceList[i]);
|
||||
}
|
||||
}
|
||||
return this.setPageData({ [this.valueNm]: value });
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
created() {},
|
||||
methods: {
|
||||
...mapMutations({ setPageData: 'setPageData' }),
|
||||
search() {
|
||||
if (this.searchOption === true) {
|
||||
this.setPageData({ isFind: true });
|
||||
}
|
||||
},
|
||||
keydownEvent($event){
|
||||
},
|
||||
keyupEvent($event){
|
||||
if(this.replaceList){
|
||||
for(var i=0; i<this.replaceList.length; i++){
|
||||
this.InputValue = this.InputValue.replaceAll(this.replaceList[i], '');
|
||||
}
|
||||
}
|
||||
this.setPageData({ [this.valueNm]: this.InputValue });
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style></style>
|
84
components/common/input/InputTextPassword.vue
Normal file
84
components/common/input/InputTextPassword.vue
Normal file
@ -0,0 +1,84 @@
|
||||
<template>
|
||||
<v-row class="search-box" align="center" no-gutters>
|
||||
<v-col v-if="label" :cols="labelCols">
|
||||
<label for="" class="search-box-label">
|
||||
<v-icon x-small color="primary" class="mr-1">mdi-record-circle</v-icon>
|
||||
{{ label }}
|
||||
</label>
|
||||
</v-col>
|
||||
<v-col :cols="label ? textCols : ''">
|
||||
<v-text-field
|
||||
v-model="InputValue"
|
||||
class="v-input__custom"
|
||||
:disabled="disabled"
|
||||
type="password"
|
||||
outlined
|
||||
:hide-details="true"
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState, mapMutations } from 'vuex';
|
||||
export default {
|
||||
props: {
|
||||
parentPrgmId: {
|
||||
type: String,
|
||||
require: true,
|
||||
},
|
||||
diffModel: {
|
||||
type: String,
|
||||
require: false,
|
||||
},
|
||||
label: {
|
||||
type: String,
|
||||
require: true,
|
||||
},
|
||||
valueNm: {
|
||||
type: String,
|
||||
require: true,
|
||||
},
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
require: false,
|
||||
default: false,
|
||||
},
|
||||
labelCols: {
|
||||
type: Number,
|
||||
require: false,
|
||||
default: 4,
|
||||
},
|
||||
textCols: {
|
||||
type: Number,
|
||||
require: false,
|
||||
default: 7,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
searchParam: state => state.pageData,
|
||||
menuData: 'menuData',
|
||||
}),
|
||||
InputValue: {
|
||||
get() {
|
||||
return this.searchParam[this.parentPrgmId][this.valueNm];
|
||||
},
|
||||
set(value) {
|
||||
if (!this.diffModel) {
|
||||
return this.setPageData({ [this.valueNm]: value });
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
created() {},
|
||||
methods: {
|
||||
...mapMutations({ setPageData: 'setPageData' }),
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style></style>
|
164
components/common/input/InputTextReg.vue
Normal file
164
components/common/input/InputTextReg.vue
Normal file
@ -0,0 +1,164 @@
|
||||
<template>
|
||||
<v-row class="search-box" align="center" no-gutters>
|
||||
<v-col v-if="label" :cols="labelCols">
|
||||
<label for="" class="search-box-label">
|
||||
<v-icon v-if="iconShow" x-small :color="required ? '#fb8200' : 'primary'" class="mr-1"
|
||||
>mdi-record-circle</v-icon
|
||||
>
|
||||
{{ label }}
|
||||
</label>
|
||||
</v-col>
|
||||
<v-col :cols="label ? textCols : ''">
|
||||
<v-text-field
|
||||
ref="formRef"
|
||||
:value="InputValue"
|
||||
class="v-input__custom"
|
||||
:disabled="disabled"
|
||||
:readonly="readonly"
|
||||
outlined
|
||||
:hide-details="true"
|
||||
@keyup.enter="search"
|
||||
@keydown="keydownEvent"
|
||||
@keyup="keyupEvent"
|
||||
@input="inputEvent"
|
||||
:placeholder="placeholder"
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState, mapMutations } from 'vuex';
|
||||
export default {
|
||||
props: {
|
||||
parentPrgmId: {
|
||||
type: String,
|
||||
require: true,
|
||||
},
|
||||
diffModel: {
|
||||
type: String,
|
||||
require: false,
|
||||
},
|
||||
label: {
|
||||
type: String,
|
||||
require: true,
|
||||
},
|
||||
valueNm: {
|
||||
type: String,
|
||||
require: true,
|
||||
},
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
require: false,
|
||||
default: false,
|
||||
},
|
||||
readonly: {
|
||||
type: Boolean,
|
||||
require: false,
|
||||
default: false,
|
||||
},
|
||||
labelCols: {
|
||||
type: Number,
|
||||
require: false,
|
||||
default: 4,
|
||||
},
|
||||
textCols: {
|
||||
type: Number,
|
||||
require: false,
|
||||
default: 7,
|
||||
},
|
||||
searchOption: {
|
||||
type: Boolean,
|
||||
require: false,
|
||||
},
|
||||
required: {
|
||||
type: Boolean,
|
||||
require: false,
|
||||
default: false,
|
||||
},
|
||||
iconShow:{
|
||||
type:Boolean,
|
||||
require:false,
|
||||
default:true
|
||||
},
|
||||
replaceList:{
|
||||
type:Array,
|
||||
require:false,
|
||||
default:null
|
||||
},
|
||||
placeholder:{
|
||||
type:String,
|
||||
require:false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
searchParam: state => state.pageData,
|
||||
menuData: 'menuData',
|
||||
}),
|
||||
InputValue: {
|
||||
get() {
|
||||
return this.searchParam[this.parentPrgmId][this.valueNm];
|
||||
},
|
||||
set(value) {
|
||||
if (!this.diffModel) {
|
||||
if(this.replaceList){
|
||||
for(var i=0; i<this.replaceList; i++){
|
||||
value.replaceAll(this.replaceList[i]);
|
||||
}
|
||||
}
|
||||
return this.setPageData({ [this.valueNm]: value });
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
created() {},
|
||||
methods: {
|
||||
...mapMutations({ setPageData: 'setPageData' }),
|
||||
search() {
|
||||
if (this.searchOption === true) {
|
||||
this.setPageData({ isFind: true });
|
||||
}
|
||||
},
|
||||
inputEvent(str){
|
||||
// console.log("str.match(/[^ㄱ-ㅎ|ㅏ-ㅣ|가-힣|0-9\s]*/i):",str.match(/[^ㄱ-ㅎ|ㅏ-ㅣ|가-힣|0-9\s]*/i))
|
||||
var temp = str.match(/[^ㄱ-ㅎ|ㅏ-ㅣ|가-힣|0-9\s]*/i)[0];
|
||||
var regExp = /[^a-z]*/;
|
||||
temp = temp.match(regExp);
|
||||
this.$refs.formRef.lazyValue = temp;
|
||||
},
|
||||
keydownEvent($event){
|
||||
|
||||
// if(this.replaceList){
|
||||
// console.log("event : ",$event)
|
||||
// // console.log("InputValue : ", this.InputValue);
|
||||
// // // var regExp = /[A-Z]/;
|
||||
// var regExp = /^[0-9a-z\s]/
|
||||
// if(regExp.test($event.key)){
|
||||
// // if($event.code == 'ShiftLeft')
|
||||
|
||||
|
||||
// // console.log("test", regExp)
|
||||
// // if($event.key){
|
||||
// this.InputValue = this.InputValue.replaceAll(/[ㄱ-ㅎ|ㅏ-ㅣ|가-힣]/g, '');
|
||||
// $event.preventDefault();
|
||||
// }
|
||||
// // }
|
||||
// this.InputValue = this.InputValue.replaceAll(this.replaceList[0], '');
|
||||
// for(var i=0; i<this.replaceList.length; i++){
|
||||
// this.InputValue = this.InputValue.replaceAll(this.replaceList[i], '');
|
||||
// }
|
||||
// }
|
||||
// this.setPageData({ [this.valueNm]: this.InputValue });
|
||||
},
|
||||
keyupEvent($event){
|
||||
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style></style>
|
144
components/common/input/InputTextRegEx.vue
Normal file
144
components/common/input/InputTextRegEx.vue
Normal file
@ -0,0 +1,144 @@
|
||||
<template>
|
||||
<v-row class="search-box" align="center" no-gutters>
|
||||
<v-col v-if="label" :cols="labelCols">
|
||||
<label for="" class="search-box-label">
|
||||
<v-icon x-small :color="required ? '#fb8200' : 'primary'" class="mr-1"
|
||||
>mdi-record-circle</v-icon
|
||||
>
|
||||
{{ label }}
|
||||
</label>
|
||||
</v-col>
|
||||
<v-col :cols="label ? textCols : ''">
|
||||
<v-text-field
|
||||
v-model="InputValue"
|
||||
class="v-input__custom"
|
||||
:disabled="disabled"
|
||||
outlined
|
||||
:hide-details="true"
|
||||
:maxLength="maxLength"
|
||||
:placeholder="placeholder"
|
||||
@keyup.enter="search"
|
||||
></v-text-field>
|
||||
<div v-if="regExBool" style="color:red">{{ validCheckText }}</div>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState, mapMutations } from 'vuex';
|
||||
export default {
|
||||
props: {
|
||||
parentPrgmId: {
|
||||
type: String,
|
||||
require: true,
|
||||
},
|
||||
diffModel: {
|
||||
type: String,
|
||||
require: false,
|
||||
},
|
||||
label: {
|
||||
type: String,
|
||||
require: true,
|
||||
},
|
||||
valueNm: {
|
||||
type: String,
|
||||
require: true,
|
||||
},
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
require: false,
|
||||
default: false,
|
||||
},
|
||||
labelCols: {
|
||||
type: Number,
|
||||
require: false,
|
||||
default: 4,
|
||||
},
|
||||
textCols: {
|
||||
type: Number,
|
||||
require: false,
|
||||
default: 7,
|
||||
},
|
||||
searchOption: {
|
||||
type: Boolean,
|
||||
require: false,
|
||||
},
|
||||
required: {
|
||||
type: Boolean,
|
||||
require: false,
|
||||
default: false,
|
||||
},
|
||||
regEx: {
|
||||
type: RegExp,
|
||||
require: false,
|
||||
},
|
||||
maxLength: {
|
||||
type: Number,
|
||||
require: false,
|
||||
},
|
||||
placeholder: {
|
||||
type: String,
|
||||
require: false,
|
||||
},
|
||||
validCheckText: {
|
||||
type: String,
|
||||
require: false,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
regExBool: false,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
searchParam: state => state.pageData,
|
||||
menuData: 'menuData',
|
||||
}),
|
||||
InputValue: {
|
||||
get() {
|
||||
return this.searchParam[this.parentPrgmId][this.valueNm];
|
||||
},
|
||||
set(value) {
|
||||
if (!this.diffModel) {
|
||||
return this.setPageData({ [this.valueNm]: value });
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
InputValue(value) {
|
||||
if (value != '') {
|
||||
this.checkRegEx();
|
||||
}
|
||||
},
|
||||
},
|
||||
created() {},
|
||||
methods: {
|
||||
...mapMutations({ setPageData: 'setPageData' }),
|
||||
search() {
|
||||
if (this.searchOption === true) {
|
||||
this.setPageData({ isFind: true });
|
||||
}
|
||||
},
|
||||
checkRegEx() {
|
||||
var phonRegExp = this.regEx;
|
||||
if (!phonRegExp.test(this.InputValue)) {
|
||||
this.regExBool = true;
|
||||
this.$emit('regExCheck' + this.valueNm, {
|
||||
valueNm: this.valueNm,
|
||||
flag: false,
|
||||
});
|
||||
} else {
|
||||
this.regExBool = false;
|
||||
this.$emit('regExCheck' + this.valueNm, {
|
||||
valueNm: this.valueNm,
|
||||
flag: true,
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style></style>
|
Reference in New Issue
Block a user