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.

441 lines
13 KiB

3 years ago
2 years ago
5 months ago
2 years ago
5 months ago
2 years ago
5 months ago
4 months ago
3 years ago
4 months ago
3 years ago
5 months ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
4 months ago
2 years ago
4 months ago
2 years ago
4 months ago
3 years ago
5 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
5 months ago
2 years ago
3 years ago
2 years ago
3 years ago
4 months ago
2 years ago
5 months ago
3 years ago
4 months ago
3 years ago
2 years ago
3 years ago
4 months ago
3 years ago
5 months ago
4 months ago
5 months ago
4 months ago
3 years ago
2 years ago
3 years ago
5 months ago
3 years ago
5 months ago
3 years ago
4 months ago
3 years ago
5 months ago
3 years ago
5 months ago
3 years ago
5 months ago
3 years ago
4 months ago
3 years ago
4 months ago
5 months ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
4 months ago
3 years ago
4 months ago
5 months ago
4 months ago
5 months ago
4 months ago
5 months ago
4 months ago
5 months ago
4 months ago
5 months ago
3 years ago
4 months ago
3 years ago
4 months ago
3 years ago
4 months ago
3 years ago
4 months ago
3 years ago
4 months ago
3 years ago
2 years ago
3 years ago
4 months ago
5 months ago
2 years ago
3 years ago
4 months ago
3 years ago
5 months ago
4 months ago
2 years ago
5 months ago
3 years ago
4 months ago
3 years ago
2 years ago
2 years ago
4 months ago
3 years ago
2 years ago
5 months ago
2 years ago
5 months ago
2 years ago
3 years ago
2 years ago
3 years ago
5 months ago
2 years ago
4 months ago
2 years ago
5 months ago
2 years ago
3 years ago
  1. <template>
  2. <div class="box">
  3. <div>
  4. <div class="middlebox">
  5. <div class="contenttitle">
  6. 客户报表 /
  7. <span class="contenttitleBold">人员阳性结果</span>
  8. </div>
  9. </div>
  10. <div :style="'display: block;'">
  11. <div
  12. style="
  13. background-color: #fff;
  14. padding: 15px;
  15. border-radius: 8px;
  16. display: flex;
  17. flex-wrap: wrap;
  18. margin-bottom: 10px;
  19. height: 35px;
  20. margin-top: 7px;
  21. "
  22. >
  23. <div class="query">
  24. <span>体检单位</span>
  25. <el-input
  26. placeholder="请选择体检单位"
  27. v-model="patientRegister.query.cusOrgOCX"
  28. style="width: 240px"
  29. size="small"
  30. disabled
  31. >
  32. <el-button
  33. slot="append"
  34. icon="el-icon-search"
  35. @click="report.dialogCusOrgOCX = true"
  36. style="font-size: 20px"
  37. ></el-button>
  38. </el-input>
  39. </div>
  40. <!-- <div class="query">
  41. <span>检查状态</span>
  42. <el-select v-model="completeFlag" placeholder="请选择" clearable style="width: 80px"
  43. size="small">
  44. <el-option label="预登记" value="0" />
  45. <el-option label="正式登记" value="1" />
  46. <el-option label="部份已检" value="2" />
  47. <el-option label="已总检" value="3" />
  48. </el-select>
  49. </div>
  50. <div class="query">
  51. <el-checkbox v-model="classification" true-label="Y" false-label="N"/>
  52. <span style="margin-left:5px;">审核状态</span>
  53. </div> -->
  54. <!-- <div class="query">
  55. <span>疾病来源</span>
  56. <el-select v-model="patientRegister.query.isCharge" placeholder="请选择" clearable style="width: 80px"
  57. size="small">
  58. <el-option label="综述" value="0" />
  59. <el-option label="建议" value="1" />
  60. <el-option label="疾病列表" value="2" />
  61. </el-select>
  62. </div>
  63. <div class="query">
  64. <el-checkbox v-model="classification" true-label="Y" false-label="N"/>
  65. <span>分类统计</span>
  66. </div> -->
  67. <div class="query">
  68. <el-button @click="btnQuery" size="small" class="commonbutton"
  69. >查询</el-button
  70. >
  71. </div>
  72. <div class="query">
  73. <el-button @click="handleExport" size="small" class="commonbutton"
  74. >导出excel</el-button
  75. >
  76. </div>
  77. <div class="query">
  78. <el-button @click="onPrint" size="small" class="commonbutton"
  79. >打印</el-button
  80. >
  81. </div>
  82. </div>
  83. <div
  84. ref="imageDom"
  85. style="background-color: #fff; padding: 15px; border-radius: 8px"
  86. >
  87. <el-table
  88. :data="dataList"
  89. border
  90. width="45%"
  91. :height="
  92. flag
  93. ? window.pageHeight < 600
  94. ? 415
  95. : window.pageHeight - 185 - 25
  96. : ''
  97. "
  98. row-key="id"
  99. highlight-current-row
  100. ref="dataList"
  101. :row-class-name="tableRowClassName"
  102. id="table"
  103. show-summary
  104. :summary-method="getSummaries"
  105. >
  106. <el-table-column :label="summary.customerOrgName">
  107. <el-table-column
  108. :label="`开始时间: ${summary.startDate || ''} 结束时间:${
  109. summary.endDate || ''
  110. } 体检人员共计 ${
  111. summary.maleCount + summary.femaleCount
  112. } 男性 ${summary.maleCount} 女性 ${summary.femaleCount}`"
  113. align="left"
  114. >
  115. <el-table-column
  116. type="index"
  117. label="序号"
  118. width="60"
  119. align="center"
  120. />
  121. <el-table-column prop="customerOrgParentName" label="单位" align="center"/>
  122. <el-table-column prop="customerOrgName" label="部门" align="center"/>
  123. <el-table-column prop="patientNo" label="档案号" width="90" align="center"/>
  124. <el-table-column prop="patientName" label="姓名" width="90" align="center"/>
  125. <el-table-column prop="sexName" label="性别" width="50" align="center"/>
  126. <el-table-column prop="age" label="年龄" width="80" align="center"/>
  127. <el-table-column prop="medicalTimes" label="次数" width="50" align="center"/>
  128. <el-table-column
  129. prop="mobileTelephone"
  130. label="手机号码"
  131. width="120"
  132. />
  133. <el-table-column prop="summary" label="检查综述" />
  134. <el-table-column prop="diagnosisNames" label="检查结果" />
  135. </el-table-column>
  136. </el-table-column>
  137. </el-table>
  138. </div>
  139. </div>
  140. </div>
  141. <!--通用选单位体检次数分组的控件-->
  142. <el-dialog
  143. title="体检单位选择"
  144. :visible.sync="report.dialogCusOrgOCX"
  145. :close-on-click-modal="false"
  146. width="880px"
  147. height="600px"
  148. >
  149. <CusOrgOCX :initDateType="'creationTime'" :useCustomerOrg="true" />
  150. </el-dialog>
  151. </div>
  152. </template>
  153. <script>
  154. import moment from "moment";
  155. import { mapState, mapActions } from "vuex";
  156. import { getapi, postapi, putapi, deletapi } from "@/api/api";
  157. import {
  158. dddw,
  159. objCopy,
  160. arrayReduce,
  161. arrayExistObj,
  162. tcdate,
  163. } from "@/utlis/proFunc";
  164. import CusOrgOCX from "../../components/report/CusOrgOCX.vue";
  165. import { exportToExcel } from "../../utlis/Export2Excel";
  166. import html2canvas from "html2canvas";
  167. import printJs from "print-js";
  168. export default {
  169. components: {
  170. CusOrgOCX,
  171. },
  172. data() {
  173. return {
  174. dataList: [], //列表数据
  175. completeFlag: "",
  176. classification: "Y",
  177. flag: true,
  178. summary: {
  179. startDate: "",
  180. endDate: "",
  181. femaleCount: "",
  182. maleCount: "",
  183. customerOrgName:""
  184. },
  185. };
  186. },
  187. created() {
  188. this.dictInit();
  189. },
  190. //挂载完成
  191. mounted() {
  192. // this.btnQuery();
  193. },
  194. computed: {
  195. ...mapState(["window", "dict", "patientRegister", "report"]),
  196. },
  197. methods: {
  198. moment,
  199. dddw,
  200. //数据初始化
  201. dictInit() {
  202. //体检中心
  203. getapi("/api/app/organization-units/organization-unit-by-is-peis").then(
  204. (res) => {
  205. if (res.code == 1) {
  206. this.dict.organization = res.data;
  207. }
  208. }
  209. );
  210. //体检单位树
  211. getapi("/api/app/customerorg/getbycodeall").then((res) => {
  212. if (res.code == 1) {
  213. this.patientRegister.customerOrgTreeAll = res.data;
  214. tcdate(this.patientRegister.customerOrgTreeAll);
  215. }
  216. });
  217. // //体检类别
  218. // getapi("/api/app/medical-type/in-filter").then((res) => {
  219. // if (res.code == 1) {
  220. // this.dict.medicalType = res.data.items;
  221. // }
  222. // });
  223. // //体检类别 树结构
  224. // getapi("/api/app/item-type/by-code-all").then((res) => {
  225. // if (res.code == 1) {
  226. // this.dict.itemTypeTree = res.data;
  227. // tcdate(this.dict.itemTypeTree);
  228. // }
  229. // });
  230. // postapi("/api/app/diagnosis/getlistinsuggestion").then((res) => {
  231. // if (res.code == 1) {
  232. // this.dict.asbItemAll = res.data;
  233. // }
  234. // });
  235. console.log("dict", this.dict);
  236. },
  237. tableRowClassName({ row, rowIndex }) {
  238. switch (row.isCharge) {
  239. case "N":
  240. return "danger";
  241. default:
  242. return "";
  243. }
  244. },
  245. getSummaries(param) {
  246. const { columns, data } = param;
  247. const sums = [];
  248. columns.forEach((column, index) => {
  249. if (index === 0) {
  250. sums[index] = "合计";
  251. return;
  252. }
  253. if (index === 1) {
  254. sums[index] = data.length + " 人";
  255. }
  256. });
  257. return sums;
  258. },
  259. //查询
  260. btnQuery() {
  261. let body = {},
  262. customerOrgs = [],
  263. diagnosisIds = [];
  264. if (this.report.dataCusOrgOCX.length > 0) {
  265. this.report.dataCusOrgOCX.forEach((e) => {
  266. let dateType = "1";
  267. switch (e.dateType) {
  268. case "medicalStartDate":
  269. dateType = "2";
  270. break;
  271. case "checkDate":
  272. dateType = "4";
  273. break;
  274. case "summaryDate":
  275. dateType = "3";
  276. break;
  277. case "sumCheckDate":
  278. dateType = "5";
  279. break;
  280. default:
  281. break;
  282. }
  283. let rd = {
  284. startDate: moment(e.startDate).format("yyyy-MM-DD"),
  285. endDate: moment(e.endDate).format("yyyy-MM-DD"),
  286. dateType,
  287. };
  288. console.log(e);
  289. if (e.customerOrgId) {
  290. rd.customerOrgId = e.customerOrgId;
  291. if (e.customerOrgId == this.dict.personOrgId) {
  292. rd.customerOrgRegisterId = null;
  293. rd.customerOrgGroupId = [];
  294. } else {
  295. rd.customerOrgRegisterId = e.customerOrgRegister.id;
  296. rd.customerOrgGroupId = e.customerOrgGroupIds;
  297. }
  298. }
  299. customerOrgs.push(rd);
  300. });
  301. }
  302. // if (this.report.dataAsbitemOCX.length > 0) {
  303. // this.report.dataAsbitemOCX.forEach(e => {
  304. // diagnosisIds.push(e.id)
  305. // })
  306. // }
  307. body.customerOrgs = customerOrgs;
  308. // body.diagnosisIds = diagnosisIds
  309. // if(this.completeFlag) body.completeFlag = this.completeFlag
  310. // body.isAudit=this.classification
  311. // if (this.patientRegister.query.isCharge) body.isCharge = this.patientRegister.query.isCharge
  312. //console.log('/api/app/peisreport/getregisterasbitemchargestatus',body)
  313. postapi(
  314. "/api/customerreport/getpatientregisterpositivereport",
  315. body
  316. ).then((res) => {
  317. if (res.code != -1) {
  318. this.dataList = res.data.details;
  319. this.summary.startDate = res.data.startDate;
  320. this.summary.endDate = res.data.endDate;
  321. this.summary.femaleCount = res.data.femaleCount;
  322. this.summary.maleCount = res.data.maleCount;
  323. if(this.report.dataCusOrgOCX.length>1){
  324. this.summary.customerOrgName=""
  325. }else{
  326. this.summary.customerOrgName=this.report.dataCusOrgOCX[0].customerOrgName
  327. }
  328. this.$nextTick(() => {
  329. this.$refs.dataList.doLayout();
  330. });
  331. }
  332. });
  333. },
  334. onPrint() {
  335. this.flag = false;
  336. this.$nextTick(() => {
  337. let width = this.$refs.imageDom.style.width;
  338. let cloneDom = this.$refs.imageDom.cloneNode(true);
  339. let imageDom = this.$refs.imageDom;
  340. cloneDom.style.position = "absolute";
  341. cloneDom.style.top = "0px";
  342. cloneDom.style.zIndex = "-1";
  343. cloneDom.style.width = width;
  344. console.log(cloneDom);
  345. imageDom.appendChild(cloneDom);
  346. html2canvas(cloneDom).then((canvas) => {
  347. // 转成图片,生成图片地址
  348. const url = canvas.toDataURL("image/png");
  349. printJs({
  350. printable: url,
  351. type: "image",
  352. documentTitle: "", // 标题
  353. style: "@page{size:auto;margin: 0cm 1cm 0cm 1cm;}", // 去除页眉页脚
  354. });
  355. });
  356. cloneDom.style.display = "none";
  357. this.flag = true;
  358. });
  359. },
  360. handleExport() {
  361. exportToExcel("#table", "人员阳性结果清单", false);
  362. },
  363. },
  364. //监听事件
  365. watch: {
  366. //触发查询事件
  367. // "patientRegister.query.times"(newVal, oldVal) {
  368. // if (newVal != oldVal) {
  369. // //alert('触发查询事件')
  370. // this.query();
  371. // }
  372. // },
  373. },
  374. };
  375. </script>
  376. <style scoped>
  377. @import "../../assets/css/global_button.css";
  378. @import "../../assets/css/global_dialog.css";
  379. @import "../../assets/css/global_table.css";
  380. @import "../../assets/css/global_form.css";
  381. @import "../../assets/css/global_input.css";
  382. @import "../../assets/css/global.css";
  383. .query {
  384. margin-right: 10px;
  385. display: flex;
  386. justify-content: center;
  387. align-items: center;
  388. font-size: 14px;
  389. color: #232748;
  390. font-size: 400;
  391. font-family: "NotoSansSC-Regular";
  392. }
  393. .box {
  394. display: flex;
  395. flex-direction: column;
  396. }
  397. ::v-deep .el-input__inner {
  398. /*text-align: center;*/
  399. padding-left: 5px;
  400. padding-right: 15px;
  401. }
  402. ::v-deep .el-input__icon {
  403. width: 15px;
  404. /* 输入框下拉箭头或清除图标 默认 25 */
  405. }
  406. ::v-deep .el-input-group__append {
  407. padding: 0 5px;
  408. /* 控件默认 0 20px;*/
  409. }
  410. ::v-deep .el-icon-search:before {
  411. color: #00f;
  412. }
  413. .query:last-child {
  414. margin-right: 0;
  415. }
  416. </style>