Elizabeth's proactive approach involves introducing urinal toilet attachment , an ingenious concept that optimizes space and functionality.

dryWeight.vue 12KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458
  1. <template>
  2. <div class="patient-container">
  3. <patient-sidebar :id="patientID" defaultActive="1-6" v-on:tran-patient="onTranPatient"></patient-sidebar>
  4. <div class="patient-app-container advice-container app-container">
  5. <div class="cell clearfix">
  6. 当前时间: <el-input style="width:130px;" v-model="nowtime" :disabled="true"></el-input>
  7. 干体重:<el-input style="width:100px" v-model="dryweight" :disabled="true"></el-input>&nbsp;
  8. <el-button size="medium" type="primary" @click="dialogVisible =true" v-show="addShow">新增</el-button>
  9. <el-button size="medium" type="primary" @click="dialogVisible =true" v-show="adjustShow">调整</el-button>
  10. </div>
  11. <el-table :data="tableData" border style="width:100%">
  12. <el-table-column prop="date" label="时间" align="center">
  13. <template slot-scope="scope">
  14. {{CreateTime(scope.row.ctime)}}
  15. </template>
  16. </el-table-column>
  17. <el-table-column prop="date" label="调整值" align="center">
  18. <template slot-scope="scope">
  19. {{scope.row.adjusted_value}}
  20. </template>
  21. </el-table-column>
  22. <el-table-column prop="date" label="干体重" align="center">
  23. <template slot-scope="scope">
  24. {{scope.row.dry_weight}}
  25. </template>
  26. </el-table-column>
  27. <el-table-column prop="date" label="医生" align="center">
  28. <template slot-scope="scope">
  29. {{scope.row.user_name}}
  30. </template>
  31. </el-table-column>
  32. <el-table-column prop="date" label="备注" align="center">
  33. <template slot-scope="scope">
  34. {{scope.row.remakes}}
  35. </template>
  36. </el-table-column>
  37. </el-table>
  38. <el-pagination
  39. @size-change="handleSizeChange"
  40. @current-change="handleCurrentChange"
  41. :page-sizes="[10,20,50,100]"
  42. :page-size="10"
  43. background
  44. style="margin-top:20px;"
  45. align="right"
  46. layout="total, sizes, prev, pager, next, jumper"
  47. :total="total"></el-pagination>
  48. <el-dialog
  49. title="调整干体重"
  50. :visible.sync="dialogVisible"
  51. width="30%"
  52. center>
  53. <el-form label-width="120px" :model="dryWeightForm" ref="dryWeightForm" :rules="rules">
  54. <el-form-item label="干体重:" required prop="dry_weight">
  55. <el-input style="width:200px" v-model="dryWeightForm.dry_weight"></el-input>
  56. </el-form-item>
  57. <el-form-item label="医生:" required prop="doctors">
  58. <el-select v-model="dryWeightForm.doctors" placeholder="请选择">
  59. <el-option
  60. v-for="item in options"
  61. :key="item.admin_user_id"
  62. :label="item.user_name"
  63. :value="item.admin_user_id">
  64. </el-option>
  65. </el-select>
  66. </el-form-item>
  67. <el-form-item label="备注:" style="width:290px">
  68. <el-input
  69. type="textarea"
  70. :autosize="{ minRows: 2, maxRows: 4}"
  71. placeholder="请输入内容"
  72. v-model="dryWeightForm.remarks">
  73. </el-input>
  74. </el-form-item>
  75. </el-form>
  76. <span slot="footer" class="dialog-footer">
  77. <el-button @click="dialogVisible = false">取 消</el-button>
  78. <el-button type="primary" @click="UpdateDryWeightData('dryWeightForm')">确 定</el-button>
  79. </span>
  80. </el-dialog>
  81. </div>
  82. </div>
  83. </template>
  84. <script>
  85. const moment = require('moment')
  86. import PatientSidebar from './components/PatientSidebar'
  87. import EditGroupAdvice from './components/EditGroupAdvice'
  88. import { fetchAllAdminUsers, fetchAllDoctorAndNurse } from '@/api/doctor'
  89. import { fetchPatient, PostRemind, getDryWeightData, getAllDoctor, UpdateDryWeightData, getAllData } from '@/api/patient'
  90. import { jsGetAge, uParseTime } from '@/utils/tools'
  91. import { getDataConfig } from '@/utils/data'
  92. export default {
  93. name: 'doctorAdvice',
  94. components: {
  95. PatientSidebar,
  96. EditGroupAdvice
  97. },
  98. data() {
  99. return {
  100. tableData: [],
  101. nowtime: moment(new Date()).format('YYYY-MM-DD'),
  102. patientID: '',
  103. dryweight: '',
  104. dialogVisible: false,
  105. options: [],
  106. textarea2: '',
  107. dryWeightForm: {
  108. dry_weight: '',
  109. doctors: '',
  110. remarks: ''
  111. },
  112. addShow: true,
  113. adjustShow: false,
  114. page: 1,
  115. limit: 10,
  116. total: 0,
  117. rules: {
  118. dry_weight: [{ required: true, message: '请输入干体重!' }],
  119. doctors: [{ required: true, message: '请选择医生!' }]
  120. }
  121. }
  122. },
  123. methods: {
  124. clickuseradvicecell(row, column, cell, event) {
  125. },
  126. onTranPatient: function(tranPatient) {
  127. this.currentPatient = tranPatient
  128. },
  129. CreateTime(time) {
  130. return uParseTime(time, '{y}-{m}-{d} {h}:{i}:{s}')
  131. },
  132. getDryWeightData(id) {
  133. getDryWeightData(id).then(response => {
  134. if (response.data.state === 1) {
  135. var pre = response.data.data.pre
  136. console.log('pre是什么', pre)
  137. for (let index = 0; index < pre.length; index++) {
  138. this.dryweight = pre[0].dry_weight
  139. }
  140. }
  141. })
  142. },
  143. getAllDoctor() {
  144. getAllDoctor().then(response => {
  145. if (response.data.state == 1) {
  146. var appRole = response.data.data.appRole
  147. console.log('approle', appRole)
  148. this.options = appRole
  149. }
  150. })
  151. },
  152. UpdateDryWeightData(formName) {
  153. const params = {
  154. dry_weight: this.dryWeightForm.dry_weight,
  155. doctors: this.dryWeightForm.doctors,
  156. remarks: this.dryWeightForm.remarks,
  157. patient_id: this.patientID,
  158. dryweight: this.dryweight
  159. }
  160. this.$refs[formName].validate((valid) => {
  161. if (valid) {
  162. UpdateDryWeightData(params).then(response => {
  163. if (response.data.state === 1) {
  164. var patientDryweight = response.data.data.patientDryweight
  165. console.log('patientdryweight', patientDryweight)
  166. this.dialogVisible = false
  167. const id = this.$route.params && this.$route.params.id
  168. this.getAllData(id)
  169. this.getDryWeightData(id)
  170. }
  171. })
  172. }
  173. })
  174. },
  175. getAllData(id, page, limit) {
  176. getAllData(id, this.page, this.limit).then(response => {
  177. if (response.data.state === 1) {
  178. var dry = response.data.data.dry
  179. var total = response.data.data.total
  180. this.total = total
  181. console.log('total', total)
  182. this.tableData = dry
  183. const usertype = this.$store.getters.xt_user.user.user_type
  184. if (usertype === 1 || usertype === 2) {
  185. this.addShow = true
  186. this.adjustShow = false
  187. } else {
  188. this.addShow = false
  189. this.adjustShow = false
  190. return
  191. }
  192. if (dry.length === 0) {
  193. this.addShow = true
  194. this.adjustShow = false
  195. } else {
  196. this.addShow = false
  197. this.adjustShow = true
  198. }
  199. console.log('dry', dry)
  200. }
  201. })
  202. },
  203. handleSizeChange(limit) {
  204. this.limit = limit
  205. const id = this.$route.params && this.$route.params.id
  206. this.getAllData(id, this.page, this.limit)
  207. },
  208. handleCurrentChange(page) {
  209. this.page = page
  210. const id = this.$route.params && this.$route.params.id
  211. this.getAllData(id, this.page, this.limit)
  212. }
  213. },
  214. created() {
  215. const id = this.$route.params && this.$route.params.id
  216. console.log('id是设么', id)
  217. this.patientID = parseInt(id)
  218. this.getDryWeightData(id)
  219. this.getAllDoctor()
  220. this.getAllData(id)
  221. const usertype = this.$store.getters.xt_user.user.user_type
  222. // if (usertype === 2) {
  223. // this.addShow = true
  224. // this.adjustShow = false
  225. // } else {
  226. // this.addShow = false
  227. // this.addjustShow = false
  228. // }
  229. console.log('usertype', usertype)
  230. }
  231. }
  232. </script>
  233. <style>
  234. #oictable ::-webkit-scrollbar {
  235. height: 15px;
  236. }
  237. </style>
  238. <style rel="stylesheet/scss" lang="scss" scoped>
  239. .printForm {
  240. width: 960px;
  241. }
  242. .printForm .hospital_title {
  243. font-size: 20px;
  244. font-weight: 400;
  245. text-align: center;
  246. letter-spacing: 5px;
  247. }
  248. .printForm .title {
  249. font-size: 30px;
  250. font-weight: 500;
  251. text-align: center;
  252. }
  253. .printForm .title {
  254. font-size: 30px;
  255. font-weight: 500;
  256. text-align: center;
  257. }
  258. .printForm .info ul {
  259. display: -webkit-box;
  260. display: -moz-box;
  261. display: -ms-flexbox;
  262. display: -webkit-flex;
  263. display: flex;
  264. align-items: center;
  265. -moz-box-sizing: border-box;
  266. -webkit-box-sizing: border-box;
  267. -o-box-sizing: border-box;
  268. -ms-box-sizing: border-box;
  269. box-sizing: border-box;
  270. -webkit-justify-content: space-around;
  271. -moz-justify-content: space-around;
  272. -ms-justify-content: space-around;
  273. -o-justify-content: space-around;
  274. justify-content: space-around;
  275. }
  276. .printForm .info ul li {
  277. display: flex;
  278. box-sizing: border-box;
  279. justify-content: space-around;
  280. }
  281. .printForm .info ul li .InputBox {
  282. padding: 0;
  283. border: none;
  284. border-bottom: 1px #e5e5e5 solid;
  285. outline: none;
  286. width: 80px;
  287. }
  288. .printForm .printTable tr {
  289. padding: 2px;
  290. }
  291. .printForm .printTable tr > th {
  292. padding: 6px 4px;
  293. }
  294. .printForm .printTable tr > td {
  295. padding: 6px 4px;
  296. }
  297. .es-img {
  298. height: 25px;
  299. }
  300. .advice-container {
  301. font-size: 15px;
  302. .filter-container {
  303. padding-bottom: 5px;
  304. }
  305. .search-component {
  306. width: 500px;
  307. .searchBox {
  308. width: 300px;
  309. height: 36px;
  310. line-height: 36px;
  311. padding-left: 15px;
  312. border: 1px #dcdfe6 solid;
  313. border-right: none;
  314. outline: none;
  315. float: left;
  316. border-radius: 6px 0 0 6px;
  317. font-size: 14px;
  318. color: #333;
  319. background: #fff;
  320. box-shadow: 3px 3px 4px rgba(135, 135, 135, 0.05);
  321. }
  322. .searchBtn {
  323. background-color: #409eff;
  324. color: #fff;
  325. font-size: 15px;
  326. text-align: center;
  327. height: 36px;
  328. line-height: 36px;
  329. float: left;
  330. outline: none;
  331. width: 70px;
  332. border: none;
  333. border-radius: 0 6px 6px 0;
  334. font-family: "Microsoft Yahei";
  335. cursor: pointer;
  336. }
  337. }
  338. .amount {
  339. font-weight: normal;
  340. padding: 10px 0 0 0;
  341. color: #606266;
  342. font-size: 14px;
  343. span {
  344. color: #ef2525;
  345. font-family: "Arial";
  346. padding: 0 2px;
  347. }
  348. }
  349. .el-dropdown-link {
  350. cursor: pointer;
  351. }
  352. }
  353. .advice-order .ls-title {
  354. text-align: center;
  355. font-weight: 600;
  356. font-size: 30px;
  357. line-height: 80px;
  358. margin-bottom: 20px;
  359. }
  360. .advice-order .ls-type {
  361. text-align: center;
  362. margin-bottom: 20px;
  363. }
  364. .advice-order .ls-name {
  365. display: flex;
  366. align-items: center;
  367. justify-content: space-between;
  368. padding: 30px 2em;
  369. }
  370. </style>
  371. <style>
  372. .advice-order .el-table__body {
  373. border: 1px solid #333;
  374. }
  375. .advice-order .el-table__body td {
  376. border: 1px solid #333;
  377. }
  378. .advice-order .item-value {
  379. flex: 1;
  380. border-bottom: 1px solid #333;
  381. }
  382. .advice-order th,
  383. .advice-order td {
  384. padding: 5px 10px;
  385. }
  386. #user-advice-name-table .expanded {
  387. display: table-row !important;
  388. }
  389. #user-advice-name-table .el-table__expand-icon {
  390. -webkit-transform: rotate(90deg) !important;
  391. transform: rotate(90deg) !important;
  392. }
  393. .user-advice-table-row:hover > td {
  394. background: #fff !important;
  395. }
  396. .user-advice-table-row td:hover {
  397. background: #fff !important;
  398. }
  399. #user-advice-select-template-table .el-table__row {
  400. display: table-row !important;
  401. }
  402. #user-advice-select-template-table .el-table__expand-icon {
  403. -webkit-transform: rotate(90deg) !important;
  404. transform: rotate(90deg) !important;
  405. }
  406. .advicenamedisplay .cell {
  407. float: left;
  408. text-align: left;
  409. }
  410. .el-form-item__error {
  411. margin-left: 0px;
  412. }
  413. </style>