duy vor 5 Tagen
Ursprung
Commit
9e30b99612
6 geänderte Dateien mit 1680 neuen und 1530 gelöschten Zeilen
  1. 35 0
      src/styles/common.scss
  2. 16 0
      src/util/util.js
  3. 452 353
      src/views/exctab/exceltab.vue
  4. 621 562
      src/views/manager/projectinfo/tree.vue
  5. 377 318
      src/views/manager/wbsinfo.vue
  6. 179 297
      yarn.lock

+ 35 - 0
src/styles/common.scss

@@ -165,3 +165,38 @@ a{
   margin-right: 4px;
 }
 
+// 表单搜索框高亮显示
+.hc-search-highlight {
+   position: relative;
+}
+.hc-search-highlight::before {
+    content: '';
+    position: absolute;
+    background-color: rgba(157, 206, 255, 0.4) !important;
+    border-radius: 5px;
+    top: -2px;
+    left: -2px;
+    right: -2px;
+    bottom: -2px;
+    z-index: 1;
+    pointer-events: none;
+}
+
+// 文案关键词高亮显示
+.hc-keyword-highlight {
+   position: relative;
+   display: inline;
+}
+.hc-keyword-highlight::before {
+    content: '';
+    position: absolute;
+    background-color: rgba(157, 206, 255, 0.4) !important;
+    // border-radius: 3px;
+    top: -1px;
+    left: 0;
+    right: 0;
+    bottom: -1px;
+    // z-index: 1;
+    pointer-events: none;
+}
+

+ 16 - 0
src/util/util.js

@@ -391,4 +391,20 @@ export const downloadXls = (fileArrayBuffer, filename) => {
 }
 export const isObjectEmpty=(obj)=> {
   return JSON.stringify(obj) === '{}';
+}
+
+/**
+ * 关键词高亮
+ * @param {String} text   原始文本
+ * @param {String} key    关键词
+ * @returns {String}      返回带标签的字符串
+ */
+export function highlight(text = '', key = '') {
+  if (!key) return text
+  const reg = new RegExp(
+    // 把用户输入的特殊符号转义,防止正则报错
+    key.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'),
+    'g', // g 全局  i 忽略大小写
+  )
+  return text.replace(reg, str => [...str].map( el => `<span class="hc-keyword-highlight">${el}</span>`).join(''))
 }

Datei-Diff unterdrückt, da er zu groß ist
+ 452 - 353
src/views/exctab/exceltab.vue


Datei-Diff unterdrückt, da er zu groß ist
+ 621 - 562
src/views/manager/projectinfo/tree.vue


+ 377 - 318
src/views/manager/wbsinfo.vue

@@ -1,65 +1,122 @@
 <template>
   <basic-container>
-        <div class="search-box">
-        <div class="search-box-left">
-            <el-input v-model="query.wbsName" placeholder="请输入名称" style="width: 200px;" class="filter-item"   size="small"/>
-            <el-select v-model="query.projectId" placeholder="项目名称" clearable style="width: 200px" class="filter-item"   size="small">
-              <el-option v-for="item in projectList" :key="item.id" :label="item.projectAlias" :value="item.id" />
-            </el-select>
-            <el-select v-model="query.wbsType" placeholder="划分类型" clearable style="width: 200px" class="filter-item"   size="small">
-              <el-option v-for="item in tabTypeList"  :key="item.dictKey" :label="item.dictValue" :value="item.dictKey" />
-            </el-select>
-           
-            <el-button type="primary" @click="searchClick" class="custom-primary-btn"   size="small">搜索</el-button>
-            <el-button type="info" @click="clearSearch"   size="small">清空</el-button>
+    <div class="search-box">
+      <div class="flex">
+        <div
+          class="filter-item"
+          style="width: 200px"
+          :class="[query.wbsName ? 'hc-search-highlight' : '']"
+        >
+          <el-input
+            v-model="query.wbsName"
+            placeholder="请输入名称"
+            clearable
+            size="small"
+          />
         </div>
-        <div class="header-box-right">
-           <el-button
-            type="primary"
+        <div
+          class="filter-item"
+          style="width: 200px"
+          :class="[query.projectId ? 'hc-search-highlight' : '']"
+        >
+          <el-select
+            v-model="query.projectId"
+            placeholder="项目名称"
+            clearable
             size="small"
