车辆列表
导航栏
This commit is contained in:
parent
eefead233d
commit
26bb86f7ec
|
@ -6,17 +6,10 @@
|
||||||
<top-nav id="topmenu-container" class="topmenu-container" v-if="topNav"/>
|
<top-nav id="topmenu-container" class="topmenu-container" v-if="topNav"/>
|
||||||
|
|
||||||
<div class="right-menu">
|
<div class="right-menu">
|
||||||
|
<span class="dept-name">{{name}}--{{userTypeText}}</span>
|
||||||
<template v-if="device!=='mobile'">
|
<template v-if="device!=='mobile'">
|
||||||
<search id="header-search" class="right-menu-item" />
|
<search id="header-search" class="right-menu-item" />
|
||||||
|
|
||||||
<el-tooltip content="源码地址" effect="dark" placement="bottom">
|
|
||||||
<ruo-yi-git id="ruoyi-git" class="right-menu-item hover-effect" />
|
|
||||||
</el-tooltip>
|
|
||||||
|
|
||||||
<el-tooltip content="文档地址" effect="dark" placement="bottom">
|
|
||||||
<ruo-yi-doc id="ruoyi-doc" class="right-menu-item hover-effect" />
|
|
||||||
</el-tooltip>
|
|
||||||
|
|
||||||
<screenfull id="screenfull" class="right-menu-item hover-effect" />
|
<screenfull id="screenfull" class="right-menu-item hover-effect" />
|
||||||
|
|
||||||
<el-tooltip content="布局大小" effect="dark" placement="bottom">
|
<el-tooltip content="布局大小" effect="dark" placement="bottom">
|
||||||
|
@ -58,6 +51,10 @@ import RuoYiGit from '@/components/RuoYi/Git'
|
||||||
import RuoYiDoc from '@/components/RuoYi/Doc'
|
import RuoYiDoc from '@/components/RuoYi/Doc'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
props: {
|
||||||
|
name: String,
|
||||||
|
userType: String
|
||||||
|
},
|
||||||
components: {
|
components: {
|
||||||
Breadcrumb,
|
Breadcrumb,
|
||||||
TopNav,
|
TopNav,
|
||||||
|
@ -69,9 +66,22 @@ export default {
|
||||||
RuoYiDoc
|
RuoYiDoc
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
userTypeText() {
|
||||||
|
const userTypeMap = {
|
||||||
|
"00": "系统用户(未分配)",
|
||||||
|
"01": "普通用户",
|
||||||
|
"02": "代理商",
|
||||||
|
"03": "商户",
|
||||||
|
"04": "配送员",
|
||||||
|
"09": "超级管理员"
|
||||||
|
};
|
||||||
|
return userTypeMap[this.userType] || "未知类型";
|
||||||
|
},
|
||||||
...mapGetters([
|
...mapGetters([
|
||||||
'sidebar',
|
'sidebar',
|
||||||
'avatar',
|
'avatar',
|
||||||
|
'userType',
|
||||||
|
'name',
|
||||||
'device'
|
'device'
|
||||||
]),
|
]),
|
||||||
setting: {
|
setting: {
|
||||||
|
@ -146,10 +156,17 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
.right-menu {
|
.right-menu {
|
||||||
|
display: flex;
|
||||||
|
align-items: center; /* 垂直居中对齐 */
|
||||||
float: right;
|
float: right;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
line-height: 50px;
|
line-height: 50px;
|
||||||
|
|
||||||
|
.dept-name {
|
||||||
|
font-size: 14px;
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
&:focus {
|
&:focus {
|
||||||
outline: none;
|
outline: none;
|
||||||
}
|
}
|
||||||
|
|
|
@ -176,6 +176,48 @@ export const dynamicRoutes = [
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/system/commandLog',
|
||||||
|
component: Layout,
|
||||||
|
hidden: true,
|
||||||
|
permissions: ['system:commandLog:query'],
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: 'index/:sn',
|
||||||
|
component: () => import('@/views/system/commandLog'),
|
||||||
|
name: 'Data',
|
||||||
|
meta: { title: '命令日志', activeMenu: '/system/commandLog' }
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/system/commandLog/orderNo',
|
||||||
|
component: Layout,
|
||||||
|
hidden: true,
|
||||||
|
permissions: ['system:commandLog:query'],
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: 'index/:orderNo',
|
||||||
|
component: () => import('@/views/system/commandLog'),
|
||||||
|
name: 'Data',
|
||||||
|
meta: { title: '命令日志', activeMenu: '/system/commandLog' }
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/system/locationLog',
|
||||||
|
component: Layout,
|
||||||
|
hidden: true,
|
||||||
|
permissions: ['system:locationLog:query'],
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: 'index/:mac',
|
||||||
|
component: () => import('@/views/system/locationLog'),
|
||||||
|
name: 'Data',
|
||||||
|
meta: { title: '定位日志', activeMenu: '/system/locationLog' }
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: '/tool/gen-edit',
|
path: '/tool/gen-edit',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
|
|
|
@ -7,6 +7,7 @@ const getters = {
|
||||||
cachedViews: state => state.tagsView.cachedViews,
|
cachedViews: state => state.tagsView.cachedViews,
|
||||||
token: state => state.user.token,
|
token: state => state.user.token,
|
||||||
avatar: state => state.user.avatar,
|
avatar: state => state.user.avatar,
|
||||||
|
userType: state => state.user.userType,
|
||||||
name: state => state.user.name,
|
name: state => state.user.name,
|
||||||
introduction: state => state.user.introduction,
|
introduction: state => state.user.introduction,
|
||||||
roles: state => state.user.roles,
|
roles: state => state.user.roles,
|
||||||
|
|
|
@ -7,6 +7,7 @@ const user = {
|
||||||
id: '',
|
id: '',
|
||||||
name: '',
|
name: '',
|
||||||
avatar: '',
|
avatar: '',
|
||||||
|
userType: '',
|
||||||
roles: [],
|
roles: [],
|
||||||
permissions: []
|
permissions: []
|
||||||
},
|
},
|
||||||
|
@ -24,6 +25,9 @@ const user = {
|
||||||
SET_AVATAR: (state, avatar) => {
|
SET_AVATAR: (state, avatar) => {
|
||||||
state.avatar = avatar
|
state.avatar = avatar
|
||||||
},
|
},
|
||||||
|
SET_USERTYPE: (state, userType) => {
|
||||||
|
state.userType = userType
|
||||||
|
},
|
||||||
SET_ROLES: (state, roles) => {
|
SET_ROLES: (state, roles) => {
|
||||||
state.roles = roles
|
state.roles = roles
|
||||||
},
|
},
|
||||||
|
@ -65,6 +69,7 @@ const user = {
|
||||||
commit('SET_ID', user.userId)
|
commit('SET_ID', user.userId)
|
||||||
commit('SET_NAME', user.userName)
|
commit('SET_NAME', user.userName)
|
||||||
commit('SET_AVATAR', avatar)
|
commit('SET_AVATAR', avatar)
|
||||||
|
commit('SET_USERTYPE', user.userType)
|
||||||
resolve(res)
|
resolve(res)
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
reject(error)
|
reject(error)
|
||||||
|
|
|
@ -99,6 +99,66 @@
|
||||||
v-hasPermi="['system:device:edit']"
|
v-hasPermi="['system:device:edit']"
|
||||||
>修改</el-button>
|
>修改</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="success"
|
||||||
|
plain
|
||||||
|
icon="el-icon-unlock"
|
||||||
|
size="mini"
|
||||||
|
:disabled="multiple"
|
||||||
|
@click="oneClickOnline"
|
||||||
|
v-hasPermi="['system:device:edit']"
|
||||||
|
>一键解禁</el-button
|
||||||
|
>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="info"
|
||||||
|
plain
|
||||||
|
icon="el-icon-lock"
|
||||||
|
size="mini"
|
||||||
|
:disabled="multiple"
|
||||||
|
@click="oneClickOffline"
|
||||||
|
v-hasPermi="['system:device:edit']"
|
||||||
|
>一键禁用</el-button
|
||||||
|
>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="el-icon-upload"
|
||||||
|
size="mini"
|
||||||
|
:disabled="multiple"
|
||||||
|
@click="oneClickListing"
|
||||||
|
v-hasPermi="['system:device:edit']"
|
||||||
|
>一键出仓</el-button
|
||||||
|
>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="info"
|
||||||
|
plain
|
||||||
|
icon="el-icon-download"
|
||||||
|
size="mini"
|
||||||
|
:disabled="multiple"
|
||||||
|
@click="oneClickWarehousing"
|
||||||
|
v-hasPermi="['system:device:edit']"
|
||||||
|
>一键入仓</el-button
|
||||||
|
>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="el-icon-refresh"
|
||||||
|
size="mini"
|
||||||
|
:disabled="multiple"
|
||||||
|
@click="refresh"
|
||||||
|
v-hasPermi="['system:device:edit']"
|
||||||
|
>更新</el-button
|
||||||
|
>
|
||||||
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
type="danger"
|
type="danger"
|
||||||
|
@ -251,22 +311,6 @@
|
||||||
@click="refresh(scope.row)"
|
@click="refresh(scope.row)"
|
||||||
v-hasPermi="['system:device:refresh']"
|
v-hasPermi="['system:device:refresh']"
|
||||||
>更新</el-button>
|
>更新</el-button>
|
||||||
<el-button
|
|
||||||
size="mini"
|
|
||||||
type="text"
|
|
||||||
icon="el-icon-refresh"
|
|
||||||
@click="refresh(scope.row)"
|
|
||||||
v-hasPermi="['system:device:refresh']"
|
|
||||||
v-if="scope.row.status==0"
|
|
||||||
>上架</el-button>
|
|
||||||
<el-button
|
|
||||||
size="mini"
|
|
||||||
type="text"
|
|
||||||
icon="el-icon-refresh"
|
|
||||||
@click="refresh(scope.row)"
|
|
||||||
v-hasPermi="['system:device:refresh']"
|
|
||||||
v-else
|
|
||||||
>下架</el-button>
|
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
|
@ -625,6 +669,40 @@ export default {
|
||||||
// this.$eventBus.$off('close-all-dialogs', this.closeDialog);
|
// this.$eventBus.$off('close-all-dialogs', this.closeDialog);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleUnlocking(row) {
|
||||||
|
this.reset();
|
||||||
|
const deviceId = row.deviceId || this.ids;
|
||||||
|
getDevice(deviceId).then((response) => {
|
||||||
|
let form1 = response.data;
|
||||||
|
this.$modal
|
||||||
|
.confirm("是否确认开锁吗?")
|
||||||
|
.then(function () {
|
||||||
|
return handleUnlocking(form1);
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("操作成功");
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleLock(row) {
|
||||||
|
this.reset();
|
||||||
|
const deviceId = row.deviceId || this.ids;
|
||||||
|
getDevice(deviceId).then((response) => {
|
||||||
|
let form1 = response.data;
|
||||||
|
this.$modal
|
||||||
|
.confirm("是否确认关锁吗?")
|
||||||
|
.then(function () {
|
||||||
|
return handleLock(form1);
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("操作成功");
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
|
});
|
||||||
|
},
|
||||||
getlistModel() {
|
getlistModel() {
|
||||||
let data = {
|
let data = {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
|
@ -871,6 +949,26 @@ export default {
|
||||||
// this.areaOptions = response.rows;
|
// this.areaOptions = response.rows;
|
||||||
// });
|
// });
|
||||||
},
|
},
|
||||||
|
handleOnline(row) {
|
||||||
|
this.reset();
|
||||||
|
const deviceId = row.deviceId || this.ids;
|
||||||
|
getDevice(deviceId).then((response) => {
|
||||||
|
let form1 = response.data;
|
||||||
|
let text = form1.status === "8" ? "解禁" : "禁用";
|
||||||
|
form1.status = form1.status === "8" ? "1" : "8";
|
||||||
|
this.$modal.confirm(
|
||||||
|
"是否确认" + text + '设备MAC为"' + form1.mac + '"的设备吗?'
|
||||||
|
)
|
||||||
|
.then(function () {
|
||||||
|
return updateDevice(form1);
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("操作成功");
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
|
});
|
||||||
|
},
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
this.queryParams.pageNum = 1;
|
this.queryParams.pageNum = 1;
|
||||||
|
|
|
@ -48,38 +48,38 @@
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<!-- <el-col :span="1.5">-->
|
||||||
<el-button
|
<!-- <el-button-->
|
||||||
type="primary"
|
<!-- type="primary"-->
|
||||||
plain
|
<!-- plain-->
|
||||||
icon="el-icon-plus"
|
<!-- icon="el-icon-plus"-->
|
||||||
size="mini"
|
<!-- size="mini"-->
|
||||||
@click="handleAdd"
|
<!-- @click="handleAdd"-->
|
||||||
v-hasPermi="['system:orderOper:add']"
|
<!-- v-hasPermi="['system:orderOper:add']"-->
|
||||||
>新增</el-button>
|
<!-- >新增</el-button>-->
|
||||||
</el-col>
|
<!-- </el-col>-->
|
||||||
<el-col :span="1.5">
|
<!-- <el-col :span="1.5">-->
|
||||||
<el-button
|
<!-- <el-button-->
|
||||||
type="success"
|
<!-- type="success"-->
|
||||||
plain
|
<!-- plain-->
|
||||||
icon="el-icon-edit"
|
<!-- icon="el-icon-edit"-->
|
||||||
size="mini"
|
<!-- size="mini"-->
|
||||||
:disabled="single"
|
<!-- :disabled="single"-->
|
||||||
@click="handleUpdate"
|
<!-- @click="handleUpdate"-->
|
||||||
v-hasPermi="['system:orderOper:edit']"
|
<!-- v-hasPermi="['system:orderOper:edit']"-->
|
||||||
>修改</el-button>
|
<!-- >修改</el-button>-->
|
||||||
</el-col>
|
<!-- </el-col>-->
|
||||||
<el-col :span="1.5">
|
<!-- <el-col :span="1.5">-->
|
||||||
<el-button
|
<!-- <el-button-->
|
||||||
type="danger"
|
<!-- type="danger"-->
|
||||||
plain
|
<!-- plain-->
|
||||||
icon="el-icon-delete"
|
<!-- icon="el-icon-delete"-->
|
||||||
size="mini"
|
<!-- size="mini"-->
|
||||||
:disabled="multiple"
|
<!-- :disabled="multiple"-->
|
||||||
@click="handleDelete"
|
<!-- @click="handleDelete"-->
|
||||||
v-hasPermi="['system:orderOper:remove']"
|
<!-- v-hasPermi="['system:orderOper:remove']"-->
|
||||||
>删除</el-button>
|
<!-- >删除</el-button>-->
|
||||||
</el-col>
|
<!-- </el-col>-->
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
type="warning"
|
type="warning"
|
||||||
|
@ -116,24 +116,24 @@
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作人" align="center" prop="operPhone" />
|
<el-table-column label="操作人" align="center" prop="operPhone" />
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">-->
|
||||||
<template slot-scope="scope">
|
<!-- <template slot-scope="scope">-->
|
||||||
<el-button
|
<!-- <el-button-->
|
||||||
size="mini"
|
<!-- size="mini"-->
|
||||||
type="text"
|
<!-- type="text"-->
|
||||||
icon="el-icon-edit"
|
<!-- icon="el-icon-edit"-->
|
||||||
@click="handleUpdate(scope.row)"
|
<!-- @click="handleUpdate(scope.row)"-->
|
||||||
v-hasPermi="['system:orderOper:edit']"
|
<!-- v-hasPermi="['system:orderOper:edit']"-->
|
||||||
>修改</el-button>
|
<!-- >修改</el-button>-->
|
||||||
<el-button
|
<!-- <el-button-->
|
||||||
size="mini"
|
<!-- size="mini"-->
|
||||||
type="text"
|
<!-- type="text"-->
|
||||||
icon="el-icon-delete"
|
<!-- icon="el-icon-delete"-->
|
||||||
@click="handleDelete(scope.row)"
|
<!-- @click="handleDelete(scope.row)"-->
|
||||||
v-hasPermi="['system:orderOper:remove']"
|
<!-- v-hasPermi="['system:orderOper:remove']"-->
|
||||||
>删除</el-button>
|
<!-- >删除</el-button>-->
|
||||||
</template>
|
<!-- </template>-->
|
||||||
</el-table-column>
|
<!-- </el-table-column>-->
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<pagination
|
<pagination
|
||||||
|
|
Loading…
Reference in New Issue
Block a user