瀏覽代碼

机构设备编辑修改页面调整

喻文俊 3 年之前
父節點
當前提交
bbeb4685ee
共有 2 個文件被更改,包括 6 次插入9 次删除
  1. 3 0
      src/views/normal/club/device/edit.vue
  2. 3 9
      src/views/normal/club/device/index.vue

+ 3 - 0
src/views/normal/club/device/edit.vue

@@ -75,6 +75,7 @@ import { fetchBrandList } from '@/api/brand'
 import { mapGetters } from 'vuex'
 import { isSnCode } from '@/utils/validate'
 import AuthCardTemplate from '@/views/components/authCardTemplate.vue'
+import { getStorage } from '@/utils/storage'
 export default {
   components: { UploadImage, AuthCardTemplate },
   data() {
@@ -147,6 +148,8 @@ export default {
     this.editType = this.$route.query.type || 'add'
     this.formData.productId = this.$route.query.id
     this.formData.authUserId = this.proxyInfo?.authUserId || this.authUserId
+    // 获取当前设备所属机构的id
+    this.formData.authId = getStorage('device-setting-authId')
     this.initFormData()
     // 如果供应商类型为代理商  则需要获取它代理的品牌列表
     if (this.shopType === 2) {

+ 3 - 9
src/views/normal/club/device/index.vue

@@ -136,6 +136,7 @@ import Pagination from '@/components/Pagination' // secondary package based on e
 import Qrcode from '@/components/qrcode'
 import { formatDate } from '@/utils'
 import { mapGetters } from 'vuex'
+import { setStorage } from '@/utils/storage'
 export default {
   name: 'ComplexTable',
   components: { Pagination, Qrcode },
@@ -180,19 +181,12 @@ export default {
   created() {
     this.listQuery.authId = this.$route.query.id
     this.authParty = this.$route.query.authParty
+    // 保存机构id,用于设备管理
+    setStorage('device-setting-authId', this.listQuery.authId)
     this.getList()
   },
 
   methods: {
-
-    // 添加
-    handleAddPro() {
-      this.$router.push('add')
-    },
-    // 修改
-    handleEditPro() {
-      this.$router.push('edit')
-    },
     // 获取列表信息
     getList() {
       getProdList(this.listQuery).then(res => {