-            icon="el-icon-plus"
-        
-        
-            @click="handleAdd"
-          >新增
-          </el-button>
-                <el-button
-            type="warning"
+          >
+            <el-option
+              v-for="item in projectList"
+              :key="item.id"
+              :label="item.projectAlias"
+              :value="item.id"
+            />
+          </el-select>
+        </div>
+        <div
+          class="filter-item"
+          style="width: 200px"
+          :class="[query.wbsType ? 'hc-search-highlight' : '']"
+        >
+          <el-select
+            v-model="query.wbsType"
+            placeholder="划分类型"
+            clearable
+            style="width: 200px"
+            class="filter-item"
             size="small"
-            icon="el-icon-sort"
-    
-      
-            @click="handleSort"
+          >
+            <el-option
+              v-for="item in tabTypeList"
+              :key="item.dictKey"
+              :label="item.dictValue"
+              :value="item.dictKey"
+            />
+          </el-select>
+        </div>
+
+        <el-button
+          type="primary"
+          @click="searchClick"
+          class="custom-primary-btn"
+          size="small"
+          >搜索</el-button
+        >
+        <el-button type="info" @click="clearSearch" size="small"
+          >清空</el-button
+        >
+      </div>
+      <div class="header-box-right">
+        <el-button
+          type="primary"
+          size="small"
+          icon="el-icon-plus"
+          @click="handleAdd"
+          >新增
+        </el-button>
+        <el-button
+          type="warning"
+          size="small"
+          icon="el-icon-sort"
+          @click="handleSort"
           >排序
-          </el-button>
-              <el-button
-            type="danger"
-            size="small"
-            icon="el-icon-delete"
-          
-            v-if="permission.wbsinfo_delete"
-            @click="handleDelete"
+        </el-button>
+        <el-button
+          type="danger"
+          size="small"
+          icon="el-icon-delete"
+          v-if="permission.wbsinfo_delete"
+          @click="handleDelete"
           >删 除
-          </el-button>
-          <!-- 新增元素按钮 -->
-          <el-button
-            size="small"
-            style="background-color:#FFA042;color:white;font-weight:bold;border-color: #FFA042;"
-            plain
-            v-if="permission.wbsinfo_delete"
-            @click="handleElement"
+        </el-button>
+        <!-- 新增元素按钮 -->
+        <el-button
+          size="small"
+          style="
+            background-color: #ffa042;
+            color: white;
+            font-weight: bold;
+            border-color: #ffa042;
+          "
+          plain
+          v-if="permission.wbsinfo_delete"
+          @click="handleElement"
           >元素库
-          </el-button>
-          <el-button
-            size="small"
-            style="background-color:#2550A2;color:white;font-weight:bold;border-color: #2550A2;"
-            plain
-            v-if="permission.wbsinfo_delete"
-            @click="handleParameter"
+        </el-button>
+        <el-button
+          size="small"
+          style="
+            background-color: #2550a2;
+            color: white;
+            font-weight: bold;
+            border-color: #2550a2;
+          "
+          plain
+          v-if="permission.wbsinfo_delete"
+          @click="handleParameter"
           >参数库
-          </el-button>
-        </div>
-      
+        </el-button>
+      </div>
     </div>
     <avue-crud
       :option="option"
@@ -80,329 +137,336 @@
       @size-change="sizeChange"
       @refresh-change="refreshChange"
       @on-load="onLoad"
-       :search.sync="search"
+      :search.sync="search"
     >
-
-<template slot-scope="{disabled,size}" slot="projectInfoListSearch">
-      <el-select v-model="search.projectId" placeholder="项目名称" filterable  clearable>
+      <template slot-scope="{ row }" slot="wbsName">
+        <span v-html="highlight(row.wbsName || '', query.wbsName)"></span>
+      </template>
+      <template slot-scope="{ disabled, size }" slot="projectInfoListSearch">
+        <el-select
+          v-model="search.projectId"
+          placeholder="项目名称"
+          filterable
+          clearable
+        >
           <el-option
             v-for="item in projectList"
             :key="item.id"
             :label="item.projectAlias"
-            :value="item.id">
+            :value="item.id"
+          >
           </el-option>
         </el-select>
-  </template>
-      <template slot="menuRight">
-         
       </template>
-      <template
-        slot-scope="{row,index}"
-        slot="menu"
-      >
+      <template slot="menuRight"> </template>
+      <template slot-scope="{ row, index }" slot="menu">
         <el-button
           type="text"
           icon="el-icon-edit"
           size="mini"
           v-if="permission.wbsinfo_tree_edit"
