Browse Source

Merge remote-tracking branch 'origin/release-201825-wangcz' into release-201825-wangcz

shenjj 7 years ago
parent
commit
6ccb1dffbc

+ 14 - 16
components/mobile/staffManagement/StaffList.vue

@@ -38,7 +38,7 @@
                 <div class="list-item"><span>角色:</span><span class="role" v-for="role in item.roles" v-text="role.desc ? role.desc.slice(0,2) : ''" v-bind:class="'bg' + role.color">普通</span></div>
                 <div class="list-item"><span>角色:</span><span class="role" v-for="role in item.roles" v-text="role.desc ? role.desc.slice(0,2) : ''" v-bind:class="'bg' + role.color">普通</span></div>
               </div>
               </div>
               <div class="list-footer">
               <div class="list-footer">
-                <div @click="goEdit(item)" class="edit handle"><i class="iconfont icon-edit"></i><span>维护角色</span></div>
+                <div @click="goEdit(item)" class="edit handle"><i class="iconfont icon-edit"></i><span>角色分配</span></div>
                 <div @click="openDelete(item)" class="delete handle"><i class="iconfont icon-lajitong"></i><span>删除</span></div>
                 <div @click="openDelete(item)" class="delete handle"><i class="iconfont icon-lajitong"></i><span>删除</span></div>
               </div>
               </div>
             </div>
             </div>
@@ -204,7 +204,7 @@
       }
       }
     },
     },
     methods: {
     methods: {
-      onRemind: function (str) {
+      setRemindText: function (str) {
         this.remindText = str
         this.remindText = str
         this.timeoutCount++
         this.timeoutCount++
       },
       },
@@ -238,13 +238,13 @@
       openDelete (item) {
       openDelete (item) {
         if (this.isAdmin) {
         if (this.isAdmin) {
           if (item.userUU === this.userInfo.userUU) {
           if (item.userUU === this.userInfo.userUU) {
-            this.onRemind('自己不可修改自己')
+            this.setRemindText('自己不可修改自己')
           } else {
           } else {
             this.currentObject = item
             this.currentObject = item
             this.showDelete = true
             this.showDelete = true
           }
           }
         } else {
         } else {
-          this.onRemind('您不是管理员不可修改')
+          this.setRemindText('您不是管理员不可修改')
         }
         }
       },
       },
       // 员工列表确认删除
       // 员工列表确认删除
@@ -253,13 +253,13 @@
           .then(response => {
           .then(response => {
             // console.log(response)
             // console.log(response)
             this.showDelete = false
             this.showDelete = false
-            this.onRemind('用户' + this.currentObject.userUU + '删除成功')
+            this.setRemindText('用户' + this.currentObject.userUU + '删除成功')
             this.page = 1
             this.page = 1
             this.isChange = true
             this.isChange = true
             this.staffList()
             this.staffList()
           }).catch(data => {
           }).catch(data => {
             this.showDelete = false
             this.showDelete = false
-            this.onRemind(data.response.data)
+            this.setRemindText(data.response.data)
           })
           })
       },
       },
       // 打开选择
       // 打开选择
@@ -306,16 +306,16 @@
       },
       },
       // 员工列表当前选中对象
       // 员工列表当前选中对象
       goEdit (item) {
       goEdit (item) {
-        if (this.isAdmin) {
-          if (item.userUU === this.userInfo.userUU) {
-            this.onRemind('自己不可修改自己')
-          } else {
+        if (item.userUU === this.userInfo.userUU) {
+          this.setRemindText('自己不可修改自己')
+        } else {
+          this.authorityInterceptor('/basic/user/updaterole', () => {
             let currentData = item
             let currentData = item
             this.currentStaff = this.baseUtils.deepCopy(currentData)
             this.currentStaff = this.baseUtils.deepCopy(currentData)
             this.activeTab = 1
             this.activeTab = 1
             for (let j = 0; j < this.rolesList.length; j++) {
             for (let j = 0; j < this.rolesList.length; j++) {
               for (let i = 0; i < this.currentStaff.roles.length; i++) {
               for (let i = 0; i < this.currentStaff.roles.length; i++) {
-                //判断已绑定角色
+                // 判断已绑定角色
                 if (this.currentStaff.roles[i].id === this.rolesList[j].id) {
                 if (this.currentStaff.roles[i].id === this.rolesList[j].id) {
                   this.rolesList[j].checked = true
                   this.rolesList[j].checked = true
                   break
                   break
@@ -324,9 +324,7 @@
                 }
                 }
               }
               }
             }
             }
-          }
-        } else {
-          this.onRemind('您不是管理员不可修改')
+          })
         }
         }
       },
       },
       // 员工列表选择角色
       // 员工列表选择角色
@@ -347,7 +345,7 @@
         }
         }
         this.$http.put(`/basic/user/updaterole`, this.currentStaff)
         this.$http.put(`/basic/user/updaterole`, this.currentStaff)
           .then(() => {
           .then(() => {
-            this.onRemind('角色编辑成功')
+            this.setRemindText('角色编辑成功')
             this.activeTab = 0
             this.activeTab = 0
             this.page = 1
             this.page = 1
             this.isChange = true
             this.isChange = true
@@ -372,7 +370,7 @@
       agreeEvent (type, flag) {
       agreeEvent (type, flag) {
         this.$http.get(`/basic/enterprise/auditApply?id=${type.id}&status=${Number(flag)}&userUU=${type.userUU}`)
         this.$http.get(`/basic/enterprise/auditApply?id=${type.id}&status=${Number(flag)}&userUU=${type.userUU}`)
           .then(() => {
           .then(() => {
-            this.onRemind('操作成功!')
+            this.setRemindText('操作成功!')
             this.auditSearch = ''
             this.auditSearch = ''
             this.page = 1
             this.page = 1
             this.searchAudit()
             this.searchAudit()

+ 1 - 1
components/store/home/StoreBanner.vue

@@ -23,7 +23,7 @@
         <div class="shop-logo">
         <div class="shop-logo">
           <img class="logo-img" :src="storeInfo.logoUrl || '/images/store/common/default.png'" />
           <img class="logo-img" :src="storeInfo.logoUrl || '/images/store/common/default.png'" />
          <!-- <p id="shop-title" v-if="storeInfo.storeShortName" v-text="storeInfo.storeShortName">店铺名称</p>-->
          <!-- <p id="shop-title" v-if="storeInfo.storeShortName" v-text="storeInfo.storeShortName">店铺名称</p>-->
-          <p class="shop-name" v-if="storeInfo.storeName" :title="storeInfo.storeName | nameFilter">{{storeInfo.storeName | nameFilter}}</p>
+          <p class="shop-name" v-if="storeInfo.storeName" :title="storeInfo.storeName">{{storeInfo.storeName | nameFilter}}</p>
           <p class="shop-name" v-else></p>
           <p class="shop-name" v-else></p>
           <div class="enter-store">
           <div class="enter-store">
             <a v-if="isFocus === 'false'" @click="focusStore(storeInfo, $event)">关注店铺</a>
             <a v-if="isFocus === 'false'" @click="focusStore(storeInfo, $event)">关注店铺</a>