Browse Source

证件管理下拉框可输入

jbb 2 years ago
parent
commit
92de73361c
1 changed files with 18 additions and 3 deletions
  1. 18 3
      src/views/system/modules/AddCertificateManagement.vue

+ 18 - 3
src/views/system/modules/AddCertificateManagement.vue

@@ -19,11 +19,17 @@
               </a-form-model-item>
             </a-col>
             <a-col :md="8" :sm="8">
-              <a-form-model-item label="证件所有人"  prop="userId">
+              <a-form-model-item label="证件所有人"  prop="userId" >
                 <j-search-select-tag v-model="formState.userId" placeholder="请选择用户名称" 
-                   dict="sys_user,realname,username"/>
-                <!-- <a-input placeholder="请输入" v-model="formState.userId"/> -->
+                   dict="sys_user,realname,username" @search="searchName" />
               </a-form-model-item>
+              <!-- <a-form-model-item label="证件所有人"  prop="userId" >
+                <j-search-select-tag v-model="formState.userId" placeholder="请选择用户名称" 
+                   dict="sys_user,realname,username" @search="searchName" style="width:71%" v-if="inputMethod =='select'"/>
+                   <a-input   placeholder="请输入"  v-model="formState.name" style="width:71%" v-if="inputMethod =='input'"/>
+                <a-button type="primary" style="margin-left: 8%;" v-model="formState.name" @click="changeInputMethod">切换</a-button>
+              </a-form-model-item> -->
+                
            </a-col>
             <a-col :md="8" :sm="8">
               <a-form-model-item label="证件编号"  prop="code">
@@ -54,6 +60,7 @@
                    dict="sys_user,realname,username"/>
                 <!-- <a-input placeholder="请输入" v-model="formState.manageId"/> -->
                </a-form-model-item>
+              
             </a-col>
             <a-col :md="8" :sm="8">
               <a-form-model-item label="提前通知时间/月"   prop="noticeMonth">
@@ -125,6 +132,7 @@ export default {
               beginDate:'',
               isMessage:'1'
             },
+            inputMethod:'select',
             fileList:[],
             confirmLoading: false,
             validatorRules: {
@@ -175,6 +183,13 @@ export default {
        this.beDate=''
        this.fileList =[]
      },
+     changeInputMethod(){
+      if(this.inputMethod == 'select'){
+        this.inputMethod = 'input'
+      }else{
+        this.inputMethod = 'select'
+      }
+     },
     handleSubmit(){
        this.$refs.form.validate(valid => {
          if(valid){