|
|
@@ -108,7 +108,7 @@
|
|
|
<span :class="{ 'danger-color': timeConverts(row.lastReportTime).indexOf('秒') == -1 }">{{ row.lastReportTime ? timeConverts(row.lastReportTime) : "未通讯" }}</span>
|
|
|
</template>
|
|
|
<template v-slot:posNum="{ row }">
|
|
|
- <span :class="{ 'danger-color': row.posNum > 0 }">{{ row.posNum > 0 ? row.posNum : 0 }}</span>
|
|
|
+ <span :class="{ 'danger-color': row.posNum != 0 }">{{row.posNum }}</span>
|
|
|
</template>
|
|
|
<template v-slot:updateTime="{ row }">
|
|
|
<span>{{ timeConverts(row.updateTime) }}</span>
|
|
|
@@ -318,7 +318,10 @@ const handleCopyRobot = async (ids: any) => {
|
|
|
// 批量修改
|
|
|
const handleBatchUpdate = async (ids: any) => {
|
|
|
if (ids.length == 0) return proxy.$message(`请先选择要设置机器!`, 7);
|
|
|
- const botList = dataSource.value.filter((item: any) => ids.includes(item.id));
|
|
|
+ const botList: any = dataSource.value.filter((item: any) => ids.includes(item.id));
|
|
|
+ const strategyProgramId = botList[0].strategyProgramId;
|
|
|
+ const strategyProgramIdList = botList.filter((item: any) => item.strategyProgramId != strategyProgramId);
|
|
|
+ if (strategyProgramIdList.length > 0) return proxy.$message(`请先选择同一策略、策略版本机器!`, 7);
|
|
|
const runningBotList = botList.filter((item: any) => ["RUNNING", "START_PENDING"].includes(item.status));
|
|
|
if (runningBotList.length > 0) return proxy.$message(`请先停止正在运行的机器!`, 7);
|
|
|
const result = await batchUpdateRef.value.show(botList);
|