前端相关界面完善 新增APP设备录入功能
This commit is contained in:
parent
1091eebec7
commit
d79df5d5b7
32
src/components/Business/Device/DeviceLink.vue
Normal file
32
src/components/Business/Device/DeviceLink.vue
Normal file
|
@ -0,0 +1,32 @@
|
|||
<template>
|
||||
<base-link :id="id" :text="text" :size="size" @click="handleClick" :permissions="['bst:device:query']"/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import BaseLink from "@/components/BaseLink/index.vue";
|
||||
export default {
|
||||
name: 'DeviceLink',
|
||||
components: {BaseLink},
|
||||
props: {
|
||||
id: {
|
||||
type: String,
|
||||
default: null
|
||||
},
|
||||
text: {
|
||||
type: String,
|
||||
default: null,
|
||||
},
|
||||
size: {
|
||||
type: String,
|
||||
default: "small"
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleClick() {
|
||||
if (this.id != null && this.checkPermi(['bst:device:query'])) {
|
||||
this.$router.push(`/view/device/${this.id}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
|
@ -80,7 +80,14 @@
|
|||
<user-link :id="d.row.userId" :text="d.row.userName" size="mini"/>
|
||||
</template>
|
||||
<template v-else-if="column.key === 'deviceName'">
|
||||
<dict-tag :options="dict.type.device_bind_type" :value="d.row[column.key]"/>
|
||||
<div v-if="d.row.deviceName != null">
|
||||
<i class="el-icon-s-opportunity"/>
|
||||
<device-link
|
||||
:id="d.row.deviceId"
|
||||
:text="d.row.deviceName"
|
||||
size="mini"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
{{d.row[column.key]}}
|
||||
|
@ -144,6 +151,8 @@ import { listBindRecord, getBindRecord, delBindRecord, addBindRecord, updateBind
|
|||
import { $showColumns } from '@/utils/mixins';
|
||||
import FormCol from "@/components/FormCol/index.vue";
|
||||
import UserLink from "@/views/system/user/UserLink.vue";
|
||||
import DeviceLink from "@/components/Business/Device/DeviceLink.vue";
|
||||
import StoreLink from "@/views/bst/store/StoreLink.vue";
|
||||
|
||||
// 默认排序字段
|
||||
const defaultSort = {
|
||||
|
@ -161,7 +170,7 @@ export default {
|
|||
default: () => ({})
|
||||
}
|
||||
},
|
||||
components: {UserLink, FormCol},
|
||||
components: {StoreLink, DeviceLink, UserLink, FormCol},
|
||||
data() {
|
||||
return {
|
||||
span: 24,
|
||||
|
|
|
@ -1,31 +0,0 @@
|
|||
<template>
|
||||
<el-link type="primary" @click="handleClick" :disabled="id == null">{{name | defaultValue}}</el-link>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { UserType } from '@/utils/constants'
|
||||
|
||||
export default {
|
||||
name: 'StoreLink',
|
||||
props: {
|
||||
id: {
|
||||
type: [Number,String],
|
||||
default: null
|
||||
},
|
||||
name: {
|
||||
type: String,
|
||||
default: null,
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
handleClick() {
|
||||
this.$emit('click');
|
||||
if (this.$store.getters.userType === UserType.APP) {
|
||||
this.$router.push(`/business/store/${this.id}`)
|
||||
} else {
|
||||
this.$router.push(`/view/store/${this.id}`)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
|
@ -111,6 +111,12 @@
|
|||
<user-link :id="d.row.userId" :text="d.row.phoneNumber" size="mini"/>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else-if="column.key === 'storeName'">
|
||||
<div v-if="d.row.storeName != null">
|
||||
<i class="el-icon-takeaway-box"/>
|
||||
<store-link :id="d.row.storeId" :name="d.row.storeName" size="mini"/>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else-if="column.key === 'payAmount'">
|
||||
<div>
|
||||
<el-row :gutter="8">
|
||||
|
@ -185,6 +191,8 @@ import UserLink from "@/views/system/user/UserLink.vue";
|
|||
import CollapsePanel from "@/components/CollapsePanel/index.vue";
|
||||
import {OrderStatus} from "@/utils/enums";
|
||||
import OrderRefundDialog from "@/views/bst/order/components/OrderRefundDialog.vue";
|
||||
import Store from "@/views/bst/store/index.vue";
|
||||
import StoreLink from "@/views/bst/store/StoreLink.vue";
|
||||
|
||||
// 默认排序字段
|
||||
const defaultSort = {
|
||||
|
@ -207,7 +215,7 @@ export default {
|
|||
default: () => ({})
|
||||
}
|
||||
},
|
||||
components: {CollapsePanel, UserLink, FormCol, OrderRefundDialog},
|
||||
components: {StoreLink, Store, CollapsePanel, UserLink, FormCol, OrderRefundDialog},
|
||||
data() {
|
||||
return {
|
||||
span: 24,
|
||||
|
@ -246,7 +254,17 @@ export default {
|
|||
{
|
||||
key: 'userName',
|
||||
visible: true,
|
||||
label: '用户',
|
||||
label: '下单用户',
|
||||
minWidth: null,
|
||||
sortable: true,
|
||||
overflow: false,
|
||||
align: 'center',
|
||||
width: '200'
|
||||
},
|
||||
{
|
||||
key: 'storeName',
|
||||
visible: true,
|
||||
label: '下单店铺',
|
||||
minWidth: null,
|
||||
sortable: true,
|
||||
overflow: false,
|
||||
|
|
|
@ -95,6 +95,10 @@
|
|||
<i class="el-icon-takeaway-box"/>
|
||||
<store-link :id="d.row.storeId" :name="d.row.storeName" />
|
||||
</template>
|
||||
<template v-else-if="column.key === 'creator'">
|
||||
<i class="el-icon-user"/>
|
||||
<user-link :id="d.row.createId" :text="d.row.creator" />
|
||||
</template>
|
||||
<template v-else>
|
||||
{{d.row[column.key]}}
|
||||
</template>
|
||||
|
@ -177,6 +181,7 @@ import FormCol from "@/components/FormCol/index.vue";
|
|||
import {listStore} from "@/api/bst/store";
|
||||
import UserLink from "@/views/system/user/UserLink.vue";
|
||||
import StoreLink from "@/views/bst/store/StoreLink.vue";
|
||||
import User from "@/views/system/user/index.vue";
|
||||
|
||||
// 默认排序字段
|
||||
const defaultSort = {
|
||||
|
@ -187,7 +192,7 @@ const defaultSort = {
|
|||
export default {
|
||||
name: "StoreStaff",
|
||||
mixins: [$showColumns],
|
||||
components: {StoreLink, UserLink, FormCol},
|
||||
components: {User, StoreLink, UserLink, FormCol},
|
||||
dicts: ['store_staff_permission'],
|
||||
data() {
|
||||
return {
|
||||
|
|
Loading…
Reference in New Issue
Block a user