index.vue 16KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434
  1. <template>
  2. <div class="main-contain">
  3. <div class="position">
  4. <bread-crumb :crumbs="crumbs"></bread-crumb>
  5. </div>
  6. <div class="app-container">
  7. <el-tabs v-model="activeName" @tab-click="handleClick">
  8. <el-tab-pane label="未审核" name="first">
  9. <el-table
  10. :data="list"
  11. border
  12. style="width: 100%">
  13. <el-table-column prop="date" label="序号" width="50" align="center">
  14. <template slot-scope="scope" >
  15. {{scope.$index + 1 }}
  16. </template>
  17. </el-table-column>
  18. <el-table-column prop="name" label="信息模块" width="100" align="center">
  19. <template slot-scope="scope" >
  20. <span v-if="scope.row.module == 1">透析处方</span>
  21. <span v-if="scope.row.module == 2">接诊评估</span>
  22. <span v-if="scope.row.module == 3">透前评估</span>
  23. <span v-if="scope.row.module == 4">临时医嘱</span>
  24. <span v-if="scope.row.module == 5">双人核对</span>
  25. <span v-if="scope.row.module == 6">透析上机</span>
  26. <span v-if="scope.row.module == 7">透析监测</span>
  27. <span v-if="scope.row.module == 8">透析下机</span>
  28. <span v-if="scope.row.module == 9">透后评估</span>
  29. <span v-if="scope.row.module == 10">治疗小结</span>
  30. </template>
  31. </el-table-column>
  32. <el-table-column prop="address" label="患者姓名" width="100" align="center">
  33. <template slot-scope="scope">
  34. {{getPatientName(scope.row.patient_id) }}
  35. </template>
  36. </el-table-column>
  37. <el-table-column prop="date" label="治疗日期" width="100" align="center">
  38. <template slot-scope="scope" >
  39. {{getTimeOne(scope.row.record_date) }}
  40. </template>
  41. </el-table-column>
  42. <el-table-column prop="name" label="申请人" width="100" align="center">
  43. <template slot-scope="scope">
  44. {{getUserName(scope.row.creater) }}
  45. </template>
  46. </el-table-column>
  47. <el-table-column prop="address" label="申请时间" width="180" align="center">
  48. <template slot-scope="scope" >
  49. {{getTimeTwo(scope.row.record_date) }}
  50. </template>
  51. </el-table-column>
  52. <el-table-column prop="date" label="状态" width="100" align="center">
  53. <template slot-scope="scope" >
  54. <span v-if="scope.row.application_status == 1">已审核</span>
  55. <span v-if="scope.row.application_status == 2">未审核</span>
  56. <span v-if="scope.row.application_status == 3">拒绝</span>
  57. </template>
  58. </el-table-column>
  59. <el-table-column prop="name" label="审批人" width="100" align="center">
  60. <template slot-scope="scope" >
  61. {{getUserName(scope.row.checker) }}
  62. </template>
  63. </el-table-column>
  64. <el-table-column prop="address" label="审批时间" width="180" align="center">
  65. <template slot-scope="scope">
  66. {{getTimeOne(scope.row.check_time) }}
  67. </template>
  68. </el-table-column>
  69. <el-table-column prop="address" label="备注" width="180" align="center">
  70. <template slot-scope="scope">
  71. {{scope.row.remark }}
  72. </template>
  73. </el-table-column>
  74. <el-table-column prop="address" label="操作" width="180" align="center">
  75. <template slot-scope="scope">
  76. <el-tooltip
  77. class="item"
  78. effect="dark"
  79. content="审核"
  80. placement="top"
  81. >
  82. <el-button
  83. size="small"
  84. type="primary"
  85. icon="el-icon-edit-outline"
  86. @click="handleEdit(scope.$index, scope.row)"
  87. >
  88. </el-button>
  89. </el-tooltip>
  90. <el-tooltip
  91. class="item"
  92. effect="dark"
  93. content="拒绝"
  94. placement="top"
  95. >
  96. <el-button
  97. size="small"
  98. type="danger"
  99. icon="el-icon-delete"
  100. @click="handleDelete(scope.$index, scope.row)"
  101. >
  102. </el-button>
  103. </el-tooltip>
  104. </template>
  105. </el-table-column>
  106. </el-table>
  107. <el-pagination
  108. @size-change="handleSizeChange"
  109. @current-change="handleCurrentChange"
  110. :page-size="5"
  111. background
  112. style="margin-top:20px;float: right"
  113. :total="total"
  114. ></el-pagination>
  115. </el-tab-pane>
  116. <el-tab-pane label="全部" name="second">
  117. <el-table
  118. :data="inforList"
  119. border
  120. style="width: 100%">
  121. <el-table-column prop="date" label="序号" width="50" align="center">
  122. <template slot-scope="scope" >
  123. {{scope.$index + 1 }}
  124. </template>
  125. </el-table-column>
  126. <el-table-column prop="name" label="信息模块" width="100" align="center">
  127. <template slot-scope="scope" >
  128. <span v-if="scope.row.module == 1">透析处方</span>
  129. <span v-if="scope.row.module == 2">接诊评估</span>
  130. <span v-if="scope.row.module == 3">透前评估</span>
  131. <span v-if="scope.row.module == 4">临时医嘱</span>
  132. <span v-if="scope.row.module == 5">双人核对</span>
  133. <span v-if="scope.row.module == 6">透析上机</span>
  134. <span v-if="scope.row.module == 7">透析监测</span>
  135. <span v-if="scope.row.module == 8">透析下机</span>
  136. <span v-if="scope.row.module == 9">透后评估</span>
  137. <span v-if="scope.row.module == 10">治疗小结</span>
  138. </template>
  139. </el-table-column>
  140. <el-table-column prop="address" label="患者姓名" width="100" align="center">
  141. <template slot-scope="scope">
  142. {{getPatientName(scope.row.patient_id) }}
  143. </template>
  144. </el-table-column>
  145. <el-table-column prop="date" label="治疗日期" width="100" align="center">
  146. <template slot-scope="scope" >
  147. {{getTimeOne(scope.row.record_date) }}
  148. </template>
  149. </el-table-column>
  150. <el-table-column prop="name" label="申请人" width="100" align="center">
  151. <template slot-scope="scope">
  152. {{getUserName(scope.row.creater) }}
  153. </template>
  154. </el-table-column>
  155. <el-table-column prop="address" label="申请时间" width="180" align="center">
  156. <template slot-scope="scope" >
  157. {{getTimeTwo(scope.row.record_date) }}
  158. </template>
  159. </el-table-column>
  160. <el-table-column prop="date" label="状态" width="100" align="center">
  161. <template slot-scope="scope" >
  162. <span v-if="scope.row.application_status == 1">已审核</span>
  163. <span v-if="scope.row.application_status == 2">未审核</span>
  164. <span v-if="scope.row.application_status == 3">拒绝</span>
  165. </template>
  166. </el-table-column>
  167. <el-table-column prop="name" label="审批人" width="100" align="center">
  168. <template slot-scope="scope" >
  169. {{getUserName(scope.row.checker) }}
  170. </template>
  171. </el-table-column>
  172. <el-table-column prop="address" label="审批时间" width="180" align="center">
  173. <template slot-scope="scope">
  174. {{getTimeOne(scope.row.check_time) }}
  175. </template>
  176. </el-table-column>
  177. <el-table-column prop="address" label="备注" width="260" align="center">
  178. <template slot-scope="scope">
  179. {{scope.row.remark }}
  180. </template>
  181. </el-table-column>
  182. </el-table>
  183. <el-pagination
  184. @size-change="handleSizeChange"
  185. @current-change="handleCurrentChange"
  186. :page-size="5"
  187. background
  188. style="margin-top:20px;float: right"
  189. :total="total"
  190. ></el-pagination>
  191. </el-tab-pane>
  192. <el-tab-pane label="信息归档设置" name="third">
  193. <el-button type="primary" size="small" style="margin-bottom:20px" @click="toSeeting">设置</el-button>
  194. <el-table
  195. :data="tableData"
  196. style="width: 350px"
  197. border
  198. lazy>
  199. <el-table-column prop="date" label="序号" width="180" align="center">
  200. <template slot-scope="scope" >
  201. {{scope.$index + 1 }}
  202. </template>
  203. </el-table-column>
  204. <el-table-column
  205. prop="name"
  206. label="归档天数"
  207. width="180"
  208. align="center">
  209. <template slot-scope="scope" >
  210. {{scope.row.week_day }}
  211. </template>
  212. </el-table-column>
  213. </el-table>
  214. </el-tab-pane>
  215. </el-tabs>
  216. </div>
  217. <el-dialog
  218. title="信息归档设置"
  219. :visible.sync="dialogVisible"
  220. width="30%"
  221. :before-close="handleClose">
  222. <span>
  223. <span>归档天数:</span> <el-input v-model="week_day" style="width:200px"></el-input>
  224. </span>
  225. <span slot="footer" class="dialog-footer">
  226. <el-button @click="dialogVisible = false">取 消</el-button>
  227. <el-button type="primary" @click="SaveDialysisInformationSetting">保 存</el-button>
  228. </span>
  229. </el-dialog>
  230. </div>
  231. </template>
  232. <script>
  233. import { SaveDialysisInformationSetting,getDialysisInformationSetting,checkDialysisInformation } from "@/api/dialysis"
  234. import { uParseTime } from '@/utils/tools'
  235. export default {
  236. data() {
  237. return {
  238. activeName: 'first',
  239. dialogVisible:false,
  240. id:0,
  241. week_day:"",
  242. crumbs: [
  243. { path: false, name: "信息归档" },
  244. ],
  245. tableData:[],
  246. limit:10,
  247. page:1,
  248. list:[],
  249. total:0,
  250. totalOne:0,
  251. inforList:0,
  252. patients:[],
  253. adminList:[],
  254. id:0,
  255. };
  256. },
  257. methods: {
  258. handleClick(val){
  259. console.log("val----------------",val)
  260. },
  261. toSeeting(){
  262. var params = {
  263. limit:this.limit,
  264. page:this.page
  265. }
  266. getDialysisInformationSetting(params).then(response=>{
  267. if(response.data.state == 1){
  268. this.dialogVisible = true
  269. var informaitonSetting = response.data.data.informaitonSetting
  270. if (informaitonSetting!=null && informaitonSetting.length > 0) {
  271. this.week_day = informaitonSetting[0].week_day
  272. }
  273. }
  274. })
  275. },
  276. SaveDialysisInformationSetting(){
  277. var params = {
  278. week_day:parseInt(this.week_day),
  279. id:parseInt(this.id),
  280. }
  281. SaveDialysisInformationSetting(params).then(response=>{
  282. if(response.data.state == 1){
  283. var informaitonSetting = response.data.data.informaitonSetting
  284. this.dialogVisible = false
  285. }
  286. })
  287. },
  288. getlist(){
  289. var params = {
  290. limit:this.limit,
  291. page:this.page
  292. }
  293. getDialysisInformationSetting(params).then(response=>{
  294. if(response.data.state == 1){
  295. var informaitonSetting = response.data.data.informaitonSetting
  296. this.tableData = informaitonSetting
  297. //未审核
  298. this.list = response.data.data.infor
  299. this.total = response.data.data.total
  300. //已审核
  301. this.totalOne = response.data.data.totalOne
  302. this.inforList = response.data.data.inforList
  303. this.patients = response.data.data.patients
  304. this.adminList= response.data.data.adminList
  305. }
  306. })
  307. },
  308. handleSizeChange(val){
  309. this.limit = val;
  310. this.getList();
  311. },
  312. handleCurrentChange(val){
  313. this.page =val
  314. this.getlist()
  315. },
  316. handleSizeChangeOne(val){
  317. this.limit=val
  318. this.getlist()
  319. },
  320. handleCurrentChangeOne(val){
  321. this.page =val
  322. this.getlist()
  323. },
  324. getPatientName(patient_id){
  325. console.log("patinet_id---",patient_id)
  326. console.log("patients",this.patients)
  327. var name = ""
  328. for(let i=0;i<this.patients.length;i++){
  329. if(patient_id == this.patients[i].id){
  330. name = this.patients[i].name
  331. }
  332. }
  333. return name
  334. },
  335. getTimeOne(val) {
  336. if(val == ""){
  337. return ""
  338. }else {
  339. return uParseTime(val, '{y}-{m}-{d}')
  340. }
  341. },
  342. getTimeTwo(val) {
  343. if(val == ""){
  344. return ""
  345. }else {
  346. return uParseTime(val, '{y}-{m}-{d} {h}:{i}:{s}')
  347. }
  348. },
  349. getUserName(admin_user_id){
  350. var user_name = ""
  351. for(let i=0;i<this.adminList.length;i++){
  352. if(admin_user_id == this.adminList[i].admin_user_id){
  353. user_name = this.adminList[i].user_name
  354. }
  355. }
  356. return user_name
  357. },
  358. handleEdit(index,row) {
  359. this.$confirm("确认审核吗?", "审核", {
  360. confirmButtonText: "确 定",
  361. cancelButtonText: "取 消",
  362. type: "warning"
  363. }).then(() => {
  364. var params = {
  365. id:row.id,
  366. application_status:1,
  367. }
  368. checkDialysisInformation(params).then(response => {
  369. if (response.data.state == 0) {
  370. this.$message.error(response.data.msg);
  371. return false;
  372. } else {
  373. this.$notify({
  374. title: "成功",
  375. message: "审核成功",
  376. type: "success",
  377. duration: 2000
  378. });
  379. this.getlist()
  380. }
  381. });
  382. })
  383. .catch(() => {});
  384. },
  385. handleDelete(index,row){
  386. this.$confirm("确认审核吗?", "审核", {
  387. confirmButtonText: "确 定",
  388. cancelButtonText: "取 消",
  389. type: "warning"
  390. }).then(() => {
  391. var params = {
  392. id:row.id,
  393. application_status:3,
  394. }
  395. checkDialysisInformation(params).then(response => {
  396. if (response.data.state == 0) {
  397. this.$message.error(response.data.msg);
  398. return false;
  399. } else {
  400. this.$notify({
  401. title: "成功",
  402. message: "拒绝成功",
  403. type: "success",
  404. duration: 2000
  405. });
  406. this.getlist()
  407. }
  408. });
  409. }).catch(() => {});
  410. }
  411. },
  412. created(){
  413. this.getlist()
  414. }
  415. };
  416. </script>