chenrui 3 lat temu
rodzic
commit
02e8f66002

+ 6 - 6
src/views/power/user/userList.vue

@@ -1,26 +1,26 @@
 <template>
   <a-card size="small" :bordered="false">
     <div class="table-page-search-wrapper">
-      <a-form layout="inline">
+      <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
         <a-row :gutter="15">
           <a-col :md="6" :sm="24">
             <a-form-item label="用户名称">
-              <a-input allowClear v-model.trim="queryParam.name" placeholder="请输入用户名称"/>
+              <a-input id="userList-name" allowClear v-model.trim="queryParam.name" placeholder="请输入用户名称"/>
             </a-form-item>
           </a-col>
           <a-col :md="6" :sm="24">
             <a-form-item label="手机号码">
-              <a-input allowClear v-model.trim="queryParam.phone" placeholder="请输入手机号码"/>
+              <a-input id="userList-phone" allowClear v-model.trim="queryParam.phone" placeholder="请输入手机号码"/>
             </a-form-item>
           </a-col>
           <a-col :md="6" :sm="24">
             <a-form-item label="状态">
-              <v-select code="ENABLE_FLAG" v-model="queryParam.loginFlag" allowClear placeholder="请选择状态"></v-select>
+              <v-select id="userList-loginFlag" code="ENABLE_FLAG" v-model="queryParam.loginFlag" allowClear placeholder="请选择状态"></v-select>
             </a-form-item>
           </a-col>
           <a-col :md="4" :sm="24">
-            <a-button type="primary" @click="$refs.table.refresh(true)" style="margin-right: 10px;">查询</a-button>
-            <a-button type="" @click="reset" id="roleList-reset">重置</a-button>
+            <a-button type="primary" @click="$refs.table.refresh(true)" id="userList-search">查询</a-button>
+            <a-button type="" @click="reset" id="userList-reset" style="margin-left: 10px;">重置</a-button>
           </a-col>
         </a-row>
       </a-form>

+ 2 - 6
src/views/power/user/userModal.vue

@@ -73,8 +73,7 @@
                 id="userSyncEdit-roleNames"
                 allowClear
                 v-model="form.roleNames"
-                mode="multiple"
-                @change="roleChange">
+                mode="multiple">
                 <a-select-option v-for="item in roleList" :key="item.id" :value="item.id" :disabled="item.isEnable == '0' ? true : false">{{ item.name }}</a-select-option>
               </a-select>
             </a-form-model-item>
@@ -118,7 +117,7 @@ export default {
   },
   data () {
     return {
-      titleText: '添加用户',
+      titleText: '新增用户',
       isshow: this.visible,
       roleList: [],
       formItemLayout: {
@@ -187,9 +186,6 @@ export default {
           this.$message.warning(res.message)
         }
       })
-    },
-    roleChange (val) {
-      console.log(val, '---')
     }
   },
   watch: {