feat(权限): 为多个页面添加权限控制并更新路由ID
- 在多个视图组件中为按钮和操作添加 v-permission 指令,使用新的权限码
- 更新路由配置中的静态路由ID,与权限码保持一致
- 在认证存储中添加临时权限码列表,确保权限控制生效
- 修复操作工作台列表页面的权限检查逻辑
| | |
| | | icon: 'icon-park-outline:list-view', |
| | | menuType: 'page', |
| | | componentPath: '/testDemo/geofenceManagement/index.vue', |
| | | id: 93, |
| | | id: 202642974, |
| | | pid: 9, |
| | | }, |
| | | { |
| | |
| | | icon: 'icon-park-outline:list-view', |
| | | menuType: 'page', |
| | | componentPath: '/testDemo/geofenceManagement/detail.vue', |
| | | id: 95, |
| | | id: 202642975, |
| | | pid: 9, |
| | | hide: true, |
| | | fullScreen: true, |
| | |
| | | icon: 'icon-park-outline:list-view', |
| | | menuType: 'page', |
| | | componentPath: '/testDemo/geofenceManagement/detail.vue', |
| | | id: 96, |
| | | id: 202642976, |
| | | pid: 9, |
| | | hide: true, |
| | | fullScreen: true, |
| | |
| | | icon: 'icon-park-outline:file-text', |
| | | menuType: 'page', |
| | | componentPath: '/userContent/contentCenter/passenger.vue', |
| | | id: 3021, |
| | | id: 202642902, |
| | | keepAlive: false, |
| | | pid: 302, |
| | | fullScreen: true, |
| | |
| | | icon: 'icon-park-outline:file-text', |
| | | menuType: 'page', |
| | | componentPath: '/userContent/contentCenter/opsApp.vue', |
| | | id: 3024, |
| | | id: 202642904, |
| | | keepAlive: false, |
| | | pid: 302, |
| | | fullScreen: true, |
| | |
| | | icon: 'icon-park-outline:file-text', |
| | | menuType: 'page', |
| | | componentPath: '/userContent/active/activityManagement/index.vue', |
| | | id: 30232, |
| | | id: 202642909, |
| | | keepAlive: true, |
| | | pid: 3023, |
| | | }, |
| | |
| | | icon: 'icon-park-outline:alarm', |
| | | menuType: 'page', |
| | | componentPath: '/businessOperations/operationWorkbench/map.vue', |
| | | id: 4062, |
| | | id: 202642917, |
| | | keepAlive: false, |
| | | pid: 4, |
| | | // hide: true, |
| | |
| | | icon: 'icon-park-outline:alarm', |
| | | menuType: 'page', |
| | | componentPath: '/businessOperations/operationWorkbench/list.vue', |
| | | id: 40621, |
| | | id: 202642918, |
| | | keepAlive: true, |
| | | pid: 4, |
| | | hide: true, |
| | |
| | | icon: 'icon-park-outline:list-view', |
| | | menuType: 'page', |
| | | componentPath: '/businessOperations/siteInfo/index.vue', |
| | | id: 4062, |
| | | id: 202642935, |
| | | keepAlive: true, |
| | | pid: 4, |
| | | }, |
| | |
| | | icon: 'icon-park-outline:car', |
| | | menuType: 'page', |
| | | componentPath: '/assetManagement/vehicleModel/index.vue', |
| | | id: 504, |
| | | id: 202642939, |
| | | keepAlive: false, |
| | | pid: 5, |
| | | }, |
| | |
| | | icon: 'icon-park-outline:list-view', |
| | | menuType: 'page', |
| | | componentPath: '/transaction/directServiceManagement/index.vue', |
| | | id: 607, |
| | | id: 202642943, |
| | | keepAlive: true, |
| | | pid: 6, |
| | | }, |
| | |
| | | icon: 'icon-park-outline:list-view', |
| | | menuType: 'page', |
| | | componentPath: '/transaction/passwordFreeStrategy/index.vue', |
| | | id: 608, |
| | | id: 202642949, |
| | | keepAlive: true, |
| | | pid: 6, |
| | | }, |
| | |
| | | icon: 'icon-park-outline:list-view', |
| | | menuType: 'page', |
| | | componentPath: '/operations/taskOrder/taskOrderCenter/index.vue', |
| | | id: 7051, |
| | | id: 202642954, |
| | | keepAlive: true, |
| | | pid: 705, |
| | | }, |
| | |
| | | icon: 'icon-park-outline:list-view', |
| | | menuType: 'page', |
| | | componentPath: '/operations/taskOrder/pendingReassignment/index.vue', |
| | | id: 7052, |
| | | id: 202642955, |
| | | keepAlive: true, |
| | | pid: 705, |
| | | }, |
| | |
| | | icon: 'icon-park-outline:list-view', |
| | | menuType: 'page', |
| | | componentPath: '/operations/cruiseCheckInRule/index.vue', |
| | | id: 7062, |
| | | id: 202642960, |
| | | keepAlive: true, |
| | | pid: 7, |
| | | }, |
| | |
| | | icon: 'icon-park-outline:list-view', |
| | | menuType: 'page', |
| | | componentPath: '/operations/cruiseCheckInRule/add.vue', |
| | | id: 7063, |
| | | id: 202642961, |
| | | keepAlive: false, |
| | | pid: 7, |
| | | hide: true, // 不在菜单中显示 |
| | |
| | | icon: 'icon-park-outline:list-view', |
| | | menuType: 'dir', |
| | | componentPath: null, |
| | | id: 706, |
| | | id: 202642965, |
| | | keepAlive: true, |
| | | pid: 7, |
| | | }, |
| | |
| | | icon: 'icon-park-outline:list-view', |
| | | menuType: 'page', |
| | | componentPath: '/operations/cruiseCheckIn/index.vue', |
| | | id: 7061, |
| | | id: 202642966, |
| | | keepAlive: true, |
| | | pid: 706, |
| | | pid: 202642965, |
| | | }, |
| | | { |
| | | name: 'cruiseCheckInDetails', |
| | |
| | | icon: 'icon-park-outline:list-view', |
| | | menuType: 'page', |
| | | componentPath: '/operations/cruiseCheckInDetails/index.vue', |
| | | id: 7064, |
| | | id: 202642970, |
| | | keepAlive: true, |
| | | pid: 706, |
| | | pid: 202642965, |
| | | }, |
| | | { |
| | | name: 'cruiseCheckInDetailInfo', |
| | |
| | | icon: 'icon-park-outline:list-view', |
| | | menuType: 'page', |
| | | componentPath: '/operations/cruiseCheckInDetails/detail.vue', |
| | | id: 7065, |
| | | id: 202642971, |
| | | keepAlive: false, |
| | | pid: 706, |
| | | pid: 202642965, |
| | | hide: true, // 不在菜单中显示 |
| | | activeMenu: '/operations/cruiseCheckInManagement/cruiseCheckInDetails', |
| | | fullScreen: true, |
| | |
| | | icon: 'icon-park-outline:list-view', |
| | | menuType: 'page', |
| | | componentPath: '/operations/cruiseCheckInStatistics/index.vue', |
| | | id: 7066, |
| | | id: 202642973, |
| | | keepAlive: true, |
| | | pid: 706, |
| | | pid: 202642965, |
| | | }, |
| | | // 新增页面--任务工单 |
| | | { |
| | |
| | | import { useRouteStore } from './router' |
| | | import { useTabStore } from './tab' |
| | | |
| | | // 临时补充权限,待服务端正式下发后删除。 |
| | | const TEMP_PERMISSION_CODES = [ |
| | | '202642901', |
| | | '202642902', |
| | | '202642903', |
| | | '202642904', |
| | | '202642905', |
| | | '202642906', |
| | | '202642907', |
| | | '202642908', |
| | | '202642909', |
| | | '202642910', |
| | | '202642911', |
| | | '202642912', |
| | | '202642913', |
| | | '202642914', |
| | | '202642915', |
| | | '202642916', |
| | | '202642917', |
| | | '202642918', |
| | | '202642919', |
| | | '202642920', |
| | | '202642921', |
| | | '202642922', |
| | | '202642923', |
| | | '202642924', |
| | | '202642925', |
| | | '202642926', |
| | | '202642927', |
| | | '202642928', |
| | | '202642929', |
| | | '202642930', |
| | | '202642931', |
| | | '202642932', |
| | | '202642933', |
| | | '202642934', |
| | | '202642935', |
| | | '202642936', |
| | | '202642937', |
| | | '202642938', |
| | | '202642939', |
| | | '202642940', |
| | | '202642941', |
| | | '202642942', |
| | | '202642943', |
| | | '202642944', |
| | | '202642945', |
| | | '202642946', |
| | | '202642947', |
| | | '202642948', |
| | | '202642949', |
| | | '202642950', |
| | | '202642951', |
| | | '202642952', |
| | | '202642953', |
| | | '202642954', |
| | | '202642955', |
| | | '202642956', |
| | | '202642957', |
| | | '202642958', |
| | | '202642959', |
| | | '202642960', |
| | | '202642961', |
| | | '202642962', |
| | | '202642963', |
| | | '202642964', |
| | | '202642965', |
| | | '202642966', |
| | | '202642967', |
| | | '202642968', |
| | | '202642969', |
| | | '2026429691', |
| | | '202642970', |
| | | '202642971', |
| | | '202642972', |
| | | '202642973', |
| | | '202642974', |
| | | '202642975', |
| | | '202642976', |
| | | '202642977', |
| | | '202642978', |
| | | ] as const |
| | | |
| | | function mergeTempPermissions(permissions: string[] = []) { |
| | | return Array.from(new Set([...permissions.map(String), ...TEMP_PERMISSION_CODES])) |
| | | } |
| | | |
| | | interface AuthStatus { |
| | | userInfo: Entity.User | null |
| | | token: string |
| | |
| | | return { |
| | | userInfo: local.get('userInfo'), |
| | | token: local.get('accessToken') || '', |
| | | permissions: local.get('permissions') || [], |
| | | permissions: mergeTempPermissions(local.get('permissions') || []), |
| | | } |
| | | }, |
| | | getters: { |
| | |
| | | |
| | | /* 处理登录返回的数据 */ |
| | | async handleLoginInfo(data: Api.Login.Info) { |
| | | const permissions = mergeTempPermissions(data.info.permissions || []) |
| | | |
| | | // 将token和userInfo保存下来 |
| | | local.set('userInfo', data.info.sysUser) |
| | | local.set('accessToken', data.token.access_token) |
| | | local.set('permissions', data.info.permissions) |
| | | local.set('permissions', permissions) |
| | | this.token = data.token.access_token |
| | | this.userInfo = data.info.sysUser |
| | | this.permissions = data.info.permissions |
| | | this.permissions = permissions |
| | | |
| | | // 添加路由和菜单 |
| | | const routeStore = useRouteStore() |
| | |
| | | return ( |
| | | <NSpace wrap={false} size={8}> |
| | | <NButton |
| | | v-permission="202642941" |
| | | text |
| | | type="primary" |
| | | onClick={() => handleEdit(row)} |
| | |
| | | <NButton |
| | | text |
| | | type="primary" |
| | | v-permission="202642942" |
| | | onClick={() => handleDelete(row)} |
| | | > |
| | | 删除 |
| | |
| | | <NButton |
| | | type="primary" |
| | | secondary |
| | | v-permission="202642940" |
| | | @click="handleAdd" |
| | | > |
| | | 新增车型 |
| | |
| | | import { onBeforeRouteLeave, useRoute, useRouter } from 'vue-router' |
| | | import dayjs from 'dayjs' |
| | | import SearchPanel from '@/components/custom/SearchPanel.vue' |
| | | import { useBoolean } from '@/hooks' |
| | | import { useBoolean, usePermission } from '@/hooks' |
| | | import { copyFence, fetchEnabledOpenCityList, getFenceList } from '@/service/api/operations' |
| | | import { deletePoint, enableDisablePoint, exportPointExcel, fetchFenceAndStationAreaList, fetchPointPageList } from '@/service/api/point' |
| | | import { deleteStation, fetchStationListByElectronicId, fetchStationPageList, updateStationStatus } from '@/service/api/station' |
| | | import { useWorkbenchStore } from '@/store' |
| | | import { downloadFile } from '@/utils' |
| | | const { hasPermission } = usePermission() |
| | | |
| | | import sortDefault from '@/assets/geofence/sort1.png' |
| | | import sortAsc from '@/assets/geofence/sort2.png' |
| | | import sortDesc from '@/assets/geofence/sort3.png' |
| | |
| | | } |
| | | |
| | | function handlePointToDetail(row: any, type: 'detail' | 'edit') { |
| | | if(type==='detail' && !hasPermission('202642925')) |
| | | return |
| | | const context = buildWorkbenchMapContext('point', type, row) |
| | | workbenchStore.setListContext({ |
| | | tab: context.tab, |
| | |
| | | } |
| | | |
| | | function handleStationToMap(row: any, type: 'detail' | 'edit') { |
| | | if(type==='detail' && !hasPermission('202642931')) |
| | | return |
| | | const context = buildWorkbenchMapContext('station', type, row) |
| | | workbenchStore.setListContext({ |
| | | tab: context.tab, |
| | |
| | | render(row) { |
| | | return ( |
| | | <NSpace> |
| | | <NButton text type="primary" onClick={() => handleFenceToDetail(row, 'edit')}> |
| | | <NButton v-permission="202642921" text type="primary" onClick={() => handleFenceToDetail(row, 'edit')}> |
| | | 编辑 |
| | | </NButton> |
| | | <NButton text type="primary" disabled={row.status !== 3} onClick={() => handleFenceCopy(row)}> |
| | | <NButton v-permission="202642922" text type="primary" disabled={row.status !== 3} onClick={() => handleFenceCopy(row)}> |
| | | 复制 |
| | | </NButton> |
| | | </NSpace> |
| | |
| | | const isEnabled = Number(row.status) === 2 |
| | | return ( |
| | | <NSpace wrap={false}> |
| | | <NButton text type="primary" onClick={() => handleStationToMap(row, 'edit')}> |
| | | <NButton v-permission="202642930" text type="primary" onClick={() => handleStationToMap(row, 'edit')}> |
| | | 编辑 |
| | | </NButton> |
| | | {isEnabled |
| | | ? ( |
| | | <NButton text type="primary" onClick={() => handleStationDisable(row)}> |
| | | <NButton v-permission="202642933" text type="primary" onClick={() => handleStationDisable(row)}> |
| | | 停用 |
| | | </NButton> |
| | | ) |
| | | : ( |
| | | <NButton text type="primary" onClick={() => handleStationDelete(row)}> |
| | | <NButton v-permission="202642932" text type="primary" onClick={() => handleStationDelete(row)}> |
| | | 删除 |
| | | </NButton> |
| | | )} |
| | |
| | | const isEnabled = row.verificationStatus === 5 && row.operationStatus === 2 |
| | | return ( |
| | | <NSpace wrap={false}> |
| | | <NButton text type="primary" onClick={() => handlePointToDetail(row, 'edit')}> |
| | | <NButton v-permission="202642924" text type="primary" onClick={() => handlePointToDetail(row, 'edit')}> |
| | | 编辑 |
| | | </NButton> |
| | | {isEnabled |
| | | ? ( |
| | | <NButton text type="primary" onClick={() => handlePointEnableDisable(row)}> |
| | | <NButton v-permission="202642927" text type="primary" onClick={() => handlePointEnableDisable(row)}> |
| | | 停用 |
| | | </NButton> |
| | | ) |
| | | : ( |
| | | <NButton text type="primary" onClick={() => handlePointDelete(row)}> |
| | | <NButton v-permission="202642926" text type="primary" onClick={() => handlePointDelete(row)}> |
| | | 删除 |
| | | </NButton> |
| | | )} |
| | |
| | | 已选择{{ checkedRowKeys.length }}条记录 |
| | | </span> |
| | | <NButton |
| | | v-permission="202642928" |
| | | :disabled="checkedRowKeys.length === 0" |
| | | @click="handlePointBatchExport" |
| | | > |
| | |
| | | 已选择 {{ checkedRowKeys.length }} 条记录 |
| | | </span> |
| | | <NButton |
| | | v-permission="202642934" |
| | | :disabled="checkedRowKeys.length === 0" |
| | | @click="handleStationBatchExport" |
| | | > |
| | |
| | | </n-flex> |
| | | |
| | | <n-flex align="center"> |
| | | <NButton @click="handleBackToMap"> 查看地图视图 </NButton> |
| | | <NButton v-permission="202642919" @click="handleBackToMap"> 查看地图视图 </NButton> |
| | | <NButton |
| | | v-if="activeTab === 'fence'" |
| | | v-permission="202642920" |
| | | type="primary" |
| | | secondary |
| | | @click="handleCreate" |
| | |
| | | v-else-if="activeTab === 'point'" |
| | | type="primary" |
| | | secondary |
| | | v-permission="202642923" |
| | | @click="handleCreate" |
| | | > |
| | | 新建点位 |
| | |
| | | v-else-if="activeTab === 'station'" |
| | | trigger="hover" |
| | | :disabled="!stationCreateDisabledReason" |
| | | |
| | | > |
| | | <template #trigger> |
| | | <span> |
| | | <NButton |
| | | type="primary" |
| | | secondary |
| | | v-permission="202642929" |
| | | :disabled="!!stationCreateDisabledReason" |
| | | @click="handleCreate" |
| | | > |
| | |
| | | return ( |
| | | <NSpace wrap={false}> |
| | | <NButton |
| | | v-permission="202642937" |
| | | text |
| | | type="primary" |
| | | onClick={() => handleToDetail(row)} |
| | |
| | | 详情 |
| | | </NButton> |
| | | <NButton |
| | | text |
| | | type="primary" |
| | | v-permission="202642938" |
| | | text type="primary" |
| | | onClick={() => handleDelete(row)} |
| | | > |
| | | 删除 |
| | |
| | | <n-flex justify="space-between" align="center"> |
| | | <n-flex align="center"> |
| | | <span v-if="checkedRowKeys.length > 0" style="color: rgba(23, 31, 38, 0.6);font-weight: 400;">已选择{{ checkedRowKeys.length }}条记录</span> |
| | | <NButton :disabled="checkedRowKeys.length === 0" @click="handleBatchExport"> |
| | | <NButton v-permission="202642936" :disabled="checkedRowKeys.length === 0" @click="handleBatchExport"> |
| | | 批量导出 |
| | | </NButton> |
| | | </n-flex> |
| | |
| | | <div class="flex items-center justify-start gap-2"> |
| | | <span |
| | | class="cursor-pointer" |
| | | v-permission="202642968" |
| | | style={{ color: '#0068FF' }} |
| | | onClick={() => handleEdit(row)} |
| | | > |
| | |
| | | </span> |
| | | <span |
| | | class="cursor-pointer" |
| | | v-permission="202642969" |
| | | style={{ color: '#0068FF' }} |
| | | onClick={() => handleDelete(row)} |
| | | > |
| | | 删除 |
| | | </span> |
| | | <NSwitch |
| | | v-permission="70214" |
| | | v-permission="2026429691" |
| | | value={row.status} |
| | | checked-value={1} |
| | | unchecked-value={0} |
| | |
| | | <n-card class="flex-1 robotaxi-table-card"> |
| | | <template #header> |
| | | <n-flex justify="flex-end"> |
| | | <NButton type="primary" secondary @click="handleAdd"> |
| | | <NButton v-permission="202642967" type="primary" secondary @click="handleAdd"> |
| | | 新增巡游打卡地 |
| | | </NButton> |
| | | </n-flex> |
| | |
| | | <NButton |
| | | type="primary" |
| | | text |
| | | v-permission="202642971" |
| | | onClick={() => handleViewDetail(row)} |
| | | > |
| | | 详情 |
| | |
| | | <n-card class="flex-1 robotaxi-table-card"> |
| | | <template #header> |
| | | <n-flex justify="flex-end"> |
| | | <NButton type="primary" secondary @click="handleExport"> |
| | | <NButton v-permission="202642972" type="primary" secondary @click="handleExport"> |
| | | 导出 |
| | | </NButton> |
| | | </n-flex> |
| | |
| | | <div class="flex items-center justify-start gap-2"> |
| | | <span |
| | | class="cursor-pointer" |
| | | v-permission="202642963" |
| | | style={{ color: '#0068FF' }} |
| | | onClick={() => handleDetail(row)} |
| | | > |
| | |
| | | </span> |
| | | <span |
| | | class="cursor-pointer" |
| | | v-permission="202642964" |
| | | style={{ color: '#0068FF' }} |
| | | onClick={() => handleDelete(row)} |
| | | > |
| | |
| | | <n-card class="flex-1 robotaxi-table-card"> |
| | | <template #header> |
| | | <n-flex justify="flex-end"> |
| | | <NButton type="primary" secondary @click="handleAdd"> |
| | | <NButton v-permission="202642961" type="primary" secondary @click="handleAdd"> |
| | | 添加巡游打卡规则 |
| | | </NButton> |
| | | </n-flex> |
| | |
| | | <div class="flex items-center justify-start gap-2"> |
| | | <NButton |
| | | text |
| | | v-permission="202642956" |
| | | type="primary" |
| | | onClick={() => handleReassign(row)} |
| | | > |
| | |
| | | <div class="flex items-center justify-start gap-2"> |
| | | <NButton |
| | | text |
| | | v-permission="202642957" |
| | | type="primary" |
| | | onClick={() => handleDetail(row)} |
| | | > |
| | |
| | | </NButton> |
| | | <NButton |
| | | text |
| | | v-permission="202642958" |
| | | type="primary" |
| | | onClick={() => handleDelete(row)} |
| | | > |
| | |
| | | <template #header> |
| | | <n-flex justify="flex-end"> |
| | | <NButton |
| | | v-permission="202642959" |
| | | @click="handleExport" |
| | | > |
| | | 导出 |
| | |
| | | <script setup lang="tsx"> |
| | | import type { DataTableColumns } from 'naive-ui' |
| | | import { useBoolean } from '@/hooks' |
| | | import { useBoolean, usePermission } from '@/hooks' |
| | | import { copyFence, getFenceList } from '@/service/api/copyText' |
| | | import { NButton, NSpace, NTag, NTooltip } from 'naive-ui' |
| | | import SearchPanel from '@/components/custom/SearchPanel.vue' |
| | |
| | | import sortAsc from '@/assets/geofence/sort2.png' |
| | | import sortDesc from '@/assets/geofence/sort3.png' |
| | | import dayjs from 'dayjs' |
| | | const { hasPermission } = usePermission() |
| | | |
| | | const router = useRouter() |
| | | const dialog = useDialog() |
| | |
| | | color: '#0068FF', |
| | | cursor: 'pointer', |
| | | }, |
| | | onClick: () => router.push({ |
| | | onClick: () => hasPermission('202642978') && router.push({ |
| | | name: 'testDemoGeofenceDetail', |
| | | query: { |
| | | id: row.id, |
| | |
| | | <NSpace> |
| | | <NButton |
| | | text |
| | | v-permission="405" |
| | | v-permission="202642976" |
| | | type="primary" |
| | | onClick={() => handleToDetail(row, 'edit')} |
| | | > |
| | |
| | | </NButton> |
| | | <NButton |
| | | text |
| | | v-permission="403" |
| | | v-permission="202642977" |
| | | type="primary" |
| | | disabled={row.status !== 3} |
| | | onClick={() => { |
| | |
| | | |
| | | <n-card class="flex-1 robotaxi-table-card"> |
| | | <template #header> |
| | | <n-flex v-permission="404" justify="flex-end"> |
| | | <n-flex v-permission="202642975" justify="flex-end"> |
| | | <NButton type="primary" secondary @click="handleToDetail({}, 'add')"> |
| | | 新建围栏 |
| | | </NButton> |
| | |
| | | <div class="text-xl font-semibold"> |
| | | 定向服务详情 |
| | | </div> |
| | | <NButton type="primary" secondary class="w-84px" @click="handleEdit"> |
| | | <NButton v-permission="202642945" type="primary" secondary class="w-84px" @click="handleEdit"> |
| | | 编辑 |
| | | </NButton> |
| | | </div> |
| | |
| | | <div class="flex items-center justify-start gap-2"> |
| | | <NButton |
| | | text |
| | | v-permission="60701" |
| | | v-permission="202642946" |
| | | type="primary" |
| | | onClick={() => handleDetail(row)} |
| | | > |
| | |
| | | </NButton> |
| | | <NButton |
| | | text |
| | | v-permission="60703" |
| | | v-permission="202642947" |
| | | type="primary" |
| | | onClick={() => handleDelete(row)} |
| | | > |
| | | 删除 |
| | | </NButton> |
| | | <NSwitch |
| | | v-permission="60704" |
| | | v-permission="202642948" |
| | | value={isEnabled} |
| | | onUpdateValue={val => handleToggleStatus(row, val)} |
| | | > |
| | |
| | | <template #header> |
| | | <n-flex justify="flex-end"> |
| | | <NButton |
| | | v-permission="60702" |
| | | v-permission="202642944" |
| | | secondary |
| | | type="primary" |
| | | @click="handleAdd" |
| | |
| | | <div class="flex items-center justify-start gap-2"> |
| | | <NButton |
| | | text |
| | | v-permission="202642951" |
| | | type="primary" |
| | | onClick={() => handleEdit(row)} |
| | | > |
| | |
| | | </NButton> |
| | | <NButton |
| | | text |
| | | v-permission="202642952" |
| | | type="primary" |
| | | onClick={() => handleDetail(row)} |
| | | > |
| | |
| | | </NButton> |
| | | <NButton |
| | | text |
| | | v-permission="202642953" |
| | | type="primary" |
| | | onClick={() => handleDelete(row)} |
| | | > |
| | |
| | | <n-flex justify="flex-end"> |
| | | <NButton |
| | | secondary |
| | | v-permission="202642951" |
| | | type="primary" |
| | | @click="handleAdd" |
| | | > |
| | |
| | | render: (row) => { |
| | | const btns = [] |
| | | if (Number(row.status) === 1) { |
| | | btns.push(<NButton text type="primary" onClick={() => handlePublish(row)}>发布</NButton>) |
| | | btns.push(<NButton text type="primary" onClick={() => handleDetail(row)}>详情</NButton>) |
| | | btns.push(<NButton text type="primary" onClick={() => handleEdit(row)}>编辑</NButton>) |
| | | btns.push(<NButton text type="primary" onClick={() => handleDelete(row)}>删除</NButton>) |
| | | btns.push(<NButton v-permission="202642914" text type="primary" onClick={() => handlePublish(row)}>发布</NButton>) |
| | | btns.push(<NButton v-permission="202642912" text type="primary" onClick={() => handleDetail(row)}>详情</NButton>) |
| | | btns.push(<NButton v-permission="202642911" text type="primary" onClick={() => handleEdit(row)}>编辑</NButton>) |
| | | btns.push(<NButton v-permission="202642913" text type="primary" onClick={() => handleDelete(row)}>删除</NButton>) |
| | | } |
| | | else if (Number(row.status) === 2) { |
| | | btns.push(<NButton text type="primary" onClick={() => handleDetail(row)}>详情</NButton>) |
| | | btns.push(<NButton text type="primary" onClick={() => handlePause(row)}>暂停活动</NButton>) |
| | | btns.push(<NButton v-permission="202642912" text type="primary" onClick={() => handleDetail(row)}>详情</NButton>) |
| | | btns.push(<NButton v-permission="202642915" text type="primary" onClick={() => handlePause(row)}>暂停活动</NButton>) |
| | | } |
| | | else if (Number(row.status) === 4) { |
| | | btns.push(<NButton text type="primary" onClick={() => handleDetail(row)}>详情</NButton>) |
| | | btns.push(<NButton text type="primary" onClick={() => handleResume(row)}>恢复活动</NButton>) |
| | | btns.push(<NButton text type="primary" onClick={() => handleStop(row)}>终止活动</NButton>) |
| | | btns.push(<NButton v-permission="202642912" text type="primary" onClick={() => handleDetail(row)}>详情</NButton>) |
| | | btns.push(<NButton v-permission="202642915" text type="primary" onClick={() => handleResume(row)}>恢复活动</NButton>) |
| | | btns.push(<NButton v-permission="202642916" text type="primary" onClick={() => handleStop(row)}>终止活动</NButton>) |
| | | } |
| | | else if (Number(row.status) === 3) { |
| | | btns.push(<NButton text type="primary" onClick={() => handleDetail(row)}>详情</NButton>) |
| | | btns.push(<NButton text type="primary" onClick={() => handleDelete(row)}>删除</NButton>) |
| | | btns.push(<NButton v-permission="202642912" text type="primary" onClick={() => handleDetail(row)}>详情</NButton>) |
| | | btns.push(<NButton v-permission="202642913" text type="primary" onClick={() => handleDelete(row)}>删除</NButton>) |
| | | } |
| | | else { |
| | | btns.push(<NButton text type="primary" onClick={() => handleDetail(row)}>详情</NButton>) |
| | | btns.push(<NButton v-permission="202642912" text type="primary" onClick={() => handleDetail(row)}>详情</NButton>) |
| | | } |
| | | return <NSpace size={8}>{btns}</NSpace> |
| | | }, |
| | |
| | | <n-card class="flex-1 robotaxi-table-card"> |
| | | <template #header> |
| | | <n-flex justify="flex-end"> |
| | | <NButton type="primary" secondary @click="handleAdd"> |
| | | <NButton v-permission="202642910" type="primary" secondary @click="handleAdd"> |
| | | 添加活动 |
| | | </NButton> |
| | | </n-flex> |
| | |
| | | <NButton text type="primary" v-permission="302314" onClick={() => handleDetail(row)}> |
| | | 详情 |
| | | </NButton> |
| | | <NButton text type="primary" v-permission="202642906" onClick={() => {}}> |
| | | 发布 |
| | | </NButton> |
| | | <NButton text type="primary" v-permission="202642907" onClick={() => {}}> |
| | | 作废 |
| | | </NButton> |
| | | <NButton text type="primary" v-permission="202642908" onClick={() => {}}> |
| | | 暂停 |
| | | </NButton> |
| | | <NButton text type="primary" v-permission="302315" onClick={() => handleDelete(row)}> |
| | | 删除 |
| | | </NButton> |
| | |
| | | <n-button style="padding: 8px 24px; border-radius: 4px; font-size: 14px;margin-right: 12px;" @click="handleCancel"> |
| | | 取消 |
| | | </n-button> |
| | | <n-button type="primary" style="padding: 8px 24px; border-radius: 4px; font-size: 14px;" @click="handleSave"> |
| | | <n-button v-permission="202642905" type="primary" style="padding: 8px 24px; border-radius: 4px; font-size: 14px;" @click="handleSave"> |
| | | 保存 |
| | | </n-button> |
| | | </div> |
| | |
| | | <n-button style="padding: 8px 24px; border-radius: 4px; font-size: 14px;margin-right: 12px;" @click="handleCancel"> |
| | | 取消 |
| | | </n-button> |
| | | <n-button type="primary" style="padding: 8px 24px; border-radius: 4px; font-size: 14px;" @click="handleSave"> |
| | | <n-button v-permission="202642903" type="primary" style="padding: 8px 24px; border-radius: 4px; font-size: 14px;" @click="handleSave"> |
| | | 保存 |
| | | </n-button> |
| | | </div> |
| | |
| | | <div class="flex justify-start gap-3"> |
| | | {/* v-permission="20264901" */} |
| | | <span |
| | | v-permission="20264901" |
| | | style={{ color: '#0068FF', cursor: 'pointer' }} |
| | | onClick={() => handleDetail(row)} |
| | | > |