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.

658 lines
24 KiB

3 years ago
2 years ago
5 months ago
5 months ago
5 months ago
5 months ago
4 months ago
4 months ago
3 years ago
5 months ago
4 months ago
3 years ago
4 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
5 months ago
3 years ago
5 months ago
3 years ago
5 months ago
3 years ago
5 months ago
3 years ago
5 months ago
3 years ago
5 months ago
3 years ago
5 months ago
3 years ago
5 months ago
3 years ago
5 months ago
3 years ago
5 months ago
3 years ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
3 years ago
3 years ago
3 years ago
4 months ago
3 years ago
3 years ago
5 months ago
4 months ago
4 months ago
4 months ago
3 years ago
4 months ago
5 months ago
4 months ago
5 months ago
3 years ago
2 years ago
4 months ago
3 years ago
5 months ago
3 years ago
4 months ago
5 months ago
3 years ago
5 months ago
3 years ago
5 months ago
4 months ago
5 months ago
5 months ago
5 months 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
5 months ago
5 months ago
5 months ago
4 months ago
5 months ago
4 months ago
3 years ago
5 months ago
4 months ago
5 months ago
4 months ago
3 years ago
5 months ago
4 months ago
5 months ago
5 months ago
5 months ago
3 years ago
5 months ago
4 months ago
5 months ago
4 months ago
3 years ago
5 months ago
3 years ago
5 months ago
3 years ago
5 months ago
4 months ago
5 months ago
3 years ago
4 months ago
4 months ago
4 months ago
5 months ago
5 months ago
4 months ago
5 months ago
4 months ago
3 years ago
5 months ago
3 years ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
3 years ago
5 months ago
5 months ago
3 years ago
5 months ago
3 years ago
5 months ago
3 years ago
5 months ago
3 years ago
5 months ago
5 months ago
5 months ago
3 years ago
3 years ago
5 months ago
3 years ago
5 months ago
5 months ago
5 months ago
4 months ago
5 months ago
3 years ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
3 years ago
4 months ago
5 months ago
3 years ago
5 months ago
3 years ago
5 months ago
3 years ago
3 years ago
3 years ago
5 months ago
3 years ago
  1. <template>
  2. <div style="display: flex;">
  3. <div :style="'width:' + (window.pageWidth - 200 - 145) + 'px;'">
  4. <el-table :data="tableData" width="100%" border :height="window.pageHeight < 600 ? 330 : window.pageHeight - 240" row-key="id"
  5. size="small" highlight-current-row ref="dataList" @selection-change="handleSelectionChange" @row-click="rowClick">
  6. <el-table-column type="selection" width="40" align="center" />
  7. <el-table-column type="index" label="序号" width="50" align="center" />
  8. <el-table-column prop="isRecoverGuide" label="回收" align="center" width="50" sortable>
  9. <template slot-scope="scope">
  10. <el-checkbox :value="scope.row.isRecoverGuide == 'Y'" />
  11. </template>
  12. </el-table-column>
  13. <el-table-column prop="completeFlag" label="体检进度" sortable>
  14. <template slot-scope="scope">
  15. <div>{{ ldddw(dict.completeFlag, "id", scope.row.completeFlag, "displayName") }}</div>
  16. </template>
  17. </el-table-column>
  18. <el-table-column prop="isLock" label="锁住" width="50" sortable>
  19. <template slot-scope="scope">
  20. <i class="el-icon-lock" v-if="scope.row.isLock == 'Y'" style="font-size: 20px; color: red" />
  21. </template>
  22. </el-table-column>
  23. <el-table-column prop="customerOrgParentName" label="单位" width="180" sortable>
  24. <template slot-scope="scope">
  25. <div>{{ scope.row.customerOrgParentName ? scope.row.customerOrgParentName : scope.row.customerOrgName }}
  26. </div>
  27. </template>
  28. </el-table-column>
  29. <el-table-column prop="customerOrgName" label="部门" width="180">
  30. <template slot-scope="scope">
  31. <div>{{ scope.row.customerOrgParentName == scope.row.customerOrgName ? "" : scope.row.customerOrgName }}</div>
  32. </template>
  33. </el-table-column>
  34. <el-table-column prop="patientName" label="姓名" />
  35. <el-table-column prop="sexName" label="性别">
  36. </el-table-column>
  37. <el-table-column prop="age" label="年龄" />
  38. <el-table-column prop="patientRegisterNo" label="条码号" width="150" />
  39. <el-table-column prop="patientNo" label="档案号" />
  40. <el-table-column prop="medicalTimes" label="体检次数"></el-table-column>
  41. <el-table-column label="分组/套餐" width="150">
  42. <template slot-scope="scope">
  43. <div v-if="scope.row.medicalPackageId !== dict.personOrgId && scope.row.customerOrgId === dict.personOrgId">
  44. {{ scope.row.medicalPackageName }}
  45. </div>
  46. <div v-else>
  47. {{ scope.row.customerOrgGroupName }}
  48. </div>
  49. </template>
  50. </el-table-column>
  51. <el-table-column prop="nationName" label="民族">
  52. </el-table-column>
  53. <el-table-column prop="idNo" label="身份证" width="150" />
  54. <el-table-column prop="birthDate" label="出生日期" width="100">
  55. <template slot-scope="scope">
  56. <div v-if="scope.row.birthDate">
  57. {{ lmoment(scope.row.birthDate, "yyyy-MM-DD") }}
  58. </div>
  59. </template>
  60. </el-table-column>
  61. <el-table-column prop="email" label="邮箱" width="100" />
  62. <el-table-column prop="mobileTelephone" label="手机" width="100" />
  63. <el-table-column prop="telephone" label="电话" width="100" />
  64. <el-table-column prop="address" label="地址" width="300" />
  65. <el-table-column prop="medicalCardNo" label="体检卡号" />
  66. <el-table-column prop="jobCardNo" label="工卡号" />
  67. <el-table-column prop="maritalStatusName" label="婚姻状况">
  68. </el-table-column>
  69. <el-table-column prop="medicalTypeName" label="体检类别">
  70. </el-table-column>
  71. <el-table-column prop="personnelTypeName" label="人员类别">
  72. </el-table-column>
  73. <el-table-column prop="jobPost" label="职务" />
  74. <el-table-column prop="jobTitle" label="职称" />
  75. <el-table-column prop="salesman" label="介绍人" />
  76. <el-table-column prop="isVip" label="VIP">
  77. <template slot-scope="scope">
  78. <el-checkbox :value="scope.row.isVip == 'Y'" />
  79. </template>
  80. </el-table-column>
  81. <el-table-column prop="creatorName" label="登记人" />
  82. <el-table-column prop="creationTime" label="登记日期" width="100">
  83. <template slot-scope="scope">
  84. <div>{{ lmoment(scope.row.creationTime, "yyyy-MM-DD") }}</div>
  85. </template>
  86. </el-table-column>
  87. <el-table-column prop="isUpload" label="上传">
  88. <template slot-scope="scope">
  89. <el-checkbox :value="scope.row.isUpload == 'Y'" />
  90. </template>
  91. </el-table-column>
  92. </el-table>
  93. <div style="display: flex; justify-content: space-between">
  94. <div></div>
  95. <div>
  96. <span style="font-size: 12px">{{ loadOpts.totalCount }} 条记录当前显示{{
  97. tableData.length
  98. }}
  99. </span>
  100. </div>
  101. </div>
  102. </div>
  103. <div style="margin-left: 10px;">
  104. <div class="listBtn">
  105. <el-button type="success" class="commonbutton" @click="btnRecover('Y')">回收表单</el-button>
  106. </div>
  107. <div class="listBtn">
  108. <el-button type="danger" class="commonbutton" @click="btnRecover('N')">取消回收</el-button>
  109. </div>
  110. <div class="listBtn">
  111. <el-button type="primary" class="commonbutton" @click="btnScanRecover">扫码回收</el-button>
  112. </div>
  113. <!-- <div class="listBtn">
  114. <download-excel :fields="jsonFields" :fetch="btnExport" type="xls" :name="tableName">
  115. <el-button type="" style="width:100%">导出excel</el-button>
  116. </download-excel>
  117. </div> -->
  118. </div>
  119. <el-dialog title="扫/输入条码回收体检表(指引单)" :visible.sync="recover.dialog" width="400px" :append-to-body="true"
  120. :close-on-click-modal="false">
  121. <div style="margin-left: 10px;">
  122. <template>
  123. <el-radio v-model="recover.recoverType" label="0">条码号</el-radio>
  124. <el-radio v-model="recover.recoverType" label="1">档案号</el-radio>
  125. </template>
  126. <el-input style="margin: 10px 0;" ref="tmh" v-model="recover.barcode" @keyup.native.enter="signByPatientRegisterNo"></el-input>
  127. </div>
  128. <div slot="footer" class="dialog-footer">
  129. <el-button type="primary" @click="signByPatientRegisterNo" class="commonbutton">确定</el-button>
  130. <el-button @click="recover.dialog = false" class="commonbutton">关闭</el-button>
  131. </div>
  132. </el-dialog>
  133. </div>
  134. </template>
  135. <script>
  136. import moment from "moment";
  137. import { mapState, mapActions } from "vuex";
  138. import { getapi, postapi, putapi, deletapi } from "@/api/api";
  139. import { dddw, objCopy, arrayReduce,arrayExistObj,deepCopy } from "@/utlis/proFunc";
  140. import { savePeoplePhoto } from "../../utlis/proApi";
  141. import PatientRegisterEdit from "../../components/patientRegister/PatientRegisterEdit.vue";
  142. import Camera from "../../components/patientRegister/Camera.vue";
  143. export default {
  144. components: {
  145. PatientRegisterEdit,
  146. Camera,
  147. },
  148. data() {
  149. return {
  150. tableData: [], //列表数据
  151. multipleSelection: [], //选中的数据列表
  152. tableDataCurrentRow:{}, // 单行选中的行
  153. // 体检表回收
  154. recover: {
  155. dialog: false,
  156. recoverType: '0', //回收类型 0-条码号 1-档案号
  157. barcode: '', // 条码号或档案号
  158. barcodes: [], // 条码号或档案号集合
  159. isRecoverGuide: 'Y', //状态 Y-回收,N-取消回收
  160. },
  161. patientRegisterNo: '',
  162. LocalConfig: {
  163. normal: {
  164. maxResultCount: 100, //分页时单页记录数
  165. },
  166. },
  167. loadOpts: {
  168. totalCount: 0,
  169. skipCount: 0,
  170. maxResultCount: 100,
  171. },
  172. loadOptsInit: {},
  173. lazyLoading:false,
  174. dom:null,
  175. jsonFields: {
  176. 回收:"isRecoverGuide",
  177. 体检进度: "completeFlag",
  178. 锁住: "isLock",
  179. 单位: "customerOrgParentName",
  180. 部门: "customerOrgName",
  181. 姓名: "patientName",
  182. 性别: "sexName",
  183. 年龄: "age",
  184. 条码号: "patientRegisterNo",
  185. 档案号: "patientNo",
  186. 体检次数: "medicalTimes",
  187. 分组套餐: "groupPack",
  188. 民族: "nationName",
  189. 身份证: "idNo",
  190. 出生日期: "birthDate",
  191. 邮箱: "email",
  192. 手机: "mobileTelephone",
  193. 电话: "telephone",
  194. 地址: "address",
  195. 体检卡号: "medicalCardNo",
  196. 工卡号: "jobCardNo",
  197. 婚姻状况: "maritalStatusName",
  198. 体检类别: "medicalTypeName",
  199. 人员类别: "personnelTypeName",
  200. 职务: "jobPost",
  201. 职称: "jobTitle",
  202. 介绍人: "salesman",
  203. VIP: "isVip",
  204. 登记人: "creatorName",
  205. 登记日期: "creationTime",
  206. 上传: "isUpload"
  207. },
  208. tableName:""
  209. };
  210. },
  211. created() {
  212. try {
  213. let LocalConfig = JSON.parse(window.localStorage.getItem("LocalConfig") || null)
  214. if (LocalConfig?.normal?.maxResultCount){
  215. this.LocalConfig.normal.maxResultCount = LocalConfig.normal.maxResultCount
  216. }
  217. } catch (error) {
  218. console.log('window.localStorage.getItem("LocalConfig")', error);
  219. }
  220. // console.log('this.LocalConfig',this.LocalConfig)
  221. this.loadOpts.maxResultCount = Number(
  222. this.LocalConfig.normal.maxResultCount || 100
  223. );
  224. this.loadOptsInit = Object.assign({}, this.loadOpts);
  225. },
  226. //挂载完成
  227. mounted() {
  228. this.$nextTick(() => {
  229. this.scrollFull()
  230. })
  231. },
  232. computed: {
  233. ...mapState(["window", "dict", "patientRegister", "customerOrg"]),
  234. },
  235. methods: {
  236. ...mapActions(["getCustomerOrgGroup", "getPatientRegisterAbs"]),
  237. handleSelectionChange(val) {
  238. this.multipleSelection = val;
  239. },
  240. rowClick(row){
  241. this.tableDataCurrentRow = row
  242. },
  243. // 回收表提交 Y-回收,N-取消
  244. recoverCore(body) {
  245. // postapi(`/api/app/patientregister/updaterecoverguidemany`, body)
  246. // .then((res) => {
  247. // if (res.code > -1) {
  248. // this.$message.success({ showClose: true, message: "操作成功!"});
  249. // // 刷新页面回收状态
  250. // if(this.multipleSelection.length > 0){
  251. // this.multipleSelection.forEach(e => {
  252. // e.isRecoverGuide = 'Y'
  253. // });
  254. // }else{
  255. // let lfind = arrayExistObj(this.tableData,'id',body[0].id)
  256. // if(lfind > -1){
  257. // this.tableData[lfind].isRecoverGuide = 'Y'
  258. // }
  259. // }
  260. // }
  261. // })
  262. postapi('/api/app/PatientRegister/BatchRecoverGuide', body)
  263. .then((res) => {
  264. if (res.code > -1) {
  265. this.$message.success({ showClose: true, message: '操作成功!' })
  266. let key = body.recoverType == '0' ? 'patientRegisterNo':'patientNo'
  267. let lfind = -1
  268. body.barcodes.forEach(e => {
  269. lfind = arrayExistObj(this.tableData,key,e)
  270. if(lfind > -1) this.tableData[lfind].isRecoverGuide = body.isRecoverGuide
  271. });
  272. }
  273. });
  274. },
  275. //选中人员记录回收
  276. btnRecover(isRecoverGuide) {
  277. // 有勾选,则操作勾选的,无勾选则按选中的记录
  278. let selectedRds = []
  279. selectedRds = selectedRds.concat(this.multipleSelection)
  280. if(selectedRds.length == 0){
  281. if(this.tableDataCurrentRow.id) selectedRds.push(this.tableDataCurrentRow)
  282. }
  283. if (selectedRds.length == 0) {
  284. this.$message.warning({ showClose: true, message: "请勾选择或选中体检人员,再进行此操作" });
  285. return;
  286. }
  287. let body = {
  288. recoverType:'0',
  289. isRecoverGuide,
  290. barcodes:[]
  291. }
  292. selectedRds.forEach(e => {
  293. body.barcodes.push(e.patientRegisterNo)
  294. });
  295. this.recoverCore(body)
  296. },
  297. // 点击扫码回收体检表按钮
  298. btnScanRecover() {
  299. this.recover.barcode = ''
  300. this.recover.dialog = true
  301. this.$nextTick(() => {
  302. this.$refs['tmh'].focus(); //打开光标定位到条码栏里
  303. });
  304. },
  305. //按条码号查个人数据
  306. signByPatientRegisterNo() {
  307. // let patientRegisterNos = [this.patientRegisterNo]
  308. // let body = {
  309. // patientRegisterNos
  310. // }
  311. // //console.log(`/api/app/patientregister/getpatientregisterorpatient`, body)
  312. // postapi('/api/app/PatientRegister/BatchRecoverGuideByPatientRegisterNo', body)
  313. // .then((res) => {
  314. // if (res.code > -1) {
  315. // this.$message.success({ showClose: true, message: '操作成功!' })
  316. // //let lfind = arrayExistObj()
  317. // this.recover.barcode = ''
  318. // }
  319. // });
  320. this.recover.barcodes = [this.recover.barcode]
  321. postapi('/api/app/PatientRegister/BatchRecoverGuide', this.recover)
  322. .then((res) => {
  323. if (res.code > -1) {
  324. this.$message.success({ showClose: true, message: '操作成功!' })
  325. let key = this.recover.recoverType == '0' ? 'patientRegisterNo':'patientNo'
  326. let lfind = arrayExistObj(this.tableData,key,this.recover.barcode)
  327. if(lfind > -1) this.tableData[lfind].isRecoverGuide = this.recover.isRecoverGuide
  328. this.recover.barcode = ''
  329. }
  330. });
  331. },
  332. ldddw(arrayData, key, value, display) {
  333. return dddw(arrayData, key, value, display);
  334. },
  335. lmoment(date, forMat) {
  336. return moment(new Date(date)).format(forMat);
  337. },
  338. //查询
  339. async Query() {
  340. // 查询时,清掉明细数据 (滚动时不清)
  341. this.tableDataCurrentRow = {}; // 清除选择
  342. if (
  343. !(
  344. this.patientRegister.query.isSeries == "Y" &&
  345. this.patientRegister.query.patientRegisterNo
  346. )
  347. ) {
  348. this.tableData = [];
  349. }
  350. this.loadOpts = Object.assign(this.loadOpts, this.loadOptsInit);
  351. await this.getPrList();
  352. },
  353. //数据量多时,滚动加载
  354. async load() {
  355. this.loadOpts.skipCount++;
  356. await this.getPrList();
  357. this.lazyLoading = false
  358. },
  359. // 获取列表数据
  360. async getPrList() {
  361. if (
  362. this.loadOpts.skipCount != 0 &&
  363. this.loadOpts.skipCount * this.loadOpts.maxResultCount >=
  364. this.loadOpts.totalCount
  365. )
  366. return;
  367. // console.log('getPrList', this.loadOpts)
  368. let body = {
  369. skipCount: this.loadOpts.skipCount,
  370. maxResultCount: this.loadOpts.maxResultCount,
  371. };
  372. // console.log(`this.patientRegister.query`, this.patientRegister.query);
  373. if (this.patientRegister.query.customerOrgFlag) {
  374. // if (this.patientRegister.query.CustomerOrgParentId) {
  375. // body.customerOrgId = this.patientRegister.query.CustomerOrgParentId;
  376. // } else {
  377. // if (this.patientRegister.query.customerOrgId)
  378. // body.customerOrgId = this.patientRegister.query.customerOrgId;
  379. // }
  380. if (this.patientRegister.query.customerOrgId)
  381. body.customerOrgId = this.patientRegister.query.customerOrgId;
  382. // 获取单位体检次数与分组
  383. try {
  384. if (
  385. this.patientRegister.query.customerOrgId &&
  386. this.patientRegister.query.customerOrgId != this.dict.personOrgId &&
  387. this.patientRegister.query.customerOrgRegister.id
  388. ) {
  389. body.customerOrgRegisterId =
  390. this.patientRegister.query.customerOrgRegister.id;
  391. body.customerOrgGroupIds =
  392. this.patientRegister.query.customerOrgGroupIds;
  393. }
  394. } catch (error) {
  395. console.error(error)
  396. }
  397. }
  398. if (this.patientRegister.query.sex)
  399. body.sexId = this.patientRegister.query.sex;
  400. if (this.patientRegister.query.patientName)
  401. body.patientName = this.patientRegister.query.patientName;
  402. if (
  403. this.patientRegister.query.medicalTypeIds &&
  404. this.patientRegister.query.medicalTypeIds.length > 0
  405. )
  406. body.medicalTypeIds = this.patientRegister.query.medicalTypeIds;
  407. if (
  408. this.patientRegister.query.completeFlags &&
  409. this.patientRegister.query.completeFlags.length > 0
  410. )
  411. body.completeFlags = this.patientRegister.query.completeFlags;
  412. if (
  413. this.patientRegister.query.personnelTypeIds &&
  414. this.patientRegister.query.personnelTypeIds.length > 0
  415. )
  416. body.personnelTypeIds = this.patientRegister.query.personnelTypeIds;
  417. if (this.patientRegister.query.isRecoverGuide)
  418. body.isRecoverGuide = this.patientRegister.query.isRecoverGuide;
  419. //StartDate EndDate
  420. if (
  421. this.patientRegister.query.startDate &&
  422. this.patientRegister.query.endDate
  423. ) {
  424. body.dateType = this.patientRegister.query.dateType;
  425. body.startDate = moment(this.patientRegister.query.startDate).format(
  426. "yyyy-MM-DD"
  427. );
  428. body.endDate = moment(this.patientRegister.query.endDate).format(
  429. "yyyy-MM-DD"
  430. );
  431. if (body.startDate > body.endDate) {
  432. this.$message.warning({
  433. showClose: true,
  434. message: "起始日期不能大于截止日期,数据校验不通过!",
  435. });
  436. return;
  437. }
  438. }
  439. if (this.patientRegister.query.phone)
  440. body.phone = this.patientRegister.query.phone;
  441. if (this.patientRegister.query.idCardNo) {
  442. body.idNo = this.patientRegister.query.idCardNo;
  443. try {
  444. let sysParmId = "patient_register_query_idno";
  445. let sysParam = await postapi(
  446. "/api/app/SysParmValue/GetSysParmValueBySysParmId",
  447. { sysParmId }
  448. );
  449. // console.log('sysParam', sysParam)
  450. if (sysParam.data != "N") {
  451. body = {
  452. idNo: this.patientRegister.query.idCardNo,
  453. skipCount: this.loadOpts.skipCount,
  454. maxResultCount: this.loadOpts.maxResultCount,
  455. };
  456. }
  457. } catch (error) {
  458. console.log(error);
  459. }
  460. }
  461. if (this.patientRegister.query.patientNo)
  462. body = {
  463. patientNo: this.patientRegister.query.patientNo,
  464. skipCount: this.loadOpts.skipCount,
  465. maxResultCount: this.loadOpts.maxResultCount,
  466. };
  467. if (this.patientRegister.query.patientRegisterNo)
  468. body = {
  469. patientRegisterNo: this.patientRegister.query.patientRegisterNo,
  470. skipCount: this.loadOpts.skipCount,
  471. maxResultCount: this.loadOpts.maxResultCount,
  472. };
  473. // console.log("/api/app/patientregister/getlistinfilter", body);
  474. let upPhoto = "patient_register_read_idno_upPhoto"; // 是否读身份证查询更新照片
  475. let upPhotoParam = await postapi(
  476. "/api/app/SysParmValue/GetSysParmValueBySysParmId",
  477. { sysParmId: upPhoto }
  478. );
  479. let photo = this.patientRegister.photo;
  480. this.patientRegister.photo = "";
  481. postapi("/api/app/patientregister/getlistinfilter", body).then(
  482. async (res) => {
  483. if (res.code > -1) {
  484. // 刷新最大记录数
  485. this.loadOpts.totalCount = res.data.totalCount;
  486. let curLoad = res.data.items;
  487. // let oldCount = 0
  488. // 处理:
  489. // 1、分组/套餐 排序混乱的问题
  490. // 2、扫身份证查询时,无照片自动更新照片(参数控制)
  491. curLoad.forEach((e) => {
  492. // 1、分组/套餐 排序混乱的问题
  493. if (e.customerOrgId == this.dict.personOrgId) {
  494. e.groupPack = e.medicalPackageId;
  495. } else {
  496. e.groupPack = e.customerOrgGroupId;
  497. }
  498. // 2、扫身份证查询时,无照片自动更新照片(参数控制)
  499. if (upPhotoParam == "Y" && photo) {
  500. if (!e.photo) {
  501. savePeoplePhoto(e.id, photo);
  502. }
  503. }
  504. });
  505. // 不是连续扫码时,需要判断是否分页查询(连续扫码不清原来的数据)
  506. console.log(
  507. "this.patientRegister.query",
  508. this.patientRegister.query.isSeries,
  509. this.patientRegister.query.patientRegisterNo
  510. );
  511. if (
  512. !(
  513. this.patientRegister.query.isSeries == "Y" &&
  514. this.patientRegister.query.patientRegisterNo
  515. )
  516. ) {
  517. if (body.skipCount == 0) {
  518. //查询
  519. this.tableData = [];
  520. }
  521. }
  522. this.tableData = this.tableData.concat(curLoad);
  523. // else {
  524. // // 懒加载 ,原数据集不用清空
  525. // oldCount = this.tableData.length
  526. // }
  527. // curLoad.forEach((e, index) => {
  528. // this.tableData.push(Object.assign({ index: Number(oldCount) + Number(index), choosed: false }, e))
  529. // })
  530. }
  531. }
  532. );
  533. },
  534. //滚动加载数据
  535. scrollFull() {
  536. this.dom = this.$refs['dataList'].bodyWrapper
  537. console.log('obj', this.dom)
  538. this.dom.addEventListener('scroll', async () => {
  539. // console.log('scrollTop',this.dom.scrollTop,'clientHeight',this.dom.clientHeight,'scrollHeight',this.dom.scrollHeight);
  540. if (this.dom.scrollTop + this.dom.clientHeight + 20 > this.dom.scrollHeight && !this.lazyLoading) {
  541. // 获取到的不是全部数据 当滚动到底部
  542. //console.log('scrollTop', obj.scrollTop, 'clientHeight', obj.clientHeight, 'scrollHeight', obj.scrollHeight);
  543. if (Number(this.loadOpts.skipCount) * Number(this.loadOpts.maxResultCount) >= Number(this.loadOpts.totalCount)) {
  544. this.lazyLoading = false
  545. } else {
  546. this.lazyLoading = true
  547. this.load()
  548. // this.dom.scrollTop = this.dom.scrollTop - 100
  549. }
  550. }
  551. })
  552. },
  553. btnExport(elId) {
  554. let tableDatas = deepCopy(this.tableData)
  555. tableDatas.forEach((e, index) => {
  556. if(e.completeFlag) e.completeFlag = this.ldddw(this.dict.completeFlag, "id", e.completeFlag, "displayName")
  557. if (e.sexId) e.sexId = dddw(this.dict.sex, "id", e.sexId, "displayName")
  558. if (e.medicalPackageId !== this.dict.personOrgId && e.customerOrgId === this.dict.personOrgId) {
  559. e.groupPack = e.medicalPackageName // dddw(this.dict.medicalPackage, "id", e.medicalPackageId, "displayName")
  560. } else if (e.medicalPackageId !== this.dict.personOrgId && e.customerOrgId !== this.dict.personOrgId) {
  561. e.groupPack = e.customerOrgGroupName // dddw(this.dict.customerOrgGroupAll, "id", e.customerOrgGroupId, "displayName")
  562. }
  563. if (e.idNo) e.idNo = e.idNo + '&'
  564. if (e.birthDate) e.birthDate = moment(e.birthDate).format("yyyy-MM-DD")
  565. })
  566. this.tableName = '体检表回收' + moment(new Date()).format('yyyyMMDDHHmmss') + '.xls'
  567. return tableDatas;
  568. },
  569. },
  570. //监听事件
  571. watch: {
  572. //触发查询事件
  573. "patientRegister.query.times"(newVal, oldVal) {
  574. if (newVal != oldVal) {
  575. //alert('触发查询事件')
  576. this.Query();
  577. }
  578. },
  579. },
  580. };
  581. </script>
  582. <style scoped>
  583. .listBtn {
  584. margin-top: 10px;
  585. }
  586. .btnClass {
  587. width: 100px;
  588. }
  589. .query {
  590. margin-right: 10px;
  591. font-size: 14px;
  592. color: #232748;
  593. font-weight: 400;
  594. font-family: "NotoSansSC-Regular";
  595. }
  596. .spanClass {
  597. font-size: 14px;
  598. padding: 0 2px 0 0;
  599. }
  600. </style>