|
|
@@ -38,17 +38,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div>
|
|
|
- <lay-table
|
|
|
- :page="tablePage"
|
|
|
- :columns="columns"
|
|
|
- size="sm"
|
|
|
- resize
|
|
|
- id="id"
|
|
|
- :data-source="dataSource"
|
|
|
- v-model:selected-keys="selectedKeys"
|
|
|
- :loading="pageConfig.loading"
|
|
|
- @change="handleCurrentChange"
|
|
|
- >
|
|
|
+ <lay-table :page="tablePage" :columns="columns" resize id="id" :data-source="dataSource" v-model:selected-keys="selectedKeys" :loading="pageConfig.loading" @change="handleCurrentChange">
|
|
|
<template v-slot:name="{ row }">
|
|
|
<span v-if="apiList?.includes('/robot/findById')" class="normal-color" @click="jumpDetail(row)">{{ row.name }}</span>
|
|
|
<span v-else>{{ row.name }}</span>
|
|
|
@@ -80,8 +70,8 @@
|
|
|
{{ `${row.serverIp}:${row.callPort}` }}
|
|
|
</template>
|
|
|
<template v-slot:configs="{ row }">
|
|
|
- <lay-tooltip :content="row.configs">
|
|
|
- <div class="ellipsis-2" @click="handleUpdate(row)">{{ `${row.configs}` }}</div>
|
|
|
+ <lay-tooltip :content="row.configs || ''">
|
|
|
+ <div class="ellipsis-2" @click="handleUpdate(row)">{{ `${row.configs || ""}` }}</div>
|
|
|
</lay-tooltip>
|
|
|
</template>
|
|
|
<template v-slot:lastReportTime="{ row }">
|
|
|
@@ -255,19 +245,21 @@ const handleCopyParams = async (ids: any) => {
|
|
|
const otherBot = dataSource.value.filter((item: any) => ids.includes(item.id) && item.id != ids[0]);
|
|
|
const result = await proxy.$waitingConfirm(`是否确认要把机器"${firstBot.name}"参数复制给"${otherBot.map((item: any) => item.name).join(",")}"?`);
|
|
|
if (!result) return;
|
|
|
- const configs = firstBot.configList.filter((item: any) => {
|
|
|
- delete item.deleted;
|
|
|
- delete item.id;
|
|
|
- delete item.robotId;
|
|
|
- return ![4, 5].includes(item.valType);
|
|
|
- });
|
|
|
- const params = otherBot.map((item: any) => {
|
|
|
- const botConfigs: any = item.configList.filter((item: any) => {
|
|
|
+ const configs =
|
|
|
+ firstBot.configList?.filter((item: any) => {
|
|
|
delete item.deleted;
|
|
|
delete item.id;
|
|
|
delete item.robotId;
|
|
|
- return [4, 5].includes(item.valType);
|
|
|
- });
|
|
|
+ return ![4, 5].includes(item.valType);
|
|
|
+ }) || [];
|
|
|
+ const params = otherBot.map((item: any) => {
|
|
|
+ const botConfigs: any =
|
|
|
+ item.configList?.filter((item: any) => {
|
|
|
+ delete item.deleted;
|
|
|
+ delete item.id;
|
|
|
+ delete item.robotId;
|
|
|
+ return [4, 5].includes(item.valType);
|
|
|
+ }) || [];
|
|
|
return {
|
|
|
id: item.id,
|
|
|
name: item.name,
|