|
@@ -9,13 +9,16 @@
|
|
|
>
|
|
|
<div class="page-top flex flex-col justify-center items-center">
|
|
|
<img class="logo" :src="supplierInfo.logo" />
|
|
|
- <div class="name mt-2" v-text="supplierInfo.shopName + '认证记录'"></div>
|
|
|
+ <div
|
|
|
+ class="name mt-2"
|
|
|
+ v-text="supplierInfo.shopName + '认证记录'"
|
|
|
+ ></div>
|
|
|
</div>
|
|
|
<div class="page-content">
|
|
|
- <template v-if="list.length>0">
|
|
|
-
|
|
|
+ <template v-if="list.length > 0">
|
|
|
<div class="page-title">设备认证</div>
|
|
|
- <div class="device-list"
|
|
|
+ <div
|
|
|
+ class="device-list"
|
|
|
v-for="item in list"
|
|
|
:key="item.productId"
|
|
|
@click="toEdit(item)"
|
|
@@ -23,11 +26,15 @@
|
|
|
<div class="device">
|
|
|
<div class="name">
|
|
|
<span class="label">设备名称:</span>
|
|
|
- <span class="content">{{ item.productName ? item.productName : '' }}</span>
|
|
|
+ <span class="content">{{
|
|
|
+ item.productName ? item.productName : ''
|
|
|
+ }}</span>
|
|
|
</div>
|
|
|
<div class="status" :class="auditStatusColor(item.auditStatus)">
|
|
|
<span class="label">状态:</span>
|
|
|
- <span class="content">{{ item.auditStatus | auditStatusFilter }}</span>
|
|
|
+ <span class="content">{{
|
|
|
+ item.auditStatus | auditStatusFilter
|
|
|
+ }}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -36,7 +43,7 @@
|
|
|
<SimpleEmpty name="icon-device-empty.png" description="暂无设备~" />
|
|
|
</template>
|
|
|
</div>
|
|
|
- </van-list>
|
|
|
+ </van-list>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -56,7 +63,7 @@ export default {
|
|
|
list: [],
|
|
|
listQuery: {
|
|
|
authId: 0,
|
|
|
- listType:2,
|
|
|
+ listType: 2,
|
|
|
pageNum: 1,
|
|
|
pageSize: 10,
|
|
|
},
|
|
@@ -64,37 +71,41 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
filters: {
|
|
|
- auditStatusFilter(value) {// 认证状态:0审核未通过,1审核通过,2待审核
|
|
|
+ auditStatusFilter(value) {
|
|
|
+ // 认证状态:0审核未通过,1审核通过,2待审核
|
|
|
const map = {
|
|
|
- 0: '审核未通过',
|
|
|
- 1: '审核通过',
|
|
|
- 2: '待审核',
|
|
|
+ 0: '审核未通过',
|
|
|
+ 1: '审核通过',
|
|
|
+ 2: '待审核',
|
|
|
}
|
|
|
return map[value]
|
|
|
- }
|
|
|
- },
|
|
|
+ },
|
|
|
+ },
|
|
|
created() {
|
|
|
this.initData()
|
|
|
},
|
|
|
computed: {
|
|
|
- ...mapGetters(['supplierInfo', 'authUserId', 'routePrefix','authId']),
|
|
|
+ ...mapGetters(['supplierInfo', 'authUserId', 'routePrefix', 'authId']),
|
|
|
},
|
|
|
methods: {
|
|
|
toEdit(item) {
|
|
|
- this.$router.push(`${this.routePrefix}/record/device/detail?id=${item.productId}`)
|
|
|
+ this.$router.push(
|
|
|
+ `${this.routePrefix}/record/device/detail?id=${item.productId}`
|
|
|
+ )
|
|
|
},
|
|
|
initData() {
|
|
|
- this.listQuery.authId = this.authId
|
|
|
+ this.listQuery.authId = this.$route.query.authId
|
|
|
+ if(!this.listQuery.authId) return
|
|
|
this.authProductList()
|
|
|
},
|
|
|
// 获取机构列表
|
|
|
- async authProductList () {
|
|
|
+ async authProductList() {
|
|
|
try {
|
|
|
this.isLoadingMore = true
|
|
|
const res = await this.$http.api.getClubAuthProductList(this.listQuery)
|
|
|
this.total = res.data.total
|
|
|
this.list = [...this.list, ...res.data.list]
|
|
|
- this.finished = !res.data.hasNextPage
|
|
|
+ this.finished = !res.data.hasNextPage
|
|
|
this.isLoadingMore = false
|
|
|
this.listQuery.pageNum += 1
|
|
|
} catch (error) {
|
|
@@ -104,11 +115,12 @@ export default {
|
|
|
this.isRequest = false
|
|
|
}
|
|
|
},
|
|
|
- auditStatusColor(value) {// 认证状态:0 danger,1 success,2 warning
|
|
|
+ auditStatusColor(value) {
|
|
|
+ // 认证状态:0 danger,1 success,2 warning
|
|
|
const map = {
|
|
|
- 0: 'danger',
|
|
|
- 1: 'success',
|
|
|
- 2: 'warning',
|
|
|
+ 0: 'danger',
|
|
|
+ 1: 'success',
|
|
|
+ 2: 'warning',
|
|
|
}
|
|
|
return map[value]
|
|
|
},
|