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.

270 lines
8.8 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. <template>
  2. <div>
  3. <el-card>
  4. <div slot="header">人员阳性结果</div>
  5. <div :style="'display: block; width:' + (window.pageWidth - 45) + 'px;'">
  6. <div style="display: flex; flex-wrap: wrap; height:35px;">
  7. <div class="query">
  8. <span>体检单位</span>
  9. <el-input placeholder="请选择体检单位" v-model="patientRegister.query.cusOrgOCX" style="width:300px;" size="small"
  10. disabled>
  11. <el-button slot="append" icon="el-icon-search" @click="report.dialogCusOrgOCX = true"
  12. style="font-size: 20px;"></el-button>
  13. </el-input>
  14. </div>
  15. <div class="query">
  16. <span>检查状态</span>
  17. <el-select v-model="completeFlag" placeholder="请选择" clearable style="width: 80px"
  18. size="small">
  19. <el-option label="预登记" value="0" />
  20. <el-option label="正式登记" value="1" />
  21. <el-option label="部份已检" value="2" />
  22. <el-option label="已总检" value="3" />
  23. </el-select>
  24. </div>
  25. <div class="query">
  26. <el-checkbox v-model="classification" true-label="Y" false-label="N"/>
  27. <span style="margin-left:5px;">审核状态</span>
  28. </div>
  29. <!-- <div class="query">
  30. <span>疾病来源</span>
  31. <el-select v-model="patientRegister.query.isCharge" placeholder="请选择" clearable style="width: 80px"
  32. size="small">
  33. <el-option label="综述" value="0" />
  34. <el-option label="建议" value="1" />
  35. <el-option label="疾病列表" value="2" />
  36. </el-select>
  37. </div>
  38. <div class="query">
  39. <el-checkbox v-model="classification" true-label="Y" false-label="N"/>
  40. <span>分类统计</span>
  41. </div> -->
  42. <div class="query">
  43. <el-button @click="btnQuery" size="small">查询</el-button>
  44. </div>
  45. <div class="query">
  46. <el-button @click="handleExport" size="small">导出excel</el-button>
  47. </div>
  48. <div class="query">
  49. <el-button @click="onPrint" size="small">打印</el-button>
  50. </div>
  51. </div>
  52. <div ref="imageDom" style="margin-top:5px;">
  53. <el-table :data="dataList" border width="45%" :height="flag
  54. ?window.pageHeight < 600 ? 415 : window.pageHeight - 185-5: ''"
  55. row-key="id" highlight-current-row ref="dataList" :row-class-name="tableRowClassName" id="table">
  56. <el-table-column prop="patientNo" label="档案号" width="120"/>
  57. <el-table-column prop="patientName" label="姓名" width="120"/>
  58. <el-table-column prop="sexName" label="性别" width="50"/>
  59. <el-table-column prop="age" label="年龄" width="80"/>
  60. <el-table-column prop="medicalTimes" label="次数" width="50"/>
  61. <el-table-column prop="mobileTelephone" label="手机号码" width="120"/>
  62. <el-table-column prop="diagnosisNames" label="诊断名称" />
  63. </el-table>
  64. </div>
  65. </div>
  66. </el-card>
  67. <!--通用选单位体检次数分组的控件-->
  68. <el-dialog title="体检单位选择" :visible.sync="report.dialogCusOrgOCX"
  69. :close-on-click-modal="false" width="840px" height="600px">
  70. <CusOrgOCX/>
  71. </el-dialog>
  72. </div>
  73. </template>
  74. <script>
  75. import moment from "moment";
  76. import { mapState, mapActions } from "vuex";
  77. import { getapi, postapi, putapi, deletapi } from "@/api/api";
  78. import { dddw, objCopy, arrayReduce, arrayExistObj,tcdate } from "@/utlis/proFunc";
  79. import CusOrgOCX from "../../components/report/CusOrgOCX.vue";
  80. import { exportToExcel } from "../../utlis/Export2Excel";
  81. import html2canvas from "html2canvas";
  82. import printJs from "print-js";
  83. export default {
  84. components: {
  85. CusOrgOCX
  86. },
  87. data() {
  88. return {
  89. dataList: [], //列表数据
  90. completeFlag:"",
  91. classification:"Y",
  92. flag:true
  93. };
  94. },
  95. created() {
  96. this.dictInit();
  97. },
  98. //挂载完成
  99. mounted() {
  100. // this.btnQuery();
  101. },
  102. computed: {
  103. ...mapState(["window", "dict","patientRegister","report"]),
  104. },
  105. methods: {
  106. moment,dddw,
  107. //数据初始化
  108. dictInit() {
  109. //体检中心
  110. getapi("/api/app/organization-units/organization-unit-by-is-peis").then(
  111. (res) => {
  112. if (res.code == 1) {
  113. this.dict.organization = res.data;
  114. }
  115. }
  116. );
  117. //体检单位树
  118. getapi("/api/app/customerorg/getbycodeall").then((res) => {
  119. if (res.code == 1) {
  120. this.patientRegister.customerOrgTreeAll = res.data;
  121. tcdate(this.patientRegister.customerOrgTreeAll);
  122. }
  123. });
  124. // //体检类别
  125. // getapi("/api/app/medical-type/in-filter").then((res) => {
  126. // if (res.code == 1) {
  127. // this.dict.medicalType = res.data.items;
  128. // }
  129. // });
  130. // //体检类别 树结构
  131. // getapi("/api/app/item-type/by-code-all").then((res) => {
  132. // if (res.code == 1) {
  133. // this.dict.itemTypeTree = res.data;
  134. // tcdate(this.dict.itemTypeTree);
  135. // }
  136. // });
  137. // postapi("/api/app/diagnosis/getlistinsuggestion").then((res) => {
  138. // if (res.code == 1) {
  139. // this.dict.asbItemAll = res.data;
  140. // }
  141. // });
  142. console.log("dict", this.dict);
  143. },
  144. tableRowClassName({ row, rowIndex }) {
  145. switch (row.isCharge) {
  146. case 'N':
  147. return 'danger';
  148. default:
  149. return '';
  150. }
  151. },
  152. //查询
  153. btnQuery() {
  154. let body = {}, customerOrgs = [], diagnosisIds = [];
  155. if (this.report.dataCusOrgOCX.length > 0) {
  156. this.report.dataCusOrgOCX.forEach(e => {
  157. let rd = {
  158. startDate: moment(e.startDate).format('yyyy-MM-DD'),
  159. endDate: moment(e.endDate).format('yyyy-MM-DD'),
  160. dateType: e.dateType == 'summaryDate' ? '3' : (e.dateType == 'medicalStartDate' ? '2' : '1')
  161. }
  162. if (e.customerOrgId) {
  163. rd.customerOrgId = e.customerOrgId
  164. if (e.customerOrgId == this.dict.personOrgId) {
  165. rd.customerOrgRegisterId = null
  166. rd.customerOrgGroupId = []
  167. } else {
  168. rd.customerOrgRegisterId = e.customerOrgRegister.id
  169. rd.customerOrgGroupId = e.customerOrgGroupIds
  170. }
  171. }
  172. customerOrgs.push(rd)
  173. })
  174. }
  175. // if (this.report.dataAsbitemOCX.length > 0) {
  176. // this.report.dataAsbitemOCX.forEach(e => {
  177. // diagnosisIds.push(e.id)
  178. // })
  179. // }
  180. body.customerOrgs = customerOrgs
  181. // body.diagnosisIds = diagnosisIds
  182. if(this.completeFlag) body.completeFlag = this.completeFlag
  183. body.isAudit=this.classification
  184. // if (this.patientRegister.query.isCharge) body.isCharge = this.patientRegister.query.isCharge
  185. //console.log('/api/app/peisreport/getregisterasbitemchargestatus',body)
  186. postapi('/api/customerreport/getpatientregisterpositivereport', body).then(res => {
  187. if (res.code != -1) {
  188. this.dataList = res.data;
  189. }
  190. })
  191. },
  192. onPrint() {
  193. this.flag = false;
  194. this.$nextTick(() => {
  195. let width = this.$refs.imageDom.style.width;
  196. let cloneDom = this.$refs.imageDom.cloneNode(true);
  197. let imageDom = this.$refs.imageDom;
  198. cloneDom.style.position = "absolute";
  199. cloneDom.style.top = "0px";
  200. cloneDom.style.zIndex = "-1";
  201. cloneDom.style.width = width;
  202. console.log(cloneDom);
  203. imageDom.appendChild(cloneDom);
  204. html2canvas(cloneDom).then((canvas) => {
  205. // 转成图片,生成图片地址
  206. const url = canvas.toDataURL("image/png");
  207. printJs({
  208. printable: url,
  209. type: "image",
  210. documentTitle: "", // 标题
  211. style: "@page{size:auto;margin: 0cm 1cm 0cm 1cm;}", // 去除页眉页脚
  212. });
  213. });
  214. cloneDom.style.display = "none";
  215. this.flag = true;
  216. });
  217. },
  218. handleExport() {
  219. exportToExcel("#table", "人员阳性结果清单", false);
  220. }
  221. },
  222. //监听事件
  223. watch: {
  224. //触发查询事件
  225. // "patientRegister.query.times"(newVal, oldVal) {
  226. // if (newVal != oldVal) {
  227. // //alert('触发查询事件')
  228. // this.query();
  229. // }
  230. // },
  231. },
  232. };
  233. </script>
  234. <style scoped>
  235. @import '../../assets/css/global_button.css';
  236. @import '../../assets/css/global_card.css';
  237. @import '../../assets/css/global_input.css';
  238. @import '../../assets/css/global_table.css';
  239. @import '../../assets/css/global.css';
  240. .query {
  241. margin-left: 10px;
  242. display: flex;
  243. justify-content: center;
  244. align-items: center;
  245. }
  246. </style>