浏览代码

修复登录日志和操作日志不能筛选的问题
修复所有查询界面只有一个查询条件时在文本框中回车会刷新界面的问题

zhontai 2 年之前
父节点
当前提交
69e242ba34

+ 7 - 7
package-lock.json

@@ -17,7 +17,7 @@
         "echarts": "^5.4.1",
         "echarts-gl": "^2.0.9",
         "echarts-wordcloud": "^2.1.0",
-        "element-plus": "^2.2.27",
+        "element-plus": "^2.2.29",
         "js-cookie": "^3.0.1",
         "js-table2excel": "^1.0.3",
         "jsplumb": "^2.15.6",
@@ -1990,9 +1990,9 @@
       }
     },
     "node_modules/element-plus": {
-      "version": "2.2.28",
-      "resolved": "https://registry.npmmirror.com/element-plus/-/element-plus-2.2.28.tgz",
-      "integrity": "sha512-BsxF7iEaBydmRfw1Tt++EO9jRBjbtJr7ZRIrnEwz4J3Cwa1IzHCNCcx3ZwcYTlJq9CYFxv94JnbNr1EbkTou3A==",
+      "version": "2.2.29",
+      "resolved": "https://registry.npmmirror.com/element-plus/-/element-plus-2.2.29.tgz",
+      "integrity": "sha512-g4dcrURrKkR5uUX8n5RVnnqGnimoki9HfqS4yHHG6XwCHBkZGozdq4x+478BzeWUe31h++BO+7dakSx4VnM8RQ==",
       "dependencies": {
         "@ctrl/tinycolor": "^3.4.1",
         "@element-plus/icons-vue": "^2.0.6",
@@ -5945,9 +5945,9 @@
       "requires": {}
     },
     "element-plus": {
-      "version": "2.2.28",
-      "resolved": "https://registry.npmmirror.com/element-plus/-/element-plus-2.2.28.tgz",
-      "integrity": "sha512-BsxF7iEaBydmRfw1Tt++EO9jRBjbtJr7ZRIrnEwz4J3Cwa1IzHCNCcx3ZwcYTlJq9CYFxv94JnbNr1EbkTou3A==",
+      "version": "2.2.29",
+      "resolved": "https://registry.npmmirror.com/element-plus/-/element-plus-2.2.29.tgz",
+      "integrity": "sha512-g4dcrURrKkR5uUX8n5RVnnqGnimoki9HfqS4yHHG6XwCHBkZGozdq4x+478BzeWUe31h++BO+7dakSx4VnM8RQ==",
       "requires": {
         "@ctrl/tinycolor": "^3.4.1",
         "@element-plus/icons-vue": "^2.0.6",

+ 1 - 1
package.json

@@ -22,7 +22,7 @@
     "echarts": "^5.4.1",
     "echarts-gl": "^2.0.9",
     "echarts-wordcloud": "^2.1.0",
-    "element-plus": "^2.2.27",
+    "element-plus": "^2.2.29",
     "js-cookie": "^3.0.1",
     "js-table2excel": "^1.0.3",
     "jsplumb": "^2.15.6",

+ 2 - 2
src/views/admin/api/index.vue

@@ -3,9 +3,9 @@
     <el-row :gutter="8" style="width: 100%">
       <el-col :span="24" :xs="24">
         <el-card shadow="never" :body-style="{ paddingBottom: '0' }" style="margin-top: 8px">
-          <el-form :model="state.filterModel" :inline="true">
+          <el-form :model="state.filterModel" :inline="true" @submit.stop.prevent>
             <el-form-item label="接口名称" prop="name">
-              <el-input v-model="state.filterModel.name" placeholder="接口名称" />
+              <el-input v-model="state.filterModel.name" placeholder="接口名称" @keyup.enter="onQuery" />
             </el-form-item>
             <el-form-item>
               <el-button type="primary" icon="ele-Search" @click="onQuery"> 查询 </el-button>

+ 2 - 2
src/views/admin/dictionary/components/dictionary-form.vue

@@ -4,12 +4,12 @@
       <el-form ref="formRef" :model="form" size="default" label-width="80px">
         <el-row :gutter="35">
           <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
-            <el-form-item label="名称" prop="name" :rules="[{ required: true, message: '请输入字典名称', trigger: ['blur', 'change'] }]">
+            <el-form-item label="名称" prop="name" :rules="[{ required: true, message: '请输入名称', trigger: ['blur', 'change'] }]">
               <el-input v-model="form.name" autocomplete="off" />
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
-            <el-form-item label="编码" prop="code" :rules="[{ required: true, message: '请输入字典编码', trigger: ['blur', 'change'] }]">
+            <el-form-item label="编码" prop="code" :rules="[{ required: true, message: '请输入编码', trigger: ['blur', 'change'] }]">
               <el-input v-model="form.code" autocomplete="off" />
             </el-form-item>
           </el-col>

+ 2 - 2
src/views/admin/dictionary/dictionary-type.vue

@@ -1,8 +1,8 @@
 <template>
   <el-card shadow="never" :body-style="{ paddingBottom: '0' }" style="margin-top: 8px">
-    <el-form :model="state.filterModel" :inline="true">
+    <el-form :model="state.filterModel" :inline="true" @submit.stop.prevent>
       <el-form-item prop="name">
-        <el-input v-model="state.filterModel.name" placeholder="名称或编码" />
+        <el-input v-model="state.filterModel.name" placeholder="名称或编码" @keyup.enter="onQuery" />
       </el-form-item>
       <el-form-item>
         <el-button type="primary" icon="ele-Search" @click="onQuery"> 查询 </el-button>

+ 2 - 2
src/views/admin/dictionary/dictionary.vue

@@ -1,8 +1,8 @@
 <template>
   <el-card shadow="never" :body-style="{ paddingBottom: '0' }" style="margin-top: 8px">
-    <el-form :model="state.filterModel" :inline="true">
+    <el-form :model="state.filterModel" :inline="true" @submit.stop.prevent>
       <el-form-item prop="name">
-        <el-input v-model="state.filterModel.name" placeholder="名称或编码" />
+        <el-input v-model="state.filterModel.name" placeholder="名称或编码" @keyup.enter="onQuery" />
       </el-form-item>
       <el-form-item>
         <el-button type="primary" icon="ele-Search" @click="onQuery"> 查询 </el-button>

+ 2 - 2
src/views/admin/file/index.vue

@@ -1,9 +1,9 @@
 <template>
   <div style="padding: 0px 0px 8px 8px">
     <el-card shadow="never" :body-style="{ paddingBottom: '0' }" style="margin-top: 8px">
-      <el-form :model="state.filterModel" :inline="true">
+      <el-form :model="state.filterModel" :inline="true" @submit.stop.prevent>
         <el-form-item prop="name">
-          <el-input v-model="state.filterModel.fileName" placeholder="文件名" />
+          <el-input v-model="state.filterModel.fileName" placeholder="文件名" @keyup.enter="onQuery" />
         </el-form-item>
         <el-form-item>
           <el-button type="primary" icon="ele-Search" @click="onQuery"> 查询 </el-button>

+ 3 - 2
src/views/admin/logs/login-log.vue

@@ -1,9 +1,9 @@
 <template>
   <div style="padding: 0px 0px 8px 8px">
     <el-card shadow="never" :body-style="{ paddingBottom: '0' }" style="margin-top: 8px">
-      <el-form :model="state.filterModel" :inline="true">
+      <el-form :model="state.filterModel" :inline="true" @submit.stop.prevent>
         <el-form-item prop="name">
-          <el-input v-model="state.filterModel.createdUserName" placeholder="登录账户" />
+          <el-input v-model="state.filterModel.createdUserName" placeholder="登录账户" @keyup.enter="onQuery" />
         </el-form-item>
         <el-form-item>
           <el-button type="primary" icon="ele-Search" @click="onQuery"> 查询 </el-button>
@@ -76,6 +76,7 @@ const formatterTime = (row: any, column: any, cellValue: any) => {
 
 const onQuery = async () => {
   state.loading = true
+  state.pageInput.filter = state.filterModel
   const res = await new LoginLogApi().getPage(state.pageInput)
 
   state.loginLogListData = res?.data?.list ?? []

+ 3 - 2
src/views/admin/logs/opration-log.vue

@@ -1,9 +1,9 @@
 <template>
   <div style="padding: 0px 0px 8px 8px">
     <el-card shadow="never" :body-style="{ paddingBottom: '0' }" style="margin-top: 8px">
-      <el-form :model="state.filterModel" :inline="true">
+      <el-form :model="state.filterModel" :inline="true" @submit.stop.prevent>
         <el-form-item prop="name">
-          <el-input v-model="state.filterModel.createdUserName" placeholder="操作账号" />
+          <el-input v-model="state.filterModel.createdUserName" placeholder="操作账号" @keyup.enter="onQuery" />
         </el-form-item>
         <el-form-item>
           <el-button type="primary" icon="ele-Search" @click="onQuery"> 查询 </el-button>
@@ -81,6 +81,7 @@ const formatterTime = (row: any, column: any, cellValue: any) => {
 
 const onQuery = async () => {
   state.loading = true
+  state.pageInput.filter = state.filterModel
   const res = await new OprationLogApi().getPage(state.pageInput)
 
   state.oprationLogListData = res?.data?.list ?? []

+ 2 - 2
src/views/admin/org/index.vue

@@ -3,9 +3,9 @@
     <el-row :gutter="8" style="width: 100%">
       <el-col :span="24" :xs="24">
         <el-card shadow="never" :body-style="{ paddingBottom: '0' }" style="margin-top: 8px">
-          <el-form :model="state.filterModel" :inline="true">
+          <el-form :model="state.filterModel" :inline="true" @submit.stop.prevent>
             <el-form-item label="部门名称" prop="name">
-              <el-input v-model="state.filterModel.name" placeholder="部门名称" />
+              <el-input v-model="state.filterModel.name" placeholder="部门名称" @keyup.enter="onQuery" />
             </el-form-item>
             <el-form-item>
               <el-button type="primary" icon="ele-Search" @click="onQuery"> 查询 </el-button>

+ 2 - 2
src/views/admin/permission/index.vue

@@ -3,9 +3,9 @@
     <el-row :gutter="8" style="width: 100%">
       <el-col :span="24" :xs="24">
         <el-card shadow="never" :body-style="{ paddingBottom: '0' }" style="margin-top: 8px">
-          <el-form :model="state.filterModel" :inline="true">
+          <el-form :model="state.filterModel" :inline="true" @submit.stop.prevent>
             <el-form-item label="权限名称" prop="name">
-              <el-input v-model="state.filterModel.name" placeholder="权限名称" />
+              <el-input v-model="state.filterModel.name" placeholder="权限名称" @keyup.enter="onQuery" />
             </el-form-item>
             <el-form-item>
               <el-button type="primary" icon="ele-Search" @click="onQuery"> 查询 </el-button>

+ 4 - 4
src/views/admin/role/index.vue

@@ -3,9 +3,9 @@
     <el-row :gutter="8" style="width: 100%">
       <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
         <el-card shadow="never" :body-style="{ paddingBottom: '0' }" style="margin-top: 8px">
-          <el-form :model="state.filterModel" :inline="true">
+          <el-form :model="state.filterModel" :inline="true" @submit.stop.prevent>
             <el-form-item label="角色名称" prop="name">
-              <el-input v-model="state.filterModel.name" placeholder="角色名称" />
+              <el-input v-model="state.filterModel.name" placeholder="角色名称" @keyup.enter="onQuery" />
             </el-form-item>
             <el-form-item>
               <el-button type="primary" icon="ele-Search" @click="onQuery"> 查询 </el-button>
@@ -72,9 +72,9 @@
       </el-col>
       <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
         <el-card shadow="never" :body-style="{ paddingBottom: '0' }" style="margin-top: 8px">
-          <el-form :model="state.filterModel" :inline="true">
+          <el-form :model="state.filterModel" :inline="true" @submit.stop.prevent>
             <el-form-item label="姓名" prop="name">
-              <el-input v-model="state.filterModel.name" placeholder="姓名" />
+              <el-input v-model="state.filterModel.name" placeholder="姓名" @keyup.enter="onGetRoleUserList" />
             </el-form-item>
             <el-form-item>
               <el-button type="primary" icon="ele-Search" @click="onGetRoleUserList"> 查询 </el-button>

+ 2 - 2
src/views/admin/task/index.vue

@@ -1,9 +1,9 @@
 <template>
   <div style="padding: 0px 0px 8px 8px">
     <el-card shadow="never" :body-style="{ paddingBottom: '0' }" style="margin-top: 8px">
-      <el-form :model="state.filterModel" :inline="true">
+      <el-form :model="state.filterModel" :inline="true" @submit.stop.prevent>
         <el-form-item prop="name">
-          <el-input v-model="state.filterModel.topic" placeholder="任务名称" />
+          <el-input v-model="state.filterModel.topic" placeholder="任务名称" @keyup.enter="onQuery" />
         </el-form-item>
         <el-form-item>
           <el-button type="primary" icon="ele-Search" @click="onQuery"> 查询 </el-button>

+ 2 - 2
src/views/admin/tenant/index.vue

@@ -1,9 +1,9 @@
 <template>
   <div style="padding: 0px 0px 8px 8px">
     <el-card shadow="never" :body-style="{ paddingBottom: '0' }" style="margin-top: 8px">
-      <el-form :model="state.filterModel" :inline="true">
+      <el-form :model="state.filterModel" :inline="true" @submit.stop.prevent>
         <el-form-item label="姓名" prop="name">
-          <el-input v-model="state.filterModel.name" placeholder="姓名" />
+          <el-input v-model="state.filterModel.name" placeholder="姓名" @keyup.enter="onQuery" />
         </el-form-item>
         <el-form-item>
           <el-button type="primary" icon="ele-Search" @click="onQuery"> 查询 </el-button>

+ 2 - 2
src/views/admin/user/components/user-select.vue

@@ -9,9 +9,9 @@
         </el-col>
         <el-col :xs="24" :sm="15">
           <el-card shadow="never" :body-style="{ paddingBottom: '0' }" style="margin-top: 8px">
-            <el-form :model="state.filterModel" :inline="true">
+            <el-form :model="state.filterModel" :inline="true" @submit.stop.prevent>
               <el-form-item label="姓名" prop="name">
-                <el-input v-model="state.filterModel.name" placeholder="姓名" />
+                <el-input v-model="state.filterModel.name" placeholder="姓名" @keyup.enter="onQuery" />
               </el-form-item>
               <el-form-item>
                 <el-button type="primary" icon="ele-Search" @click="onQuery"> 查询 </el-button>

+ 2 - 2
src/views/admin/user/index.vue

@@ -8,9 +8,9 @@
       </el-col>
       <el-col :xs="24" :sm="16" :md="16" :lg="18" :xl="20">
         <el-card shadow="never" :body-style="{ paddingBottom: '0' }" style="margin-top: 8px">
-          <el-form :model="state.filterModel" :inline="true">
+          <el-form :model="state.filterModel" :inline="true" @submit.stop.prevent>
             <el-form-item label="姓名" prop="name">
-              <el-input v-model="state.filterModel.name" placeholder="姓名" />
+              <el-input v-model="state.filterModel.name" placeholder="姓名" @keyup.enter="onQuery" />
             </el-form-item>
             <el-form-item>
               <el-button type="primary" icon="ele-Search" @click="onQuery"> 查询 </el-button>

+ 2 - 2
src/views/admin/view/index.vue

@@ -3,9 +3,9 @@
     <el-row :gutter="8" style="width: 100%">
       <el-col :span="24" :xs="24">
         <el-card shadow="never" :body-style="{ paddingBottom: '0' }" style="margin-top: 8px">
-          <el-form :model="state.filterModel" :inline="true">
+          <el-form :model="state.filterModel" :inline="true" @submit.stop.prevent>
             <el-form-item label="视图名称" prop="name">
-              <el-input v-model="state.filterModel.name" placeholder="视图名称" />
+              <el-input v-model="state.filterModel.name" placeholder="视图名称" @keyup.enter="onQuery" />
             </el-form-item>
             <el-form-item>
               <el-button type="primary" icon="ele-Search" @click="onQuery"> 查询 </el-button>