From ffe481d766ba66c4e616d4f91c7b83c42f1007a8 Mon Sep 17 00:00:00 2001
From: zhaoxiaoqiang <l287285524@qq.com>
Date: Wed, 28 Jul 2021 23:21:05 +0800
Subject: [PATCH] 1
---
src/views/mine/stores/stores.vue | 33 +++++++++++++++++----------------
1 files changed, 17 insertions(+), 16 deletions(-)
diff --git a/src/views/mine/stores/stores.vue b/src/views/mine/stores/stores.vue
index 567da8c..06596a7 100644
--- a/src/views/mine/stores/stores.vue
+++ b/src/views/mine/stores/stores.vue
@@ -5,7 +5,6 @@
-->
<template>
<div class="stores-box h-100-g">
-
<v-navbar title="门店管理" fixed></v-navbar>
<van-search class="search" placeholder="请输入门店名称/负责人姓名/负责人手机号" v-model="value" shape='round' @search="onSearch"/>
<div class="item-box">
@@ -32,7 +31,7 @@
</van-list>
</div>
- <van-button class="btn" @click="$router.push('/mine/stores-add')">
+ <van-button class="btn" @click="$router.push(`/mine/stores-add?merId=${merId}`)">
<div class="inner">
<van-icon name="plus"/>
<span class="text">新增</span>
@@ -44,6 +43,7 @@
</template>
<script>
+import { mapState } from 'vuex';
export default {
name: "stores",
data() {
@@ -56,14 +56,15 @@
merId:'',
}
},
-
+ computed:{
+ ...mapState(['userinfo'])
+ },
created(){
- this.merId = this.$route.query.merId;
+ this.merId = this.$route.query.merId?this.$route.query.merId:this.userinfo.orgId;
this.init();
},
methods: {
init(){
- console.log("merId:"+this.merId);
this.loading = true
this.$api.storeStoreList({
searchKey:this.value,
@@ -83,17 +84,14 @@
}
})
},
-
- //跳转到模板详情
- goStoreOprs(merId){
- this.$router.push({
- path:'/mine/storesOprs',
- query:{
- storeId:this.storeId
- }
- })
- },
-
+ goStoreOprs(storeId){
+ this.$router.push({
+ path:'/mine/storesOprs',
+ query:{
+ storeId:storeId
+ }
+ })
+ },
go(id) {
this.$router.push({path:'/mine/stores-detail',query:{storeId:id}});
},
@@ -188,6 +186,9 @@
margin-bottom: 5px;
font-weight: bold;
width:200px;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
}
.opr-btn {
--
Gitblit v1.8.0