check-template.txt 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. # 营养表单设计UI草图
  2. ## 1. 页面整体布局
  3. - 顶部:页面标题(可选)
  4. - 左侧:参数选择区(系统参数、题型选择)
  5. - 右侧:表单编辑区(量表类型、适用条件、量表名称、说明、备注等)
  6. - 下方:题目编辑区(题目内容、题型、填空项等)
  7. ---
  8. ## 2. 结构化UI设计
  9. ```
  10. <template>
  11. <div class="check-template-container">
  12. <!-- 左侧参数选择区 -->
  13. <aside class="sidebar">
  14. <section class="system-params">
  15. <h3>系统参数</h3>
  16. <div class="param-group">
  17. <div class="group-title">基本信息</div>
  18. <el-button>性别</el-button>
  19. <el-button>出生日期</el-button>
  20. <el-button>身高</el-button>
  21. <el-button>体重</el-button>
  22. <el-button>BMI</el-button>
  23. <el-button>营养诊断</el-button>
  24. <el-button>入院日期</el-button>
  25. </div>
  26. <div class="param-group">
  27. <div class="group-title">其他</div>
  28. <el-button>人体测量</el-button>
  29. <el-button>膳食状况</el-button>
  30. <el-button>营养生化检查</el-button>
  31. </div>
  32. </section>
  33. <section class="question-types">
  34. <h3>题型选择</h3>
  35. <el-button>单选题</el-button>
  36. <el-button>多选题</el-button>
  37. <el-button>填空题</el-button>
  38. <el-button>量表题</el-button>
  39. <el-button>矩阵量表</el-button>
  40. </section>
  41. </aside>
  42. <!-- 右侧表单编辑区 -->
  43. <main class="main-content">
  44. <el-form label-width="100px">
  45. <el-form-item label="量表类型:" required>
  46. <el-radio-group v-model="form.type">
  47. <el-radio label="营养筛查" />
  48. <el-radio label="营养评估" />
  49. </el-radio-group>
  50. </el-form-item>
  51. <el-form-item label="适用条件:">
  52. <el-row>
  53. <el-col :span="12">
  54. <span>性别:</span><el-link type="primary">不限</el-link>
  55. </el-col>
  56. <el-col :span="12">
  57. <span>年龄:</span><el-link type="primary">不限</el-link>
  58. </el-col>
  59. </el-row>
  60. </el-form-item>
  61. <el-form-item label="量表名称:" required>
  62. <el-input v-model="form.name" maxlength="50" show-word-limit placeholder="请输入" />
  63. </el-form-item>
  64. <el-form-item label="量表说明:">
  65. <el-input v-model="form.desc" maxlength="50" show-word-limit placeholder="请输入" />
  66. </el-form-item>
  67. <el-form-item label="备注:">
  68. <el-input type="textarea" v-model="form.remark" maxlength="500" show-word-limit placeholder="请输入" />
  69. </el-form-item>
  70. </el-form>
  71. <!-- 题目编辑区 -->
  72. <section class="question-edit">
  73. <el-card>
  74. <el-form label-width="80px">
  75. <el-form-item label="标题:" required>
  76. <el-input v-model="question.title" placeholder="请输入标题" />
  77. </el-form-item>
  78. <el-form-item label="填空:">
  79. <el-input v-model="question.blank" placeholder="请输入填空内容" />
  80. </el-form-item>
  81. </el-form>
  82. </el-card>
  83. </section>
  84. </main>
  85. </div>
  86. </template>
  87. ```
  88. ---
  89. ## 3. 样式建议(伪代码)
  90. ```
  91. .check-template-container {
  92. display: flex;
  93. background: #f8fafc;
  94. }
  95. .sidebar {
  96. width: 260px;
  97. background: #fff;
  98. border-radius: 4px;
  99. margin: 16px;
  100. padding: 16px;
  101. box-shadow: 0 2px 8px #f0f1f2;
  102. }
  103. .main-content {
  104. flex: 1;
  105. margin: 16px;
  106. background: #fff;
  107. border-radius: 4px;
  108. padding: 24px;
  109. min-width: 600px;
  110. }
  111. .question-edit {
  112. margin-top: 24px;
  113. background: #f0f6ff;
  114. border-radius: 4px;
  115. padding: 16px;
  116. }
  117. ```
  118. ---
  119. ## 4. 交互说明
  120. - 左侧参数和题型按钮可拖拽或点击添加到右侧表单或题目区。
  121. - 右侧表单区支持表单校验、字数限制、必填项提示。
  122. - 题目编辑区可根据题型动态切换输入控件。
  123. ---
  124. # 设计说明
  125. - 结构清晰,左右分栏,主次分明。
  126. - 采用 Element Plus 组件,风格简洁现代。
  127. - 适合表单设计、量表配置等场景。