|
|
@@ -73,6 +73,7 @@
|
|
|
<el-table-column prop="value" label="操作" >
|
|
|
<template #default="{row, $index}">
|
|
|
<a class="mar-right-10 cursor-pointer" @click="editRow(row, $index)" v-log="{ describe: { action: '点击编辑步骤', id: row.id, action_name: row.action_name } }">编辑</a>
|
|
|
+ <a class="mar-right-10 cursor-pointer" v-if="!row.is_system" @click="copyRow(row, $index)" v-log="{ describe: { action: '点击复制步骤', id: row.id, action_name: row.action_name } }">复制</a>
|
|
|
<a class="cursor-pointer" v-if="!row.is_system" @click="deleteRow(row, $index)" v-log="{ describe: { action: '点击删除步骤', id: row.id, action_name: row.action_name } }">删除</a>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
@@ -281,6 +282,35 @@ const editRow = (row, index) => {
|
|
|
};
|
|
|
|
|
|
/**
|
|
|
+ * 复制指定行的配置并新增。
|
|
|
+ * @param {Object} row - 当前行的数据
|
|
|
+ * @param {number} index - 当前行的索引
|
|
|
+ */
|
|
|
+const copyRow = (row, index) => {
|
|
|
+ if (isSortMode.value) return; // 排序模式下禁用
|
|
|
+
|
|
|
+ editId.value = -1
|
|
|
+ let length = Number(tableData.value.length) + 1
|
|
|
+ addRowData.value = {
|
|
|
+ mode_type: topsTab.value === 'left' ? '执行左脚程序' : '执行右脚程序',
|
|
|
+ tab_id: activeTab.value.id,
|
|
|
+ action_name: row.action_name + '_副本',
|
|
|
+ take_picture: row.take_picture,
|
|
|
+ camera_height: row.camera_height,
|
|
|
+ camera_angle: row.camera_angle,
|
|
|
+ turntable_position: row.turntable_position,
|
|
|
+ turntable_angle: row.turntable_angle,
|
|
|
+ shoe_upturn: row.shoe_upturn,
|
|
|
+ led_switch: row.led_switch,
|
|
|
+ number_focus: row.number_focus,
|
|
|
+ pre_delay: row.pre_delay,
|
|
|
+ after_delay: row.after_delay,
|
|
|
+ }
|
|
|
+ dialogVisible.value = true;
|
|
|
+ editTitle.value = '新增步骤';
|
|
|
+};
|
|
|
+
|
|
|
+/**
|
|
|
* 删除指定行的配置。
|
|
|
* @param {Object} row - 当前行的数据
|
|
|
* @param {number} index - 当前行的索引
|