From d2f4fc1547653cd26c054fa89c41b768358892fd Mon Sep 17 00:00:00 2001 From: Fam Zheng Date: Sat, 1 Mar 2025 13:07:46 +0000 Subject: [PATCH] web: Allow edit mini_prog_entry_path --- web/src/views/code-batch.vue | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/web/src/views/code-batch.vue b/web/src/views/code-batch.vue index 70d9f53..24bbe2d 100644 --- a/web/src/views/code-batch.vue +++ b/web/src/views/code-batch.vue @@ -5,8 +5,8 @@ no_details=1 show_search=1 :list_fields="['id', 'name', 'datetime', 'code_prefix', 'tenant__username', 'is_active', 'code__count']" - :visible_fields="['id', 'name', 'description', 'qr_angle', 'qr_angle_allowed_error', 'datetime', 'code_prefix', 'is_active', 'code__count', 'scan_redirect_url', 'enable_auto_torch']" - :editable_fields="['qr_angle', 'name', 'qr_angle_allowed_error', 'code_prefix', 'description', 'is_active', 'feature_comparison_threshold', 'scan_redirect_url', 'enable_auto_torch', 'camera_sensitivity']" + :visible_fields="visible_fields" + :editable_fields="editable_fields" :actions="actions" ref="gm" /> @@ -65,6 +65,37 @@ export default { }; }, computed: { + editable_fields: function() { + return [ + 'qr_angle', + 'name', + 'qr_angle_allowed_error', + 'code_prefix', + 'description', + 'is_active', + 'feature_comparison_threshold', + 'scan_redirect_url', + 'enable_auto_torch', + 'camera_sensitivity', + 'mini_prog_entry_path', + ]; + }, + visible_fields: function() { + return [ + 'id', + 'name', + 'description', + 'qr_angle', + 'qr_angle_allowed_error', + 'datetime', + 'code_prefix', + 'is_active', + 'code__count', + 'scan_redirect_url', + 'enable_auto_torch', + 'mini_prog_entry_path', + ]; + }, }, methods: { handle_gen_code: function(item) {