Explorar o código

出库移库价格

gjy %!s(int64=2) %!d(string=hai) anos
pai
achega
d2c5043530

+ 58 - 0
src/components/syClick.vue

@@ -0,0 +1,58 @@
+<template>
+    <div class="nav-click" v-if="$route.meta.showClick">
+    	<ul :style="{'left':left + 'px'}">
+    		<li class="nav-click-body" v-for="(item,index) in titles" :key="index" :title="item.title + item.flag"
+            :class="{'nav-click-show':item.curr,'nav-click-default':!item.curr}" >
+    			<div class="nav-click-body-title hidden" @click="changeTag(index)">{{item.title}} {{item.flag}}</div>
+    			<div v-if="index!=0" class="nav-click-body-close" @click="removeTag(index)" :class="{'nav-click-body-show':item.curr,'nav-click-body-default':!item.curr}">×</div>
+    		</li>
+    		<div class="nav-click-right">
+    			<sy-icon type="ellipsis-v" @click="UnNavClick" v-show="downIcon"></sy-icon>
+    			<sy-icon type="remove" @click="CloseNavClick" v-show="!downIcon"></sy-icon>
+    		</div>
+    	</ul>
+    </div>
+</template>
+<script>
+    export default {
+        name:'syClick',
+        props:{
+            // 路由组件页标签列表
+            titles:{
+                type: Array,
+                default: ()=>{
+			        return []
+			    }
+            }
+        },
+        data() {
+            return {
+				left: 0,
+				clickHeight:50,
+				downIcon: true,
+            }
+        },
+        methods: {
+			UnNavClick(){
+				this.downIcon = !this.downIcon;
+				this.clickHeight = 100
+			},
+            // 关闭所有的标签
+			CloseNavClick(){
+				this.downIcon = !this.downIcon;
+				this.clickHeight = 50
+                this.$emit('removeAll')
+			},
+            
+            // 删除标签页
+            removeTag(index) {
+                this.$emit('removeTag', index);
+            },
+ 
+            // 切换标签页
+            changeTag(index) {
+                this.$emit('changeTag', index);
+            }
+        }
+    }
+</script>

+ 45 - 1
src/layout/index/top/index.vue

@@ -120,7 +120,7 @@
         </el-dropdown-menu>
       </el-dropdown>
     </div>
-
+  <div> <sy-Click :titles="history_list" @removeAll="removeAll" @removeTag="removeTab" @changeTag="changeTag"></sy-Click></div>
     <topSetting v-model="settingDrawer" @close="() => (settingDrawer = !settingDrawer)" />
 
     <!--个人信息-->
@@ -185,6 +185,7 @@
   from '@/model/indexRx'
   import Cookies from 'js-cookie'
   import { setToken, getCompanyId, clearStorage } from '@/utils/auth'
+  import syClick from '@/components/syClick'
   import {
     mapActions,
     mapGetters,
@@ -248,6 +249,7 @@
       topSetting,
       breadCrumb,
       smallTips,
+      syClick,
     },
     name: 'top',
     data() {
@@ -266,6 +268,39 @@
         toPageData: {},
         userINfo: {},
         barCode: '',
+        // 标签页
+        history_list: [{
+                    "title": "系统首页",
+                    "path": "/home",
+                    "curr": true,
+                    "name": "home",
+                    "flag": "",
+                    _route: 'home', // 用来存储对应的路由只读实例对象
+                    "route": {
+                        "name": "home",
+                        "meta": {
+                            "title": "系统首页",
+                            "requireAuth": false,
+                            "showHeader": true,
+                            "showNav": true,
+                            "showtag": true,
+                            "showPosition": true,
+                            "showClick": true
+                        },
+                        "path": "/home",
+                        "query": {},
+                        "params": {},
+                        "fullPath": "/home"
+                    }
+                }],
+ 
+                // 标签点击标识,用来控制切换路由时的缓存处理方式,如果是标签点击切换的路由,直接用缓存不需要处理,并且也不需要执行新增标签方法,
+                // 如果不是标签点击的,那么要判断当前缓存中是否已存在将要跳转的路由,如果存在要先清除缓存
+                isTabClick: false,
+                
+                // 键盘control是否被按下,用来控制F5刷新组件
+                isUpKey_Control: false,
+
         compNameoptions:[],
         isOpenCodeGun: false,
         smAlert: false,
@@ -388,6 +423,15 @@
     methods: {
       ...mapActions('common', ['setLocalVessels']),
       ...mapActions('user', ['getUserInfo','toSetShow']),
+      removeAll(){
+
+      },
+      removeTab(){
+
+      },
+      changeTag(){
+
+      },
       payCode() {
 		  console.log('input', this.barCode)
         this.btnStatus = {

+ 5 - 2
src/views/outboundManagement/weighingManagementrecord.vue

@@ -1,7 +1,7 @@
 <!--检斤管理-->
 <template>
   <div>
-    <BaseHeaderLayout :leftSpan="12">
+    <BaseHeaderLayout :leftSpan="8">
       <template slot="left">
          <el-upload style="margin-left: 8px;" class="upload-demo inline-block margin-right-10" action=""
           :on-change="importClick" :show-file-list="false"
@@ -20,7 +20,7 @@
       </template>
       <!-- <template slot="left"> </template> -->
       <template slot="right">
-        <ws-select v-model="warehouseName" placeholder="" @change="warehouseNameChange" :value="searchType">
+        <ws-select class='select' v-model="warehouseName" placeholder="" @change="warehouseNameChange" :value="searchType">
           <ws-option v-for="item in warehouseList" :key="item.value" :label="item.value" :value="item.value"
             style="color: #8890b1" />
         </ws-select>
@@ -760,4 +760,7 @@
    /deep/.title_css .el-dialog__header{
     text-align: center !important;
   }
+  .select{
+    width:400px;
+  }
 </style>