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

patientControlAnalysis.vue 8.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280
  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. <div class="page_patientControlAnalysis">
  8. <div class="cell clearfix">
  9. <el-form :inline="true" :model="listQuery">
  10. <el-form-item label>
  11. <el-input v-model.trim="listQuery.search" placeholder="姓名/透析号" style="width: 200px;"></el-input>
  12. <el-button type="primary" @click="onSearch" icon="el-icon-search">搜索</el-button>
  13. </el-form-item>
  14. </el-form>
  15. <el-select v-model="value" placeholder="请选择" style="margin-right:20px;width:100px">
  16. <el-option
  17. v-for="item in options"
  18. :key="item.value"
  19. :label="item.label"
  20. :value="item.value"
  21. ></el-option>
  22. </el-select>
  23. <label class="title">
  24. <span class="name">日期查询</span> :
  25. </label>
  26. <el-date-picker
  27. v-model="listQuery.start_time"
  28. prefix-icon="el-icon-date"
  29. @change="changeTime"
  30. :editable="false"
  31. style="width: 196px;"
  32. type="date"
  33. placeholder="选择日期时间"
  34. align="right"
  35. format="yyyy-MM-dd"
  36. value-format="yyyy-MM-dd"
  37. ></el-date-picker>
  38. <span class>-</span>
  39. <el-date-picker
  40. v-model="listQuery.end_time"
  41. prefix-icon="el-icon-date"
  42. @change="changeEndTime"
  43. :editable="false"
  44. style="width: 196px;"
  45. type="date"
  46. placeholder="选择日期时间"
  47. align="right"
  48. format="yyyy-MM-dd"
  49. value-format="yyyy-MM-dd"
  50. ></el-date-picker>
  51. </div>
  52. <div class="cell clearfix">
  53. <p class="chartTitle">统计图</p>
  54. </div>
  55. <div>
  56. <line-chart :options="chart"></line-chart>
  57. </div>
  58. <div class="cell clearfix">
  59. <p class="chartTitle">统计表</p>
  60. </div>
  61. <div>
  62. <el-table :data="tableData" border style="width: 100%" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}">
  63. <el-table-column fixed prop="date" label="日期" width="150"></el-table-column>
  64. <el-table-column prop="name" label="姓名" width="120"></el-table-column>
  65. <el-table-column prop="province" label="省份" width="120"></el-table-column>
  66. <el-table-column prop="city" label="市区" width="120"></el-table-column>
  67. <el-table-column prop="address" label="地址" width="300"></el-table-column>
  68. <el-table-column prop="zip" label="邮编" width="120"></el-table-column>
  69. <el-table-column fixed="right" label="操作" width="100">
  70. <template slot-scope="scope">
  71. <el-button @click="handleClick(scope.row)" type="text" size="small">查看</el-button>
  72. </template>
  73. </el-table-column>
  74. </el-table>
  75. <el-pagination
  76. align="right"
  77. @size-change="handleSizeChange"
  78. @current-change="handleCurrentChange"
  79. :current-page="listQuery.page"
  80. :page-sizes="[10, 20, 50, 100]"
  81. :page-size="10"
  82. background
  83. style="margin-top:20px;"
  84. layout="total, sizes, prev, pager, next, jumper"
  85. :total="total"
  86. ></el-pagination>
  87. </div>
  88. </div>
  89. </div>
  90. </div>
  91. </template>
  92. <script>
  93. import echarts from "echarts";
  94. import BreadCrumb from "@/xt_pages/components/bread-crumb";
  95. import LineChart from "../qcd/components/LineChart";
  96. export default {
  97. components: {
  98. LineChart,
  99. BreadCrumb
  100. },
  101. data() {
  102. return {
  103. crumbs: [
  104. { path: false, name: "科室质控" },
  105. { path: false, name: "患者质控达标统计" }
  106. ],
  107. listQuery: {
  108. start_time: "",
  109. end_time: "",
  110. page: 1,
  111. limit: 10
  112. },
  113. options: [
  114. {
  115. value: "选项1",
  116. label: "黄金糕"
  117. },
  118. {
  119. value: "选项2",
  120. label: "双皮奶"
  121. },
  122. {
  123. value: "选项3",
  124. label: "蚵仔煎"
  125. },
  126. {
  127. value: "选项4",
  128. label: "龙须面"
  129. },
  130. {
  131. value: "选项5",
  132. label: "北京烤鸭"
  133. }
  134. ],
  135. value: "",
  136. chart: {
  137. title: {
  138. text: "ECharts 入门示例"
  139. },
  140. tooltip: {},
  141. legend: {
  142. data: ["次数"],
  143. left: 0
  144. },
  145. xAxis: {
  146. data: ["达标", "未达标"]
  147. },
  148. yAxis: {
  149. axisLabel: {
  150. formatter: "{value} %"
  151. },
  152. show: false
  153. },
  154. series: [
  155. {
  156. name: "次数",
  157. type: "bar",
  158. data: ["78.57", "50"],
  159. barWidth: 30,
  160. label: {
  161. normal: {
  162. show: true,
  163. position: "top",
  164. formatter: "{c}次"
  165. }
  166. },
  167. //配置样式
  168. itemStyle: {
  169. //通常情况下:
  170. //每个柱子的颜色即为colorList数组里的每一项,如果柱子数目多于colorList的长度,则柱子颜色循环使用该数组
  171. normal: {
  172. color: function(params) {
  173. //我这边就两个柱子,大体就两个柱子颜色渐变,所以数组只有两个值,多个颜色就多个值
  174. var colorList = [
  175. ["#A9E0F3", "#9FBDFC"],
  176. ["#FFD7C0", "#FF9994"]
  177. ];
  178. var index = params.dataIndex;
  179. if (params.dataIndex >= colorList.length) {
  180. index = params.dataIndex % colorList.length;
  181. }
  182. return new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  183. { offset: 0, color: colorList[index][0] },
  184. // { offset: 0.5, color: colorList[index][1] },
  185. { offset: 1, color: colorList[index][1] }
  186. ]);
  187. },
  188. barBorderRadius: [5, 5, 0, 0] //柱状角成椭圆形
  189. },
  190. //鼠标悬停时:
  191. emphasis: {
  192. shadowBlur: 10,
  193. shadowOffsetX: 0,
  194. shadowColor: "rgba(0, 0, 0, 0.5)"
  195. }
  196. }
  197. }
  198. ]
  199. },
  200. tableData: [
  201. {
  202. date: "2016-05-02",
  203. name: "王小虎",
  204. province: "上海",
  205. city: "普陀区",
  206. address: "上海市普陀区金沙江路 1518 弄",
  207. zip: 200333
  208. },
  209. {
  210. date: "2016-05-04",
  211. name: "王小虎",
  212. province: "上海",
  213. city: "普陀区",
  214. address: "上海市普陀区金沙江路 1517 弄",
  215. zip: 200333
  216. },
  217. {
  218. date: "2016-05-01",
  219. name: "王小虎",
  220. province: "上海",
  221. city: "普陀区",
  222. address: "上海市普陀区金沙江路 1519 弄",
  223. zip: 200333
  224. },
  225. {
  226. date: "2016-05-03",
  227. name: "王小虎",
  228. province: "上海",
  229. city: "普陀区",
  230. address: "上海市普陀区金沙江路 1516 弄",
  231. zip: 200333
  232. }
  233. ]
  234. };
  235. },
  236. methods: {
  237. changeTime() {},
  238. changeEndTime(val) {
  239. var time =
  240. this.getTimestamp(val) - this.getTimestamp(this.listQuery.start_time);
  241. if (time < 0) {
  242. this.$message.error("结束时间不能小于开始时间");
  243. this.listQuery.end_time = "";
  244. } else {
  245. }
  246. },
  247. handleClick(row) {
  248. console.log(row);
  249. this.$router.push({ path: "/qcd/patientComplianceDetails" });
  250. }
  251. }
  252. };
  253. </script>
  254. <style lang="scss" scoped>
  255. .page_patientControlAnalysis {
  256. .pointTitle {
  257. font-size: 13px;
  258. }
  259. }
  260. </style>
  261. <style lang="scss">
  262. .page_patientControlAnalysis {
  263. .el-form-item {
  264. margin-bottom: 0;
  265. }
  266. .cell {
  267. text-align: center;
  268. }
  269. }
  270. </style>