index.vue 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273
  1. <template>
  2. <view>
  3. <!-- 基本信息 -->
  4. <template>
  5. <view class="content">
  6. <u-cell :value="user" isLink @click="show=true">
  7. <view
  8. slot="title"
  9. class="u-slot-title"
  10. >
  11. <text class="u-cell-text">
  12. 班级
  13. <image class="box" src="../../static/im@2x.png"></image>
  14. </text>
  15. </view>
  16. </u-cell>
  17. <u-picker :show="show" :columns="columns" keyName="name" @cancel="show=false" @confirm="choiceUser"></u-picker>
  18. </view>
  19. <view class="content">
  20. <u-cell :value="user" isLink @click="show=true">
  21. <view
  22. slot="title"
  23. class="u-slot-title"
  24. >
  25. <text class="u-cell-text">
  26. 姓名
  27. <image class="box" src="../../static/im@2x.png"></image>
  28. </text>
  29. </view>
  30. </u-cell>
  31. <u-picker :show="show" :columns="columns" keyName="name" @cancel="show=false" @confirm="choiceUser"></u-picker>
  32. </view>
  33. <view class="content">
  34. <u-cell :value="user" isLink @click="show=true">
  35. <view
  36. slot="title"
  37. class="u-slot-title"
  38. >
  39. <text class="u-cell-text">
  40. 性别
  41. </text>
  42. </view>
  43. </u-cell>
  44. <u-picker :show="show" :columns="columns" keyName="name" @cancel="show=false" @confirm="choiceUser"></u-picker>
  45. </view>
  46. </template>
  47. <!-- 症状及体征 -->
  48. <view class="symptom">
  49. <text class="u-cell-text">
  50. 症状及体征
  51. <image class="box" src="../../static/im@2x.png"></image>
  52. </text>
  53. <u--textarea border="none" style="margin: 32rpx 0 72rpx 0; padding: 0;" v-model="symptom" placeholder="请输入" autoHeight ></u--textarea>
  54. <text class="u-cell-text">
  55. 症状体征照片
  56. </text>
  57. <u-upload
  58. :fileList="fileList3"
  59. @afterRead="afterRead"
  60. @delete="deletePic"
  61. name="3"
  62. multiple
  63. :maxCount="10"
  64. :previewFullImage="true"
  65. style="margin-top: 30rpx"
  66. >
  67. <template>
  68. <view class="upImage">
  69. <u-icon name="plus" color="#8C8C8C" size="49rpx"></u-icon>
  70. </view>
  71. </template>
  72. </u-upload>
  73. </view>
  74. <!-- 处理措施 -->
  75. <view class="symptom">
  76. <text class="u-cell-text">
  77. 处理措施
  78. <image class="box" src="../../static/im@2x.png"></image>
  79. </text>
  80. <u--textarea border="none" style="margin: 32rpx 0 72rpx 0; padding: 0;" v-model="symptom" placeholder="请输入" autoHeight ></u--textarea>
  81. <text class="u-cell-text">
  82. 应急处置后照片
  83. </text>
  84. <u-upload
  85. :fileList="fileList3"
  86. @afterRead="afterRead"
  87. @delete="deletePic"
  88. :name="3"
  89. multiple
  90. :maxCount="10"
  91. :previewFullImage="true"
  92. style="margin-top: 30rpx"
  93. >
  94. <template>
  95. <view class="upImage">
  96. <u-icon name="plus" color="#8C8C8C" size="49rpx"></u-icon>
  97. </view>
  98. </template>
  99. </u-upload>
  100. </view>
  101. <!-- 备注 -->
  102. <view class="remarks">
  103. 备注
  104. <u-icon name="edit-pen" color="#8C8C8C" size="49rpx"></u-icon>
  105. <!-- 功能不明确 -->
  106. </view>
  107. <!-- 结论多选 -->
  108. <view class="choice">
  109. <template>
  110. <u-radio-group
  111. v-model="radiovalue1"
  112. placement="row"
  113. @change="groupChange"
  114. class="radio"
  115. >
  116. <u-radio
  117. :customStyle="{marginBottom: '8px'}"
  118. v-for="(item, index) in radiolist1"
  119. :key="index"
  120. shape="square"
  121. activeColor="#6241D5"
  122. :label="item.name"
  123. :name="item.name"
  124. @change="radioChange"
  125. >
  126. </u-radio>
  127. </u-radio-group>
  128. </template>
  129. </view>
  130. <!-- 提交按钮 -->
  131. <view class="submit">
  132. <u-button
  133. shape="circle"
  134. type="primary"
  135. text="提交"
  136. color="#7B5DF0"
  137. style="width: 550rpx;"
  138. ></u-button>
  139. </view>
  140. </view>
  141. </template>
  142. <script>
  143. export default {
  144. data() {
  145. return {
  146. user:"请选择",
  147. show:false,
  148. symptom: "", // 症状文本
  149. fileList3: [{
  150. url: 'https://cdn.uviewui.com/uview/swiper/1.jpg',
  151. }],
  152. columns:[
  153. [
  154. {
  155. name:"王晶",
  156. id:1,
  157. },
  158. {
  159. name:"李明",
  160. id:2
  161. }
  162. ]
  163. ],
  164. radiolist1: [{
  165. name: '需要观察',
  166. disabled: false
  167. },
  168. {
  169. name: '通知家长',
  170. disabled: false
  171. }
  172. ],
  173. // u-radio-group的v-model绑定的值如果设置为某个radio的name,就会被默认选中
  174. radiovalue1: '需要观察',
  175. }
  176. },
  177. methods: {
  178. choiceUser(e){
  179. console.log("e==>",e)
  180. this.show=false;
  181. this.user=e.value[0].name;
  182. }
  183. }
  184. }
  185. </script>
  186. <style lang="scss" scoped>
  187. page{
  188. /* background-color: #D9D9D9; */
  189. background-color: #F5F5F5 !important;
  190. }
  191. .u-cell{
  192. background-color: #fff;
  193. height: 112rpx;
  194. line-height: 73rpx;
  195. }
  196. .u-cell-text {
  197. font-size: 32rpx;
  198. }
  199. .u-cell-text image{
  200. width: 10rpx;
  201. height: 28rpx;
  202. margin-left: 15rpx ;
  203. }
  204. .symptom{
  205. margin-top: 20rpx;
  206. padding: 32rpx 32rpx;
  207. box-sizing: border-box;
  208. background-color: #fff;
  209. }
  210. .upImage{
  211. width: 160rpx;
  212. height: 160rpx;
  213. border-radius: 16rpx;
  214. border: 2rpx solid #d9d9d9;
  215. display: flex;
  216. justify-content: center;
  217. }
  218. .remarks{
  219. height: 80rpx;
  220. margin-top: 20rpx;
  221. font-size: 32rpx;
  222. color: rgba(0,0,0,0.60);
  223. background-color: #fff;
  224. display: flex;
  225. align-items: center;
  226. justify-content: center;
  227. }
  228. .choice{
  229. height: 178rpx;
  230. background-color: #fff;
  231. margin-top: 20rpx;
  232. padding-top: 36rpx;
  233. box-sizing: border-box;
  234. }
  235. .radio{
  236. display: flex;
  237. justify-content: space-evenly;
  238. }
  239. .submit{
  240. height: 240rpx;
  241. padding-top: 49rpx;
  242. box-sizing: border-box;
  243. }
  244. </style>