index.js 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538
  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. } else if (selectedRole.code.length == 6) {
  256. this.level = 2 // 区管理
  257. this.areaOptions = [{ label: selectedRole.name.substring(0, 3), value: selectedRole.code }]
  258. this.form = {
  259. range: '1',
  260. town: selectedRole.code
  261. }
  262. this.getHospital(selectedRole.code)
  263. } else {
  264. this.level = 3 // 社区管理
  265. this.rangeOptions = [{ label: '机构', value: '2' }]
  266. this.areaOptions = [{ label: selectedRole.name.substring(0, 3), value: selectedRole.code.substring(0, 6) }]
  267. this.hospitalOptions = [{ name: selectedRole.name, code: selectedRole.code }]
  268. this.form = {
  269. range: '2',
  270. town: selectedRole.code.substring(0, 6),
  271. hospital: selectedRole.code
  272. }
  273. this.getTeam(selectedRole.code)
  274. }
  275. this.initTime()
  276. this.getList()
  277. },
  278. initTime() {
  279. var vm = this
  280. var now = new Date()
  281. vm.nowyear = vm.chooseYear = now.getFullYear()
  282. vm.years = []
  283. for (i = vm.nowyear; i >= 2013; i--) {
  284. vm.years.push(i)
  285. }
  286. },
  287. resetArea() {
  288. if (this.level == 1) {
  289. this.areaOptions.push({ label: '其他', value: 'other' })
  290. }
  291. },
  292. getList() {
  293. var vm = this
  294. this.loading = true
  295. var params = {
  296. ...this.form
  297. }
  298. if (this.form.range == 3) {
  299. if (this.form.town && this.form.town != 'other') {
  300. params.town = this.areaOptions.find(item => item.value == this.form.town).label
  301. }
  302. }
  303. vm.tableData = []
  304. if (this.chooseTime) {
  305. params.startTime = this.chooseTime[0]
  306. params.endTime = this.chooseTime[1]
  307. }
  308. httpRequest.get('doctor/twoCancers/count/breastQualityCount', { data: params }).then(function (res) {
  309. if (res.status == 200) {
  310. vm.tableData = res.detailModelList
  311. vm.total = res.totalCount
  312. // vm.tableData = [{ name: '张三' }]
  313. // vm.total = 1
  314. }
  315. vm.loading = false
  316. })
  317. },
  318. queryDate() {
  319. this.page = 1
  320. this.getList()
  321. },
  322. exportTable() {
  323. var vm = this
  324. var params = {
  325. ...this.form,
  326. page: this.page,
  327. size: this.size
  328. }
  329. if (this.chooseTime) {
  330. params.startTime = this.chooseTime[0]
  331. params.endTime = this.chooseTime[1]
  332. }
  333. var fileName = `乳腺癌筛查质控统计${new Date().getTime()}.xls`
  334. httpRequest.downLoadFileForAjax('doctor/twoCancers/count/exportBreastQualityCount', fileName, params).then(function () {
  335. vm.$message.success('导出成功')
  336. })
  337. },
  338. eliminateClick() {
  339. var selectedRole = JSON.parse(sessionStorage.getItem('selectedRole'))
  340. if (this.level == 1) {
  341. this.form = {
  342. range: '1'
  343. }
  344. } else if (this.level == 2) {
  345. this.form = {
  346. range: '1',
  347. town: selectedRole.code
  348. }
  349. this.getHospital(selectedRole.code)
  350. } else {
  351. this.form = {
  352. range: '2',
  353. town: selectedRole.code.substring(0, 6),
  354. hospital: selectedRole.code
  355. }
  356. this.getTeam(selectedRole.code)
  357. }
  358. this.yearType = '1'
  359. this.chooseYear = new Date().getFullYear()
  360. this.chooseTime = null
  361. const now = new Date()
  362. // 获取当前日期
  363. const endDate = new Date()
  364. // 获取30天前的日期
  365. const startDate = new Date()
  366. startDate.setDate(endDate.getDate() - 30)
  367. this.chooseTime = [this.formatDate(startDate), this.formatDate(endDate)]
  368. this.init()
  369. this.$forceUpdate()
  370. },
  371. getHospital(code) {
  372. var vm = this
  373. delete this.form.hospital
  374. delete this.form.team
  375. var params = {
  376. type: 5,
  377. code: code
  378. }
  379. if (!code) {
  380. params = {
  381. type: 6,
  382. code: '350200'
  383. }
  384. }
  385. httpRequest.post('common/district', { data: params }).then(function (res) {
  386. vm.hospitalOptions = [{ code: '', name: '全部' }]
  387. vm.hospitalOptions = vm.hospitalOptions.concat(res.list)
  388. })
  389. },
  390. getTeam(code) {
  391. var vm = this
  392. delete this.form.team
  393. var params = {
  394. hospital: code,
  395. area: this.form.area
  396. }
  397. httpRequest.get('statisticsExport/teamList', { data: params }).then(function (res) {
  398. vm.teamOptions = [{ id: '', name: '全部' }]
  399. vm.teamOptions = vm.teamOptions.concat(res.data)
  400. })
  401. },
  402. handleCurrentChange(val) {
  403. this.page = val
  404. this.getList()
  405. },
  406. handleSizeChange(val) {
  407. this.size = val
  408. this.getList()
  409. },
  410. openDialog(row, prop) {
  411. var vm = this
  412. // 未随访不可点击
  413. const excludeFields = ['unFollowupNum']
  414. if (excludeFields.includes(prop)) {
  415. return
  416. }
  417. // 随访字段 点击已随访需待状态过去 20250807 接口不支持未随访查询,筛选条件待定
  418. // const includeFields = ["followupNum", ]
  419. // if (includeFields.includes(prop)) {
  420. // this.query.followupNum = row.followupNum
  421. // }else{
  422. // this.query.followupNum = ''
  423. // }
  424. vm.dialogLoading = true
  425. this.query.type = 'r_' + prop
  426. this.query.orgCode = row.orgCode
  427. var params = {
  428. ...this.query,
  429. range: (this.form && this.form.range) || '',
  430. town: this.form.range == 3 ? row.orgCode : (this.form && this.form.town) || ''
  431. }
  432. vm.dialogTableData = []
  433. if (this.chooseTime) {
  434. params.startTime = this.chooseTime[0]
  435. params.endTime = this.chooseTime[1]
  436. }
  437. delete params.total
  438. httpRequest.get('doctor/twoCancers/count/caseDataList', { data: params }).then(function (res) {
  439. vm.dialogTableData = res.detailModelList
  440. vm.query.total = res.totalCount
  441. vm.visible = true
  442. vm.dialogLoading = false
  443. })
  444. },
  445. caseDataList() {
  446. var vm = this
  447. vm.dialogLoading = true
  448. // this.query.type = this.query.type.substring(0, this.query.type.length - 1) + this.query.status
  449. var params = {
  450. ...this.query,
  451. range: (this.form && this.form.range) || '',
  452. town: this.form.range == 3 ? row.orgCode : (this.form && this.form.town) || '',
  453. hospital: (this.form && this.form.hospital) || ''
  454. }
  455. vm.dialogTableData = []
  456. if (this.chooseTime) {
  457. params.startTime = this.chooseTime[0]
  458. params.endTime = this.chooseTime[1]
  459. }
  460. delete params.total
  461. httpRequest.get('doctor/twoCancers/count/caseDataList', { data: params }).then(function (res) {
  462. vm.dialogTableData = res.detailModelList
  463. // vm.query.total = res.totalCount
  464. vm.dialogLoading = false
  465. })
  466. },
  467. closeDialog() {
  468. this.query = {
  469. page: 1,
  470. size: 10,
  471. total: 0,
  472. type: this.query.type,
  473. orgCode: this.query.orgCode
  474. }
  475. this.visible = false
  476. },
  477. dialogSearchFn() {
  478. this.caseDataList()
  479. },
  480. handleCurrentChange1(val) {
  481. this.query.page = val
  482. this.caseDataList()
  483. },
  484. handleSizeChange1(val) {
  485. this.query.size = val
  486. this.caseDataList()
  487. },
  488. dialogExportFn() {
  489. var vm = this
  490. this.dialogExportLoading = true
  491. var params = {
  492. ...this.query,
  493. range: (this.form && this.form.range) || '',
  494. town: (this.form && this.form.town) || '',
  495. hospital: (this.form && this.form.hospital) || ''
  496. }
  497. if (this.chooseTime) {
  498. params.startTime = this.chooseTime[0]
  499. params.endTime = this.chooseTime[1]
  500. }
  501. var fileName = `个案数据列表${new Date().getTime()}.xls`
  502. httpRequest.downLoadFileForAjax('doctor/twoCancers/count/exportCaseDataList', fileName, params).then(function () {
  503. vm.dialogExportLoading = false
  504. })
  505. },
  506. dialogResetFn() {
  507. this.query = {
  508. page: 1,
  509. size: 10,
  510. total: 0,
  511. type: this.query.type,
  512. orgCode: this.query.orgCode
  513. }
  514. this.caseDataList()
  515. },
  516. formatDate(date) {
  517. const year = date.getFullYear()
  518. const month = String(date.getMonth() + 1).padStart(2, '0')
  519. const day = String(date.getDate()).padStart(2, '0')
  520. return `${year}-${month}-${day}`
  521. }
  522. },
  523. mounted() {
  524. const now = new Date()
  525. // 获取当前日期
  526. const endDate = new Date()
  527. // 获取30天前的日期
  528. const startDate = new Date()
  529. startDate.setDate(endDate.getDate() - 30)
  530. this.chooseTime = [this.formatDate(startDate), this.formatDate(endDate)]
  531. this.init()
  532. }
  533. })