瀏覽代碼

搜索条件

1
mo 3 年之前
父節點
當前提交
f0ead244d4

+ 1 - 0
src/views/businessManager/orderManager/financeManager-taoqi.vue

@@ -408,6 +408,7 @@
               v-model.trim="form.routeOrganId"
               :disabled="!isAdd"
               @change="changeOrgin"
+               filterable
               style="width: 100% !important"
             >
               <el-option

+ 1 - 0
src/views/businessManager/orderManager/financeManager.vue

@@ -407,6 +407,7 @@
             <el-select
               v-model.trim="form.routeOrganId"
               :disabled="!isAdd"
+              filterable
               @change="changeOrgin"
               style="width: 100% !important"
             >

+ 97 - 59
src/views/categroyManager/insideSetting/adminManager.vue

@@ -1,104 +1,142 @@
 <template>
-  <div class='m-container'>
+  <div class="m-container">
     <h2>
-      <div class="squrt"></div>角色管理
+      <div class="squrt"></div>
+      角色管理
     </h2>
+
     <div class="m-core">
-      <el-button  style="margin-bottom: 20px;" type="primary" v-permission="'role/add'" @click="onAdminOperation('create')" icon="el-icon-plus">添加</el-button>
+      <save-form
+        :inline="true"
+        ref="searchForm"
+        :model="searchForm"
+        @submit="search"
+        @reset="onReSet"
+      >
+        <el-form-item prop="search">
+          <el-input
+            v-model.trim="searchForm.search"
+            clearable
+            @keyup.enter.native="search"
+            placeholder="请输入角色类型"
+          ></el-input>
+        </el-form-item>
+        <el-form-item>
+          <el-button native-type="submit" type="primary">搜索</el-button>
+          <el-button native-type="reset" type="danger">重置</el-button>
+        </el-form-item>
+      </save-form>
+      <el-button
+        style="margin-bottom: 20px"
+        type="primary"
+        v-permission="'role/add'"
+        @click="onAdminOperation('create')"
+        icon="el-icon-plus"
+        >添加</el-button
+      >
       <!-- 列表 -->
       <div class="tableWrap">
-        <el-table :data='tableList'
-                  header-cell-class-name="headerName">
-          <el-table-column align='center'
-                           prop="roleName"
-                           label="角色类型">
+        <el-table :data="tableList" header-cell-class-name="headerName">
+          <el-table-column align="center" prop="roleName" label="角色类型">
           </el-table-column>
-          <el-table-column align='center'
-                           prop="roleDesc"
-                           label="角色描述">
+          <el-table-column align="center" prop="roleDesc" label="角色描述">
           </el-table-column>
-          <el-table-column align='center'
-                           label="操作">
+          <el-table-column align="center" label="操作">
             <template slot-scope="scope">
-              <el-button @click="onAdminOperation('update', scope.row)"
-                         v-permission="'role/update'"
-                         type="text">修改</el-button>
+              <el-button
+                @click="onAdminOperation('update', scope.row)"
+                v-permission="'role/update'"
+                type="text"
+                >修改</el-button
+              >
             </template>
           </el-table-column>
         </el-table>
-        <pagination :total.sync="pageInfo.total"
-                    :page.sync="pageInfo.page"
-                    :limit.sync="pageInfo.limit"
-                    :page-sizes="pageInfo.page_size"
-                    @pagination="getList" />
+        <pagination
+          :total.sync="pageInfo.total"
+          :page.sync="pageInfo.page"
+          :limit.sync="pageInfo.limit"
+          :page-sizes="pageInfo.page_size"
+          @pagination="getList"
+        />
       </div>
     </div>
   </div>
 </template>
 <script>
-import pagination from '@/components/Pagination/index'
-import { roleQueryPage } from '@/api/systemManage'
+import pagination from "@/components/Pagination/index";
+import { roleQueryPage } from "@/api/systemManage";
 export default {
-  name: 'adminManager',
+  name: "adminManager",
   components: { pagination },
-  data () {
+  data() {
     return {
       tableList: [],
+      searchForm:{
+        search:''
+      },
       pageInfo: {
         // 分页规则
         limit: 10, // 限制显示条数
         page: 1, // 当前页
         total: 0, // 总条数
-        page_size: [10, 20, 40, 50] // 选择限制显示条数
-      }
-    }
+        page_size: [10, 20, 40, 50], // 选择限制显示条数
+      },
+    };
   },