-          @click="toEdit(row,index)"
-        >编辑wbs库</el-button>
+          @click="toEdit(row, index)"
+          >编辑wbs库</el-button
+        >
       </template>
-       <template
-            slot-scope="{row}"
-            slot="wbsType"
+      <template slot-scope="{ row }" slot="wbsType">
+        <!-- <el-tag>{{ row.wbsType }}</el-tag> -->
+        <el-tag
+          size="small"
+          v-for="item in generateTagItems(row.wbsType)"
+          :key="item.label"
+          :type="item.type"
+          effect="dark"
+          class="mr-3 custom-ellipse-tag"
+          :class="`custom-tag-type-${item.type}`"
+        >
+          {{ item.label }}
+        </el-tag>
+      </template>
+      <template slot-scope="{ row }" slot="projectInfoList">
+        <el-tooltip
+          v-for="item in row.projectInfoList"
+          :key="item.id"
+          :content="item.projectName"
+          placement="top"
+          :disabled="true"
+        >
+          <el-tag
+            size="small"
+            type="info"
+            class="custom-ellipse-tag1 ellipsis-tag"
           >
-            <!-- <el-tag>{{ row.wbsType }}</el-tag> -->
-                <el-tag
-                  size="small"
-                  v-for="item in generateTagItems(row.wbsType)"
-                  :key="item.label"
-                  :type="item.type"
-                  effect="dark"
-                  class="mr-3 custom-ellipse-tag"
-                  :class="`custom-tag-type-${item.type}`"
-                  >
-                 
-                  {{ item.label }}
-                </el-tag>
-        
-          </template>
-          <template slot-scope="{row}" slot="projectInfoList">
-          
-                    <el-tooltip 
-                    v-for="item in row.projectInfoList" 
-                    :key="item.id"
-                    :content="item.projectName"
-                    placement="top"
-                    :disabled="true"
-                  >
-                    <el-tag  
-                      size="small" 
-                      type="info"   
-                      class="custom-ellipse-tag1 ellipsis-tag"
-                      
-                    >
-                      {{item.projectName}}
-                    </el-tag>
-                  </el-tooltip>
-          </template>
+            {{ item.projectName }}
+          </el-tag>
+        </el-tooltip>
+      </template>
     </avue-crud>
-           <!-- wbs排序弹窗 -->
-        <ContractSort 
-         ref="contractSortRef"
-         title="wbs排序弹窗"
-         :sortProLoad="sortProLoad"
-        @confirm="handleSortConfirm"
-      />
+    <!-- wbs排序弹窗 -->
+    <ContractSort
+      ref="contractSortRef"
+      title="wbs排序弹窗"
+      :sortProLoad="sortProLoad"
+      @confirm="handleSortConfirm"
+    />
   </basic-container>
 </template>
 
 <script>
-import { getList, getDetail, add, update, remove,sortWbs } from "@/api/manager/wbsinfo";
+import {
+  getList,
+  getDetail,
+  add,
+  update,
+  remove,
+  sortWbs,
+} from "@/api/manager/wbsinfo";
 import { mapGetters } from "vuex";
-  import { getDictionary } from "@/api/system/dict";
-  import ContractSort from './ContractSort.vue'
+import { getDictionary } from "@/api/system/dict";
+import ContractSort from "./ContractSort.vue";
 import { getProjectListPage } from "@/api/manager/projectinfo";
