ysy пре 1 година
родитељ
комит
e819855a51

+ 1 - 1
src/views/material/product/components/index-data.vue

@@ -460,7 +460,7 @@
         this.$refs.table.reload({
         this.$refs.table.reload({
           page: 1,
           page: 1,
           where: where,
           where: where,
-          categoryLevelId: this.currentId
+          categoryLevelId:  this.currentId
         });
         });
       },
       },
 
 

+ 15 - 5
src/views/material/product/components/index-search.vue

@@ -9,8 +9,13 @@
   >
   >
     <el-row :gutter="10">
     <el-row :gutter="10">
 
 
-
-      <el-col v-bind="styleResponsive ? { md: 6 } : { span: 6 }">
+      <el-col v-bind="styleResponsive ? { lg: 3, md: 6 } : { span: 3 }">
+        <el-form-item label=""  label-width="20px">
+          <el-checkbox v-model="where.allSearch">全局</el-checkbox>
+        </el-form-item>
+      
+        </el-col>
+      <el-col v-bind="styleResponsive ? { lg: 5, md: 10 } : { span: 5 }">
         <el-form-item label="关键词">
         <el-form-item label="关键词">
           <el-input
           <el-input
             clearable
             clearable
@@ -23,7 +28,7 @@
 
 
 
 
 
 
-      <el-col v-bind="styleResponsive ? { md: 6 } : { span: 6 }">
+      <el-col v-bind="styleResponsive ? { lg: 5, md: 10 } : { span: 5 }">
         <el-form-item label="编码">
         <el-form-item label="编码">
           <el-input
           <el-input
             clearable
             clearable
@@ -33,7 +38,7 @@
           />
           />
         </el-form-item>
         </el-form-item>
       </el-col>
       </el-col>
-      <el-col v-bind="styleResponsive ? { md: 6 } : { span: 6 }">
+      <el-col v-bind="styleResponsive ? { lg: 5, md: 10 } : { span: 5 }">
         <el-form-item label="名称">
         <el-form-item label="名称">
           <el-input
           <el-input
             clearable
             clearable
@@ -44,7 +49,7 @@
         </el-form-item>
         </el-form-item>
       </el-col>
       </el-col>
 
 
-      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
+      <el-col v-bind="styleResponsive ? { lg: 5, md: 10 } : { span: 5 }">
         <el-form-item label="组织机构:">
         <el-form-item label="组织机构:">
           <auth-selection v-model.trim="where.deptIds" style="width: 100%"></auth-selection>
           <auth-selection v-model.trim="where.deptIds" style="width: 100%"></auth-selection>
         </el-form-item>
         </el-form-item>
@@ -121,6 +126,11 @@
         this.where = { ...this.defaultWhere };
         this.where = { ...this.defaultWhere };
         this.search();
         this.search();
       },
       },
+
+      resetAllSearch() {
+        this.$set(this.where,'allSearch',false)
+      },
+      
       // 刷新数据
       // 刷新数据
       refreshData(){
       refreshData(){
           this.loading = true;
           this.loading = true;

+ 10 - 3
src/views/material/product/index.vue

@@ -74,8 +74,8 @@
               </el-form>
               </el-form>
             </div>
             </div>
 
 
-            <IndexSearch @search="reload" />
-
+            <IndexSearch ref="searchRef" @search="reload" />
+          
             <IndexData
             <IndexData
               ref="listData"
               ref="listData"
               v-if="current"
               v-if="current"
@@ -102,7 +102,7 @@
 
 
   import { getInfoById } from '@/api/classifyManage';
   import { getInfoById } from '@/api/classifyManage';
 
 
-  import { reloadPageTab } from '@/utils/page-tab-util';
+
 
 
   export default {
   export default {
     components: {
     components: {
@@ -225,12 +225,18 @@
       },
       },
 
 
       async handleNodeClick(data, node) {
       async handleNodeClick(data, node) {
+
         this.$route.query.categoryLevelId = '';
         this.$route.query.categoryLevelId = '';
+        if(this.$refs.searchRef) {
+          this.$refs.searchRef.resetAllSearch();
+        }
 
 
         this.curNode = node;
         this.curNode = node;
         await this.publicfun(data);
         await this.publicfun(data);
         console.log(data, '点击物品分类');
         console.log(data, '点击物品分类');
         await this.getDetail(data.id);
         await this.getDetail(data.id);
+
+    
       },
       },
       publicfun(data) {
       publicfun(data) {
         this.pathList = this.findParent([], data, this.treeList);
         this.pathList = this.findParent([], data, this.treeList);
@@ -278,6 +284,7 @@
       },
       },
       /* 刷新表格 */
       /* 刷新表格 */
       reload(where) {
       reload(where) {
+        console.log(where, '刷新表格');
         this.$refs.listData.reload(where);
         this.$refs.listData.reload(where);
       },
       },
 
 

+ 6 - 1
src/views/material/product/oneProduct.vue

@@ -74,7 +74,7 @@
               </el-form>
               </el-form>
             </div>
             </div>
 
 
-            <IndexSearch @search="reload" />
+            <IndexSearch  ref="searchRef"  @search="reload" />
 
 
             <IndexData
             <IndexData
               ref="listData"
               ref="listData"
@@ -224,6 +224,11 @@
       },
       },
       handleNodeClick(data, node) {
       handleNodeClick(data, node) {
         this.$route.query.categoryLevelId = '';
         this.$route.query.categoryLevelId = '';
+
+        if(this.$refs.searchRef) {
+          this.$refs.searchRef.resetAllSearch();
+        }
+        
         this.curNode = node;
         this.curNode = node;
         this.publicfun(data);
         this.publicfun(data);
 
 

+ 2 - 2
vue.config.js

@@ -31,8 +31,8 @@ module.exports = {
     proxy: {
     proxy: {
       // 当我们的本地的请求 有/api的时候,就会代理我们的请求地址向另外一个服务器发出请求
       // 当我们的本地的请求 有/api的时候,就会代理我们的请求地址向另外一个服务器发出请求
       '/api': {
       '/api': {
-        // target: 'http://192.168.1.125:18086',
-        target: 'http://192.168.1.251:18086',
+        target: 'http://192.168.1.125:18086',
+        // target: 'http://192.168.1.251:18086',
         // target: 'http://192.168.1.176:18086',
         // target: 'http://192.168.1.176:18086',
 
 
         changeOrigin: true, // 只有这个值为true的情况下 才表示开启跨域
         changeOrigin: true, // 只有这个值为true的情况下 才表示开启跨域