This commit is contained in:
dhr
2025-09-06 14:37:46 +08:00
87 changed files with 7561 additions and 2061 deletions

View File

@ -24,22 +24,28 @@
<template #header>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['system:equipment:edit']"
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['gps:equipment:edit']"
>修改</el-button
>
</el-col>
<el-col :span="1.5">
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['system:equipment:remove']"
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['gps:equipment:remove']"
>删除</el-button
>
</el-col>
<el-col :span="1.8">
<el-button type="primary" plain icon="User" :disabled="single" @click="handleBindUser()" v-hasPermi="['system:equipment:bindUser']"
<el-button
type="primary"
plain
icon="User"
:disabled="single"
@click="handleBindUser()"
v-hasPermi="['gps:equipment:unbindManmachine', 'gps:equipment:bindManmachine']"
>绑定用户</el-button
>
</el-col>
<el-col :span="2">
<el-button type="primary" plain @click="handleViewAll" v-hasPermi="['system:equipment:view']">{{ viewAllButtonText }}</el-button>
<el-button type="primary" plain @click="handleViewAll">{{ viewAllButtonText }}</el-button>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
@ -91,13 +97,20 @@
type="primary"
icon="User"
@click="scope.row.type === 1 ? handleUnbindUser(scope.row) : handleBindUser(scope.row)"
v-hasPermi="['gps:equipment:bindUser']"
v-hasPermi="['gps:equipment:unbindManmachine', 'gps:equipment:bindManmachine']"
>
</el-button>
</el-tooltip>
<!-- 新增跳转空页面按钮 -->
<el-tooltip content="足迹" placement="top">
<el-button link type="primary" icon="Location" @click="handleGoToEmptyPage(scope.row.userId)"></el-button>
<el-button
link
type="primary"
icon="Location"
v-hasPermi="['gps:equipmentSon:getList']"
@click="handleGoToEmptyPage(scope.row.userId, scope.row.projectId, scope.row.clientId)"
:disabled="!scope.row.userId || !scope.row.projectId"
></el-button>
</el-tooltip>
<el-tooltip content="历史记录" placement="top">
<el-button link type="primary" icon="Clock" @click="handleOpenHistoryUser(scope.row.clientId, scope.row.userId)"> </el-button>
@ -465,9 +478,14 @@ const handleViewAll = () => {
getList();
};
const handleGoToEmptyPage = (userId: any) => {
const handleGoToEmptyPage = (userId: any, projectId: any, clientId: any) => {
router.push({
path: './equipmentGPS'
path: './equipmentGPS',
query: {
userId: userId,
projectId: projectId,
clientId: clientId
}
});
};