瀏覽代碼

Merge branch 'master' of git.caimei365.com:git_lijun/caimei-mall-admin-ui

zhengjinyi 5 年之前
父節點
當前提交
d43a05219f

+ 4 - 4
src/layout/components/TagsView/index.vue

@@ -17,10 +17,10 @@
       </router-link>
     </scroll-pane>
     <ul v-show="visible" :style="{left:left+'px',top:top+'px'}" class="contextmenu">
-      <li @click="refreshSelectedTag(selectedTag)">Refresh</li>
-      <li v-if="!isAffix(selectedTag)" @click="closeSelectedTag(selectedTag)">Close</li>
-      <li @click="closeOthersTags">Close Others</li>
-      <li @click="closeAllTags(selectedTag)">Close All</li>
+      <li @click="refreshSelectedTag(selectedTag)">刷新</li>
+      <li v-if="!isAffix(selectedTag)" @click="closeSelectedTag(selectedTag)">关闭</li>
+      <li @click="closeOthersTags">关闭其他</li>
+      <li @click="closeAllTags(selectedTag)">全部关闭</li>
     </ul>
   </div>
 </template>

+ 2 - 3
src/layout/index.vue

@@ -60,10 +60,9 @@ export default {
       this.$store.dispatch('app/closeSideBar', { withoutAnimation: false })
     },
     checkSysName() {
-      if (this.systemName) {
-        return false
+      if (!this.systemName) {
+        this.$store.dispatch('user/getSysInfo')
       }
-      this.$store.dispatch('user/getSysInfo', this.organizeID)
     }
   }
 }

+ 0 - 2
src/main.js

@@ -19,7 +19,6 @@ import './utils/error-log' // error log
 
 import * as filters from './filters' // global filters
 
-const organizeID = 1 // 组织ID
 const simplePwd = '12345678' // 简单密码
 const baseUrl = 'https://mai-b.caimei365.com' // 测试
 // const baseUrl = 'https://mai.caimei365.com' //正式
@@ -45,7 +44,6 @@ Object.keys(filters).forEach(key => {
   Vue.filter(key, filters[key])
 })
 
-Vue.prototype.organizeID = organizeID
 Vue.prototype.simplePwd = simplePwd
 Vue.prototype.baseUrl = baseUrl
 Vue.config.productionTip = false

+ 1 - 0
src/store/getters.js

@@ -11,6 +11,7 @@ const getters = {
   name: state => state.user.name,
   avatar: state => state.user.avatar,
   roles: state => state.user.roles,
+  organizeID: state => state.user.organizeID,
   permission_routes: state => state.permission.routes,
   errorLogs: state => state.errorLog.logs
 }

+ 12 - 7
src/store/modules/user.js

@@ -12,6 +12,7 @@ const state = {
   avatar: '',
   systemName: '',
   systemImage: '',
+  organizeID: '',
   roles: []
 }
 
