index.js 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277
  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. yearType: '1',
  21. chooseYear: null,
  22. chooseTime: null,
  23. rangeOptions: [
  24. { label: '区', value: '1' },
  25. { label: '社区', value: '2' },
  26. { label: '居住地', value: '3' }
  27. ],
  28. areaOptions: [
  29. { label: '思明区', value: '350203' },
  30. { label: '海沧区', value: '350205' },
  31. { label: '湖里区', value: '350206' },
  32. { label: '集美区', value: '350211' },
  33. { label: '同安区', value: '350212' },
  34. { label: '翔安区', value: '350213' }
  35. ],
  36. hospitalOptions: [],
  37. teamOptions: [],
  38. dialogTableData: [],
  39. dialogHeader: [
  40. { label: '居民姓名', prop: 'name', width: '100' },
  41. { label: '证件号码', prop: 'idcard', width: '100' },
  42. { label: '手机号', prop: 'mobile', width: '110' },
  43. { label: '年龄', prop: 'age', width: '90' },
  44. { label: '出生日期', prop: 'birthday', width: '90' },
  45. { label: '常驻地址', prop: 'name', width: '100' },
  46. { label: '个人筛查状态', prop: 'idcard', width: '100' }
  47. ],
  48. form: {
  49. range: '1'
  50. },
  51. query: {},
  52. loading: false,
  53. exportLoading: false,
  54. tableData: [],
  55. visible: false,
  56. tableHeader: [
  57. { label: '居民姓名', prop: 'name', width: '100' },
  58. { label: '证件号码', prop: 'idcard', width: '100' },
  59. { label: '手机号', prop: 'mobile', width: '110' },
  60. { label: '年龄', prop: 'age', width: '90' },
  61. { label: '出生日期', prop: 'birthday', width: '90' },
  62. { label: '常住地址', prop: 'diagnosisName', width: '130' },
  63. { label: '个人筛查状态', prop: 'isSign', width: '90' },
  64. { label: '基本信息状态', prop: 'hospitalName', width: '90' },
  65. { label: '乳腺临床检查状态', prop: 'num', width: '90' },
  66. { label: '乳腺超声初筛时间', prop: 'turnDownTime', width: '150' },
  67. { label: '乳腺超声评估结果', prop: 'eventType', width: '130' },
  68. { label: '乳腺超声评估机构', prop: 'screenNum', width: '110' },
  69. { label: '乳腺超声评估人', prop: 'screenResult', width: '130' },
  70. { label: '乳腺钼靶评估时间', prop: 'turnDownTime', width: '150' },
  71. { label: '乳腺钼靶评估结果', prop: 'eventType', width: '130' },
  72. { label: '乳腺钼靶评估状态(待随访/已完成)', prop: 'screenNum', width: '110' },
  73. { label: '乳腺病理结果', prop: 'screenResult', width: '130' },
  74. { label: '乳腺病理评估机构', prop: 'screenResult', width: '130' },
  75. { label: '乳腺病理随访时间', prop: 'turnDownTime', width: '150' },
  76. { label: '乳腺癌分期状态(术前)', prop: 'eventType', width: '130' },
  77. { label: '乳腺癌分期状态(术后)', prop: 'screenNum', width: '110' },
  78. { label: '宫颈初筛时间', prop: 'screenResult', width: '130' },
  79. { label: '宫颈评估机构', prop: 'screenResult', width: '130' },
  80. { label: '宫颈评估人', prop: 'turnDownTime', width: '150' },
  81. { label: '宫颈评估时间', prop: 'eventType', width: '130' },
  82. { label: '宫颈评估状态', prop: 'screenNum', width: '110' },
  83. { label: '宫颈评估人群', prop: 'screenResult', width: '130' }
  84. ],
  85. page: 1,
  86. size: 10,
  87. total: 0,
  88. level: 0
  89. }
  90. },
  91. methods: {
  92. toUrl() {},
  93. init() {
  94. var selectedRole = JSON.parse(sessionStorage.getItem('selectedRole'))
  95. if (selectedRole.code.indexOf('350200') > -1) {
  96. this.level = 1 // 市卫健委
  97. this.areaOptions = [
  98. { label: '思明区', value: '350203' },
  99. { label: '海沧区', value: '350205' },
  100. { label: '湖里区', value: '350206' },
  101. { label: '集美区', value: '350211' },
  102. { label: '同安区', value: '350212' },
  103. { label: '翔安区', value: '350213' }
  104. ]
  105. } else if (selectedRole.code.length == 6) {
  106. this.level = 2 // 区管理
  107. this.areaOptions = [{ label: selectedRole.name.substring(0, 3), value: selectedRole.code }]
  108. this.form = {
  109. range: '1',
  110. area: selectedRole.code
  111. }
  112. this.getHospital(selectedRole.code)
  113. } else {
  114. this.level = 3 // 社区管理
  115. this.rangeOptions = [
  116. { label: '社区', value: '2' },
  117. { label: '居住地', value: '3' }
  118. ]
  119. this.areaOptions = [{ label: selectedRole.name.substring(0, 3), value: selectedRole.code.substring(0, 6) }]
  120. this.hospitalOptions = [{ name: selectedRole.name, code: selectedRole.code }]
  121. this.form = {
  122. range: 'hospital',
  123. area: selectedRole.code.substring(0, 6),
  124. hospital: selectedRole.code
  125. }
  126. this.getTeam(selectedRole.code)
  127. }
  128. this.initTime()
  129. this.getList()
  130. },
  131. initTime() {
  132. var vm = this
  133. var now = new Date()
  134. vm.nowyear = vm.chooseYear = now.getFullYear()
  135. vm.years = []
  136. for (i = vm.nowyear; i >= 2013; i--) {
  137. vm.years.push(i)
  138. }
  139. },
  140. resetArea() {
  141. if (this.level == 1) {
  142. delete this.form.area
  143. delete this.form.hospital
  144. delete this.form.team
  145. } else if (this.level == 2) {
  146. delete this.form.hospital
  147. delete this.form.team
  148. } else {
  149. delete this.form.team
  150. }
  151. },
  152. getList() {
  153. var vm = this
  154. this.loading = true
  155. var params = {
  156. ...this.form,
  157. page: this.page,
  158. size: this.size
  159. }
  160. vm.tableData = []
  161. if (this.chooseTime) {
  162. params.startTime = this.chooseTime[0]
  163. params.endTime = this.chooseTime[1]
  164. }
  165. httpRequest.get('doctor/twoCancers/count/breastQualityCount', { data: params }).then(function (res) {
  166. if (res.status == 200) {
  167. vm.tableData = res.detailModelList
  168. vm.total = res.totalCount
  169. // vm.tableData = [{ name: '张三' }]
  170. // vm.total = 1
  171. }
  172. vm.loading = false
  173. })
  174. },
  175. queryDate() {
  176. this.page = 1
  177. this.getList()
  178. },
  179. exportTable() {
  180. var params = {
  181. ...this.form,
  182. page: this.page,
  183. size: this.size
  184. }
  185. if (this.chooseTime) {
  186. params.startTime = this.chooseTime[0]
  187. params.endTime = this.chooseTime[1]
  188. }
  189. this.exportLoading = true
  190. var fileName = `乳腺癌筛查质控统计${new Date().getTime()}.xls`
  191. httpRequest.downLoadFileForAjax('doctor/twoCancers/count/exportBreastQualityCount', fileName, params).then(function () {
  192. this.exportLoading = false
  193. })
  194. },
  195. eliminateClick() {
  196. var selectedRole = JSON.parse(sessionStorage.getItem('selectedRole'))
  197. if (this.level == 1) {
  198. this.form = {
  199. range: 'town'
  200. }
  201. } else if (this.level == 2) {
  202. this.form = {
  203. range: 'town',
  204. area: selectedRole.code
  205. }
  206. this.getHospital(selectedRole.code)
  207. } else {
  208. this.form = {
  209. range: 'hospital',
  210. area: selectedRole.code.substring(0, 6),
  211. hospital: selectedRole.code
  212. }
  213. this.getTeam(selectedRole.code)
  214. }
  215. this.yearType = '1'
  216. this.chooseYear = new Date().getFullYear()
  217. this.chooseTime = null
  218. this.$forceUpdate()
  219. },
  220. getHospital(code) {
  221. var vm = this
  222. delete this.form.hospital
  223. delete this.form.team
  224. var params = {
  225. type: 5,
  226. code: code
  227. }
  228. httpRequest.post('common/district', { data: params }).then(function (res) {
  229. vm.hospitalOptions = [{ code: '', name: '全部' }]
  230. vm.hospitalOptions = vm.hospitalOptions.concat(res.list)
  231. })
  232. },
  233. getTeam(code) {
  234. var vm = this
  235. delete this.form.team
  236. var params = {
  237. hospital: code,
  238. area: this.form.area
  239. }
  240. httpRequest.get('statisticsExport/teamList', { data: params }).then(function (res) {
  241. vm.teamOptions = [{ id: '', name: '全部' }]
  242. vm.teamOptions = vm.teamOptions.concat(res.data)
  243. })
  244. },
  245. handleCurrentChange(val) {
  246. this.page = val
  247. this.getList()
  248. },
  249. handleSizeChange(val) {
  250. this.size = val
  251. this.getList()
  252. },
  253. openDialog(scope) {
  254. layer.open({
  255. type: 2,
  256. // offset: ['100px'], //右下角弹出
  257. area: ['568px', '100%'],
  258. shade: 0.5,
  259. title: '查看筛选结果',
  260. fixed: true, //不固定
  261. maxmin: true,
  262. closeBtn: 1,
  263. shift: 5,
  264. shadeClose: false, //点击遮罩关闭层
  265. content: `../../jbsc/html/view_screening_results.html?resultCode=${scope.row.code}&opt=1`
  266. })
  267. }
  268. },
  269. mounted() {
  270. this.init()
  271. }
  272. })