index.js 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286
  1. var template = ''
  2. $.ajax('../../../component/statistics/LascPatient/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('lasc-patient', {
  14. template: template,
  15. props: [],
  16. data: function () {
  17. return {
  18. years: [],
  19. currentEditData: {},
  20. dialogVisible: false,
  21. showTotalTable: true,
  22. serviceRecordVisable: false,
  23. yearType: '1',
  24. chooseYear: null,
  25. chooseTime: null,
  26. formDialogVisible: true,
  27. rangeOptions: [
  28. { label: '区', value: 'town' },
  29. { label: '社区', value: 'hospital' }
  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. form: {
  42. range: 'town'
  43. },
  44. loading: false,
  45. exportLoading: false,
  46. tableData: [],
  47. tableHeader: [
  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: '130' },
  54. { label: '个人筛查状态', prop: 'statusName', width: '90' },
  55. { label: '基本信息状态', prop: 'infoStatusName', width: '90' },
  56. { label: '乳腺临床检查状态', prop: 'cliStatusName', width: '90' },
  57. { label: '乳腺超声初筛时间', prop: 'cduTime', width: '150' },
  58. { label: '乳腺超声评估结果', prop: 'cduResultName', width: '130' },
  59. { label: '乳腺超声评估机构', prop: 'cduOrg', width: '110' },
  60. { label: '乳腺超声评估人', prop: 'cudUser', width: '130' },
  61. { label: '乳腺钼靶评估时间', prop: 'molTime', width: '150' },
  62. { label: '乳腺钼靶评估结果', prop: 'molResultName', width: '130' },
  63. { label: '乳腺钼靶评估状态(待随访/已完成)', prop: 'molStatusName', width: '110' },
  64. { label: '乳腺病理结果', prop: 'bpatResultName', width: '130' },
  65. { label: '乳腺病理评估机构', prop: 'bpatOrg', width: '130' },
  66. { label: '乳腺病理随访时间', prop: 'bpatTime', width: '150' },
  67. { label: '乳腺癌分期状态(术前)', prop: 'opFrontName', width: '130' },
  68. { label: '乳腺癌分期状态(术后)', prop: 'opAfterName', width: '110' },
  69. { label: '宫颈初筛时间', prop: 'gynTime', width: '130' },
  70. { label: '宫颈评估机构', prop: 'cerOrg', width: '130' },
  71. { label: '宫颈评估人', prop: 'cerUser', width: '150' },
  72. { label: '宫颈评估时间', prop: 'cerTime', width: '130' },
  73. { label: '宫颈评估状态', prop: 'cerStatusName', width: '110' },
  74. { label: '宫颈评估人群', prop: 'screenResult', width: '130' }
  75. ],
  76. page: 1,
  77. size: 10,
  78. total: 0,
  79. level: 0,
  80. FormData: {}
  81. }
  82. },
  83. methods: {
  84. init() {
  85. var selectedRole = JSON.parse(sessionStorage.getItem('selectedRole'))
  86. if (selectedRole.code.indexOf('350200') > -1) {
  87. this.level = 1 // 市卫健委
  88. this.areaOptions = [
  89. { label: '思明区', value: '350203' },
  90. { label: '海沧区', value: '350205' },
  91. { label: '湖里区', value: '350206' },
  92. { label: '集美区', value: '350211' },
  93. { label: '同安区', value: '350212' },
  94. { label: '翔安区', value: '350213' }
  95. ]
  96. } else if (selectedRole.code.length == 6) {
  97. this.level = 2 // 区管理
  98. this.areaOptions = [{ label: selectedRole.name.substring(0, 3), value: selectedRole.code }]
  99. this.form = {
  100. range: 'town',
  101. area: selectedRole.code
  102. }
  103. this.getHospital(selectedRole.code)
  104. } else {
  105. this.level = 3 // 社区管理
  106. this.rangeOptions = [
  107. { label: '社区', value: 'hospital' },
  108. { label: '团队', value: 'team' }
  109. ]
  110. this.areaOptions = [{ label: selectedRole.name.substring(0, 3), value: selectedRole.code.substring(0, 6) }]
  111. this.hospitalOptions = [{ name: selectedRole.name, code: selectedRole.code }]
  112. this.form = {
  113. range: 'hospital',
  114. area: selectedRole.code.substring(0, 6),
  115. hospital: selectedRole.code
  116. }
  117. this.getTeam(selectedRole.code)
  118. }
  119. this.initTime()
  120. this.getList()
  121. },
  122. initTime() {
  123. var vm = this
  124. var now = new Date()
  125. vm.nowyear = vm.chooseYear = now.getFullYear()
  126. vm.years = []
  127. for (i = vm.nowyear; i >= 2013; i--) {
  128. vm.years.push(i)
  129. }
  130. },
  131. resetArea() {
  132. if (this.level == 1) {
  133. delete this.form.area
  134. delete this.form.hospital
  135. delete this.form.team
  136. } else if (this.level == 2) {
  137. delete this.form.hospital
  138. delete this.form.team
  139. } else {
  140. delete this.form.team
  141. }
  142. },
  143. back() {
  144. var vm = this
  145. vm.showTotalTable = true
  146. vm.serviceRecordVisable = false
  147. },
  148. getList() {
  149. var vm = this
  150. this.loading = true
  151. var params = {
  152. ...this.form,
  153. page: this.page,
  154. size: this.size
  155. }
  156. if (this.yearType == '1') {
  157. params.startDate = this.chooseYear + '-01-01'
  158. params.endDate = this.chooseYear + '-12-31'
  159. } else {
  160. if (this.chooseTime) {
  161. params.startDate = this.chooseTime[0]
  162. params.endDate = this.chooseTime[1]
  163. }
  164. }
  165. httpRequest.get('doctor/twoCancers/count/patientArchive', { data: params }).then(function (res) {
  166. if (res.status == 200) {
  167. vm.tableData = res.detailModelList
  168. vm.total = res.totalCount
  169. }
  170. vm.loading = false
  171. })
  172. },
  173. onClickServiceRecord(record) {
  174. // this.currentEditData = record
  175. this.showTotalTable = false
  176. this.serviceRecordVisable = true
  177. },
  178. queryDate() {
  179. this.page = 1
  180. this.getList()
  181. },
  182. exportTable() {
  183. var vm = this
  184. var params = {
  185. ...this.form,
  186. page: this.page,
  187. pageSize: this.size
  188. }
  189. if (this.yearType == '1') {
  190. params.startDate = this.chooseYear + '-01-01'
  191. params.endDate = this.chooseYear + '-12-31'
  192. } else {
  193. if (this.chooseTime) {
  194. params.startDate = this.chooseTime[0]
  195. params.endDate = this.chooseTime[1]
  196. }
  197. }
  198. this.exportLoading = true
  199. var fileName = `两癌筛查居民档案${new Date().getTime()}.xls`
  200. httpRequest.downLoadFileForAjax('doctor/twoCancers/count/exportPatientArchive', fileName, params).then(function () {
  201. vm.exportLoading = false
  202. })
  203. },
  204. eliminateClick() {
  205. var selectedRole = JSON.parse(sessionStorage.getItem('selectedRole'))
  206. if (this.level == 1) {
  207. this.form = {
  208. range: 'town'
  209. }
  210. } else if (this.level == 2) {
  211. this.form = {
  212. range: 'town',
  213. area: selectedRole.code
  214. }
  215. this.getHospital(selectedRole.code)
  216. } else {
  217. this.form = {
  218. range: 'hospital',
  219. area: selectedRole.code.substring(0, 6),
  220. hospital: selectedRole.code
  221. }
  222. this.getTeam(selectedRole.code)
  223. }
  224. this.yearType = '1'
  225. this.chooseYear = new Date().getFullYear()
  226. this.chooseTime = null
  227. this.$forceUpdate()
  228. },
  229. getHospital(code) {
  230. var vm = this
  231. delete this.form.hospital
  232. delete this.form.team
  233. var params = {
  234. type: 5,
  235. code: code
  236. }
  237. httpRequest.post('common/district', { data: params }).then(function (res) {
  238. vm.hospitalOptions = [{ code: '', name: '全部' }]
  239. vm.hospitalOptions = vm.hospitalOptions.concat(res.list)
  240. })
  241. },
  242. getTeam(code) {
  243. var vm = this
  244. delete this.form.team
  245. var params = {
  246. hospital: code,
  247. area: this.form.area
  248. }
  249. httpRequest.get('statisticsExport/teamList', { data: params }).then(function (res) {
  250. vm.teamOptions = [{ id: '', name: '全部' }]
  251. vm.teamOptions = vm.teamOptions.concat(res.data)
  252. })
  253. },
  254. handleCurrentChange(val) {
  255. this.page = val
  256. this.getList()
  257. },
  258. handleSizeChange(val) {
  259. this.size = val
  260. this.getList()
  261. },
  262. openDialog(scope) {
  263. layer.open({
  264. type: 2,
  265. // offset: ['100px'], //右下角弹出
  266. area: ['568px', '100%'],
  267. shade: 0.5,
  268. title: '查看筛选结果',
  269. fixed: true, //不固定
  270. maxmin: true,
  271. closeBtn: 1,
  272. shift: 5,
  273. shadeClose: false, //点击遮罩关闭层
  274. content: `../../jbsc/html/view_screening_results.html?resultCode=${scope.row.code}&opt=1`
  275. })
  276. }
  277. },
  278. mounted() {
  279. this.init()
  280. }
  281. })