Skip to content

Commit de91dec

Browse files
author
zhangtao
committed
style(web): 优化各新增编辑表单为双列布局
1 parent 2ce1f68 commit de91dec

11 files changed

Lines changed: 73 additions & 44 deletions

File tree

‎frontend/web/src/views/module_ops/dbconsole/index.vue‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -447,43 +447,43 @@ const formItems = computed<FormItem[]>(() => [
447447
label: "名称",
448448
key: "name",
449449
type: "input",
450-
span: 24,
450+
span: 12,
451451
props: { placeholder: "唯一名称", maxlength: 64 },
452452
},
453453
{
454454
label: "类型",
455455
key: "db_type",
456456
type: "select",
457-
span: 24,
457+
span: 12,
458458
props: {
459459
options: [
460460
{ label: "MySQL", value: "mysql" },
461461
{ label: "PostgreSQL", value: "postgres" },
462462
],
463463
},
464464
},
465-
{ label: "主机", key: "host", type: "input", span: 24, props: { placeholder: "如 127.0.0.1" } },
465+
{ label: "主机", key: "host", type: "input", span: 12, props: { placeholder: "如 127.0.0.1" } },
466466
{
467467
label: "端口",
468468
key: "port",
469469
type: "number",
470-
span: 24,
470+
span: 12,
471471
props: { controlsPosition: "right", min: 1, max: 65535, style: { width: "160px" } },
472472
},
473-
{ label: "用户名", key: "username", type: "input", span: 24 },
473+
{ label: "用户名", key: "username", type: "input", span: 12 },
474474
{
475475
label: "密码",
476476
key: "password",
477477
type: "input",
478-
span: 24,
478+
span: 12,
479479
props: { type: "password", showPassword: true, placeholder: "修改时不填表示不变" },
480480
},
481-
{ label: "默认库", key: "database", type: "input", span: 24, props: { placeholder: "可空" } },
481+
{ label: "默认库", key: "database", type: "input", span: 12, props: { placeholder: "可空" } },
482482
{
483483
label: "状态",
484484
key: "status",
485485
type: "radiogroup",
486-
span: 24,
486+
span: 12,
487487
props: {
488488
options: [
489489
{ label: "启用", value: 0 },

‎frontend/web/src/views/module_ops/ssh/index.vue‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -495,21 +495,21 @@ const formData = ref<SshHostFormModel>({ ...initialFormData });
495495
const formItems = computed<FormItem[]>(() => {
496496
const isKey = formData.value.auth_type === "key";
497497
return [
498-
{ label: "名称", key: "name", type: "input", span: 24, props: { placeholder: "唯一名称" } },
499-
{ label: "地址", key: "host", type: "input", span: 24, props: { placeholder: "如 10.0.0.1" } },
498+
{ label: "名称", key: "name", type: "input", span: 12, props: { placeholder: "唯一名称" } },
499+
{ label: "地址", key: "host", type: "input", span: 12, props: { placeholder: "如 10.0.0.1" } },
500500
{
501501
label: "端口",
502502
key: "port",
503503
type: "number",
504-
span: 24,
504+
span: 12,
505505
props: { controlsPosition: "right", min: 1, max: 65535, style: { width: "160px" } },
506506
},
507-
{ label: "用户名", key: "username", type: "input", span: 24 },
507+
{ label: "用户名", key: "username", type: "input", span: 12 },
508508
{
509509
label: "认证方式",
510510
key: "auth_type",
511511
type: "radiogroup",
512-
span: 24,
512+
span: 12,
513513
props: {
514514
options: [
515515
{ label: "密码", value: "password" },
@@ -521,7 +521,7 @@ const formItems = computed<FormItem[]>(() => {
521521
label: "密码",
522522
key: "password",
523523
type: "input",
524-
span: 24,
524+
span: 12,
525525
hidden: isKey,
526526
props: { type: "password", showPassword: true, placeholder: "修改时不填表示不变" },
527527
},
@@ -537,15 +537,15 @@ const formItems = computed<FormItem[]>(() => {
537537
label: "私钥口令",
538538
key: "passphrase",
539539
type: "input",
540-
span: 24,
540+
span: 12,
541541
hidden: !isKey,
542542
props: { type: "password", showPassword: true, placeholder: "可选" },
543543
},
544544
{
545545
label: "状态",
546546
key: "status",
547547
type: "radiogroup",
548-
span: 24,
548+
span: 12,
549549
props: {
550550
options: [
551551
{ label: "启用", value: 0 },
@@ -618,12 +618,12 @@ const initialSnippetForm: SshSnippetFormModel = {
618618
const snippetFormData = ref<SshSnippetFormModel>({ ...initialSnippetForm });
619619
620620
const snippetFormItems = computed<FormItem[]>(() => [
621-
{ label: "名称", key: "name", type: "input", span: 24 },
621+
{ label: "名称", key: "name", type: "input", span: 12 },
622622
{
623623
label: "命令",
624624
key: "command",
625625
type: "input",
626-
span: 24,
626+
span: 12,
627627
props: { type: "textarea", rows: 4, placeholder: "如 df -h" },
628628
},
629629
{ label: "备注", key: "description", type: "input", span: 24 },

‎frontend/web/src/views/module_system/dept/index.vue‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -578,12 +578,14 @@ const deptDialogFormItems = computed<FormItem[]>(() => [
578578
{
579579
label: "部门名称",
580580
key: "name",
581+
span: 12,
581582
type: "input",
582583
props: { placeholder: "请输入部门名称", maxlength: 50 },
583584
},
584585
{
585586
label: "部门编码",
586587
key: "code",
588+
span: 12,
587589
type: "input",
588590
props: {
589591
placeholder: "字母开头,2-16位字母/数字/下划线",
@@ -594,6 +596,7 @@ const deptDialogFormItems = computed<FormItem[]>(() => [
594596
{
595597
label: "上级部门",
596598
key: "parent_id",
599+
span: 12,
597600
type: "treeselect",
598601
props: {
599602
placeholder: "请选择上级部门",
@@ -606,6 +609,7 @@ const deptDialogFormItems = computed<FormItem[]>(() => [
606609
{
607610
label: "排序",
608611
key: "order",
612+
span: 12,
609613
type: "number",
610614
props: {
611615
controlsPosition: "right",
@@ -616,6 +620,7 @@ const deptDialogFormItems = computed<FormItem[]>(() => [
616620
{
617621
label: "状态",
618622
key: "status",
623+
span: 12,
619624
type: "radiogroup",
620625
props: {
621626
options: [

‎frontend/web/src/views/module_system/dict/components/DictDataPanel.vue‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,7 @@ const dictDataDialogFormItems = computed<FormItem[]>(() => [
517517
{
518518
label: "数据类型",
519519
key: "dict_type",
520+
span: 12,
520521
type: "input",
521522
props: {
522523
placeholder: "请输入数据类型",
@@ -527,28 +528,33 @@ const dictDataDialogFormItems = computed<FormItem[]>(() => [
527528
{
528529
label: "数据标签",
529530
key: "dict_label",
531+
span: 12,
530532
type: "input",
531533
props: { placeholder: "请输入数据标签", maxlength: 255 },
532534
},
533535
{
534536
label: "数据值",
535537
key: "dict_value",
538+
span: 12,
536539
type: "input",
537540
props: { placeholder: "请输入数据值", maxlength: 255 },
538541
},
539542
{
540543
label: "样式属性",
541544
key: "css_class",
545+
span: 12,
542546
type: "input",
543547
},
544548
{
545549
label: "列表类样式",
546550
key: "list_class",
551+
span: 12,
547552
type: "input",
548553
},
549554
{
550555
label: "是否默认",
551556
key: "is_default",
557+
span: 12,
552558
type: "radiogroup",
553559
props: {
554560
options: [
@@ -560,6 +566,7 @@ const dictDataDialogFormItems = computed<FormItem[]>(() => [
560566
{
561567
label: "排序",
562568
key: "dict_sort",
569+
span: 12,
563570
type: "number",
564571
props: {
565572
controlsPosition: "right",
@@ -570,6 +577,7 @@ const dictDataDialogFormItems = computed<FormItem[]>(() => [
570577
{
571578
label: "状态",
572579
key: "status",
580+
span: 12,
573581
type: "switch",
574582
props: {
575583
activeValue: 0,

‎frontend/web/src/views/module_system/dict/index.vue‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,18 +254,21 @@ const dictDialogFormItems = computed<FormItem[]>(() => [
254254
{
255255
label: "字典名称",
256256
key: "dict_name",
257+
span: 12,
257258
type: "input",
258259
props: { placeholder: "请输入字典名称", maxlength: 50 },
259260
},
260261
{
261262
label: "字典类型",
262263
key: "dict_type",
264+
span: 12,
263265
type: "input",
264266
props: { placeholder: "请输入字典类型", maxlength: 50 },
265267
},
266268
{
267269
label: "状态",
268270
key: "status",
271+
span: 12,
269272
type: "radiogroup",
270273
props: {
271274
options: [

‎frontend/web/src/views/module_system/notice/index.vue‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -426,14 +426,14 @@ const noticeDialogFormItems = computed<FormItem[]>(() => [
426426
label: "标题",
427427
key: "notice_title",
428428
type: "input",
429-
span: 24,
429+
span: 12,
430430
props: { placeholder: "请输入标题", maxlength: 50 },
431431
},
432432
{
433433
label: "描述",
434434
key: "description",
435435
type: "input",
436-
span: 24,
436+
span: 12,
437437
props: {
438438
type: "textarea",
439439
rows: 2,
@@ -446,7 +446,7 @@ const noticeDialogFormItems = computed<FormItem[]>(() => [
446446
label: "类型",
447447
key: "notice_type",
448448
type: "select",
449-
span: 24,
449+
span: 12,
450450
props: {
451451
placeholder: "请选择类型",
452452
clearable: true,
@@ -457,7 +457,7 @@ const noticeDialogFormItems = computed<FormItem[]>(() => [
457457
})),
458458
},
459459
},
460-
{ key: "status", label: "状态", type: "radiogroup", span: 24 },
460+
{ key: "status", label: "状态", type: "radiogroup", span: 12 },
461461
{
462462
label: "内容",
463463
key: "notice_content",

‎frontend/web/src/views/module_system/position/index.vue‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -548,28 +548,28 @@ const positionDialogFormItems = computed<FormItem[]>(() => [
548548
label: "岗位名称",
549549
key: "name",
550550
type: "input",
551-
span: 24,
551+
span: 12,
552552
props: { placeholder: "请输入岗位名称", maxlength: 50 },
553553
},
554554
{
555555
label: "岗位编码",
556556
key: "code",
557557
type: "input",
558-
span: 24,
558+
span: 12,
559559
props: { placeholder: "请输入岗位编码", maxlength: 64 },
560560
},
561561
{
562562
label: "排序",
563563
key: "order",
564564
type: "number",
565-
span: 24,
565+
span: 12,
566566
props: { controlsPosition: "right", min: 1 },
567567
},
568568
{
569569
label: "状态",
570570
key: "status",
571571
type: "radiogroup",
572-
span: 24,
572+
span: 12,
573573
props: {
574574
options: [
575575
{ label: "启用", value: 0 },

‎frontend/web/src/views/module_system/role/index.vue‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -598,14 +598,14 @@ const roleDialogFormItems = computed<FormItem[]>(() => [
598598
label: "角色名称",
599599
key: "name",
600600
type: "input",
601-
span: 24,
601+
span: 12,
602602
props: { placeholder: "请输入角色名称" },
603603
},
604604
{
605605
label: "排序",
606606
key: "order",
607607
type: "number",
608-
span: 24,
608+
span: 12,
609609
props: {
610610
controlsPosition: "right",
611611
min: 0,
@@ -616,7 +616,7 @@ const roleDialogFormItems = computed<FormItem[]>(() => [
616616
label: "角色编码",
617617
key: "code",
618618
type: "input",
619-
span: 24,
619+
span: 12,
620620
props: {
621621
placeholder: "字母开头,2-64位字母/数字/下划线",
622622
maxlength: 64,
@@ -627,7 +627,7 @@ const roleDialogFormItems = computed<FormItem[]>(() => [
627627
label: "状态",
628628
key: "status",
629629
type: "radiogroup",
630-
span: 24,
630+
span: 12,
631631
props: {
632632
options: [
633633
{ label: "启用", value: 0 },

‎frontend/web/src/views/module_system/ticket/index.vue‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -777,7 +777,7 @@ const ticketDialogFormItems = computed<FormItem[]>(() => [
777777
label: "工单标题",
778778
key: "title",
779779
type: "input",
780-
span: 24,
780+
span: 12,
781781
props: { placeholder: "请输入工单标题", maxlength: 200 },
782782
},
783783
{
@@ -794,7 +794,7 @@ const ticketDialogFormItems = computed<FormItem[]>(() => [
794794
span: 12,
795795
placeholder: "",
796796
},
797-
{ key: "status", label: "状态", type: "radiogroup", span: 24 },
797+
{ key: "status", label: "状态", type: "radiogroup", span: 12 },
798798
{
799799
label: "详细描述",
800800
key: "ticket_content",

0 commit comments

Comments
 (0)