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) {