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

processIndicators.1.vue 11KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377
  1. <template>
  2. <div class="app-container">
  3. <div class="cell clearfix">
  4. <label class="title">
  5. <span class="name">日期查询</span> :
  6. </label>
  7. <el-date-picker
  8. v-model="listQuery.start_time"
  9. prefix-icon="el-icon-date"
  10. @change="changeTime"
  11. :editable="false"
  12. style="width: 196px;"
  13. type="date"
  14. placeholder="选择日期时间"
  15. align="right"
  16. :picker-options="pickerOptions"
  17. format="yyyy-MM-dd"
  18. value-format="yyyy-MM-dd"
  19. ></el-date-picker>
  20. <span class>-</span>
  21. <el-date-picker
  22. v-model="listQuery.end_time"
  23. prefix-icon="el-icon-date"
  24. @change="changeTime"
  25. :editable="false"
  26. style="width: 196px;"
  27. type="date"
  28. placeholder="选择日期时间"
  29. align="right"
  30. :picker-options="pickerOptions"
  31. format="yyyy-MM-dd"
  32. value-format="yyyy-MM-dd"
  33. ></el-date-picker>
  34. </div>
  35. <div class="cell clearfix">
  36. <label class="title">
  37. <span class="name">透析龄</span> :
  38. </label>
  39. <div class="time">
  40. <ul class>
  41. <li
  42. :class="item.value==dialysisAge?'active':''"
  43. @click="selectdialysisAges(item.value)"
  44. v-for="item in dialysisAgeOptions"
  45. :key="item.value"
  46. >{{item.label}}</li>
  47. </ul>
  48. </div>
  49. </div>
  50. <div class="cell clearfix">
  51. <label class="title">
  52. <span class="name">转归状态</span> :
  53. </label>
  54. <div class="time">
  55. <ul class>
  56. <li
  57. :class="item.lapseto==lapsetoType?'active':''"
  58. @click="selectLapseTo( item.lapseto)"
  59. v-for="item in lapsetoState"
  60. :key="item.value"
  61. >{{item.label}}</li>
  62. </ul>
  63. </div>
  64. </div>
  65. <div class="cell clearfix">
  66. <label class="title">
  67. <span class="name">检验项目</span> :
  68. </label>
  69. <el-select v-model="listQuery.project_id" placeholder="请选择" @change="changeModel()">
  70. <el-option label="全部" value=""></el-option>
  71. <el-option v-for="item in projectOptions" :key="item.project_id" :label="item.project_name" :value="item.project_id"></el-option>
  72. </el-select>
  73. </div>
  74. <h4 class="hui">统计表</h4>
  75. <hr class="huixiao">
  76. <el-table
  77. ref="multipleTable"
  78. :data="tableData"
  79. :span-method="mergeSpan"
  80. border
  81. fit
  82. highlight-current-row
  83. style="width: 100%;margin-top: 10px;"
  84. >
  85. <el-table-column label="透析号" min-width="80" property="patient_id" align="center">
  86. <template slot-scope="scope">{{getPatientDialysisNo(scope.row.patient_id)}}</template>
  87. </el-table-column>
  88. <el-table-column label="姓名" min-width="80" property="patient_id" align="center">
  89. <template slot-scope="scope">{{getPatientName(scope.row.patient_id)}}</template>
  90. </el-table-column>
  91. <el-table-column label="检查项目" min-width="80" property="project_id" align="center">
  92. <template slot-scope="scope">{{getProjectName(scope.row.project_id)}}</template>
  93. </el-table-column>
  94. <el-table-column label="检查日期" min-width="80" property="inspect_date" align="center">
  95. <template slot-scope="scope">{{getTime(scope.row.inspect_date, '{y}{m}{d}')}}</template>
  96. </el-table-column>
  97. </el-table>
  98. <el-pagination
  99. @size-change="handleSizeChange"
  100. @current-change="handleCurrentChange"
  101. :current-page="listQuery.pate"
  102. :page-sizes="[10, 20, 50, 100]"
  103. :page-size="10"
  104. background
  105. style="margin-top:20px;"
  106. layout="total, sizes, prev, pager, next, jumper"
  107. :total="total"
  108. ></el-pagination>
  109. </div>
  110. </template>
  111. <script>
  112. import { GetProcessIndicatorsData } from "@/api/qcd";
  113. import {uParseTime} from "@/utils/tools";
  114. export default {
  115. name: "processIndicators",
  116. data() {
  117. return {
  118. total: 0,
  119. modesData: {
  120. xAxis:[],
  121. series:[],
  122. },
  123. listQuery: {
  124. start_time: "",
  125. end_time: "",
  126. page: 1,
  127. limit: 10,
  128. lapseto: 0,
  129. dialysis_age: 0,
  130. project_id:0,
  131. },
  132. projectOptions: {},
  133. patientMap:{},
  134. tableData: [],
  135. tableRowData:[],
  136. dialysisAge: 0,
  137. dialysisAgeOptions: [
  138. { value: 0, label: "全部" },
  139. { value: 1, label: "大于三个月" },
  140. { value: 2, label: "小于三个月" }
  141. ],
  142. lapsetoType: 0,
  143. lapsetoState: [
  144. { value: 0, label: "全部", source: 0, lapseto: 0 },
  145. { value: 1, label: "转出", source: 0, lapseto: 2 },
  146. { value: 2, label: "留治", source: 0, lapseto: 1 }
  147. ],
  148. pickerOptions: {
  149. shortcuts: [
  150. {
  151. text: "今天",
  152. onClick(picker) {
  153. picker.$emit("pick", new Date());
  154. }
  155. },
  156. {
  157. text: "昨天",
  158. onClick(picker) {
  159. const date = new Date();
  160. date.setTime(date.getTime() - 3600 * 1000 * 24);
  161. picker.$emit("pick", date);
  162. }
  163. },
  164. {
  165. text: "一周前",
  166. onClick(picker) {
  167. const date = new Date();
  168. date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
  169. picker.$emit("pick", date);
  170. }
  171. },
  172. {
  173. text: "清空",
  174. onClick(picker) {
  175. picker.$emit("pick");
  176. }
  177. }
  178. ]
  179. }
  180. };
  181. },
  182. created() {
  183. var nowDate = new Date();
  184. var nowYear = nowDate.getFullYear();
  185. var nowMonth = nowDate.getMonth() + 1;
  186. var nowDay = nowDate.getDate();
  187. this.listQuery.end_time = nowYear + "-" + (nowMonth < 10 ? "0" + nowMonth : nowMonth) + "-" + (nowDay < 10 ? "0" + nowDay : nowDay);
  188. nowDate.setMonth(nowDate.getMonth() - 3);
  189. nowYear = nowDate.getFullYear();
  190. nowMonth = nowDate.getMonth() + 1;
  191. nowDay = nowDate.getDate();
  192. this.listQuery.start_time = nowYear + "-" + (nowMonth < 10 ? "0" + nowMonth : nowMonth) + "-" + (nowDay < 10 ? "0" + nowDay : nowDay);
  193. this.getList();
  194. },
  195. methods: {
  196. getList() {
  197. GetProcessIndicatorsData(this.listQuery).then(response => {
  198. if (response.data.state == 0) {
  199. this.$message.error(response.data.msg);
  200. return false;
  201. } else {
  202. this.tableData = [];
  203. this.tableRowData = []
  204. var references = response.data.data.references;
  205. for (const index in references) {
  206. if (references[index].project_id in this.projectOptions) {
  207. continue;
  208. }
  209. this.$set(this.projectOptions, references[index].project_id, references[index]);
  210. }
  211. var patients = response.data.data.patients;
  212. for (const index in patients) {
  213. if (patients[index].id in this.patientMap) {
  214. continue;
  215. }
  216. this.$set(this.patientMap, patients[index].id, patients[index]);
  217. }
  218. //
  219. var temInspections = {};
  220. var inspections = response.data.data.inspections;
  221. for (const index in inspections) {
  222. var key = inspections[index].inspect_date + '_' + inspections[index].patient_id;
  223. if (!(key in temInspections)) {
  224. temInspections[key] = {};
  225. }
  226. if (inspections[index].project_id in temInspections[key]) {
  227. continue;
  228. }
  229. temInspections[key][inspections[index].project_id] = inspections[index];
  230. }
  231. this.total = response.data.data.total;
  232. var rowIndex = 0;
  233. var childIndex = 0;
  234. for (const key in temInspections) {
  235. this.tableRowData.push(1);
  236. var parentIndex = rowIndex;
  237. childIndex = 0;
  238. for (const child in temInspections[key]) {
  239. this.tableData.push(temInspections[key][child]);
  240. if(childIndex>0) {
  241. this.tableRowData[parentIndex] += 1;
  242. this.tableRowData.push(0);
  243. }
  244. childIndex++;
  245. rowIndex++;
  246. }
  247. }
  248. }
  249. });
  250. },
  251. mergeSpan({row, column, rowIndex, columnIndex}) {
  252. if (columnIndex === 0 || columnIndex === 1 || columnIndex === 3) {
  253. const _row = this.tableRowData[rowIndex];
  254. const _col = _row > 0 ? 1 : 0;
  255. return {
  256. rowspan: _row,
  257. colspan: _col
  258. }
  259. }
  260. },
  261. changeTime() {
  262. this.getList();
  263. },
  264. selectdialysisAges(type) {
  265. this.dialysisAge = type;
  266. this.listQuery.dialysis_age = type;
  267. this.getList();
  268. },
  269. selectLapseTo(lapseto) {
  270. this.lapsetoType = lapseto;
  271. this.listQuery.lapseto = lapseto;
  272. this.getList();
  273. },
  274. changeModel() {
  275. this.getList();
  276. },
  277. handleSizeChange(val) {
  278. this.listQuery.limit = val;
  279. this.getList();
  280. },
  281. handleCurrentChange(val) {
  282. this.listQuery.page = val;
  283. this.getList();
  284. },
  285. getTime(value, temp) {
  286. if (value != undefined) {
  287. return uParseTime(value, temp)
  288. }
  289. return ""
  290. },
  291. getProjectName(id) {
  292. return (id in this.projectOptions) ? this.projectOptions[id].project_name:'';
  293. },
  294. getPatientName(id) {
  295. return (id in this.patientMap) ? this.patientMap[id].name:'';
  296. },
  297. getPatientDialysisNo(id) {
  298. return (id in this.patientMap) ? this.patientMap[id].dialysis_no:'';
  299. }
  300. }
  301. };
  302. </script>
  303. <style rel="stylesheet/scss" lang="scss" scoped>
  304. .app-container {
  305. // margin: 20px;
  306. margin-bottom: 50px;
  307. font-size: 15px;
  308. .filter-container {
  309. padding-bottom: 5px;
  310. }
  311. .hui {
  312. color: #909399;
  313. margin-bottom: 5px;
  314. }
  315. .huixiao {
  316. border: solid 1px #ebeef5;
  317. }
  318. .el-pagination {
  319. float: right !important;
  320. }
  321. .search-component {
  322. width: 500px;
  323. .searchBox {
  324. width: 300px;
  325. height: 36px;
  326. line-height: 36px;
  327. padding-left: 15px;
  328. border: 1px #dcdfe6 solid;
  329. border-right: none;
  330. outline: none;
  331. float: left;
  332. border-radius: 6px 0 0 6px;
  333. font-size: 14px;
  334. color: #333;
  335. background: #fff;
  336. box-shadow: 3px 3px 4px rgba(135, 135, 135, 0.05);
  337. }
  338. .searchBtn {
  339. background-color: #409eff;
  340. color: #fff;
  341. font-size: 15px;
  342. text-align: center;
  343. height: 36px;
  344. line-height: 36px;
  345. float: left;
  346. outline: none;
  347. width: 70px;
  348. border: none;
  349. border-radius: 0 6px 6px 0;
  350. font-family: "Microsoft Yahei";
  351. cursor: pointer;
  352. }
  353. }
  354. .amount {
  355. font-weight: normal;
  356. padding: 10px 0 0 0;
  357. color: #606266;
  358. font-size: 14px;
  359. span {
  360. color: #ef2525;
  361. font-family: "Arial";
  362. padding: 0 2px;
  363. }
  364. }
  365. }
  366. </style>