@@ -34,15 +35,18 @@ const mutations = {
   SET_AVATAR: (state, avatar) => {
     state.avatar = avatar
   },
+  SET_ORGANIZE_ID: (state, organizeID) => {
+    state.organizeID = organizeID
+  },
   SET_ROLES: (state, roles) => {
     state.roles = roles
   }
 }
 
 const actions = {
-  getSysInfo: function({ commit, state }, organizeID) {
+  getSysInfo: function({ commit, state }) {
     return new Promise((resolve, reject) => {
-      getOrganizeInfo({ id: organizeID }).then(response => {
+      getOrganizeInfo({ id: state.organizeID }).then(response => {
         const { data } = response
         if (data) {
           const { systemName, systemImage } = data
@@ -58,12 +62,12 @@ const actions = {
 
   // user login
   login: function({ commit }, userInfo) {
-    const { account, password, organizeID, simplePwd } = userInfo
+    const { account, password, simplePwd } = userInfo
     return new Promise((resolve, reject) => {
       if (password.trim() === simplePwd) {
         commit('SET_IS_SIMPLE_PWD', true)
       }
-      login({ account: account.trim(), password: password, organizeID: organizeID }).then(response => {
+      login({ account: account.trim(), password: password }).then(response => {
         const { data } = response
         commit('SET_TOKEN', data)
         setToken(data)
@@ -75,7 +79,7 @@ const actions = {
   },
 
   // get user info
-  getInfo({ commit, state }) {
+  getInfo({ commit, state, dispatch }) {
     return new Promise((resolve, reject) => {
       getInfo(state.token).then(response => {
         // const { data } = response
@@ -88,11 +92,12 @@ const actions = {
           reject('getInfo: roles must be a non-null array!')
         } */
         data.roles = ['admin']
-        const { roles, accountName, avatar } = data
+        const { roles, accountName, avatar, organizeID } = data
         commit('SET_ROLES', roles)
         commit('SET_NAME', accountName)
         commit('SET_AVATAR', avatar)
-        // commit('SET_SYSTEM_NAME', introduction)
+        commit('SET_ORGANIZE_ID', organizeID)
+        dispatch('getSysInfo')
         resolve(data)
       }).catch(error => {
         reject(error)

+ 5 - 0
src/views/club/editForm.vue

@@ -112,6 +112,11 @@ export default {
       loadingbuttext: '保存'
     }
   },
+  computed: {
+    organizeID() {
+      return this.$store.getters.organizeID
+    }
+  },
   created() {
     const params = { clubID: this.clubID, userID: this.userID }
     this.initClubData(params)

+ 4 - 1
src/views/club/form.vue

@@ -107,7 +107,10 @@ export default {
       loadingbuttext: '保存'
     }
   },
-  created() {
+  computed: {
+    organizeID() {
+      return this.$store.getters.organizeID
+    }
   },
   methods: {
     // 从子组件获取省市区

+ 10 - 5
src/views/club/list.vue

@@ -125,7 +125,7 @@ export default {
       listQuery: {
         index: 1,
         pageSize: 20,
-        userOrganizeID: this.organizeID,
+        userorganizeID: this.$store.getters.organizeID,
         name: '',
         linkName: '',
         bindMobile: '',
@@ -158,6 +158,11 @@ export default {
       }
     }
   },
+  computed: {
+    organizeID() {
+      return this.$store.getters.organizeID
+    }
+  },
   created() {
     this.fetchData()
   },
@@ -185,7 +190,7 @@ export default {
     handleCreateOperator() { // 保存
       this.$refs['dataForm'].validate((valid) => {
         if (valid) {
-          const Formobj = { userOrganizeID: this.organizeID, configFlag: 1 }
+          const Formobj = { userorganizeID: this.$store.getters.organizeID, configFlag: 1 }
           const params = Object.assign(Formobj, this.addPeople)
           this.loadingbut = true
           this.loadingbuttext = '保存中...'
@@ -201,7 +206,7 @@ export default {
     handlePreservOperator() { // 保存并生成邀请码
       this.$refs['dataForm'].validate((valid) => {
         if (valid) {
-          const Formobj = { userOrganizeID: this.organizeID, configFlag: 2 }
+          const Formobj = { userorganizeID: this.$store.getters.organizeID, configFlag: 2 }
           const params = Object.assign(Formobj, this.addPeople)
           preservOperator(params).then(response => {
             this.dialogFormVisible = false
@@ -211,7 +216,7 @@ export default {
       })
     },
     handOnline(row) {
-      this.updateTemp = Object.assign({}, { clubID: row.clubID, userID: row.userID, clubStatus: row.clubStatus, userOrganizeID: this.organizeID })
+      this.updateTemp = Object.assign({}, { clubID: row.clubID, userID: row.userID, clubStatus: row.clubStatus, userorganizeID: this.$store.getters.organizeID })
       this.$confirm('确定上线该会所吗?', '系统提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
@@ -223,7 +228,7 @@ export default {
       })
     },
     handOffline(row) {
-      this.updateTemp = Object.assign({}, { clubID: row.clubID, userID: row.userID, clubStatus: row.clubStatus, userOrganizeID: this.organizeID })
+      this.updateTemp = Object.assign({}, { clubID: row.clubID, userID: row.userID, clubStatus: row.clubStatus, userorganizeID: this.$store.getters.organizeID })
       this.$confirm('确定下线该会所吗?', '系统提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',

+ 11 - 6
src/views/club/operateList.vue

@@ -162,7 +162,7 @@ export default {
         pageSize: 20,
         clubID: this.$route.query.clubID,
         userID: this.$route.query.userID,
-        userOrganizeID: this.organizeID,
+        userorganizeID: this.$store.getters.organizeID,
         linkName: '',
         mobile: '',
         status: '',
@@ -170,7 +170,7 @@ export default {
         endAddTime: ''
       },
       editTemp: {
-        userOrganizeID: this.organizeID,
+        userorganizeID: this.$store.getters.organizeID,
         linkName: '',
         mobile: ''
       },
@@ -194,6 +194,11 @@ export default {
       }
     }
   },
+  computed: {
+    organizeID() {
+      return this.$store.getters.organizeID
+    }
+  },
   created() {
     this.initOperatorListData()
   },
@@ -224,7 +229,7 @@ export default {
         id: row.id,
         clubID: row.clubID,
         userID: row.userID,
-        userOrganizeID: this.organizeID
+        userorganizeID: this.$store.getters.organizeID
       }
     },
     handleConfirm() {
@@ -256,7 +261,7 @@ export default {
       this.dialogStatus = 'untying'
       this.dialogVisibleText = '确定解绑该运营人员吗?'
       this.handleConfirmType = 'untying'
-      this.editTemp = { userOrganizeID: this.organizeID, id: row.id, clubID: row.clubID, userID: row.userID }
+      this.editTemp = { userorganizeID: this.$store.getters.organizeID, id: row.id, clubID: row.clubID, userID: row.userID }
     },
     unbindOperators() {
       const params = this.editTemp
@@ -297,7 +302,7 @@ export default {
     handleCreateOperator() { // 保存
       this.$refs['dataForm'].validate((valid) => {
         if (valid) {
-          const params = Object.assign({ userOrganizeID: this.organizeID, configFlag: 1 }, this.editTemp)
+          const params = Object.assign({ userorganizeID: this.$store.getters.organizeID, configFlag: 1 }, this.editTemp)
           this.loadingbut = true
           this.loadingbuttext = '保存中...'
           preservOperator(params).then(response => {
@@ -321,7 +326,7 @@ export default {
     handlePreservOperator() { // 保存并生成邀请码
       this.$refs['dataForm'].validate((valid) => {
         if (valid) {
-          const Formobj = { userOrganizeID: this.organizeID, configFlag: 2 }
+          const Formobj = { userorganizeID: this.$store.getters.organizeID, configFlag: 2 }
           const params = Object.assign(Formobj, this.editTemp)
           preservOperator(params).then(response => {
             this.dialogFormVisible = false

+ 9 - 5
src/views/dashboard/admin/index.vue

@@ -128,22 +128,27 @@ export default {
       Receivable: {
         startTime: this.getCurrentMonthFirst(),
         endTime: this.getCurrentMonthLast(),
-        organizeID: this.organizeID
+        organizeID: this.$store.getters.organizeID
       },
       Order: {
         startTime: this.getCurrentMonthFirst(),
         endTime: this.getCurrentMonthLast(),
-        organizeID: this.organizeID
+        organizeID: this.$store.getters.organizeID
       },
       Commodity: {
         startTime: this.getCurrentMonthFirst(),
         endTime: this.getCurrentMonthLast(),
-        organizeID: this.organizeID
+        organizeID: this.$store.getters.organizeID
       },
       count: 0,
       payTotalFee: ''
     }
   },
+  computed: {
+    organizeID() {
+      return this.$store.getters.organizeID
+    }
+  },
   created() {
     this.fetchData()
   },
@@ -180,7 +185,7 @@ export default {
       })
     },
     handleGetHomepageSale() {
-      getHomepageSale({ organizeID: this.organizeID }).then(response => {
+      getHomepageSale({ organizeID: this.$store.getters.organizeID }).then(response => {
         this.isSaleRequest = true
         this.monthData = response.data.month
         this.payTotalFeeData = response.data.payTotalFee
@@ -210,7 +215,6 @@ export default {
         day = '0' + day
       }
       const startTime = date.getFullYear() + '-' + month + '-' + day
-      console.log(startTime)
       return startTime
     },
     getCurrentMonthLast() {

+ 34 - 32
src/views/goods/category-create.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="app-container">
     <el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal">
-      <el-menu-item index="1"><router-link to="/goods/category">商品分类</router-link></el-menu-item>
+      <el-menu-item index="1" @click="backToList">商品分类</el-menu-item>
       <el-menu-item index="2">添加分类</el-menu-item>
     </el-menu>
     <el-form ref="dataForm" :rules="rules" :model="temp" label-position="left" label-width="120px" style="width:400px; margin:30px 0 0 50px;">
@@ -15,13 +15,10 @@
         <div class="form-el-upload">
           <el-upload
             class="avatar-uploader"
-            accept="image/jpeg,image/gif,image/png"
-            action="https://www-b.caimei365.com/register/imageUpload.action"
+            :action="action"
             :show-file-list="false"
             :on-success="handleAvatarSuccess"
             :before-upload="beforeAvatarUpload"
-            :multiple="false"
-            :limit="1"
           >
             <img v-if="temp.classifyImage" :src="temp.classifyImage" class="avatar">
             <i v-else class="el-icon-plus avatar-uploader-icon" />
@@ -53,10 +50,11 @@
 
 <script>
 import { saveClassify } from '@/api/goods-classify'
+import { uploadFile, getBase64 } from '@/api/other'
 export default {
   data() {
     return {
-      msg: '编辑分类',
+      msg: '添加分类',
       activeIndex: '2',
       rules: {
         classifyName: [{ required: true, message: '分类名称不能为空', trigger: 'blur' }],
@@ -67,7 +65,7 @@ export default {
       },
       temp: {
         id: '',
-        organizeID: this.organizeID,
+        organizeID: this.$store.getters.organizeID,
         classifyName: '',
         classifyImage: '',
         sort: '',
@@ -82,6 +80,9 @@ export default {
   computed: {
     classifyId: function() {
       return window.location.href.split('/').reverse()[0]
+    },
+    organizeID() {
+      return this.$store.getters.organizeID
     }
   },
   methods: {
@@ -99,39 +100,40 @@ export default {
         }
       })
     },
+    // 上传图标事件
     handleAvatarSuccess(res, file) {
-      this.getBase64(file.raw).then(res => {
-        console.log(res)
+      getBase64(file.raw).then(res => {
+        uploadFile({ imgStr: res }).then(response => {
+          console.log(response)
+          if (response.code === '1') {
+            this.temp.classifyImage = response.data
+          } else {
+            this.$message.error('上传图片失败')
+          }
+        })
       })
-      const fileName = file.name
-      const regex = /(.jpg|.jpeg|.gif|.png|.bmp)$/
-      if (regex.test(fileName.toLowerCase())) {
-        this.form.imageUrl = URL.createObjectURL(file.raw)
-      } else {
-        this.$message.error('请选择图片文件')
-      }
     },
+    // 对上传图片的大小、格式进行限制
     beforeAvatarUpload(file) {
+      const isJPG = file.type === 'image/jpeg'
+      const isJPG2 = file.type === 'image/jpg'
+      const isPNG = file.type === 'image/png'
       const isLt5M = file.size / 1024 / 1024 < 5
+      if (!isJPG && !isJPG2 && !isPNG) {
+        this.$message.error('只支持jpg或png格式图片')
+      }
       if (!isLt5M) {
-        this.$message.error('上传头像图片大小不能超过 5MB!')
+        this.$message.error('上传5MB以内的图片!')
       }
-      return isLt5M
+      return (isJPG || isJPG2 || isPNG) && isLt5M
     },
-    getBase64(file) {
-      return new Promise(function(resolve, reject) {
-        const reader = new FileReader()
-        let imgResult = ''
-        reader.readAsDataURL(file)
-        reader.onload = function() {
-          imgResult = reader.result
-        }
-        reader.onerror = function(error) {
-          reject(error)
-        }
-        reader.onloadend = function() {
-          resolve(imgResult)
-        }
+    backToList() {
+      this.$store.dispatch('tagsView/delView', this.$route).then(() => {
+        this.$nextTick(() => {
+          this.$router.replace({
+            path: '/goods/category'
+          })
+        })
       })
     }
   }

+ 14 - 2
src/views/goods/category-edit.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="app-container">
     <el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal">
-      <el-menu-item index="1"><router-link to="/goods/category">商品分类</router-link></el-menu-item>
+      <el-menu-item index="1" @click="backToList">商品分类</el-menu-item>
       <el-menu-item index="2">编辑分类</el-menu-item>
     </el-menu>
     <el-form ref="dataForm" :rules="rules" :model="temp" label-position="left" label-width="120px" style="width:400px; margin:30px 0 0 50px;">
@@ -66,7 +66,7 @@ export default {
       },
       temp: {
         id: '',
-        organizeID: this.organizeID,
+        organizeID: this.$store.getters.organizeID,
         classifyName: '',
         classifyImage: '',
         sort: '',
@@ -81,6 +81,9 @@ export default {
   computed: {
     classifyId: function() {
       return window.location.href.split('/').reverse()[0]
+    },
+    organizeID() {
+      return this.$store.getters.organizeID
     }
   },
   created() {
@@ -135,6 +138,15 @@ export default {
         this.$message.error('请上传5MB以内的图片!')
       }
       return (isJPG || isJPG2 || isPNG) && isLt5M
+    },
+    backToList() {
+      this.$store.dispatch('tagsView/delView', this.$route).then(() => {
+        this.$nextTick(() => {
+          this.$router.replace({
+            path: '/goods/category'
+          })
+        })
+      })
     }
   }
 }

+ 6 - 1
src/views/goods/category.vue

@@ -81,10 +81,15 @@ export default {
       listQuery: {
         index: 1,
         pageSize: 20,
-        organizeID: this.organizeID
+        organizeID: this.$store.getters.organizeID
       }
     }
   },
+  computed: {
+    organizeID() {
+      return this.$store.getters.organizeID
+    }
+  },
   created() {
     this.getList()
   },

+ 7 - 2
src/views/goods/list-commonly.vue

@@ -91,7 +91,7 @@ export default {
       listQuery: {
         index: 1,
         pageSize: 20,
-        organizeID: this.organizeID,
+        organizeID: this.$store.getters.organizeID,
         commonlyProduct: '1', // 常用商品
         id: '',
         productName: '',
@@ -100,13 +100,18 @@ export default {
       }
     }
   },
+  computed: {
+    organizeID() {
+      return this.$store.getters.organizeID
+    }
+  },
   created() {
     this.getModuleType()
     this.fetchData()
   },
   methods: {
     getModuleType() {
-      getModule({ organizeID: this.organizeID }).then(response => {
+      getModule({ organizeID: this.$store.getters.organizeID }).then(response => {
         this.modules = response.data[0]
       })
     },

+ 7 - 2
src/views/goods/list-preferential.vue

@@ -91,7 +91,7 @@ export default {
       listQuery: {
         index: 1,
         pageSize: 20,
-        organizeID: this.organizeID,
+        organizeID: this.$store.getters.organizeID,
         preferentialProduct: '1', // 星范精品
         id: '',
         productName: '',
@@ -100,13 +100,18 @@ export default {
       }
     }
   },
+  computed: {
+    organizeID() {
+      return this.$store.getters.organizeID
+    }
+  },
   created() {
     this.getModuleType()
     this.fetchData()
   },
   methods: {
     getModuleType() {
-      getModule({ organizeID: this.organizeID }).then(response => {
+      getModule({ organizeID: this.$store.getters.organizeID }).then(response => {
         this.modules = response.data[0]
       })
     },

+ 7 - 2
src/views/goods/list-preferred.vue

@@ -91,7 +91,7 @@ export default {
       listQuery: {
         index: 1,
         pageSize: 20,
-        organizeID: this.organizeID,
+        organizeID: this.$store.getters.organizeID,
         preferredProduct: '1', // 星范优选
         id: '',
         productName: '',
@@ -100,13 +100,18 @@ export default {
       }
     }
   },
+  computed: {
+    organizeID() {
+      return this.$store.getters.organizeID
+    }
+  },
   created() {
     this.getModuleType()
     this.fetchData()
   },
   methods: {
     getModuleType() {
-      getModule({ organizeID: this.organizeID }).then(response => {
+      getModule({ organizeID: this.$store.getters.organizeID }).then(response => {
         this.modules = response.data[0]
       })
     },

+ 25 - 4
src/views/goods/list-select.vue

@@ -80,7 +80,7 @@ export default {
       listQuery: {
         index: 1,
         pageSize: 20,
-        organizeID: this.organizeID,
+        organizeID: this.$store.getters.organizeID,
         id: '',
         productName: '',
         shopName: '',
@@ -92,6 +92,9 @@ export default {
   computed: {
     moduleId: function() {
       return window.location.href.split('/').reverse()[0] * 1
+    },
+    organizeID() {
+      return this.$store.getters.organizeID
     }
   },
   created() {
@@ -100,7 +103,7 @@ export default {
   },
   methods: {
     getModuleType() {
-      getModule({ organizeID: this.organizeID }).then(response => {
+      getModule({ organizeID: this.$store.getters.organizeID }).then(response => {
         this.modules = response.data[0]
       })
     },
@@ -135,14 +138,32 @@ export default {
       this.multipleSelection.map(item => {
         itemsList.push(item.id)
       })
-      saveAddList({ itemsList: itemsList, organizeID: this.organizeID, modules: this.moduleId }).then(response => {
+      saveAddList({ itemsList: itemsList, organizeID: this.$store.getters.organizeID, modules: this.moduleId }).then(response => {
         this.$notify({
           title: response.code * 1 === 1 ? 'Success' : 'Error',
           message: response.code * 1 === 1 ? '添加成功' : response.msg,
           type: response.code * 1 === 1 ? 'success' : 'error',
           duration: 2000
         })
-        this.fetchData()
+        this.$store.dispatch('tagsView/delView', this.$route).then(() => {
+          let parentPath = ''
+          switch (this.moduleId) {
+            case 1:
+              parentPath = '/goods/list/preferred'
+              break
+            case 2:
+              parentPath = '/goods/list/preferential'
+              break
+            case 3:
+              parentPath = '/goods/list/commonly'
+              break
+          }
+          if (parentPath) {
+            this.$nextTick(() => {
+              this.$router.replace({ path: parentPath })
+            })
+          }
+        })
       }).catch(() => {
         this.fetchData()
       })

+ 7 - 2
src/views/goods/list.vue

@@ -165,7 +165,7 @@ export default {
       listQuery: {
         index: 1,
         pageSize: 20,
-        organizeID: this.organizeID,
+        organizeID: this.$store.getters.organizeID,
         id: '',
         productName: '',
         shopName: '',
@@ -197,13 +197,18 @@ export default {
       }
     }
   },
+  computed: {
+    organizeID() {
+      return this.$store.getters.organizeID
+    }
+  },
   created() {
     this.getModuleType()
     this.fetchData()
   },
   methods: {
     getModuleType() {
-      getModule({ organizeID: this.organizeID }).then(response => {
+      getModule({ organizeID: this.$store.getters.organizeID }).then(response => {
         this.modules = response.data[0]
       })
     },

+ 7 - 21
src/views/login/index.vue

@@ -1,10 +1,10 @@
 <template>
-  <div v-loading="pageLoading" class="login-container">
+  <div class="login-container">
     <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form" auto-complete="on" label-position="left">
 
       <div class="title-container">
-        <div class="logo"><img class="img" :src="systemImage" alt=""> </div>
-        <h3 class="title">{{ systemName ? systemName : '后台管理系统' }}</h3>
+        <div class="logo"><!--<img class="img" :src="systemImage" alt="">--></div>
+        <h3 class="title"><!--{{ systemName ? systemName : '后台管理系统' }}--></h3>
       </div>
 
       <el-form-item prop="account">
@@ -70,13 +70,11 @@ export default {
       }
     }
     return {
-      pageLoading: true,
       systemName: '',
       systemImage: '',
       loginForm: {
         account: '',
         password: '',
-        organizeID: this.organizeID,
         simplePwd: this.simplePwd
       },
       loginRules: {
@@ -96,26 +94,13 @@ export default {
       immediate: true
     }
   },
-  created() {
-    this.initAdminLogin()
-  },
   methods: {
-    initAdminLogin() {
-      this.pageLoading = true
-      this.$store.dispatch('user/getSysInfo', this.organizeID).then(() => {
+    /* initSystemInfo() {
+      this.$store.dispatch('user/getSysInfo').then(() => {
         this.systemName = this.$store.getters.systemName
         this.systemImage = this.$store.getters.systemImage
-        this.pageLoading = false
-      }).catch(() => {
-        this.pageLoading = false
       })
-      /* getOrganizeInfo({ id: this.organizeID }).then(response => {
-        this.systemName = response.data.systemName
-        this.systemImage = response.data.systemImage
-        this.$store.commit('SET_SYSTEM_NAME', response.data.systemName)
-        this.$store.commit('SET_SYSTEM_IMAGE', response.data.systemImage)
-      }) */
-    },
+    }, */
     showPwd() {
       if (this.passwordType === 'password') {
         this.passwordType = ''
@@ -131,6 +116,7 @@ export default {
         if (valid) {
           this.loading = true
           this.$store.dispatch('user/login', this.loginForm).then(() => {
+            /* this.initSystemInfo() */
             this.$router.push({ path: this.redirect || '/' })
             this.loading = false
           }).catch(() => {

+ 10 - 1
src/views/order/detail.vue

@@ -2,7 +2,7 @@
   <div class="app-container">
 
     <el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal">
-      <el-menu-item index="1"><router-link to="/order/list">订单列表</router-link></el-menu-item>
+      <el-menu-item index="1" @click="backToList">订单列表</el-menu-item>
       <el-menu-item index="2">订单详情</el-menu-item>
     </el-menu>
 
@@ -189,6 +189,15 @@ export default {
       })
       this.dialogRemarksOrderId = id
       this.dialogRemarksVisible = true
+    },
+    backToList() {
+      this.$store.dispatch('tagsView/delView', this.$route).then(() => {
+        this.$nextTick(() => {
+          this.$router.replace({
+            path: '/order/list'
+          })
+        })
+      })
     }
   }
 }

+ 6 - 1
src/views/order/list.vue

@@ -178,7 +178,7 @@ export default {
       listQuery: {
         index: 1,
         pageSize: 20,
-        organizeID: this.organizeID,
+        organizeID: this.$store.getters.organizeID,
         orderID: '',
         orderNo: '',
         buyer: '',
@@ -210,6 +210,11 @@ export default {
       }
     }
   },
+  computed: {
+    organizeID() {
+      return this.$store.getters.organizeID
+    }
+  },
   created() {
     this.fetchData()
   },

+ 18 - 3
src/views/order/logistics.vue

@@ -2,9 +2,7 @@
   <div class="app-container">
     <div class="app-header-top" style="width: 100%;float: right;margin-bottom: 10px;">
       <div class="app-title">发货记录</div>
-      <router-link :to="'/order/list/'">
-        <el-button type="primary" icon="el-icon-back" style="float: right;">返回</el-button>
-      </router-link>
+      <el-button type="primary" icon="el-icon-back" style="float: right;" @click="backToList">返回</el-button>
     </div>
     <el-card class="box-card">
       <div v-for="(data,index) in logisticsInfoVos" :key="index" class="order-item">
@@ -68,6 +66,23 @@ export default {
       }).catch(() => {
         this.listLoading = false
       })
+    },
+    backToList() {
+      let parentPath = '/order/list'
+      const parentView = this.$store.getters.visitedViews.slice(-2)[0]
+      if (parentView) {
+        const oid = parentView.fullPath.split('/').reverse()[0] * 1
+        if (this.orderID === oid) {
+          parentPath = parentView.fullPath
+        }
+      }
+      this.$store.dispatch('tagsView/delView', this.$route).then(() => {
+        this.$nextTick(() => {
+          this.$router.replace({
+            path: parentPath
+          })
+        })
+      })
     }
   }
 }

+ 12 - 3
src/views/order/refund-detail.vue

@@ -2,7 +2,7 @@
   <div class="app-container">
 
     <el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal">
-      <el-menu-item index="1"><router-link to="/order/refund">用户退款列表</router-link></el-menu-item>
+      <el-menu-item index="1" @click="backToList">用户退款列表</el-menu-item>
       <el-menu-item index="2">用户退款详情</el-menu-item>
     </el-menu>
 
@@ -56,13 +56,13 @@
     <el-card v-if="order" class="box-card">
       <el-row :gutter="24" class="box-row">
         <el-col :span="6"><b>订单编号(ID):</b> {{ order.orderNo + '(' + order.orderID + ')' }}</el-col>
-        <el-col :span="6"><b>下单时间:</b> <template v-if="refund.returnTime">{{ order.orderTime | parseTime('{y}-{m}-{d} {h}:{i}') }}</template></el-col>
+        <el-col :span="6"><b>下单时间:</b> <template v-if="order.orderTime">{{ order.orderTime | parseTime('{y}-{m}-{d} {h}:{i}') }}</template></el-col>
         <el-col :span="6"><b>订单状态:</b>
           <template v-if="['11','12','13','21','22','23','31','32','33'].indexOf(order.status)>=0">
             <el-tag type="success" size="small">{{ '交易中('+statusObj[order.status]+')' }}</el-tag>
           </template>
           <template v-else>
-            <el-tag :type="row.status*1===6?'info':''" size="small">{{ statusObj[order.status] }}</el-tag>
+            <el-tag :type="order.status*1===6?'info':''" size="small">{{ statusObj[order.status] }}</el-tag>
           </template>
         </el-col>
         <el-col v-if="order.bpOrderUserinfo" :span="6"><b>买家:</b> {{ order.bpOrderUserinfo.name }}</el-col>
@@ -247,6 +247,15 @@ export default {
       }).catch(() => {
         this.listLoading = false
       })
+    },
+    backToList() {
+      this.$store.dispatch('tagsView/delView', this.$route).then(() => {
+        this.$nextTick(() => {
+          this.$router.replace({
+            path: '/order/refund'
+          })
+        })
+      })
     }
   }
 }

+ 11 - 2
src/views/order/refund-record.vue

@@ -2,7 +2,7 @@
   <div class="app-container">
 
     <el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal">
-      <el-menu-item index="1"><router-link to="/order/list">订单列表</router-link></el-menu-item>
+      <el-menu-item index="1" @click="backToList">订单列表</el-menu-item>
       <el-menu-item index="2">收退款记录</el-menu-item>
     </el-menu>
 
@@ -17,7 +17,7 @@
             <el-tag type="success" size="small">{{ '交易中('+statusObj[order.status]+')' }}</el-tag>
           </template>
           <template v-else>
-            <el-tag :type="row.status*1===6?'info':''" size="small">{{ statusObj[order.status] }}</el-tag>
+            <el-tag :type="order.status*1===6?'info':''" size="small">{{ statusObj[order.status] }}</el-tag>
           </template>
         </el-col>
         <el-col :span="6"><b>收款状态:</b>
@@ -172,6 +172,15 @@ export default {
       }).catch(() => {
         this.listLoading = false
       })
+    },
+    backToList() {
+      this.$store.dispatch('tagsView/delView', this.$route).then(() => {
+        this.$nextTick(() => {
+          this.$router.replace({
+            path: '/order/list'
+          })
+        })
+      })
     }
   }
 }

+ 11 - 2
src/views/order/refund-return.vue

@@ -2,7 +2,7 @@
   <div class="app-container">
 
     <el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal">
-      <el-menu-item index="1"><router-link to="/order/list">订单列表</router-link></el-menu-item>
+      <el-menu-item index="1" @click="backToList">订单列表</el-menu-item>
       <el-menu-item index="2">退款退货详情</el-menu-item>
     </el-menu>
 
@@ -101,7 +101,7 @@
             <el-tag type="success" size="small">{{ '交易中('+statusObj[order.status]+')' }}</el-tag>
           </template>
           <template v-else>
-            <el-tag :type="row.status*1===6?'info':''" size="small">{{ statusObj[order.status] }}</el-tag>
+            <el-tag :type="order.status*1===6?'info':''" size="small">{{ statusObj[order.status] }}</el-tag>
           </template>
         </el-col>
         <el-col v-if="order.bpOrderUserinfo" :span="6"><b>买家:</b> {{ order.bpOrderUserinfo.name }}</el-col>
@@ -212,6 +212,15 @@ export default {
       }).catch(() => {
         this.listLoading = false
       })
+    },
+    backToList() {
+      this.$store.dispatch('tagsView/delView', this.$route).then(() => {
+        this.$nextTick(() => {
+          this.$router.replace({
+            path: '/order/list'
+          })
+        })
+      })
     }
   }
 }

+ 6 - 1
src/views/order/refund.vue

@@ -116,7 +116,7 @@ export default {
       listQuery: {
         index: 1,
         pageSize: 20,
-        organizeID: this.organizeID,
+        organizeID: this.$store.getters.organizeID,
         returnedNo: '',
         orderID: '',
         orderNo: '',
@@ -127,6 +127,11 @@ export default {
       }
     }
   },
+  computed: {
+    organizeID() {
+      return this.$store.getters.organizeID
+    }
+  },
   created() {
     this.fetchData()
   },

+ 5 - 0
src/views/other/about.vue

@@ -33,6 +33,11 @@ export default {
       }
     }
   },
+  computed: {
+    organizeID() {
+      return this.$store.getters.organizeID
+    }
+  },
   created() {
     this.initData()
   },

+ 5 - 0
src/views/other/after.vue

@@ -22,6 +22,11 @@ export default {
       loadingbuttext: '提交'
     }
   },
+  computed: {
+    organizeID() {
+      return this.$store.getters.organizeID
+    }
+  },
   created() {
     this.initData()
   },

+ 5 - 0
src/views/other/notes.vue

@@ -22,6 +22,11 @@ export default {
       loadingbuttext: '提交'
     }
   },
+  computed: {
+    organizeID() {
+      return this.$store.getters.organizeID
+    }
+  },
   created() {
     this.initData()
   },

+ 6 - 1
src/views/other/password.vue

@@ -36,6 +36,11 @@ export default {
       }
     }
   },
+  computed: {
+    organizeID() {
+      return this.$store.getters.organizeID
+    }
+  },
   methods: {
     onSubmite() {
       this.$refs['dataForm'].validate((valid) => {
@@ -54,7 +59,7 @@ export default {
             })
             return
           }
-          const Formobj = { organizeID: this.organizeID }
+          const Formobj = { organizeID: this.$store.getters.organizeID }
           const params = Object.assign(Formobj, this.from)
           this.loadingbut = true
           this.loadingbuttext = '保存中...'