|
|
@@ -44,7 +44,26 @@
|
|
|
</template>
|
|
|
</MenuItem>
|
|
|
</TechTabPane>
|
|
|
- <TechTabPane label="特勤" name="specialDuty">
|
|
|
+ <TechTabPane label="特勤" name="specialDuty" class="menu-scroll-view special-duty-pane">
|
|
|
+ <TechTable ref="dutyTable" :columns="tableColumns" :data="tableData" class="duty-table">
|
|
|
+ <template #level="{ row }">
|
|
|
+ <span :title="row.level" :style="{ color: row.level === '二级' ? '#FFDF0C' : '#F00' }">
|
|
|
+ {{ row.level }}
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ <template #status="{ row }">
|
|
|
+ <span :title="row.status" :style="{ color: row.status === '进行中' ? '#FFDF0C' : row.status === '未开始' ? '#fff' : '#8dc453' }">
|
|
|
+ {{ row.status }}
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ <template #action="{ row }">
|
|
|
+ <div class="btn-group">
|
|
|
+ <span class="action-btn" @click="handleSpecialTaskView(row)">查看</span>
|
|
|
+ <span v-if="row.status === '未开始'" class="action-btn action-start" @click="handleSpecialTaskStart(row)">立即执行</span>
|
|
|
+ <span v-if="row.status === '进行中'" class="action-btn action-end" @click="handleSpecialTaskEnd(row)">立即结束</span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </TechTable>
|
|
|
</TechTabPane>
|
|
|
</TechTabs>
|
|
|
</div>
|
|
|
@@ -55,28 +74,6 @@
|
|
|
<div class="mode-switch" v-if="activeLeftTab === 'crossing'">
|
|
|
<ButtonGroup v-model="currentView" :options="viewOptions" @select="onViewSelect" />
|
|
|
</div>
|
|
|
- <!-- 特勤右上角表格 -->
|
|
|
- <TechTable ref="dutyTable" :columns="tableColumns" :data="tableData" class="duty-table" v-if="activeLeftTab === 'specialDuty'">
|
|
|
-
|
|
|
- <template #level="{ row }">
|
|
|
- <span :title="row.level" :style="{ color: row.level === '二级' ? '#FFDF0C' : '#F00' }">
|
|
|
- {{ row.level }}
|
|
|
- </span>
|
|
|
- </template>
|
|
|
-
|
|
|
- <template #status="{ row }">
|
|
|
- <span :title="row.status" :style="{ color: row.status === '进行中' ? '#FFDF0C' : '#F00' }">
|
|
|
- {{ row.status }}
|
|
|
- </span>
|
|
|
- </template>
|
|
|
-
|
|
|
- <template #action="{ row }">
|
|
|
- <span class="action-btn" @click="handleSpecialTaskView(row)">
|
|
|
- 查看
|
|
|
- </span>
|
|
|
- </template>
|
|
|
-
|
|
|
- </TechTable>
|
|
|
</template>
|
|
|
|
|
|
<template #center>
|
|
|
@@ -149,14 +146,14 @@ export default {
|
|
|
{ label: '列表模式', value: 'list-mode' },
|
|
|
{ label: '地图模式', value: 'map-mode' },
|
|
|
],
|
|
|
- // 1. 表头
|
|
|
+ // 特勤表头
|
|
|
tableColumns: [
|
|
|
- { label: '序号', key: 'id', width: '14%' },
|
|
|
- { label: '名称', key: 'name', width: '20%' },
|
|
|
- { label: '执行人', key: 'executor', width: '18%' },
|
|
|
- { label: '等级', key: 'level', width: '14%' },
|
|
|
- { label: '状态', key: 'status', width: '20%' },
|
|
|
- { label: '操作', key: 'action', width: '14%' }
|
|
|
+ { label: '序号', key: 'id', width: '10%' },
|
|
|
+ { label: '名称', key: 'name', width: '30%' },
|
|
|
+ { label: '执行人', key: 'executor', width: '15%' },
|
|
|
+ { label: '等级', key: 'level', width: '12%' },
|
|
|
+ { label: '状态', key: 'status', width: '13%' },
|
|
|
+ { label: '操作', key: 'action', width: '20%' }
|
|
|
],
|
|
|
|
|
|
tableData: [],
|
|
|
@@ -385,7 +382,7 @@ export default {
|
|
|
width: 1315,
|
|
|
height: 682,
|
|
|
center: false,
|
|
|
- showClose: false,
|
|
|
+ showClose: true,
|
|
|
position: { x: 500, y: 170 },
|
|
|
noPadding: false,
|
|
|
enableDblclickExpand: false,
|
|
|
@@ -395,9 +392,6 @@ export default {
|
|
|
currentRoute: detailData?.currentRoute || {},
|
|
|
intersectionData: detailData?.intersectionData || {},
|
|
|
cycleLength: detailData?.cycleLength || 0,
|
|
|
- onClose: () => {
|
|
|
- this.$refs.layout.handleDialogClose(dialogId);
|
|
|
- }
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
@@ -487,10 +481,17 @@ export default {
|
|
|
headerComponent: 'TaskMonitorHeader',
|
|
|
headerProps: {
|
|
|
taskData: panelData.taskInfo,
|
|
|
+ onStartTask: () => {
|
|
|
+ console.log('点击了立即执行');
|
|
|
+ panelData.taskInfo.status = '进行中';
|
|
|
+ const tableRow = this.tableData.find(r => r.id === nodeData.id);
|
|
|
+ if (tableRow) tableRow.status = '进行中';
|
|
|
+ },
|
|
|
onEndTask: () => {
|
|
|
- console.log('点击了结束任务');
|
|
|
- // this.$refs.layout.handleDialogClose(id);
|
|
|
- panelData.taskInfo.status = '已结束';
|
|
|
+ console.log('点击了立即结束');
|
|
|
+ panelData.taskInfo.status = '已完成';
|
|
|
+ const tableRow = this.tableData.find(r => r.id === nodeData.id);
|
|
|
+ if (tableRow) tableRow.status = '已完成';
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
@@ -498,7 +499,14 @@ export default {
|
|
|
handleSpecialTaskView(row) {
|
|
|
console.log('查看特勤线路,当前数据:', row);
|
|
|
this.openDutyDetailDialog(row);
|
|
|
-
|
|
|
+ },
|
|
|
+ handleSpecialTaskStart(row) {
|
|
|
+ console.log('立即执行特勤任务:', row);
|
|
|
+ row.status = '进行中';
|
|
|
+ },
|
|
|
+ handleSpecialTaskEnd(row) {
|
|
|
+ console.log('立即结束特勤任务:', row);
|
|
|
+ row.status = '已完成';
|
|
|
},
|
|
|
|
|
|
|
|
|
@@ -518,6 +526,20 @@ export default {
|
|
|
.duty-table {
|
|
|
margin-top: 10px;
|
|
|
}
|
|
|
+.action-btn {
|
|
|
+ cursor: pointer;
|
|
|
+ color: #4da8ff;
|
|
|
+ margin-right: 10px;
|
|
|
+}
|
|
|
+.action-btn:hover {
|
|
|
+ text-decoration: underline;
|
|
|
+}
|
|
|
+.action-start {
|
|
|
+ color: #67c23a;
|
|
|
+}
|
|
|
+.action-end {
|
|
|
+ color: #f56c6c;
|
|
|
+}
|
|
|
.top-charts-bar {
|
|
|
display: flex;
|
|
|
justify-content: center;
|
|
|
@@ -542,4 +564,33 @@ export default {
|
|
|
flex-direction: column;
|
|
|
overflow: hidden;
|
|
|
}
|
|
|
+/* 针对特勤 Tab 单独剥离背景和边框 */
|
|
|
+::v-deep .special-duty-pane {
|
|
|
+ background: transparent !important;
|
|
|
+ background-color: transparent !important;
|
|
|
+ background-image: none !important;
|
|
|
+ border: none !important;
|
|
|
+ box-shadow: none !important;
|
|
|
+ outline: none !important;
|
|
|
+}
|
|
|
+
|
|
|
+/* 如果你的科技UI边框是利用伪元素(::before / ::after)绘制的,再加上这两句抹除 */
|
|
|
+::v-deep .special-duty-pane::before,
|
|
|
+::v-deep .special-duty-pane::after {
|
|
|
+ display: none !important;
|
|
|
+}
|
|
|
+
|
|
|
+::v-deep .special-duty-pane .tech-table tbody td {
|
|
|
+ color: #ffffff;
|
|
|
+ font-size: clamp(12px, 2.5cqw, 14px);
|
|
|
+ padding: clamp(8px, 1.5cqw, 10px) clamp(8px, 1.5cqw, 10px);
|
|
|
+ white-space: normal !important;
|
|
|
+ overflow: hidden;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+}
|
|
|
+::v-deep .special-duty-pane .tech-table .btn-group {
|
|
|
+ display: flex;
|
|
|
+ gap: 10px;
|
|
|
+ flex-direction: column;
|
|
|
+}
|
|
|
</style>
|