-  created () {
-    this.init()
+  created() {
+    this.init();
   },
-  activated () {
-    this.init()
-  },
-  mounted () {
-
-
+  activated() {
+    this.init();
   },
+  mounted() {},
   methods: {
-    init () {
-      this.$route.query.page ? this.pageInfo.page = parseInt(this.$route.query.page) : this.pageInfo.page = 1
-      this.getList()
+    search() {
+      this.pageInfo.page = 1;
+      this.getList();
+    },
+    onReSet() {
+      this.$refs.searchForm.resetFields();
+      this.search();
+    },
+    init() {
+      this.$route.query.page
+        ? (this.pageInfo.page = parseInt(this.$route.query.page))
+        : (this.pageInfo.page = 1);
+      this.getList();
     },
-    getList () {
+    getList() {
       roleQueryPage({
         rows: this.pageInfo.limit,
-        page: this.pageInfo.page
-      }).then(res => {
+        page: this.pageInfo.page,
+        ...this.searchForm
+      }).then((res) => {
         if (res.code == 200 && res.data) {
-          this.tableList = res.data.rows
-          this.pageInfo.total = res.data.total
-
+          this.tableList = res.data.rows;
+          this.pageInfo.total = res.data.total;
         }
-      })
+      });
     },
-    onAdminOperation (type, row) {
+    onAdminOperation(type, row) {
       let params = {
-        path: '/systemManager/adminOperation',
+        path: "/systemManager/adminOperation",
         query: {
           type: type,
-          page: this.pageInfo.page
-        }
-      }
-      let tagTitle = '新建'
+          page: this.pageInfo.page,
+        },
+      };
+      let tagTitle = "新建";
       if (row) {
-        params.query.id = row.id
-        tagTitle = '修改'
+        params.query.id = row.id;
+        tagTitle = "修改";
       }
       this.$router.push(params, (route) => {
-        route.meta.title = tagTitle + '系统角色权限'
-      })
-    }
-  }
-}
+        route.meta.title = tagTitle + "系统角色权限";
+      });
+    },
+  },
+};
 </script>
 <style lang="scss">
 .headerName {

+ 22 - 12
src/views/operationManual/index.vue

@@ -11,6 +11,15 @@
         @submit="search"
         @reset="onReSet"
       >
+        <el-form-item prop="search">
+          <el-input
+            v-model.trim="searchForm.search"
+            clearable
+            @keyup.enter.native="search"
+            placeholder="请输入手册名称"
+          ></el-input>
+        </el-form-item>
+        <!-- search -->
         <el-form-item prop="menuId">
           <el-cascader
             ref="myCascader"
@@ -130,6 +139,7 @@ export default {
     return {
       searchForm: {
         menuId: [],
+        search:''
       },
       operationStatus: "create",
       form: {
@@ -179,6 +189,7 @@ export default {
       try {
         const res = await getSysManualList({
           menuId: this.searchForm.menuId[this.searchForm.menuId.length - 1],
+          search: this.searchForm.search,
           page: this.rules.page,
           rows: this.rules.limit,
         });
@@ -193,10 +204,9 @@ export default {
       this.getList();
     },
     onReSet() {
-      this.$nextTick(()=>{
-           this.search()
-      })
-
+      this.$nextTick(() => {
+        this.search();
+      });
     },
     setTableData(result) {
       let list = [];
@@ -251,15 +261,15 @@ export default {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning",
-      }).then(async()=>{
-        try{
-          const res = await deteltSysManual({id:row.id})
-          this.$message.success('删除成功')
-          this.getList()
-        }catch(e){
-          console.log(e)
+      }).then(async () => {
+        try {
+          const res = await deteltSysManual({ id: row.id });
+          this.$message.success("删除成功");
+          this.getList();
+        } catch (e) {
+          console.log(e);
         }
-      })
+      });
     },
     addManual() {
       this.operationStatus = "create";