| | |
| | | return status === '待生效' || status === '启用中' |
| | | }) |
| | | |
| | | const isPointEditMarkerDraggable = computed(() => { |
| | | return pointCreateMode.value && !isPointEditLocationLocked.value |
| | | }) |
| | | |
| | | function clampNumber(value: number, min: number, max: number) { |
| | | return Math.max(min, Math.min(max, value)) |
| | | } |
| | |
| | | updatePickedPoint([lon, lat], true) |
| | | } |
| | | |
| | | // 编辑态地图上只保留一个蓝色临时点位,拖拽、点击和删除都挂在这个 marker 上。 |
| | | // 地图上只保留一个蓝色临时点位,点击和删除都挂在这个 marker 上。 |
| | | // 仅新增点位时允许拖拽调整位置;编辑已有点位时禁止直接拖动。 |
| | | function createOrUpdatePointEditMarker(position: LngLatTuple) { |
| | | if (!map.value || typeof (window as any).AMap === 'undefined') |
| | | return |
| | |
| | | } |
| | | pointEditMarker.value = new (window as any).AMap.Marker({ |
| | | position, |
| | | draggable: !isPointEditLocationLocked.value, |
| | | draggable: isPointEditMarkerDraggable.value, |
| | | offset: new (window as any).AMap.Pixel(-16, -42), |
| | | content: markerContent, |
| | | zIndex: 200, |
| | | cursor: isPointEditLocationLocked.value ? 'default' : 'pointer', |
| | | cursor: isPointEditMarkerDraggable.value ? 'pointer' : 'default', |
| | | }) |
| | | pointEditMarker.value.on('click', () => { |
| | | if ( |
| | |
| | | ]) |
| | | }) |
| | | pointEditMarker.value.on('dragend', (event: any) => { |
| | | if (isPointEditLocationLocked.value) { |
| | | window.$message?.warning('当前状态不允许修改点位位置') |
| | | if (!isPointEditMarkerDraggable.value) |
| | | return |
| | | } |
| | | const lnglat = event?.lnglat |
| | | if (!lnglat) |
| | | return |
| | |
| | | pointEditMarker.value.setMap(map.value) |
| | | } |
| | | pointEditMarker.value.setPosition(position) |
| | | pointEditMarker.value.setDraggable?.(!isPointEditLocationLocked.value) |
| | | pointEditMarker.value.setDraggable?.(isPointEditMarkerDraggable.value) |
| | | pointEditMarker.value.setCursor?.( |
| | | isPointEditLocationLocked.value ? 'default' : 'pointer', |
| | | isPointEditMarkerDraggable.value ? 'pointer' : 'default', |
| | | ) |
| | | syncMapMarkerScale() |
| | | openPointEditInfoWindow(position) |
| | |
| | | <template> |
| | | <div class="content roboTaxi"> |
| | | <div class="page-body"> |
| | | <n-spin :show="loading"> |
| | | <div class="box"> |
| | | <n-spin :show="loading" class="spin-box"> |
| | | <div class="box h-full"> |
| | | <div v-if="configData" class="switch-card mb-24px px-12px"> |
| | | <n-form |
| | | label-placement="left" |
| | |
| | | </n-form> |
| | | </div> |
| | | |
| | | <n-card class="robotaxi-table-card" :bordered="false"> |
| | | <n-card class="robotaxi-table-card h-full" :bordered="false"> |
| | | <template #header> |
| | | <n-flex justify="flex-end"> |
| | | <NButton @click="handleOpenOperationLog"> 操作日志 </NButton> |
| | |
| | | /> |
| | | <OperationLogModal |
| | | v-model:show="showOperationLogModal" |
| | | :business-type="59" |
| | | :business-type="997" |
| | | /> |
| | | </div> |
| | | </template> |
| | |
| | | // padding: 12px 0px !important; |
| | | // } |
| | | } |
| | | :deep(.n-spin-content) { |
| | | height:100%; |
| | | } |
| | | |
| | | .page-body { |
| | | height: calc(100vh - 76px - 28px); |
| | | height: calc(100vh - 76px - 28px - 64px); |
| | | overflow-y: auto; |
| | | padding: 12px; |
| | | scrollbar-width: none; |
| | | :deep(.n-tabs-tab.n-tabs-tab--active) { |
| | | font-weight: 600; |
| | | } |
| | | } |
| | | .spin-box{ |
| | | height: 100% |
| | | } |
| | | |
| | | .page-body::-webkit-scrollbar { |
| | |
| | | box-sizing: border-box; |
| | | background: #fff; |
| | | border-radius: 6px; |
| | | display: flex; |
| | | flex-direction: column; |
| | | min-height: 0; |
| | | --n-label-text-color: rgba(23, 31, 38, 0.8); |
| | | } |
| | | |
| | |
| | | display: flex; |
| | | min-height: 0; |
| | | flex-direction: column; |
| | | height:100%; |
| | | } |
| | | |
| | | .row-item { |
| | |
| | | display: flex; |
| | | flex-direction: column; |
| | | min-height: 420px; |
| | | height: 100%; |
| | | } |
| | | |
| | | .footer { |
| | |
| | | |
| | | .footer-placeholder { |
| | | height: 64px; |
| | | display: none; |
| | | } |
| | | |
| | | .status-header { |
| | |
| | | NSpace, |
| | | NSwitch, |
| | | NTabPane, |
| | | NTag, |
| | | NTabs, |
| | | NTimePicker, |
| | | NUpload, |
| | |
| | | |
| | | interface UserListItem { |
| | | id: number | string |
| | | nickName: string |
| | | account: string |
| | | remark: string |
| | | status: number | boolean | null |
| | | isPriorityDispatch: number | boolean | null |
| | | createBy: string |
| | | createTime: string | number | null |
| | | remark?: string |
| | | } |
| | | |
| | | interface UserGroupItem { |
| | |
| | | |
| | | const selectedUsers = rows.map(r => ({ |
| | | id: r.id, |
| | | nickName: r.nickName || '-', |
| | | account: r.account, |
| | | remark: r.nickName || '-', |
| | | status: r.status, |
| | | isPriorityDispatch: r.isPriorityDispatch, |
| | | createBy: r.createBy || '-', |
| | | createTime: r.createTime || null, |
| | | remark: r.nickName || '-', |
| | | })) |
| | | group.userList = selectedUsers |
| | | group.pagination.total = selectedUsers.length |
| | | message.success(`成功选择了 ${selectedUsers.length} 名用户`) |
| | | } |
| | | |
| | | function isNormalWhitelistStatus(status: unknown) { |
| | | return status === 1 || status === true |
| | | } |
| | | |
| | | const activeTab = ref(1) |
| | |
| | | |
| | | function createUserColumns(groupIndex: number): DataTableColumns<any> { |
| | | return [ |
| | | { title: '用户名称', key: 'nickName', width: 150 }, |
| | | { title: '白名单账号', key: 'account' }, |
| | | // { title: '备注说明', key: 'remark' }, |
| | | { |
| | | title: '状态', |
| | | key: 'status', |
| | | width: 100, |
| | | render: (row) => { |
| | | const isNormal = isNormalWhitelistStatus(row.status) |
| | | return ( |
| | | <NTag color={{ color: isNormal ? '#E6F4FF' : '#FFF8E6', textColor: isNormal ? '#0068FF' : '#FF9000' }} size="small" bordered={false}> |
| | | {isNormal ? '正常' : '冻结'} |
| | | </NTag> |
| | | ) |
| | | }, |
| | | }, |
| | | { |
| | | title: '优先派单', |
| | | key: 'isPriorityDispatch', |
| | | width: 100, |
| | | render: row => <span>{row.isPriorityDispatch === 1 || row.isPriorityDispatch === true ? '是' : '否'}</span>, |
| | | }, |
| | | { title: '创建人', key: 'createBy', width: 120 }, |
| | | { |
| | | title: '创建时间', |
| | | key: 'createTime', |
| | | width: 180, |
| | | render: row => row.createTime ? dayjs(row.createTime).format('YYYY/MM/DD HH:mm') : '', |
| | | }, |
| | | { |
| | | title: '操作', |
| | | key: 'actions', |
| | |
| | | |
| | | <template> |
| | | <div class=" w-full h-full relative content flex flex-col" > |
| | | <div class="p-12px main flex flex-col flex-1 overflow-hidden"> |
| | | <div class="pb-12px main flex flex-col flex-1 overflow-hidden"> |
| | | <NTabs v-model:value="activeTab" type="line" class="custom-tabs" animated> |
| | | <NTabPane :name="1" tab="活动介绍内容" /> |
| | | <NTabPane :name="2" tab="活动策略配置" /> |
| | | <NTabPane :name="3" tab="发放用户" /> |
| | | <NTabPane :name="4" tab="通知方式" /> |
| | | </NTabs> |
| | | <div class="box flex-1"> |
| | | <div class="box flex-1 mx-12px"> |
| | | <!-- 活动介绍内容表单 --> |
| | | <NForm |
| | | v-show="activeTab === 1" ref="formRef" :model="formModel" :rules="rules" label-placement="left" |
| | |
| | | border-radius: 6px; |
| | | width: 100%; |
| | | box-sizing: border-box; |
| | | margin-top: 50px; |
| | | --n-label-text-color: rgba(23, 31, 38, 0.8); |
| | | |
| | | :deep(.n-form-item-label) { |
| | |
| | | } |
| | | } |
| | | |
| | | .custom-tabs { |
| | | position: fixed; |
| | | background-color: rgb(244, 246, 248); |
| | | z-index: 9999; |
| | | padding: 12px 12px 0 12px; |
| | | } |
| | | :deep(.n-upload-trigger--image-card) { |
| | | width: 56px !important; |
| | | height: 56px; |