vue-table-操作及导出

自动化操作 vue-element-admin 管理系统的综合 Table 页面,包括登录、遍历数据、修改记录并导出到 Excel。适用于需要批量处理 Table 数据的场景。

MIT-0 · Free to use, modify, and redistribute. No attribution required.
0 · 182 · 2 current installs · 2 all-time installs
byjeiao@mingj
MIT-0
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Suspicious
medium confidence
Purpose & Capability
Name/description (automate vue-element-admin table actions and export to Excel) matches the runtime steps (open site, traverse table, edit, export). However the document requires the Python openpyxl library and filesystem write access (saving to /Users/openclaw/Desktop) but the skill metadata declares no dependencies or required binaries — a mismatch.
!
Instruction Scope
The SKILL.md instructs the agent to write an Excel file to a specific local path (/Users/openclaw/Desktop/DATE.xlsx) and to import/use openpyxl. It also relies on brittle element refs (e.g., e341, e902) that must be fetched from snapshots. The instructions therefore assume filesystem write permission and availability of a Python library that are not declared, which is scope creep relative to an instruction-only skill.
Install Mechanism
No install spec (instruction-only), which is low-risk. But the SKILL.md expects openpyxl to be present; without an install step or declared dependency, the agent may fail or attempt to execute code without required libraries.
!
Credentials
No environment variables or credentials are requested (good), but the instructions write files to a platform-specific desktop path (macOS) and hard-code login credentials (editor/123456). Writing to user filesystem is a privilege that should be declared/configurable; the lack of any declared filesystem or dependency requirements is disproportionate to the metadata.
Persistence & Privilege
always is false and there is no install step that modifies other skills or system configuration. The skill does not request persistent privileges over the agent.
What to consider before installing
This skill appears to do what it claims (automate the demo site and export rows to Excel), but it has gaps you should clarify before installing: - Dependency: SKILL.md imports openpyxl but the skill metadata does not declare or install it. Confirm that the execution environment provides openpyxl or ask the author to declare/install it. - File writes: the instructions save files to /Users/openclaw/Desktop — a platform-specific path. Make the output path configurable and ensure you are comfortable allowing the skill to write to your filesystem. - Hard-coded creds and refs: the file contains the demo login editor/123456 and brittle element refs that may break. Verify the site you intend to automate and that credentials are appropriate (don't reuse real credentials). - Browser tool access: this skill requires the agent's browser automation tool, which can interact with arbitrary web pages and could exfiltrate data if pointed at other sites. Restrict targets to the intended demo/host and monitor the actions. If the author provides a dependency list (or an install step for openpyxl), makes the output path configurable, and documents how to obtain up-to-date element refs, the assessment would move toward benign. Without those clarifications, proceed cautiously.

Like a lobster shell, security has layers — review code before you run it.

Current versionv1.0.0
Download zip
latestvk976p9988bt28vcn50kcn7gmrn82c0b3

License

MIT-0
Free to use, modify, and redistribute. No attribution required.

SKILL.md

vue-table-操作及导出

使用场景

当需要在 vue-element-admin 管理系统中进行以下操作时使用此 skill:

  1. 登录系统(editor/123456)
  2. 打开综合 Table 页面
  3. 遍历每一页数据,记录指定行信息
  4. 修改记录的重要性星级
  5. 将数据导出到 Excel 文件

前提条件

  • 使用 browser 工具进行自动化操作
  • 使用 openpyxl 库创建和写入 Excel 文件

操作流程

1. 打开网站并登录

# 使用 browser 打开登录页面
browser(action="open", url="https://panjiachen.github.io/vue-element-admin/")

# 登录后会自动进入首页(已登录状态)
# 如果需要重新登录,先登出再登录

2. 创建 Excel 文件

import openpyxl
from datetime import datetime

# 创建以当天日期命名的 Excel 文件
date_str = datetime.now().strftime("%Y-%m-%d")
file_path = f"/Users/openclaw/Desktop/{date_str}.xlsx"

wb = openpyxl.Workbook()
ws = wb.active
ws.title = "Sheet1"
ws.append(["序号", "作者", "类型", "时间", "标题", "状态", "重要性"])
wb.save(file_path)

3. 导航到综合 Table 页面

# 点击 Table 菜单(展开子菜单)
browser(action="act", request={"kind": "click", ref": "e89"})  # Table 菜单

# 等待菜单展开后,点击综合 Table
browser(action="act", request={"kind": "click", ref": "e227"})  # 综合 Table 链接

4. 处理每一页数据

对于每一页,执行以下操作:

4.1 点击第一行的编辑按钮

# 点击第一行的编辑按钮(需要从 snapshot 中获取最新的 ref)
browser(action="act", request={"kind": "click", ref": "e341"})  # 编辑按钮

4.2 获取弹窗中的详情

从弹窗中提取以下字段:

  • 类型:Japan/China/Eurozone/USA
  • 时间:YYYY-MM-DD HH:MM 格式
  • 标题:完整标题文本
  • 状态:published/draft
  • 重要性:1-5星(通过 slider 图片数量判断)

4.3 保存数据到 Excel

import openpyxl

wb = openpyxl.load_workbook(file_path)
ws = wb.active
ws.append([
    "序号",      # 从表格第一行获取
    "作者",      # 从表格第一行获取
    "类型",      # 从弹窗获取
    "时间",      # 从弹窗获取
    "标题",      # 从弹窗获取
    "状态",      # 从弹窗获取
    "1星"       # 修改前记录原始值
])
wb.save(file_path)

4.4 修改重要性为 3 星

# 点击 slider 组件的第三个星星图标
browser(action="act", request={"kind": "click", ref": "e902"})  # 第3个星

4.5 关闭弹窗

# 点击确定按钮保存
browser(action="act", request={"kind": "click", ref": "e911"})  # 确定按钮

5. 翻页

# 点击页码按钮翻页
browser(action="act", request={"kind": "click", ref": "e849"})  # 第2页
browser(action="act", request={"kind": "click", ref": "e850"})  # 第3页

6. 重复步骤 4-5

直到处理完所有需要的页面。

7. 关闭浏览器

browser(action="close")

注意事项

  1. 编辑弹窗的 ref 可能会随着页面刷新而变化,需要从 snapshot 中获取最新的 ref
  2. 重要性 slider 点击第三个星星图标可将星级改为3星
  3. Excel 文件默认保存在桌面,文件名为当天日期.xlsx
  4. 登录凭据为 editor/123456(系统可能已自动登录)
  5. 表格每页显示20条数据,共100条(5页)
  6. 弹窗关闭后需要等待页面刷新再进行下一步操作

Files

1 total
Select a file
Select a file to preview.

Comments

Loading comments…