Bladeren bron

Merge branch 'master' of http://120.26.64.82:3000/BFFE/Foshan4A4.0

zhaoke 3 jaren geleden
bovenliggende
commit
f5387f77f2

+ 45 - 26
src/layout/components/Search/index.vue

@@ -9,15 +9,34 @@
 <template>
   <div class="pub-search">
     <div class="flex">
-      <div v-if="isTitle" :class="isChild ? 'childTitle':''" class="title">{{ title }}</div>
+      <div v-if="isTitle" :class="isChild ? 'childTitle' : ''" class="title">
+        {{ title }}
+      </div>
       <div v-if="isOnly" class="content flex-wrap">
-        <div v-if="isSearch" :class="isChild ? 'childSearch':''" class="search">
-          <el-input :size="isChild ? 'medium':''" :placeholder="placeholder" @clear="clearSearch" clearable v-model="input">
+        <div
+          v-if="isSearch"
+          :class="isChild ? 'childSearch' : ''"
+          class="search"
+        >
+          <el-input
+            :size="isChild ? 'medium' : ''"
+            :placeholder="placeholder"
+            @clear="clearSearch"
+            clearable
+            v-model="input"
+            @keyup.enter.native="checkSearch"
+          >
             <el-button slot="prepend" icon="el-icon-search"></el-button>
           </el-input>
         </div>
         <div v-if="isSearch" class="btn">
-          <button :class="isChild ? 'childBtnAn':''" @click="checkSearch" class="btnAn">搜索</button>
+          <button
+            :class="isChild ? 'childBtnAn' : ''"
+            @click="checkSearch"
+            class="btnAn"
+          >
+            搜索
+          </button>
         </div>
         <div v-if="isSlot" class="add">
           <slot></slot>
@@ -29,64 +48,64 @@
 
 <script>
 export default {
-  name: 'PubSearch',
+  name: "PubSearch",
   props: {
     //title
     title: {
       type: String,
-      default: ''
+      default: "",
     },
     //placeholder
     placeholder: {
       type: String,
-      default: '请输入内容'
+      default: "请输入内容",
     },
     //是否只显示title
     isOnly: {
       type: Boolean,
-      default: true
+      default: true,
     },
     //是否显示搜索
     isSearch: {
       type: Boolean,
-      default: true
+      default: true,
     },
     //是否显示插槽
     isSlot: {
       type: Boolean,
-      default: false
+      default: false,
     },
     //是否title
     isTitle: {
       type: Boolean,
-      default: false
+      default: false,
     },
     //是否二级页面搜索
     isChild: {
       type: Boolean,
-      default: false
-    }
+      default: false,
+    },
   },
-  data () {
+  data() {
     return {
-      input: ''
-    }
+      input: "",
+    };
   },
-  created () {
-    const { keyWords } = this.$route.query
+  created() {
+    const { keyWords } = this.$route.query;
     if (keyWords) {
-      this.input = keyWords
+      this.input = keyWords;
     }
   },
   methods: {
-    checkSearch () {
-      this.$emit('getSearchData', this.input)
+    checkSearch() {
+      this.$emit("getSearchData", this.input);
     },
-    clearSearch () {
-      this.$emit('clearSearchData', this.input)
-    }
-  }
-}
+    clearSearch() {
+      this.$emit("clearSearchData", this.input);
+    },
+  },
+};
 </script>
 
 <style lang="scss" scoped>

+ 1 - 0
src/views/systemManagement/EditSystem/index.vue

@@ -138,6 +138,7 @@
               clearable
               @clear="clearData"
               v-model.trim="keyWords"
+              @keyup.enter.native="queryData"
             ></el-input>
             <el-button @click="queryData()">搜索</el-button>
           </div>

+ 2 - 2
src/views/systemManagement/LoginPolicy/index.vue

@@ -130,7 +130,7 @@ export default {
     return {
       flag: false, //弹框开关
       tacList: [],
-      tacName: '',
+      tacName: "",
       delItem: null,
       delIndex: null,
       keyWord: "",
@@ -260,7 +260,7 @@ export default {
     open(data, index) {
       this.delItem = data;
       this.delIndex = index;
-      this.tacName = data.TacName
+      this.tacName = data.TacName;
       this.flag = true;
     },
     //滚动加载数据

+ 1 - 0
src/views/systemManagement/addSystem/index.vue

@@ -135,6 +135,7 @@
               clearable
               @clear="clearData"
               v-model.trim="keyWords"
+              @keyup.enter.native="getUserData"
             ></el-input>
             <el-button @click="getUserData">搜索</el-button>
           </div>