index.js 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557
  1. var template = ''
  2. $.ajax('../../../component/statistics/breastCancerPatient/index.html', {
  3. data: {},
  4. dataType: 'html',
  5. cache: false,
  6. timeout: 60000,
  7. async: false,
  8. error: function (res) {},
  9. success: function (res) {
  10. template = res
  11. }
  12. })
  13. Vue.component('breast-cancer-patient', {
  14. template: template,
  15. props: [],
  16. data: function () {
  17. return {
  18. years: [],
  19. dialogVisible: true,
  20. serviceRecordVisable: false,
  21. currentEditData: '',
  22. dialogExportLoading: false,
  23. yearType: '1',
  24. chooseYear: null,
  25. chooseTime: null,
  26. rangeOptions: [
  27. { label: '区', value: '1' },
  28. { label: '机构', value: '2' },
  29. { label: '居住地', value: '3' }
  30. ],
  31. followupOptions: [
  32. { label: '全部', value: '' },
  33. { label: '已随访', value: '1' },
  34. { label: '未随访', value: '0' }
  35. ],
  36. areaOptions: [
  37. { label: '思明区', value: '350203' },
  38. { label: '海沧区', value: '350205' },
  39. { label: '湖里区', value: '350206' },
  40. { label: '集美区', value: '350211' },
  41. { label: '同安区', value: '350212' },
  42. { label: '翔安区', value: '350213' }
  43. ],
  44. hospitalOptions: [],
  45. teamOptions: [],
  46. dialogTableData: [],
  47. dialogHeader: [
  48. { label: '居民姓名', prop: 'name', width: '100' },
  49. { label: '证件号码', prop: 'idcard', width: '100' },
  50. { label: '手机号', prop: 'mobile', width: '110' },
  51. { label: '年龄', prop: 'age', width: '90' },
  52. { label: '出生日期', prop: 'birthday', width: '90' },
  53. { label: '常驻地址', prop: 'address', width: '100' },
  54. { label: '个人筛查状态', prop: 'statusName', width: '100' }
  55. ],
  56. form: {
  57. range: '1',
  58. followUp: ''
  59. },
  60. query: {
  61. page: 1,
  62. size: 10,
  63. total: 0
  64. },
  65. loading: false,
  66. tableData: [],
  67. visible: false,
  68. tableHeader: [
  69. { label: '居民姓名', prop: 'name', width: '100' },
  70. { label: '证件号码', prop: 'idcard', width: '100' },
  71. { label: '手机号', prop: 'mobile', width: '110' },
  72. { label: '年龄', prop: 'age', width: '90' },
  73. { label: '出生日期', prop: 'birthday', width: '90' },
  74. { label: '常住地址', prop: 'diagnosisName', width: '130' },
  75. { label: '个人筛查状态', prop: 'isSign', width: '90' },
  76. { label: '基本信息状态', prop: 'hospitalName', width: '90' },
  77. { label: '乳腺临床检查状态', prop: 'num', width: '90' },
  78. { label: '乳腺超声初筛时间', prop: 'turnDownTime', width: '150' },
  79. { label: '乳腺超声评估结果', prop: 'eventType', width: '130' },
  80. { label: '乳腺超声评估机构', prop: 'screenNum', width: '110' },
  81. { label: '乳腺超声评估人', prop: 'cudUser', width: '130' },
  82. { label: '乳腺钼靶评估时间', prop: 'turnDownTime', width: '150' },
  83. { label: '乳腺钼靶评估结果', prop: 'eventType', width: '130' },
  84. { label: '乳腺钼靶评估状态(待随访/已完成)', prop: 'screenNum', width: '110' },
  85. { label: '乳腺病理结果', prop: 'bpatResultName', width: '130' },
  86. { label: '乳腺病理评估机构', prop: 'bpatOrg', width: '130' },
  87. { label: '乳腺病理随访时间', prop: 'turnDownTime', width: '150' },
  88. { label: '乳腺癌分期状态(术前)', prop: 'eventType', width: '130' },
  89. { label: '乳腺癌分期状态(术后)', prop: 'screenNum', width: '110' },
  90. { label: '宫颈初筛时间', prop: 'gynTime', width: '130' },
  91. { label: '宫颈评估机构', prop: 'cerOrg', width: '130' },
  92. { label: '宫颈评估人', prop: 'turnDownTime', width: '150' },
  93. { label: '宫颈评估时间', prop: 'eventType', width: '130' },
  94. { label: '宫颈评估状态', prop: 'screenNum', width: '110' },
  95. { label: '宫颈评估人群', prop: 'screenResult', width: '130' }
  96. ],
  97. loadingTwo: false,
  98. page: 1,
  99. size: 10,
  100. total: 0,
  101. level: 0,
  102. tableHeaderGroups: [
  103. {
  104. label: '基本信息',
  105. children: [
  106. { prop: 'infoCompleteNum', label: '完善' },
  107. { prop: 'basquelouNum', label: '缺漏' }
  108. ]
  109. },
  110. {
  111. label: '乳腺临床检查',
  112. children: [
  113. { prop: 'clicheckNum', label: '检查人数' },
  114. { prop: 'clijujueNum', label: '拒绝' },
  115. { prop: 'cliyicongNum', label: '依从' },
  116. { prop: 'cliquelouNum', label: '缺漏' }
  117. ]
  118. },
  119. {
  120. label: '乳腺超声检查',
  121. children: [
  122. { prop: 'total', label: '检查人数' },
  123. { prop: 'jujueNum', label: '拒绝' },
  124. { prop: 'yicongNum', label: '依从' },
  125. { prop: 'quelouNum', label: '缺漏' }
  126. ]
  127. },
  128. {
  129. label: '乳腺超声检查BI-RADS分级',
  130. children: [
  131. { prop: 'cduBiRads0', label: '0级' },
  132. { prop: 'cduBiRads1', label: '1级' },
  133. { prop: 'cduBiRads2', label: '2级' },
  134. { prop: 'cduBiRads3', label: '3级' },
  135. { prop: 'cduBiRads4a', label: '4a级' },
  136. { prop: 'cduBiRads4b', label: '4b级' },
  137. { prop: 'cduBiRads4c', label: '4c级' },
  138. { prop: 'cduBiRads5', label: '5级' },
  139. { prop: 'cduHeji', label: '合计' }
  140. ]
  141. },
  142. {
  143. label: '乳腺钼靶检查',
  144. children: [
  145. { prop: 'molycNum', label: '应查人数' },
  146. { prop: 'molyicongNum', label: '依从' },
  147. { prop: 'moljujueNum', label: '拒绝' },
  148. { prop: 'mollostNum', label: '失访' },
  149. { prop: 'molycNum1', label: '检查率' },
  150. { prop: 'molycNum2', label: '待完成人数' }
  151. ]
  152. },
  153. {
  154. label: '乳腺钼靶检查BI-RADS分级',
  155. children: [
  156. { prop: 'molBiRads0', label: '0级' },
  157. { prop: 'molBiRads1', label: '1级' },
  158. { prop: 'molBiRads2', label: '2级' },
  159. { prop: 'molBiRads3', label: '3级' },
  160. { prop: 'molBiRads4a', label: '4a级' },
  161. { prop: 'molBiRads4b', label: '4b级' },
  162. { prop: 'molBiRads4c', label: '4c级' },
  163. { prop: 'molBiRads5', label: '5级' },
  164. { prop: 'molBiRads6', label: '不详' },
  165. { prop: 'molHeji', label: '合计' }
  166. ]
  167. },
  168. {
  169. label: '乳腺病理检查\n乳腺病理学监测情况',
  170. children: [
  171. { prop: 'needCheckNum', label: '应查人数' },
  172. { prop: 'checkedNum', label: '已查人数' },
  173. { prop: 'patjujueNum', label: '拒诊人数' },
  174. { prop: 'lostNum', label: '失访人数' },
  175. { prop: 'rate1', label: '病理检查率' }
  176. ]
  177. },
  178. {
  179. label: '乳腺癌检出情况',
  180. children: [
  181. { prop: 'type4', label: '小叶原位癌人数' },
  182. { prop: 'type3', label: '导管原位癌人数' },
  183. { prop: 'type1', label: '浸润性导管癌人数' },
  184. { prop: 'type2', label: '浸润性小叶癌人数' },
  185. { prop: 'type6', label: '其他恶性肿瘤人数' },
  186. { prop: 'type7', label: '不详人数' },
  187. { prop: 'hejiNum', label: '合计人数' },
  188. { prop: 'rate2', label: '乳腺癌检出率' }
  189. ]
  190. },
  191. {
  192. label: 'TNM分期',
  193. children: [
  194. { prop: 'TNM0', label: '0期' },
  195. { prop: 'TNM1', label: '1期' },
  196. { prop: 'TNM2a', label: 'IIA期' },
  197. { prop: 'TNM2b', label: 'IIB期' },
  198. { prop: 'TNM3up', label: 'III期以上' },
  199. { prop: 'TNMbuxiang', label: '不详' },
  200. { prop: 'rate3', label: '获得TNM分期比率' },
  201. { prop: 'rate4', label: '乳腺癌早诊率' }
  202. ]
  203. },
  204. {
  205. label: '治疗情况',
  206. children: [
  207. { prop: 'num1', label: '应治疗人数' },
  208. { prop: 'yzlNum', label: '已治疗人数' },
  209. { prop: 'jzOrLostNum', label: '拒诊治疗或失访人数' },
  210. { prop: 'rate5', label: '早治率' }
  211. ]
  212. },
  213. {
  214. label: '乳腺癌风险人群',
  215. children: [
  216. { prop: 'label1', label: '一般风险' },
  217. { prop: 'label2', label: '高风险' },
  218. { prop: 'labelWait', label: '待评估' },
  219. { prop: 'rate6', label: '高风险人群比例' }
  220. ]
  221. },
  222. {
  223. label: '随访状态',
  224. children: [
  225. { prop: 'followupNum', label: '已随访' },
  226. { prop: 'unFollowupNum', label: '未随访' }
  227. ]
  228. }
  229. ],
  230. dialogLoading: false
  231. }
  232. },
  233. methods: {
  234. back() {
  235. this.currentEditData = ''
  236. this.serviceRecordVisable = false
  237. },
  238. gotoService(item) {
  239. this.currentEditData = item.patient
  240. this.serviceRecordVisable = true
  241. },
  242. init() {
  243. var selectedRole = JSON.parse(sessionStorage.getItem('selectedRole'))
  244. if (selectedRole.code.indexOf('350200') > -1 || selectedRole.code.indexOf('8d94ce907e4d4356b68f6c5d4d0d6bc9') > -1) {
  245. this.level = 1 // 市卫健委
  246. this.areaOptions = [
  247. { label: '厦门市', value: '' },
  248. { label: '思明区', value: '350203' },
  249. { label: '海沧区', value: '350205' },
  250. { label: '湖里区', value: '350206' },
  251. { label: '集美区', value: '350211' },
  252. { label: '同安区', value: '350212' },
  253. { label: '翔安区', value: '350213' }
  254. ]
  255. this.getHospital()
  256. } else if (selectedRole.code.length == 6) {
  257. this.level = 2 // 区管理
  258. this.areaOptions = [{ label: selectedRole.name.substring(0, 3), value: selectedRole.code }]
  259. this.form = {
  260. range: '1',
  261. town: selectedRole.code
  262. }
  263. this.getHospital(selectedRole.code)
  264. } else {
  265. this.level = 3 // 社区管理
  266. this.rangeOptions = [{ label: '机构', value: '2' }]
  267. this.areaOptions = [{ label: selectedRole.name.substring(0, 3), value: selectedRole.code.substring(0, 6) }]
  268. this.hospitalOptions = [{ name: selectedRole.name, code: selectedRole.code }]
  269. this.form = {
  270. range: '2',
  271. town: selectedRole.code.substring(0, 6),
  272. hospital: selectedRole.code
  273. }
  274. this.getTeam(selectedRole.code)
  275. }
  276. this.initTime()
  277. this.getList()
  278. },
  279. initTime() {
  280. var vm = this
  281. var now = new Date()
  282. vm.nowyear = vm.chooseYear = now.getFullYear()
  283. vm.years = []
  284. for (i = vm.nowyear; i >= 2013; i--) {
  285. vm.years.push(i)
  286. }
  287. },
  288. resetArea() {
  289. if (this.level == 1) {
  290. this.areaOptions.push({ label: '其他', value: 'other' })
  291. }
  292. },
  293. getList() {
  294. var vm = this
  295. this.loading = true
  296. var params = {
  297. ...this.form
  298. }
  299. if (this.form.range == 3) {
  300. if (this.form.town && this.form.town != 'other') {
  301. params.town = this.areaOptions.find(item => item.value == this.form.town).label
  302. }
  303. }
  304. vm.tableData = []
  305. if (this.chooseTime) {
  306. params.startTime = this.chooseTime[0]
  307. params.endTime = this.chooseTime[1]
  308. }
  309. httpRequest.get('doctor/twoCancers/count/breastQualityCount', { data: params }).then(function (res) {
  310. if (res.status == 200) {
  311. vm.tableData = res.detailModelList
  312. vm.total = res.totalCount
  313. // vm.tableData = [{ name: '张三' }]
  314. // vm.total = 1
  315. }
  316. vm.loading = false
  317. })
  318. },
  319. queryDate() {
  320. this.page = 1
  321. this.getList()
  322. },
  323. exportTable() {
  324. var vm = this
  325. var params = {
  326. ...this.form,
  327. page: this.page,
  328. size: this.size
  329. }
  330. if (this.chooseTime) {
  331. params.startTime = this.chooseTime[0]
  332. params.endTime = this.chooseTime[1]
  333. }
  334. var fileName = `乳腺癌筛查质控统计${new Date().getTime()}.xls`
  335. httpRequest.downLoadFileForAjax('doctor/twoCancers/count/exportBreastQualityCount', fileName, params).then(function () {
  336. vm.$message.success('导出成功')
  337. })
  338. },
  339. eliminateClick() {
  340. var selectedRole = JSON.parse(sessionStorage.getItem('selectedRole'))
  341. if (this.level == 1) {
  342. this.form = {
  343. range: '1'
  344. }
  345. } else if (this.level == 2) {
  346. this.form = {
  347. range: '1',
  348. town: selectedRole.code
  349. }
  350. this.getHospital(selectedRole.code)
  351. } else {
  352. this.form = {
  353. range: '2',
  354. town: selectedRole.code.substring(0, 6),
  355. hospital: selectedRole.code
  356. }
  357. this.getTeam(selectedRole.code)
  358. }
  359. this.yearType = '1'
  360. this.chooseYear = new Date().getFullYear()
  361. this.chooseTime = null
  362. const now = new Date()
  363. // 获取当前日期
  364. const endDate = new Date()
  365. // 获取30天前的日期
  366. const startDate = new Date()
  367. startDate.setDate(endDate.getDate() - 30)
  368. this.chooseTime = [this.formatDate(startDate), this.formatDate(endDate)]
  369. this.init()
  370. this.$forceUpdate()
  371. },
  372. getHospital(code) {
  373. var vm = this
  374. // delete this.form.hospital
  375. // delete this.form.team
  376. // var params = {
  377. // type: 5,
  378. // code: code
  379. // }
  380. // if (!code) {
  381. // params = {
  382. // type: 6,
  383. // code: '350200'
  384. // }
  385. // }
  386. // httpRequest.post('common/district', { data: params }).then(function (res) {
  387. // vm.hospitalOptions = [{ code: '', name: '全部' }]
  388. // vm.hospitalOptions = vm.hospitalOptions.concat(res.list)
  389. // })
  390. var data = {
  391. town: code ? code : this.form.town ? this.form.town : '',
  392. hospital: ''
  393. }
  394. // common/district
  395. httpRequest.get('doctor/twoCancers/count/hospitalList', { data }).then(function (res) {
  396. vm.hospitalOptions = []
  397. // vm.hospitalOptions = vm.hospitalOptions.concat(res.list)
  398. if (res.status == 200) {
  399. vm.hospitalOptions = [{ code: '', name: '全部' }]
  400. res.data.forEach(item => {
  401. vm.hospitalOptions.push({
  402. name: item.hospital_name,
  403. code: item.hospital
  404. })
  405. })
  406. }
  407. })
  408. },
  409. getTeam(code) {
  410. var vm = this
  411. delete this.form.team
  412. var params = {
  413. hospital: code,
  414. area: this.form.area
  415. }
  416. httpRequest.get('statisticsExport/teamList', { data: params }).then(function (res) {
  417. vm.teamOptions = [{ id: '', name: '全部' }]
  418. vm.teamOptions = vm.teamOptions.concat(res.data)
  419. })
  420. },
  421. handleCurrentChange(val) {
  422. this.page = val
  423. this.getList()
  424. },
  425. handleSizeChange(val) {
  426. this.size = val
  427. this.getList()
  428. },
  429. openDialog(row, prop) {
  430. var vm = this
  431. // 未随访不可点击
  432. const excludeFields = ['unFollowupNum']
  433. if (excludeFields.includes(prop)) {
  434. return
  435. }
  436. // 随访字段 点击已随访需待状态过去 20250807 接口不支持未随访查询,筛选条件待定
  437. // const includeFields = ["followupNum", ]
  438. // if (includeFields.includes(prop)) {
  439. // this.query.followupNum = row.followupNum
  440. // }else{
  441. // this.query.followupNum = ''
  442. // }
  443. vm.dialogLoading = true
  444. this.query.type = 'r_' + prop
  445. this.query.orgCode = row.orgCode
  446. var params = {
  447. ...this.query,
  448. range: (this.form && this.form.range) || '',
  449. town: this.form.range == 3 ? row.orgCode : (this.form && this.form.town) || ''
  450. }
  451. vm.dialogTableData = []
  452. if (this.chooseTime) {
  453. params.startTime = this.chooseTime[0]
  454. params.endTime = this.chooseTime[1]
  455. }
  456. delete params.total
  457. httpRequest.get('doctor/twoCancers/count/caseDataList', { data: params }).then(function (res) {
  458. vm.dialogTableData = res.detailModelList
  459. vm.query.total = res.totalCount
  460. vm.visible = true
  461. vm.dialogLoading = false
  462. })
  463. },
  464. caseDataList() {
  465. var vm = this
  466. vm.dialogLoading = true
  467. // this.query.type = this.query.type.substring(0, this.query.type.length - 1) + this.query.status
  468. var params = {
  469. ...this.query,
  470. range: (this.form && this.form.range) || '',
  471. town: this.form.range == 3 ? row.orgCode : (this.form && this.form.town) || '',
  472. hospital: (this.form && this.form.hospital) || ''
  473. }
  474. vm.dialogTableData = []
  475. if (this.chooseTime) {
  476. params.startTime = this.chooseTime[0]
  477. params.endTime = this.chooseTime[1]
  478. }
  479. delete params.total
  480. httpRequest.get('doctor/twoCancers/count/caseDataList', { data: params }).then(function (res) {
  481. vm.dialogTableData = res.detailModelList
  482. // vm.query.total = res.totalCount
  483. vm.dialogLoading = false
  484. })
  485. },
  486. closeDialog() {
  487. this.query = {
  488. page: 1,
  489. size: 10,
  490. total: 0,
  491. type: this.query.type,
  492. orgCode: this.query.orgCode
  493. }
  494. this.visible = false
  495. },
  496. dialogSearchFn() {
  497. this.caseDataList()
  498. },
  499. handleCurrentChange1(val) {
  500. this.query.page = val
  501. this.caseDataList()
  502. },
  503. handleSizeChange1(val) {
  504. this.query.size = val
  505. this.caseDataList()
  506. },
  507. dialogExportFn() {
  508. var vm = this
  509. this.dialogExportLoading = true
  510. var params = {
  511. ...this.query,
  512. range: (this.form && this.form.range) || '',
  513. town: (this.form && this.form.town) || '',
  514. hospital: (this.form && this.form.hospital) || ''
  515. }
  516. if (this.chooseTime) {
  517. params.startTime = this.chooseTime[0]
  518. params.endTime = this.chooseTime[1]
  519. }
  520. var fileName = `个案数据列表${new Date().getTime()}.xls`
  521. httpRequest.downLoadFileForAjax('doctor/twoCancers/count/exportCaseDataList', fileName, params).then(function () {
  522. vm.dialogExportLoading = false
  523. })
  524. },
  525. dialogResetFn() {
  526. this.query = {
  527. page: 1,
  528. size: 10,
  529. total: 0,
  530. type: this.query.type,
  531. orgCode: this.query.orgCode
  532. }
  533. this.caseDataList()
  534. },
  535. formatDate(date) {
  536. const year = date.getFullYear()
  537. const month = String(date.getMonth() + 1).padStart(2, '0')
  538. const day = String(date.getDate()).padStart(2, '0')
  539. return `${year}-${month}-${day}`
  540. }
  541. },
  542. mounted() {
  543. const now = new Date()
  544. // 获取当前日期
  545. const endDate = new Date()
  546. // 获取30天前的日期
  547. const startDate = new Date()
  548. startDate.setDate(endDate.getDate() - 30)
  549. this.chooseTime = [this.formatDate(startDate), this.formatDate(endDate)]
  550. this.init()
  551. }
  552. })