index.js 17 KB

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