This commit is contained in:
zlwu committed 2026-07-16 11:45:34 +08:00
1 parent f6efca8fdf
commit 93a83d260f
45 files changed
+1211 -393

No files matched your search

+3
View File
@@ -81,3 +81,6 @@ htmlcov/
uploads/
exports/
.superpowers/
# Local git worktrees (isolated feature checkouts)
.worktrees/
+1 -1
View File
@@ -1 +1 @@
40304
54473
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_backend_app_services_oa_publish_py", "label": "oa_publish.py", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/oa_publish.py", "source_location": "L1"}, {"id": "services_oa_publish_extract_rules", "label": "_extract_rules()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/oa_publish.py", "source_location": "L80"}, {"id": "services_oa_publish_walk_form_rules", "label": "_walk_form_rules()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/oa_publish.py", "source_location": "L95"}, {"id": "services_oa_publish_count_fillable_fields", "label": "count_fillable_fields()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/oa_publish.py", "source_location": "L103"}, {"id": "services_oa_publish_rule_use_in_condition", "label": "_rule_use_in_condition()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/oa_publish.py", "source_location": "L117"}, {"id": "services_oa_publish_index_condition_fields", "label": "index_condition_fields()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/oa_publish.py", "source_location": "L124"}, {"id": "services_oa_publish_normalize_use_in_condition_required", "label": "normalize_use_in_condition_required()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/oa_publish.py", "source_location": "L139"}, {"id": "services_oa_publish_node_type", "label": "_node_type()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/oa_publish.py", "source_location": "L167"}, {"id": "services_oa_publish_validate_flow_tree", "label": "validate_flow_tree()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/oa_publish.py", "source_location": "L171"}, {"id": "services_oa_publish_validate_condition_rules_against_form", "label": "validate_condition_rules_against_form()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/oa_publish.py", "source_location": "L280"}, {"id": "services_oa_publish_validate_oa_roles_referenced", "label": "validate_oa_roles_referenced()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/oa_publish.py", "source_location": "L315"}, {"id": "services_oa_publish_validate_control_types", "label": "validate_control_types()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/oa_publish.py", "source_location": "L384"}, {"id": "services_oa_publish_validate_draft_for_publish", "label": "validate_draft_for_publish()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/oa_publish.py", "source_location": "L400"}, {"id": "services_oa_publish_publish_app", "label": "publish_app()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/oa_publish.py", "source_location": "L425"}, {"id": "services_oa_publish_rationale_125", "label": "field -> rule\uff08\u4ec5 useInCondition \u4e14 type \u5408\u683c\uff09", "file_type": "rationale", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/oa_publish.py", "source_location": "L125"}, {"id": "services_oa_publish_rationale_140", "label": "\u5c31\u5730/\u6df1\u62f7\u8d1d\u7686\u53ef\uff1a\u6253\u6807\u5b57\u6bb5\u5f3a\u5236 required/$required\u3002\u53d1\u5e03\u524d\u8c03\u7528\u3002", "file_type": "rationale", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/oa_publish.py", "source_location": "L140"}, {"id": "services_oa_publish_rationale_432", "label": "\u6821\u9a8c\u5e76\u53d1\u5e03\u5f53\u524d\u8349\u7a3f\u3002 \u6210\u529f\u8fd4\u56de (draft_dict_like_published_info, [])\uff1b \u5931\u8d25\u8fd4\u56de ({}, errors)\u3002", "file_type": "rationale", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/oa_publish.py", "source_location": "L432"}], "edges": [{"source": "users_wuzilong_work_00code_zkxw_backend_app_services_oa_publish_py", "target": "typing", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/oa_publish.py", "source_location": "L4", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_services_oa_publish_py", "target": "sqlalchemy_orm", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/oa_publish.py", "source_location": "L6", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_services_oa_publish_py", "target": "app_crud", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/oa_publish.py", "source_location": "L8",Line truncated
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_backend_app_api_storage_release_review_py", "label": "storage_release_review.py", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/storage_release_review.py", "source_location": "L1"}, {"id": "api_storage_release_review_get_tenant_no", "label": "_get_tenant_no()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/storage_release_review.py", "source_location": "L20"}, {"id": "api_storage_release_review_get_current_user_id", "label": "_get_current_user_id()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/storage_release_review.py", "source_location": "L30"}, {"id": "api_storage_release_review_list_storage_release_reviews", "label": "list_storage_release_reviews()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/storage_release_review.py", "source_location": "L38"}, {"id": "api_storage_release_review_get_storage_release_review_detail", "label": "get_storage_release_review_detail()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/storage_release_review.py", "source_location": "L71"}, {"id": "api_storage_release_review_submit_single_review", "label": "submit_single_review()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/storage_release_review.py", "source_location": "L89"}, {"id": "api_storage_release_review_batch_review", "label": "batch_review()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/storage_release_review.py", "source_location": "L118"}, {"id": "api_storage_release_review_store_single_sample", "label": "store_single_sample()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/storage_release_review.py", "source_location": "L146"}, {"id": "api_storage_release_review_batch_store_samples", "label": "batch_store_samples()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/storage_release_review.py", "source_location": "L171"}], "edges": [{"source": "users_wuzilong_work_00code_zkxw_backend_app_api_storage_release_review_py", "target": "typing", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/storage_release_review.py", "source_location": "L1", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_api_storage_release_review_py", "target": "fastapi", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/storage_release_review.py", "source_location": "L3", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_api_storage_release_review_py", "target": "sqlalchemy_orm", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/storage_release_review.py", "source_location": "L4", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_api_storage_release_review_py", "target": "app_core_database", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/storage_release_review.py", "source_location": "L6", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_api_storage_release_review_py", "target": "app_core_menu_guard", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/storage_release_review.py", "source_location": "L7", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_api_storage_release_review_py", "target": "app_core_response", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/storage_release_review.py", "source_location": "L8", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_api_storage_release_review_py", "target": "app_crud", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/storage_release_review.py", "source_location": "L9", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_api_storage_release_review_py", "target": "app_models_models", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/storage_release_review.py", "source_location": "L10", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_api_storage_release_review_py", "target": "app_schemas_storage_release_review", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/storage_release_review.py", "source_location": "L11", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_api_storage_releLine truncated
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_backend_app_crud_storage_release_review_py", "label": "storage_release_review.py", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/storage_release_review.py", "source_location": "L1"}, {"id": "crud_storage_release_review_fmt_dt", "label": "_fmt_dt()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/storage_release_review.py", "source_location": "L52"}, {"id": "crud_storage_release_review_total_pages", "label": "total_pages()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/storage_release_review.py", "source_location": "L56"}, {"id": "crud_storage_release_review_row_to_dict", "label": "_row_to_dict()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/storage_release_review.py", "source_location": "L62"}, {"id": "crud_storage_release_review_create_review_from_reception", "label": "create_review_from_reception()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/storage_release_review.py", "source_location": "L90"}, {"id": "crud_storage_release_review_normalize_review_phase", "label": "normalize_review_phase()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/storage_release_review.py", "source_location": "L128"}, {"id": "crud_storage_release_review_list_reviews", "label": "list_reviews()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/storage_release_review.py", "source_location": "L136"}, {"id": "crud_storage_release_review_enrich_review_list_items", "label": "_enrich_review_list_items()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/storage_release_review.py", "source_location": "L215"}, {"id": "crud_storage_release_review_get_user_name", "label": "_get_user_name()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/storage_release_review.py", "source_location": "L308"}, {"id": "crud_storage_release_review_get_review_detail", "label": "get_review_detail()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/storage_release_review.py", "source_location": "L313"}, {"id": "crud_storage_release_review_build_cell_storage_protocol_info", "label": "_build_cell_storage_protocol_info()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/storage_release_review.py", "source_location": "L377"}, {"id": "crud_storage_release_review_build_research_donation_protocol_info", "label": "_build_research_donation_protocol_info()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/storage_release_review.py", "source_location": "L435"}, {"id": "crud_storage_release_review_build_cell_storage_transport_info", "label": "_build_cell_storage_transport_info()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/storage_release_review.py", "source_location": "L493"}, {"id": "crud_storage_release_review_build_research_donation_transport_info", "label": "_build_research_donation_transport_info()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/storage_release_review.py", "source_location": "L527"}, {"id": "crud_storage_release_review_build_reception_info", "label": "_build_reception_info()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/storage_release_review.py", "source_location": "L561"}, {"id": "crud_storage_release_review_build_gate_qc_info", "label": "_build_gate_qc_info()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/storage_release_review.py", "source_location": "L584"}, {"id": "crud_storage_release_review_build_process_qc_info_list", "label": "_build_process_qc_info_list()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/storage_release_review.py", "source_location": "L604"}, {"id": "crud_storage_release_review_build_production_info", "label": "_build_production_info()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/storage_release_review.py", "source_location": "L615"}, {"id": "crud_storage_release_review_submit_review", "label": "submit_review()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/storage_release_review.py", "source_location": "L633"}, {"id": "crud_storage_release_review_batch_submit_review", "label": "batch_submit_review()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/storage_release_review.py", "source_location": "L668"}, {"id": "crud_storage_release_review_store_sample", "label": "store_sample()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/storagLine truncated
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_backend_app_services_oa_publish_py", "label": "oa_publish.py", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/oa_publish.py", "source_location": "L1"}, {"id": "services_oa_publish_extract_rules", "label": "_extract_rules()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/oa_publish.py", "source_location": "L78"}, {"id": "services_oa_publish_walk_form_rules", "label": "_walk_form_rules()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/oa_publish.py", "source_location": "L93"}, {"id": "services_oa_publish_count_fillable_fields", "label": "count_fillable_fields()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/oa_publish.py", "source_location": "L101"}, {"id": "services_oa_publish_rule_use_in_condition", "label": "_rule_use_in_condition()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/oa_publish.py", "source_location": "L115"}, {"id": "services_oa_publish_index_condition_fields", "label": "index_condition_fields()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/oa_publish.py", "source_location": "L122"}, {"id": "services_oa_publish_normalize_use_in_condition_required", "label": "normalize_use_in_condition_required()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/oa_publish.py", "source_location": "L137"}, {"id": "services_oa_publish_node_type", "label": "_node_type()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/oa_publish.py", "source_location": "L165"}, {"id": "services_oa_publish_validate_flow_tree", "label": "validate_flow_tree()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/oa_publish.py", "source_location": "L169"}, {"id": "services_oa_publish_validate_condition_rules_against_form", "label": "validate_condition_rules_against_form()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/oa_publish.py", "source_location": "L278"}, {"id": "services_oa_publish_validate_oa_roles_referenced", "label": "validate_oa_roles_referenced()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/oa_publish.py", "source_location": "L313"}, {"id": "services_oa_publish_validate_control_types", "label": "validate_control_types()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/oa_publish.py", "source_location": "L382"}, {"id": "services_oa_publish_validate_draft_for_publish", "label": "validate_draft_for_publish()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/oa_publish.py", "source_location": "L398"}, {"id": "services_oa_publish_publish_app", "label": "publish_app()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/oa_publish.py", "source_location": "L423"}, {"id": "services_oa_publish_rationale_123", "label": "field -> rule\uff08\u4ec5 useInCondition \u4e14 type \u5408\u683c\uff09", "file_type": "rationale", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/oa_publish.py", "source_location": "L123"}, {"id": "services_oa_publish_rationale_138", "label": "\u5c31\u5730/\u6df1\u62f7\u8d1d\u7686\u53ef\uff1a\u6253\u6807\u5b57\u6bb5\u5f3a\u5236 required/$required\u3002\u53d1\u5e03\u524d\u8c03\u7528\u3002", "file_type": "rationale", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/oa_publish.py", "source_location": "L138"}, {"id": "services_oa_publish_rationale_430", "label": "\u6821\u9a8c\u5e76\u53d1\u5e03\u5f53\u524d\u8349\u7a3f\u3002 \u6210\u529f\u8fd4\u56de (draft_dict_like_published_info, [])\uff1b \u5931\u8d25\u8fd4\u56de ({}, errors)\u3002", "file_type": "rationale", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/oa_publish.py", "source_location": "L430"}], "edges": [{"source": "users_wuzilong_work_00code_zkxw_backend_app_services_oa_publish_py", "target": "typing", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/oa_publish.py", "source_location": "L4", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_services_oa_publish_py", "target": "sqlalchemy_orm", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/oa_publish.py", "source_location": "L6", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_services_oa_publish_py", "target": "app_crud", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/services/oa_publish.py", "source_location": "L8",Line truncated
+1 -3
View File
@@ -27,8 +27,6 @@ FILLABLE_TYPES = frozenset(
"phone",
"image",
"upload",
"attachment",
"oaAttachment",
"money",
"dept",
"region",
@@ -70,7 +68,7 @@ VALID_ASSIGNEE_TYPES = frozenset(
VALID_NODE_TYPES = frozenset({"start", "approval", "cc", "condition", "end"})
# 发布允许的控件 type(未知 type 拒绝)
ALLOWED_CONTROL_TYPES = FILLABLE_TYPES | LAYOUT_TYPES | frozenset({"oaAttachment"})
ALLOWED_CONTROL_TYPES = FILLABLE_TYPES | LAYOUT_TYPES
CONDITION_ELIGIBLE_TYPES = frozenset(
{"inputNumber", "number", "money", "radio", "select", "datePicker", "date"}
+3 -3
View File
@@ -161,16 +161,16 @@ class TestOaPublishValidate(unittest.TestCase):
)
self.assertTrue(any("aiMagicBox" in e for e in errs))
def test_oa_attachment_is_allowed(self):
def test_upload_is_allowed(self):
self.assertEqual(
validate_control_types(
{"rule": [{"type": "oaAttachment", "field": "files", "title": "附件"}]}
{"rule": [{"type": "upload", "field": "files", "title": "上传"}]}
),
[],
)
self.assertEqual(
count_fillable_fields(
{"rule": [{"type": "oaAttachment", "field": "files", "title": "附件"}]}
{"rule": [{"type": "upload", "field": "files", "title": "上传"}]}
),
1,
)
@@ -0,0 +1,140 @@
# OA 审批单 PDF 导出 Implementation Plan
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
**Goal:** 在「我发起的」「抄送我的」列表增加「打印」按钮,前端按钉钉风格(印章第 4 版)用 html2canvas + jspdf 直接下载审批单 PDF。
**Architecture:** 离屏挂载 `OaApprovalPrintSheet` → canvas 截图 → 按 A4 切片写入 jsPDF。数据来自已有 `fetchOaInstanceDetail`;纯前端,不改后端。
**Tech Stack:** Vue 3、TypeScript、html2canvas、jspdf、Element Plus icons
**Spec:** `docs/superpowers/specs/2026-07-15-oa-approval-print-pdf-design.md`
---
## File map
| Path | Action |
|------|--------|
| `web-admin/package.json` | Add `html2canvas`, `jspdf` |
| `web-admin/src/utils/oa-approval-print.ts` | Create: model builder + export orchestration |
| `web-admin/src/components/oa-approval/OaApprovalPrintSheet.vue` | Create: print DOM + stamp CSS (v4) |
| `web-admin/src/views/oa-approval/mine/index.vue` | Add Print button + handler |
| `web-admin/src/views/oa-approval/cc/index.vue` | Add Print button + handler |
---
### Task 1: Install dependencies
**Files:** `web-admin/package.json`, lockfile
- [ ] **Step 1: Install**
```bash
cd web-admin && pnpm add html2canvas jspdf && pnpm add -D @types/html2canvas
```
Note: `@types/html2canvas` may be unnecessary if package ships types; skip if install fails. Prefer packages that include their own types.
- [ ] **Step 2: Commit**
```bash
git add web-admin/package.json web-admin/pnpm-lock.yaml
git commit -m "chore(web-admin): add html2canvas and jspdf for OA print PDF"
```
---
### Task 2: Print model + export utility
**Files:**
- Create: `web-admin/src/utils/oa-approval-print.ts`
- [ ] **Step 1: Implement types, field extraction, stamp mapping, and `exportOaApprovalPdf`**
Implement in one file (create Vue app + mount `OaApprovalPrintSheet` off-screen, call html2canvas, slice into jsPDF). Export:
- `buildOaPrintModel(detail, opts)`
- `exportOaApprovalPdf(detail, opts)` — high-level entry used by list pages
- `resolveStamp(status)`
Key behaviors from spec §4–§6:
- Company name fixed: `安徽中科兴皖医学研究有限公司`
- Form rows from `formSchemaJson.rule` + `formDataJson`
- Upload fields → URL lines with `kind: 'urls'`
- Progress → `flowItems`
- Filename: `{initiator}提交的{appName}.pdf`
- [ ] **Step 2: Commit**
```bash
git add web-admin/src/utils/oa-approval-print.ts
git commit -m "feat(oa): add approval print model and PDF export helper"
```
---
### Task 3: Print sheet component (stamp v4)
**Files:**
- Create: `web-admin/src/components/oa-approval/OaApprovalPrintSheet.vue`
- [ ] **Step 1: Implement sheet** matching Demo v4: title, meta, table, `.oa-stamp`, watermark, print meta. Native `<table>` only. Fixed width ~794px (210mm at 96dpi).
- [ ] **Step 2: Commit**
```bash
git add web-admin/src/components/oa-approval/OaApprovalPrintSheet.vue
git commit -m "feat(oa): add DingTalk-style approval print sheet component"
```
---
### Task 4: Wire list pages
**Files:**
- Modify: `web-admin/src/views/oa-approval/mine/index.vue`
- Modify: `web-admin/src/views/oa-approval/cc/index.vue`
- [ ] **Step 1: Add Printer button + `printRow` that calls `fetchOaInstanceDetail` then `exportOaApprovalPdf`**
mine: `row.id`; cc: `row.instanceId`. Use `useUserStore` for printer nickName. Widen操作列 if needed (≥ 320).
- [ ] **Step 2: Smoke check**
```bash
cd web-admin && pnpm exec vue-tsc --noEmit 2>&1 | head -80
```
- [ ] **Step 3: Commit**
```bash
git add web-admin/src/views/oa-approval/mine/index.vue web-admin/src/views/oa-approval/cc/index.vue
git commit -m "feat(oa): add print PDF action on mine and CC approval lists"
```
---
### Task 5: Graph update
- [ ] **Step 1:** `./scripts/update-graph.sh frontend`
- [ ] **Step 2: Commit graph if changed**
```bash
git add web-admin/graphify-out && git commit -m "chore: update frontend graphify after OA print PDF"
```
---
## Spec coverage
| Spec item | Task |
|-----------|------|
| 打印按钮 mine/cc | 4 |
| html2canvas+jspdf | 1, 2 |
| 版式 / 无二维码 | 3 |
| 印章 v4 + 全状态 | 2, 3 |
| 附件 URL | 2 |
| 水印 / 页码 | 2, 3 |
| 错误提示 | 4 |
+2
View File
@@ -74,7 +74,9 @@
"exceljs": "^4.4.0",
"file-saver": "^2.0.5",
"highlight.js": "^11.10.0",
"html2canvas": "^1.4.1",
"jsencrypt": "^3.3.2",
"jspdf": "^4.2.1",
"jszip": "^3.10.1",
"mitt": "^3.0.1",
"nprogress": "^0.2.0",
+168
View File
@@ -65,9 +65,15 @@ importers:
highlight.js:
specifier: ^11.10.0
version: 11.11.1
html2canvas:
specifier: ^1.4.1
version: 1.4.1
jsencrypt:
specifier: ^3.3.2
version: 3.5.4
jspdf:
specifier: ^4.2.1
version: 4.2.1
jszip:
specifier: ^3.10.1
version: 3.10.1
@@ -383,6 +389,10 @@ packages:
resolution: {integrity: sha512-Q/N6JNWvIvPnLDvjlE1OUBLPQHH6l3CltCEsHIujp45zQUSSh8K+gHnaEX45yAT1nyngnINhvWtzN+Nb9D8RAQ==}
engines: {node: '>=6.9.0'}
'@babel/runtime@7.29.7':
resolution: {integrity: sha512-Nq8OhGWiZIZGV6hLHoyAKLLcJihP/xFeBMGJoUrxTX2psI8dCifzLhZISFb+VWS3wFMRDmCGw5R+dOySCqPLhw==}
engines: {node: '>=6.9.0'}
'@babel/template@7.27.2':
resolution: {integrity: sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw==}
engines: {node: '>=6.9.0'}
@@ -1251,9 +1261,18 @@ packages:
'@types/node@24.8.1':
resolution: {integrity: sha512-alv65KGRadQVfVcG69MuB4IzdYVpRwMG/mq8KWOaoOdyY617P5ivaDiMCGOFDWD2sAn5Q0mR3mRtUOgm99hL9Q==}
'@types/pako@2.0.4':
resolution: {integrity: sha512-VWDCbrLeVXJM9fihYodcLiIv0ku+AlOa/TQ1SvYOaBuyrSKgEcro95LJyIsJ4vSo6BXIxOKxiJAat04CmST9Fw==}
'@types/raf@3.4.3':
resolution: {integrity: sha512-c4YAvMedbPZ5tEyxzQdMoOhhJ4RD3rngZIdwC2/qDN3d7JpEhB6fiBRKVY1lg5B7Wk+uPBjn5f39j1/2MY1oOw==}
'@types/sortablejs@1.15.8':
resolution: {integrity: sha512-b79830lW+RZfwaztgs1aVPgbasJ8e7AXtZYHTELNXZPsERt4ymJdjV4OccDbHQAvHrCcFpbF78jkm0R6h/pZVg==}
'@types/trusted-types@2.0.7':
resolution: {integrity: sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==}
'@types/web-bluetooth@0.0.16':
resolution: {integrity: sha512-oh8q2Zc32S6gd/j50GowEjKLoOVOwHP/bWVjKJInBwQqdOYMdPrf1oVlelTlyfFK3CKxL1uahMDAr+vy8T7yMQ==}
@@ -1662,6 +1681,10 @@ packages:
balanced-match@2.0.0:
resolution: {integrity: sha512-1ugUSr8BHXRnK23KfuYS+gVMC3LB8QGH9W1iGtDPsNWoQbgtXSExkBu2aDR4epiGWZOjZsj6lDl/N/AqqTC3UA==}
base64-arraybuffer@1.0.2:
resolution: {integrity: sha512-I3yl4r9QB5ZRY3XuJVEPfc2XhZO6YweFPI+UovAzn+8/hb3oJ6lnysaFcjVpkCPfVWFUDvoZ8kmVDP7WyRtYtQ==}
engines: {node: '>= 0.6.0'}
base64-js@1.5.1:
resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==}
@@ -1746,6 +1769,10 @@ packages:
caniuse-lite@1.0.30001745:
resolution: {integrity: sha512-ywt6i8FzvdgrrrGbr1jZVObnVv6adj+0if2/omv9cmR2oiZs30zL4DIyaptKcbOrBdOIc74QTMoJvSE2QHh5UQ==}
canvg@3.0.11:
resolution: {integrity: sha512-5ON+q7jCTgMp9cjpu4Jo6XbvfYwSB2Ow3kzHKfIyJfaCAOHLbdKPQqGKgfED/R5B+3TFFfe8pegYA+b423SRyA==}
engines: {node: '>=10.0.0'}
cfb@1.2.2:
resolution: {integrity: sha512-KfdUZsSOw19/ObEWasvBP/Ac4reZvAGauZhs6S/gqNhXhI7cKwvlH7ulj+dOEYnca4bm4SGo8C1bTAQvnTjgQA==}
engines: {node: '>=0.8'}
@@ -1946,6 +1973,9 @@ packages:
resolution: {integrity: sha512-IQOkD3hbR5KrN93MtcYuad6YPuTSUhntLHDuLEbFWE+ff2/XSZNdZG+LcbbIW5AXKg/WFIfYItIzVoHngHXZzA==}
engines: {node: '>=12 || >=16'}
css-line-break@2.1.0:
resolution: {integrity: sha512-FHcKFCZcAha3LwfVBhCQbW2nCNbkZXn7KVUJcsT5/P8YmfsVja0FMPJr0B903j/E69HUphKiV9iQArX8SDYA4w==}
css-tree@3.1.0:
resolution: {integrity: sha512-0eW44TGN5SQXU1mWSkKwFstI/22X2bG1nYzZTYMAWjylYURhse752YgbE4Cx46AC+bAvI+/dYTPRk1LqSUnu6w==}
engines: {node: ^10 || ^12.20.0 || ^14.13.0 || >=15.0.0}
@@ -2111,6 +2141,9 @@ packages:
resolution: {integrity: sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==}
engines: {node: '>= 4'}
dompurify@3.4.12:
resolution: {integrity: sha512-zQvGet8Z2sWbQhCmfFz/T5QWH2oBmjnqK3qvOjaqaNLrLEF912WamU+ohnTp0TCep/MFVHpdJuCZEdFOdTnEFg==}
domutils@3.2.2:
resolution: {integrity: sha512-6kZKyUajlDuqlHKVX1w7gyslj9MPIXzIFiz/rGu35uC1wMi+kMhQwGhl4lt9unC9Vb9INnY9Z3/ZA3+FhASLaw==}
@@ -2376,6 +2409,9 @@ packages:
fast-levenshtein@2.0.6:
resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==}
fast-png@6.4.0:
resolution: {integrity: sha512-kAqZq1TlgBjZcLr5mcN6NP5Rv4V2f22z00c3g8vRrwkcqjerx7BEhPbOnWCPqaHUl2XWQBJQvOT/FQhdMT7X/Q==}
fast-uri@3.1.0:
resolution: {integrity: sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA==}
@@ -2395,6 +2431,9 @@ packages:
picomatch:
optional: true
fflate@0.8.3:
resolution: {integrity: sha512-tbZNuJrLwGUp3zshBtdy4W+ORxZuIh8a5ilyIEQDC5rY1f3U20JMry0Ll3WBzU58EZKsEuJFXhb5gwv8CsPvgA==}
figures@3.2.0:
resolution: {integrity: sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==}
engines: {node: '>=8'}
@@ -2651,6 +2690,10 @@ packages:
html-void-elements@2.0.1:
resolution: {integrity: sha512-0quDb7s97CfemeJAnW9wC0hw78MtW7NU3hqtCD75g2vFlDLt36llsYD7uB7SUzojLMP24N5IatXf7ylGXiGG9A==}
html2canvas@1.4.1:
resolution: {integrity: sha512-fPU6BHNpsyIhr8yyMpTLLxAbkaK8ArIBcmZIRiBLiDhjeqvXolaEmDGmELFuX9I4xDcaKKcJl+TKZLqruBbmWA==}
engines: {node: '>=8.0.0'}
htmlparser2@8.0.2:
resolution: {integrity: sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA==}
@@ -2723,6 +2766,9 @@ packages:
resolution: {integrity: sha512-QAgPDQMEgrDssk1XiwwHoOGYF9BAbUcc1+j+FhEvaOt8/cKRqyLn0U5qA6F74fGhTMGxf92pOvPBeh29jQJDTQ==}
engines: {node: '>=12.0.0'}
iobuffer@5.4.0:
resolution: {integrity: sha512-DRebOWuqDvxunfkNJAlc3IzWIPD5xVxwUNbHr7xKB8E6aLJxIPfNX3CoMJghcFjpv6RWQsrcJbghtEwSPoJqMA==}
is-arrayish@0.2.1:
resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==}
@@ -2896,6 +2942,9 @@ packages:
resolution: {integrity: sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==}
engines: {'0': node >= 0.2.0}
jspdf@4.2.1:
resolution: {integrity: sha512-YyAXyvnmjTbR4bHQRLzex3CuINCDlQnBqoSYyjJwTP2x9jDLuKDzy7aKUl0hgx3uhcl7xzg32agn5vlie6HIlQ==}
jszip@3.10.1:
resolution: {integrity: sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g==}
@@ -3372,6 +3421,9 @@ packages:
pako@1.0.11:
resolution: {integrity: sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==}
pako@2.2.0:
resolution: {integrity: sha512-zJq6RP/5q+TO2OpFV3FHzlPnFjmkb7Nc99a5SNjJE+uu/PkpChs+NIZSSzbBoD+6kjiISXjfYdwj1ZRQ81dz/w==}
parent-module@1.0.1:
resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==}
engines: {node: '>=6'}
@@ -3425,6 +3477,9 @@ packages:
perfect-debounce@1.0.0:
resolution: {integrity: sha512-xCy9V055GLEqoFaHoC1SoLIaLmWctgCUaBaWxDZ7/Zx4CTyX7cJQLJOok/orfjZAh9kEYpjJa4d0KcJmCbctZA==}
performance-now@2.1.0:
resolution: {integrity: sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==}
picocolors@1.1.1:
resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==}
@@ -3576,6 +3631,9 @@ packages:
queue-microtask@1.2.3:
resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==}
raf@3.4.1:
resolution: {integrity: sha512-Sq4CW4QhwOHE8ucn6J34MqtZCeWFP2aQSmrlroYgqAV1PjStIhJXxYuTgUIfkEk7zTLjmIjLmU5q+fbD1NnOJA==}
readable-stream@2.3.8:
resolution: {integrity: sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==}
@@ -3594,6 +3652,9 @@ packages:
resolution: {integrity: sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==}
engines: {node: '>= 14.18.0'}
regenerator-runtime@0.13.11:
resolution: {integrity: sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==}
require-directory@2.1.1:
resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==}
engines: {node: '>=0.10.0'}
@@ -3632,6 +3693,10 @@ packages:
rfdc@1.4.1:
resolution: {integrity: sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==}
rgbcolor@1.0.1:
resolution: {integrity: sha512-9aZLIrhRaD97sgVhtJOW6ckOEh6/GnvQtdVNfdZ6s67+3/XwLS9lBcQYzEEhYVeUowN7pRzMLsyGhK2i/xvWbw==}
engines: {node: '>= 0.8.15'}
rimraf@2.7.1:
resolution: {integrity: sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==}
deprecated: Rimraf versions prior to v4 are no longer supported
@@ -3791,6 +3856,10 @@ packages:
ssr-window@3.0.0:
resolution: {integrity: sha512-q+8UfWDg9Itrg0yWK7oe5p/XRCJpJF9OBtXfOPgSJl+u3Xd5KI328RUEvUqSMVM9CiQUEf1QdBzJMkYGErj9QA==}
stackblur-canvas@2.7.0:
resolution: {integrity: sha512-yf7OENo23AGJhBriGx0QivY5JP6Y1HbrrDI6WLt6C5auYZXlQrheoY8hD4ibekFKz1HOfE48Ww8kMWMnJD/zcQ==}
engines: {node: '>=0.1.14'}
string-argv@0.3.2:
resolution: {integrity: sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==}
engines: {node: '>=0.6.19'}
@@ -3919,6 +3988,10 @@ packages:
resolution: {integrity: sha512-zFObLMyZeEwzAoKCyu1B91U79K2t7ApXuQfo8OuxwXLDgcKxuwM+YvcbIhm6QWqz7mHUH1TVytR1PwVVjEuMig==}
engines: {node: '>=14.18'}
svg-pathdata@6.0.3:
resolution: {integrity: sha512-qsjeeq5YjBZ5eMdFuUa4ZosMLxgr5RZ+F+Y1OrDhuOCEInRMA3x74XdBtggJcj9kOeInz0WE+LgCPDkZFlBYJw==}
engines: {node: '>=12.0.0'}
svg-tags@1.0.0:
resolution: {integrity: sha512-ovssysQTa+luh7A5Weu3Rta6FJlFBBbInjOh722LIt6klpU2/HtdUbszju/G4devcvk8PGt7FCLv5wftu3THUA==}
@@ -3954,6 +4027,9 @@ packages:
resolution: {integrity: sha512-te/NtwBwfiNRLf9Ijqx3T0nlqZiQ2XrrtBvu+cLL8ZRrGkO0NHTug8MYFKyoSrv/sHTaSKfilUkizV6XhxMJ3g==}
engines: {node: '>=8'}
text-segmentation@1.0.3:
resolution: {integrity: sha512-iOiPUo/BGnZ6+54OsWxZidGCsdU8YbE4PSpdPinp7DeMtUJNJBoJ/ouUSTJjHkh1KntHaltHl/gDs2FC4i5+Nw==}
through@2.3.8:
resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==}
@@ -4112,6 +4188,9 @@ packages:
resolution: {integrity: sha512-6Z7Ma2aVEWisaL6TvBCy7P8rm2LQoPv6dJ7ecIaIixHcwfbJ0x7mWdbcwlIM5IGQxPZSFYeqRCqlOOeKoJYMkw==}
engines: {node: '>= 4'}
utrie@1.0.2:
resolution: {integrity: sha512-1MLa5ouZiOmQzUbjbu9VmjLzn1QLXBhwpUa7kdLUQK+KQ5KA9I1vk5U4YHe/X2Ch7PYnJfWuWT+VbuxbGwljhw==}
uuid@8.3.2:
resolution: {integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==}
hasBin: true
@@ -4555,6 +4634,8 @@ snapshots:
'@babel/runtime@7.28.4': {}
'@babel/runtime@7.29.7': {}
'@babel/template@7.27.2':
dependencies:
'@babel/code-frame': 7.27.1
@@ -5334,8 +5415,16 @@ snapshots:
dependencies:
undici-types: 7.14.0
'@types/pako@2.0.4': {}
'@types/raf@3.4.3':
optional: true
'@types/sortablejs@1.15.8': {}
'@types/trusted-types@2.0.7':
optional: true
'@types/web-bluetooth@0.0.16': {}
'@types/web-bluetooth@0.0.20': {}
@@ -5907,6 +5996,8 @@ snapshots:
balanced-match@2.0.0: {}
base64-arraybuffer@1.0.2: {}
base64-js@1.5.1: {}
baseline-browser-mapping@2.8.8: {}
@@ -5989,6 +6080,18 @@ snapshots:
caniuse-lite@1.0.30001745: {}
canvg@3.0.11:
dependencies:
'@babel/runtime': 7.29.7
'@types/raf': 3.4.3
core-js: 3.45.1
raf: 3.4.1
regenerator-runtime: 0.13.11
rgbcolor: 1.0.1
stackblur-canvas: 2.7.0
svg-pathdata: 6.0.3
optional: true
cfb@1.2.2:
dependencies:
adler-32: 1.3.1
@@ -6193,6 +6296,10 @@ snapshots:
css-functions-list@3.2.3: {}
css-line-break@2.1.0:
dependencies:
utrie: 1.0.2
css-tree@3.1.0:
dependencies:
mdn-data: 2.12.2
@@ -6338,6 +6445,11 @@ snapshots:
dependencies:
domelementtype: 2.3.0
dompurify@3.4.12:
optionalDependencies:
'@types/trusted-types': 2.0.7
optional: true
domutils@3.2.2:
dependencies:
dom-serializer: 2.0.0
@@ -6703,6 +6815,12 @@ snapshots:
fast-levenshtein@2.0.6: {}
fast-png@6.4.0:
dependencies:
'@types/pako': 2.0.4
iobuffer: 5.4.0
pako: 2.2.0
fast-uri@3.1.0: {}
fastest-levenshtein@1.0.16: {}
@@ -6715,6 +6833,8 @@ snapshots:
optionalDependencies:
picomatch: 4.0.3
fflate@0.8.3: {}
figures@3.2.0:
dependencies:
escape-string-regexp: 1.0.5
@@ -6984,6 +7104,11 @@ snapshots:
html-void-elements@2.0.1: {}
html2canvas@1.4.1:
dependencies:
css-line-break: 2.1.0
text-segmentation: 1.0.3
htmlparser2@8.0.2:
dependencies:
domelementtype: 2.3.0
@@ -7055,6 +7180,8 @@ snapshots:
through: 2.3.8
wrap-ansi: 7.0.0
iobuffer@5.4.0: {}
is-arrayish@0.2.1: {}
is-binary-path@2.1.0:
@@ -7177,6 +7304,17 @@ snapshots:
jsonparse@1.3.1: {}
jspdf@4.2.1:
dependencies:
'@babel/runtime': 7.29.7
fast-png: 6.4.0
fflate: 0.8.3
optionalDependencies:
canvg: 3.0.11
core-js: 3.45.1
dompurify: 3.4.12
html2canvas: 1.4.1
jszip@3.10.1:
dependencies:
lie: 3.3.0
@@ -7591,6 +7729,8 @@ snapshots:
pako@1.0.11: {}
pako@2.2.0: {}
parent-module@1.0.1:
dependencies:
callsites: 3.1.0
@@ -7629,6 +7769,9 @@ snapshots:
perfect-debounce@1.0.0: {}
performance-now@2.1.0:
optional: true
picocolors@1.1.1: {}
picomatch@2.3.1: {}
@@ -7749,6 +7892,11 @@ snapshots:
queue-microtask@1.2.3: {}
raf@3.4.1:
dependencies:
performance-now: 2.1.0
optional: true
readable-stream@2.3.8:
dependencies:
core-util-is: 1.0.3
@@ -7775,6 +7923,9 @@ snapshots:
readdirp@4.1.2: {}
regenerator-runtime@0.13.11:
optional: true
require-directory@2.1.1: {}
require-from-string@2.0.2: {}
@@ -7804,6 +7955,9 @@ snapshots:
rfdc@1.4.1: {}
rgbcolor@1.0.1:
optional: true
rimraf@2.7.1:
dependencies:
glob: 7.2.3
@@ -7961,6 +8115,9 @@ snapshots:
ssr-window@3.0.0: {}
stackblur-canvas@2.7.0:
optional: true
string-argv@0.3.2: {}
string-width@4.2.3:
@@ -8128,6 +8285,9 @@ snapshots:
has-flag: 4.0.0
supports-color: 7.2.0
svg-pathdata@6.0.3:
optional: true
svg-tags@1.0.0: {}
synckit@0.11.11:
@@ -8171,6 +8331,10 @@ snapshots:
text-extensions@2.4.0: {}
text-segmentation@1.0.3:
dependencies:
utrie: 1.0.2
through@2.3.8: {}
tiny-warning@1.0.3: {}
@@ -8339,6 +8503,10 @@ snapshots:
utility-types@3.11.0: {}
utrie@1.0.2:
dependencies:
base64-arraybuffer: 1.0.2
uuid@8.3.2: {}
vite-hot-client@2.1.0(vite@7.1.7(@types/node@24.8.1)(jiti@2.6.0)(lightningcss@1.30.1)(sass@1.93.2)(terser@5.44.0)(tsx@4.20.6)(yaml@2.8.1)):
@@ -0,0 +1,354 @@
<!-- OA 审批单打印页(钉钉风格 · 印章第 4 版) -->
<template>
<div class="oa-print-page">
<div class="oa-print-wm" aria-hidden="true">
<span
v-for="n in 48"
:key="n"
class="oa-print-wm__item"
:style="wmStyle(n)"
>
{{ model.watermarkName }} {{ model.watermarkName }} {{ model.watermarkName }}
</span>
</div>
<div class="oa-print-inner">
<h1 class="oa-print-title">{{ model.title }}</h1>
<div class="oa-print-meta">
<span>{{ model.companyName }}</span>
<span>创建时间:{{ model.createDate }}</span>
</div>
<div class="oa-print-table-wrap">
<div
class="oa-stamp"
:class="[model.stampClass, { 'is-chars3': model.stampText.length >= 3 }]"
:aria-label="model.stampText"
>
<div class="outer" />
<div class="arc-top" />
<div class="arc-bottom" />
<div class="label-top">OA审批</div>
<div class="main" :class="{ 'chars-3': model.stampText.length >= 3 }">
{{ model.stampText }}
</div>
<div class="label-bottom">approval</div>
</div>
<table class="oa-print-table">
<tbody>
<tr v-for="(row, idx) in model.rows" :key="`r-${idx}`">
<th>{{ row.label }}</th>
<td>
<template v-if="row.urls?.length">
<div v-for="(u, ui) in row.urls" :key="ui" class="oa-print-url">{{ u }}</div>
</template>
<template v-else>
<span class="oa-print-text">{{ row.text || '-' }}</span>
</template>
</td>
</tr>
<tr class="oa-print-flow">
<th>审批流程</th>
<td>
<div v-if="!model.flowItems.length" class="oa-print-text">-</div>
<div
v-for="(f, fi) in model.flowItems"
:key="`f-${fi}`"
class="oa-print-flow__item"
>
<div class="oa-print-flow__row">
<div class="oa-print-flow__left">{{ f.left }}</div>
<div class="oa-print-flow__right">{{ f.right }}</div>
</div>
<div v-if="f.comment" class="oa-print-flow__comment">意见:{{ f.comment }}</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="oa-print-footer">
<span>打印时间:{{ model.printTime }}</span>
<span>打印人:{{ model.printerName }}</span>
</div>
</div>
</div>
</template>
<script setup lang="ts">
import type { OaPrintModel } from '@/utils/oa-approval-print'
defineOptions({ name: 'OaApprovalPrintSheet' })
defineProps<{
model: OaPrintModel
}>()
function wmStyle(n: number) {
const row = Math.floor((n - 1) / 4)
const col = (n - 1) % 4
const top = 28 + row * 88
const left = -30 + col * 210 + (row % 2) * 50
return { top: `${top}px`, left: `${left}px` }
}
</script>
<style scoped lang="scss">
.oa-print-page {
position: relative;
width: 794px;
min-height: 1123px;
padding: 48px 56px 56px;
box-sizing: border-box;
background: #fff;
color: #1f2329;
font-family:
'PingFang SC',
'Microsoft YaHei',
'Helvetica Neue',
Arial,
sans-serif;
overflow: hidden;
}
.oa-print-wm {
position: absolute;
inset: 0;
pointer-events: none;
z-index: 0;
overflow: hidden;
}
.oa-print-wm__item {
position: absolute;
font-size: 14px;
color: rgba(0, 0, 0, 0.045);
white-space: nowrap;
transform: rotate(-30deg);
letter-spacing: 2px;
}
.oa-print-inner {
position: relative;
z-index: 1;
}
.oa-print-title {
margin: 0 0 14px;
text-align: center;
font-size: 28px;
font-weight: 700;
letter-spacing: 2px;
line-height: 1.3;
}
.oa-print-meta {
display: flex;
gap: 48px;
margin-bottom: 12px;
font-size: 12px;
line-height: 1.5;
}
.oa-print-table-wrap {
position: relative;
}
.oa-print-table {
width: 100%;
border-collapse: collapse;
table-layout: fixed;
font-size: 13px;
}
.oa-print-table th,
.oa-print-table td {
border: 1px solid #1f2329;
padding: 9px 12px;
vertical-align: middle;
line-height: 1.5;
word-break: break-all;
}
.oa-print-table th {
width: 118px;
font-weight: 400;
text-align: left;
background: #fff;
}
.oa-print-url {
color: #3370ff;
word-break: break-all;
}
.oa-print-text {
white-space: pre-wrap;
}
.oa-print-flow th,
.oa-print-flow td {
vertical-align: top;
}
.oa-print-flow__item {
padding: 3px 0;
}
.oa-print-flow__row {
display: flex;
justify-content: space-between;
gap: 16px;
align-items: flex-start;
}
.oa-print-flow__left {
flex: 1;
min-width: 0;
}
.oa-print-flow__right {
flex-shrink: 0;
white-space: nowrap;
font-variant-numeric: tabular-nums;
}
.oa-print-flow__comment {
margin-top: 2px;
font-size: 12px;
color: #646a73;
}
.oa-print-footer {
display: flex;
gap: 28px;
margin-top: 14px;
font-size: 12px;
}
/* ===== 印章 v4(钉钉风格) ===== */
.oa-stamp {
--stamp: #3ec9a8;
position: absolute;
top: -10px;
right: 18px;
width: 118px;
height: 118px;
z-index: 5;
pointer-events: none;
transform: rotate(-18deg);
opacity: 0.88;
color: var(--stamp);
}
.oa-stamp.ok {
--stamp: #3ec9a8;
}
.oa-stamp.run {
--stamp: #f0a020;
}
.oa-stamp.rej {
--stamp: #e85d5d;
}
.oa-stamp.ret {
--stamp: #e07070;
}
.oa-stamp.can {
--stamp: #9aa0a6;
}
.oa-stamp .outer {
position: absolute;
inset: 0;
border-radius: 50%;
border: 5px solid currentColor;
box-sizing: border-box;
}
.oa-stamp .arc-top,
.oa-stamp .arc-bottom {
position: absolute;
left: 14px;
right: 14px;
border: 2px solid currentColor;
opacity: 0.95;
pointer-events: none;
}
.oa-stamp .arc-top {
top: 11px;
height: 36px;
border-bottom: none;
border-left-color: transparent;
border-right-color: transparent;
border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}
.oa-stamp .arc-bottom {
bottom: 11px;
height: 36px;
border-top: none;
border-left-color: transparent;
border-right-color: transparent;
border-radius: 0 0 50% 50% / 0 0 100% 100%;
}
.oa-stamp .label-top {
position: absolute;
top: 22px;
left: 0;
right: 0;
text-align: center;
font-size: 10px;
font-weight: 500;
letter-spacing: 2px;
line-height: 1;
color: currentColor;
opacity: 0.95;
}
.oa-stamp .label-bottom {
position: absolute;
bottom: 20px;
left: 0;
right: 0;
text-align: center;
font-size: 9px;
font-weight: 500;
letter-spacing: 0.5px;
line-height: 1;
color: currentColor;
opacity: 0.9;
font-family: Arial, 'Helvetica Neue', sans-serif;
}
.oa-stamp .main {
position: absolute;
inset: 0;
display: flex;
align-items: center;
justify-content: center;
font-size: 32px;
font-weight: 800;
letter-spacing: 2px;
line-height: 1;
color: currentColor;
font-family:
'PingFang SC',
'Microsoft YaHei',
'Helvetica Neue',
Arial,
sans-serif;
-webkit-text-stroke: 0.3px currentColor;
}
.oa-stamp .main.chars-3 {
font-size: 28px;
letter-spacing: 1px;
}
</style>
@@ -1,266 +0,0 @@
<!-- OA 附件字段:值=逗号分隔 URL;卡片布局对齐协议附件 -->
<template>
<div class="oa-attach" :class="{ 'is-disabled': disabled }">
<div class="attachment-list">
<el-upload
v-if="!disabled && !reachedMax"
:auto-upload="false"
:show-file-list="false"
:multiple="true"
:disabled="disabled || uploading"
accept="image/*,.pdf,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.txt,.zip,.rar"
@change="onFileChange"
>
<div class="upload-card">
<el-icon :size="28" color="#047857"><Plus /></el-icon>
<span class="upload-card-text">上传附件</span>
</div>
</el-upload>
<div v-for="(item, index) in items" :key="item.url + index" class="attachment-item">
<div class="attachment-preview" @click="preview(item)">
<img v-if="isImage(item.url)" :src="item.url" :alt="item.name" />
<div v-else class="attachment-preview__icon">
<el-icon :size="28"><Document /></el-icon>
</div>
</div>
<div class="attachment-footer">
<span class="attachment-name" :title="item.name">{{ item.name }}</span>
<div class="attachment-actions">
<el-icon class="action-btn" title="下载" @click="download(item)"
><Download
/></el-icon>
<el-icon
v-if="!disabled"
class="action-btn action-btn--danger"
title="删除"
@click="removeAt(index)"
><Delete
/></el-icon>
</div>
</div>
</div>
</div>
<span v-if="!disabled" class="upload-hint">
{{ hintText }}
</span>
</div>
</template>
<script setup lang="ts">
import { computed, ref } from 'vue'
import { ElMessage } from 'element-plus'
import { Plus, Document, Download, Delete } from '@element-plus/icons-vue'
import { fetchAttachmentDownloadUrl, fetchUploadAttachment } from '@/api/business'
defineOptions({ name: 'OaAttachmentField' })
const props = withDefaults(
defineProps<{
modelValue?: string
disabled?: boolean
maxCount?: number
maxSizeMb?: number
}>(),
{
modelValue: '',
disabled: false,
maxCount: 9,
maxSizeMb: 20
}
)
const emit = defineEmits<{
'update:modelValue': [value: string]
change: [value: string]
}>()
const uploading = ref(false)
const items = computed(() => {
const urls = String(props.modelValue || '')
.split(',')
.map((s) => s.trim())
.filter(Boolean)
return urls.map((url) => ({
url,
name: decodeURIComponent(url.split('/').pop() || '附件')
}))
})
const reachedMax = computed(() => items.value.length >= props.maxCount)
const hintText = computed(
() => `支持图片、PDF、Office 等,最多 ${props.maxCount} 个,单文件不超过 ${props.maxSizeMb}MB`
)
function setValue(urls: string[]) {
const v = urls.filter(Boolean).join(',')
emit('update:modelValue', v)
emit('change', v)
}
function isImage(url: string) {
return /\.(png|jpe?g|gif|webp|bmp|svg)(\?|$)/i.test(url)
}
async function onFileChange(uploadFile: any) {
const raw: File | undefined = uploadFile?.raw
if (!raw) return
if (reachedMax.value) {
ElMessage.warning(`最多上传 ${props.maxCount} 个附件`)
return
}
if (raw.size > props.maxSizeMb * 1024 * 1024) {
ElMessage.warning(`单文件不能超过 ${props.maxSizeMb}MB`)
return
}
uploading.value = true
try {
const fd = new FormData()
fd.append('file', raw)
const res: any = await fetchUploadAttachment(fd)
const url = res?.fileUrl || res?.data?.fileUrl
if (!url) {
ElMessage.error('上传失败:未返回文件地址')
return
}
setValue([...items.value.map((x) => x.url), url])
} finally {
uploading.value = false
}
}
function removeAt(index: number) {
const next = items.value.map((x) => x.url)
next.splice(index, 1)
setValue(next)
}
function preview(item: { url: string }) {
if (isImage(item.url)) {
window.open(item.url, '_blank')
} else {
download(item)
}
}
async function download(item: { url: string; name: string }) {
try {
const res: any = await fetchAttachmentDownloadUrl({
fileUrl: item.url,
fileName: item.name
})
const href = res?.downloadUrl || item.url
window.open(href, '_blank')
} catch {
window.open(item.url, '_blank')
}
}
</script>
<style scoped lang="scss">
.attachment-list {
display: flex;
flex-wrap: wrap;
gap: 12px;
}
.upload-card {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 140px;
height: 96px;
cursor: pointer;
background: #fff;
border: 1px dashed #a7f3d0;
border-radius: 8px;
&:hover {
background: var(--primary-bg, #ecfdf5);
}
}
.upload-card-text {
margin-top: 6px;
color: #047857;
font-size: 13px;
}
.attachment-item {
width: 140px;
overflow: hidden;
background: #fff;
border: 1px solid var(--mint-border, #e2e8f0);
border-radius: 8px;
}
.attachment-preview {
display: flex;
align-items: center;
justify-content: center;
height: 72px;
cursor: pointer;
background: #f8fafc;
img {
width: 100%;
height: 100%;
object-fit: cover;
}
}
.attachment-preview__icon {
color: #94a3b8;
}
.attachment-footer {
display: flex;
gap: 4px;
align-items: center;
justify-content: space-between;
padding: 6px 8px;
}
.attachment-name {
overflow: hidden;
color: var(--mint-text, #334155);
font-size: 12px;
text-overflow: ellipsis;
white-space: nowrap;
}
.attachment-actions {
display: flex;
gap: 4px;
}
.action-btn {
color: #64748b;
cursor: pointer;
&:hover {
color: var(--primary, #10b981);
}
&--danger:hover {
color: #dc2626;
}
}
.upload-hint {
display: block;
margin-top: 8px;
color: var(--mint-text-muted, #94a3b8);
font-size: 12px;
}
.is-disabled {
.upload-card {
cursor: not-allowed;
opacity: 0.6;
}
}
</style>
@@ -1,103 +0,0 @@
/**
* OA FormCreate 自定义控件注册(运行时 + 设计器)
*/
import type { App } from 'vue'
import OaAttachmentField from './OaAttachmentField.vue'
/** V1 允许发布的控件 type(与 Spec §4.5 / 后端 oa_publish 对齐) */
export const OA_ALLOWED_CONTROL_TYPES = [
'input',
'textarea',
'inputNumber',
'number',
'radio',
'checkbox',
'select',
'switch',
'datePicker',
'date',
'dateRange',
'timePicker',
'time',
'phone',
'image',
'upload',
'attachment',
'oaAttachment',
'money',
'dept',
'region',
'formula',
'relatedApproval',
'rate',
'slider',
'cascader',
'fcRow',
'col',
'column',
'html',
'divider',
'card',
'space',
'group',
'object'
] as const
export function registerOaFormCreateComponents(formCreate: any) {
if (!formCreate?.component) return
formCreate.component('oaAttachment', OaAttachmentField)
formCreate.component('attachment', OaAttachmentField)
}
/** 将附件控件挂到设计器菜单 */
export function registerOaDesignerAttachment(designer: any) {
if (!designer) return
const addComponent = designer.addComponent || designer?.proxy?.addComponent
const addMenu = designer.addMenu || designer?.proxy?.addMenu
const ruleFactory = () => ({
type: 'oaAttachment',
field: `attach_${Date.now().toString(36)}`,
title: '附件',
info: '',
$required: false,
props: {
maxCount: 9,
maxSizeMb: 20
}
})
if (typeof addComponent === 'function') {
addComponent({
icon: 'icon-upload',
label: '附件',
name: 'oaAttachment',
rule: ruleFactory,
props() {
return [
{ type: 'inputNumber', field: 'maxCount', title: '最大个数', value: 9 },
{ type: 'inputNumber', field: 'maxSizeMb', title: '单文件上限(MB)', value: 20 }
]
}
})
}
if (typeof addMenu === 'function') {
addMenu({
name: 'oaBiz',
title: 'OA控件',
list: [
{
icon: 'icon-upload',
label: '附件',
name: 'oaAttachment',
rule: ruleFactory
}
]
})
}
}
export function installOaFormComponents(app: App, formCreate: any) {
app.component('OaAttachmentField', OaAttachmentField)
registerOaFormCreateComponents(formCreate)
}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_components_oa_approval_oa_condition_fields_ts", "label": "oa-condition-fields.ts", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/oa-condition-fields.ts", "source_location": "L1"}, {"id": "oa_approval_oa_condition_fields_opsforfieldtype", "label": "opsForFieldType()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/oa-condition-fields.ts", "source_location": "L22"}, {"id": "oa_approval_oa_condition_fields_walkrules", "label": "walkRules()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/oa-condition-fields.ts", "source_location": "L39"}, {"id": "oa_approval_oa_condition_fields_flattenformrules", "label": "flattenFormRules()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/oa-condition-fields.ts", "source_location": "L49"}, {"id": "oa_approval_oa_condition_fields_listconditioncandidates", "label": "listConditionCandidates()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/oa-condition-fields.ts", "source_location": "L64"}, {"id": "oa_approval_oa_condition_fields_collectconditionreferencedfields", "label": "collectConditionReferencedFields()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/oa-condition-fields.ts", "source_location": "L90"}, {"id": "oa_approval_oa_condition_fields_normalizeschemaconditionrequired", "label": "normalizeSchemaConditionRequired()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/oa-condition-fields.ts", "source_location": "L108"}, {"id": "oa_approval_oa_condition_fields_formatconditionpreview", "label": "formatConditionPreview()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/oa-condition-fields.ts", "source_location": "L136"}], "edges": [{"source": "users_wuzilong_work_00code_zkxw_web_admin_src_components_oa_approval_oa_condition_fields_ts", "target": "oa_approval_oa_condition_fields_opsforfieldtype", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/oa-condition-fields.ts", "source_location": "L22", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_components_oa_approval_oa_condition_fields_ts", "target": "oa_approval_oa_condition_fields_walkrules", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/oa-condition-fields.ts", "source_location": "L39", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_components_oa_approval_oa_condition_fields_ts", "target": "oa_approval_oa_condition_fields_flattenformrules", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/oa-condition-fields.ts", "source_location": "L49", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_components_oa_approval_oa_condition_fields_ts", "target": "oa_approval_oa_condition_fields_listconditioncandidates", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/oa-condition-fields.ts", "source_location": "L64", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_components_oa_approval_oa_condition_fields_ts", "target": "oa_approval_oa_condition_fields_collectconditionreferencedfields", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/oa-condition-fields.ts", "source_location": "L90", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_components_oa_approval_oa_condition_fields_ts", "target": "oa_approval_oa_condition_fields_normalizeschemaconditionrequired", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/oa-condition-fields.ts", "source_location": "L108", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_components_oa_approval_oa_condition_fields_ts", "target": "oa_approval_oa_condition_fields_formatconditionpreview", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/oa-condition-fields.ts", "source_location": "L136", "weight": 1.0}, {"source": "oa_approval_oa_condition_fields_flattenformrules", "target": "oa_approval_oa_condition_fields_walkrules", "relation": "calls", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-aLine truncated
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_oa_fc_host_app_vue", "label": "App.vue", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/oa-fc-host/App.vue", "source_location": "L1"}, {"id": "oa_fc_host_app_if", "label": "if()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/oa-fc-host/App.vue", "source_location": "L164"}], "edges": [{"source": "users_wuzilong_work_00code_zkxw_web_admin_src_oa_fc_host_app_vue", "target": "oa_fc_host_app_if", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/oa-fc-host/App.vue", "source_location": "L164", "weight": 1.0}], "raw_calls": [{"caller_nid": "oa_fc_host_app_if", "callee": "setTimeout", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/oa-fc-host/App.vue", "source_location": "L165"}]}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_api_storage_release_review_ts", "label": "storage-release-review.ts", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/storage-release-review.ts", "source_location": "L1"}, {"id": "api_storage_release_review_fetchstoragereleasereviewlist", "label": "fetchStorageReleaseReviewList()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/storage-release-review.ts", "source_location": "L140"}, {"id": "api_storage_release_review_fetchstoragereleasereviewdetail", "label": "fetchStorageReleaseReviewDetail()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/storage-release-review.ts", "source_location": "L155"}, {"id": "api_storage_release_review_submitstoragereleasereview", "label": "submitStorageReleaseReview()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/storage-release-review.ts", "source_location": "L161"}, {"id": "api_storage_release_review_batchreviewstoragerelease", "label": "batchReviewStorageRelease()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/storage-release-review.ts", "source_location": "L175"}, {"id": "api_storage_release_review_storesample", "label": "storeSample()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/storage-release-review.ts", "source_location": "L187"}, {"id": "api_storage_release_review_batchstoresample", "label": "batchStoreSample()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/storage-release-review.ts", "source_location": "L193"}], "edges": [{"source": "users_wuzilong_work_00code_zkxw_web_admin_src_api_storage_release_review_ts", "target": "users_wuzilong_work_00code_zkxw_web_admin_src_utils_http", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/storage-release-review.ts", "source_location": "L1", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_api_storage_release_review_ts", "target": "users_wuzilong_work_00code_zkxw_web_admin_src_utils_qc_inspection_batch", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/storage-release-review.ts", "source_location": "L2", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_api_storage_release_review_ts", "target": "users_wuzilong_work_00code_zkxw_web_admin_src_api_qc_work_order", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/storage-release-review.ts", "source_location": "L3", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_api_storage_release_review_ts", "target": "api_storage_release_review_fetchstoragereleasereviewlist", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/storage-release-review.ts", "source_location": "L140", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_api_storage_release_review_ts", "target": "api_storage_release_review_fetchstoragereleasereviewdetail", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/storage-release-review.ts", "source_location": "L155", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_api_storage_release_review_ts", "target": "api_storage_release_review_submitstoragereleasereview", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/storage-release-review.ts", "source_location": "L161", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_api_storage_release_review_ts", "target": "api_storage_release_review_batchreviewstoragerelease", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/storage-release-review.ts", "source_location": "L175", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_api_storage_release_review_ts", "target": "api_storage_release_review_storesample", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/storage-release-review.ts", "source_location": "L187", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_api_storage_release_review_ts", "target": "api_storage_release_review_batchstoresample", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/storage-release-review.ts", "source_location": "L193", "weight": 1.0}], "raw_calls": [{"caller_nid": "api_storage_release_review_fetchstoragereleasereviewlist", "callee": "get", "source_file"Line truncated
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_utils_oa_approval_print_ts", "label": "oa-approval-print.ts", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/utils/oa-approval-print.ts", "source_location": "L1"}, {"id": "utils_oa_approval_print_resolvestamp", "label": "resolveStamp()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/utils/oa-approval-print.ts", "source_location": "L80"}, {"id": "utils_oa_approval_print_statustext", "label": "statusText()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/utils/oa-approval-print.ts", "source_location": "L97"}, {"id": "utils_oa_approval_print_formatdateonly", "label": "formatDateOnly()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/utils/oa-approval-print.ts", "source_location": "L101"}, {"id": "utils_oa_approval_print_formatnow", "label": "formatNow()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/utils/oa-approval-print.ts", "source_location": "L107"}, {"id": "utils_oa_approval_print_ishttpurl", "label": "isHttpUrl()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/utils/oa-approval-print.ts", "source_location": "L113"}, {"id": "utils_oa_approval_print_extracturls", "label": "extractUrls()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/utils/oa-approval-print.ts", "source_location": "L117"}, {"id": "utils_oa_approval_print_formatscalar", "label": "formatScalar()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/utils/oa-approval-print.ts", "source_location": "L148"}, {"id": "utils_oa_approval_print_walkrules", "label": "walkRules()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/utils/oa-approval-print.ts", "source_location": "L170"}, {"id": "utils_oa_approval_print_buildformrows", "label": "buildFormRows()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/utils/oa-approval-print.ts", "source_location": "L206"}, {"id": "utils_oa_approval_print_buildflowitems", "label": "buildFlowItems()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/utils/oa-approval-print.ts", "source_location": "L226"}, {"id": "utils_oa_approval_print_buildoaprintmodel", "label": "buildOaPrintModel()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/utils/oa-approval-print.ts", "source_location": "L291"}, {"id": "utils_oa_approval_print_buildoaprintfilename", "label": "buildOaPrintFilename()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/utils/oa-approval-print.ts", "source_location": "L329"}, {"id": "utils_oa_approval_print_canvastopdf", "label": "canvasToPdf()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/utils/oa-approval-print.ts", "source_location": "L342"}, {"id": "utils_oa_approval_print_exportoaapprovalpdf", "label": "exportOaApprovalPdf()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/utils/oa-approval-print.ts", "source_location": "L376"}], "edges": [{"source": "users_wuzilong_work_00code_zkxw_web_admin_src_utils_oa_approval_print_ts", "target": "vue", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/utils/oa-approval-print.ts", "source_location": "L5", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_utils_oa_approval_print_ts", "target": "html2canvas", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/utils/oa-approval-print.ts", "source_location": "L6", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_utils_oa_approval_print_ts", "target": "jspdf", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/utils/oa-approval-print.ts", "source_location": "L7", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_utils_oa_approval_print_ts", "target": "utils_oa_approval_print_resolvestamp", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/utils/oa-approval-print.ts", "source_location": "L80", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_utils_oa_approval_print_ts", "target": "utils_oa_approval_print_statustext", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/utils/oa-approval-print.ts", "source_location": "L97", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_utils_oa_approval_print_ts", "target": "utils_oa_approval_print_formatdateonly", "relation": "contains",Line truncated
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_components_oa_approval_flow_tree_flowdesigner_vue", "label": "FlowDesigner.vue", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/flow-tree/FlowDesigner.vue", "source_location": "L1"}, {"id": "flow_tree_flowdesigner_commit", "label": "commit()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/flow-tree/FlowDesigner.vue", "source_location": "L307"}, {"id": "flow_tree_flowdesigner_avatarcolor", "label": "avatarColor()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/flow-tree/FlowDesigner.vue", "source_location": "L359"}, {"id": "flow_tree_flowdesigner_avatarinitial", "label": "avatarInitial()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/flow-tree/FlowDesigner.vue", "source_location": "L365"}, {"id": "flow_tree_flowdesigner_resolveuser", "label": "resolveUser()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/flow-tree/FlowDesigner.vue", "source_location": "L370"}, {"id": "flow_tree_flowdesigner_chiptitle", "label": "chipTitle()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/flow-tree/FlowDesigner.vue", "source_location": "L374"}, {"id": "flow_tree_flowdesigner_memberoptionlabel", "label": "memberOptionLabel()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/flow-tree/FlowDesigner.vue", "source_location": "L379"}, {"id": "flow_tree_flowdesigner_memberoptionsub", "label": "memberOptionSub()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/flow-tree/FlowDesigner.vue", "source_location": "L387"}, {"id": "flow_tree_flowdesigner_onmemberpick", "label": "onMemberPick()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/flow-tree/FlowDesigner.vue", "source_location": "L394"}, {"id": "flow_tree_flowdesigner_removemember", "label": "removeMember()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/flow-tree/FlowDesigner.vue", "source_location": "L403"}, {"id": "flow_tree_flowdesigner_setassigneetype", "label": "setAssigneeType()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/flow-tree/FlowDesigner.vue", "source_location": "L408"}, {"id": "flow_tree_flowdesigner_loadroles", "label": "loadRoles()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/flow-tree/FlowDesigner.vue", "source_location": "L413"}, {"id": "flow_tree_flowdesigner_loadusers", "label": "loadUsers()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/flow-tree/FlowDesigner.vue", "source_location": "L423"}, {"id": "flow_tree_flowdesigner_findnode", "label": "findNode()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/flow-tree/FlowDesigner.vue", "source_location": "L447"}, {"id": "flow_tree_flowdesigner_onadd", "label": "onAdd()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/flow-tree/FlowDesigner.vue", "source_location": "L462"}, {"id": "flow_tree_flowdesigner_onremove", "label": "onRemove()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/flow-tree/FlowDesigner.vue", "source_location": "L479"}, {"id": "flow_tree_flowdesigner_openedit", "label": "openEdit()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/flow-tree/FlowDesigner.vue", "source_location": "L506"}, {"id": "flow_tree_flowdesigner_onassigneetypechange", "label": "onAssigneeTypeChange()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/flow-tree/FlowDesigner.vue", "source_location": "L525"}, {"id": "flow_tree_flowdesigner_ondefaultchange", "label": "onDefaultChange()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/flow-tree/FlowDesigner.vue", "source_location": "L530"}], "edges": [{"source": "users_wuzilong_work_00code_zkxw_web_admin_src_components_oa_approval_flow_tree_flowdesigner_vue", "target": "element_plus", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/flow-tree/FlowDesigner.vue", "source_location": "L250", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_components_oa_approval_flow_tree_Line truncated
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_components_oa_approval_flow_tree_flowbranch_vue", "label": "FlowBranch.vue", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/flow-tree/FlowBranch.vue", "source_location": "L1"}], "edges": [], "raw_calls": []}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_types_import_components_d_ts", "label": "components.d.ts", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/types/import/components.d.ts", "source_location": "L1"}], "edges": [], "raw_calls": []}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_components_oa_approval_flow_tree_types_ts", "label": "types.ts", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/flow-tree/types.ts", "source_location": "L1"}, {"id": "flow_tree_types_newid", "label": "newId()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/flow-tree/types.ts", "source_location": "L43"}, {"id": "flow_tree_types_createendnode", "label": "createEndNode()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/flow-tree/types.ts", "source_location": "L47"}, {"id": "flow_tree_types_createdefaultflow", "label": "createDefaultFlow()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/flow-tree/types.ts", "source_location": "L51"}, {"id": "flow_tree_types_createnode", "label": "createNode()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/flow-tree/types.ts", "source_location": "L66"}, {"id": "flow_tree_types_ensureflowroot", "label": "ensureFlowRoot()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/flow-tree/types.ts", "source_location": "L111"}, {"id": "flow_tree_types_summarizeapprover", "label": "summarizeApprover()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/flow-tree/types.ts", "source_location": "L129"}, {"id": "flow_tree_types_insertbetween", "label": "insertBetween()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/flow-tree/types.ts", "source_location": "L146"}, {"id": "flow_tree_types_removechildnode", "label": "removeChildNode()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/flow-tree/types.ts", "source_location": "L153"}, {"id": "flow_tree_types_removefromsubtree", "label": "removeFromSubtree()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/flow-tree/types.ts", "source_location": "L167"}, {"id": "flow_tree_types_findparent", "label": "findParent()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/flow-tree/types.ts", "source_location": "L177"}], "edges": [{"source": "users_wuzilong_work_00code_zkxw_web_admin_src_components_oa_approval_flow_tree_types_ts", "target": "flow_tree_types_newid", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/flow-tree/types.ts", "source_location": "L43", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_components_oa_approval_flow_tree_types_ts", "target": "flow_tree_types_createendnode", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/flow-tree/types.ts", "source_location": "L47", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_components_oa_approval_flow_tree_types_ts", "target": "flow_tree_types_createdefaultflow", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/flow-tree/types.ts", "source_location": "L51", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_components_oa_approval_flow_tree_types_ts", "target": "flow_tree_types_createnode", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/flow-tree/types.ts", "source_location": "L66", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_components_oa_approval_flow_tree_types_ts", "target": "flow_tree_types_ensureflowroot", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/flow-tree/types.ts", "source_location": "L111", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_components_oa_approval_flow_tree_types_ts", "target": "flow_tree_types_summarizeapprover", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/flow-tree/types.ts", "source_location": "L129", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_components_oa_approval_flow_tree_types_ts", "target": "flow_tree_types_insertbetween", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/flow-tree/types.ts", "source_location": "L146", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_adLine truncated
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_types_import_components_d_ts", "label": "components.d.ts", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/types/import/components.d.ts", "source_location": "L1"}], "edges": [], "raw_calls": []}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_main_ts", "label": "main.ts", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/main.ts", "source_location": "L1"}, {"id": "src_main_masksecret", "label": "maskSecret()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/main.ts", "source_location": "L23"}, {"id": "src_main_logapicryptobootinfo", "label": "logApiCryptoBootInfo()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/main.ts", "source_location": "L29"}], "edges": [{"source": "users_wuzilong_work_00code_zkxw_web_admin_src_main_ts", "target": "users_wuzilong_work_00code_zkxw_web_admin_src_utils_patch_el_select_filterable", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/main.ts", "source_location": "L1", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_main_ts", "target": "users_wuzilong_work_00code_zkxw_web_admin_src_app_vue", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/main.ts", "source_location": "L2", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_main_ts", "target": "vue", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/main.ts", "source_location": "L3", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_main_ts", "target": "element_plus", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/main.ts", "source_location": "L4", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_main_ts", "target": "users_wuzilong_work_00code_zkxw_web_admin_src_store", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/main.ts", "source_location": "L8", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_main_ts", "target": "users_wuzilong_work_00code_zkxw_web_admin_src_router", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/main.ts", "source_location": "L9", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_main_ts", "target": "users_wuzilong_work_00code_zkxw_web_admin_src_locales", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/main.ts", "source_location": "L10", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_main_ts", "target": "users_wuzilong_work_00code_zkxw_web_admin_src_assets_styles_core_tailwind_css", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/main.ts", "source_location": "L11", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_main_ts", "target": "users_wuzilong_work_00code_zkxw_web_admin_src_assets_styles_index_scss", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/main.ts", "source_location": "L12", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_main_ts", "target": "users_wuzilong_work_00code_zkxw_web_admin_src_utils_sys_console_ts", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/main.ts", "source_location": "L13", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_main_ts", "target": "users_wuzilong_work_00code_zkxw_web_admin_src_directives", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/main.ts", "source_location": "L14", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_main_ts", "target": "users_wuzilong_work_00code_zkxw_web_admin_src_utils_sys_error_handle", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/main.ts", "source_location": "L15", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_main_ts", "target": "designer", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/main.ts", "source_location": "L16", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_main_ts", "target": "auto_import", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/main.ts", "source_location": "L17", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_main_ts", "target": "src_main_masksecret", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/main.tLine truncated
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_components_oa_approval_oaapprovalprintsheet_vue", "label": "OaApprovalPrintSheet.vue", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/OaApprovalPrintSheet.vue", "source_location": "L1"}], "edges": [], "raw_calls": []}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_views_quality_inspection_storage_release_review_index_vue", "label": "index.vue", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/storage-release-review/index.vue", "source_location": "L1"}], "edges": [], "raw_calls": []}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_components_oa_approval_oaflowpreview_vue", "label": "OaFlowPreview.vue", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/OaFlowPreview.vue", "source_location": "L1"}], "edges": [], "raw_calls": []}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_views_oa_approval_designer_index_vue", "label": "index.vue", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/oa-approval/designer/index.vue", "source_location": "L1"}, {"id": "designer_index_collectformschema", "label": "collectFormSchema()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/oa-approval/designer/index.vue", "source_location": "L171"}, {"id": "designer_index_uploadbasicicon", "label": "uploadBasicIcon()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/oa-approval/designer/index.vue", "source_location": "L193"}, {"id": "designer_index_loaddraft", "label": "loadDraft()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/oa-approval/designer/index.vue", "source_location": "L218"}, {"id": "designer_index_savedraft", "label": "saveDraft()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/oa-approval/designer/index.vue", "source_location": "L254"}, {"id": "designer_index_publish", "label": "publish()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/oa-approval/designer/index.vue", "source_location": "L276"}, {"id": "designer_index_goback", "label": "goBack()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/oa-approval/designer/index.vue", "source_location": "L296"}, {"id": "designer_index_onstepchange", "label": "onStepChange()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/oa-approval/designer/index.vue", "source_location": "L300"}], "edges": [{"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_oa_approval_designer_index_vue", "target": "vue_router", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/oa-approval/designer/index.vue", "source_location": "L112", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_oa_approval_designer_index_vue", "target": "element_plus", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/oa-approval/designer/index.vue", "source_location": "L113", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_oa_approval_designer_index_vue", "target": "element_plus", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/oa-approval/designer/index.vue", "source_location": "L114", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_oa_approval_designer_index_vue", "target": "icons_vue", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/oa-approval/designer/index.vue", "source_location": "L115", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_oa_approval_designer_index_vue", "target": "users_wuzilong_work_00code_zkxw_web_admin_src_api_business", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/oa-approval/designer/index.vue", "source_location": "L116", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_oa_approval_designer_index_vue", "target": "users_wuzilong_work_00code_zkxw_web_admin_src_api_oaapproval", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/oa-approval/designer/index.vue", "source_location": "L117", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_oa_approval_designer_index_vue", "target": "users_wuzilong_work_00code_zkxw_web_admin_src_components_oa_approval_flow_tree_flowdesigner_vue", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/oa-approval/designer/index.vue", "source_location": "L118", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_oa_approval_designer_index_vue", "target": "users_wuzilong_work_00code_zkxw_web_admin_src_components_oa_approval_flow_tree_types", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/oa-approval/designer/index.vue", "source_location": "L119", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_oa_approval_designer_index_vue", "target": "users_wuzilong_work_00code_zkxw_web_admin_src_components_oa_approval_oaformdesignerembed_vue", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/oa-approval/designer/index.vue", "source_location": "L120", "weiLine truncated
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_components_oa_approval_flow_tree_conditionruleeditor_vue", "label": "ConditionRuleEditor.vue", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/flow-tree/ConditionRuleEditor.vue", "source_location": "L1"}], "edges": [{"source": "users_wuzilong_work_00code_zkxw_web_admin_src_components_oa_approval_flow_tree_conditionruleeditor_vue", "target": "icons_vue", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/flow-tree/ConditionRuleEditor.vue", "source_location": "L89", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_components_oa_approval_flow_tree_conditionruleeditor_vue", "target": "users_wuzilong_work_00code_zkxw_web_admin_src_components_oa_approval_oa_condition_fields", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/flow-tree/ConditionRuleEditor.vue", "source_location": "L90", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_components_oa_approval_flow_tree_conditionruleeditor_vue", "target": "users_wuzilong_work_00code_zkxw_web_admin_src_components_oa_approval_flow_tree_types", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/flow-tree/ConditionRuleEditor.vue", "source_location": "L95", "weight": 1.0}], "raw_calls": []}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_views_oa_approval_mine_index_vue", "label": "index.vue", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/oa-approval/mine/index.vue", "source_location": "L1"}, {"id": "mine_index_currentprintername", "label": "currentPrinterName()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/oa-approval/mine/index.vue", "source_location": "L117"}, {"id": "mine_index_statustype", "label": "statusType()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/oa-approval/mine/index.vue", "source_location": "L124"}, {"id": "mine_index_statustext", "label": "statusText()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/oa-approval/mine/index.vue", "source_location": "L131"}, {"id": "mine_index_opendetail", "label": "openDetail()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/oa-approval/mine/index.vue", "source_location": "L146"}, {"id": "mine_index_opencopyrestart", "label": "openCopyRestart()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/oa-approval/mine/index.vue", "source_location": "L152"}, {"id": "mine_index_printrow", "label": "printRow()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/oa-approval/mine/index.vue", "source_location": "L160"}, {"id": "mine_index_load", "label": "load()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/oa-approval/mine/index.vue", "source_location": "L182"}], "edges": [{"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_oa_approval_mine_index_vue", "target": "vue_router", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/oa-approval/mine/index.vue", "source_location": "L102", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_oa_approval_mine_index_vue", "target": "element_plus", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/oa-approval/mine/index.vue", "source_location": "L103", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_oa_approval_mine_index_vue", "target": "icons_vue", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/oa-approval/mine/index.vue", "source_location": "L104", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_oa_approval_mine_index_vue", "target": "users_wuzilong_work_00code_zkxw_web_admin_src_api_oaapproval", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/oa-approval/mine/index.vue", "source_location": "L105", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_oa_approval_mine_index_vue", "target": "users_wuzilong_work_00code_zkxw_web_admin_src_store_modules_user", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/oa-approval/mine/index.vue", "source_location": "L106", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_oa_approval_mine_index_vue", "target": "users_wuzilong_work_00code_zkxw_web_admin_src_utils_oa_approval_print", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/oa-approval/mine/index.vue", "source_location": "L107", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_oa_approval_mine_index_vue", "target": "mine_index_currentprintername", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/oa-approval/mine/index.vue", "source_location": "L117", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_oa_approval_mine_index_vue", "target": "mine_index_statustype", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/oa-approval/mine/index.vue", "source_location": "L124", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_oa_approval_mine_index_vue", "target": "mine_index_statustext", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/oa-approval/mine/index.vue", "source_location": "L131", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_oa_approval_mine_index_vue", "target": "mine_index_opendetail", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/oa-approval/mine/index.vuLine truncated
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_oa_fc_host_main_ts", "label": "main.ts", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/oa-fc-host/main.ts", "source_location": "L1"}], "edges": [{"source": "users_wuzilong_work_00code_zkxw_web_admin_src_oa_fc_host_main_ts", "target": "vue", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/oa-fc-host/main.ts", "source_location": "L4", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_oa_fc_host_main_ts", "target": "element_plus", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/oa-fc-host/main.ts", "source_location": "L5", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_oa_fc_host_main_ts", "target": "zh_cn", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/oa-fc-host/main.ts", "source_location": "L6", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_oa_fc_host_main_ts", "target": "icons_vue", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/oa-fc-host/main.ts", "source_location": "L7", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_oa_fc_host_main_ts", "target": "index_css", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/oa-fc-host/main.ts", "source_location": "L8", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_oa_fc_host_main_ts", "target": "designer", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/oa-fc-host/main.ts", "source_location": "L9", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_oa_fc_host_main_ts", "target": "users_wuzilong_work_00code_zkxw_web_admin_src_oa_fc_host_app_vue", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/oa-fc-host/main.ts", "source_location": "L10", "weight": 1.0}], "raw_calls": []}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_components_oa_approval_oaformdesignerembed_vue", "label": "OaFormDesignerEmbed.vue", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/OaFormDesignerEmbed.vue", "source_location": "L1"}], "edges": [], "raw_calls": []}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_types_import_components_d_ts", "label": "components.d.ts", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/types/import/components.d.ts", "source_location": "L1"}], "edges": [], "raw_calls": []}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_types_import_components_d_ts", "label": "components.d.ts", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/types/import/components.d.ts", "source_location": "L1"}], "edges": [], "raw_calls": []}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_components_oa_approval_oaprogresschain_vue", "label": "OaProgressChain.vue", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/OaProgressChain.vue", "source_location": "L1"}, {"id": "oa_approval_oaprogresschain_statustext", "label": "statusText()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/OaProgressChain.vue", "source_location": "L77"}, {"id": "oa_approval_oaprogresschain_statusbadge", "label": "statusBadge()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/OaProgressChain.vue", "source_location": "L94"}, {"id": "oa_approval_oaprogresschain_dotclass", "label": "dotClass()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/OaProgressChain.vue", "source_location": "L103"}, {"id": "oa_approval_oaprogresschain_resolvesourcetext", "label": "resolveSourceText()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/OaProgressChain.vue", "source_location": "L111"}, {"id": "oa_approval_oaprogresschain_avatarchar", "label": "avatarChar()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/OaProgressChain.vue", "source_location": "L123"}], "edges": [{"source": "users_wuzilong_work_00code_zkxw_web_admin_src_components_oa_approval_oaprogresschain_vue", "target": "oa_approval_oaprogresschain_statustext", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/OaProgressChain.vue", "source_location": "L77", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_components_oa_approval_oaprogresschain_vue", "target": "oa_approval_oaprogresschain_statusbadge", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/OaProgressChain.vue", "source_location": "L94", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_components_oa_approval_oaprogresschain_vue", "target": "oa_approval_oaprogresschain_dotclass", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/OaProgressChain.vue", "source_location": "L103", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_components_oa_approval_oaprogresschain_vue", "target": "oa_approval_oaprogresschain_resolvesourcetext", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/OaProgressChain.vue", "source_location": "L111", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_components_oa_approval_oaprogresschain_vue", "target": "oa_approval_oaprogresschain_avatarchar", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/OaProgressChain.vue", "source_location": "L123", "weight": 1.0}], "raw_calls": [{"caller_nid": "oa_approval_oaprogresschain_avatarchar", "callee": "trim", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/OaProgressChain.vue", "source_location": "L124"}, {"caller_nid": "oa_approval_oaprogresschain_avatarchar", "callee": "slice", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/OaProgressChain.vue", "source_location": "L125"}]}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_views_oa_approval_instances_detail_vue", "label": "detail.vue", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/oa-approval/instances/detail.vue", "source_location": "L1"}], "edges": [], "raw_calls": []}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_views_oa_approval_cc_index_vue", "label": "index.vue", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/oa-approval/cc/index.vue", "source_location": "L1"}, {"id": "cc_index_currentprintername", "label": "currentPrinterName()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/oa-approval/cc/index.vue", "source_location": "L106"}, {"id": "cc_index_statustype", "label": "statusType()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/oa-approval/cc/index.vue", "source_location": "L113"}, {"id": "cc_index_statustext", "label": "statusText()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/oa-approval/cc/index.vue", "source_location": "L120"}, {"id": "cc_index_opendetail", "label": "openDetail()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/oa-approval/cc/index.vue", "source_location": "L135"}, {"id": "cc_index_printrow", "label": "printRow()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/oa-approval/cc/index.vue", "source_location": "L141"}, {"id": "cc_index_load", "label": "load()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/oa-approval/cc/index.vue", "source_location": "L163"}], "edges": [{"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_oa_approval_cc_index_vue", "target": "vue_router", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/oa-approval/cc/index.vue", "source_location": "L91", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_oa_approval_cc_index_vue", "target": "element_plus", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/oa-approval/cc/index.vue", "source_location": "L92", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_oa_approval_cc_index_vue", "target": "icons_vue", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/oa-approval/cc/index.vue", "source_location": "L93", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_oa_approval_cc_index_vue", "target": "users_wuzilong_work_00code_zkxw_web_admin_src_api_oaapproval", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/oa-approval/cc/index.vue", "source_location": "L94", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_oa_approval_cc_index_vue", "target": "users_wuzilong_work_00code_zkxw_web_admin_src_store_modules_user", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/oa-approval/cc/index.vue", "source_location": "L95", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_oa_approval_cc_index_vue", "target": "users_wuzilong_work_00code_zkxw_web_admin_src_utils_oa_approval_print", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/oa-approval/cc/index.vue", "source_location": "L96", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_oa_approval_cc_index_vue", "target": "cc_index_currentprintername", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/oa-approval/cc/index.vue", "source_location": "L106", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_oa_approval_cc_index_vue", "target": "cc_index_statustype", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/oa-approval/cc/index.vue", "source_location": "L113", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_oa_approval_cc_index_vue", "target": "cc_index_statustext", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/oa-approval/cc/index.vue", "source_location": "L120", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_oa_approval_cc_index_vue", "target": "cc_index_opendetail", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/oa-approval/cc/index.vue", "source_location": "L135", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_web_admin_src_views_oa_approval_cc_index_vue", "target": "cc_index_printrow", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/oa-apprLine truncated
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_types_import_components_d_ts", "label": "components.d.ts", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/types/import/components.d.ts", "source_location": "L1"}], "edges": [], "raw_calls": []}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_web_admin_src_oa_fc_host_app_vue", "label": "App.vue", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/oa-fc-host/App.vue", "source_location": "L1"}, {"id": "oa_fc_host_app_if", "label": "if()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/oa-fc-host/App.vue", "source_location": "L167"}], "edges": [{"source": "users_wuzilong_work_00code_zkxw_web_admin_src_oa_fc_host_app_vue", "target": "oa_fc_host_app_if", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/oa-fc-host/App.vue", "source_location": "L167", "weight": 1.0}], "raw_calls": [{"caller_nid": "oa_fc_host_app_if", "callee": "setTimeout", "source_file": "/Users/wuzilong/work/00code/zkxw/web-admin/src/oa-fc-host/App.vue", "source_location": "L168"}]}
-2
View File
@@ -15,7 +15,6 @@ import { setupGlobDirectives } from './directives'
import { setupErrorHandle } from './utils/sys/error-handle'
import FcDesigner from '@form-create/designer'
import formCreateAutoImport from '@form-create/element-ui/auto-import'
import { installOaFormComponents } from '@/components/oa-approval/oa-form-components'
// FormCreate 按字符串解析 el-input / fc-radio 等,主应用是按需自动导入,不会全局注册;
// 必须挂上官方 auto-import,否则发起审批/详情里动态表单控件会残缺(如单选项只剩文字)。
@@ -65,5 +64,4 @@ setupErrorHandle(app)
app.use(language)
app.use(FcDesigner)
app.use(FcDesigner.formCreate)
installOaFormComponents(app, FcDesigner.formCreate)
app.mount('#app')
-7
View File
@@ -24,7 +24,6 @@
import { nextTick, onBeforeUnmount, onMounted, ref } from 'vue'
import { ElMessage } from 'element-plus'
import formCreateZh from '@form-create/designer/locale/zh-cn'
import { registerOaDesignerAttachment } from '@/components/oa-approval/oa-form-components'
import { CONDITION_ELIGIBLE_TYPES } from '@/components/oa-approval/oa-condition-fields'
defineOptions({ name: 'OaFcHostApp' })
@@ -34,8 +33,6 @@
getOption?: () => unknown
setRule?: (rule: unknown[]) => void
setOption?: (option: unknown) => void
addComponent?: (...args: any[]) => void
addMenu?: (...args: any[]) => void
}
const designerRef = ref<DesignerApi | null>(null)
@@ -219,10 +216,6 @@
window.addEventListener('message', onMessage)
await nextTick()
await nextTick()
const d = getDesigner()
if (d) {
registerOaDesignerAttachment(d)
}
removeFormCreateBrand()
brandObserver = new MutationObserver(() => removeFormCreateBrand())
brandObserver.observe(document.body, { childList: true, subtree: true })
-2
View File
@@ -7,7 +7,6 @@ import zhCn from 'element-plus/es/locale/lang/zh-cn'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import 'element-plus/dist/index.css'
import FcDesigner from '@form-create/designer'
import { installOaFormComponents } from '@/components/oa-approval/oa-form-components'
import App from './App.vue'
const app = createApp(App)
@@ -19,5 +18,4 @@ for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
app.use(ElementPlus, { locale: zhCn })
app.use(FcDesigner)
app.use(FcDesigner.formCreate)
installOaFormComponents(app, FcDesigner.formCreate)
app.mount('#app')
+420
View File
@@ -0,0 +1,420 @@
/**
* OA 审批单钉钉风格 PDF 导出
* Spec: docs/superpowers/specs/2026-07-15-oa-approval-print-pdf-design.md
*/
import { createApp, h, nextTick } from 'vue'
import html2canvas from 'html2canvas'
import { jsPDF } from 'jspdf'
export const OA_PRINT_COMPANY_NAME = '安徽中科兴皖医学研究有限公司'
export type OaStampClass = 'ok' | 'run' | 'rej' | 'ret' | 'can'
export type OaPrintFieldRow = {
label: string
/** 普通文本(可含换行) */
text?: string
/** 附件 / 链接列表 */
urls?: string[]
}
export type OaPrintFlowItem = {
left: string
right: string
comment?: string
}
export type OaPrintModel = {
title: string
companyName: string
createDate: string
stampClass: OaStampClass
stampText: string
rows: OaPrintFieldRow[]
flowItems: OaPrintFlowItem[]
printTime: string
printerName: string
watermarkName: string
}
const STATUS_TEXT: Record<string, string> = {
pending: '待处理',
running: '进行中',
approved: '已同意',
rejected: '已拒绝',
completed: '已完成',
cancelled: '已撤销',
done: '已结束',
submitted: '已提交',
not_reached: '未到达',
returned: '已打回'
}
const UPLOAD_TYPES = new Set([
'upload',
'fcUpload',
'elUpload',
'el-upload',
'attachment',
'file',
'files'
])
const SKIP_RULE_TYPES = new Set([
'div',
'fcRow',
'fcCol',
'fcTable',
'fcTableGrid',
'col',
'row',
'group',
'tab',
'tabs',
'space',
'divider',
'html',
'vanCellGroup'
])
export function resolveStamp(status: string | undefined | null): {
stampClass: OaStampClass
stampText: string
} {
const s = String(status || '').trim()
if (s === 'completed' || s === 'approved' || s === 'done') {
return { stampClass: 'ok', stampText: '已通过' }
}
if (s === 'rejected') return { stampClass: 'rej', stampText: '已拒绝' }
if (s === 'returned') return { stampClass: 'ret', stampText: '已打回' }
if (s === 'cancelled') return { stampClass: 'can', stampText: '已撤销' }
if (s === 'running' || s === 'pending') {
return { stampClass: 'run', stampText: '审批中' }
}
return { stampClass: 'run', stampText: '审批中' }
}
function statusText(s: string) {
return STATUS_TEXT[s] || s || '-'
}
function formatDateOnly(createTime: string | undefined | null): string {
const raw = String(createTime || '').trim()
if (!raw) return '-'
return raw.slice(0, 10)
}
function formatNow(): string {
const d = new Date()
const pad = (n: number) => String(n).padStart(2, '0')
return `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())} ${pad(d.getHours())}:${pad(d.getMinutes())}:${pad(d.getSeconds())}`
}
function isHttpUrl(s: string) {
return /^https?:\/\//i.test(s)
}
function extractUrls(value: unknown): string[] {
if (value == null || value === '') return []
if (Array.isArray(value)) {
const out: string[] = []
for (const item of value) {
if (typeof item === 'string') {
const parts = item
.split(',')
.map((x) => x.trim())
.filter(Boolean)
out.push(...parts)
} else if (item && typeof item === 'object') {
const u = (item as any).url || (item as any).fileUrl || (item as any).path
if (u) out.push(String(u))
}
}
return out
}
if (typeof value === 'string') {
return value
.split(',')
.map((x) => x.trim())
.filter(Boolean)
}
if (typeof value === 'object') {
const u = (value as any).url || (value as any).fileUrl
return u ? [String(u)] : []
}
return []
}
function formatScalar(value: unknown): string {
if (value == null || value === '') return '-'
if (typeof value === 'boolean') return value ? '是' : '否'
if (typeof value === 'number') return String(value)
if (typeof value === 'string') return value.trim() || '-'
if (Array.isArray(value)) {
if (!value.length) return '-'
return value
.map((v) => formatScalar(v))
.filter((s) => s && s !== '-')
.join('、')
}
if (typeof value === 'object') {
try {
return JSON.stringify(value)
} catch {
return String(value)
}
}
return String(value)
}
function walkRules(rules: any[], formData: Record<string, any>, out: OaPrintFieldRow[]) {
if (!Array.isArray(rules)) return
for (const rule of rules) {
if (!rule || typeof rule !== 'object') continue
const type = String(rule.type || '').trim()
const children = rule.children || rule.props?.rule
if (Array.isArray(children) && children.length) {
walkRules(children, formData, out)
}
if (SKIP_RULE_TYPES.has(type)) continue
const field = String(rule.field || '').trim()
if (!field) continue
const label = String(rule.title || rule.label || rule.props?.label || field).trim() || field
const value = formData?.[field]
if (UPLOAD_TYPES.has(type) || String(rule.name || '').toLowerCase().includes('upload')) {
const urls = extractUrls(value)
out.push({ label, urls: urls.length ? urls : [], text: urls.length ? undefined : '-' })
continue
}
// 字符串里像 URL 列表的也拆开展示
if (typeof value === 'string' && value.includes('http') && value.includes(',')) {
const urls = extractUrls(value).filter(isHttpUrl)
if (urls.length >= 2) {
out.push({ label, urls })
continue
}
}
const urls = extractUrls(value).filter(isHttpUrl)
if (urls.length && (Array.isArray(value) || UPLOAD_TYPES.has(type))) {
out.push({ label, urls })
continue
}
out.push({ label, text: formatScalar(value) })
}
}
function buildFormRows(detail: any): OaPrintFieldRow[] {
const schema = detail?.formSchemaJson
const formData = (detail?.formDataJson || {}) as Record<string, any>
const rule = Array.isArray(schema?.rule)
? schema.rule
: Array.isArray(schema)
? schema
: []
const out: OaPrintFieldRow[] = []
walkRules(rule, formData, out)
if (out.length) return out
// schema 缺失:兜底平铺 formData
for (const [k, v] of Object.entries(formData)) {
const urls = extractUrls(v).filter(isHttpUrl)
if (urls.length) out.push({ label: k, urls })
else out.push({ label: k, text: formatScalar(v) })
}
return out
}
function buildFlowItems(detail: any): OaPrintFlowItem[] {
const list = Array.isArray(detail?.progress) ? detail.progress : []
const items: OaPrintFlowItem[] = []
// 聚合连续抄送任务,接近钉钉「抄送A,B,C」
let ccBuf: { names: string[]; ts: string } | null = null
const flushCc = () => {
if (!ccBuf) return
items.push({
left: `抄送${ccBuf.names.join(',')}`,
right: ccBuf.ts || ''
})
ccBuf = null
}
for (const p of list) {
const kind = String(p.kind || '')
const taskType = String(p.taskType || '')
const title = String(p.title || '-').trim()
const name = String(p.assigneeUserName || p.assigneeUserId || '').trim()
const ts = String(p.timestamp || '').trim()
const comment = String(p.commentText || '').trim()
const st = statusText(String(p.status || ''))
if (taskType === 'cc') {
if (!ccBuf) ccBuf = { names: [], ts }
if (name) ccBuf.names.push(name)
if (ts) ccBuf.ts = ts
continue
}
flushCc()
if (kind === 'submit') {
items.push({
left: name ? `【${title}】 ${name} ${st}` : `【${title}】 ${st}`,
right: ts,
comment: comment || undefined
})
continue
}
if (kind === 'terminal') {
items.push({
left: title || st,
right: ts
})
continue
}
if (kind === 'pending_node') {
items.push({
left: `【${title}】 ${st}`,
right: ts
})
continue
}
// task
items.push({
left: name ? `【${title}】 ${name} ${st}` : `【${title}】 ${st}`,
right: ts,
comment: comment || undefined
})
}
flushCc()
return items
}
export function buildOaPrintModel(
detail: any,
opts: { printerName: string; printTime?: string }
): OaPrintModel {
const { stampClass, stampText } = resolveStamp(detail?.status)
const appName = String(detail?.appName || '').trim()
const titleFallback = String(detail?.title || '').trim()
const title = appName || titleFallback || '审批单'
const printerName = String(opts.printerName || '').trim() || '-'
const printTime = opts.printTime || formatNow()
const headerRows: OaPrintFieldRow[] = [
{ label: '审批编号', text: String(detail?.id || '-').trim() || '-' },
{
label: '创建人',
text: String(detail?.initiatorUserName || detail?.initiatorUserId || '-').trim() || '-'
},
{
label: '创建人部门',
text:
String(detail?.initiatorDeptName || detail?.initiatorDept || '-').trim() || '-'
}
]
return {
title,
companyName: OA_PRINT_COMPANY_NAME,
createDate: formatDateOnly(detail?.createTime),
stampClass,
stampText,
rows: [...headerRows, ...buildFormRows(detail)],
flowItems: buildFlowItems(detail),
printTime,
printerName,
watermarkName: printerName === '-' ? '审批' : printerName
}
}
export function buildOaPrintFilename(detail: any): string {
const initiator =
String(detail?.initiatorUserName || '').trim() ||
String(detail?.initiatorUserId || '').trim() ||
'用户'
const appName =
String(detail?.appName || '').trim() ||
String(detail?.title || '').trim() ||
'审批单'
const safe = (s: string) => s.replace(/[\\/:*?"<>|]/g, '_').slice(0, 80)
return `${safe(initiator)}提交的${safe(appName)}.pdf`
}
async function canvasToPdf(canvas: HTMLCanvasElement, filename: string) {
const pdf = new jsPDF({ orientation: 'p', unit: 'mm', format: 'a4' })
const pageWidth = pdf.internal.pageSize.getWidth()
const pageHeight = pdf.internal.pageSize.getHeight()
const imgWidth = pageWidth
const imgHeight = (canvas.height * imgWidth) / canvas.width
const pageData = canvas.toDataURL('image/jpeg', 0.95)
let heightLeft = imgHeight
let position = 0
let pageIndex = 0
while (heightLeft > 0) {
if (pageIndex > 0) pdf.addPage()
pdf.addImage(pageData, 'JPEG', 0, position, imgWidth, imgHeight)
// 页码
const totalHint = Math.max(1, Math.ceil(imgHeight / pageHeight))
pdf.setFontSize(10)
pdf.setTextColor(100)
pdf.text(`第 ${pageIndex + 1} 页`, pageWidth / 2, pageHeight - 8, { align: 'center' })
void totalHint
heightLeft -= pageHeight
position -= pageHeight
pageIndex += 1
// 安全上限
if (pageIndex > 40) break
}
pdf.save(filename)
}
/**
* 根据实例详情导出 PDF(不弹系统打印框)
*/
export async function exportOaApprovalPdf(
detail: any,
opts: { printerName: string }
): Promise<void> {
const model = buildOaPrintModel(detail, { printerName: opts.printerName })
const filename = buildOaPrintFilename(detail)
const { default: OaApprovalPrintSheet } = await import(
'@/components/oa-approval/OaApprovalPrintSheet.vue'
)
const host = document.createElement('div')
host.setAttribute('data-oa-print-host', '1')
host.style.cssText =
'position:fixed;left:-100000px;top:0;width:794px;z-index:-1;opacity:1;pointer-events:none;'
document.body.appendChild(host)
const app = createApp({
render: () => h(OaApprovalPrintSheet, { model })
})
app.mount(host)
try {
await nextTick()
// 给浏览器一帧完成布局 / 字体
await new Promise((r) => requestAnimationFrame(() => r(undefined)))
await new Promise((r) => setTimeout(r, 50))
const el = host.querySelector('.oa-print-page') as HTMLElement | null
if (!el) throw new Error('print sheet missing')
const canvas = await html2canvas(el, {
scale: 2,
useCORS: true,
allowTaint: true,
backgroundColor: '#ffffff',
logging: false,
windowWidth: el.scrollWidth,
windowHeight: el.scrollHeight
})
await canvasToPdf(canvas, filename)
} finally {
app.unmount()
host.remove()
}
}
+45 -3
View File
@@ -64,12 +64,20 @@
</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" min-width="260" fixed="right" align="center">
<el-table-column label="操作" min-width="300" fixed="right" align="center">
<template #default="{ row }">
<el-button class="btn-op-item primary" @click="openDetail(row)">
<el-icon><View /></el-icon>
查看
</el-button>
<el-button
class="btn-op-item"
:loading="printingId === (row.instanceId || row.id)"
@click="printRow(row)"
>
<el-icon><Printer /></el-icon>
打印
</el-button>
</template>
</el-table-column>
</el-table>
@@ -81,15 +89,27 @@
<script setup lang="ts">
import { onActivated, onMounted, ref } from 'vue'
import { useRouter } from 'vue-router'
import { View } from '@element-plus/icons-vue'
import { fetchOaTasks } from '@/api/oaApproval'
import { ElMessage } from 'element-plus'
import { Printer, View } from '@element-plus/icons-vue'
import { fetchOaInstanceDetail, fetchOaTasks } from '@/api/oaApproval'
import { useUserStore } from '@/store/modules/user'
import { exportOaApprovalPdf } from '@/utils/oa-approval-print'
defineOptions({ name: 'OaApprovalCc' })
const router = useRouter()
const userStore = useUserStore()
const loading = ref(false)
const printingId = ref('')
const rows = ref<any[]>([])
function currentPrinterName() {
const info: any = userStore.info || userStore.getUserInfo || {}
return String(
info.realName || info.nickName || info.userName || info.username || ''
).trim()
}
function statusType(s: string) {
if (s === 'pending' || s === 'running') return 'warning'
if (s === 'approved' || s === 'completed' || s === 'done') return 'success'
@@ -118,6 +138,28 @@
router.push({ path: `/system-manage/oa-approval/instances/${id}` })
}
async function printRow(row: any) {
const id = String(row?.instanceId || row?.id || '').trim()
if (!id || printingId.value) return
printingId.value = id
let detail: any
try {
detail = await fetchOaInstanceDetail(id)
} catch {
printingId.value = ''
ElMessage.error('加载审批单失败')
return
}
try {
await exportOaApprovalPdf(detail, { printerName: currentPrinterName() })
ElMessage.success('PDF 已下载')
} catch {
ElMessage.error('导出 PDF 失败')
} finally {
printingId.value = ''
}
}
async function load() {
loading.value = true
try {
+45 -3
View File
@@ -64,12 +64,20 @@
</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" min-width="260" fixed="right" align="center">
<el-table-column label="操作" min-width="340" fixed="right" align="center">
<template #default="{ row }">
<el-button class="btn-op-item primary" @click="openDetail(row)">
<el-icon><View /></el-icon>
查看
</el-button>
<el-button
class="btn-op-item"
:loading="printingId === row.id"
@click="printRow(row)"
>
<el-icon><Printer /></el-icon>
打印
</el-button>
<el-button
v-if="
row.appId &&
@@ -92,15 +100,27 @@
<script setup lang="ts">
import { onActivated, onMounted, ref } from 'vue'
import { useRouter } from 'vue-router'
import { RefreshRight, View } from '@element-plus/icons-vue'
import { fetchOaTasks } from '@/api/oaApproval'
import { ElMessage } from 'element-plus'
import { Printer, RefreshRight, View } from '@element-plus/icons-vue'
import { fetchOaInstanceDetail, fetchOaTasks } from '@/api/oaApproval'
import { useUserStore } from '@/store/modules/user'
import { exportOaApprovalPdf } from '@/utils/oa-approval-print'
defineOptions({ name: 'OaApprovalMine' })
const router = useRouter()
const userStore = useUserStore()
const loading = ref(false)
const printingId = ref('')
const rows = ref<any[]>([])
function currentPrinterName() {
const info: any = userStore.info || userStore.getUserInfo || {}
return String(
info.realName || info.nickName || info.userName || info.username || ''
).trim()
}
function statusType(s: string) {
if (s === 'pending' || s === 'running') return 'warning'
if (s === 'approved' || s === 'completed' || s === 'done') return 'success'
@@ -137,6 +157,28 @@
})
}
async function printRow(row: any) {
const id = String(row?.id || '').trim()
if (!id || printingId.value) return
printingId.value = id
let detail: any
try {
detail = await fetchOaInstanceDetail(id)
} catch {
printingId.value = ''
ElMessage.error('加载审批单失败')
return
}
try {
await exportOaApprovalPdf(detail, { printerName: currentPrinterName() })
ElMessage.success('PDF 已下载')
} catch {
ElMessage.error('导出 PDF 失败')
} finally {
printingId.value = ''
}
}
async function load() {
loading.value = true
try {