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.

675 lines
26 KiB

3 years ago
3 years ago
3 years ago
2 years ago
2 years ago
2 years ago
3 months ago
2 years ago
2 years ago
3 months ago
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
3 months ago
3 years ago
3 months ago
6 months ago
3 years ago
3 months ago
2 years ago
2 years ago
3 months ago
2 years ago
3 months ago
6 months ago
3 months ago
2 years ago
3 months ago
3 months ago
3 months ago
3 months ago
2 years ago
5 months ago
3 months ago
5 months ago
3 months ago
3 years ago
3 months ago
2 years ago
2 years ago
2 years ago
3 months ago
3 years ago
3 months ago
2 years ago
3 months ago
2 years ago
3 months ago
3 years ago
5 months ago
2 years ago
3 years ago
6 months ago
2 years ago
4 months ago
3 months ago
3 years ago
4 months ago
3 years ago
3 years ago
3 years ago
6 months ago
3 years ago
6 months ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
2 years ago
3 months ago
3 years ago
2 years ago
3 months ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 months ago
3 years ago
2 years ago
3 months ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 months ago
6 months ago
4 months ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
5 months ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
3 months ago
2 years ago
3 months ago
2 years ago
3 months ago
2 years ago
3 months ago
2 years ago
3 months ago
2 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
3 months ago
3 months ago
3 months ago
2 years ago
6 months ago
2 years ago
2 years ago
2 years ago
6 months ago
4 months ago
6 months ago
2 years ago
3 months ago
2 years ago
2 years ago
2 years ago
6 months ago
2 years ago
5 months ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 months ago
3 months ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 months ago
2 months ago
2 years ago
2 months ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
5 months ago
2 years ago
2 years ago
3 months ago
5 months ago
4 months ago
5 months ago
5 months ago
5 months ago
2 years ago
5 months ago
2 years ago
3 years ago
3 years ago
2 years ago
3 months ago
2 years ago
2 years ago
4 months ago
5 months ago
3 months ago
4 months ago
5 months ago
4 months ago
5 months ago
4 months ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 months ago
2 years ago
3 months ago
2 years ago
2 years ago
3 years ago
3 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
4 months ago
3 years ago
3 years ago
3 years ago
4 months ago
4 months ago
4 months ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
  1. <template>
  2. <div>
  3. <!-- 查询条件 -->
  4. <div :style="`display: flex; flex-wrap: wrap; width: 100%;height:${divHeight}px;`">
  5. <div v-if="winAbsolute" style="position: absolute;top:3px;right:0px;">
  6. <el-tooltip content="关闭人员列表窗口" placement="bottom" effect="light">
  7. <i class="el-icon-close"
  8. @click="closePrList"
  9. style="font-size: 24px;color: red;cursor:pointer;"></i>
  10. </el-tooltip>
  11. </div>
  12. <div class="query" style="display: flex;padding-top: 2px;">
  13. <el-input placeholder="请选择体检单位" v-model="cusOrgOCXdisp" style="width:288px;" size="small"
  14. disabled>
  15. </el-input>
  16. <el-button icon="el-icon-search" @click="report.dialogCusOrgOCX = true"
  17. style="font-size: 20px;height:30px;min-width:30px; padding: 5px 5px;" size="small"></el-button>
  18. </div>
  19. <div class="query">
  20. <span>姓名</span>
  21. <el-input placeholder="姓名" v-model="local.query.patientName" size="small" clearable style="width: 130px" />
  22. </div>
  23. <div class="query">
  24. <span>性别</span>
  25. <el-select v-model="local.query.sex" placeholder="请选择" clearable style="width: 120px" size="small">
  26. <el-option v-for="item in dict.sex" :key="item.id" :label="item.displayName" :value="item.id">
  27. </el-option>
  28. </el-select>
  29. </div>
  30. <div class="query">
  31. <el-select v-model="local.query.medicalTypeIds" placeholder="请选择体检类别" clearable filterable style="width: 170px"
  32. size="small" multiple collapse-tags>
  33. <el-option v-for="item in dict.medicalType" :key="item.id" :label="item.displayName" :value="item.id" />
  34. </el-select>
  35. <el-select v-model="local.query.personnelTypeIds" placeholder="请选择人员类别" clearable filterable style="width: 170px;margin-left: 2px;"
  36. size="small" multiple collapse-tags >
  37. <el-option v-for="item in dict.personnelType" :key="item.id" :label="item.displayName" :value="item.id" />
  38. </el-select>
  39. </div>
  40. <div v-if="win == 'doctorCheck'" class="query">
  41. <el-select v-model="local.query.checkDoctorIds" placeholder="请选择医生" size="small" filterable clearable
  42. style="width:140px;text-align: left;" multiple collapse-tags>
  43. <el-option v-for="item in users" :key="item.id" :value="item.id" :label="item.surname" />
  44. </el-select>
  45. <el-select v-model="local.query.checkAsbs" placeholder="请选择组合项目" size="small" filterable
  46. :filter-method="filterMethod" clearable @clear="quickAsb = deepCopy(asbItemQuick)" default-first-option
  47. ref="quickAsbOCX" style="width:200px;text-align: left;margin-left: 2px;" multiple collapse-tags>
  48. <el-option v-for="item in quickAsb" :key="item.id" :value="item.id" :label="item.displayName" />
  49. </el-select>
  50. </div>
  51. <div v-else class="query">
  52. <span>总检医生</span>
  53. <el-select v-model="local.query.summaryDoctorIds" placeholder="请选择医生" size="small" filterable clearable
  54. style="width:270px;text-align: left;" multiple collapse-tags>
  55. <el-option v-for="item in users" :key="item.id" :value="item.id" :label="item.surname" />
  56. </el-select>
  57. </div>
  58. <div class="query" v-if="win == 'doctorCheck'">
  59. <span>检查状态</span>
  60. <el-select v-model="local.query.checkCompleteFlag" placeholder="请选择" clearable style="width: 110px" size="small">
  61. <el-option v-for="item in dict.checkCompleteFlag" :key="item.id" :label="item.displayName" :value="item.id">
  62. </el-option>
  63. </el-select>
  64. <el-select v-model="local.query.isAuditCheck" placeholder="请选择" clearable style="width: 95px;margin: 0 2px;"
  65. size="small">
  66. <el-option label="未审核" value="N" />
  67. <el-option label="已审核" value="Y" />
  68. </el-select>
  69. <el-checkbox v-model="local.query.haveImage">有图</el-checkbox>
  70. </div>
  71. <div class="query">
  72. <span>人员状态</span>
  73. <el-select v-model="local.query.completeFlag" placeholder="请选择" clearable style="width: 110px" size="small">
  74. <el-option v-for="item in local.completeFlag" :key="item.id" :label="item.displayName" :value="item.id">
  75. </el-option>
  76. </el-select>
  77. <el-select v-model="local.query.isAudit" placeholder="请选择" clearable style="width: 95px;margin: 0 2px;"
  78. size="small">
  79. <el-option label="未审核" value="N" />
  80. <el-option label="已审核" value="Y" />
  81. </el-select>
  82. </div>
  83. <div class="query">
  84. <el-button class="commonbutton" type="primary" @click="btnQuery" size="small"
  85. style="width:50px;height:26px;margin: 2px 0 2px -3px;">查询</el-button>
  86. </div>
  87. </div>
  88. <!-- 人员列表 -->
  89. <u-table :data="dataList" border width="100%" :height="tableHeight" row-key="id" size="small" highlight-current-row
  90. @row-click="rowClick" @row-dblclick="rowDblclick" ref="info" id="info" style="border-radius:10px;"
  91. :row-class-name="tableRowClassName" @table-body-scroll="scrollFull" use-virtual :row-height="23" big-data-checkbox :data-changes-scroll-top="false">
  92. <u-table-column type="index" label="序号" width="50" align="center" />
  93. <u-table-column prop="customerOrgParentName" label="单位" width="120" sortable show-overflow-tooltip>
  94. <template slot-scope="scope">
  95. <div>{{ scope.row.customerOrgParentName ? scope.row.customerOrgParentName :
  96. scope.row.customerOrgName }}</div>
  97. </template>
  98. </u-table-column>
  99. <u-table-column prop="patientName" label="姓名" width="80" sortable align="center" show-overflow-tooltip/>
  100. <u-table-column prop="sexName" label="性别" width="50" sortable align="center" />
  101. <u-table-column prop="age" label="年龄" width="50" align="center" sortable/>
  102. <u-table-column prop="customerOrgName" label="部门" width="100" sortable show-overflow-tooltip>
  103. <template slot-scope="scope">
  104. <div>{{ scope.row.customerOrgParentName ? scope.row.customerOrgName : "" }}</div>
  105. </template>
  106. </u-table-column>
  107. <u-table-column prop="patientRegisterNo" label="条码号" width="150" sortable align="center" show-overflow-tooltip/>
  108. <u-table-column prop="patientNo" label="档案号" sortable align="center" show-overflow-tooltip/>
  109. <u-table-column prop="medicalTimes" label="次数" align="center" />
  110. <u-table-column label="分组/套餐" width="150" show-overflow-tooltip>
  111. <template slot-scope="scope">
  112. <div v-if="scope.row.medicalPackageId !== dict.personOrgId && scope.row.customerOrgId === dict.personOrgId">
  113. {{ scope.row.medicalPackageName }}
  114. </div>
  115. <div v-if="scope.row.medicalPackageId !== dict.personOrgId && scope.row.customerOrgId !== dict.personOrgId">
  116. {{ scope.row.customerOrgGroupName }}
  117. </div>
  118. </template>
  119. </u-table-column>
  120. <u-table-column prop="nationName" label="民族" sortable align="center" show-overflow-tooltip/>
  121. <u-table-column prop="idNo" label="身份证" sortable width="160" align="center" show-overflow-tooltip/>
  122. <u-table-column prop="birthDate" label="出生日期" align="center" width="100">
  123. <template slot-scope="scope">
  124. <div v-if="scope.row.birthDate">
  125. {{ lmoment(scope.row.birthDate, "yyyy-MM-DD") }}
  126. </div>
  127. </template>
  128. </u-table-column>
  129. <u-table-column prop="email" label="邮箱" width="150" show-overflow-tooltip/>
  130. <u-table-column prop="mobileTelephone" label="手机" width="130" show-overflow-tooltip/>
  131. <u-table-column prop="telephone" label="电话" width="130" show-overflow-tooltip/>
  132. <u-table-column prop="address" label="地址" width="400" sortable show-overflow-tooltip/>
  133. <u-table-column prop="medicalCardNo" label="体检卡号" sortable show-overflow-tooltip/>
  134. <u-table-column prop="jobCardNo" label="工卡号" sortable show-overflow-tooltip/>
  135. <u-table-column prop="maritalStatusName" label="婚姻状况" align="center" sortable/>
  136. <u-table-column prop="medicalTypeName" label="体检类别" sortable show-overflow-tooltip/>
  137. <u-table-column prop="personnelTypeName" label="人员类别" sortable show-overflow-tooltip/>
  138. <u-table-column prop="jobPost" label="职务" width="200" sortable />
  139. <u-table-column prop="jobTitle" label="职称" sortable show-overflow-tooltip/>
  140. <u-table-column prop="salesman" label="介绍人" sortable show-overflow-tooltip/>
  141. <u-table-column prop="isVip" label="是否VIP" align="center" sortable>
  142. <template slot-scope="scope">
  143. <div>{{ scope.row.isVip == "Y" ? "是" : "否" }}</div>
  144. </template>
  145. </u-table-column>
  146. <u-table-column prop="creatorName" label="登记人" sortable />
  147. <u-table-column prop="creationTime" label="登记日期" width="100" align="center" sortable>
  148. <template slot-scope="scope">
  149. <div>{{ lmoment(scope.row.creationTime, "yyyy-MM-DD") }}</div>
  150. </template>
  151. </u-table-column>
  152. <u-table-column prop="isUpload" label="是否上传" align="center" sortable>
  153. <template slot-scope="scope">
  154. <div>{{ scope.row.isUpload == "Y" ? "是" : "否" }}</div>
  155. </template>
  156. </u-table-column>
  157. <u-table-column prop="completeFlag" label="体检进度" sortable>
  158. <template slot-scope="scope">
  159. <div>{{ dddw(dict.completeFlag, "id", scope.row.completeFlag, "displayName") }}</div>
  160. </template>
  161. </u-table-column>
  162. <u-table-column prop="isLock" label="锁住" align="center" sortable>
  163. <template slot-scope="scope">
  164. <div>{{ scope.row.isLock == "Y" ? "是" : "否" }}</div>
  165. </template>
  166. </u-table-column>
  167. <u-table-column prop="summaryDoctorName" label="总检医生" sortable align="center">
  168. </u-table-column>
  169. <u-table-column prop="auditDoctorName" label="审核医生" sortable align="center">
  170. </u-table-column>
  171. </u-table>
  172. <div style="display: flex;justify-content:space-between;">
  173. <div></div>
  174. <div>
  175. <span style="font-size:12px;">{{ loadOpts.totalCount }} 条记录当前显示{{ dataList.length }}
  176. </span>
  177. </div>
  178. </div>
  179. <el-table v-if="checkStatistics.length > 0 ? true:false" :data="checkStatistics" border height="105">
  180. <el-table-column prop="checkStatus" label="检查" />
  181. <el-table-column prop="maleCount" label="男" />
  182. <el-table-column prop="femaleCount" label="女" />
  183. <el-table-column prop="unknownCount" label="未知" />
  184. </el-table>
  185. <!--通用选单位体检次数分组的控件-->
  186. <el-dialog title="体检单位选择" :visible.sync="report.dialogCusOrgOCX" :close-on-click-modal="false"
  187. :append-to-body="true" width="880px" height="600px">
  188. <CusOrgOCX :useCustomerOrg="false" :initDateType="'medicalStartDate'" @cusOrgOCXbak="cusOrgOCXbak"/>
  189. </el-dialog>
  190. </div>
  191. </template>
  192. <script>
  193. import moment from "moment";
  194. import { mapState, mapMutations } from "vuex";
  195. import { getapi, postapi, putapi, deletapi } from "@/api/api";
  196. import { dddw, objCopy, arrayReduce, deepCopy } from "../../utlis/proFunc"
  197. import { UTable, UTableColumn } from "umy-ui";
  198. import CusOrgOCX from "../../components/report/CusOrgOCX.vue"
  199. export default {
  200. components: {
  201. CusOrgOCX,
  202. UTable,
  203. UTableColumn,
  204. },
  205. props: ['win', 'winAbsolute'],
  206. data() {
  207. return {
  208. dataList: [], //列表数据
  209. checkStatistics:[], //检查状态
  210. multipleSelection: [], //选中的数据列表
  211. dialogVisible: false,
  212. dialogCamera: false,
  213. cusOrgOCXdisp:'',
  214. // 控件查询条件
  215. ocxDatas:[],
  216. // 本地查询条件
  217. local: {
  218. query: {
  219. dateType: 'creationTime', //登记日期
  220. dateRange: null, //日期范围
  221. startDate: null,
  222. endDate: null,
  223. containRefuse: true, //包含弃检项目
  224. times: 0, //触发查询次数
  225. customerOrgId: "", //体检单位ID
  226. CustomerOrgParentId: "", //单位父级ID
  227. customerOrgFlag: true, //单位作为查询条件
  228. customerOrgRegister: { id: '' }, //单位体检次数
  229. checkAsbs: null,
  230. patientName: '', //姓名
  231. sex: '', //性别
  232. idCardNo: '', //身份证号
  233. haveImage: false,
  234. checkCompleteFlag: '', //检查项目状态
  235. isAuditCheck: '', //检查项目审核
  236. medicalTypeIds: [],
  237. personnelTypeIds: [],
  238. checkDoctorIds: [],
  239. summaryDoctorIds: [],
  240. },
  241. completeFlag: []
  242. },
  243. quickAsb: [],
  244. asbItemQuick: [],
  245. dom: null, //用于滚动加载数据
  246. lazyLoading: false, //是否懒加载中
  247. loadOpts: {
  248. totalCount: 0,
  249. skipCount: 0,
  250. maxResultCount: 1000,
  251. },
  252. loadOptsInit: {},
  253. oneClick: 0, // 1 表示行单击一次
  254. DbClick: 0, // 1 表示行有单击第二次
  255. users: [],
  256. };
  257. },
  258. created() {
  259. this.dictInit()
  260. this.loadOptsInit = Object.assign({}, this.loadOpts)
  261. },
  262. //挂载完成
  263. mounted() {
  264. // this.$nextTick(() => {
  265. // this.scrollFull()
  266. // })
  267. },
  268. computed: {
  269. ...mapState(["window", "dialogWin","dataTransOpts", "dict", "customerOrg", "patientRegister", "doctorCheck", "sumDoctorCheck", "report"]),
  270. divHeight() {
  271. if (this.win == "doctorCheck") {
  272. return 210
  273. } else {
  274. return 175
  275. }
  276. },
  277. // 列表高度
  278. tableHeight() {
  279. let tableH = this.winAbsolute ? (this.window.pageHeight - 46 - 30 - this.divHeight) : (this.window.pageHeight - 46 - this.divHeight)
  280. if(this.checkStatistics.length > 0) tableH = tableH - 105
  281. return tableH
  282. },
  283. },
  284. methods: {
  285. ...mapMutations(['doctorCheckPrBaseInit', 'sumPREditInit']),
  286. dddw,
  287. dictInit() {
  288. // 默认 当天 体检日期
  289. let today = moment(new Date()).format('yyyy-MM-DD');
  290. this.ocxDatas = [{startDate: today, endDate: today, dateType: "medicalStartDate"}]
  291. this.cusOrgOCXdisp = `(体检${today}~${today})`
  292. /* 使
  293. //分组,所有分组,不限单位,不限次数
  294. postapi("/api/app/CustomerOrgGroup/GetBasicList").then((res) => {
  295. if (res.code > -1) {
  296. this.dict.customerOrgGroupAll = res.data;
  297. }
  298. });
  299. */
  300. //性别(查询)
  301. getapi("/api/app/for-sex").then((res) => {
  302. if (res.code == 1) {
  303. this.dict.forSex = res.data;
  304. }
  305. });
  306. //性别(仅档案用)
  307. getapi("/api/app/sex").then((res) => {
  308. if (res.code == 1) {
  309. this.dict.sex = res.data;
  310. }
  311. });
  312. //体检类别
  313. getapi("/api/app/medical-type/in-filter").then((res) => {
  314. if (res.code == 1) {
  315. this.dict.medicalType = res.data;
  316. }
  317. });
  318. //人员类别
  319. getapi("/api/app/personnel-type/in-filter").then((res) => {
  320. if (res.code == 1) {
  321. this.dict.personnelType = res.data;
  322. }
  323. });
  324. // 获取组合项目
  325. postapi('/api/app/asbitem/GetBasicList', { isFilterActive: 'Y' }).then(res => {
  326. if (res.code != -1) {
  327. this.asbItemQuick = res.data
  328. this.quickAsb = res.data
  329. }
  330. });
  331. // 用户
  332. let operatorTypes = ["2", "3"] //总检医生
  333. if (this.win == 'doctorCheck') operatorTypes = ["1", "3"]
  334. postapi('/api/identity/users/GetListByOperatorType', { operatorTypes })
  335. .then(res => {
  336. if (res.code > -1) {
  337. this.users = res.data
  338. }
  339. })
  340. this.local.completeFlag = deepCopy(this.dict.completeFlag)
  341. this.local.completeFlag.splice(0, 1) //预记选项去掉
  342. this.local.completeFlag.splice(2, 0, { id: '5', displayName: '全部已检(未总检)' }) //插入
  343. },
  344. // 查询控件数据返回的查询条件
  345. cusOrgOCXbak(cusOrgOCXdata){
  346. console.log('cusOrgOCXbak.cusOrgOCXdata',cusOrgOCXdata,this.ocxDatas)
  347. this.ocxDatas = []
  348. if(Array.isArray(cusOrgOCXdata?.ocxDatas) && cusOrgOCXdata?.ocxDatas.length > 0){
  349. cusOrgOCXdata.ocxDatas.forEach(e => {
  350. this.ocxDatas.push(Object.assign({},e))
  351. });
  352. }
  353. this.cusOrgOCXdisp = cusOrgOCXdata?.cusOrgOCXdisp //控件查询件显示
  354. },
  355. // 关闭显示窗口
  356. closePrList(){
  357. this.doctorCheck.doctorCheckDialogVisible = false;
  358. this.sumDoctorCheck.sumDoctorCheckDialogVisible = false;
  359. // 新的
  360. if(this.win == 'doctorCheck'){
  361. this.dialogWin.doctorPrList = false
  362. }else{
  363. this.dialogWin.sumPrList = false
  364. }
  365. },
  366. //快速选择组合项目时,调整可按拼间简码及简称查找
  367. filterMethod(keyWords) {
  368. //console.log('filterMethod',this.asbItemQuick)
  369. if (keyWords) {
  370. this.quickAsb = [];
  371. this.asbItemQuick.forEach(item => {
  372. if (item.displayName.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1
  373. || item.simpleCode.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1
  374. || item.shortName.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1) {
  375. this.quickAsb.push(item);
  376. }
  377. });
  378. } else {
  379. this.quickAsb = deepCopy(this.asbItemQuick);
  380. }
  381. },
  382. //点击体检次数行
  383. rowClick(row) {
  384. if (this.oneClick == 0) {
  385. this.oneClick = 1;
  386. } else {
  387. this.DbClick = 1;
  388. }
  389. //双击事件
  390. if (this.DbClick == 1) { //第一次点击的节点和第二次点击的节点id相同
  391. this.rowClickRetrieve(row)
  392. return;
  393. }
  394. setTimeout(() => { //300ms内没有第二次点击,执行单击事件
  395. if (this.oneClick == 1 && this.DbClick == 0) this.rowClickRetrieve(row)
  396. }, 300)
  397. },
  398. rowClickRetrieve(row) {
  399. this.oneClick = 0;
  400. this.DbClick = 0;
  401. this.$emit("choosedBak",row)
  402. //this.dataTransOpts.tableS.patient_register = deepCopy(row)
  403. // setTimeout(() => {
  404. //this.dataTransOpts.refresh.patient_register.S++ //人员体检登记信息刷新
  405. // }, 10);
  406. },
  407. //双击选中客户记录后,并半闭列表
  408. rowDblclick(row) {
  409. // this.rowClick(row)
  410. this.doctorCheck.doctorCheckDialogVisible = false
  411. this.sumDoctorCheck.sumDoctorCheckDialogVisible = false
  412. // console.log('rowDblclick', this.doctorCheck.doctorCheckDialogVisible, this.sumDoctorCheck.sumDoctorCheckDialogVisible)
  413. },
  414. lmoment(date, forMat) {
  415. return moment(new Date(date)).format(forMat);
  416. },
  417. //查询
  418. async btnQuery() {
  419. this.loadOpts = Object.assign(this.loadOpts, this.loadOptsInit)
  420. await this.getPrList()
  421. },
  422. async getPrList() {
  423. if (this.loadOpts.skipCount != 0 && this.loadOpts.skipCount * this.loadOpts.maxResultCount >= this.loadOpts.totalCount) return
  424. let body = {}, customerOrgs = []
  425. //console.log('this.report.dataCusOrgOCX', this.report.dataCusOrgOCX)
  426. if (this.ocxDatas.length > 0) {
  427. this.ocxDatas.forEach(e => {
  428. let dateType = '1'
  429. switch (e.dateType) {
  430. case 'medicalStartDate':
  431. dateType = '2'
  432. break;
  433. case 'checkDate':
  434. dateType = '4'
  435. break;
  436. case 'summaryDate':
  437. dateType = '3'
  438. break;
  439. case 'sumCheckDate':
  440. dateType = '5'
  441. break;
  442. default:
  443. break;
  444. }
  445. let rd = {
  446. startDate: moment(e.startDate).format('yyyy-MM-DD'),
  447. endDate: moment(e.endDate).format('yyyy-MM-DD'),
  448. dateType
  449. }
  450. if (e.customerOrgId) {
  451. rd.customerOrgId = e.customerOrgId
  452. if (e.customerOrgId == this.dict.personOrgId) {
  453. rd.customerOrgRegisterId = null
  454. rd.customerOrgGroupId = []
  455. } else {
  456. rd.customerOrgRegisterId = e.customerOrgRegister.id
  457. rd.customerOrgGroupId = e.customerOrgGroupIds
  458. }
  459. }
  460. customerOrgs.push(rd)
  461. })
  462. }
  463. body.customerOrgs = customerOrgs
  464. if (this.local.query.patientName) body.patientName = this.local.query.patientName
  465. if (this.local.query.sex) body.sexId = this.local.query.sex
  466. if (this.local.query.isAudit) body.isAudit = this.local.query.isAudit
  467. if (this.local.query.completeFlag) body.completeFlag = this.local.query.completeFlag
  468. if (Array.isArray(this.local.query.checkAsbs) && this.local.query.checkAsbs.length > 0) body.asbitems = this.local.query.checkAsbs
  469. if (this.local.query.haveImage) body.isPicture = 'Y'
  470. if (this.local.query.checkCompleteFlag) body.asbitemCompleteFlag = this.local.query.checkCompleteFlag
  471. if (this.local.query.isAuditCheck) body.asbitemIsAudit = this.local.query.isAuditCheck
  472. if (Array.isArray(this.local.query.medicalTypeIds) && this.local.query.medicalTypeIds.length > 0) {
  473. body.medicalTypeIds = this.local.query.medicalTypeIds
  474. }
  475. if (Array.isArray(this.local.query.personnelTypeIds) && this.local.query.personnelTypeIds.length > 0) {
  476. body.personnelTypeIds = this.local.query.personnelTypeIds
  477. }
  478. if (Array.isArray(this.local.query.checkDoctorIds) && this.local.query.checkDoctorIds.length > 0) {
  479. body.checkDoctorIds = this.local.query.checkDoctorIds
  480. }
  481. if (Array.isArray(this.local.query.summaryDoctorIds) && this.local.query.summaryDoctorIds.length > 0) {
  482. body.summaryDoctorIds = this.local.query.summaryDoctorIds
  483. }
  484. body.isFilterPreRegistration = 'Y' //是否需要过滤预登记数据 Y=过滤预登记数据 N=不过滤 默认为N (备注:只有CompleteFlag参数的值不为0的情况才有效,null值也有效)
  485. // "patientName": "string",
  486. // "sexId": "string",
  487. // "isAudit": "string",
  488. // "completeFlag": "string",
  489. // "maxResultCount": 0
  490. // console.log('/api/patientregister/getpeisrecordlist', Object.assign(body, this.loadOpts))
  491. // const loading = this.$loading({
  492. // lock: true,
  493. // text: "Loading",
  494. // spinner: "el-icon-loading",
  495. // background: "rgba(0, 0, 0, 0.7)",
  496. // });
  497. body = Object.assign(body, this.loadOpts)
  498. let url = '/api/app/PatientRegister/GetSumDoctorPeisRecordList'
  499. if (this.win == "doctorCheck") url = '/api/app/PatientRegister/GetDoctorPeisRecordList'
  500. postapi(url, body)
  501. .then((res) => {
  502. if (res.code > -1) {
  503. // 刷新最大记录数
  504. this.loadOpts.totalCount = res.data.totalCount
  505. if (body.skipCount == 0){
  506. this.dataList = []
  507. this.checkStatistics = []
  508. }
  509. this.dataList = this.dataList.concat(res.data.items)
  510. this.checkStatistics = res.data.checkStatistics||[]
  511. }
  512. })
  513. // .finally(() =>{
  514. // loading.close();
  515. // })
  516. ;
  517. },
  518. //数据量多时,滚动加载
  519. async load() {
  520. this.loadOpts.skipCount++
  521. await this.getPrList()
  522. this.lazyLoading = false;
  523. },
  524. //滚动加载数据
  525. async scrollFull(scroll, event) {
  526. if (!scroll.judgeFlse) return;
  527. // 正在加载时阻止重复触发
  528. if (this.lazyLoading) return;
  529. if (
  530. (Number(this.loadOpts.skipCount) + 1) *
  531. Number(this.loadOpts.maxResultCount) >=
  532. Number(this.loadOpts.totalCount)
  533. ) {
  534. return;
  535. }
  536. this.lazyLoading = true;
  537. try {
  538. await this.load();
  539. } catch (e) {
  540. console.error('scrollFull load error', e);
  541. }
  542. // this.dom = this.$refs['info'].bodyWrapper
  543. // console.log('this.dom', this.dom)
  544. // this.dom.addEventListener('scroll', async () => {
  545. // // console.log('scrollTop',this.dom.scrollTop,'clientHeight',this.dom.clientHeight,'scrollHeight',this.dom.scrollHeight);
  546. // if (this.dom.scrollTop + this.dom.clientHeight + 20 > this.dom.scrollHeight && !this.lazyLoading) {
  547. // // 获取到的不是全部数据 当滚动到底部
  548. // console.log('scrollTop', this.dom.scrollTop, 'clientHeight', this.dom.clientHeight, 'scrollHeight', this.dom.scrollHeight);
  549. // if ((Number(this.loadOpts.skipCount) + 1) * Number(this.loadOpts.maxResultCount) >= Number(this.loadOpts.totalCount)) {
  550. // this.lazyLoading = false
  551. // } else {
  552. // this.lazyLoading = true
  553. // await this.load()
  554. // this.lazyLoading = false
  555. // // this.dom.scrollTop = this.dom.scrollTop - 100
  556. // }
  557. // }
  558. // })
  559. },
  560. //关闭
  561. close() {
  562. //console.log('this.win',this.win)
  563. if (this.win == 'doctorCheck') {
  564. this.doctorCheck.doctorCheckDialogVisible = false
  565. } else {
  566. this.sumDoctorCheck.sumDoctorCheckDialogVisible = false
  567. }
  568. },
  569. // 表格行底色样式
  570. tableRowClassName({ row, rowIndex }) {
  571. if(row.isAudit == 'Y' && row.completeFlag == '3'){
  572. return 'complete4';
  573. }else if(row.completeFlag == '3'){
  574. return 'complete3';
  575. }else if(row.completeFlag == '2'){
  576. return 'complete2';
  577. }
  578. return '';
  579. }
  580. },
  581. //监听事件
  582. watch: {
  583. },
  584. };
  585. </script>
  586. <style scoped>
  587. /* 部份已检 */
  588. ::v-deep .el-table .complete2 {
  589. background: #ec7504 !important;
  590. }
  591. /* 总检 */
  592. ::v-deep .el-table .complete3 {
  593. background: #ff80ff !important;
  594. }
  595. /* 总检已审核 */
  596. ::v-deep .el-table .complete4 {
  597. background: #ffff80 !important;
  598. }
  599. .el-table .complete2 {
  600. background: #51db06;
  601. }
  602. .box {
  603. display: flex;
  604. }
  605. .query {
  606. margin-left: 5px;
  607. margin-bottom: 2px;
  608. font-size: 14px;
  609. }
  610. .listBtn {
  611. margin-top: 10px;
  612. }
  613. </style>