+import { highlight } from "@/util/util";
 
 export default {
   components: {
-    ContractSort
+    ContractSort,
   },
-  data () {
+  data() {
     return {
+      highlight,
       form: {},
-      query: {},
+      query: {
+        wbsName: "",
+        wbsType: "",
+        projectId: "",
+      },
       loading: true,
       page: {
         pageSize: 20,
         currentPage: 1,
-        total: 0
+        total: 0,
       },
       selectionList: [],
       option: {
         menuWidth: 300,
-        height: 'auto',
+        height: "auto",
         calcHeight: 30,
         tip: false,
         searchMenuSpan: 6,
- 
+
         border: true,
         index: true,
         viewBtn: true,
-          addBtn: false,
+        addBtn: false,
         selection: true,
-         refreshBtn:false,
+        refreshBtn: false,
         searchShowBtn: false,
         columnBtn: false,
         dialogClickModal: false,
-          searchShow: false,
+        searchShow: false,
         column: [
           {
             label: "创建时间",
             prop: "createTime",
             editDetail: true,
             addDisabled: true,
-               hide: true,
-      
+            hide: true,
           },
           {
             label: "wbs名称",
             prop: "wbsName",
+            slot: true,
             search: true,
             width: 180,
-        
-       
-       
-            rules: [{
-              required: true,
-              message: "请输入wbs名称",
-              trigger: "blur"
-            }]
+            rules: [
+              {
+                required: true,
+                message: "请输入wbs名称",
+                trigger: "blur",
+              },
+            ],
           },
           {
             label: "划分类型",
             slot: true,
-              search: true,
-              width: 120,
-        
-          
-           
-           
-           
+            search: true,
+            width: 120,
+
             type: "select",
             dicUrl: "/api/blade-system/dict/dictionary?code=wbs_type",
             props: {
               label: "dictValue",
-              value: "dictKey"
+              value: "dictKey",
             },
             dataType: "number",
             prop: "wbsType",
-            rules: [{
-              required: true,
-              message: "请选择划分类型",
-              trigger: "blur"
-            }],
-           
+            rules: [
+              {
+                required: true,
+                message: "请选择划分类型",
+                trigger: "blur",
+              },
+            ],
           },
           {
             label: "是否启用",
             prop: "status",
             hide: true,
-      
-            rules: [{
-              required: true,
-              message: "是否启用",
-              trigger: "blur"
-            }],
+
+            rules: [
+              {
+                required: true,
+                message: "是否启用",
+                trigger: "blur",
+              },
+            ],
             type: "radio",
             dicData: [
               {
                 label: "否",
-                value: 0
+                value: 0,
               },
               {
                 label: "是",
-                value: 1
-              }
+                value: 1,
+              },
             ],
           },
-           {
+          {
             label: "引用项目",
             prop: "projectInfoList",
             display: false,
             search: true,
-            slot:true,
-            
+            slot: true,
           },
-   
-        ]
+        ],
       },
       data: [],
-      search:{
-        wbsName: '',
-        wbsType: '',
-        projectId:''
+      search: {
+        wbsName: "",
+        wbsType: "",
+        projectId: "",
       },
-       wbsTypeList:[],
-
-       sortProLoad:false,
-       wbsList:[],
-       sortWbsList:[],
-       projectList:[],
-       tabTypeList:[],
+      wbsTypeList: [],
 
+      sortProLoad: false,
+      wbsList: [],
+      sortWbsList: [],
+      projectList: [],
+      tabTypeList: [],
     };
   },
-  created () {
-    this.getTabTypeList()
-    this.getWbsList()
-    this.getProjectList()
+  created() {
+    this.getTabTypeList();
+    this.getWbsList();
+    this.getProjectList();
   },
   computed: {
     ...mapGetters(["permission"]),
-    permissionList () {
+    permissionList() {
       return {
         addBtn: this.vaildData(this.permission.wbsinfo_add, false),
         viewBtn: this.vaildData(this.permission.wbsinfo_view, false),
         delBtn: this.vaildData(this.permission.wbsinfo_delete, false),
-        editBtn: this.vaildData(this.permission.wbsinfo_edit, false)
+        editBtn: this.vaildData(this.permission.wbsinfo_edit, false),
       };
     },
-    ids () {
+    ids() {
       let ids = [];
-      this.selectionList.forEach(ele => {
+      this.selectionList.forEach((ele) => {
         ids.push(ele.id);
       });
       return ids.join(",");
-    }
+    },
   },
   methods: {
-  getProjectList () {
+    getProjectList() {
       getProjectListPage({
-        current:1,
-        size:999,
-        isCollect:0,
-    
-
+        current: 1,
+        size: 999,
+        isCollect: 0,
       }).then((res) => {
         this.projectList = res.data.data.records;
-      })
+      });
     },
-  generateTagItems(wbsTypes){
-       const typeToLabelMap = {
-        1: '质检',
-        2: '试验',
-        3: '日志',
-        4: '计量',
-        5: '征拆',
-        6: '底层节点',
-       
-    };
+    generateTagItems(wbsTypes) {
+      const typeToLabelMap = {
+        1: "质检",
+        2: "试验",
+        3: "日志",
+        4: "计量",
+        5: "征拆",
+        6: "底层节点",
+      };
       let tagItems = [];
-         // 如果 wbsTypes 不是数组,则将其转换为数组
-    if (!Array.isArray(wbsTypes)) {
+      // 如果 wbsTypes 不是数组,则将其转换为数组
+      if (!Array.isArray(wbsTypes)) {
         wbsTypes = [wbsTypes];
-    }
-      wbsTypes.forEach(type => {
+      }
+      wbsTypes.forEach((type) => {
         // 检查type是否在映射关系中存在
         if (typeToLabelMap.hasOwnProperty(type)) {
-            // 如果存在,则创建一个新的对象并添加到tagItems数组中
-            tagItems.push({
-                type: type,
-                label: typeToLabelMap[type]
-            });
+          // 如果存在,则创建一个新的对象并添加到tagItems数组中
+          tagItems.push({
+            type: type,
+            label: typeToLabelMap[type],
+          });
         }
-    });
-     return tagItems;
-  },
-     getTabTypeList(){
-           let code = "wbs_type";
-            getDictionary({
-                code,
-            }).then((res) => {
-                    this.tabTypeList = res.data.data;
-            });
-
-    },
-      //点击元素库
-    handleElement(){
-      console.log('元素库');
-      this.$router.push({
-        path: '/wbs/element',
-      })
+      });
+      return tagItems;
     },
-    rowSave (row, done, loading) {
-      row.projectInfoList=null
-      add(row).then(() => {
-        this.onLoad(this.page);
-        this.$message({
-          type: "success",
-          message: "操作成功!"
-        });
-        done();
-      }, error => {
-        loading();
-        window.console.log(error);
+    getTabTypeList() {
+      let code = "wbs_type";
+      getDictionary({
+        code,
+      }).then((res) => {
+        this.tabTypeList = res.data.data;
       });
     },
-    rowUpdate (row, index, done, loading) {
-      update(row).then(() => {
-        this.onLoad(this.page);
-        this.$message({
-          type: "success",
-          message: "操作成功!"
-        });
-        done();
-      }, error => {
-        loading();
-        console.log(error);
+    //点击元素库
+    handleElement() {
+      console.log("元素库");
+      this.$router.push({
+        path: "/wbs/element",
       });
     },
-    rowDel (row) {
+    rowSave(row, done, loading) {
+      row.projectInfoList = null;
+      add(row).then(
+        () => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!",
+          });
+          done();
+        },
+        (error) => {
+          loading();
+          window.console.log(error);
+        }
+      );
+    },
+    rowUpdate(row, index, done, loading) {
+      update(row).then(
+        () => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!",
+          });
+          done();
+        },
+        (error) => {
+          loading();
+          console.log(error);
+        }
+      );
+    },
+    rowDel(row) {
       this.$confirm("确定将选择数据删除?", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
-        type: "warning"
+        type: "warning",
       })
         .then(() => {
           return remove(row.id);
@@ -411,15 +475,14 @@ export default {
           this.onLoad(this.page);
           this.$message({
             type: "success",
-            message: "操作成功!"
+            message: "操作成功!",
           });
         });
     },
     handleAdd(row) {
-      
-        this.$refs.crud.rowAdd();
-      },
-    handleDelete () {
+      this.$refs.crud.rowAdd();
+    },
+    handleDelete() {
       if (this.selectionList.length === 0) {
         this.$message.warning("请选择至少一条数据");
         return;
@@ -427,7 +490,7 @@ export default {
       this.$confirm("确定将选择数据删除?", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
-        type: "warning"
+        type: "warning",
       })
         .then(() => {
           return remove(this.ids);
@@ -436,48 +499,52 @@ export default {
           this.onLoad(this.page);
           this.$message({
             type: "success",
-            message: "操作成功!"
+            message: "操作成功!",
           });
           this.$refs.crud.toggleSelection();
         });
     },
-    beforeOpen (done, type) {
+    beforeOpen(done, type) {
       if (["edit", "view"].includes(type)) {
-        getDetail(this.form.id).then(res => {
+        getDetail(this.form.id).then((res) => {
           this.form = res.data.data;
         });
       }
       done();
     },
-    searchReset () {
+    searchReset() {
       this.query = {};
       this.onLoad(this.page);
     },
-    searchChange (params, done) {
+    searchChange(params, done) {
       this.query = params;
       this.page.currentPage = 1;
       this.onLoad(this.page, params);
       done();
     },
-    selectionChange (list) {
+    selectionChange(list) {
       this.selectionList = list;
     },
-    selectionClear () {
+    selectionClear() {
       this.selectionList = [];
       this.$refs.crud.toggleSelection();
     },
-    currentChange (currentPage) {
+    currentChange(currentPage) {
       this.page.currentPage = currentPage;
     },
-    sizeChange (pageSize) {
+    sizeChange(pageSize) {
       this.page.pageSize = pageSize;
     },
-    refreshChange () {
+    refreshChange() {
       this.onLoad(this.page, this.query);
     },
-    onLoad (page, params = {}) {
+    onLoad(page, params = {}) {
       this.loading = true;
-      getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+      getList(
+        page.currentPage,
+        page.pageSize,
+        Object.assign(params, this.query)
+      ).then((res) => {
         const data = res.data.data;
         this.page.total = data.total;
         this.data = data.records;
@@ -486,85 +553,77 @@ export default {
       });
     },
 
-    toEdit (row) {
+    toEdit(row) {
       console.log(row);
       this.$router.push({
-        path: '/wbs/edit',
+        path: "/wbs/edit",
         query: {
           id: row.id,
-          type: row.wbsType
-        }
-      })
+          type: row.wbsType,
+        },
+      });
       //this.$router.push('/wbs/edit/' + row.id);
     },
     //点击参数库
-    handleParameter(){
-       this.$router.push('/wbs/parameter');
+    handleParameter() {
+      this.$router.push("/wbs/parameter");
     },
-    getWbsList(){
-      getList(1, 1000).then(res => {
+    getWbsList() {
+      getList(1, 1000).then((res) => {
         const data = res.data.data;
-        
-        this.wbsList=data['records']
+
+        this.wbsList = data["records"];
       });
     },
     //排序
-    handleSort(){
-         this.sortWbsList = JSON.parse(JSON.stringify(this.wbsList));
-        this.sortTitle = '合同段排序';
+    handleSort() {
+      this.sortWbsList = JSON.parse(JSON.stringify(this.wbsList));
+      this.sortTitle = "合同段排序";
 
-          this.$nextTick(() => {
-            this.$refs.contractSortRef.show(this.sortWbsList);
-          });
+      this.$nextTick(() => {
+        this.$refs.contractSortRef.show(this.sortWbsList);
+      });
     },
-     handleSortConfirm(sortedList) {
+    handleSortConfirm(sortedList) {
       // 这里处理排序后的数据
-      console.log('排序后的列表:', sortedList);
+      console.log("排序后的列表:", sortedList);
       // TODO: 调用接口保存排序结果
       this.wbsList = [...sortedList];
-        const ids = this.wbsList.map(item => item.id);
-     this. saveSort(ids);
-
+      const ids = this.wbsList.map((item) => item.id);
+      this.saveSort(ids);
     },
-    saveSort(ids){
-        sortWbs(ids).then((res) => {
-                    this.sortProLoad= false;
-                    if(res.data.code==200){
-                        this.$message.success(res.data.msg)
-                      
-                                 this.onLoad(this.page);
-                    }else{
-                        this.$message.error(res.data.msg)
-                    }
-                })
-      
-
+    saveSort(ids) {
+      sortWbs(ids).then((res) => {
+        this.sortProLoad = false;
+        if (res.data.code == 200) {
+          this.$message.success(res.data.msg);
 
+          this.onLoad(this.page);
+        } else {
+          this.$message.error(res.data.msg);
+        }
+      });
     },
-    searchClick(){ 
-       this.page.currentPage = 1;
-      this.onLoad(this.page,this.query);
+    searchClick() {
+      this.page.currentPage = 1;
+      this.onLoad(this.page, this.query);
     },
-    clearSearch(){
-       this.page.currentPage = 1;
+    clearSearch() {
+      this.page.currentPage = 1;
       this.query = {};
-      this.onLoad(this.page,this.query);
-    }
-  }
+      this.onLoad(this.page, this.query);
+    },
+  },
 };
 </script>
 
 <style scoped lang="scss">
-.search-box{
+.search-box {
   display: flex;
   justify-content: space-between;
-  .search-item{
-    margin-right: 10px;
-    margin-left: 10px;
-  }
- 
 }
-.filter-item{
+
+.filter-item {
   margin-right: 10px;
 }
 </style>

Datei-Diff unterdrückt, da er zu groß ist
+ 179 - 297
yarn.lock


Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden.