Prechádzať zdrojové kódy

设备详情,机构详情抽离组件

yuwenjun1997 2 rokov pred
rodič
commit
1d0f8f0b63

+ 1 - 1
src/router/module/admin/logistics.js

@@ -6,7 +6,7 @@ const logisticsRoutes = [
     path: '/logistics',
     component: Layout,
     alwaysShow: true,
-    redirect: '/logistics/licensed',
+    redirect: '/logistics/supplier-list',
     name: 'Logistics',
     meta: { title: '授权牌物流', noCache: true },
     children: [

+ 4 - 0
src/styles/index.scss

@@ -406,3 +406,7 @@ aside {
     height: auto;
   }
 }
+
+.preview-image {
+  display: inline-block;
+}

+ 2 - 2
src/views/admin/audit/club/device/index.vue

@@ -110,7 +110,7 @@ export default {
     // 预览
     onReview(row) {
       console.log('预览')
-      this.$router.push(`/audit/club/device-detail?id=${row.productId}&authId=${this.listQuery.authId}&type=review`)
+      this.$router.push(`/audit/club/device-detail?productId=${row.productId}&authId=${this.listQuery.authId}&type=review`)
     },
     // 驳回
     onResult(row) {
@@ -118,7 +118,7 @@ export default {
     },
     // 审核
     onAudit(row) {
-      this.$router.push(`/audit/club/device-detail?id=${row.productId}&authId=${this.listQuery.authId}&type=audit`)
+      this.$router.push(`/audit/club/device-detail?productId=${row.productId}&authId=${this.listQuery.authId}&type=audit`)
     },
     // 过滤列表
     handleFilter() {},

+ 24 - 99
src/views/admin/audit/club/device/review.vue

@@ -1,74 +1,38 @@
 <template>
   <div class="page-form-container">
-    <div class="row">
-      <div class="col">设备名称:</div>
-      <div class="col">{{ productInfo.productName }}</div>
-    </div>
-    <div class="row">
-      <div class="col">设备SN码:</div>
-      <div class="col">{{ productInfo.snCode }}</div>
-    </div>
-    <div class="row">
-      <div class="col">设备图片:</div>
-      <div class="col">
-        <preview-image v-if="productInfo.productImage" class="preview-image" :src="productInfo.productImage" />
-      </div>
-    </div>
-    <div class="row">
-      <div class="col">授权牌:</div>
-      <div class="col">
-        <preview-image v-if="productInfo.certificateImage" class="preview-image" :src="productInfo.certificateImage" />
-      </div>
-    </div>
-
-    <div class="row">
-      <div class="col">购买渠道:</div>
-      <div class="col">{{ productInfo.purchaseWay }}</div>
-    </div>
-
-    <div class="row">
-      <div class="col">发票:</div>
-      <div class="col">
-        <preview-image v-if="productInfo.invoiceImage" class="preview-image" :src="productInfo.invoiceImage" />
-      </div>
-    </div>
-
-    <el-form v-if="type === 'audit'" ref="auditForm" label-width="112px" :model="auditForm" :rules="rules">
-      <el-form-item label="审核:">
-        <el-radio-group v-model="auditForm.auditStatus">
-          <el-radio :label="1">通过</el-radio>
-          <el-radio :label="0">不通过</el-radio>
-        </el-radio-group>
-      </el-form-item>
-      <el-form-item v-if="auditForm.auditStatus === 0" label="原因:" prop="invalidReason">
-        <el-input v-model="auditForm.invalidReason" type="textarea" :rows="3" />
-      </el-form-item>
-      <el-form-item>
+    <device-detail :product-id="productId" />
+    <template v-if="type === 'audit'">
+      <el-form ref="auditForm" label-width="112px" :model="auditForm" :rules="rules">
+        <el-form-item label="审核:">
+          <el-radio-group v-model="auditForm.auditStatus">
+            <el-radio :label="1">通过</el-radio>
+            <el-radio :label="0">不通过</el-radio>
+          </el-radio-group>
+        </el-form-item>
+        <el-form-item v-if="auditForm.auditStatus === 0" label="原因:" prop="invalidReason">
+          <el-input v-model="auditForm.invalidReason" type="textarea" :rows="3" />
+        </el-form-item>
+      </el-form>
+      <div class="control-box">
         <el-button type="info" @click="$_back">返回</el-button>
         <el-button type="primary" @click="submit">提交</el-button>
-      </el-form-item>
-    </el-form>
+      </div>
+    </template>
   </div>
 </template>
 
 <script>
-import { getProductById, auditProduct } from '@/api/product'
+import { auditProduct } from '@/api/product'
 import { mapGetters } from 'vuex'
+import { DeviceDetail } from '@/views/components'
 export default {
+  components: {
+    DeviceDetail
+  },
   data() {
     return {
       type: 'review',
-      productInfo: {
-        productId: '',
-        productName: '',
-        snCode: '',
-        productImage: '',
-        certificateImage: '',
-        paramList: [],
-        invoiceImage: '',
-        brandName: '',
-        purchaseWay: ''
-      },
+      productId: '',
       auditForm: {
         productId: '',
         auditBy: '', // 审核人id
@@ -85,26 +49,14 @@ export default {
     ...mapGetters(['authUserId'])
   },
   created() {
-    this.productInfo.productId = this.$route.query.id
     this.authId = this.$route.query.authId
+    this.productId = this.$route.query.productId
     this.type = this.$route.query.type
-    this.getDetail()
   },
   methods: {
-    // 获取商品详情
-    getDetail() {
-      this.isLoading = true
-      getProductById({ productId: this.productInfo.productId })
-        .then((res) => {
-          this.productInfo = { ...this.productInfo, ...res.data }
-        })
-        .finally(() => {
-          this.isLoading = false
-        })
-    },
     // 提交审核信息
     submit() {
-      this.auditForm.productId = this.productInfo.productId
+      this.auditForm.productId = this.productId
       this.$refs.auditForm.validate((valid) => {
         if (valid) {
           this.isLoading = true
@@ -125,30 +77,3 @@ export default {
   }
 }
 </script>
-
-<style lang="scss" scoped>
-.row {
-  display: flex;
-  justify-content: flex-start;
-  align-items: flex-start;
-  margin-bottom: 25px;
-  .col {
-    font-size: 14px;
-    color: #333;
-    &:first-child {
-      min-width: 100px;
-      text-align: right;
-      margin-right: 8px;
-      font-weight: bold;
-      color: #666;
-    }
-
-    .el-image {
-      margin-left: 12px;
-      &:first-child {
-        margin-left: 0;
-      }
-    }
-  }
-}
-</style>

+ 21 - 241
src/views/admin/audit/club/review.vue

@@ -1,114 +1,8 @@
 <template>
-  <div class="app-container">
-    <div class="audit-content">
-      <div class="grid">
-        <div class="row">
-          <div class="col">机构名称:</div>
-          <div class="col">{{ clubInfo.authParty }}</div>
-        </div>
-        <div class="row">
-          <div class="col">联系电话:</div>
-          <div class="col">{{ clubInfo.mobile }}</div>
-        </div>
-        <div class="row">
-          <div class="col">所在地区:</div>
-          <div class="col">{{ clubInfo.area }}</div>
-        </div>
-        <div class="row">
-          <div class="col">详细地址:</div>
-          <div class="col">{{ clubInfo.address }}</div>
-        </div>
-        <div class="row">
-          <div class="col">所在位置:</div>
-          <div class="col">
-            <div class="map" @click="initMap">
-              <i class="el-icon-map-location" />
-              <span>点击查看</span>
-            </div>
-          </div>
-        </div>
-      </div>
-      <div class="row">
-        <div class="col">logo:</div>
-        <div class="col">
-          <preview-image v-if="clubInfo.logo" class="preview-image" :src="clubInfo.logo" />
-        </div>
-      </div>
-      <div class="row">
-        <div class="col">门头照:</div>
-        <div class="col">
-          <template v-for="(image, index) in clubInfo.bannerList">
-            <preview-image :key="index" class="preview-image" :src="image" :preview-src-list="clubInfo.bannerList" />
-          </template>
-        </div>
-      </div>
-      <div class="row">
-        <div class="col">机构类型:</div>
-        <div class="col">
-          <el-radio-group v-model="clubInfo.firstClubType">
-            <el-radio
-              v-for="item in clubTypeList"
-              :key="item.id"
-              :label="item.id"
-              :disabled="clubInfo.firstClubType !== item.id"
-            >{{ item.name }}</el-radio>
-          </el-radio-group>
-        </div>
-      </div>
-
-      <div v-if="clubInfo.firstClubType === 1" class="row">
-        <div class="col">医美类型:</div>
-        <div class="col">
-          <el-radio-group v-model="clubInfo.secondClubType">
-            <el-radio
-              v-for="item in medicalTypeList1"
-              :key="item.id"
-              :label="item.id"
-              :disabled="clubInfo.secondClubType !== item.id"
-            >{{ item.name }}</el-radio>
-          </el-radio-group>
-        </div>
-      </div>
-
-      <div v-if="clubInfo.firstClubType === 2" class="row">
-        <div class="col">生美类型:</div>
-        <div class="col">
-          <el-radio-group v-model="clubInfo.secondClubType">
-            <el-radio
-              v-for="item in medicalTypeList2"
-              :key="item.id"
-              :label="item.id"
-              :disabled="clubInfo.secondClubType !== item.id"
-            >{{ item.name }}</el-radio>
-          </el-radio-group>
-        </div>
-      </div>
-
-      <div v-if="clubInfo.firstClubType === 1" class="row">
-        <div class="col">医疗许可证:</div>
-        <div class="col">
-          <preview-image v-if="clubInfo.medicalLicenseImage" class="preview-image" :src="clubInfo.medicalLicenseImage" />
-        </div>
-      </div>
-      <div class="row">
-        <div class="col">员工人数:</div>
-        <div class="col">{{ clubInfo.empNum }}人</div>
-      </div>
-
-      <div class="row">
-        <div class="col">自定义属性:</div>
-        <div class="col">
-          <el-radio-group v-model="clubInfo.customFlag">
-            <el-radio :label="1" :disabled="clubInfo.customFlag !== 1">是</el-radio>
-            <el-radio :label="0" :disabled="clubInfo.customFlag !== 0">否</el-radio>
-          </el-radio-group>
-        </div>
-      </div>
-      <div v-if="clubInfo.customFlag > 0" class="row">
-        <div class="col">店铺备注:</div>
-        <div class="col">{{ clubInfo.remarks }}人</div>
-      </div>
-      <el-form v-if="type === 'audit'" ref="auditForm" label-width="112px" :model="auditForm" :rules="rules">
+  <div class="page-form-container">
+    <club-detail :auth-id="authId" />
+    <template v-if="type === 'audit'">
+      <el-form ref="auditForm" label-width="112px" :model="auditForm" :rules="rules">
         <el-form-item label="审核:">
           <el-radio-group v-model="auditForm.auditStatus">
             <el-radio :label="1">通过</el-radio>
@@ -118,71 +12,27 @@
         <el-form-item v-if="auditForm.auditStatus === 0" label="原因:" prop="invalidReason">
           <el-input v-model="auditForm.invalidReason" type="textarea" :rows="3" />
         </el-form-item>
-        <el-form-item>
-          <el-button type="info" @click="$_back">返回</el-button>
-          <el-button type="primary" @click="submit">提交</el-button>
-        </el-form-item>
       </el-form>
-    </div>
-
-    <!-- 地图坐标拾取 -->
-    <el-dialog class="map-dialog" title="地图信息" :visible.sync="dialogMapVisible" width="80%">
-      <a-map ref="aMap" :lnglat="lnglat" />
-    </el-dialog>
+      <div class="control-box">
+        <el-button type="info" @click="$_back">返回</el-button>
+        <el-button type="primary" @click="submit">提交</el-button>
+      </div>
+    </template>
   </div>
 </template>
 
 <script>
-import SimpleAMap from '@/components/SimpleAMap'
-import { getAuthFormData, auditAuth } from '@/api/auth'
+import { auditAuth } from '@/api/auth'
+import { ClubDetail } from '@/views/components'
 import { mapGetters } from 'vuex'
 export default {
   components: {
-    [SimpleAMap.name]: SimpleAMap
+    ClubDetail
   },
   data() {
     return {
       type: 'review',
-      isLoading: false,
-      dialogMapVisible: false,
-      clubTypeList: [
-        { id: 1, name: '医美' },
-        { id: 2, name: '生美' },
-        { id: 3, name: '项目公司' },
-        { id: 4, name: '个人' },
-        { id: 5, name: '其他' }
-      ],
-      medicalTypeList1: [
-        { id: 1, name: '诊所' },
-        { id: 2, name: '门诊' },
-        { id: 3, name: '医院' },
-        { id: 4, name: '其他' }
-      ],
-      medicalTypeList2: [
-        { id: 5, name: '美容院' },
-        { id: 6, name: '养生馆' },
-        { id: 7, name: '其他' }
-      ],
       authId: '',
-      clubInfo: {
-        secondClubType: 1,
-        firstClubType: 1,
-        medicalLicenseImage: '',
-        empNum: '',
-        address: '',
-        area: '',
-        authId: '',
-        authParty: '',
-        bannerList: [],
-        cityId: '',
-        lngAndLat: '',
-        logo: '',
-        mobile: '',
-        provinceId: '',
-        townId: '',
-        customFlag: 0,
-        remarks: ''
-      },
       auditForm: {
         auditBy: '', // 审核人id
         authId: '', // 机构id
@@ -195,16 +45,11 @@ export default {
     }
   },
   computed: {
-    ...mapGetters(['authUserId']),
-    // 位置坐标
-    lnglat() {
-      return this.clubInfo.lngAndLat ? this.clubInfo.lngAndLat.split(',') : null
-    }
+    ...mapGetters(['authUserId'])
   },
   created() {
-    this.auditForm.authId = this.$route.query.authId
+    this.authId = this.$route.query.authId
     this.type = this.$route.query.type
-    this.getDetail()
   },
   methods: {
     // 地图定位
@@ -216,86 +61,21 @@ export default {
         })
       }
     },
-    // 数据回显
-    getDetail() {
-      getAuthFormData({ authId: this.auditForm.authId }).then((res) => {
-        this.clubInfo = { ...this.clubInfo, ...res.data }
-      })
-    },
     // 提交审核信息
     submit() {
+      this.auditForm.authId = this.authId
+      this.auditForm.auditBy = this.authUserId
       this.$refs.auditForm.validate((valid) => {
         if (valid) {
-          this.isLoading = true
-          // 指定审核人
-          this.auditForm.auditBy = this.authUserId
           // 提交审核信息
-          auditAuth(this.auditForm)
-            .then((res) => {
-              this.$message.success(res.data)
-              this.$store.dispatch('tagsView/delView', this.$route)
-              this.$router.back()
-            })
-            .finally(() => {
-              this.isLoading = false
-            })
+          auditAuth(this.auditForm).then((res) => {
+            this.$message.success(res.data)
+            this.$store.dispatch('tagsView/delView', this.$route)
+            this.$router.back()
+          })
         }
       })
     }
   }
 }
 </script>
-
-<style lang="scss" scoped>
-.app-container {
-  .audit-content {
-    max-width: 1000px;
-    margin: 0 auto;
-    margin-top: 25px;
-  }
-
-  .map {
-    cursor: pointer;
-    span {
-      margin-left: 4px;
-      color: #409eff;
-    }
-  }
-
-  .grid {
-    display: grid;
-    grid-template-columns: repeat(2, 1fr);
-    // grid-template-rows: repeat(2, 1fr);
-    grid-column-gap: 0px;
-    grid-row-gap: 0px;
-  }
-  .row {
-    display: flex;
-    justify-content: flex-start;
-    align-items: flex-start;
-    margin-bottom: 25px;
-    .col {
-      font-size: 14px;
-      color: #333;
-      &:first-child {
-        min-width: 100px;
-        text-align: right;
-        margin-right: 8px;
-        font-weight: bold;
-        color: #666;
-      }
-
-      .preview-image {
-        margin-left: 12px;
-        &:first-child {
-          margin-left: 0;
-        }
-      }
-    }
-  }
-
-  .el-button {
-    width: 120px;
-  }
-}
-</style>

+ 6 - 251
src/views/admin/logistics-licensed/club/detail.vue

@@ -1,267 +1,22 @@
 <template>
-  <div class="app-container">
-    <div class="audit-content">
-      <div class="grid">
-        <div class="row">
-          <div class="col">机构名称:</div>
-          <div class="col">{{ clubInfo.authParty }}</div>
-        </div>
-        <div class="row">
-          <div class="col">联系电话:</div>
-          <div class="col">{{ clubInfo.mobile }}</div>
-        </div>
-        <div class="row">
-          <div class="col">所在地区:</div>
-          <div class="col">{{ clubInfo.area }}</div>
-        </div>
-        <div class="row">
-          <div class="col">详细地址:</div>
-          <div class="col">{{ clubInfo.address }}</div>
-        </div>
-        <div class="row">
-          <div class="col">所在位置:</div>
-          <div class="col">
-            <div class="map" @click="initMap">
-              <i class="el-icon-map-location" />
-              <span>点击查看</span>
-            </div>
-          </div>
-        </div>
-      </div>
-      <div class="row">
-        <div class="col">logo:</div>
-        <div class="col">
-          <el-image
-            v-if="clubInfo.logo"
-            style="width: 120px; height: 120px"
-            :src="clubInfo.logo"
-            :preview-src-list="[clubInfo.logo]"
-          />
-        </div>
-      </div>
-      <div class="row">
-        <div class="col">门头照:</div>
-        <div class="col">
-          <template v-if="clubInfo.bannerList.length > 0">
-            <template v-for="(image, index) in clubInfo.bannerList">
-              <el-image
-                :key="index"
-                style="width: 120px; height: 120px"
-                :src="image"
-                :preview-src-list="clubInfo.bannerList"
-              />
-            </template>
-          </template>
-        </div>
-      </div>
-      <div class="row">
-        <div class="col">机构类型:</div>
-        <div class="col">
-          <el-radio-group v-model="clubInfo.firstClubType">
-            <el-radio
-              v-for="item in clubTypeList"
-              :key="item.id"
-              :label="item.id"
-              :disabled="clubInfo.firstClubType !== item.id"
-            >{{ item.name }}</el-radio>
-          </el-radio-group>
-        </div>
-      </div>
-      <div v-if="clubInfo.firstClubType === 1" class="row">
-        <div class="col">医美类型:</div>
-        <div class="col">
-          <el-radio-group v-model="clubInfo.secondClubType">
-            <el-radio
-              v-for="item in medicalTypeList1"
-              :key="item.id"
-              :label="item.id"
-              :disabled="clubInfo.firstClubType !== item.id"
-            >{{ item.name }}</el-radio>
-          </el-radio-group>
-        </div>
-      </div>
-
-      <div v-if="clubInfo.firstClubType === 2" class="row">
-        <div class="col">生美类型:</div>
-        <div class="col">
-          <el-radio-group v-model="clubInfo.secondClubType">
-            <el-radio
-              v-for="item in medicalTypeList2"
-              :key="item.id"
-              :label="item.id"
-              :disabled="clubInfo.firstClubType !== item.id"
-            >{{ item.name }}</el-radio>
-          </el-radio-group>
-        </div>
-      </div>
-
-      <div class="row">
-        <div class="col">医疗许可证:</div>
-        <div class="col">
-          <el-image
-            style="width: 120px; height: 120px"
-            :src="clubInfo.medicalLicenseImage"
-            :preview-src-list="[clubInfo.medicalLicenseImage]"
-          />
-        </div>
-      </div>
-      <div class="row">
-        <div class="col">员工人数:</div>
-        <div class="col">{{ clubInfo.empNum }}人</div>
-      </div>
-
-      <div class="row">
-        <div class="col">自定义属性:</div>
-        <div class="col">
-          <el-radio-group v-model="clubInfo.customFlag">
-            <el-radio :label="1" :disabled="clubInfo.customFlag !== 1">是</el-radio>
-            <el-radio :label="0" :disabled="clubInfo.customFlag !== 0">否</el-radio>
-          </el-radio-group>
-        </div>
-      </div>
-      <div v-if="clubInfo.customFlag > 0" class="row">
-        <div class="col">店铺备注:</div>
-        <div class="col">{{ clubInfo.remarks }}人</div>
-      </div>
-    </div>
-
-    <!-- 地图坐标拾取 -->
-    <el-dialog class="map-dialog" title="地图信息" :visible.sync="dialogMapVisible" width="80%">
-      <a-map ref="aMap" :lnglat="lnglat" />
-    </el-dialog>
+  <div class="page-form-container">
+    <club-detail :auth-id="authId" />
   </div>
 </template>
 
 <script>
-import SimpleAMap from '@/components/SimpleAMap'
-import { getAuthFormData } from '@/api/auth'
+import { ClubDetail } from '@/views/components'
 export default {
   components: {
-    [SimpleAMap.name]: SimpleAMap
+    ClubDetail
   },
   data() {
     return {
-      authId: '',
-      dialogMapVisible: false,
-      clubTypeList: [
-        { id: 1, name: '医美' },
-        { id: 2, name: '生美' },
-        { id: 3, name: '项目公司' },
-        { id: 4, name: '个人' },
-        { id: 5, name: '其他' }
-      ],
-      medicalTypeList1: [
-        { id: 1, name: '诊所' },
-        { id: 2, name: '门诊' },
-        { id: 3, name: '医院' },
-        { id: 4, name: '其他' }
-      ],
-      medicalTypeList2: [
-        { id: 5, name: '美容院' },
-        { id: 6, name: '养生馆' },
-        { id: 7, name: '其他' }
-      ],
-      clubInfo: {
-        secondClubType: 1,
-        firstClubType: 1,
-        medicalLicenseImage: '',
-        empNum: 10,
-        address: '',
-        area: '',
-        authId: '',
-        authParty: '',
-        bannerList: [],
-        cityId: '',
-        lngAndLat: '',
-        logo: '',
-        mobile: '',
-        provinceId: '',
-        townId: '',
-        customFlag: 0,
-        remarks: ''
-      }
-    }
-  },
-  computed: {
-    // 位置坐标
-    lnglat() {
-      return this.clubInfo.lngAndLat ? this.clubInfo.lngAndLat.split(',') : null
+      authId: ''
     }
   },
   created() {
-    this.authId = this.$route.query.id
-    this.getDetail()
-  },
-  methods: {
-    // 地图定位
-    initMap() {
-      this.dialogMapVisible = true
-      if (this.lnglat) {
-        this.$nextTick(() => {
-          this.$refs.aMap.init()
-        })
-      }
-    },
-    // 数据回显
-    getDetail() {
-      getAuthFormData({ authId: this.authId }).then((res) => {
-        this.clubInfo = { ...this.clubInfo, ...res.data }
-      })
-    }
+    this.authId = this.$route.query.authId
   }
 }
 </script>
-
-<style lang="scss" scoped>
-.app-container {
-  .audit-content {
-    max-width: 1000px;
-    margin: 0 auto;
-    margin-top: 25px;
-  }
-
-  .map {
-    cursor: pointer;
-    span {
-      margin-left: 4px;
-      color: #409eff;
-    }
-  }
-
-  .grid {
-    display: grid;
-    grid-template-columns: repeat(2, 1fr);
-    // grid-template-rows: repeat(2, 1fr);
-    grid-column-gap: 0px;
-    grid-row-gap: 0px;
-  }
-  .row {
-    display: flex;
-    justify-content: flex-start;
-    align-items: flex-start;
-    margin-bottom: 25px;
-    .col {
-      font-size: 14px;
-      color: #333;
-      &:first-child {
-        min-width: 100px;
-        text-align: right;
-        margin-right: 8px;
-        font-weight: bold;
-        color: #666;
-      }
-
-      .el-image {
-        margin-left: 12px;
-        &:first-child {
-          margin-left: 0;
-        }
-      }
-    }
-  }
-
-  .el-button {
-    width: 120px;
-  }
-}
-</style>

+ 8 - 151
src/views/admin/logistics-licensed/club/device/detail.vue

@@ -1,165 +1,22 @@
 <template>
-  <div class="app-container">
-    <div class="audit-content">
-      <div class="grid">
-        <div class="row">
-          <div class="col">设备名称:</div>
-          <div class="col">{{ productInfo.productName }}</div>
-        </div>
-        <div class="row">
-          <div class="col">设备SN码:</div>
-          <div class="col">{{ productInfo.snCode }}</div>
-        </div>
-      </div>
-      <div class="row">
-        <div class="col">设备图片:</div>
-        <div class="col">
-          <el-image
-            style="width: 120px; height: 120px"
-            :src="productInfo.productImage"
-            :preview-src-list="[productInfo.productImage]"
-          />
-        </div>
-      </div>
-
-      <div class="row">
-        <div class="col">所属品牌:</div>
-        <div class="col">{{ productInfo.brandName }}</div>
-      </div>
-
-      <div class="row">
-        <div class="col">购买渠道:</div>
-        <div class="col">{{ productInfo.purchaseWay }}</div>
-      </div>
-
-      <div class="row">
-        <div class="col">发票:</div>
-        <div class="col">
-          <el-image
-            style="width: 120px; height: 120px"
-            :src="productInfo.invoiceImage"
-            :preview-src-list="[productInfo.invoiceImage]"
-          />
-        </div>
-      </div>
-
-      <div class="row">
-        <div class="col">设备参数:</div>
-        <div class="col">
-          <template v-for="(param, index) in productInfo.paramList">
-            <div :key="index" class="param">
-              <div class="label">{{ param.paramName }}:</div>
-              <div class="content">{{ param.paramContent }}</div>
-            </div>
-          </template>
-        </div>
-      </div>
-
-      <!-- <div class="row">
-        <div class="col">审核状态:</div>
-        <div class="col">
-          <span v-if="productInfo.auditStatus === 2" class="status warning">待审核</span>
-          <span v-else-if="productInfo.auditStatus === 1" class="status success">审核通过</span>
-          <span v-else class="status danger">审核未通过</span>
-        </div>
-      </div> -->
-    </div>
+  <div class="page-form-container">
+    <device-detail :product-id="productId" />
   </div>
 </template>
 
 <script>
-import { getProductById } from '@/api/product'
+import { DeviceDetail } from '@/views/components'
 export default {
+  components: {
+    DeviceDetail
+  },
   data() {
     return {
-      isLoading: true,
-      productId: '',
-      productInfo: {
-        productName: '',
-        snCode: '',
-        productImage: '',
-        certificateImage: '',
-        paramList: [],
-        invoiceImage: '',
-        brandName: '',
-        purchaseWay: ''
-      }
+      productId: ''
     }
   },
   created() {
-    this.productId = this.$route.query.id
-    this.getDetail()
-  },
-  methods: {
-    // 获取商品详情
-    getDetail() {
-      this.isLoading = true
-      getProductById({ productId: this.productId })
-        .then((res) => {
-          this.productInfo = { ...this.productInfo, ...res.data }
-        })
-        .finally(() => {
-          this.isLoading = false
-        })
-    }
+    this.productId = this.$route.query.productId
   }
 }
 </script>
-
-<style lang="scss" scoped>
-.app-container {
-  .audit-content {
-    max-width: 1000px;
-    margin: 0 auto;
-    margin-top: 25px;
-  }
-  .grid,
-  .param {
-    display: grid;
-    grid-template-columns: repeat(2, 1fr);
-    // grid-template-rows: repeat(2, 1fr);
-    grid-column-gap: 0px;
-    grid-row-gap: 0px;
-  }
-
-  .param {
-    div {
-      padding-bottom: 16px;
-      text-align: left;
-
-      &:first-child {
-        text-align: right;
-      }
-    }
-  }
-
-  .row {
-    display: flex;
-    justify-content: flex-start;
-    align-items: flex-start;
-    margin-bottom: 25px;
-    .col {
-      font-size: 14px;
-      color: #333;
-      &:first-child {
-        min-width: 100px;
-        text-align: right;
-        margin-right: 8px;
-        font-weight: bold;
-        color: #666;
-      }
-
-      .el-image {
-        margin-left: 12px;
-        &:first-child {
-          margin-left: 0;
-        }
-      }
-    }
-  }
-
-  .el-button {
-    width: 120px;
-  }
-}
-</style>

+ 3 - 5
src/views/admin/logistics-licensed/club/device/index.vue

@@ -35,7 +35,7 @@
       <!-- <el-table-column v-if="false" label="创建人" width="180px" align="center" prop="createBy" /> -->
       <el-table-column label="操作" align="center" width="240px" class-name="small-padding fixed-width">
         <template slot-scope="{ row }">
-          <el-button type="default" size="mini" @click="$_navigationTo(`device-detail?id=${row.productId}`)">
+          <el-button type="primary" size="mini" @click="$_navigationTo(`/logistics/device-detail?productId=${row.productId}`)">
             查看
           </el-button>
           <el-button :disabled="row.auditStatus !== 1" type="primary" size="mini" @click="handleShowQRcode(row)">
@@ -66,7 +66,6 @@ export default {
 
   data() {
     return {
-      authParty: '',
       tableKey: 0,
       list: null,
       total: 0,
@@ -88,8 +87,7 @@ export default {
     ...mapGetters(['userIdentity'])
   },
   created() {
-    this.listQuery.authId = this.$route.query.id
-    this.authParty = this.$route.query.authParty
+    this.listQuery.authId = this.$route.query.authId
     // 保存机构id,用于设备管理
     setStorage('device-setting-authId', this.listQuery.authId)
     this.getList()
@@ -116,7 +114,7 @@ export default {
     // 显示二维码
     handleShowQRcode(item) {
       this.productInfo = item
-      this.productInfo.authParty = this.authParty
+      this.productInfo.authParty = item.authParty
       this.showQRcode = true
     },
     indexMethod(index) {

+ 2 - 10
src/views/admin/logistics-licensed/components/club-list.vue

@@ -48,18 +48,10 @@
       </el-table-column>
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="300">
         <template slot-scope="{ row }">
-          <el-button
-            type="primary"
-            size="mini"
-            @click="$_navigationTo(`club-detail?id=${row.authId}&authParty=${row.authParty}`)"
-          >
+          <el-button type="primary" size="mini" @click="$_navigationTo(`/logistics/club-detail?authId=${row.authId}`)">
             查看
           </el-button>
-          <el-button
-            type="primary"
-            size="mini"
-            @click="$_navigationTo(`device-list?id=${row.authId}&authParty=${row.authParty}`)"
-          >
+          <el-button type="primary" size="mini" @click="$_navigationTo(`/logistics/device-list?authId=${row.authId}`)">
             查看设备认证
           </el-button>
           <el-button v-if="sendStatus === 0" type="primary" size="mini" @click="onSend(row)"> 寄送 </el-button>

+ 8 - 228
src/views/admin/supplier/club/detail.vue

@@ -1,242 +1,22 @@
 <template>
-  <div class="club-edit">
-    <el-form ref="submitForm" class="club-edit-form" label-width="120px" :model="formData" :rules="rules">
-      <el-form-item label="机构名称:" prop="name">
-        <span>{{ formData.name }}</span>
-      </el-form-item>
-      <el-form-item label="所在地区:" prop="address">
-        <span>{{ cascaderPlaceholder }}</span>
-      </el-form-item>
-      <el-form-item label="详细地址:" prop="fullAddress">
-        <span>{{ formData.fullAddress }}</span>
-      </el-form-item>
-      <el-form-item label="经纬度:" prop="point">
-        <span>{{ formData.point }}</span>
-      </el-form-item>
-      <el-form-item label="联系方式:" prop="mobile">
-        <span>{{ formData.mobile }}</span>
-      </el-form-item>
-      <el-form-item label="机构logo:" prop="logoImage">
-        <el-image :src="formData.logoImage" fit="cover" style="width:120px;height:120px;" />
-      </el-form-item>
-      <el-form-item label="轮播图:" prop="banner">
-        <template v-for="(image, index) in bannerList">
-          <el-image :key="index" :src="image" fit="cover" :preview-src-list="bannerList" class="thumbnail" />
-        </template>
-      </el-form-item>
-    </el-form>
+  <div class="page-form-container">
+    <club-detail :auth-id="authId" />
   </div>
 </template>
 
 <script>
-import { mapGetters } from 'vuex'
-import { saveBrandAuth, getAuthFormData } from '@/api/auth'
-import { isPoint } from '@/utils/validate'
-
+import { ClubDetail } from '@/views/components'
 export default {
+  components: {
+    ClubDetail
+  },
   data() {
-    var validatePoint = (rule, value, callback) => {
-      if (value === '') {
-        callback(new Error('经纬度坐标不能为空'))
-      } else {
-        if (isPoint(value)) {
-          callback()
-        } else {
-          callback(new Error('经纬度坐标格式不正确,(例如:114.095294,22.536004)'))
-        }
-      }
-    }
-
     return {
-      dialogMapVisible: false,
-      point: {},
-      value: [],
-      options: [],
-
-      authId: '',
-      disabled: false,
-
-      area: '',
-      formData: {
-        name: '',
-        address: [],
-        fullAddress: '',
-        point: '',
-        mobile: '',
-        logoImage: '',
-        banner: ''
-      },
-      rules: {
-        name: [{ required: true, message: '机构名称不能为空', trigger: ['blur', 'change'] }],
-        address: [{ required: true, message: '地址不能为空', trigger: 'change', type: 'array' }],
-        fullAddress: [{ required: true, message: '详细不能为空', trigger: ['blur', 'change'] }],
-        point: [{ validator: validatePoint, trigger: ['blur', 'change'] }],
-        mobile: [{ required: true, message: '联系方式不能为空', trigger: ['blur', 'change'] }],
-        logoImage: [{ required: true, message: '请上传机构logo', trigger: 'change' }],
-        banner: [{ required: true, message: '请至少上传一张banner图片', trigger: 'change' }]
-      },
-      // logo图片列表
-      logoList: [],
-      // banner图片列表
-      bannerList: [],
-      // 级联选择的地址
-      address: ''
-    }
-  },
-  computed: {
-    ...mapGetters(['authUserId', 'proxyInfo']),
-    cascaderDisplay() {
-      return this.formData.address.length > 0
-    },
-    cascaderPlaceholder() {
-      return this.cascaderDisplay ? this.area : '请选择所在区域'
-    },
-    // 定位使用的地址
-    locationAddress() {
-      return this.address + this.formData.fullAddress
+      authId: ''
     }
   },
   created() {
-    this.authId = this.$route.query.id
-    this.initFormData()
-  },
-  methods: {
-    // 地图标记变化
-    markerChange(point) {
-      this.formData.point = `${point.lng},${point.lat}`
-    },
-
-    // 数据回显
-    initFormData() {
-      getAuthFormData({ authId: this.authId }).then(res => {
-        console.log(res)
-        this.formData.name = res.data.authParty
-
-        this.formData.fullAddress = res.data.address
-        this.formData.point = res.data.lngAndLat
-        this.formData.mobile = res.data.mobile
-        this.formData.logoImage = res.data.logo
-        this.formData.banner = res.data.bannerList.length || ''
-        this.bannerList = res.data.bannerList
-        this.formData.address = [res.data.provinceId, res.data.cityId, res.data.townId]
-        // this.formData.address = '广东省/深圳市/福田区'
-        this.area = res.data.area
-      })
-    },
-
-    // 表单提交保存
-    submit() {
-      this.$refs.submitForm.validate(valide => {
-        if (!valide) return
-
-        console.log(this.formData)
-        const {
-          name: authParty,
-          address: [provinceId, cityId, townId],
-          mobile,
-          logoImage: logo,
-          point: lngAndLat
-        } = this.formData
-
-        const authUserId = this.proxyInfo?.authUserId || this.authUserId
-
-        const data = {
-          authId: parseInt(this.authId),
-          authParty,
-          authUserId,
-          createBy: authUserId,
-          provinceId,
-          cityId,
-          townId,
-          address: this.formData.fullAddress,
-          mobile,
-          logo,
-          lngAndLat
-        }
-
-        data.bannerList = this.bannerList.map(item => item.response ? item.response.data : item.url)
-
-        console.log(data)
-        saveBrandAuth(data)
-          .then(res => {
-            const h = this.$createElement
-            this.$notify.success({
-              title: `修改授权机构`,
-              message: h('i', { style: 'color: #333' }, `已修改授权机构:"${this.formData.name}"`),
-              duration: 3000
-            })
-            this.$refs.submitForm.resetFields()
-            this.$store.dispatch('tagsView/delView', this.$route)
-            this.$router.push('/auth/list')
-          })
-          .catch(err => {
-            this.$message.danger(err.msg)
-          })
-      })
-    },
-    handleChange(e) {
-      const node = this.$refs.cascader.getCheckedNodes()
-      if (node.length <= 0) return
-      this.address = node[0].pathLabels.join()
-    },
-    // logo上传
-    uploadLogoSuccess({ response, file, fileList }) {
-      this.logoList = fileList
-      this.formData.logoImage = fileList[0].response.data
-    },
-    handleLogoRemove({ file, fileList }) {
-      this.logoList = fileList
-      this.formData.logoImage = ''
-    },
-    beforeLogoUpload(file) {
-      const flag = file.size / 1024 < 500
-      if (!flag) {
-        this.$message.error('上传logo图片大小不能超过 500kb!')
-      }
-      return flag
-    },
-
-    // banner上传
-    uploadBannerSuccess({ response, file, fileList }) {
-      this.bannerList = fileList
-      console.log(this.bannerList)
-      this.formData.banner = fileList.length > 0 ? fileList.length : ''
-    },
-    handleBannerRemove({ file, fileList }) {
-      this.bannerList = fileList
-      this.formData.banner = fileList.length > 0 ? fileList.length : ''
-    },
-    beforeBannerUpload(file) {
-      const flag = file.size / 1024 / 1024 < 1
-      if (!flag) {
-        this.$message.error('上传banner图片大小不能超过 1MB!')
-      }
-      return flag
-    }
+    this.authId = this.$route.query.authId
   }
 }
 </script>
-
-<style lang="scss" scoped>
-.thumbnail{
-  width:160px;
-  height:160px;
-  margin-right: 16px;
-}
-
-.club-edit {
-  margin-bottom: 80px;
-}
-
-.club-edit-form {
-  width: 660px;
-  margin: 0 auto;
-  margin-top: 80px;
-}
-.submit-btn {
-  text-align: center;
-  .el-button {
-    width: 140px;
-  }
-}
-</style>

+ 8 - 172
src/views/admin/supplier/club/device/detail.vue

@@ -1,186 +1,22 @@
 <template>
-  <div v-loading="isLoading" class="addProduct">
-    <el-form ref="addFormRef" label-width="120px" class="addForm" :model="formData" :rules="rules">
-      <el-form-item label="设备名称:" prop="productName">
-        <span>{{ formData.productName }}</span>
-      </el-form-item>
-
-      <el-form-item label="设备SN码:" prop="snCode">
-        <span>{{ formData.snCode }}</span>
-      </el-form-item>
-
-      <el-form-item v-if="shopType === 2" label="所属品牌:" prop="brandId">
-        <el-select v-model="formData.brandId" placeholder="请选择品牌" style="width: 100%" filterable disabled>
-          <el-option v-for="item in brandList" :key="item.id" :label="item.name" :value="item.id" />
-        </el-select>
-      </el-form-item>
-
-      <el-form-item label="设备图片:" prop="productImage">
-        <el-image :src="formData.productImage" fit="cover" class="thumbnail" />
-      </el-form-item>
-      <el-form-item label="授权牌:" prop="certificateImage">
-        <el-image :src="formData.certificateImage" fit="cover" class="thumbnail" />
-      </el-form-item>
-      <el-form-item label="相关参数:">
-        <div v-for="(item, index) in paramList" :key="index" class="form-group paramsItem">
-          <el-input v-model="item.paramName" class="param-title" placeholder="参数名称" maxlength="10" />
-          <el-input v-model="item.paramContent" class="param-info" placeholder="请输入参数信息" maxlength="50" />
-        </div>
-      </el-form-item>
-    </el-form>
+  <div class="page-form-container">
+    <device-detail :product-id="productId" />
   </div>
 </template>
 
 <script>
-import { saveProduct, getProductById } from '@/api/product'
-import { fetchBrandList } from '@/api/brand'
-import { mapGetters } from 'vuex'
+import { DeviceDetail } from '@/views/components'
 export default {
+  components: {
+    DeviceDetail
+  },
   data() {
     return {
-      isLoading: false,
-      paramsCount: 4,
-      formData: {
-        authUserId: '',
-        authId: '', //	授权id
-        certificateImage: '', //	授权牌照
-        createBy: '', //	创建人id
-        // 	设备参数列表
-        paramList: [],
-        productId: '', //	授权设备id
-        productImage: '', //	设备图片
-        productName: '', //	设备名称
-        snCode: '', //	设备SN码
-        brandId: ''
-      },
-      paramList: [],
-      brandList: [],
-      rules: {
-        certificateImage: [{ required: true, message: '授权牌照不能为空' }],
-        paramList: [{ required: true, message: '参数不能为空' }],
-        productImage: [{ required: true, message: '设备图片不能为空' }],
-        snCode: [{ required: true, message: 'SN码不能为空' }],
-        productName: [
-          { required: true, message: '设备名称不能为空' },
-          { max: 50, message: '字数在50字符以内' }
-        ]
-      },
-      fileList1: [],
-      fileList2: []
+      productId: ''
     }
   },
-  computed: {
-    ...mapGetters(['authUserId', 'proxyInfo', 'shopType', 'brandId'])
-  },
   created() {
-    this.formData.productId = parseInt(this.$route.query.id)
-    this.formData.authUserId = this.proxyInfo?.authUserId || this.authUserId
-    this.initFormData()
-    if (this.shopType === 2) {
-      this.getBrandList()
-    }
-    // 如果供应商类型为品牌方,则自动设置品牌id
-    if (this.shopType === 1) {
-      this.formData.brandId = this.proxyInfo?.brandId || this.brandId || ''
-    }
-  },
-  methods: {
-    // 初始化表单数据
-    initFormData() {
-      this.isLoading = true
-      getProductById({ productId: this.formData.productId }).then(res => {
-        console.log(res)
-        // const { authId, certificateImage, paramList, productId, productImage, productName, snCode, status } = res.data
-        for (const key in res.data) {
-          if (Object.hasOwnProperty.call(res.data, key)) {
-            if (key !== 'paramList') {
-              this.formData[key] = res.data[key]
-            }
-          }
-        }
-        // 初始化参数
-        this.paramList = res.data.paramList
-        this.isLoading = false
-      })
-    },
-    // 获取品牌信息
-    getBrandList() {
-      fetchBrandList({ type: 3, authUserId: this.formData.authUserId }).then(res => {
-        console.log(res)
-        this.brandList = res.data
-      })
-    },
-    // 保存表单数据
-    save() {
-      this.isLoading = true
-      this.formData.createBy = this.proxyInfo?.authUserId || this.authUserId
-      this.formData.authUserId = this.proxyInfo?.authUserId || this.authUserId
-      saveProduct(this.formData)
-        .then(res => {
-          if (res.code !== 0) return
-          const h = this.$createElement
-          this.$notify.success({
-            title: '修改设备',
-            message: h('i', { style: 'color: #333' }, `已修改设备:"${this.formData.productName}"`),
-            duration: 2000
-          })
-          this.$store.dispatch('tagsView/delView', this.$route)
-          this.$router.back()
-        })
-        .finally(() => {
-          this.isLoading = false
-        })
-    }
+    this.productId = this.$route.query.productId
   }
 }
 </script>
-
-<style lang="scss" scoped>
-.addProduct {
-  margin-bottom: 80px;
-  .form-group {
-    margin-bottom: 2%;
-    .param-title {
-      width: 30%;
-    }
-    .param-info {
-      width: 68%;
-      margin-left: 2%;
-    }
-  }
-}
-.addForm {
-  width: 500px;
-  margin: 0 auto;
-  margin-top: 80px;
-}
-.submit-btn {
-  text-align: center;
-  .el-button {
-    width: 140px;
-  }
-}
-.paramsItem {
-  position: relative;
-  .closed {
-    position: absolute;
-    top: 50%;
-    transform: translateY(-50%);
-    right: -20px;
-    cursor: pointer;
-    color: #ddd;
-    &:hover {
-      color: #333;
-    }
-  }
-}
-.hiddenInput {
-  height: 0;
-  display: none;
-}
-
-.thumbnail{
-  width:160px;
-  height:160px;
-}
-</style>

+ 3 - 5
src/views/admin/supplier/club/device/index.vue

@@ -118,7 +118,7 @@
           <el-button
             type="primary"
             size="mini"
-            @click="$_navigationTo(`club-device-detail?id=${row.productId}`)"
+            @click="$_navigationTo(`club-device-detail?productId=${row.productId}`)"
           >查看</el-button>
           <el-button type="primary" size="mini" :disabled="row.auditStatus !== 1" @click="handleShowQRcode(row)">
             二维码
@@ -147,7 +147,6 @@ export default {
 
   data() {
     return {
-      authParty: '',
       tableKey: 0,
       list: null,
       total: 0,
@@ -169,8 +168,7 @@ export default {
     ...mapGetters(['userIdentity', 'proxyInfo'])
   },
   created() {
-    this.listQuery.authId = this.$route.query.id
-    this.authParty = this.$route.query.authParty
+    this.listQuery.authId = this.$route.query.authId
     this.getList()
   },
 
@@ -196,7 +194,7 @@ export default {
     // 显示二维码
     handleShowQRcode(item) {
       this.productInfo = item
-      this.productInfo.authParty = this.authParty
+      this.productInfo.authParty = item.authParty
       this.showQRcode = true
     },
     indexMethod(index) {

+ 12 - 77
src/views/admin/supplier/club/index.vue

@@ -6,7 +6,7 @@
         <el-input
           v-model="listQuery.authParty"
           placeholder="授权机构"
-          style="width: 280px;"
+          style="width: 280px"
           class="filter-item"
           @keyup.enter.native="handleFilter"
         />
@@ -45,9 +45,6 @@
       </div>
       <div class="filter-control">
         <el-button type="primary" @click="getList">查询</el-button>
-        <!-- <el-button icon="el-icon-upload" type="primary" @click="improtDialogVisible = true">导入</el-button> -->
-        <el-button type="primary" @click="handleExportExcel">导出</el-button>
-        <!-- <el-button icon="el-icon-document-copy" type="primary" @click="downLoadExportExcel">获取导入模板</el-button> -->
       </div>
     </div>
     <!-- 表格区域 -->
@@ -58,7 +55,7 @@
       border
       fit
       highlight-current-row
-      style="width: 100%;"
+      style="width: 100%"
       header-row-class-name="tableHeader"
     >
       <el-table-column label="序号" :index="indexMethod" align="center" width="80" type="index" />
@@ -76,15 +73,15 @@
           <!-- 只有审核通过了才能操作上下线 auditStatus :审核状态 -->
           <template v-if="row.auditStatus === 1">
             <template v-if="row.status === 0">
-              <span style="margin-right:10px;" class="status danger">已下线</span>
+              <span style="margin-right: 10px" class="status danger">已下线</span>
             </template>
             <template v-else>
-              <span style="margin-right:10px;" class="status success ">已上线</span>
+              <span style="margin-right: 10px" class="status success">已上线</span>
             </template>
           </template>
           <template v-else>
             <!-- <el-tag type="warning">待上线</el-tag> -->
-            <span style="margin-right:10px;" class="status warning">待上线</span>
+            <span style="margin-right: 10px" class="status warning">待上线</span>
           </template>
         </template>
       </el-table-column>
@@ -98,18 +95,10 @@
       <!-- <el-table-column label="创建人" class-name="status-col" width="160px" prop="createBy" /> -->
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="240px">
         <template slot-scope="{ row }">
-          <el-button
-            type="primary"
-            size="mini"
-            @click="$_navigationTo(`club-detail?id=${row.authId}&authParty=${row.authParty}`)"
-          >
+          <el-button type="primary" size="mini" @click="$_navigationTo(`club-detail?authId=${row.authId}`)">
             查看
           </el-button>
-          <el-button
-            type="primary"
-            size="mini"
-            @click="$_navigationTo(`club-device-list?id=${row.authId}&authParty=${row.authParty}`)"
-          >
+          <el-button type="primary" size="mini" @click="$_navigationTo(`club-device-list?authId=${row.authId}`)">
             查看设备认证
           </el-button>
         </template>
@@ -117,19 +106,13 @@
     </el-table>
 
     <!-- 页码 -->
-    <pagination
-      :total="total"
-      :page.sync="listQuery.pageNum"
-      :limit.sync="listQuery.pageSize"
-      @pagination="getList"
-    />
+    <pagination :total="total" :page.sync="listQuery.pageNum" :limit.sync="listQuery.pageSize" @pagination="getList" />
   </div>
 </template>
 
 <script>
-import { fecthAuthList, authImportExcel } from '@/api/auth'
+import { fecthAuthList } from '@/api/auth'
 import { mapGetters } from 'vuex'
-import { debounce, downLoadWithATag } from '@/utils/tools'
 export default {
   name: 'ComplexTable',
   data() {
@@ -183,57 +166,11 @@ export default {
     this.getList()
   },
   methods: {
-    // 下载模板
-    downLoadExportExcel() {
-      downLoadWithATag(
-        `${process.env.VUE_APP_BASE_API}/download/file?ossName=%E6%AD%A3%E5%93%81%E8%81%94%E7%9B%9F%E6%9C%BA%E6%9E%84%E3%80%81%E5%95%86%E5%93%81%E5%AF%BC%E5%85%A5%E6%A8%A1%E6%9D%BF.xlsx&fileName=%E6%AD%A3%E5%93%81%E8%81%94%E7%9B%9F%E6%9C%BA%E6%9E%84%E3%80%81%E5%95%86%E5%93%81%E5%AF%BC%E5%85%A5%E6%A8%A1%E6%9D%BF.xlsx`
-      )
-    },
-
-    // 导出为Excel
-    async handleExportExcel() {
-      const text = await this.$confirm('确认导出所有授权机构的数据吗?', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).catch(() => {
-        this.$message.info('已取消操作')
-      })
-      if (text !== 'confirm') return
-      // 使用a链接下载
-      downLoadWithATag(`${process.env.VUE_APP_BASE_API}/auth/export/excel?authUserId=${this.authUserId}`)
-    },
-
-    // 导入Excel 并提交
-    handleSave: debounce(function() {
-      console.log('保存')
-      console.log(this.improtDialogFormData)
-      console.log(this.proxyInfo, this.authUserId)
-      // 上传文件使用 multipart/form-data
-      const formData = new FormData()
-
-      formData.append('authUserId', this.authUserId)
-      formData.append('createBy', this.copyUserInfo.authUserId)
-      formData.append('file', this.chooseFile)
-
-      authImportExcel(formData)
-        .then(res => {
-          this.$message.success(res.data)
-          this.improtDialogVisible = false
-          this.getList()
-        })
-        .catch(err => {
-          console.log(err)
-        })
-        .finally(() => {
-          this.requestLoading = false
-        })
-    }, 200),
     // 获取授权列表
     getList() {
       this.listLoading = true
       fecthAuthList(this.listQuery)
-        .then(response => {
+        .then((response) => {
           if (response.code !== 0) {
             return this.$message.error('授权列表信息获取失败')
           }
@@ -241,7 +178,7 @@ export default {
           this.list = list
           this.total = total
         })
-        .catch(err => {
+        .catch((err) => {
           console.log(err)
           return this.$message.error('授权列表信息获取失败')
         })
@@ -262,6 +199,4 @@ export default {
 }
 </script>
 
-<style lang="scss" scoped>
-
-</style>
+<style lang="scss" scoped></style>

+ 243 - 0
src/views/components/ClubDetail/index.vue

@@ -0,0 +1,243 @@
+<template>
+  <div>
+    <div class="grid">
+      <div class="row">
+        <div class="col">机构名称:</div>
+        <div class="col">{{ clubInfo.authParty }}</div>
+      </div>
+      <div class="row">
+        <div class="col">联系电话:</div>
+        <div class="col">{{ clubInfo.mobile }}</div>
+      </div>
+      <div class="row">
+        <div class="col">所在地区:</div>
+        <div class="col">{{ clubInfo.area }}</div>
+      </div>
+      <div class="row">
+        <div class="col">详细地址:</div>
+        <div class="col">{{ clubInfo.address }}</div>
+      </div>
+      <div class="row">
+        <div class="col">所在位置:</div>
+        <div class="col">
+          <div class="map" @click="initMap">
+            <i class="el-icon-map-location" />
+            <span>点击查看</span>
+          </div>
+        </div>
+      </div>
+    </div>
+    <div class="row">
+      <div class="col">logo:</div>
+      <div class="col">
+        <preview-image v-if="clubInfo.logo" class="preview-image" :src="clubInfo.logo" />
+      </div>
+    </div>
+    <div class="row">
+      <div class="col">门头照:</div>
+      <div class="col">
+        <template v-for="(image, index) in clubInfo.bannerList">
+          <preview-image :key="index" class="preview-image" :src="image" :preview-src-list="clubInfo.bannerList" />
+        </template>
+      </div>
+    </div>
+    <div class="row">
+      <div class="col">机构类型:</div>
+      <div class="col">
+        <el-radio-group v-model="clubInfo.firstClubType">
+          <el-radio
+            v-for="item in clubTypeList"
+            :key="item.id"
+            :label="item.id"
+            :disabled="clubInfo.firstClubType !== item.id"
+          >{{ item.name }}</el-radio>
+        </el-radio-group>
+      </div>
+    </div>
+
+    <div v-if="clubInfo.firstClubType === 1" class="row">
+      <div class="col">医美类型:</div>
+      <div class="col">
+        <el-radio-group v-model="clubInfo.secondClubType">
+          <el-radio
+            v-for="item in medicalTypeList1"
+            :key="item.id"
+            :label="item.id"
+            :disabled="clubInfo.secondClubType !== item.id"
+          >{{ item.name }}</el-radio>
+        </el-radio-group>
+      </div>
+    </div>
+
+    <div v-if="clubInfo.firstClubType === 2" class="row">
+      <div class="col">生美类型:</div>
+      <div class="col">
+        <el-radio-group v-model="clubInfo.secondClubType">
+          <el-radio
+            v-for="item in medicalTypeList2"
+            :key="item.id"
+            :label="item.id"
+            :disabled="clubInfo.secondClubType !== item.id"
+          >{{ item.name }}</el-radio>
+        </el-radio-group>
+      </div>
+    </div>
+
+    <div v-if="clubInfo.firstClubType === 1" class="row">
+      <div class="col">医疗许可证:</div>
+      <div class="col">
+        <preview-image v-if="clubInfo.medicalLicenseImage" class="preview-image" :src="clubInfo.medicalLicenseImage" />
+      </div>
+    </div>
+    <div class="row">
+      <div class="col">员工人数:</div>
+      <div class="col">{{ clubInfo.empNum }}人</div>
+    </div>
+
+    <div class="row">
+      <div class="col">自定义属性:</div>
+      <div class="col">
+        <el-radio-group v-model="clubInfo.customFlag">
+          <el-radio :label="1" :disabled="clubInfo.customFlag !== 1">是</el-radio>
+          <el-radio :label="0" :disabled="clubInfo.customFlag !== 0">否</el-radio>
+        </el-radio-group>
+      </div>
+    </div>
+    <div v-if="clubInfo.customFlag > 0" class="row">
+      <div class="col">店铺备注:</div>
+      <div class="col">{{ clubInfo.remarks }}人</div>
+    </div>
+
+    <!-- 地图坐标拾取 -->
+    <el-dialog class="map-dialog" title="地图信息" :visible.sync="dialogMapVisible" width="80%">
+      <a-map ref="aMap" :lnglat="lnglat" />
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import SimpleAMap from '@/components/SimpleAMap'
+import { getAuthFormData } from '@/api/auth'
+export default {
+  name: 'ClubDetail',
+  components: {
+    [SimpleAMap.name]: SimpleAMap
+  },
+  props: {
+    authId: {
+      type: String,
+      default: ''
+    }
+  },
+  data() {
+    return {
+      dialogMapVisible: false,
+      clubTypeList: [
+        { id: 1, name: '医美' },
+        { id: 2, name: '生美' },
+        { id: 3, name: '项目公司' },
+        { id: 4, name: '个人' },
+        { id: 5, name: '其他' }
+      ],
+      medicalTypeList1: [
+        { id: 1, name: '诊所' },
+        { id: 2, name: '门诊' },
+        { id: 3, name: '医院' },
+        { id: 4, name: '其他' }
+      ],
+      medicalTypeList2: [
+        { id: 5, name: '美容院' },
+        { id: 6, name: '养生馆' },
+        { id: 7, name: '其他' }
+      ],
+      clubInfo: {
+        secondClubType: 1,
+        firstClubType: 1,
+        medicalLicenseImage: '',
+        empNum: '',
+        address: '',
+        area: '',
+        authId: '',
+        authParty: '',
+        bannerList: [],
+        cityId: '',
+        lngAndLat: '',
+        logo: '',
+        mobile: '',
+        provinceId: '',
+        townId: '',
+        customFlag: 0,
+        remarks: ''
+      }
+    }
+  },
+  computed: {
+    // 位置坐标
+    lnglat() {
+      return this.clubInfo.lngAndLat ? this.clubInfo.lngAndLat.split(',') : null
+    }
+  },
+  created() {
+    this.getDetail()
+  },
+  methods: {
+    // 地图定位
+    initMap() {
+      this.dialogMapVisible = true
+      if (this.lnglat) {
+        this.$nextTick(() => {
+          this.$refs.aMap.init()
+        })
+      }
+    },
+    // 数据回显
+    getDetail() {
+      getAuthFormData({ authId: this.authId }).then((res) => {
+        this.clubInfo = { ...this.clubInfo, ...res.data }
+      })
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.map {
+  cursor: pointer;
+  span {
+    margin-left: 4px;
+    color: #409eff;
+  }
+}
+
+.grid {
+  display: grid;
+  grid-template-columns: repeat(2, 1fr);
+  grid-column-gap: 0px;
+  grid-row-gap: 0px;
+}
+.row {
+  display: flex;
+  justify-content: flex-start;
+  align-items: flex-start;
+  margin-bottom: 25px;
+  .col {
+    font-size: 14px;
+    color: #333;
+    &:first-child {
+      min-width: 100px;
+      text-align: right;
+      margin-right: 8px;
+      font-weight: bold;
+      color: #666;
+    }
+  }
+}
+
+.preview-image {
+  display: inline-block;
+  margin-left: 12px;
+  &:first-child {
+    margin-left: 0;
+  }
+}
+</style>

+ 108 - 0
src/views/components/DeviceDetail/index.vue

@@ -0,0 +1,108 @@
+<template>
+  <div>
+    <div class="row">
+      <div class="col">设备名称:</div>
+      <div class="col">{{ productInfo.productName }}</div>
+    </div>
+    <div class="row">
+      <div class="col">设备SN码:</div>
+      <div class="col">{{ productInfo.snCode }}</div>
+    </div>
+    <div class="row">
+      <div class="col">设备图片:</div>
+      <div class="col">
+        <preview-image v-if="productInfo.productImage" class="preview-image" :src="productInfo.productImage" />
+      </div>
+    </div>
+    <div class="row">
+      <div class="col">授权牌:</div>
+      <div class="col">
+        <preview-image v-if="productInfo.certificateImage" class="preview-image" :src="productInfo.certificateImage" />
+      </div>
+    </div>
+    <div class="row">
+      <div class="col">购买渠道:</div>
+      <div class="col">{{ productInfo.purchaseWay }}</div>
+    </div>
+    <div class="row">
+      <div class="col">发票:</div>
+      <div class="col">
+        <preview-image v-if="productInfo.invoiceImage" class="preview-image" :src="productInfo.invoiceImage" />
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import { getProductById } from '@/api/product'
+export default {
+  name: 'DeviceDetail',
+  props: {
+    productId: {
+      type: String,
+      default: ''
+    }
+  },
+  data() {
+    return {
+      productInfo: {
+        productId: '',
+        productName: '',
+        snCode: '',
+        productImage: '',
+        certificateImage: '',
+        paramList: [],
+        invoiceImage: '',
+        brandName: '',
+        purchaseWay: ''
+      }
+    }
+  },
+  created() {
+    this.getDetail()
+  },
+  methods: {
+    // 获取商品详情
+    getDetail() {
+      this.isLoading = true
+      getProductById({ productId: this.productId })
+        .then((res) => {
+          this.productInfo = { ...this.productInfo, ...res.data }
+        })
+        .finally(() => {
+          this.isLoading = false
+        })
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.row {
+  display: flex;
+  justify-content: flex-start;
+  align-items: flex-start;
+  margin-bottom: 25px;
+  .col {
+    font-size: 14px;
+    color: #333;
+    &:first-child {
+      min-width: 100px;
+      text-align: right;
+      margin-right: 8px;
+      font-weight: bold;
+      color: #666;
+    }
+
+    .el-image {
+      margin-left: 12px;
+      &:first-child {
+        margin-left: 0;
+      }
+    }
+  }
+}
+.preview-image {
+  display: inline-block;
+}
+</style>

+ 2 - 0
src/views/components/index.js

@@ -0,0 +1,2 @@
+export { default as ClubDetail } from './ClubDetail/index.vue'
+export { default as DeviceDetail } from './DeviceDetail/index.vue'

+ 14 - 2
src/views/normal/audit/club/components/club-list.vue

@@ -60,13 +60,25 @@
       <el-table-column label="操作" width="240px" align="center">
         <template slot-scope="{ row }">
           <permission-button
-            type="warning"
+            v-if="shopAuditStatus === 0"
+            type="primary"
             size="mini"
             style="margin-right: 5px"
             @click="onClick(row, 'audit')"
           >审核</permission-button>
+          <permission-button
+            v-else
+            type="primary"
+            size="mini"
+            style="margin-right: 5px"
+            @click="onClick(row, 'review')"
+          >查看</permission-button>
           <el-badge :hidden="row.shopWaitAuditNum === 0" :value="row.shopWaitAuditNum" :max="99">
-            <permission-button type="primary" size="mini" @click="onClick(row, 'review')">设备认证</permission-button>
+            <permission-button
+              type="primary"
+              size="mini"
+              @click="$_navigationTo(`/supplier-audit/club/device/list?authId=${row.authId}`)"
+            >设备认证</permission-button>
           </el-badge>
         </template>
       </el-table-column>

+ 2 - 2
src/views/normal/audit/club/components/device-list.vue

@@ -55,7 +55,7 @@
       <el-table-column label="操作" width="240px" align="center">
         <template slot-scope="{ row }">
           <permission-button
-            v-if="row.shopAuditStatus !== 1"
+            v-if="shopAuditStatus === 0"
             type="primary"
             size="mini"
             @click="onClick(row, 'audit')"
@@ -118,7 +118,7 @@ export default {
     },
     onClick(row, type) {
       this.$router.push(
-        `/supplier-audit/club/device-detail?id=${row.productId}&authId=${this.listQuery.authId}&type=${type}`
+        `/supplier-audit/club/device-detail?productId=${row.productId}&authId=${this.listQuery.authId}&type=${type}`
       )
     },
     indexMethod(index) {

+ 27 - 98
src/views/normal/audit/club/device/review.vue

@@ -1,76 +1,44 @@
 <template>
   <div class="page-form-container">
-    <div class="row">
-      <div class="col">设备名称:</div>
-      <div class="col">{{ productInfo.productName }}</div>
-    </div>
-    <div class="row">
-      <div class="col">设备SN码:</div>
-      <div class="col">{{ productInfo.snCode }}</div>
-    </div>
-    <div class="row">
-      <div class="col">设备图片:</div>
-      <div class="col">
-        <preview-image v-if="productInfo.productImage" :src="productInfo.productImage" />
+    <device-detail :product-id="productId" />
+    <template v-if="type === 'audit'">
+      <el-form ref="auditForm" label-width="112px" :model="auditForm" :rules="rules">
+        <el-form-item label="审核:">
+          <el-radio-group v-model="auditForm.auditStatus">
+            <el-radio :label="1">通过</el-radio>
+            <el-radio :label="0">不通过</el-radio>
+          </el-radio-group>
+        </el-form-item>
+        <el-form-item v-if="auditForm.auditStatus === 0" label="原因:" prop="invalidReason">
+          <el-input v-model="auditForm.invalidReason" type="textarea" :rows="3" />
+        </el-form-item>
+      </el-form>
+      <div class="control-box">
+        <el-button type="info" @click="$_back">返回</el-button>
+        <el-button type="primary" @click="submit">提交</el-button>
       </div>
-    </div>
-
-    <div class="row">
-      <div class="col">购买渠道:</div>
-      <div class="col">{{ productInfo.purchaseWay }}</div>
-    </div>
-
-    <div class="row">
-      <div class="col">发票:</div>
-      <div class="col">
-        <preview-image v-if="productInfo.invoiceImage" :src="productInfo.invoiceImage" />
-      </div>
-    </div>
-    <el-form v-if="type === 'audit'" ref="auditForm" label-width="112px" :model="auditForm" :rules="rules">
-      <el-form-item label="审核:">
-        <el-radio-group v-model="auditForm.auditStatus">
-          <el-radio :label="1">通过</el-radio>
-          <el-radio :label="0">不通过</el-radio>
-        </el-radio-group>
-      </el-form-item>
-      <el-form-item v-if="auditForm.auditStatus === 0" label="原因:" prop="invalidReason">
-        <el-input v-model="auditForm.invalidReason" type="textarea" :rows="3" />
-      </el-form-item>
-      <el-form-item>
-        <div class="control-box" style="text-align: left">
-          <el-button type="info" @click="$_back">返回</el-button>
-          <el-button type="primary" @click="submit">提交</el-button>
-        </div>
-      </el-form-item>
-    </el-form>
+    </template>
   </div>
 </template>
 
 <script>
-import { getProductById, auditProduct } from '@/api/product'
+import { auditProduct } from '@/api/product'
 import { mapGetters } from 'vuex'
+import { DeviceDetail } from '@/views/components'
 export default {
+  components: {
+    DeviceDetail
+  },
   data() {
     return {
       type: 'review',
-      productInfo: {
-        productId: '',
-        productName: '',
-        snCode: '',
-        productImage: '',
-        certificateImage: '',
-        paramList: [],
-        invoiceImage: '',
-        brandName: '',
-        purchaseWay: ''
-      },
+      productId: '',
       auditForm: {
         productId: '',
         auditBy: '', // 审核人id
         authId: '', // 机构id
         auditStatus: 1, // 审核状态
-        invalidReason: '', // 审核信息
-        source: 2
+        invalidReason: '' // 审核信息
       },
       rules: {
         invalidReason: { required: true, message: '不通过原因不能为空', tigger: 'blur' }
@@ -81,31 +49,19 @@ export default {
     ...mapGetters(['authUserId'])
   },
   created() {
-    this.productInfo.productId = this.$route.query.id
-    this.type = this.$route.query.type
     this.authId = this.$route.query.authId
-    this.getDetail()
+    this.productId = this.$route.query.productId
+    this.type = this.$route.query.type
   },
   methods: {
-    // 获取商品详情
-    getDetail() {
-      this.isLoading = true
-      getProductById({ productId: this.productInfo.productId })
-        .then((res) => {
-          this.productInfo = { ...this.productInfo, ...res.data }
-        })
-        .finally(() => {
-          this.isLoading = false
-        })
-    },
     // 提交审核信息
     submit() {
+      this.auditForm.productId = this.productId
       this.$refs.auditForm.validate((valid) => {
         if (valid) {
           this.isLoading = true
           // 指定审核人
           this.auditForm.auditBy = this.authUserId
-          this.auditForm.productId = this.productInfo.productId
           auditProduct(this.auditForm)
             .then((res) => {
               this.$message.success(res.data)
@@ -121,30 +77,3 @@ export default {
   }
 }
 </script>
-
-<style lang="scss" scoped>
-.row {
-  display: flex;
-  justify-content: flex-start;
-  align-items: flex-start;
-  margin-bottom: 25px;
-  .col {
-    font-size: 14px;
-    color: #333;
-    &:first-child {
-      min-width: 100px;
-      text-align: right;
-      margin-right: 8px;
-      font-weight: bold;
-      color: #666;
-    }
-
-    .el-image {
-      margin-left: 12px;
-      &:first-child {
-        margin-left: 0;
-      }
-    }
-  }
-}
-</style>

+ 32 - 241
src/views/normal/audit/club/review.vue

@@ -1,195 +1,43 @@
 <template>
   <div class="page-form-container">
-    <div class="grid">
-      <div class="row">
-        <div class="col">机构名称:</div>
-        <div class="col">{{ clubInfo.authParty }}</div>
+    <club-detail :auth-id="authId" />
+    <template v-if="type === 'audit'">
+      <el-form ref="auditForm" label-width="112px" :model="auditForm" :rules="rules">
+        <el-form-item label="审核:">
+          <el-radio-group v-model="auditForm.auditStatus">
+            <el-radio :label="1">通过</el-radio>
+            <el-radio :label="0">不通过</el-radio>
+          </el-radio-group>
+        </el-form-item>
+        <el-form-item v-if="auditForm.auditStatus === 0" label="原因:" prop="invalidReason">
+          <el-input v-model="auditForm.invalidReason" type="textarea" :rows="3" />
+        </el-form-item>
+      </el-form>
+      <div class="control-box">
+        <el-button type="info" @click="$_back">返回</el-button>
+        <el-button type="primary" @click="submit">提交</el-button>
       </div>
-      <div class="row">
-        <div class="col">联系电话:</div>
-        <div class="col">{{ clubInfo.mobile }}</div>
-      </div>
-      <div class="row">
-        <div class="col">所在地区:</div>
-        <div class="col">{{ clubInfo.area }}</div>
-      </div>
-      <div class="row">
-        <div class="col">详细地址:</div>
-        <div class="col">{{ clubInfo.address }}</div>
-      </div>
-      <div class="row">
-        <div class="col">所在位置:</div>
-        <div class="col">
-          <div class="map" @click="initMap">
-            <i class="el-icon-map-location" />
-            <span>点击查看</span>
-          </div>
-        </div>
-      </div>
-    </div>
-    <div class="row">
-      <div class="col">logo:</div>
-      <div class="col">
-        <preview-image v-if="clubInfo.logo" :src="clubInfo.logo" />
-      </div>
-    </div>
-    <div class="row">
-      <div class="col">门头照:</div>
-      <div class="col">
-        <template v-if="clubInfo.bannerList.length > 0">
-          <template v-for="(image, index) in clubInfo.bannerList">
-            <preview-image :key="index" class="preview-image" :src="image" :preview-src-list="clubInfo.bannerList" />
-          </template>
-        </template>
-      </div>
-    </div>
-
-    <div class="row">
-      <div class="col">机构类型:</div>
-      <div class="col">
-        <el-radio-group v-model="clubInfo.firstClubType">
-          <el-radio
-            v-for="item in clubTypeList"
-            :key="item.id"
-            :label="item.id"
-            :disabled="clubInfo.firstClubType !== item.id"
-          >{{ item.name }}</el-radio>
-        </el-radio-group>
-      </div>
-    </div>
-
-    <div v-if="clubInfo.firstClubType === 1" class="row">
-      <div class="col">医美类型:</div>
-      <div class="col">
-        <el-radio-group v-model="clubInfo.secondClubType">
-          <el-radio
-            v-for="item in medicalTypeList1"
-            :key="item.id"
-            :label="item.id"
-            :disabled="clubInfo.secondClubType !== item.id"
-          >{{ item.name }}</el-radio>
-        </el-radio-group>
-      </div>
-    </div>
-
-    <div v-if="clubInfo.firstClubType === 2" class="row">
-      <div class="col">生美类型:</div>
-      <div class="col">
-        <el-radio-group v-model="clubInfo.secondClubType">
-          <el-radio
-            v-for="item in medicalTypeList2"
-            :key="item.id"
-            :label="item.id"
-            :disabled="clubInfo.secondClubType !== item.id"
-          >{{ item.name }}</el-radio>
-        </el-radio-group>
-      </div>
-    </div>
-
-    <div v-if="clubInfo.firstClubType === 1" class="row">
-      <div class="col">医疗许可证:</div>
-      <div class="col">
-        <preview-image v-if="clubInfo.medicalLicenseImage" :src="clubInfo.medicalLicenseImage" />
-      </div>
-    </div>
-    <div class="row">
-      <div class="col">员工人数:</div>
-      <div class="col">{{ clubInfo.empNum }}人</div>
-    </div>
-
-    <div class="row">
-      <div class="col">自定义属性:</div>
-      <div class="col">
-        <el-radio-group v-model="clubInfo.customFlag">
-          <el-radio :label="1" :disabled="clubInfo.customFlag !== 1">是</el-radio>
-          <el-radio :label="0" :disabled="clubInfo.customFlag !== 0">否</el-radio>
-        </el-radio-group>
-      </div>
-    </div>
-    <div v-if="clubInfo.customFlag > 0" class="row">
-      <div class="col">店铺备注:</div>
-      <div class="col">{{ clubInfo.remarks }}人</div>
-    </div>
-    <el-form ref="auditForm" label-width="112px" :model="auditForm" :rules="rules">
-      <el-form-item label="审核:">
-        <el-radio-group v-model="auditForm.auditStatus">
-          <el-radio :label="1">通过</el-radio>
-          <el-radio :label="0">不通过</el-radio>
-        </el-radio-group>
-      </el-form-item>
-      <el-form-item v-if="auditForm.auditStatus === 0" label="原因:" prop="invalidReason">
-        <el-input v-model="auditForm.invalidReason" type="textarea" :rows="3" />
-      </el-form-item>
-      <el-form-item>
-        <div class="control-box left">
-          <el-button type="info" @click="$_back">返回</el-button>
-          <el-button type="primary" @click="submit">提交</el-button>
-        </div>
-      </el-form-item>
-    </el-form>
-    <!-- 地图坐标拾取 -->
-    <el-dialog class="map-dialog" title="地图信息" :visible.sync="dialogMapVisible" width="60%">
-      <a-map ref="aMap" :lnglat="lnglat" />
-    </el-dialog>
+    </template>
   </div>
 </template>
 
 <script>
-import SimpleAMap from '@/components/SimpleAMap'
-import { getAuthFormData, auditAuth } from '@/api/auth'
+import { auditAuth } from '@/api/auth'
+import { ClubDetail } from '@/views/components'
 import { mapGetters } from 'vuex'
 export default {
   components: {
-    [SimpleAMap.name]: SimpleAMap
+    ClubDetail
   },
   data() {
     return {
-      isLoading: false,
-      dialogMapVisible: false,
-      clubTypeList: [
-        { id: 1, name: '医美' },
-        { id: 2, name: '生美' },
-        { id: 3, name: '项目公司' },
-        { id: 4, name: '个人' },
-        { id: 5, name: '其他' }
-      ],
-      medicalTypeList1: [
-        { id: 1, name: '诊所' },
-        { id: 2, name: '门诊' },
-        { id: 3, name: '医院' },
-        { id: 4, name: '其他' }
-      ],
-      medicalTypeList2: [
-        { id: 5, name: '美容院' },
-        { id: 6, name: '养生馆' },
-        { id: 7, name: '其他' }
-      ],
+      type: 'audit',
       authId: '',
-      clubInfo: {
-        secondClubType: 1,
-        firstClubType: 1,
-        medicalLicenseImage: '',
-        empNum: '',
-        address: '',
-        area: '',
-        authId: '',
-        authParty: '',
-        bannerList: [],
-        cityId: '',
-        lngAndLat: '',
-        logo: '',
-        mobile: '',
-        provinceId: '',
-        townId: '',
-        customFlag: 0,
-        remarks: ''
-      },
       auditForm: {
         auditBy: '', // 审核人id
         authId: '', // 机构id
         auditStatus: 1, // 审核状态
-        invalidReason: '', // 审核信息
-        source: 2
+        invalidReason: '' // 审核信息
       },
       rules: {
         invalidReason: { required: true, message: '不通过原因不能为空', tigger: 'blur' }
@@ -197,15 +45,11 @@ export default {
     }
   },
   computed: {
-    ...mapGetters(['authUserId']),
-    // 位置坐标
-    lnglat() {
-      return this.clubInfo.lngAndLat ? this.clubInfo.lngAndLat.split(',') : null
-    }
+    ...mapGetters(['authUserId'])
   },
   created() {
-    this.auditForm.authId = this.$route.query.authId
-    this.getDetail()
+    this.authId = this.$route.query.authId
+    this.type = this.$route.query.type
   },
   methods: {
     // 地图定位
@@ -217,74 +61,21 @@ export default {
         })
       }
     },
-    // 数据回显
-    getDetail() {
-      getAuthFormData({ authId: this.auditForm.authId }).then((res) => {
-        this.clubInfo = { ...this.clubInfo, ...res.data }
-      })
-    },
     // 提交审核信息
     submit() {
+      this.auditForm.authId = this.authId
+      this.auditForm.auditBy = this.authUserId
       this.$refs.auditForm.validate((valid) => {
         if (valid) {
-          this.isLoading = true
-          // 指定审核人
-          this.auditForm.auditBy = this.authUserId
           // 提交审核信息
-          auditAuth(this.auditForm)
-            .then((res) => {
-              this.$message.success(res.data)
-              this.$store.dispatch('tagsView/delView', this.$route)
-              this.$router.back()
-            })
-            .finally(() => {
-              this.isLoading = false
-            })
+          auditAuth(this.auditForm).then((res) => {
+            this.$message.success(res.data)
+            this.$store.dispatch('tagsView/delView', this.$route)
+            this.$router.back()
+          })
         }
       })
     }
   }
 }
 </script>
-
-<style lang="scss" scoped>
-.map {
-  cursor: pointer;
-  span {
-    margin-left: 4px;
-    color: #409eff;
-  }
-}
-
-.grid {
-  display: grid;
-  grid-template-columns: repeat(2, 1fr);
-  // grid-template-rows: repeat(2, 1fr);
-  grid-column-gap: 0px;
-  grid-row-gap: 0px;
-}
-.row {
-  display: flex;
-  justify-content: flex-start;
-  align-items: flex-start;
-  margin-bottom: 25px;
-  .col {
-    font-size: 14px;
-    color: #333;
-    &:first-child {
-      min-width: 100px;
-      text-align: right;
-      margin-right: 8px;
-      font-weight: bold;
-      color: #666;
-    }
-
-    .preview-image {
-      margin-left: 12px;
-      &:first-child {
-        margin-left: 0;
-      }
-    }
-  }
-}
-</style>