You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

279 lines
8.2 KiB

2 weeks ago
5 days ago
2 weeks ago
  1. <template>
  2. <div>
  3. <div class="contenttitle">
  4. 体检查询 /<span class="contenttitleBold">科室进度查询</span>
  5. </div>
  6. <!--查询条件-->
  7. <div style="display: flex;">
  8. <div class="query">
  9. <span class="spanClass">科室</span>
  10. <!-- multiple: true -->
  11. <el-cascader :options="dict.itemTypeTree" v-model="query.itemTypeIds" popper-class="example"
  12. style="width:240px;" :props="{
  13. checkStrictly: true, expandTrigger: 'hover', label: 'displayName', value: 'id',
  14. id: 'id', children: 'treeChildren',
  15. }" clearable filterable size="small" collapse-tags>
  16. </el-cascader>
  17. </div>
  18. <div class="query">
  19. <el-select v-model="query.dateType" placeholder="请选择" style="width: 80px" size="small">
  20. <el-option label="登记日期" :value="'1'" />
  21. <el-option label="体检日期" :value="'2'" />
  22. <!-- <el-option label="总检日期" :value="'3'" /> -->
  23. </el-select>
  24. <!-- dateType 1 登记2 体检3 体检或登记-->
  25. <el-date-picker v-model="query.startDate" type="date" placeholder="起始日期" size="small" style="width:90px;"
  26. value-format="yyyy-MM-dd" :picker-options="pickerOptions" />
  27. <!--
  28. <span class="spanClass"></span>
  29. <el-date-picker v-model="query.endDate" type="date" placeholder="截止日期" size="small" style="width:90px;"
  30. value-format="yyyy-MM-dd" :picker-options="pickerOptions" />
  31. -->
  32. </div>
  33. <!--
  34. <div class="query">
  35. <span class="spanClass">人员类别</span>
  36. <el-select v-model="query.personnelTypeIds" placeholder="请选择" clearable filterable
  37. style="width: 170px" size="small" multiple collapse-tags>
  38. <el-option v-for="item in dict.personnelType" :key="item.id" :label="item.displayName" :value="item.id" />
  39. </el-select>
  40. </div>
  41. -->
  42. <div class="query">
  43. <el-button class="commonbutton" @click="btnQuery">查询</el-button>
  44. </div>
  45. </div>
  46. <div :style="`overflow: auto;margin-top: 10px;width:'${window.pageWidth - 15}px;;height:${divHeight}px;`">
  47. <table width="800" border="1" cellspacing="0" bordercolor="#909399"
  48. style="font-size:14px;border-collapse:collapse;">
  49. <tr style="text-align: center;" height="24">
  50. <td width="100">科室</td>
  51. <td width="200">组合项目</td>
  52. <td width="100">签到人数</td>
  53. <td width="100">完成人数</td>
  54. <td width="100">弃检人数</td>
  55. <td width="100">剩余人数</td>
  56. <td width="100">完成率</td>
  57. </tr>
  58. <template v-for="(sum,index) in tableData">
  59. <template v-for="(item,index2) in sum.details">
  60. <tr height="24" v-if="index2 == 0">
  61. <td align="center" class="tdCellClass" :rowspan="sum.details.length + 1">{{ sum.itemTypeName }}</td>
  62. <td align="left" class="tdCellClass">{{ item.asbitemName}}</td>
  63. <td align="center" class="tdCellClass">{{ item.signInCount }}</td>
  64. <td align="center" class="tdCellClass">{{ item.completeCount }}</td>
  65. <td align="center" class="tdCellClass">{{ item.giveUpCheckedCount }}</td>
  66. <td align="center" class="tdCellClass">{{ item.balanceCount }}</td>
  67. <td align="center" class="tdCellClass">{{ item.completionRate + '%' }}</td>
  68. </tr>
  69. <tr height="24" v-else>
  70. <td align="left" class="tdCellClass">{{ item.asbitemName}}</td>
  71. <td align="center" class="tdCellClass">{{ item.signInCount }}</td>
  72. <td align="center" class="tdCellClass">{{ item.completeCount }}</td>
  73. <td align="center" class="tdCellClass">{{ item.giveUpCheckedCount }}</td>
  74. <td align="center" class="tdCellClass">{{ item.balanceCount }}</td>
  75. <td align="center" class="tdCellClass">{{ item.completionRate + '%' }}</td>
  76. </tr>
  77. </template>
  78. <tr height="24">
  79. <td align="right" class="tdCellClassRed">小计</td>
  80. <td align="center" class="tdCellClassRed">{{ sum.sumSignInCount }}</td>
  81. <td align="center" class="tdCellClassRed">{{ sum.sumCompleteCount }}</td>
  82. <td align="center" class="tdCellClassRed">{{ sum.sumGiveUpCheckedCount }}</td>
  83. <td align="center" class="tdCellClassRed">{{ sum.sumBalanceCount }}</td>
  84. <td align="center" class="tdCellClassRed">{{ sum.sumCompletionRate + '%' }}</td>
  85. </tr>
  86. </template>
  87. </table>
  88. <!--
  89. {
  90. "itemTypeName": "检前问询",
  91. "sumSignInCount": 2,
  92. "sumCompleteCount": 0,
  93. "sumGiveUpCheckedCount": 0,
  94. "sumBalanceCount": 2,
  95. "sumCompletionRate": 0,
  96. "details": [
  97. {
  98. "itemTypeName": "检前问询",
  99. "asbitemName": "问诊表",
  100. "signInCount": 1,
  101. "completeCount": 0,
  102. "giveUpCheckedCount": 0,
  103. "balanceCount": 1,
  104. "completionRate": 0
  105. },
  106. {
  107. "itemTypeName": "检前问询",
  108. "asbitemName": "心理及精神压力",
  109. "signInCount": 1,
  110. "completeCount": 0,
  111. "giveUpCheckedCount": 0,
  112. "balanceCount": 1,
  113. "completionRate": 0
  114. }
  115. ]
  116. }
  117. -->
  118. </div>
  119. </div>
  120. </template>
  121. <script>
  122. import moment from "moment";
  123. import { mapState, mapActions } from "vuex";
  124. import { getapi, postapi, putapi, deletapi } from "@/api/api";
  125. import { dddw, objCopy, arrayReduce, arrayExistObj, tcdate } from "@/utlis/proFunc";
  126. export default {
  127. components: {
  128. },
  129. data() {
  130. return {
  131. query: {
  132. itemTypeIds: [],
  133. dateType: '2',
  134. startDate: '',
  135. endDate: ''
  136. },
  137. tableData: [], //列表数据
  138. };
  139. },
  140. created() {
  141. },
  142. //挂载完成
  143. mounted() {
  144. let ldate = new Date();
  145. this.query.startDate = this.moment(ldate).format("YYYY-MM-DD");
  146. this.query.endDate = ldate;
  147. this.dictInit()
  148. },
  149. computed: {
  150. ...mapState(["pickerOptions", "window", "dict"]),
  151. divHeight(){
  152. return this.window.pageHeight < 600 ? 430 : this.window.pageHeight - 140
  153. }
  154. },
  155. methods: {
  156. ...mapActions(["getCustomerOrgGroup", "getPatientRegisterAbs"]),
  157. dddw, moment,
  158. dictInit() {
  159. //体检类别
  160. // getapi("/api/app/medical-type/in-filter").then((res) => {
  161. // if (res.code > -1) {
  162. // this.dict.medicalType = res.data;
  163. // }
  164. // });
  165. //人员类别
  166. getapi("/api/app/personnel-type/in-filter").then((res) => {
  167. if (res.code > -1) {
  168. this.dict.personnelType = res.data;
  169. }
  170. });
  171. // 项目类别 树结构
  172. getapi("/api/app/item-type/by-code-all").then((res) => {
  173. if (res.code != -1) {
  174. this.dict.itemTypeTree = res.data;
  175. tcdate(this.dict.itemTypeTree);
  176. }
  177. });
  178. },
  179. //查询
  180. btnQuery() {
  181. let body = {
  182. dateType: this.query.dateType,
  183. startDate: this.query.startDate,
  184. endDate: this.query.startDate
  185. }
  186. if (Array.isArray(this.query.itemTypeIds) && this.query.itemTypeIds.length > 0)
  187. body.itemTypeIds = this.query.itemTypeIds.slice(this.query.itemTypeIds.length - 1, 1)
  188. postapi('/api/app/PeisReport/GetItemTypeProgressReport', body)
  189. .then(res => {
  190. if (res.code >= -1) {
  191. this.tableData = res.data
  192. }
  193. })
  194. },
  195. },
  196. //监听事件
  197. watch: {
  198. //触发查询事件
  199. // "patientRegister.query.times"(newVal, oldVal) {
  200. // if (newVal != oldVal) {
  201. // //alert('触发查询事件')
  202. // this.Query();
  203. // }
  204. // },
  205. },
  206. };
  207. </script>
  208. <style scoped>
  209. @import '../../assets/css/global_button.css';
  210. @import '../../assets/css/global_dialog.css';
  211. @import '../../assets/css/global_form.css';
  212. @import '../../assets/css/global_input.css';
  213. @import '../../assets/css/global_table.css';
  214. @import '../../assets/css/global.css';
  215. .listBtn {
  216. margin-top: 10px;
  217. }
  218. .btnClass {
  219. width: 100px;
  220. }
  221. .query {
  222. margin-right: 10px;
  223. font-size: 14px;
  224. color: #232748;
  225. font-weight: 400;
  226. font-family: "NotoSansSC-Regular";
  227. }
  228. .spanClass {
  229. font-size: 14px;
  230. padding: 0 2px 0 0;
  231. }
  232. .tdCellClass {
  233. padding: 0 5px;
  234. }
  235. .tdCellClassRed {
  236. padding: 0 5px;
  237. color: red;
  238. }
  239. </style>