executionRecord.vue 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425
  1. <template>
  2. <view class="content">
  3. <ren-calendar ref='ren' :markDays='markDays' :headerBar='false' :open="false" @onDayClick='onDayClick'></ren-calendar>
  4. <view class="inner">
  5. <view class="title-box align-center justify-between">
  6. <text>用药情况</text>
  7. <view class="select-box" @click="navgetTo()">
  8. <text>打卡 (0/2)</text>
  9. <image class="w48 h48" src="@/static/images/health/right_arrow_right_icon24.png"></image>
  10. </view>
  11. </view>
  12. <view class="form-box">
  13. <view class="form-item">
  14. <view class="left">
  15. <text class="label">阿仑单抗 1.0mg</text>
  16. <text class="time">11:30</text>
  17. </view>
  18. <view class="check">
  19. <u-icon name="checkmark-circle-fill" color="#008FD3" size="18"></u-icon>
  20. <text>已用药</text>
  21. </view>
  22. </view>
  23. </view>
  24. <view class="title-box">
  25. 健康数据
  26. </view>
  27. <view class="form-box">
  28. <view class="form-item">
  29. <text class="label">腰围</text>
  30. <view class="num">
  31. <text>70cm</text>
  32. <image class="w48 h48" src="@/static/images/health/right_arrow_right_icon24.png"></image>
  33. </view>
  34. </view>
  35. <view class="form-item">
  36. <text class="label">臀围</text>
  37. <view class="num">
  38. <text>70cm</text>
  39. <image class="w48 h48" src="@/static/images/health/right_arrow_right_icon24.png"></image>
  40. </view>
  41. </view>
  42. <view class="form-item">
  43. <text class="label">血糖</text>
  44. <view class="num">
  45. <text>4.0</text>
  46. <image class="w48 h48" src="@/static/images/health/right_arrow_right_icon24.png"></image>
  47. </view>
  48. </view>
  49. <view class="form-item">
  50. <text class="label">血压</text>
  51. <view class="num">
  52. <text>--</text>
  53. <image class="w48 h48" src="@/static/images/health/right_arrow_right_icon24.png"></image>
  54. </view>
  55. </view>
  56. <view class="form-item">
  57. <text class="label">尿酸</text>
  58. <view class="num">
  59. <text>正常</text>
  60. <image class="w48 h48" src="@/static/images/health/right_arrow_right_icon24.png"></image>
  61. </view>
  62. </view>
  63. </view>
  64. <view class="title-box align-center justify-between">
  65. <text class="left">指标信息</text>
  66. <view class="select-box2">
  67. <image class="w24 h24" src="@/static/images/company/edit_add_icon.png"></image>
  68. <text>选择指标项</text>
  69. </view>
  70. </view>
  71. <view class="form-box">
  72. <view class="form-item">
  73. <text class="label">促甲状腺素受体抗体(A-TSHR)</text>
  74. <view class="num">
  75. <text>2.12 1U/L</text>
  76. </view>
  77. </view>
  78. <view class="form-item">
  79. <text class="label">低密度脂蛋白胆固醇(LDL)</text>
  80. <view class="num">
  81. <text>3.00 mmol/L</text>
  82. </view>
  83. </view>
  84. </view>
  85. <view class="title-box">
  86. 其他
  87. </view>
  88. <view class="form-box mb20">
  89. <view class="form-item">
  90. <text class="label">口感舌燥,恶心</text>
  91. </view>
  92. </view>
  93. </view>
  94. </view>
  95. </template>
  96. <script>
  97. import RenCalendar from '@/components/ren-calendar/ren-calendar.vue'
  98. import {
  99. getDocDetails,
  100. addDoc,
  101. editDoc
  102. } from '@/api/doc.js'
  103. export default {
  104. components:{
  105. RenCalendar
  106. },
  107. data() {
  108. return {
  109. curDate:'',
  110. markDays:[],
  111. type: null,
  112. patientId: null,
  113. famaleurl:"/static/images/health/female_profile.png",
  114. maleurl:"/static/images/health/my_heads.png",
  115. checked:1,
  116. tags: [{
  117. name: '心脏病',
  118. checked:true,
  119. id: 1
  120. },
  121. {
  122. name: '脑梗死',
  123. checked:false,
  124. id: 2
  125. },{
  126. name: '肾病',
  127. checked:false,
  128. id: 3
  129. },{
  130. name: '脂肪肝',
  131. checked:false,
  132. id: 4
  133. }],
  134. form: {
  135. userName: null,
  136. idCard: null,
  137. sex: null,
  138. birthday: null,
  139. remark: null,
  140. }
  141. };
  142. },
  143. onLoad(option) {
  144. let today = this.$refs.ren.getToday().date;
  145. this.curDate = today;
  146. this.markDays.push(today);
  147. this.type = option.type;
  148. console.log(this.type)
  149. if (this.type == 'edit') {
  150. this.docId = option.docId;
  151. // this.getDocDetails();
  152. }
  153. },
  154. methods: {
  155. //日历
  156. onDayClick(data){
  157. this.curDate = data.date;
  158. },
  159. navgetTo(){
  160. uni.navigateTo({
  161. url:'/pages_company/schedule'
  162. })
  163. },
  164. getDocDetails() {
  165. var data = {
  166. docId: this.docId
  167. };
  168. getDocDetails(data).then(
  169. res => {
  170. if (res.code == 200) {
  171. this.form = res.data;
  172. } else {
  173. uni.showToast({
  174. title: res.msg,
  175. });
  176. }
  177. },
  178. rej => {}
  179. );
  180. },
  181. submit() {
  182. if (this.form.userName == null) {
  183. uni.showToast({
  184. icon: 'none',
  185. title: "姓名不能为空",
  186. });
  187. return;
  188. }
  189. if (this.form.idCard == null) {
  190. uni.showToast({
  191. icon: 'none',
  192. title: "身份证号不能为空",
  193. });
  194. return;
  195. }
  196. if (this.form.sex == null) {
  197. uni.showToast({
  198. icon: 'none',
  199. title: "性别不能为空",
  200. });
  201. return;
  202. }
  203. if (this.form.birthday == null) {
  204. uni.showToast({
  205. icon: 'none',
  206. title: "出生年月不能为空",
  207. });
  208. return;
  209. }
  210. if (this.type == "add") {
  211. this.addDoc()
  212. } else if (this.type == "edit") {
  213. this.editDoc()
  214. }
  215. },
  216. editDoc() {
  217. editDoc(this.form).then(
  218. res => {
  219. if (res.code == 200) {
  220. uni.showToast({
  221. icon: 'success',
  222. title: "操作成功",
  223. });
  224. setTimeout(function() {
  225. uni.$emit('refreshDoc');
  226. uni.navigateBack({
  227. delta: 1
  228. })
  229. }, 500);
  230. } else {
  231. uni.showToast({
  232. icon: 'none',
  233. title: res.msg,
  234. });
  235. }
  236. },
  237. rej => {}
  238. );
  239. },
  240. addDoc() {
  241. addDoc(this.form).then(
  242. res => {
  243. if (res.code == 200) {
  244. uni.showToast({
  245. icon: 'success',
  246. title: "操作成功",
  247. });
  248. setTimeout(function() {
  249. uni.$emit('refreshDoc');
  250. uni.navigateBack({
  251. delta: 1
  252. })
  253. }, 500);
  254. } else {
  255. uni.showToast({
  256. icon: 'none',
  257. title: res.msg,
  258. });
  259. }
  260. },
  261. rej => {}
  262. );
  263. },
  264. // 出生日期选择
  265. bindDateChange: function(e) {
  266. this.form.birthday = e.target.value
  267. },
  268. }
  269. }
  270. </script>
  271. <style lang="scss">
  272. page {
  273. height: 100%;
  274. }
  275. .content {
  276. height: 100%;
  277. display: flex;
  278. flex-direction: column;
  279. justify-content: space-between;
  280. .inner {
  281. // height: calc(100% - 120upx);
  282. padding:0 20upx;
  283. .title-box{
  284. font-family: PingFang SC, PingFang SC;
  285. font-weight: 500;
  286. font-size: 32rpx;
  287. color: #626468;
  288. padding: 24rpx 0;
  289. .select-box{
  290. display: flex;
  291. align-items: center;
  292. justify-content: center;
  293. text{
  294. font-family: PingFang SC;
  295. font-weight: 400;
  296. font-size: 24rpx;
  297. color: #626468;
  298. margin-left: 8rpx;
  299. }
  300. }
  301. .select-box2{
  302. width: 216rpx;
  303. height: 64rpx;
  304. background: #FFFFFF;
  305. border-radius: 32rpx 32rpx 32rpx 32rpx;
  306. display: flex;
  307. align-items: center;
  308. justify-content: center;
  309. text{
  310. font-family: PingFang SC;
  311. font-weight: 400;
  312. font-size: 24rpx;
  313. color: #626468;
  314. margin-left: 5rpx;
  315. }
  316. }
  317. }
  318. .form-box {
  319. padding: 0 30upx;
  320. background: #FFFFFF;
  321. border-radius: 16upx;
  322. // margin-bottom: 20upx;
  323. .form-title {
  324. font-family: PingFang SC;
  325. font-weight: 500;
  326. font-size: 32rpx;
  327. color: #626468;
  328. text-align: left;
  329. padding: 30rpx 0;
  330. display: block;
  331. }
  332. .form-item {
  333. padding: 30upx 0;
  334. display: flex;
  335. align-items: center;
  336. justify-content: space-between;
  337. border-bottom: 1px solid #F1F1F1;
  338. &:last-child {
  339. border-bottom: none;
  340. }
  341. .left{
  342. display: flex;
  343. flex-direction: column;
  344. align-items: flex-start;
  345. .time{
  346. font-family: PingFang SC;
  347. font-weight: 400;
  348. font-size: 28rpx;
  349. color: #898E91;
  350. text-align: left;
  351. }
  352. }
  353. .check{
  354. display: flex;
  355. align-items: center;
  356. justify-content: center;
  357. text{
  358. // font-family: PingFang SC;
  359. font-weight: 400;
  360. font-size: 24rpx;
  361. color: #008FD3;
  362. margin-left: 16rpx;
  363. }
  364. }
  365. .label {
  366. // width: 150upx;
  367. text-align: left;
  368. font-weight: 500;
  369. font-size: 32rpx;
  370. color: #222426;
  371. text-align: left;
  372. }
  373. .num{
  374. font-family: PingFang SC;
  375. font-weight: 400;
  376. font-size: 32rpx;
  377. color: #222426;
  378. line-height: 34rpx;
  379. display: flex;
  380. align-items: center;
  381. }
  382. }
  383. }
  384. }
  385. .btn-box {
  386. height: 120upx;
  387. padding: 0 30upx;
  388. display: flex;
  389. align-items: center;
  390. justify-content: center;
  391. // position: fixed;
  392. // width: 90%;
  393. // bottom: 0;
  394. // left: 50%;
  395. // transform: translate(-50%,-50%);
  396. // background: #FFFFFF;
  397. .sub-btn {
  398. width: 100%;
  399. height: 88upx;
  400. line-height: 88upx;
  401. text-align: center;
  402. font-size: 32upx;
  403. font-family: PingFang SC;
  404. font-weight: bold;
  405. color: #FFFFFF;
  406. background: #008FD3;
  407. border-radius: 44upx;
  408. margin-bottom: 40upx;
  409. }
  410. }
  411. }
  412. </style>