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.

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